Heat Transfer Through Wall
Heat Transfer Through Wall
-1-
MCEN 4037
T
2T
2 .
t
x
This is a partial differential equation that requires initial conditions and two boundary conditions for
solution. For simple boundary conditions it can be solved analytically using separation of variables.
However, because the boundary conditions vary over time in an arbitrary fashion, it is more
straightforward to solve it numerically using the finite-difference method.
To solve the heat equation numerically, we divide the wall into equal width slabs parallel to the two
surfaces.
m-1 m
m+1
x
The surface of each slab is given an integer index, m, so that distance can be written as
x mx, m 0,1,2,...
where x is the slab thickness. Each time step is given an integer index i so that the time can be
written as
-2-
MCEN 4037
Euler Method
In the Euler method, we approximate the time derivative as
T Tm , i 1 Tm , i
t
t
The spatial term is typically approximated as
2T Tm 1, i 2Tm ,i Tm 1,i
x 2
x 2
Combining these two expressions we obtain
Tm,i 1 Tm,i
T
2Tm,i Tm 1,i
m 1,i
t
x 2
The advantage of the Euler method is that this equation can be easily solved for the temperatures at
timestep i + 1 assuming they are known at timestep i and that the values of temperature are known at
the inner and outer walls.
Tm,i 1
t
Tm 1,i 2Tm,i Tm 1,i Tm,i
x 2
The term
Fo
t
x 2
is called the Fourier Modulus [1]. However, for certain values of the Fourier Modulus the solution is
numerically unstable. For the solution to be stable, we must have
Fo
1
2
This places a limit on the ratio of t / x 2 . The smaller x , the smaller t needs to be.
When programming the solution, you will need to decide on a finite-difference slab thickness, x . The
placement of the thermisters is shown in Figure 1 and also on the website. There are eight sensors. If
they were evenly spaced, it would make sense to define x so that the slab surface coincided with
each sensor. However, they are somewhat oddly placed in that the spacing is the same except for
-3-
MCEN 4037
between sensors 1 and 2. Thus, you will have to interpolate the initial temperature profile to obtain the
initial conditions. Regardless of your choice for x , you should make sure the solution is stable.
Implicit Crank-Nicolson
While explicit methods like the Euler method used above are convenient, they do have stability
issues. Implicit methods involve solving a set of simultaneous algebraic equations, but are numerically
stable. In the Crank-Nicolson method, the finite difference equations take on the form
Tm,i 1 Tm,i
2Tm,i 1 Tm 1,i 1
2Tm,i Tm 1,i
1 T
1 T
m 1,i 1
m 1,i
t
x
2
x 2
2
These can be rearranged in the form of a set of linear algebraic equations involving a tridiagonal
coefficient matrix. To rearrange the above equation, separate for the unknown temperatures on the
left-hand side and place the known temperatures on the right-hand side. For every iteration (i), the
system of equations solve for the unknown wall temperatures at time i + 1 (one time step in the future)
and take the following form
AmTm-1 + bmTm + cmTm+1 = dm
or, in matrix form
-4-
m=1,2,3,n
MCEN 4037
b1 c1 0 ... ... 0
a b c ... ... 0
2 2 2
0 a3 b3 c3 ... 0
T1
T
2
Tn
d1
d
2
.
dn
Nomenclature
T = temperature (in K for equations)
t = time (sec)
x = distance through the wall (m)
k - thermal conductivity (W/m.K)
A - area (m2)
- density (kg/m3)
Cp - specific heat (J/kg.K)
- thermal diffusivity (m2/s)
C p
In Computational Methods you have learned how to solve such a set of equations using methods such
as Gaussian Elimination. Alternatively, you can use the Thomas Algorith-to solve for the Triadiagonal
system.
Programming
We ask that you program both methods for comparison. You may program the finite difference
solutions using Excel, Matlab or whatever programming environment you find suitable. The Euler
method is easily done in Excel. However, Matlab is particularly suitable for solving matrix equations
like the Crank-Nicolson method.
-5-
MCEN 4037
The following table summarizes the solutions using the Euler Method and Crank-Nicolson Methods
for solving a system of equations. The results are for temperatures at t =10 s at x =2 cm for the rod.
Note that the analytical solution is T(2,10) = 64.8018.
Table 1. Summary of results for solving the PDE via the Euler and Crank-Nicolson method.
Fourier Modulus
Fo
Euler Method
Crank-Nicolson
10
5
2
1
0.5
0.2
2.0875
1.04375
0.4175
0.20875
0.104375
0.04175
208.75
-9.13
67.12
65.91
65.33
64.97
79.77
64.79
64.87
64.77
64.74
64.73
Code Implementation
Now that your code is validated against the tabulated data, modify your code to solve the heat
equation for heat transfer through the ITLL walls. Remember, the goal of this lab is to compare
measured temperature distributions with ones predicted by solving the one-dimensional, timedependent heat equation over a twenty-four-hour period. You may use any twenty-four-hour period of
data that is available on the web site. The profiles at the start of the time period will serve as the initial
conditions, and the inner and outer surface temperatures will serve as the boundary conditions.
Accuracy
Note that in both cases, accuracy is different than stability. Just because the implicit method is stable,
using an arbitrary time step may result in poor results. The only way to assure that the time step is
small enough is to systematically reduce it until the solution is unchanging.
With regard to spatial resolution, the same issue arises. If the slab thickness x is too large, you will
lose resolution and thus accuracy. In the present case, however, the resolution is limited by the
number of thermisters, so you are pretty much limited to a x comparable to that spacing.
Analysis
Once you have the finite difference models running, compare the calculated solutions to the
measured temperatures for each wall over the twenty-four hour period. Here are some questions to
consider and on which to report.
1. For the two models, what time step provide sufficient accuracy and why? Which method is more
accurate and how would you decide this? Which model (and associated time step) is most
efficient? Explain.
2. How did you find the physical properties needed for the finite difference models, what are they,
and what uncertainty is associated with them? How sensitive are the results to these properties?
-6-
MCEN 4037
3. Can the finite difference models be run for the full twenty-four-hour time span without the
difference between the predicted and measured values reaching 10%?
4. What are the differences in the experimental and numericcal results for the four walls? Why do the
different walls behave differently (if they do)? Select one sensor to compare measured data to
numerical data in depth.
5. Can the model be extended to explicitly include convection and radiation to the walls? If so, what
additional information would be needed and would the models be changed?
References
1. Ferziger, Joel H. Numerical Methods for Engineering Applications. New York: Wiley, 1998.
2. Chapra, Steven C., and Raymond P. Canale. Numerical Methods for Engineers. Boston:
McGraw Hill Companies, Inc., 2002.
-7-