1d Condution (2013) Finite Volume Method

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

_______________________________________________________________________________

1-Dimensional Steady Conduction


_______________________________________________________________________________

One of the simplest transport processes encountered in many engineering applications is 1-


dimensional conduction. One-dimensional conduction will be used to discuss some of
fundamentals associated with the numerical method introduced in this course. All the development
discussed in this chapter is equally pertinent to more complex transport processes presented in
later chapters. One-dimensional conduction equation may be obtained from the general form of
transport equation as discussed.

With = e, =k/cv, and V=0, we get an energy equation

( e) k e k e k e
= ( )+ ( )+ ( )+S (1)
t x cv x y cv y z cv z

For incompressible substance, = constant, Cv=Cp=C, and de=CdT. Thus, Eq. (1) can be
written as

T T T T
C = (k )+ (k )+ (k )+S (2)
t x x y y z z

Note that we have not made any assumption on the specific heat, C. That is C can be a function
of space and temperature.

Assuming the temperature variation is in x-coordinate alone, Eq. (2) reduces to 1-


dimensional transient conduction equation,

T T
c = (k )+S (3)
t x x

For 1-dimensional steady conduction, this further reduces to


d dT
(k ) + S = 0 (4)
dx dx

1
Eq. (4) is a simple transport equation which describes steady state energy balance when
the energy is transported by diffusion (conduction) alone in 1-dimensional space.

Finite Volume Equation


Finite difference approximation to Eq. (4) can be obtained by a number of different
approaches. We will consider a control volume method [1]. We will use notations and symbols
commonly adopted for finite volume method (see Fig.1). Rewriting Eq. (4), we have

d
- ( Jx ) + S = 0 (5)
dx

where Jx = -kdT/dx is the conduction flux in the x-direction. We are not making any assumption
on the conductivity and the source, so that they may have different values at different control
volumes and may depend on temperature as well.

Figure 1 1-dimensional uniform control volumes

Integrating Eq. (5) over a control volume containing P, we have


1 1 e d Jx e e
(- + S) dxdydz = (1 x 1)[ - dJ x + Sdx] (6)
0 0 w dx w w

Carrying out the integration for the first term in the RHS of Eq. (6), we get
e
- d J x = -[( J x )e - ( J x )w ]
w

dT dT (7)
= -(- k )e + (- k )w
dx dx

dT dT
= ke( )e - k w ( )w
dx dx
2
Diffusion flux at the interfaces "e" and "w" can be approximated by
dT T -T
ke ( )e = k e E P (8a)
dx ( x )e

and
dT T -T
kw ( )w = k w P W (8b)
dx ( x )w

Eqns. (8a) and (8b) are second-order accurate when uniform control volumes are used. If control
volumes are non-uniform, these expressions must be modified to reflect the different grid sizes.
However, we will still use Eqns.(8a) and (8b) to evaluate diffusion flux even for non-uniform
control volumes for the sake of simplicity in resulting finite volume equations. Accuracy will not
be affected significantly as long as the grid sizes adjacent to each other are not extremely
different. Physical meaning of this approximation is to assume a piecewise linear temperature
variation between the temperatures in two adjacent control volumes as shown in Fig. 2.

Integration of the second term in the RHS of Eq. (6) yields

e
Sdx = S x (9)
w

where S represents the average value of S in the given control volume. Physically, this
assumption implies a stepwise variation of source as shown in Fig. 2. Putting these
approximations into Eq. (6), we obtain

k e (1 x 1) k w (1 x 1)
(T E - T P) - ( T P - T E ) + S(1 x 1) x = 0
( x ) e ( x ) w

Rearranging this, we have

aP TP = aE TE + aW TW + b (10)

where

3
ke (1x1)
aE = (11a)
( x )e

k w (1x1)
aW = (11b)
( x )w

aP = aE + aW (11c)

and

b = S(1x1) x (11d)

Figure 2 Piecewise linear temperature between adjacent control volumes (a) and step-wise
uniform source in a control volume (b)

Eq. (10) is the finite volume equation that describes energy conservation for 1-dimensional
steady state conduction. Temperature TP of the control volume under consideration is influenced
by temperature in the neighboring control volumes, TW at the west and TE at the east.
Coefficients aE, and aW represent conductance between the control volume under consideration
and the adjacent control volumes. Conductance is proportional to the interfacial conductivities and
the cross-sectional area perpendicular to the x-coordinate (1x1) and is inversely proportional to the
distances between two temperature nodes. All coefficients appearing in Eq. (10) are positive.
Thus if we increase the temperatures in the neighboring volumes, temperature TP will also
4
increase, reflecting realistic physical situations. If coefficients are not positive, however,
increasing neighboring temperature will decrease TP. Having positive coefficients in finite volume
equations is essential for a successful numerical simulation. In convection, these coefficients are
not always positive and require some special treatments to make them positive (discussed in a
later chapter). In Eq. (10), b represents generation or destruction of energy in the control volume
under consideration.

Finite Volume Equation in Index Notations


Computer programming requires that the finite volume equations be written in index
notations. Following practices in defining the control volumes and associated index notations are
adopted.

Each control volumes are defined by identifying each control volume surfaces by
assigning their locations in x, i.e., x1, x2, .....,xi-1, xi, xi+1,.......xN, xN+1, xN+2, and xN+3 as shown
in Fig. 3. Temperature and thermal conductivity are defined explicitly at the center of each
control volume. There are N+2 control volumes. Two control volumes at the end of calculation
domain are fictitious control volumes with zero thickness. They are introduced to handle the
boundary conditions.

In terms of these notations, finite volume equation can be written as, 2 i N+1,

a i T i = b i T i+1 + ci T i-1 + d i (12)

where

k e (1x1) k i+1/ 2 (1x1)


bi = = (12a)
( x ) e 0.5( x i + x i+1)

k w (1x1) k i-1/ 2 (1x1)


ci = = (12b)
( x ) w 0.5( x i-1 + x i)

ai = bi +ci (12c)
and d i = Si xi (1x1) (12d)

5
Figure 3 Index notations

Writing Eq. (12) for every control volumes, 2 i N+1, we have N simultaneous
equations:

6
a 2 T 2 = b 2 T 3 + c 2 T1 + d 2
a 3 T 3 = b3 T 4 + c3 T 2 + d 3
....................
a i-1 T i-1 = b i-1 T i + c i-1 T i- 2 + d i-1
a i T i = b i T i+1 + c i T i-1 + d i (13)
a i+1 T i+1 = b i+1 T i+ 2 + c i+1 T i + d i+1
.....................
a N T N = b N T N+1 + c N T N-1 + d N
a N+1 T N+1 = b N+1 T N+ 2 + c N+1 T N + d N+1

where temperatures T1 and TN+2 are given by the boundary conditions. Unknown temperatures,
T2, T3, .........,TN, and TN+1 are found by solving Eq.(13) simultaneously. Since Eq. (13) is in a
tri-diagonal matrix form, Tri-Diagonal-Matrix-Algorithm (TDMA) can be used. This will be
described later.

Boundary Conditions
Specification of boundary temperatures, T1 and TN+2 depends upon the physical boundary
conditions at the ends of calculation domain. Let us consider various boundary conditions at the
left boundary.

Case 1:

Boundary temperature, TB, is given. This is the simplest boundary condition. Then
T1=TB.

Case 2:

Heat flux at the boundary, qin'' , is given. Boundary temperature (T1) is not known,
however. We can find a relation between the given heat flux and the temperature inside the
calculation domain by considering an energy balance. Consider the fictitious control volume (Fig.
4) and taking energy balance we get


( cA x1 T1) = q in " A- q out " A (14)
t

7
Figure 4 A known heat flux boundary at x=0

The first term in Eq. (14) is zero since there is no mass in this volume. Now evaluating the
conduction flux through the right surface (Jx)w and equating with the given heat flux, qin'' , we get

T 2 - T1
q in'' = - k 2 (15)
0.5( x1 + x 2)

Solving for the unknown boundary temperature, T1, we have

1 x 2 ''
T1 = T 2 + q in (16)
2 k 2

If qin'' = 0, i.e., an insulated boundary, Eq. (16) reduces to

T1 = T2 (17)

Case 3:

Convective heat transfer coefficient, hf and fluid temperature, Tf are given. This is similar
to Case 2 except the convection flux is given by

q "conv = h f ( T f - T1) (18)

8
Note that the convection flux is positive in the x-direction if Tf is greater than T1. By taking an
energy balance at the fictitious control volume at x=0, we obtain

T2 - T1
h f (Tf - T1) = - k 2 (19)
0.5(x1 + x 2 )

Solving for T1, we have

2
h f Tf + k 2 T2
x2
T1 = (20)
2
hf + k2
x2

If hf>>k2, Eq. (20) reduces to T1=Tf, and if hf << k2, Eq.(20) reduces to Eq.(17), as
expected. Similar approach can be used at the right boundary.

For the three boundary conditions considered so far, it is possible to solve explicitly for
the boundary temperature T1 . Suppose we have a radiative boundary at x=0. Then the energy
balance gives

T 2 - T1
(Tf4 - T14) = - k 2 (21)
0.5( x1 + x 2)

We cannot solve for T1 explicitly from this equation. A more general treatment of such nonlinear
boundary conditions will be discussed in detail later in this chapter.

We have formulated finite volume equation for one dimensional conduction and
considered how to incorporate some boundary conditions. Let us examine few example problems
to reinforce our understanding of the proposed numerical method.
_______________________________________________________________________________
Example 1:
_______________________
Consider a steady conduction in 1-dimensional bar with known temperature at x=0 (T1
= 0 K) and x=L (T6 =16 K). The length of the bar is 8.0 m, conductivity is constant
at 1.5 W/K.m, and there is a uniform heat source that generates 3.0 W/m3. We would
like to find the temperature at the center of 4 equal control volumes as shown.

9
Solution:

Evaluating the coefficients at i=2, 3, 4 and 5, we have

(1.5)(1 x 1) 1.5 (1.5)(1 x 1) 4.5


b2 = = ; c2 = = 1.5; a 2 =
0.5(2 + 2) 2 0.5(0 + 2) 2

1.5 1.5 3.0


b3 = ; c3 = ; a3 =
2 2 2

1.5 1.5 3.0


b4 = ; c4 = ; a4 =
2 2 2

1.5 4.5
b5 = 1.5; c5 = ; a5 =
2 2

Source terms are, for all i's; d i = S i x i (1 x 1) = (3.0 W/ m 3)(2 mx1 m 2 ) = 6 W

With these coefficients and source terms, Eq. (13) becomes, after multiplied by 2,

4.5 T2 = 1.5 T3 + 3.0 T1 + 12 (a.1)


3.0 T3 = 1.5 T 4 + 1.5 T 2 + 12 (a.2)
3.0 T 4 = 1.5 T 5 + 1.5 T 3 + 12 (a.3)
4.5 T5 = 3.0 T6 + 1.5 T4 + 12 (a.4)

Substituting the given boundary temperatures, T1=0 and T6=16, Eqns.(a.1)


(a.4) become

10
4.5 T2 = 1.5 T3 + 12 (b.1)
3 T3 = 1.5 T 4 + 1.5 T 2 + 12 (b.2)
3 T 4 = 1.5 T 5 + 1.5 T 3 + 12 (b.3)
4.5 T5 = 1.5 T4 + 60 (b.4)

These equations can be solved by forward and backward substitution method. To do that
lets rewrite these equations as

1 12
T 2 = T3 + (c.1)
3 4 .5
1 1
T3 = T 4 + T 2 + 4 (c.2)
2 2
1 1
T 4 = T5 + T 3 + 4 (c.3)
2 2
1 60
T5 = T 4 + (c.4)
3 4 .5

Forward substitution begins by introducing T2 into (c.2),

1 1 1 12
T3 = T 4 + ( T3 + )+4
2 2 3 4 .5

Rearranging this
3
T3 = T 4 + 6 .4 (d)
5

Substituting this into (c.3), we get

5 72
T4 = T5 + (e)
7 7

Finally substituting T4 into (c.4) and solving for T5, we have T5 = 22. Backward
substitution determines T4=26, T3=22 and T2=10.

Exact solution of this problem is


x S
T(x) = T 0 + (T L - T 0) + (L- x) x (f)
L 2k

With the given conditions, Eq. (f) becomes

11
T(x) = 10 x- x 2 (g)

Numerical solution is one degree larger than the exact values at all control volumes. This
is due to small number of control volume used in the solution.

To check the solution further, lets calculate the energy balance. Energy generated
in the bar is

q gen = (3 W/ m 3)(8 mx1 m 2) = 24 W

T 2 - T1 10 - 0
q0 = qx=0 = - k (1 x 1) = (-1.5) (1) = -15 W
x2 / 2 2/2

T6 - T5 16 - 22
qL = q x=L = - k (1 x 1) = -1.5 (1) = 9 W
x5 / 2 2/2

Thus
q out = - q 0 + q L = 15 W+ 9 W = 24 W

We see the energy conservation is satisfied.

_______________________________________________________________________________
Example 2:
______________________________________________________
An aluminum bar is exposed to a convective boundary at x=L and a constant temperature
at x=0. Calculate steady-state temperature at four locations as shown. Assume k=14
W/m.K, T0=373 K, Tf=298 K and hf=10 W/m2.K.

12
Solution:

Evaluating the coefficients for each i, we have

(14)(1) (14)(1)
b2 = = 28; c 2 = = 56; a 2 = 84
0.5(0.5 + 0.5) 0.5(0 + 0.5)

b 3 = 28; c 3 = 28; a 3 = 56

b 4 = 28; c 4 = 28; a 4 = 56

(14)(1)
b5 = = 56; c 5 = 28; a 5 = 84
0.5(0.5 + 0)

There is no source, thus di=0, for all i's.

With these coefficients, simultaneous equations are


84 T 2 = 28 T 3 + 56 T 1

56 T 3 = 28 T 4 + 28 T 2
(a.1-a.4)
56 T 4 = 28 T 5 + 28 T 3

84 T 5 = 56 T 6 + 28 T 4

Boundary temperature T1 is T0=373 K. T6 is determined by energy balance at the right


boundary. Thus, with N=4,

13
2
h f Tf + k 5 T5
x5
T6 =
k5
hf + 2
x5
(b)
= 45.15 + 0.84848 T5

Substituting T0 into (a.1),

84 T2 = 28 T3 + 20888 (a.1')

Substituting (b) into (a.4) and rearranging, we have

36.49 T5 = 28 T4 + 2528.4 (a.4')

Solving (a.1'), (a.2), (a.3) and (a.4') simultaneously, we obtain the numerical solutions.
Exact solution of the given problem is T(x) = -22.06 x + 373. Table below shows a
comparison of these results.

node numerical exact


___________________________________________________
1 373 373
2 367.47 367.49
3 356.41 356.46
4 345.35 345.43
5 334.29 334.40
6 328.79 328.88
___________________________________________________

Energy balance can be used to check the accuracy of numerical solution. Energy
entering through the left boundary by conduction is


T2 - T1 367.47 - 373 2
q0 " = - k 2 = (-14) = 309.7 W/ m
x 2 0.5(0.5)
2

Energy leaving through the right boundary due to convection is


14
q L " = h f (T 6 - Tf ) = (10)(328.79 - 298) = 307.9 W/ m 2

About 0.58 % error is observed in energy conservation.


_______________________________________________________________________________
Example 3
________________

Consider the same physical and boundary conditions as given in Example 2. But allow
uniform energy generation in the aluminum bar at a rate of 100 W/m3. Only change we
have to make is to add a source term bi=(100 W/m3)(0.5 m)(1m2)=50 W.

Solution:

The simultaneous equations are:

84 T 2 = 28 T3 + 20888 + 50
56 T3 = 28 T 4 + 28 T 2 + 50
56 T 4 = 28 T5 + 28 T3 + 50
36.49 T5 = 28 T 4 + 2528.4 + 50

Solving these we get,

T1=373; T2=369.99; T3=362.18


T4=352.59 T5=341.21; T6=334.66

Energy balance is

369.99 - 373
q0 = -(14) = 168.56 W
0.5(0.5)

q L = q conv " (A) = (10)(334.66 - 298)(1.0) = 369.6 W

and

q gen =q& (volume) = (100 W/ m3)(2 mx 1 m 2) = 200 W

15
Thus, the error in energy balance is

qgen + qin - q out 200 + 168.56 - 369.6


Error = = = 0.028 (2.8 %)
q out 369.6

To improve the accuracy we need to have more control volumes.


______________________________________________________________________________

Three example problems shown above illustrate the basic methodology of the finite
volume numerical method. We find that there are basically no differences in formulating the
numerical solutions for all three problems. Only differences appear in the evaluation of source
terms and the boundary temperatures. Thus a general solution approach for any combinations of
boundary conditions and source terms can be formulated. This flexibility of numerical method is
an advantage over the exact analytical method.

Source Term Linearization


We have considered source terms that remain constant throughout the domain. There
are many types of source terms that are not uniform but depend on dependent variables. Let us
revisit Example 2 considered in a previous section. If we remove the insulation around the
aluminum bar and subject its surface to the same convective boundary condition imposed at
x=L, energy balance equation becomes [2],

T T hf P
c = (k ) + ( T f - T) (22)
t x x A

Figure 5 A rectangular fin

where P is the wetted perimeter of the cross section and A is the cross section area.

Thus we see that source term for this case is


16
hf P hf P
S = Tf - T = SC + SP T (23)
A A

where Sc is the constant part and Sp is the slope of temperature dependency. This is a linear
equation in T. Thus source term is already in a linear form. In many cases however, we have
to linearize the source term for successful numerical calculations. With a linear form of source
term, steady 1-D conduction equation can be written as

dJ X
- + SC + SP T = 0 (24)
dx

Integrating the source term in Eq. (24) over a control volume surrounding "p" as we did
before, we obtain
11 e
(SC + SP T) dxdydz = SC x + SP T P x
00w

The resulting finite volume equation is

a P TP = a E TE + a W TW + b (25)

where

k e (1x1)
aE =
( x )e
k w (1 x 1) (26.a-d)
aW =
( x ) w

a P = a E + a W - SP x(1x1)

and

b = SC x(1x1)

The difference between Eq. (10) and Eq. (25) is due to the linearized source term. If Sp=0,
they are the same equation. In linearizing the source term, it is absolutely necessary to have Sp
0. Otherwise aP can become negative, and the resulting numerical solution can become
nonphysical [1].

______________________________________________________________________________

Example 4
______________________________________________________________
17
Reexamine Example 2 with a change such that energy loss through the surface due to
convection is included. Use the same physical and boundary conditions. Assume 1 by 1
cross sectional area of the bar.

Solution:
Linearized source term is

hf P hf P
S = Tf - T = SC + SP T P
A A

Thus, for all i's,

hf P (10 W/ m 2 K)(4 m)
SC i = ( T f )i = 2
(298 K) = 11920 W/ m 3
A 1m

hF P
and SPi = - ( )i = - 40 W/ m3 K
A

d i = SC i x i ( A i ) = (11920 W/ m 3)(0.5 m)(1 m 2 ) = 5960 W

- SP i x i A i = - (-40 W/ m 3 K)(0.5 m)(1 m 2 ) = 20 W/ K

With these changes, simultaneous equations become (see example 2)

(84 + 20) T2 = 28 T3 + 20888 + 5960


(56 + 20) T3 = 28 T4 +28 T2 + 5960
(56 + 20) T4 = 28 T5 + 28 T3 +5960
(36.49 + 20) T5 = 28 T4 + 2528.4 + 5960

Solving these, we have

T1 = 373; T2 = 343.83; T3 = 318.24


T4 = 307.11; T5 = 302.49; T6 = 301.81

Taking an energy balance, we have

343.83 - 373
q x = 0 = (1 x 1)(-14)( ) = 1633.52 W
0.5(0.5)

q x = L = (1 x 1)(10 W/ m2 K)(301.81 - 298) K = 38.1 W

18
5
q wall = ASi h f (Ti - Tf ) = (20 m 2)(45.83 + 20.24 + 9.11 + 4.49) = 1593.4 W
2

We see about 0.12 % errors in the energy balance.


______________________________________________________________________________

Further Considerations on Source Term Linearization

The source terms are, in general, nonlinear function of dependent variables. Suppose
we have a source term as

S = 4 - 5T3 (27)

This is a nonlinear equation since coefficient (-5T2) depends on temperature itself. Several
methods can be used to linearize this expression.

Method 1: Let Sc = 4 5 and Sp = 0. Tp* is the known temperature from the previous
calculation.

Method 2: Let Sc = 4 and Sp = -5 .

*
Method 3: Use the Taylor series expansion of S(T) about Tp .

dS
S(T P ) = S(T*P ) + ( )T * (T P - T*P )+ ......
dT P
= 4 - 5 T*3
P + (0 - 15 T 2 )T *P (T P - T*P )+ .....
= 4 - 5 T*3 *3 *2
P + 15 T P - 15 T P T P + ...

= 4 + 10 T*3 *2
P - 15 T P T p

Thus Sc = 4 + 10 and Sp = --15 . Graphical interpretation of three methods is


shown in Fig. 6. Methods 1 and 2 are underestimating the dependency of S on T while method
3 gives an accurate dependency. Note that Tp and Tp* are very close.

19
Figure 6 Graphical representation of linearized source term

Source term linearization can be used to specify the desired values of dependent
variable at any control volumes. Suppose we like to specify a temperature at an interior control
volume, say Tp=Tdesired. To accomplish this let

Sc = 1020 x Tdesired and Sp = -1020.

With this choice of source term, we have

aE TE + aW TW + b a E T E + a W T W + SC x(1x1)
TP = =
aP a E + a W - SP x(1x1)

SC x(1x1) 10 20 T desired
= = = T desired
- SP x(1x1) -(- 10 20)

This is a very useful method to specify a value of dependent variable inside a calculation
domain.

Source term linearization can also be used to stabilize numerical calculation when the
physics dictates that the dependent variable should remain always positive, such as density,
absolute temperature, and energy. Suppose we want to calculate the absolute temperature, T,
for a problem in which source term is given by S = Sconst and Sconst is a very large negative
number. Under certain conditions, Tp can go negative because of negative large source term.
To prevent such occurrence, let the source term be linearized by

TP
S = 0 + Sconst
T*P

20
Then

Sconst
SC = 0 ; SP = 0
T*P

Thus Tp can approach zero but never becomes negative.

Interfacial Conductivity
Up to this point of our discussions, it is implicitly assumed that the conductivity at the
interfaces between two control volumes is known and is equal to the conductivity of material in
an adjacent control volume. This is perfectly acceptable if conductivity is constant and uniform
throughout the material as has been the case for all example problems. If conductivity is not
uniform due to different materials or due to a dependency on temperature, interfacial
conductivity should be carefully evaluated to ensure conservational principle.

Consider two control volumes with different conductivity as shown in the Fig. 7. It is
very tempting to evaluate the conductivity at the interface "e" by linear interpolation. That is

( x )e -
k e = k P + ( k E - k P) (28)
( x )e

Figure 7 Interface conductivity at east interface

If two control volumes are the same size, Eq.(28) reduces to ke = 0.5 (kP + kE),
which is the arithmetic mean value of conductivity of two adjacent control volumes. This
approach is simple yet it can lead to nonphysical solutions. As an example, let kE=0.
(insulator), then conduction flux at the interface should be zero. But, ke =0.5kP and the heat
flux at the interface is
21
TE - TP T -T
qe = - ke = -0.5 k P E P 0
( x )e ( x )e

which is not physically correct. This will introduce an energy sink or source through the
interface "e".

To derive a physically correct interfacial conductivity, we consider an energy balance at


the interface. Define a fictitious control volume of zero thickness at the interface (Fig. 8).
Energy entering from the left surface is, using the first-order accurate difference scheme,

Te - TP
q e- = - k P (29a)
( x )e-

Figure 8 Energy balance at the interface control volume

And the energy leaving through the right surface is

TE - Te
q e+ = - k E (29b)
( x )e+

where Te is the temperature at the interface. Rearranging Eqs. (29a) and (29b), we have

( x )e-
(q e-) = T P - Te (30a)
kP

and
22
( x )e+
(q e+) = Te - T E (30b)
kE

Adding Eqs.(30a) and (30b) and noting that qe- = qe+ = qe, we have

TP - TE k P k E ( x )e T -T
qe = =- . E P (31a)
( x )e- ( x )e+ k E ( x )e- + k P ( x )e+ ( x )e
+
kP kE

Conduction flux through the interface "e" is expressed as

TE - TP
qe = - ke (31b)
( x )e

Comparing Eqs.(31a) and (31b) we conclude that

k P k E ( x )e
ke = (32)
k E ( x )e- + k P ( x )e+

If two control volumes are of the equal size, Eq.(32) becomes

2 kP kE
ke = (33)
kE + kP

which is the harmonic mean value of adjacent conductivities. If kE=0, then ke=0 as expected.
Temperature at the interface "e" can be calculated by using Eq.(30a) and Eq.(30b),

kP kE
TP + TE
( x )e- ( x )e+
Te = (34)
kP + kE
( x )e- ( x )e+

All diffusion coefficients at the interface "e" will be evaluated by this method. Thus
23
( x )e P E ( x )e
e = = (35)
( x )e- / P + ( x )e+ / E E ( x )e- + P ( x )e+

This formulation of diffusion coefficient at the interface allows the present numerical method
work for conduction in composite materials, fluid flow in complex geometries, conjugate heat
transfer and heat transfer with phase changes and other complex transport processes.

Interfacial conductivity including a contact surface resistance, Rt, can be obtained by


the same method (Fig. 9). Heat flux from the left, through the contact surface and to the right
surface is, respectively;

T e- - T P
q e- = - k P
( x )e-

1
qR = - ( T e + - T e- )
Rt

and

T E - T e+
q e+ = - k E
( x )e+

Figure 9 Contact Resistance

24
Eliminating Te- and Te+ from these equations with qe- = qe+ = qR = qe, we get

k P k E ( x )e
ke = (36)
k E ( x )e - + k P ( x )e + + k E k P R t

Temperatures at the contact surface are (left as an exercise),

kP kE kP kE
TP + TE + Rt TP
( x )e- ( x )e+ ( x )e- ( x )e+
T e- = (37a)
kP kE kP kE
+ + Rt
( x )e- ( x )e+ ( x )e- ( x )e+

and

kP kE kP kE
TP + TE + Rt TE
( x )e- ( x )e+ ( x )e- ( x )e+
T e+ = (37b)
kP kE kP kE
+ + Rt
( x )e- ( x )e+ ( x )e- ( x )e+

______________________________________________________________________________

Example 5
________________________________
Consider a fin problem as discussed in Example 4 with two changes. Conductivity of
the bar is 14 W/m.K for the first half of the bar and 24 W/m.K for the remaining half.
Energy is being generated uniformly at 100 W/m3. All other conditions remain same
2
as in Example 4; length of the bar is 2 m, cross sectional area is 1.0 m , base
temperature is 373 K and all surfaces are exposed to convective heat transfer with
hf=10 W/m2.K and Tf=298 K.

25
Solution:
Differential equation for this problem is given by
d dT hf P
(k ) + (T f - T) + q& = 0
dx dx A

Therefore, the source term is

hf P hf P
S = q& + Tf - T
A A

Recall that

k e (1x1)
aE =
( x )e

where the interface conductivity at 'e' is given by Eq.(36), i.e.,

k E k P ( x )e
ke =
( x )e - k E + ( x )e + k P

Substituting ke, aE becomes

k E k P (1x1)
aE =
( x )e- k E + ( x )e+ k P

Thus

26
k i+1 k i (1 x 1) 2 k i k i+1 (1x1)
bi = a E = =
1 1 x i k i+1 + x i+1 k i
x i k i-1 + x i+1 k i
2 2

and

2 k i-1 k i (1x1)
ci = a W =
x i-1 k i + x i k i-1

Evaluating the coefficients for each i=2,..,5, we have


2 k 2 k 3 (1 x 1) (2)(14)(14 )(1 x 1)
b 2 == = = 28
x2k3 + x3k2 0.5(14) + 0.5(14)

2 k 1 j 2 (1 x 1) (2)(14)(1 x 1)
c2 = = = 56
x1 k 2 + x 2 k1 0 + 0.5(14)

b 3 = 35.368; c 3 = 28

b 4 = 48; c 4 = 35.368

b 5 = 96; c 5 = 48

From the source term, we have

hf P
Sp i x i (1x1) = - x i (1x1) = -20
A

Thus the coefficients ai = bi + ci - Spi xi (1x1) are

a 2 = b2 + c2 - SP 2 x 2 (1 x 1) = 28 + 56 - (-20) = 84 + 20 = 104

a 3 = 83.368; a 4 = 103.368; a 5 = 144 + 20 = 164

Constant parts of the source terms are, for all i's,

hf P
d i = SCi x i (1x1) = (q+
& T f ) x i (1x1) = (100 + 11920)(0.5)(1x1) = 6010
A
27
Thus the simultaneous equations are
104 T 2 = 28 T 3 + 56 T 1 + 6010

83.368 T 3 = 35.368 T 4 + 28 T 2 + 6010

103.368 T 4 = 48 T 5 + 35.368 T 3 + 6010

164 T 5 = 96 T 6 + 48 T 4 + 6010

Boundary conditions are, T1 = 373 K and

2
hf Tf + k5T5
x5
T6 =
2
hf + k5
x5

= 28 . 11 + 0 . 9056 T 5

Substituting the boundary conditions and after rearranging, we have

104T 2 = 28 T3 + 26898

83.368 T3 = 35.368 T 4 + 28 T 2 + 6010

103.368 T4 = 48 T5 + 35.368 T3 + 6010

77.06 T5 = 48 T 4 + 8708.56

Solving for the unknown temperatures, we get

T2 = 344.51; T3 = 318.96; T4 = 309.18; T5 = 305.60

Boundary temperature T6 is

T6 = 28.11 + 0.9056 * 305.6 = 304.86

Temperature at the interface between two different materials is given by Eq.(34),


28
k3 k4
T3 + T4
0.5 x 3 0.5 x 4
Te = = 312.78 K
k3 k4
+
0.5 x 3 0.5 x 4

This temperature is lower than the linearly interpolated temperature (314.07 K). Fig.
E5 shows the temperature distribution.

Figure E5 Temperature distribution

29
To check the energy balance, we calculate

T T
q x =0 =k 2 2 1 (1x1)= 1595.44 W
0.5x 2
q gen = q& ( volume) = (100 W / m 3 )(2 m x 1 m 2 ) = 200 W
q x = L =h f (T6 T f )(1x1)=68.6 W
5
q surface = h f As i (Ti T f )=1725 W
i =2

Thus, qin + qgen = 1795.44 W, and qout = 1793.6 W. The error is about 0.1 %.
______________________________________________________________________________

Nonlinearity
Finite volume equation, Eq.(13) can be solved for the unknown temperatures if all
coefficients and source terms are explicitly known values. For the linear problems, coefficients
and source terms are known. Therefore, simultaneous equations are to be solved only once for
the unknown temperatures. For the nonlinear problems, however, coefficients and source
terms cannot be evaluated exactly because they depend on the temperatures that are unknown.

Suppose the thermal conductivity is a function of temperature, k= k(T). Actually,


thermal conductivity of most materials depends strongly on the temperature. To evaluate the
coefficients, we need to know the value of thermal conductivity, which, in turn, requires the
known temperatures. To initiate the calculation, we have to assume temperature, T* and
evaluate k=k(T*). With the guessed coefficients, simultaneous equations can be solved for the
unknown temperature, T. If newly calculated temperature, T, is close enough to the guessed
temperature T*, we have solution. If not, let T*=T and repeat the calculation until

T- T*
Error = abs( )< (38)
T

where is an error tolerance.

Nonlinearity can also arise from the nonlinear source terms. Returning to Example 4
we note that source term contains a convective coefficient, hf. Convective coefficient depends,
in general, on the film temperature that is the average of the unknown surface temperature (T)
and the fluid temperature (Tf).
30
Nonlinear boundary conditions also make the problem nonlinear. Returning to Example
2, and consider the convective boundary at x=L. Recall that the boundary temperature T6 was
given by (Eq.(b) in Example 2),

T6 = 45.15 + 0.84848T5
which contains an unknown temperature T5. This is an example of nonlinear boundary
conditions.

In Example 2, T6 was substituted into the finite volume equation for the fifth (i=5) control
volume and manually rearranged to eliminate the nonlinearity through an algebraic
manipulation;

36.49T5 = 28T4 + 2528.4,

which does not contain any unknown terms.

Without this algebraic step, however, finite volume equation for the fifth control
volume would contain nonlinear term, T6*, which is

* *
T 6 = 45.15 + 0.84848T 5

where * denotes values at the previous iteration. Substituting this into Eq.(b.4) in Example 2,
we have

84T5 = 28T4 + 56T6*


= 28T4 + 56(45.15 + 0.84848T5*)

*
which contains nonlinear source terms due to T5 . Since source term contains the unknown
temperatures, simultaneous equations must be solved iteratively until solution converges within
a prescribed tolerance. That is

T* - T
abs 5 5
T5

Nonlinear boundary conditions, such as radiative boundary condition, require such iterations
since the boundary temperature often cannot be explicitly expressed in terms of the interior
temperatures.

31
Nonlinearity is quite common in most transport processes involving fluid flow.
Numerical solution of nonlinear problems do not entail additional new concepts other than that
simultaneous equations must be solved many times until converged solutions are obtained. This
is a task computer can handle rather rapidly.

Tri-Diagonal-Matrix-Algorithm (TDMA)
By introducing the boundary conditions at both ends of calculation domain, N-
simultaneous equations can be put into a tri-diagonal matrix form. Tri-diagonal form of matrix
equations can be easily solved by the forward and backward substitution method as has been
utilized in our example problems. Thomas algorithm is a method based on the same principle
and is useful to solve a large tri-diagonal matrix [1].

Finite volume equation in index notation can be rearranged into the following form;

- ci T i-1 + a i T i - bi T i+1 = d i (39)

for i=2,3,...i-1,i,i+1,...,N,N+1. Implementing the boundary conditions at x=0 and x=L,


and expanding Eq.(39), we get a tri-diagonal matrix:

a2 -b2 T2 d
-c3 a3 -b3 T3 d3
-c4 a4 -b4 T4 d4
. . . . .
. . . . .
-ci ai -bi Ti = di (40)
. . . . .
. . . . .
-cN aN -bN TN dN
-cN+1 aN+1 TN+1 d

where d2' and dN+1' are

d '2 = d 2 + c2 T1 (41a)

and

d 'N +1 = d N+1 + b N+1 T N + 2 (41b)

due to the boundary conditions at x=0 and x=L. Note that c2=bN+1=0 after implementing the
boundary conditions.
32
In the forward substitution, we seek a relation

Ti = PiTi+1 + Qi
(42)
right after we obtain
Ti-1 = Pi-1Ti + Qi-1 (43)

Substituting Eq.(43) into Eq.(39) for Ti-1, we have

-ci(Pi-1Ti + Qi-1) + aiTi - biTi+1 = di

Solving for Ti, we get

bi d i + ci Q i-1
Ti = T i+1 + (44)
a i - c i P i-1 a i - c i P i-1

Now comparing Eq.(42) and Eq.(44), we obtain two recursive relations

bi
Pi = (45a)
ai - ci P i-1

and

d i + c i Q i-1
Qi = (45b)
a i - c i P i-1

Forward substitution is to evaluate Pi and Qi for i=2,3,....,N+1;

b2 b2 d '2 + c2 Q1 d '2
i=2 P2 = = ; Q2 = =
a 2 - c 2 P1 a2 a 2 - c2 P1 a2
b3 d + c3 Q 2
i = 3 P3 = ; Q3 = 3
a 3 - c3 P 2 a 3 - c3 P 2
................................................................
bi d i + c i Q i -1
i=i Pi = ; Qi =
a i - c i P i -1 a i - c i P i -1
.................................................................

33
bN d N + c N Q N-1
i=N PN = ; QN =
a N - c N P N-1 a N - c N P N-1
b N+1 d N+1 + c N+1 Q N
i = N+ 1 P N+1 = =0 ; Q N+1 =
a N+1 - C N+1 P N a N+1 - c N+1 P N

With the known Pi and Qi, Eq.(42) yields

T2 = P2T3 + Q2

T3 = P3T4 + Q3
..............

Ti = PiTi+1 + Qi
..............

TN = PNTN+1 + QN

TN+1 = PN+1TN+2 + QN+1=0+QN+1

Since QN+1 is known, TN+1 is found from the last equation. Then backward substitution yields
TN, TN-1,...., T3, and T2.

TDMA is a simple method to use and requires small computer memory space that is
proportional to N. It can be used for ADI (Alternating-Direction-Implicit) method commonly
adopted for the multi-dimensional problems.

Quasi 1-Dimensional Conduction


In 1-dimensional conduction along the x-direction, the area perpendicular to the heat
flow direction remains constant, i.e., A(x)=constant. We have assumed (1x1) cross sectional
area in all of our discussions so far. There are many situations in which area changes along the
heat flow direction. If temperature variation perpendicular to the x-direction is very small
compared to the variation in the x-direction, temperature variation perpendicular to the x-
direction may be neglected. In this case, heat transfer becomes a quasi-one-dimensional in x-
direction and the steady state heat conduction equation becomes
1 d dT
(Ak ) + S = 0 (46)
A dx dx

By integrating Eq.(46), it can be easily shown that


34
aPTP = aETE + aWTW + b (47)

where
k e Ae
aE = (48a)
( x )e
k w Aw
aW = (48b)
( x )w

a P = a E + a W - SP A P x (48c)

and

b = SC A P x (48d)

This is a generalization of 1-dimensional finite volume representation of heat conduction


equation. The area A(x) can be any arbitrary values. If A(x)=x, 1-D cylindrical coordinate
2
and if A(x)=x , 1-D spherical coordinate system result.

Figure 10 Quasi-one-dimensional conduction


35
Steady 1-Dimensional
Dimensional Conduction Program
We are now in a position to write a computer program that can solve the general 1- 1
dimensional steady conduction problems. Conductivity of the material may vary throughout the
material
ial and may also depend on the temperature as well. The cross cross-sectional
sectional area can be
arbitrary. Variety of source terms can be included.
Details of a computer program do vary significantly from one to another, reflecting the
styles of individuals who write the programs even though the programs are based on the same
numerical method and are designed to solve the same physical problem. There is absolutely no
possibility that two programs can be identical in every detail.
A MATLAB program based on the method methodology
ology discussed in previous sections is
created. This program is named as std1da.m
std1da.m, which solves 1-dimensional
dimensional steady conduction
problems. The he flow chart shown in Fig. 11 shows the structure of the program. Detail of the
program is illustrated by using an application to conduction through
rough a circular fin.

Figure 11 Flow chart for steady 11-D conduction


36
Description of the problem

Governing differential equation for 1-D heat conduction through a varying cross
sectional area is
1 d dT hf P .
(Ak )+ (T f - T) + q = 0 (49)
A dx dx A

where A(x) is the cross sectional area, P is the wetted perimeter of the cross-section and q& is
the source term. For the present example problem, cross sectional area is of circular shape
with 2.5 cm-dia. The fin is made of copper. The length is 1.2 m and the conductivity is
assumed to be constant at 401 W/m.K. The base temperature is 473 K and the fin surfaces
including the right side boundary are exposed to air at 298 K with a constant convective
.
coefficient of 10 W/m2K, and q = 0 . The purpose of this example is to highlight the
ingredients of the finite volume method discussed so far and compare the results with known
exact solution. It is always a good idea to compare numerical solutions with available data
either exact or experimental.

Exact solution of this problem is given by [2]

f h
coshm(L- x) + ( mk )sinhm(L- x)
=
b h
coshmL+ ( f )sinhmL
mk

where
h f P(x) ; = T- T f
2
m = b = T B - T f ; and
kA(x)

Structure of the program

Number of control volumes used in this example is 10 and they are uniform in sizes.
Cross sectional area is also constant, ac(x)=4.91x10-4 m2. After defining the geometry of the
problem, initial temperature is assumed at 373 K. This initial temperature can be arbitrary
value. If we assumed initial temperature close to the steady solution, number of iterations will
decrease. Temperature, tep= T* is the previous iteration level temperature saved to check the
convergence of the solution. ITER is the iteration counter. Maximum number of iteration is
set to maxiter=200. Thermal conductivity of the fin is next given in the program. It is
37
assumed to be constant in this example. Boundary conditions at both ends of the fin are next
prescribed. At x=0, T1 = Tb =473 K. At x=L, a convective boundary condition is used and
temperature TN+2 is found by energy balance which contains unknown temperature, TN+1. A
better treatment of nonlinear boundary condition is discussed in the next section. Conductance
between the control volumes are next evaluated by using Eqns.(11a,b), where interfacial
conductivities are evaluated by Eq.(33). For the present problem, of course, interfacial
conductivity remains constant since the material is homogeneous and conductivity is assumed
to be temperature independent. Constant part (Sc) and temperature dependent part (Sp) of
source terms are
h P h P
Sc = f Tf + q = 4.768x10 5 and Sp = f = 1600.
A A

and the source term b is then evaluated. The coefficients for the simultaneous equations are
then calculated. Simultaneous equations are put into a tri-diagonal-matrix form by
incorporating the boundary conditions. TDMA method is used to solve these set of
simultaneous equations. After solution is obtained, convergence is tested by

abs(Ti - T*i)
= 10-6
Ti

for i=1,...,N+2. If convergence test is met, solution is obtained (iflag=0). Otherwise


(iflag=1), the guessed temperatures are replaced by the just calculated temperatures and the
solution steps are repeated until solution is converged or iteration count (iter) exceeds a preset
maximum iteration number (maxiter). The latter option is needed to escape from an endless do-
loop created by programming mistakes. At the end of calculation, number of iterations
required to reach the solution and the temperatures at each control volumes are printed.

%std1da.m.
%steady, 1-dimensional conduction with varying cross section area
%,nonuniform condutivity and sources. Finite volume formulation
%using matlab program. (By Dr. S. Han, Sep 3, 2008)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%specify the number of control volumes
n=10;%number of control volumes
maxiter=100;%maximum iteration number
np1=n+1;
np2=n+2;
np3=n+3;
%define calculation domain
tl=1.2; %total length of the bar
delx=tl/n;
dx=ones(1,np2);
dx=delx*dx;
%replace fictitious boundary volume size
dx(1)=1.0e-10;

38
dx(np2)=1.0e-10;
%assign x-coordinate
x(1)=0;
for m=1:np2
x(m+1)=x(m)+dx(m);
end
%define cross-sectional area
dia=0.025;
for i=1:np3
ac(i)=pi/4*dia^2; %constant cross section
end
%prescribe intitial temperatures for all control volumes
for i=1:np2
te(i)=373;
tep(i)=te(i);
end
%iteration for convergence
iter=0;
iflag=1;
%iteration loop for the convergence
while iflag==1 % end is at the end of program *********
%prescribe thermal conductivity
for i=1:np2
tk(i)=401;
end
%prescribe boundary temperature
te(1)=473;%at the left boundary given temperature
hf=10;% right boundary given flux
tf=298;
te(np2)=te(np1)-hf*(te(np2)-tf)/(tk(np1)/...
(.5*dx(np1)));
%initialize the coefficients for tdma matrix
%evaluate the diffusion conductance and source terms
for i=2:np1
% diffusion conductance
ke=tk(i)*tk(i+1)*(dx(i)+dx(i+1))/...
(dx(i)*tk(i+1)+dx(i+1)*tk(i));
de=2.0*ke*ac(i+1)/(dx(i)+dx(i+1));
ae=de;
kw=tk(i)*tk(i-1)*(dx(i)+dx(i-1))/...
(dx(i-1)*tk(i)+dx(i)*tk(i-1));
dw=2.0*kw*ac(i)/(dx(i-1)+dx(i));
aw=dw;
%source term evaluation
% sp=-1600;
% sc=4.768e5;
per=pi*dia;
sp=-hf*per/ac(i);
sc=hf*per/ac(i)*tf;
ap=ae+aw-sp*dx(i)*0.5*(ac(i+1)+ac(i));
b=sc*dx(i)*0.5*(ac(i)+ac(i+1));
%setting coefficients for tdma matrix
ta(i)=ap;
tb(i)=ae;
tc(i)=aw;
39
td(i)=b;
%modify using boundary conditions
if i==2
td(i)=td(i)+aw*te(1);
elseif i==np1
td(i)=td(i)+ae*te(np2);
end
end
%solve the simultaneous equations by using tdma
nq=n;
nqp1=nq+1;
nqm1=nq-1;
%forward substitution
beta(2)=tb(2)/ta(2);
alpa(2)=td(2)/ta(2);
for i=3:nqp1
beta(i)=tb(i)/(ta(i)-tc(i)*beta(i-1));
alpa(i)=(td(i)+tc(i)*alpa(i-1))/...
(ta(i)-tc(i)*beta(i-1));
end
%backward substitution
dum(nqp1)=alpa(nqp1);
for j=1:nqm1
i=nqp1-j;
dum(i)=beta(i)*dum(i+1)+alpa(i);
end
%end of tdma
%update the temperature
for i=2:np1
te(i)=dum(i);
end
%check the convergence
for i=1:np2
errote(i)=abs(te(i)-tep(i))/te(i);
end
error=1.0e-6;
if (max(errote)>error)
iter=iter+1;
tep=te;
iflag=1;
else
iflag=0;
end
if iter>maxiter
break
end
end % this end goes with the while iflag==1 at the top********
%compare with exact solution to make sure program works correctly
%locate the midpoint of control volumes
for i=1:np2
xc(i)=0.5*(x(i)+x(i+1));
end
%
m=sqrt(hf*2/(tk(1)*1.25e-2));
thetab=te(1)-tf;
40
for i=1:np2
theta(i)=(cosh(m*(tl-xc(i)))+hf/(m*tk(1))*sinh(m*(tl-xc(i))))/...
(cosh(m*tl)+hf/(m*tk(1))*sinh(m*tl));
end
theta=thetab*theta;
teexact=theta+tf;
teexact=teexact'
%print the results
fprintf('iteration number is %i \n',iter)
disp('steady state temperatures are')
fprintf('%9.3f \n',te')
%plot the result xc.vs.te
plot(xc,te,'-',xc,teexact,'--o')
grid on
title('steady state temp'),xlabel('x(m)'),ylabel('T(K)')
legend('numerical','exact')

steady state temp


480
numerical
460 exact

440

420
T(K)

400

380

360

340

320
0 0.2 0.4 0.6 0.8 1 1.2 1.4
x(m)

Figure 12. Comparison of numerical and exact solution

A steady state solution is obtained after 76 iterations. Numerical solution and exact
solution are in good agreement as shown in fig. 12. A large number of iterations was required
41
due to a nonlinear treatment of the convective boundary condition at x=L. A more general
treatment of linearization of nonlinear boundary conditions is discussed in the next section.

Linearization of Boundary Conditions


Boundary temperatures, T1 and TN+2 are not explicitly known when the boundary
conditions are given in terms of a heat flux, q''. By taking an energy balance at x=0, it was
previously shown that

1 x2
T1 = T 2 + q" (50)
2 k 2

where q" is a boundary flux at x=0. Note that q" is assumed to be positive when it is directed
along the positive x-direction. Linearized flux q" can be expressed by

q" = qc + qp T1 (51)

where qc is a constant and qp is the slope of linearized flux equation. Note that we do not
require qP being less than zero in the boundary flux linearization. Substituting Eq.(51) into Eq.
(50) and rearranging, we have

1 x2
q
1 2 k2 C
T1 = T2 + (52)
1 - 1 x 2 q 1-
1 x2
q
2 k 2 P
2 k2 P

Substituting Eq.(52) into the first equation in the simultaneous equations (13) and after
rearranging , we get

a 2' T2 =b2 T3 + d 2' (53)

where a'2 and d'2 are the modified coefficients and source given by

42

1
a'2 = a 2 - c2 (54a)
1 - 1 x 2 q
2 k 2 p

and

1 x2
2 qC
d ' 2 = d 2 + c2 k2 (54b)
1 - x 2 q
1
2 k 2 P

Likewise when the boundary condition at x=L is given in terms of a heat flux,
boundary temperature is given by

1 x N +1
T N+ 2 = T N+1 - [ q" ] (55)
2 k N+1

The heat flux q" is expressed as

q"= q C + q P T N+2

Substituting this in Eq.(55) and solving for TN+2 , we have

1 x N +1
q
1 2 k N+1 C
T N+2 = T N+1 - (56)
1 + 1 x N +1 q 1+
1 x N +1
q
2 k N+1 P 2 k N+1 P

Replacing TN+2 in the last equation in the simultaneous equations (13) and after rearrangement,
we have

a N' +1 T N+1 = c N +1 T N + d N' +1 (57)

43
where


1
a 'N +1= a N+1 - b N+1 (58a)
1 + 1 x N+1 q
2 k N+1 P

and

1 x N+1
2 qC
k N+1
d N +1 = d N+1 - b N+1
'
(58b)
1 + x N+1 q
1
2 k N+1 P

The fin problem discussed earlier is solved again with the linearized convective
boundary at x=L. The convective heat flux boundary at x=L is

q conv "= h f ( T N+2 - T f ) = q C + q P T N+2 (59)

Thus

qC = - hf Tf and q P = hf (60)

Note that in writing the heat flux at x=L, heat flux directed along the positive x-
direction is assumed to be positive. Hence Eq.(59) is used. Modifications are made on
std1da.m program to reflect the linearized convective boundary at x=L. This modified
program is called std1d.m. In this program, we introduce boundary types 1 (known
temperature), 2 (known heat flux) and 3 (periodic). Numerical solution for the fin problem
with boundary type 1 at x=0 (bx0=1) and boundary type 2 (bx1=2) was obtained with only 2
iterations which is a dramatic decrease from 76 required without boundary linearization. The
copy of the program can be found from CAE lab website,
www.cae.tntech.edu\~shan\me4730_2012.

Periodic Boundary Condition

44
We have considered boundary conditions given by in terms of a known temperature
(type 1 boundary) or a known heat flux (type 2 boundary), which may be nonlinear. There is
one additional boundary condition, which is periodic (type 3 boundary), frequently occurs in
transport processes. As an example, consider a closed loop of aluminum wire with uniform
cross sectional area. Energy is generated non-uniformly in the wire and the surface is exposed
to a convective environment as shown in the figure. To determine the steady state temperature
in the wire, one has to define physical boundary and apply appropriate boundary conditions.
There are no obvious physical boundaries since physical domain is an endless loop. If there is
symmetry, symmetry boundary conditions can be applied. However, it is not clear whether
there is symmetry in the present problem. If we measure temperature of the wire starting from
any arbitrary point in the wire, temperature distribution along the wire may change as we
move along the wire until we make a full circle. After one circle, temperature change will
repeat the same distribution over and over. This type of boundary condition is called
"periodic" boundary condition (Fig.13).
A lazy way of handling the periodic boundary condition is to let

T1 = TN+1* and TN+2 = T2* (61)

Where "*" means the temperatures at the previous iteration values and therefore act as
nonlinear sources, resulting in many iterations for a convergence.

Figure 13 Closed loops with non-uniform energy generation

To accelerate the convergence, nonlinear source terms must be eliminated from the
equations. This is accomplished by using a specialized TMDA which explicitly takes advantage
of the periodic boundary condition. This method is called the Circular-Tri-diagonal-Matrix-
Algorithm (CTDMA). A detail description of the CTDMA is presented in the Appendix [1].
An example is used to illustrate the procedure of using the CTDMA for a problem with a

45
periodic boundary condition. The modified program std1d.m is designed also to handle
periodic boundary condition as discussed below.

Problem description

To appreciate the CTDMA, let us consider a copper wire of 2.5 cm-dia forming a loop.
The length of the loop is 1.2 m. Energy is generated uniformly at 105 W/m3 in the half of the
loop and uniformly at 2x105 W/m3 in the remaining half of the loop. The conductivity of the
copper is 401 W/m.K and the convective conditions are hf=10 W/m2.K and Tf=298 K. We
want to calculate the steady-state temperature distribution in the copper loop.

Figure 14 Copper wire loops with energy generation

Because of the periodic boundary condition, fictitious boundary control volumes


are no longer needed. Instead, from the geometry, we have

x 1 = x N +1 and x N + 2 = x 2 (62)

The CTDMA solves for the temperatures T2,........,and TN+1. It is obvious from the
geometry that

T1 = T N+1 and T N+2 = T 2 (63)


46
Note the changes made on implementing the boundary conditions for CTDMA routine
and the CTDMA routine, which is added next to TDMA routine. These changes are
highlighted in boxes. A new variable IPRIOD is introduced. IPRIOD=1 means a periodic
boundary and IPRIOD=0 means a non-periodic boundary condition. The present problem calls
for IPRIOD=1.

Numerical Results

Numerical results are obtained after 2 iterations. If we used a lazy man's approach
calling TDMA instead of CTDMA, converged solution would take 47 iterations. (This is left
as an exercise.) Numerical results show a periodic variation of temperature distribution along
the loop as expected. To check the accuracy of the results, we can check the energy balance.
This can be done conveniently by adding a few lines of statements at the end of the program.
(This is left as an exercise).

ITER= 2
I= 1 2 3 4 5 6
I= 7 8 9 10 11 12
TE= 3.987E+02 3.949E+02 3.930E+02 3.930E+02 3.949E+02 3.987E+02
TE= 4.011E+02 4.023E+02 4.023E+02 4.011E+02 3.987E+02 3.949E+02

References
1. Patankar, S. V., Numerical Heat Transfer and Fluid Flow, Hemisphere , 1980.

2. Incropera, F. P., and DeWitt, D. P., Fundamentals of Heat Transfer, 3rd Ed., John Wiley
&. Sons, 1990.

3. Patankar, S. V., Liu, C. H. and Sparrow, E. M.,"Fully Developed Flow and Heat Transfer
in Ducts Having Streamwise-Periodic Variations of Cross-Sectional Area," ASME J. of Heat
Transfer, Vol. 99, p180-186, 1977.

Problems

47
1. Starting from a 3-dimensional heat conduction equation written in the spherical
coordinate system, show that 1-d steady state conduction in the radial direction is given
by the following equation.
1 d 2 dT
(r k ) + S = 0
r 2 dr dr

Derive finite volume equation by integrating the above equation. Explain the physical
meaning of each term appearing in the finite volume equation.

2. Starting from a 3-dimensional conduction equation written in the cylindrical coordinate


system show that 1-d steady state conduction in the theta direction ( ) is given by
1 d 1 dT
(k )+S= 0
r d r d

Derive finite volume equation by integrating the above equation. Explain the physical
meanings of each term in the finite volume equation.

3. Convective and radiative boundary condition at x=0 is given by

q"=hf(Tf - T1) + C(Tf4 - T14) , where C is a constant.

Describe how you can implement this boundary condition into a finite volume equation.

4. Consider 1-dimensional steady conduction as shown in the figure.

where q0=20 W/m2, L=8 m, TL=0, S=4 W/m3, k=2 W/m.K.

Calculate temperatures at two points as shown and check the energy balance.

5. Consider a 1-dimensional steady conduction through a bar as shown in the figure.

48
where L=8 m, T0=0 , TL=16 K, k=2 W/m.K, S=4 W/m3.

Calculate the temperatures at two points and check the energy balance.

6. Angular direction momentum equation for a circular Couette flow has a source term
(see problem 1 in chapter 2),

v v r v
S = - -
r2 r

Discuss possible linearization schemes for this source term.

7. Derive interfacial conductivity including contact surface resistance and temperature as


shown by Eqs.(36) and (37a,b).

8. Determine the temperature at 4 equally spaced points in a tapered cylindrical fin. The
base is at 100 0C and the remaining surfaces are exposed to convective environment
with hf=10 W/m2.K and Tf=25 0C. Assume constant conductivity of 400 W/m.K.

9. Consider 1-D conduction in a rod that is bent into a circular shape to form an endless
loop. It thus has no exposed ends where boundary conditions can be prescribed.
Indeed all grid points are internal grid points. If a cut is made in the loop, cyclic

49
boundary condition can be assumed at the cut. That is T1=TN+1 and T2=TN+2.
How would you handle such cyclic boundary conditions? A special type of TDMA
suitable for cyclic boundary conditions is discussed in Ref.[3] that is called circular
TDMA. (See Appendix)

Project

1. A probe of overall length L=20 cm and diameter D=1.25 cm is inserted through a duct
wall such that a portion of its length, referred to as the immersion length Li is in contact
with a gas stream at 500 K that is to be measured. The remaining length of the probe is
exposed to air at 298 K. The convective heat transfer coefficient in the duct is 1000
W/m2.K and in the air is 10 W/m2.K. The conductivity of the probe material is 200 W/m.K
and its emissivity is 0.1. [Ref. 2]

Immersion error is defined by the temperature difference between the gas temperature in
the duct and the temperature at the tip of the probe, Terr = Ttip Tgas, which depends
on the immersion length Li.

(a) Derive appropriate conduction equation for this problem.

(b) By using the numerical method, calculate the temperature distribution in the probe when
Li/L = 1.0. Assume 12 uniform control volumes. Plot the results and check the energy
balance.

50
(c) Estimate Terr as a function of Li/L and plot the results. Use Li/L = 0.25, 0.5 , 0.75
and 1.0.

2. We want to evaluate triangular fin efficiencies by numerically solving steady heat conduction
equation. Triangular fin geometry is shown in Fig. a. Fin efficiency is defined by f =
qf/qmax, where qf is the actual heat transfer from the fin and qmax is the maximum heat
transfer when the entire fin surface temperature is assumed to be at the base temperature.
[Ref. 2]

In order to verify our approach to this problem, we will first check the accuracy of
numerical solution by solving a similar problem with a known solution. Consider a
truncated rectangular fin as shown in Fig. B. Fin surfaces is insulated and temperatures at the
base and tips are maintained at TB and TL1, respectively.

(a) By integrating the quasi-one-dimensional steady conduction equation without source terms,
show that heat transfer rate along the x-direction is given by

Dtk(T B - T L 1)
qx = -
Lln 1 - L
1
L

and the temperature distribution is given by

51
qx L x
T(x) = T B + ln(1 - );0 x L1
Dtk L

(b) Solve the above truncated fin problem numerically by using 10 uniform control
volumes. Assume following values:

t=0.02 m; L=0.5 m; D=1.0 m; k=400 W/m.K; TB=373 K; TL1=298 K; L1=L/2

Compare the numerical results with the exact solution in terms of temperature distribution.

After checking the feasibility of numerical approach, we now return to the fin problem.
Take the insulation off the fin surface and consider entire fin (not the truncated fin). The fin
surface is now exposed to a convective cooling with known hf and Tf.

(c) Show that the conduction equation is given by

1 d dT hf P
(Ak ) + (T f - T) = 0
A dx dx A

where A is the cross-sectional area and P is the wetted perimeter.

(d) Calculate the steady state temperatures by using 10 uniform control volumes with the
following conditions. Check energy balance to see whether your solution is reasonable.

T=0.02 m; L=0.5 m; D=1.0 m; k=400 W/m.K; TB=373 K; Tf=298 K; hf=10


W/m2.K

(e) Calculate the fin efficiency and compare with the results shown in Fig. C.

(f) By changing the conductivity while maintaining all other values, you can calculate the
fin efficiency as a function of Lc3/2(hf/kAp)1/2 as shown in Fig. C. Obtain an efficiency
curve and compare with the results in Fig.c.

52
Figure (a) Triangular fin, (b) Truncated triangular fin, (c) Fin efficiency

53
4. Consider a circular fin with rectangular profile as shown in the diagram.

(a) Show that the steady conduction along the radial direction in the fin is described by the
following equation
1 d
A
dT hP
+ (T f T ) = 0
A dr dr A
where A is the cross section area and P is the wetted perimeter of the cross section,

A = 2rt ; P = 4r
(b) Let r1= 5 mm, r2=20 mm, t=0.2 mm, =205 W/m.K, Tf=300 K, and h=8.2
W/m2.K.
Calculate the temperature along the fin using the numerical method discussed in this
chapter. Use 10 uniform control volumes. The base temperature is 380 K and the tip of
the fin is insulated.

(c) Calculate the heat transfer rate fro, the base of the fin and evaluate the fin efficiency

q fin
f =
q max
(d) Repeat the calculations with several cases and obtain a fin efficiency curve. Compare
with the known results.
(e) Add the radiation effects on the heat transfer and modify the governing equation in part
(a). Let the emissivity varies 0.1 ~ 0.9. Compare with the results without radiation for
part (b).

54
5. Consider a pin fin with circular cross section as shown in the figure below. The fin is
made of pure iron. The total volume of the fin is fixed at 5.0e-7 m3. The thermal
conductivity of the material can be approximated by (T ) = 111 0.085T W / mK ,
where T is in Kelvin.

Hf
Tf
r

h
base x
X=0

The base temperature is 800 K and the convective conditions are hf=10 W/m2 K and
Tf=298 K.

We would like to solve this problem by modifying std1db.m. The radius of the fin
base (r) changes as we change the height (h) since the total volume of the fin is fixed.
1
The volume of the pin fin is given by V = r 2 h .
3

a. Optimize the pin height (h) that gives the maximum conduction heat transfer rate
from the base by plotting q x =0 as a function of h, varying h from 0.05 m to 0.15
m.

b. Fin efficiency can be defined by = q x=0 / q max , where q max = Aside h f (T1 T f ) .
Plot vs h. Is the maximum fin efficiency case also the maximum heat transfer
rate case?

55

You might also like