s [NUMERICAL HEAT TRANSFER AND FLUID FLOW
‘The tridiagonal-matrix algorithm is a very powerful and convenient
‘equation solver whenever the algebraic equations can be represented in the
form of Eq. (4.22). Unlike general matrix methods, the TDMA requires
computer, storage and computer tine proportional only to W, rather than to
or V3
UNSTEADY ONE-DIMENSIONAL CONDUCTION
43-1 The General Discretization Equation
With reference to the general differential equation for @, we have now seen, at
least in the onedimensional context, how to handle the diffusion term and
‘the source term, Here, we turn to the unsteady term and temporarily drop the
source term, since nothing new needs to be said abdut it, Thus, we seek to
solve the unsteady one-dimensional heat conduction equation
ar _ a ar
nH -2 42) ]
Further, for convenience, we shall assume pe to be constant. (In Chapter 2, it
‘was shown how the heat conduction equation could be modified to take
account of the variable specific heat c. See Problem 22.)
Since time is a one-way coordinate, we obtain the solution by marching
in time from a given initial distribution of temperature. Thus, in a typical
“time step” the task is this: Given the grid-point values of T'at time ¢, find
the values of Tat time #+.A¢. The “old” (given) values of 7 at the ged
points will be denoted by 72, 78, 7%, and the “new” (unknown) values at
time ¢ + Ar by Tp, Th, Tw-
‘The discretization equation is now derived by integrating Eq. (4.30) over
the control volume shown in Fig. 3.2 and over the time interval fiom f to
et. Thus,
;
of [Beef E6g)an wn
where the order of the integrations is chosen according to the nature of the
term. For the representation of the term 97/2, we shall assume that the
srid-point value of 7 prevails throughout the control volume. Then,
eptbar
“ff Fite =e ax (1) — 78). (432)
Ie JeHEAT CONDUCTION 5s
Following our steady-state practice for k a7/@x, we obtain
teat
pe Ax (T} TE) = i [st572 Te) ~te| at. (433)
Its at this point that we need an assumption about how Tp, Tz, and Ty
vary with time from f to ¢+ Af. Many assumptions are possible, and some of
them can be generalized by proposing
har
[ Tp a= fT} + —ATB] ar, (434)
where f is a weighting factor between O and 1. Using similar formulas for the
integrals of Z\s and Ty, we derive from Eq. (4.33)
Ax ory — Tey =p |ReCTR TB) — kw(TP — TW)|
08 cp tmyar fhm — tat Te]
nen) Pe? = w=) (435)
‘While rearranging this, we shall drop the superscipt 1, and remember that Tp,
Ta, Tw henceforth stand for the new values of Tat time ¢ + Ar. The re-
sult is
aplp = ap (fTe + (1— ATE] + aw Tw + ATW
+B —Dae~ Daw) TE. 436
where
oe
te= ae (43%)
ew= oe (aan
Ee \
af =. oa : (4370¢)
ap = fag + fay +03 (437a)56 NUMERICAL HEAT TRANSFER AND FLUID FLOW
2. Explicit, Crank-Nicolson,
and Fully Implicit Schemes
For certain specific values of the weighting factor f, the discretization
equation reduces to one of the well-known schemes for parabolic differential
equations. In particular, =0 leads to the explicit scheme, f=0.5 to the
Crank-Nicolson scheme, and f=1 to the fully implicit scheme. We shall
briefly discuss these schemes and finally indicate the fully implicit scheme as.
our preference,
‘The different values of f can be interpreted in terms of the Tp~t
variations shown in Fig. 4.5, The explicit scheme essentially asumes that the
old value 7 prevails throughout the entire time step except at time £-F At.
The fully implicit scheme postulates that, at time & Tp suddenly drops from
Tp to Tp and then stays at T} over the whole of the time step: thus the
‘temperature during the time step is characterized by 7p, the new value. The
Grank-Nicolson scheme assumes a linear variation of Tp. At fist sight, the
linear variation would appear more sensible than the two other alternatives.
Why then would we prefer the fully implicit scheme? The answer will emerge
very shortly.
For the explicit scheme (/= 0), Bq. (4.36) becomes
pT p = agT g + ayTy + (a2 — oz —ay)TS . (4.38)
‘This means that Tp is not related to other unknowns such a Ty ot Tyy, but
is explicitly obtainable in terms of the known temperatures 79, 72, 7%). This
4s why the scheme is called explicit. Any scheme with #0 would be implicit;
Exotic
Crankicolzon
Fully implicit
apeneennn eda.
Tae
FFigue 4.5 Variation of temperature with time for three different schemesHEAT CONDUCTION 37
that is, Tp would be linked to the unknowns Ti and Tyy, and the solution of
2 set of simultaneous equations would be necestary. The convenience of the
explicit scheme in this regard i, however, offset by a serious limitation. If we
remember the basic rule about positive coefficients (Rule 2) and examine Eq.
(4.38), we note that the confficient of 78 can become negative. (We consider
Tp as a neighbor of Tp in the time direction.) Indeed, for this coefficient to
be positive, the time step At would have to be small enough 20 that af
exceeds ag tay. For uniform conductivity and Ax =(6x)¢=(Ex)y, this
condition can be expressed as
po(Ax?
ar < Sey (4.39)
If this condition is violated, physically unrealistic results could emerge,
because the negative coefficient implics that 2 higher 7 results in a lower Tp.
Equation (439) is the well-known stability criterion for the explicit scheme,
It is interesting to note that we have been able to derive this from physical
arguments based on one of our basic rules. The troublesome feature about
condition (4.39) is that, as we reduce Ax to improve the spatil accuracy, we
are forced to use a much smaller AY.
‘The Crank-Nicolson scheme is usually described as unconditionally stable,
‘An inexperienced user often interprets this to imply that a physically realistic
solution will result no matter how large the time step, end such a user is,
therefore, surprised to encounter oscillatory solutions. The “stability” in a
‘mathematical sense simply ensures that these oscillations will eventually die
out, but it does not guarantee physically plausible solutions. Some examples
of unrealistic solutions given by the Crank-Nicolson scheme can be found in
Patankar and Baliga (1978).
In our framework, this behavior is easy to explain. For f= 0.5, the
coefficient of Tp in Eq. (4.36) becomes ap—(ag +ay)/2. For uniform
conductivity and uniform grid spacing, this coefficient can be seen to be pe
‘Ax/At— K/Ax. Again, whenever the time step is not sufficiently small, this
coefficient could become negative, with its potential for physically unrealistic
results. The seemingly reasonable linear profile in Fig 4,5 is a good
representation of the temperature-time relationship for. only small time
intervals. Over a larger interval, the intrinsically exponential decay of tempera-
ture is akin to a steep drop in the beginning, followed by a flat tail. The
assumptions made in the fully implicit scheme are thus closer to reality than
the linear profile used in the Crank-Nicolson scheme, especially for large time
steps.
If we require that the coefficient of 79 in Eq. (4,36) must never become
negative, the only constant value of f that ensures this is 1. (Of course, it is
rot meaningful for f to be greater than 1.) Thus, the filly implicit scheme
(= 1) satisfies our requirements of simplicity and physically satisfactory| wd
38 NUMERICAL HEAT TRANSFER AND FLUID FLOW
behavior. It is for this reason that we shall adopt the fully implicit scheme in
this book.
1t must be admitted that for small time steps the flly implicit scheme is
‘not as accurate as the Crank-Nicolson scheme. Again, the reason can be seen.
from Fig. 4.5; the temperature-time curve is nearly linear for small time
fntervas, Tt is tempting to seek a scheme that combines the advantages of
both schemes and shares the disadvantages of neither. Indbed, this has been
done, and the result, called the exponential scheme, has been described by
Patankar and Baliga (1978). That scheme, however, is somewhat complicated,
and its inclusion in this book, in which many other themes are to be
presented, would have made the treatment quite intricate.
The Fully Implicit Discretization Equation
Here we record the fully implicit form of Eq, (4.36). In doing so, we shall
{introduce the linearized source term, which we had temporarily dropped. The
result is
apTp = alg + ayTy +b, (4.40)
where
(4414)
(Alb)
(4Ale)
441d)
ap = ag + ay +08 ~ Sp Ax. G4te)
It can be scon that, as Are, this equation reduces to our steady-state
discretization equation.
‘The main principle of the fully implicit scheme is that the new value Tp
prevails over the entire time step. Thus, if the conductivity kp depended on
temperature, it should be iteratively recalculated from Tp, exactly as in our
steady-state procedure. Other aspects of the steady-state procedure, such as
boundary conditions, source-term linearization, and the TDMA, are also
equally applicable to the unsteady situation.
Our detailed consideration of the one-dimensional problem has now set