Introduction To Numerical Methods in Heat Transfer
Introduction To Numerical Methods in Heat Transfer
in Heat Transfer
Presented by:
Steven L. Rickman
NASA Technical Fellow for Passive Thermal
NASA Engineering and Safety Center
2
Overview
Finite difference;
Finite element;
4
Lesson Roadmap
Example 2: Example 3:
Finite Implicit
Transient Thermal Adding Thermal
Difference Formulation
Numerical Analysis Radiation
Methods
Establishing the
Finite Calculus of
Functional
Element Variations
Equation
Example 5:
Example 4: Steady State Analysis Example 6: Transient
Steady State
- Distributed Heating Analysis
Analysis
5
What is Heat Transfer? (Ref. 1)
6
Thermal Modeling Basics
7
Thermal Modeling Basics
10
Thermal Modeling Basics
11
Thermal Modeling Basics
12
Thermal Modeling Basics
Consider this
geometry
13
Some Terminology
14
Fourier Heat Conduction Law
15
Conservation of Energy
where...
is energy per unit time entering;
is energy per unit time generated;
is energy per unit time leaving;
is time rate of change of energy stored.
16
Deriving the Heat Equation in One Dimension
(Ref. 2)
x x+dx
17
Deriving the Heat Equation in One Dimension
(Ref. 2)
The energy per unit time stored in a mass can be
expressed as:
where...
is the mass [mass];
is the specific heat [energy/mass/temperature];
is the material density [mass/volume];
is the material volume [volume];
is the differential element cross sectional area [area];
is the differential element length [length];
is the mass' time rate change of temperature [temperature/time].
18
Deriving the Heat Equation in One Dimension
(Ref. 2)
The heat entering the mass per unit time at location x
is:
where...
is the thermal conductivity [energy/time/length/temperature];
19
Deriving the Heat Equation in One Dimension
(Ref. 2)
The heat leaving the mass per unit time at location
x+Dx is:
where...
is the thermal conductivity [energy/time/length/temperature];
20
Deriving the Heat Equation in One Dimension
(Ref. 2)
But we recognize that the heat transfer at x+dx may
be expressed as:
22
Deriving the Heat Equation in One Dimension
(Ref. 2)
Rearranging and simplifying yields:
24
One Dimensional Heat Equation:
Steady State
Assuming the heat generation term is constant, the
only time dependency appears on the right hand
side of the equation: 0
26
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
Consider the following example:
r , Cp , k
T1 T0 T1
x=0 x=2L
x
The rod is initially at a uniform temperature, T0. At
time, t = 0, the temperature at both ends (x=0 and
x=2L) is raised to T1;
28
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
Using this new form, we examine our boundary
conditions for q(x,t):
29
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
To solve this differential equation, we can use
separation of variables by assuming:
where...
30
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
Forming the required derivatives of q(x, t):
31
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
We can rearrange the previous equation to read:
32
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
We can now write two, independent linear
differential equations:
33
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
We recognize that the first equation:
34
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
The second equation:
35
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
Our expression for q(x, t), then, becomes:
36
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
The expression becomes:
39
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
This happens when:
40
Example 1: Solving the Transient Heat
Equation (Adapted from Ref. 2)
Cn may be determined by integrating considering
the initial conditions (for n = 1, 3, 5, ...):
41
Example 1: Solving the Transient Heat
Equation
Time = 0.1 seconds
T0 = 100 C
T1 = 200 C
n=1
n=3
Temperature (C)
n=5
n = 21
t = 1 sec
t = 2 sec
t = 5 sec
t = 10 sec
t = 20 sec
t = 100 sec
45
Formulation of the Finite Difference for 1-D
Heat Transfer
This equation involves the second derivative of
temperature with respect to a spatial dimension
(i.e., x) and the first derivative of temperature with
respect to time;
46
Formulation of the Finite Difference for 1-D
Heat Transfer
Consider this temperature distribution about x:
Dx Dx
T(x)
x -Dx x x +Dx
x
47
Formulation of the Finite Difference for 1-D
Heat Transfer (Ref. 3)
At a given instant in time, the first derivative, taken
to the "right" of x, is given by:
which becomes...
49
Formulation of the Finite Difference for 1-D
Heat Transfer (Ref. 3)
Further simplification and rearranging yields:
51
Formulation of the Finite Difference for 1-D
Heat Transfer (Ref. 3)
Forming the first derivative of temperature, T with
respect to time, t for a specific node is considerably
easier:
52
Subscripting and Superscripting
53
Subscripting and Superscripting
i-1 i i+1
Time T of T of T of
Node i-1 Node i Node i+1
n
n+1
54
Review
We have...
55
Example 2: Explicit Finite Difference
20 C 100 W
(for t > 0)
20 C
(const.) aluminum (const.)
r = 0.01 m
L = 0.1 m
L = 0.1 m
58
Example 2: The Explicit Finite Difference
Solution
The overall energy balance for a segment of the rod
is:
59
Example 2: The Explicit Finite Difference
Solution
We arrive at the difference equation describing our
system:
which becomes...
61
Example 2: Explicit Finite Difference
70
x= 0.00 m x = 0.01 m
x= 0.03 m x = 0.05 m
x= 0.07 m x = 0.09 m
60 x= 0.10 m
Temperature (C)
50
40
30
20
0 5 10 15 20 25 30 35 40
Time (s)
62
Example 2: Explicit Finite Difference
70
t=0 s
60 t=5s
t = 10 s
Temperature (C)
t = 20 s
50
t = 150 s
40
30
20
10
0.00 0.02 0.04 0.06 0.08 0.10
X Location (m) 63
Time Step and Time Constant
65
Example 2: Effect of the Time Step
67
Adding Radiation (Ref. 5)
68
Adding Radiation
69
Adding Radiation
70
Adding Radiation
71
Adding Radiation
72
Example 3: Explicit Finite Difference with
Radiation Added
Consider the following configuration:
Tenv = 20 C, -250 C
20 C 100 W e= 0.8 20 C
(const.) aluminum (const.)
r = 0.01 m
L = 0.1 m
60
50
40
No Radiation
20
0.00 0.02 0.04 0.06 0.08 0.10
X Location (m)
74
The Implicit Finite Difference Solution
75
The Implicit Finite Difference Solution
(Adapted from Ref. 3)
Crank-Nicolson takes the form:
76
Solution Accuracy (Adapted from Ref. 4)
77
Solution Accuracy (Adapted from Ref. 4)
78
Solution Accuracy (Adapted from Ref. 4)
79
Finite Difference Wrap-Up
Implicit techniques;
Solution accuracy.
80
Finite Element Strategy
81
Calculus of Variations
82
Calculus of Variations (Adapted from Ref. 7)
83
Calculus of Variations (Adapted from Ref. 7)
ũ(x,e)
e(x)
u(x)
x=0 x=L
84
Calculus of Variations (Adapted from Ref. 7)
where...
u(x) is the function we seek to minimize;
(x) is an arbitrary function constrained by:
85
Calculus of Variations (Adapted from Ref. 7)
or... 0
86
Calculus of Variations (Adapted from Ref. 7)
87
Calculus of Variations (Adapted from Ref. 7)
88
Calculus of Variations (Adapted from Ref. 7)
89
Calculus of Variations (Adapted from Ref. 7)
Remember:
So that...
and...
90
Calculus of Variations (Adapted from Ref. 7)
w dv
can be integrated by parts.
91
Calculus of Variations (Adapted from Ref. 7)
92
Calculus of Variations (Adapted from Ref. 7)
93
Calculus of Variations (Adapted from Ref. 7)
94
Calculus of Variations (Adapted from Ref. 7)
where
96
Forming the Functional
97
Forming the Functional
We see that:
98
Forming the Functional
And since:
99
Forming the Functional
100
Finite Element Method Strategy
101
Example 4: One-Dimensional Steady State
Finite Element
Consider, the following configuration:
20 C 5000 W/m 20 C
L = 0.02 m
L = 0.1 m
104
Example 4: One-Dimensional Steady State
Finite Element
So the Euler-Lagrange equation becomes:
105
Example 4: One-Dimensional Steady State
Finite Element
By comparing terms, we see that:
and...
106
Example 4: One-Dimensional Steady State
Finite Element
We can solve for F by integrating the first
expression:
107
Example 4: One-Dimensional Steady State
Finite Element
But both of these expressions must be equal to one
another because they both represent F;
So we conclude that...
108
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
Now that we have our variational statement, we
need to apply it to our problem;
109
Example 4: One-Dimensional Steady State
Finite Element
Let's consider the following element breakdown;
5000 W/m
111
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
For an individual element, our integral becomes:
i (e) j
xi xj
x
112
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
Let's assume a linear temperature profile across
each element
114
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
But, we can express the unknown constants in terms
of known variables from the Ti and Tj expressions to
give us an expression for T(e) in terms of, either,
known or to-be-determined quantities:
115
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
We'll also need an expression for the derivative of T
with respect to x;
116
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 8)
Similarly, we must establish an expression for the
distribution of heating across the element:
117
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
So, starting with the integral expression for an
element, we have:
118
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
And substituting our expressions for the element
temperature and gradient, we arrive at:
119
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
Before we integrate, we differentiate this previous
expression with respect to Ti :
120
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
And we arrive at...
121
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
We can now integrate the expression with respect
to x:
122
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
This simplifies to:
123
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
Remember, the overall integral, I, is a function of all
of the m temperatures in the network:
124
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
For our linear, one-dimensional elements, though,
I(e) is a function of only two temperatures;
(a) (b)
m-1 m m+1
125
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
To simplify matters for our example, let's assume all
elements are the same size, so:
(a) (b)
m-1 m m+1
126
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
The expression is different when a boundary is
considered;
127
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
We can perform a similar operation for heating and
we arrive at:
128
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
The system of equations in matrix form is given by:
Not used
Not used
129
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
But, before solving, we must apply the boundary
conditions
130
Example 4: One-Dimensional Steady State
Finite Element (Adapted from Ref. 7)
Moving the terms associated with the boundary
temperatures over to the right hand side yields a
reduced matrix:
131
Example 4: One-Dimensional Steady State
Finite Element
We see this is of the form:
where...
132
Example 4: One-Dimensional Steady State
Finite Element
For our sample problem, consider 5 equally sized
elements with 6 equally spaced nodes:
L = 0.1 m
r = 0.01 m
k = 167 W/mC
Tboundary = 20 C
.
qL = 5000 W/m
133
Example 4: One-Dimensional Steady State
Finite Element
This leads to the following derived quantities:
Dx = 0.02 m
A = 3.1415910-4 m2
.
qLDx = 100 W
kA/Dx = 2.623 W/C
Tb1 = Tb6 = 20 C
134
Example 4: One-Dimensional Steady State
Finite Element
Filling in numbers:
we get...
135
Example 4: One-Dimensional Steady State
Finite Element
To solve for temperatures:
136
Example 4: Finite Element Solution
70
60
50
Temperature (C)
Poor discretization
40 artificially flattens
the temperature
30 profile
20
10
0
0 0.02 0.04 0.06 0.08 0.1
X Location (m)
137
Example 4: Finite Element Solution Revisited
20 C (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) 20 C
1 2 3 4 5 6 7 8 9 10 11
60
50
Temperature (C)
Improved
40 discretization allows
temperature
variation to be
30 resolved
20
10
0
0 0.02 0.04 0.06 0.08 0.1
X Location (m) 139
Example 5: One-Dimensional Steady State
Finite Element
Let's solve the Example 2 geometry using the finite
element method;
100 W
20 C (1) (2) (3) (4) 20 C
1 2 3 4 5
140
Example 5: One-Dimensional Steady State
Finite Element
The system of equations in matrix form is given by:
Not used
Not used
141
Example 5: One-Dimensional Steady State
Finite Element
But, before solving, we must apply the boundary
conditions
Not used
Not used
142
Example 5: One-Dimensional Steady State
Finite Element
Moving the terms associated with the boundary
temperatures over to the right hand side yields the
reduced matrix:
143
Example 5: One-Dimensional Steady State
Finite Element
Consider 4 equally spaced elements with 5 nodes:
L = 0.1 m
r = 0.01 m
k = 167 W/mC
Tboundary = 20 C
.
Q = 100 W
144
Example 5: One-Dimensional Steady State
Finite Element
This leads to the following derived quantities:
Dx = 0.025 m
A = 3.1415910-4 m2
.
Q = 100 W
kA/Dx = 2.099 W/C
Tb1 = Tb5 = 20 C
145
Example 5: One-Dimensional Steady State
Finite Element
Filling in numbers:
we get...
146
Example 5: One-Dimensional Steady State
Finite Element
To solve for temperatures:
147
Example 5: Finite Element Solution
70
60
50
Temperature (C)
40
30
20
10
0
0 0.02 0.04 0.06 0.08 0.1
X Location (m) 148
Example 6: One-Dimensional Transient Finite
Element (Adapted from Ref. 7)
Let's look at the same problem geometry but, this
time, we'll model the transient response.
149
Example 6: One-Dimensional Transient Finite
Element (Adapted from Ref. 7)
The individual components are:
151
Example 6: One-Dimensional Transient Finite
Element (Adapted from Ref. 7)
Recall, from Example 4, our expression for
temperature as a function of location in an element:
152
Example 6: One-Dimensional Transient Finite
Element (Adapted from Ref. 7)
So, for an individual element, the integral becomes:
153
Example 6: One-Dimensional Transient Finite
Element (Adapted from Ref. 7)
We differentiate the expression with respect to Ti
and then integrate over x to obtain:
154
Example 6: One-Dimensional Transient Finite
Element (Adapted from Ref. 7)
So, for an element, we see that...
(a) (b)
m-1 m m+1
155
Example 6: One-Dimensional Transient Finite
Element (Adapted from Ref. 7)
But...
156
Example 6: One-Dimensional Transient Finite
Element (Adapted from Ref. 7)
The previous expressions form the basis for our
element capacitance matrix:
157
Example 6: One-Dimensional Transient Finite
Element
But we can assemble the element matrices into a
global capacitance matrix through superposition;
158
Example 6: One-Dimensional Transient Finite
Element
With the previously derived conduction matrix, we
can now assemble our system of equations:
Becomes...
159
Example 6: One-Dimensional Transient Finite
Element (Ref. 9)
This equation can be expressed in a more general
form :
so when...
f = 0, we have the Forward difference
f = 1/2, we have Crank-Nicolson
f = 2/3, we have Galerkin
f = 1, we have the Backward difference
160
Example 6: One-Dimensional Transient Finite
Element (Ref. 9)
Let's use Backward differencing to solve this
problem, i.e., f = 1;
161
Example 6: One-Dimensional Transient Finite
Element (Ref. 9)
We recognize this equation is of the form:
162
Example 6: One-Dimensional Transient Finite
Element
70
60
50
Temperature (C)
40
T1 T2 T3
30 T4 T5
20
10
0 50 100 150 200 250 300
Time (s)
163
Comparing Finite Difference, Finite Element
with Exact Solution
70
Exact
60
FD
Temperature (C)
50 FE
40
30
20
10
0
0 0.02 0.04 0.06 0.08 0.1
X Location (m) 164
Conclusion
2. Holman, J. P., Heat Transfer (Fifth Edition), New York, McGraw Hill Book Company,
1981.
3. Anderson, John D., Jr., Computational Fluid Dynamics, The Basics with
Applications, New York, McGraw-Hill, Inc., 1995.
167
References/Credits
9. Ramamurty, G., Applied Finite Element Analysis, New Dehli, I.K. International
Publishing Houst Pvt. Ltd., 2009.
168
For Additional Information
Variational Principles
Liu, G., Exact Variational Principle for 3-D Unsteady Heat Conduction with Second
Sound, Journal of Thermal Science, Vol. 15, No. 4, December 2006.
169
To Contact the Author
Address:
Steven L. Rickman
NASA Engineering and Safety Center (NESC)
NASA - Lyndon B. Johnson Space Center
2101 NASA Parkway
Mail Code: WE
Houston, TX 77058
Phone:
281-483-8867
Email:
steven.l.rickman@nasa.gov
170