Numerical Methods Chapter 5
Numerical Methods Chapter 5
Chapter 5
Numerical Methods
in Heat Conduction
© McGraw Hill LLC. All rights reserved. No reproduction or distribution without the prior written consent of McGraw Hill LLC.
Objectives
2. Better Modeling.
When attempting to get an analytical solution to a
physical problem, there is always the tendency to
oversimplify the problem to make the mathematical
model sufficiently simple to warrant an analytical
solution.
Therefore, it is common practice to ignore any effects
that cause mathematical complications such as
nonlinearities in the differential equation or the
boundary conditions (nonlinearities such as
temperature dependence of thermal conductivity and
the radiation boundary conditions).
A mathematical model intended for a numerical Figure 5.3: The approximate
solution is likely to represent the actual problem better. numerical solution of a real-world
The numerical solution of engineering problems has problem may be more accurate
now become the norm rather than the exception even than the exact (analytical)
when analytical solutions are available. solution of an oversimplified
model of that problem.
Access the text alternative for slide images.
3. Flexibility.
Engineering problems often require extensive parametric studies
to understand the influence of some variables on the solution in
order to choose the right set of variables and to answer some
“what-if” questions.
This is an iterative process that is extremely tedious and time-
consuming if done by hand.
Computers and numerical methods are ideally suited for such
calculations, and a wide range of related problems can be solved
by minor modifications in the code or input variables.
Today it is almost unthinkable to perform any significant
optimization studies in engineering without the power and flexibility
of computers and numerical methods.
4. Complications.
The numerical methods for solving differential Table 5.1: Year-end balance of a
equations are based on replacing the differential $100 account earning interest at an
equations by algebraic equations. annual rate of 18 percent for various
In the case of the popular finite difference method, compounding periods.
this is done by replacing the derivatives by Compounding Number of Year-end
differences. period periods, n balance
Below we demonstrate this with both first- and 1 year 1 $118.00
second-order derivatives.
6 months 2 118.81
An Example: 1 month 12 119.56
A = A0 (1 + i ) = ( $100 )(1 + 0.09 ) = $118.81
n 2
1 week 52 119.68
dA 1 day 365 119.72
= iA
dt 1 hour 8760 119.72
A = A0 exp ( it ) 1 minute 525600 119.72
df ( x ) f f ( x + x ) − f ( x )
= lim = lim
dx x → 0 x x → 0 x
df ( x ) 1 2 d 2 f ( x )
f ( x + x ) = f ( x ) + x + x + ...
dx 2 dx 2
dT dT
− Tm +1 − Tm Tm − Tm −1
dx dx −
T − 2Tm + Tm +1
2 1 1
m+ m−
d T
2 2
= x x = m −1
dx 2 m
x x x 2
Tm −1 − 2Tm + Tm +1 em
+ =0 m = 1, 2,3,..., M − 1
x 2 k
Finite difference representation of the second
derivative at a general internal node m. Figure 5.7: Schematic of the
nodes and the nodal temperatures
1
Tm = (Tm−1 + Tm+1 ) no heat generation. used in the development of the
2 finite difference formulation of
heat transfer in a plane wall.
Finite difference formulation for steady two-dimensional heat conduction in a region with
heat generation and constant thermal conductivity in rectangular coordinates.
Eelement T
Qcon, left + Qcond,right + Egen, element = =0 Eelement = 0 Qcond = kA
t L
Egen, element = emVelement = em Ax
Tm −1 − Tm Tm +1 − Tm
Qcond, left = kA Qcond, right = kA
x x
Tm −1 − Tm T −T
kA + kA m +1 m + em Ax = 0
x x
Tm −1 − 2Tm + Tm +1 em m = 1, 2,3,..., M − 1
+ =0
x 2 k
This equation is applicable to each of the M −
1 interior nodes, and its application gives M −
1 equations for the determination of
temperatures at M + 1 nodes.
The two additional equations needed to solve
for the M + 1 unknown nodal temperatures are
obtained by applying the energy balance on Figure 5.11: In finite difference
the two elements at the boundaries (unless, of formulation, the temperature is assumed
course, the boundary temperatures are to vary linearly between the nodes.
specified).
Boundary Conditions.
Boundary conditions most commonly
encountered in practice are the specified
temperature, specified heat flux, convection,
and radiation boundary conditions, and here
we develop the finite difference formulations
for them for the case of steady one-
dimensional heat conduction in a plane wall of
thickness L as an example.
The node number at the left surface at x = 0 is 0,
and at the right surface at x = L it is M. Note
that the width of the volume element for either
boundary node is x / 2.
Specified temperature boundary condition, Figure 5.13: Finite difference
formulation of specified
T ( 0 ) = T0 = Specified value temperature boundary conditions
T ( L ) = TM = Specified value on both surfaces of a plane wall.
All sides
Q + Egen, element = 0
T1 − T0
Qleft surface + kA + e0 ( Ax / 2 ) = 0
x
T1 − T0 x
hA (T − T0 ) + A (Tsurr
4
− T04 ) + kA + e0 A =0
x 2
Access the text alternative for slide images.
Tm −1 − Tm T −T x x
kA A + k B A m +1 m + eA,m A + eB ,m A =0
x x 2 2
Treating Insulated Boundary Nodes as Interior Nodes: The Mirror Image Concept.
Tm +1 − 2Tm + Tm −1 em
+ =0
x 2
k
Figure 5.17: A node on an insulated
boundary can be treated as an interior node T1 − 2T0 + T1 e0
→ + =0
by replacing the insulation with a mirror. x 2 k
Access the text alternative for slide images.
Example:
L 0.04m
x = = = 0.02 m
M −1 3 −1
Node 1:
T0 − 2T1 + T2 e1 0 − 2T1 + T2 e1
+ = 0 → + =0
x 2 k x 2 k
e1x 2
→ 2T1 − T2 = Figure 5.18: Schematic for Example 5.1.
k
Node 2:
T = 30C h = 45 W / m 2 .K
T1 − T2
hA (T − T2 ) + kA + e2 ( Ax / 2 ) = 0 2T1 − T2 = 71.43 (in C)
x
hx hx e2 x 2 T1 − 1.032T2 = 36.68 (in C)
T1 − 1 + T2 = − T −
k k 2k
T2 = 136.1C
Figure 5.18: Schematic for Example 5.1.
Exact solution:
Exact solution: T2 = 136.0C
Boundary Nodes.
The region is partitioned between the
nodes by forming volume elements
around the nodes, and an energy balance
is written for each boundary node.
An energy balance on a volume element
is,
All sides
Q + eVelement = 0
Qleft + Qtop + Qright + Qbottom + e2V2 = 0
Example:
Node 3
x y x T6 − T3 y T2 − T3 x y
h + (T − T3 ) + k +k + e3 =0
2 2 2 y 2 x 2 2
2hl 2
2hl el
T2 − 2 + T3 + T6 = − T − 3
k k 2k
e4l 2
Node 4 T5 + T1 + T5 + T10 − 4T4 + =0
k
Figure 5.28: Schematics for
e4l 2
energy balances on the volume T10 = 90 C, T1 − 4T4 + 2T5 = −90 −
k
elements of nodes 3 and 4.
e5l 2
Node 5 T4 + T2 + T6 + T11 − 4T5 + =0
k
e5l 2
T11 = 90 C, T2 + T4 − 4T5 + T6 = −90 −
k
2hl 2
2hl 3e l
Node 6 T12 = 90 C, T3 + 2T5 − 6 + T6 + T7 = −180 − T − 6
k k 2k
x y y T7 − T6 T −T
Figure 5.29: Schematics for h + (T − T6 ) + k + K x 12 6
2 2 2 x y
energy balances on the volume T5 − T6 x T3 − T6 3xy
elements of nodes 5 and 6. + k y +k + e6 =0
x 2 y 4
Access the text alternative for slide images.
Nodes 7, 8
y T8 − T7 T −T
hx (T − T7 ) + k + k x 13 7
2 x y
y T6 − T7 y T13 = 90 C,
+k + e7 x =0
2 x 2
2hl 2
2hl el
T6 − 4 + T7 + T8 = −180 − T − 7
k k k
2hl 2
2hl el
Figure 5.30: Schematics for T7 − 4 + T8 + T9 = −180 − T − 8
k k k
energy balances on the volume
−2.064T1 + T2 + T4 = −11.2
elements of nodes 7 and 9.
T1 − 4.128T2 + T3 + 2T5 = −22.4
Node 9 T2 − 2.128T3 + T6 = −12.8
x y x T15 − T9 y T8 − T9 x y T1 − 4T4 + 2T5 = −109.2
h (T − T9 ) + qR + k +k + e9 =0
2 2 2 y 2 x 2 2 T2 + T4 − 4T5 + T6 = −109.2
x = y = 1 T15 = 90 C, T3 + 2T5 − 6.128T6 + T7 = −212.0
t
All sides
Q + t Egen,element = Eelement Eelement = mc p T = Velement c p T
Eelement T Tmi +1 − Tmi
All sides
Q + Egen, element =
t
= Velement c p
t
All sides
Q + Egen,element = Velement c p
t
Access the text alternative for slide images.
Tmi +1 − Tmi
All sides
Q + Egen, element = Velement c p
t
Tmi +1 − Tmi
Explicit method:
All sides
Q +Ei i
gen, element = Velement c p
t
Tmi +1 − Tmi
Implicit method:
All sides
Q i +1
+E i +1
gen, element = Velement c p
t
t
= mesh Fourier number
x 2
em x 2 Tmi +1 − Tmi
Tm −1 − 2Tm + Tm +1 + =
k
emi x 2 Tmi +1 − Tmi
Tm −1 − 2Tm + Tm +1 +
i i i
= ( explicit )
k
emi x 2
Ti +1
m = (T i
m −1 +Ti
m +1 ) + (1 − 2 )T + k
i
m
Figure 5.40: The nodal points and i +1 i +1 emi +1x 2 Tmi +1 − Tmi
i +1
volume elements for the transient finite T − 2T + T +
m −1 m +1 = (implicit )
m
k
difference formulation of one-dimensional
emi +1x 2
conduction in a plane wall. Tm −1 − (1 + 2 ) Tm + Tm +1 +
i +1 i +1 i +1
+ Tmi = 0
k
Access the text alternative for slide images.
to be positive or zero.
hx 1
1 − 2 − 2 ~ 0 or
k 2 (1 + hx / k )
Access the text alternative for slide images.
Example:
L 0.04m
x = = = 0.02m
M −1 3 −1
Explicit finite difference formulation.
e1x 2
T1i +1 = (T0 + T2i ) + (1 − 2 ) T1i + Node 1
k
T1i − T2i x x T i +1 − T2i
hA (T − T2i ) + kA + e2 A = A cp 2 Node 2 Figure 5.45: Schematic for the
x 2 2 t
explicit finite difference formulation
2hx e2 x 2 T2i +1 = T2i
k
( 2) ( 2 2) k =
T − T i
+ 2 T i
− T i
+ of the convection condition at the
right boundary of a plane wall.
hx i i hx e2 x 2
T2i +1 = 1 − 2 − 2 2
T + 1
2T + 2 T +
k k k
hx 1 x 2
1 − 2 − 2 0 → → t = t / x 2
k 2 (1 + hx / k ) 2a (1 + hx / k )
( 0.02m )
2
t = 15.5 s
2
2 12.5 10−6 m s 1 + (45W / m 2 .K ) ( 0.02m ) / 28 W / m.K
=
t
=
(12.5 10 −6
m 2 / s ) (15s )
= 0.46875 (for t =15 s )
x 2 ( 0.02 m )
2
Node Node
Table 5.3: The variation of the Time step, i Time, s Temperature, Temperature,
°C T1i °C T2i
nodal temperatures in Example
5.5 with time obtained by the 0 0 200.0 200.0
explicit method.
1 15 139.7 228.4
2 30 149.3 172.8
3 45 123.8 179.9
4 60 125.6 156.3
5 75 114.6 157.1
6 90 114.3 146.9
7 105 109.5 146.3
8 120 108.9 141.8
9 135 106.7 141.1
10 150 106.3 139.0
20 300 103.8 136.1
30 450 103.7 136.0
40 600 103.7 136.0
Node Node
Table 5.4: The variation of the Time step, i Time, s Temperature, Temperature,
°C T1i °C T2i
nodal temperatures in example
5.5 with time obtained by the 0 0 200.0 200.0
implicit method.
1 15 168.8 199.6
2 30 150.5 190.6
3 45 138.6 180.4
4 60 130.3 171.2
5 75 124.1 163.6
6 90 119.5 157.6
7 105 115.9 152.8
8 120 113.2 149.0
9 135 111.0 146.1
10 150 109.4 143.9
20 300 104.2 136.7
30 450 103.8 136.1
40 600 103.8 136.1
i
l2
= (T ) + (1 − 4 )T enode
T i+1
node
i
left +T +T
i
top
i
right +Ti
bottom
i
node + Explicit formulation.
k
= (Tleft )
1
In the case of no heat generation and = i+1
Tnode i
+ Ttop
i
+ Tright
i
+ Tbottom
i
/4
4
Stability criterion
t 1 (interior nodes, two-dimensional
=
l2 4 heat transfer in rectangular
coordinates).
1
Figure 5.50: In the case of no heat generation and = ,
4
the temperature of an interior node at the new time
step is the average of the temperatures of its
neighboring nodes at the previous time step.
Tmi +1 − Tmi
Example
All sides
Q + eVelement
i
= pVelement c p
t
Figure 5.52:
Schematics for energy
balances on the
volume elements of
nodes 1 and 2.
Node 1
x y T2i − T1i x T4i − T1i
h (T − T1 ) + k
i
+k
2 2 x 2 y
x y x y T1i +1 − T1i
+ e1 = cp Figure 5.51: Schematic and nodal
2 2 2 2 t network for Example 5.7.
e1l 2 T1i +1 − T1i
2hl
k
(T − T1 ) + 2 (T2 − T1 ) + 2 (T4 − T1 ) + k =
i i i i i
hl i i hl e1l 2
T 1
i +1
= 1 − 4 − 2 T1 + 2 T2 + T4 + T +
i
k k 2k
Access the text alternative for slide images.
Node 2
y T3i − T2i T5i − T2i
hx (T − T ) + k i
+ k x
2 x y
2
Node 5
i e5l 2
T 5
i +1
= (1 − 4 ) T + T2 + T4 + T6 + 90 +
5
i i i
k
Node 6
Figure 5.54: Schematics for energy
x y y T7i − T6i T12i − T6i T5i − T6i
( 6 )
balances on the volume elements of h + T − T i
+ k + k x + k y
nodes 5 and 6. 2 2 2 x x x
Nodes 7, 8
i
− i i
− i
hx (T − T7i ) + k
y T T T T
8 7
+ k x 13 7
2 x y
hl i i 2hl e2l 2
T 7
i +1
= 1 − 4 − 2 T7 + T6 + T8 + 2 90 +
i
T +
k k k
hl i i 2hl e8l 2
T 8
i +1
= 1 − 4 − 2 T8 + T7 + T9 + 2 90 +
i
T +
k k k
Node 9
x y x T15i − T9i
h
2
( 9 ) R 2 2 y
T − T i
+ q + k
1 − 4 − 4
hl
0 →
1 l2 T3i +1 = 0.0552T3i + 0.444 (T2i + T6i + 12.8 )
4 (1 + hl / k )
→ t
4 (1 + hl / k )
= t / 2
t = 10.6s
4 ( 3.2 10 m / s ) 1 + (80W / m .K ) ( 0.012m ) / (15W / m.K )
6 2 2
( 3.2 10 −6
m 2 /s ) (10s ) T7i +1 = 0.0836T7i + 0.222 (T6i + T8i + 202.4 )
t
= = = 0.222
T8i +1 = 0.0836T8i + 0.222 (T7i + T9i + 202.4 )
( 0.012m )
2
l2
T9i +1 = 0.0836T9i + 0.444 (T8i + 105.2 )
Figure 5.57: Interactions between the arbitrary Figure 5.58: Illustration of cells that
object and the surrounding environment. define the object.
Access the text alternative for slide images.
©McGraw Hill LLC 53
5.6: A Brief History of Computational Heat
Transfer 3
Figure 5.59: A cell and its Figure 5.60: The four neighboring cells
neighbors. exchanging information with the central
cell.
John P Abraham
John P Abraham
John P Abraham
John P Abraham
Figure 5.65: Illustration of a body-
Figure 5.64: Illustration of a stair-step mesh. fitted mesh.
John P Abraham
www.mheducation.com
© McGraw Hill LLC. All rights reserved. No reproduction or distribution without the prior written consent of McGraw Hill LLC.