MEE 514 – Computational Fluid Dynamics
1
Lecture 7
2D (and 3D) Heat Conduction
Dr Gilbert Accary
OUTLINES
Governing equation
Space discretization of 2D heat conduction
Boundary conditions
2D Transient heat conduction
3D Transient heat conduction
Implementation in MATLAB
Complex geometries (Penalization)
Need for Iteration
2
GOVERNING EQUATIONS
General Heat Conduction:
𝜕 𝜌𝐶𝑇 𝜕 𝜕𝑇 𝜕 𝜕𝑇 𝜕 𝜕𝑇
𝑘 𝑘 𝑘 𝑆
𝜕𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑧
2D Steady Heat Conduction: N
x
𝜕 𝜕𝑇 𝜕 𝜕𝑇
𝑘 𝑘 𝑆 0 n
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
W P E
w e
y
N s
P E
W
S
S
3
DISCRETIZATION - 2D STEADY PROBLEM
Integration over a CV and using Gauss theorem:
𝜕𝑇 𝜕𝑇 𝜕𝑇 𝜕𝑇
𝑘 𝑘 ∆𝑦 𝑘 𝑘 ∆𝑥 𝑆̅∆𝑥∆𝑦 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
Using the diffusion flux concept:
x N
𝜕𝑇 𝑘
𝑘 ∆𝑦 𝐷 𝑇 𝑇 𝐷 ∆𝑦
𝜕𝑥 ∆𝑥 n
𝜕𝑇 𝑘 W P E
𝑘 ∆𝑦 𝐷 𝑇 𝑇 𝐷 ∆𝑦 w e
𝜕𝑥 ∆𝑥
y
𝜕𝑇 𝑘 s
𝑘 ∆𝑥 𝐷 𝑇 𝑇 𝐷 ∆𝑥
𝜕𝑦 ∆𝑦
S
𝜕𝑇 4
𝑘 ∆𝑥 𝐷 𝑇 𝑇 𝑘
𝜕𝑦 𝐷 ∆𝑥
∆𝑦
DISCRETIZATION - 2D STEADY PROBLEM (CONT.)
Source term: 𝑆̅∆𝑥∆𝑦 𝑆 𝑆 𝑆 𝑇
Convection at the surface:
𝑆 𝑆 𝑆 𝑇 𝐹 . ℎ ∆𝑥∆𝑦 𝑇 𝑇
𝑇
FS – Source function, 0 𝐹 𝑥, 𝑦 2 𝜀
𝑆 𝐹 . ℎ ∆𝑥∆𝑦
𝑆 𝐹 . ℎ ∆𝑥∆𝑦 𝑇 𝑇 𝑇
Surface radiation: ℎ
𝑆 𝑆 𝑆 𝑇 𝐹 . 𝜎ɛ ∆𝑥∆𝑦 𝑇 𝑇
𝑆 4𝐹 . 𝜎ɛ ∆𝑥∆𝑦 . 𝑇
𝑆 𝐹 . 𝜎ɛ ∆𝑥∆𝑦 𝑇 3𝑇 5
Iterations are required in this case
DISCRETIZATION - 2D STEADY PROBLEM (CONT.)
Discretized Equation:
𝐷 𝑇 𝑇 𝐷 𝑇 𝑇 𝐷 𝑇 𝑇 𝐷 𝑇 𝑇 𝑆 0
𝑘 𝑘 𝑘 𝑘
𝐷 ∆𝑦 𝐷 ∆𝑦 𝐷 ∆𝑥 𝐷 ∆𝑥
∆𝑥 ∆𝑥 ∆𝑦 ∆𝑦
𝑆 𝑆 𝑆 𝑇
x N
𝑘 must be interpolated as in 1D
1 1 1 1 n
(uniform mesh)
𝑘 2 𝑘 𝑘 W P E
w e
After arrangement, we obtain a y
penta-diagonal linear system: s
𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑏
S
𝑎 𝐷 𝑎 𝐷 𝑎 𝐷 𝑎 𝐷 6
𝑎 𝑎 𝑎 𝑎 𝑎 𝑆 𝑏 𝑆
BOUNDARY CONDITIONS
Two types of BC will be considered:
• Dirichlet condition: Twall imposed
• Neumann condition: 𝑞 imposed
P
2𝑘 ∆𝑦
For node P: 𝐷 ∆𝑥 2 S
∆𝑦
Twall
Dirichlet condition: Twall imposed qwall
𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑏
𝑎 𝑎 𝑎 𝑎 𝑎 𝑆
𝑏 𝑆 𝑎 𝑇
Coefficients 𝑎 , 𝑎 , 𝑎 , and 𝑎 defined as before 7
Wall heat flux: 𝑞 ∆
𝑇 𝑇
BOUNDARY CONDITIONS (CONT.)
Neumann condition:
𝜕𝑇 𝜕𝑇 𝜕𝑇 𝜕𝑇
𝑘 𝑘 ∆𝑦 𝑘 𝑘 ∆𝑥 𝑆̅∆𝑥∆𝑦 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
qwall
In this case, in:
𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑏
P
𝑎 𝑎 𝑎 𝑎 𝑆 ∆𝑦
2 S
𝑏 𝑆 𝑞 Δ𝑥 Twall
qwall
𝑞
Wall temperature: 𝑇 𝑇 ∆𝑥
𝐷
2𝑘
with: 𝐷 ∆𝑥 8
∆𝑦
2D TRANSIENT HEAT CONDUCTION
Governing Equation:
𝜕 𝜌𝐶𝑇 𝜕 𝜕𝑇 𝜕 𝜕𝑇
𝑘 𝑘 𝑆 𝑇 𝑇 at t 0
𝜕𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
Implicit scheme (const. properties, linear source term):
𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑏
𝑎 𝐷 𝑎 𝐷 𝑎 𝐷 𝑎 𝐷
𝑎 𝑎 𝑎 𝑎 𝑎 𝑆 𝑎
𝜌𝐶∆𝑥∆𝑦
𝑎 𝑏 𝑆 𝑎 𝑇
∆𝑡
Unconditionally stable, t is chosen physically
9
Requires solving a linear system at each time step
3D TRANSIENT HEAT CONDUCTION
Governing Equation:
𝜕 𝜌𝐶𝑇 𝜕 𝜕𝑇 𝜕 𝜕𝑇 𝜕 𝜕𝑇
𝑘 𝑘 𝑘 𝑆
𝜕𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑧
Implicit scheme (const. properties, linear source term):
𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑎 𝑇 𝑏
𝑘 𝑘
𝑎 𝐷 ∆𝑦∆𝑧 𝑎 𝐷 ∆𝑦∆𝑧
∆𝑥 ∆𝑥
𝑘 𝑘
𝑎 𝐷 ∆𝑥∆𝑧 𝑎 𝐷 ∆𝑥∆𝑧
∆𝑦 ∆𝑦
𝑘 𝑘
𝑎 𝐷 ∆𝑥∆𝑦 𝑎 𝐷 ∆𝑥∆𝑦
∆𝑧 ∆𝑧
𝑎 𝑎 𝑎 𝑎 𝑎 𝑎 𝑎 𝑆 𝑎
10
𝜌𝐶∆𝑥∆𝑦∆𝑧
𝑏 𝑆 𝑎 𝑇 𝑎
∆𝑡
IMPLEMENTATION (2D STEADY HEAT CONDUCTION)
Constant physical properties
Convection on one side (the other side is insulated)
0.5 m
q=0 Tc = 20C
0.25 m
Tc = 20C
Ly = 0.5 m
Th = 100C
k = 0.25 W/m.C
q=0 T∞ = 5C
Th = 100C
h = 25 W/m2.C
Lx = 1 m
Check mesh effect 11
COMPLEX GEOMETRIES (PENALIZATION)
𝑇 𝑞 0
𝑞 0
𝑞 0
𝑇 𝑇 𝑞 0
𝑇
Temperature 𝑇 in imposed
𝑎 0, 𝑎 0, 𝑎 0, 𝑎 0, 𝑎 1, 𝑏 𝑇
2𝑘 𝑘
No heat transfer: 𝑘 ~ 0 𝑘 12
𝑘 𝑘
No source term: 𝐹 0
IMPLEMENTATION (PENALIZATION)
Temperature-independent thermal conductivity
Convection on one side (the other side is insulated)
q=0
Tc = 20C
k = 0.25 W/m.C
Ly = 0.5 m
Th = 100C
T∞ = 5C
q=0 h = 25 W/m2.C
0.125 m
q=0
q=0
Th = 100C
0.25 m
Lx = 1 m
Check penalization effect
13
ITERATION – STOPPING CRITERION
If the physical properties depend on T or if the source
term dependence on T is not linear (as in radiation):
Steady heat conduction: 𝑎 𝑇 𝑇 𝑎 𝑇 𝑇 𝑏 𝑇
Iterations are required
Residual @ for the CV of center P at iteration k:
𝑟 𝑎 𝑇 𝑇 𝑎 𝑇 𝑇 𝑏 𝑇
Iterations are repeated until: 𝑟 <
In transient heat conduction, iterations are repeated
at each time step m until: 𝑟 < 14
IMPLEMENTATION (WITH ITERATION)
Temperature-dependent thermal conductivity
Convection and radiation on one side
0.5 m
q=0 Tc = 20C
0.25 m
Tc = 20C
Ly = 0.5 m
T∞ = 5C
Th = 100C h = 25 W/m2.C
q=0 Tsurr = 0C
Th = 100C ɛ 0.8
Lx = 1 m
Check the effect of thermal conductivity 15
𝑘 0.1 0.0025 𝑇℃ (W/m.C)