Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Applied Mathematical Modelling 28 (2004) 173–182

www.elsevier.com/locate/apm

Simple algorithm for temperature distribution calculations


Jozef Gembarovic *, Martin L€
offler, Jozef Gembarovic, Jr.
TPRL, Inc., 3080 Kent Avenue, West Lafayette, IN 47906, USA
Received 8 February 2002; received in revised form 7 April 2003; accepted 9 June 2003

Abstract

Dumped heat wave algorithm is used to approximately calculate temperature distribution in a finite,
one-dimensional medium and the results are compared to known analytical solutions and finite difference
numerical algorithm. The proposed algorithm can serve as a rapid, easy to understand and easy to im-
plement alternative to existing numerical and analytical procedures for calculating the temperature dis-
tribution in solids.
Ó 2003 Elsevier Inc. All rights reserved.

PACS: 66.30.)h; 44.05.+e; 66.70.+f


Keywords: Numerical algorithm; Heat conduction; Temperature distribution

1. Introduction

Heat flow in solids is generally regarded as a diffusion-like process, which is proportional to the
temperature gradient; the constant of the proportionality for a given material is called thermal
conductivity k. Temperature distribution is a solution of the equation of linear flow of heat [1]:
oT o2 T
¼a 2; ð1Þ
ot ox
where T ¼ T ðx; tÞ is the temperature in space–time point ðx; tÞ and a is the thermal diffusivity. Eq.
(1) represents a partial differential equation (PDE) of parabolic type and its analytical solutions
show a paradoxical behavior of infinite speed of propagation of the thermal disturbance. Any
local change in temperature causes an instantaneous perturbation at each point of the medium,

*
Corresponding author.
E-mail address: gembar@tprl.com (J. Gembarovic).

0307-904X/$ - see front matter Ó 2003 Elsevier Inc. All rights reserved.
doi:10.1016/S0307-904X(03)00129-X
174 J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182

whatever is its distance from the origin of the initial perturbation. It is in contradiction with the
theory of relativity and also with known mechanisms of heat conduction.
Experiments with second sound in solid helium and in other crystalline solids [2] at very low
temperatures clearly showed that the heat flows as a dumped wave. If the crystal structure is
almost defect free (perfect) and the conditions for the second sound are met, then after a pulse
heating an observable hump-like formation of increased temperature (dumped heat wave) moves
with a constant speed through the medium. The wave bounces back and forth from the bound-
aries while slowly dissipating its energy along the path. The damped heat wave (DHW) is de-
scribed by PDE of hyperbolic type first derived by Maxwell [3] and later postulated by Vernotte [4]
and Cattaneo [5]:
o2 T oT o2 T
s þ ¼ a ; ð2Þ
ot2 ot ox2
pffiffiffiffiffiffiffi
where s is the thermal relaxation time. Speed of propagation of the thermal wave is v ¼ a=s.
Amplitude of the dumped heat wave decays exponentially with time [6]. Eq. (1) is a limiting case
of Eq. (2) for s ! 0.
As was first noted by Alifanov [7], explicit finite difference (EFD) methods for numerical so-
lution of Eq. (1) show a finite speed of heat propagation, so they can be regarded as solutions
of Eq. (2), rather than Eq. (1).
This paper will show that the temperature distribution in one-dimensional finite medium can be
approximately calculated using a new, simple algorithm based on damped heat wave.

2. Description of the algorithm

We will illustrate the algorithm on calculation of the temperature distribution in an isotropic


homogeneous finite medium (0 6 x 6 L), with zero initial temperature, with one surface instan-
taneously heated by an energy pulse at t ¼ 0. The heat flux is one-dimensional. The medium is
divided into N equal slabs of thickness Dl ¼ L=N . These slabs are replaced by a perfect conductor
of the same heat capacity separated by thermal resistance Dl=k, so the temperature within a slab at
any given time is constant.
Heat propagates from one slab to another due to existence of a temperature difference between
the slabs. The wave takes certain portion (given by the inner transfer coefficient n) of excessive heat
energy from one slab and moves that amount to the next one (redistribution), lowering thus the
temperature difference between the two neighbor slabs. The wave marches in space from one pair
of slabs to another and when it reaches the boundary slab of the medium it bounces back and
moves in the opposite direction in a perpetual manner.
Undamped heat wave (n ¼ 1) does not dissipate and all excessive energy initially localized in
the first slab is travelling unchanged back and forth through the medium.
If the wave is dumped then only a portion (n < 1) of the energy difference between two
neighboring slabs is moved by the wave in the direction of the wave movement at a time, leaving
the rest of the energy behind. An example of the dissipative wave in one-dimensional finite me-
dium with n ¼ 0:95 is shown in Fig. 1. The medium is divided into N ¼ 6 slabs. The wave height is
reduced from 10 to 3.61 units after 28 time steps. The rest of the media is at about 1.2 units. The
J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182 175

28
25
22
10 19
16
T 5 13
10 Time Step
7
0
4
12
3 1
45
N 6

Fig. 1. Dumped heat wave in a finite medium. Inner transfer coefficient n ¼ 0:95.

wave height decays exponentially with time, similarly as in the solution of Eq. (2) for a finite
medium discussed in details in [6]. Sum of all heights in the medium is always equal to 10, in
accordance with the total energy conservation law.
Strongly dumped heat wave (with n < 0:5) can be used for an approximative solution of Eq. (1)
in a finite medium.
Slab temperatures are Ti;m  T ðxi ; tm Þ, where xi (i ¼ 0; 1; 2; . . . ; N  1) is a spatial point (middle
of the ith slab), and tm ¼ m Dt (m ¼ 0; 1; 2; . . .) is discrete time point. Temperature of the boundary
slabs in our algorithm is actually changing only after the heat wave finishes one whole loop,
therefore it is logical to have time step Dt equal to one loop time interval. Time step Dt is divided
to 2N sub-steps when the heat wave moves from one slab to another redistributing thermal energy
between two neighbor slabs. Temperature of a particular slab is changed four times during one
time step––two times when the heat wave is marching over from left to right, and two more times
when the wave is heading in the opposite direction.
Temperature distribution at time tmþ12 after the heat wave finished marching from left to right is
given by
T0;mþ12 ¼ ð1  nÞT0;m þ nT1;m ; ð3Þ

n 2
X
n
Tn;mþ12 ¼ n ð1  nÞT0;m þ ð1  nÞ pnj Tj;m þ nTnþ1;m n ¼ 1; 2; . . . ; N  2; ð4Þ
j¼1

X
N
TN 1;mþ12 ¼ nN 1 T0;m þ ð1  nÞ pN j Tj;m : ð5Þ
j¼2

Similarly, the temperature distribution at time tmþ1 after the heat wave finished marching from
right to left is
TN 1;mþ1 ¼ ð1  nÞTN 1;mþ12 þ nTN 2;mþ12 ; ð6Þ
176 J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182

N n1 2
X
Nn1
Tn;mþ1 ¼ n ð1  nÞTN 1;mþ12 þ ð1  nÞ pN j1 TN j1;mþ12 þ nTn1;mþ12
j¼1

n ¼ 1; 2; . . . ; N  2; ð7Þ

X
N
T0;mþ1 ¼ nN 1 TN 1;mþ12 þ ð1  nÞ pN j TNj;mþ12 : ð8Þ
j¼2

Finally, the temperature distribution in medium at time tmþ1 as a function of the temperature
distribution at tm is after a lengthy but straightforward set of manipulation of Eqs. (3)–(8) given by
 
1 þ n2N 1 1n X N 1
T0;mþ1 ¼ 2  1 T0;m þ 2 nj ð1 þ n2ðN jÞ1 ÞTj;m ; ð9Þ
1þn 1 þ n j¼1
" ! #
1n 2ðN iÞ3
X
i1
j j 2 1 þ n2ðNiÞ3 2
Ti;mþ1 ¼2 ð1 þ n Þ n ð1  nÞ Tj;m þ ð1  nÞ 2  1 þ n Ti;m
1þn j¼0
1þn

ð1  nÞ2 NX
i1
þ2 nj ð1 þ n2ðN ijÞþ1 ÞTjþiþ1;m i ¼ 1; 2; . . . ; N  1: ð10Þ
1 þ n j¼0

The sum of all coefficients multiplying temperatures at right side of Eqs. (9) and (10) is equal to 1,
as it should be due to validity of total thermal energy conservation principle.
As can be seen from Eqs. (9) and (10) the new temperature of the particular slab at the time
point tmþ1 depends not only on temperatures of its neighbor slabs at time tm , but on the tem-
peratures of all slabs in the medium. The influence of more distant slabs is diminishing expo-
nentially.
The inner transfer coefficient n is a dimensionless quantity defined as
1
n¼ ; ð11Þ
1 þ 2 Fo1
where
Dta
Fo ¼ ; ð12Þ
Dl2
is the Fourier number for one slab.
When the wave imitates diffusion, the upper limit for the inner transfer coefficient is n < 0:5. It
follows from Eqs. (11) and (12) that the upper limit for the time step Dt is then given by
2 Dl2
Dt < : ð13Þ
a
This introduces a limit to the maximum size of time step that can be chosen for a fixed Dl. In the
case of strongly dumped waves, their actual position and speed are not that important. In another
words, the wave speed v ¼ 2L=Dt can be chosen arbitrarily, but from the inequality (13) we get
v > aN 2 =L. Generally, the calculated distribution using waves with a higher speed is more precise
J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182 177

2.5

2
T/ T0

1.5

0.5

0
0 0.2 0.4 0.6 0.8 1
x /L

Fig. 2. Temperature distributions for different times in a real medium. Temperatures calculated using DHW algorithm
are compared with analytical solutions given by Eq. (15) (continuous lines). The profiles are for t60 ¼ 0:3 s, t120 ¼ 0:6 s,
t180 ¼ 0:9 s, t240 ¼ 1:2 s, and t480 ¼ 2:4 s.

than those with the lower ones. Condition (13) is similar to the stability condition for the finite
differences algorithms [8]
Dl2
Dt < ; ð14Þ
2a
used for a numerical solution of one-dimensional heat conduction equation. It is clear that for the
same Dl our algorithm allows using longer time steps than the finite differences schemes do.
Temperature distributions in a real medium where a ¼ 6:5  105 m2 s1 , l ¼ 0:02 m, with
N ¼ 20 and Dt ¼ 5:0  103 s, are shown in Fig. 2. The inner transfer coefficient is n ¼ 0:139785.
The temperature is 20 units in the first slab (from left) at the beginning (t ¼ 0) and the rest of the
sample is at zero temperature. There are no heat losses at the boundaries. The temperature dis-
tribution calculated by using DHW is compared with the temperature distribution calculated
using the exact analytical formula [9].
X1
x h at i
T ðx; tÞ ¼ 1 þ 2 cos np exp  n2 p2 2 : ð15Þ
n¼1
L L
Differences between the calculated temperatures and the analytical solution are shown in Fig. 3.
Those differences are not random, but show regular patterns. Generally, they are smaller for
longer times. Solution given by Eq. (15) assumes that the heat is instantaneously absorbed in an
178 J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182

0.4

0.3

0.2

0.1
(T - Th)100

0.1

0.2

0.3

0.4

0.5
0 0.2 0.4 0.6 0.8 1
x /L

Fig. 3. Differences between the temperatures calculated using DHW algorithm and the exact analytical solutions from
Fig. 2.

infinite thin surface layer of the solid, while the wave algorithm assumes that the heat is equally
distributed in the first slab at the time zero. This explains the higher differences at small times.
Temperature distributions in the real medium for t60 ¼ 0:3 s and t120 ¼ 0:6 s calculated using
DHW algorithm and EFD scheme are compared in Fig. 4. The results of DHW algorithm at
t60 ¼ 0:3 s are above the analytical solution values for the points in right half of the medium, while
the values of explicit finite difference scheme are below the analytical ones. The differences be-
tween the two numerical algorithms are negligible at higher times.
In the case of heat losses from the boundaries, the exact analytical formula for the temperature
within the finite medium is given by
X1       
bn x B1 bn x b2n at
T ðx; tÞ ¼ F ðbn Þ cos þ sin exp  2 ; ð16Þ
n¼1
L bn L L
where

2b2n ðb2n þ B22 Þ


F ðbn Þ ¼ ;
ðb2n þ B21 Þðb2n þ B22 Þ þ ðB1 þ B2 Þðb2n þ B1 B2 Þ
bn , n ¼ 1; 2; 3; . . . are positive roots of the equation:
J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182 179

10

EFD
+ DHW
Analyt
1
Log T

0.1

0.01
0 0.2 0.4 0.6 0.8 1
2
(x / L)

Fig. 4. Temperature distributions for t60 ¼ 0:3 s and t120 ¼ 0:6 s in a real medium. The results of DHW algorithm (+)
are compared with those calculated using EFD scheme (}). The analytical solutions are shown as continuous lines.

ðb2  B1 B2 Þ sin b  ðB1 þ B2 Þb cos b ¼ 0; ð17Þ


and B1 , B2 are Biot numbers for the front surface (x ¼ 0), and for the rear surface of the medium
(x ¼ L), respectively. The Biot numbers are defined as dimensionless quantities B ¼ HL=k, where
H is the coefficient of surface heat transfer.
If there are heat losses from the medium surfaces a part of the excessive thermal energy leaves
the medium, everytime the wave reaches the boundary slabs. Temperatures of the boundary slabs
are furthermore changed due to the heat losses:
TN 1;mþ12 ¼ TN 1;m  f2 ðTN 1;m  TA Þ; ð18Þ
and
T0;mþ1 ¼ T0;mþ12  f1 T0;mþ12  TA ; ð19Þ

where f1 and f2 are the surface transfer coefficients and TA is the ambient temperature. The surface
transfer coefficient is a dimensionless quantity defined as:
f ¼ Bi Fo; ð20Þ
where Bi is Biot number for one slab Bi ¼ B=N . There are two different surface transfer coeffi-
cients for a finite medium, one for each surface. In order to fulfill the limitation f 2 h0; 1i, the time
step Dt has to be limited to
180 J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182

2.5

1.5
T/ T0

0.5

0
0 0.2 0.4 0.6 0.8 1
x/ L

Fig. 5. Temperature distributions for different times in a real slab with heat losses. Analytical solutions (continuous
lines) were calculated using Eqs. (16) and (17).

Dl2
Dt 6 : ð21Þ
Bi a
For Bi < 0:5 the condition given by inequality (13) is stronger than (21), and is actually limiting
the time step value.
Temperatures within the real medium from the previous example, with heat losses given by Biot
numbers Bi1 ¼ 0:2 and Bi2 ¼ 0:1 are shown in Fig. 5. Values calculated using DHW algorithm are
compared with the temperature distributions calculated using the analytical formulae equations
(16) and (17) for the same times as those from Fig. 2. The differences between the temperatures
calculated using DHW and the analytical solutions are shown in Fig. 6. For longer times the
differences are simple smooth curves which converge to almost linear profile with the values
ranging from 0.1% to 0.4%. This precision level is sufficient for many practical engineering
applications.
Various boundary conditions can be modelled by adjusting the surface transfer coefficient f. In
the case f ¼ 1 the constant temperature (equal to the ambient temperature) boundary condition is
being simulated. Adiabatically insulated surface is given by f ¼ 0. Non-linear conditions can be
also modelled, e.g., radiation from the surface, in which the rate of heat energy leaving the surface
is proportional to
rðTi4  TA4 Þ;
J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182 181

0.4

0.3

0.2

0.1
(T - Th)100

0.1

0.2

0.3

0.4

0.5
0 0.2 0.4 0.6 0.8 1
x /L

Fig. 6. Differences between the temperatures calculated by the dumped heat wave algorithm and the exact analytical
formula from Fig. 5.

where r is the Stefan–Boltzmann constant and  is the emissivity of the surface. Temperature
difference of the fourth power of the temperatures will be used in Eqs. (18) and (19).

3. Conclusion

Temperature distribution in solids can be calculated from heat conduction equation, which can
be solved using a broad variety of analytical or numerical methods. Existing numerical procedures
are generally simpler and more straightforward than analytical and they can be used to solve more
complex engineering problems. In most of finite differences schemes [10] and finite elements
methods [11] systems of linear algebraic equations have to be solved for every time step. In DHW
algorithm the temperature is calculated explicitly in one simple calculation that is repeated 2N
times for each time step. The process of calculation is sequential and only a one pair of neigh-
boring slab temperatures is taken into account. Temperature in the medium is changing only at
the front of the solitary wave of redistribution, which is marching through the medium. Described
algorithm is similar to the explicit finite difference scheme, which utilize both left and right
neighbor points at the same time for the temperature calculations.
DHW algorithm can be used by engineers and designers in applications where temperature
distribution in a finite one-dimensional solid has to be calculated. It can serve as a fast, easy to
182 J. Gembarovic et al. / Appl. Math. Modelling 28 (2004) 173–182

understand and easy to implement alternative to existing numerical and analytical methods. It
could simplify hardware and software needs for temperature and heat flux calculations, and open
new possibilities for improving measurement and non-destructive testing procedures used in this
field. It can also be used for solving mathematically similar boundary value problems in mass
diffusion and viscous flow.

References

[1] H.S. Carslaw, J.C. Jaeger, Conduction of Heat in Solids, second ed., Oxford University Press, London, 1959, p. 50.
[2] C.C. Ackerman, R.A. Guyer, Ann. Phys. 50 (1968) 128.
[3] J.C. Maxwell, Philos. Trans. R. Soc. 157 (1876) 49.
[4] J. Vernotte, Comptes Rendus 246 (1958) 3154.
[5] C. Cattaneo, Comptes Rendus 247 (1958) 431.
[6] J. Gembarovic, V. Majernik, Int. J. Heat Mass Transfer 31 (1987) 1073.
[7] O.M. Alifanov, Inverse Heat Transfer Problems, Springer-Verlag, New York, 1994, p. 186.
[8] R.D. Richtmeyer, Difference Methods for Initial Value Problems, Interscience Publishers, New York, 1957.
[9] H.S. Carslaw, J.C. Jaeger, Conduction of Heat in Solids, second ed., Oxford University Press, London, 1959,
p. 101.
[10] M.N. Ozisik, M.N. Czisik, Finite Difference Methods in Heat Transfer, CRC Press, Boca Raton, FL, 1994.
[11] O.C. Zienkiewicz, The Finite Element Method in Engineering Science, McGraw-Hill, New York, 1971.

You might also like