You are on page 1of 3

f (x) x, as shown in Figure 56.

The first derivative of f(x) at a point is equivalent


to the slope of a line tangent to the curve at that point and is defined as
df(x) Llf f(x + Llx) -
= lim = Llxlim f(x) (5-5)
f (x + x) dx Llx 0 Llx 0

f Llx
x
f (x) which is the ratio of the increment Llf of the function to the increment Llx of the
independent variable as Llx 0. If we dont take the indicated limit, we will
have the following approximate relation for the derivative:
df(x) f(x + Llx) -
x x + x x f(x) (5-6)
dx
FIGURE 56
Llx
The derivative of a function at a point This approximate expression of the derivative in terms of differences is the
represents the slope of the function finite difference form of the first derivative. The equation above can also be
at that point.
obtained by writing the Taylor series expansion of the function f about the
point x,
df(x) d 2 f(x)
Plane wall f(x + Llx) = f(x) + Llx + 1Llx2 + (5-7)
dx 2 dx 2
T (x)
and neglecting all the terms in the expansion except the first two. The first
Tm + 1 term neglected is proportional to Llx2 , and thus the error involved in each step
Tm of this approximation is also proportional to Llx2 . However, the commutative
Tm 1 error involved after M steps in the direction of length L is proportional to Llx
since MLlx2 = (L/Llx)Llx2 = LLlx. Therefore, the smaller the Llx, the smaller
L the error, and thus the more accurate the approximation.
0
01 2 m 1 m m +1 M x Now consider steady one-dimensional heat transfer in a plane wall of thick-
M 1 ness L with heat generation. The wall is subdivided into M sections of equal
m 1 m + 1 thickness Llx = L/M in the x-direction, separated by planes pass ing through
2 2
M + 1 points 0, 1, 2, . . . , m - 1, m, m + 1, . . . , M c alled nodes or nodal
FIGURE 57 points, as shown in Figure 57. The x-coordinate of any point m is simply
Schemat ic of the nodes and the nodal xm = mLlx, and the temperature at that point is simply T(xm ) = Tm .
temperatures used in the development The heat conduction equation involves the second derivatives of tempera-
of the finite difference formulation ture with respect to the space variables, such as d 2T/dx2, and the finite differ-
of heat transfer in a plane wall. ence formulation is based on replacing the second derivatives by appropriate
271
CHAPTER 5

differences. But we need to start the process with first derivatives. Using
Eq. 56, the first derivative of temperature dT/dx at the midpoints m - 12and
m + 12 of the sections surrounding the node m can be expressed as

Tm - Tm -1 Tm + 1 - Tm
dT
dx 1 m-
1
2
Llx
and 1
dT
dx m+ 1
2
Llx (5-8)

Noting that the second derivative is simply the derivative of the first deriva-
tive, the second derivative of temperature at node m can be expressed as

dT T m+1 - T m T m - T m-1
d 2T dx 1 1
m+2
dT
- dx 1 m- 1
2
=
Llx
-
Llx
dx2 1 m Llx Llx
Tm - 1 - 2Tm + Tm + 1
= (5-9)
Llx2

which is the finite difference representation of the second derivative at a gen-


eral internal node m. Note that the second derivative of temperature at a node
m is expressed in terms of the temperatures at node m and its two neighboring
nodes. Then the differential equation
d 2T g
+ =0 (5-10)
dx 2 k

which is the governing equation for steady one-dimensional heat transfer in a


plane wall with heat generation and constant thermal conductivity, can be ex-
pressed in the finite difference form as (Fig. 58) Plane wall

Tm -1 - 2Tm + Tm +1 gm Differential equation:


+ = 0, m = 1, 2, 3, . . . , M - 1 (5-11)
Llx2 k
2
d T g
2 + k =0
dx
Valid at every point
where gm is the rate of heat generation per unit volume at node m. If the sur-
face temperatures T0 and TM are specified, the application of this equation to
each of the M - 1 interior nodes results in M - 1 equations for the determi- Finite difference equation:
nation of M - 1 unknown temperatures at the interior nodes. Solving these Tm 1 2Tm + Tm + 1 g m
+=
equations simultaneous ly gives the temperature values at the nodes. If the x 2 k
temperatures at the outer surfaces are not known, then we need to obtain two Valid at discrete points
more equations in a similar manner using the specified boundary conditions.
Then the unknown temperatures at M + 1 nodes are determined by solving x
the resulting system of M + 1 equations in M + 1 unknowns simultaneous ly.
Note that the boundary conditions have no effect on the finite difference FIGURE 5
The differential equation is vali
formulation of interior nodes of the medium. This is not surprising since the
every point of a medium, whereas
control volume used in the development of the formulation does not involve
finite difference equation is vali
any part of the boundary. You may recall that the boundary conditions had no
discrete points (the nodes) o
effect on the differential equation of heat conduction in the medium either.
The finite difference formulation above can easily be extended to two- or
three-dimensional heat transfer problems by replacing each second derivative
by a difference equation in that direction. For example, the finite difference
formulation for steady two-dimensional heat conduction in a region with
272
HEAT TRANSFER

heat generation and constant thermal conductivity can be expressed in rectan-


gular coordinates as (Fig. 59)
Tm +1, n - 2T m, n + Tm -1, n Tm, n +1 - 2T m, n + Tm, n -1 gm, n
+
n+1
m, n + 1
Llx2 Lly2 + =0 (5-12)
k
y m 1, n m, n m + 1, n
n
y for m = 1, 2, 3, . . . , M -1 and n = 1, 2, 3, . . . , N -1 at any interior node
n1
m, n 1 (m, n). Note that a rectangular region that is divided into M equal subregions
y x x in the x-direc tion and N equal s ubregions in the y-direction has a total of
(M + 1)(N + 1) nodes, and Eq. 512 c an be us ed to obtain the finite differ -
x m1 m m +1 ence equations at (M - 1)(N -1) of these nodes (i.e., all nodes except those
FIGURE 59 at the boundaries).
Finite difference mesh for two- The finite difference formulation is given above to demonstrate how differ-
dimensional conduction in ence equations are obtained from differential equations. However, we will use
rectangular coordinates. the energy balance approach in the following sections to obtain the numerical
formulation because it is more intuitive and can handle boundary conditions
more easily. Besides, the energy balance approach does not require having the
differential equation before the analysis.

You might also like