Vous êtes sur la page 1sur 22

Chapter 6

Numerical Methods for Transient Problems


1 Numerical Solution of Transient Heat Conduction
Problems
Mathematical models of heat conduction problems must often be solved numerically. Three
main approximation techniques are available: nite dierences (FD), nite elements (FE)
and nite volume (FV) methods. These methods are based on the idea of rst discretizing
the heat equation and then solving the resulting (algebraic) problem. Discretization is ac-
complished by regarding the medium as constituted by a collection of cells or volumes of
nite size. Nodes are usually associated with each cell thus producing a mesh of points.
The separation between any two nodes is the mesh spacing. Temperature at each cell is
then represented by the temperature at the corresponding nodal location. A computer and
a computer program are then used to solve the resulting algebraic problem. This section
contains a survey of nite dierence methods for the solution of one- and multidimensional
transient heat conduction problems.
2 The Finite Dierence Method
The basic idea behind the nite dierence method is to replace the various derivatives
appearing in the mathematical formulation of the problem by suitable approximations on a
nite dierence mesh.
The simplest derivation of nite dierence formulae makes use of Taylor series. The
Taylor series expansions of a function f(x) about a point x are:
f(x + x) = f(x) + xf

(x) +
x
2
2!
f

(x) +
x
3
3!
f

(x) + ...
and
f(x x) = f(x) xf

(x) +
x
2
2!
f

(x)
x
3
3!
f

(x) + ...
where x is the mesh spacing.
1
Solving the rst equation above for f

(x) gives
f

(x) =
f(x + x) f(x)
x

x
2
f

(x)
x
2
6
f

(x) + ...
and solving the second one
f

(x) =
f(x) f(x x)
x
+
x
2
f

(x)
x
2
6
f

(x) + ...
Finally, from the rst two equations
f

(x) =
f(x + x) f(x x)
2x

x
2
6
f

(x) + ...
These are called respectively the forward, backward and central approximations to the deriva-
tive of f(x). Note that the second term on the right hand side in the rst two equations
above is proportional to x while the same second term in the third equation is proportional
to x
2
. Therefore, the rst two equations are regarded as leading to rst-order accurate
approximations to the derivative while the last formula leads to a second-order accurate
approximation.
Note that the neglect of higher order terms in the above formulae for f

(x) produces
various approximation schemes for the derivative.
Second order derivative approximations can be similarly obtained. For example, expand-
ing f(x x) about x
f(x + 2x) = f(x) + 2xf

(x) + 2x
2
f

(x) +
4
3
x
3
f

(x) + ...
and
f(x 2x) = f(x) 2xf

(x) + 2x
2
f

(x)
4
3
x
3
f

(x) + ...
Eliminating f

(x) gives
f

(x) =
f(x + x) 2f(x) + f(x x)
x
2

1
12
x
2
f

(x) + ...
Neglecting the higher order terms produces the central dierence approximation to f

(x).
Note that this leads to a second-order accurate approximation of the second derivative.
Errors are always involved in performing any numerical computation. Round-o errors
appear whenever computing takes place using a nite number of digits. This is the case
when using modern computing machines. Truncation error is the error that exists even in
the absence of round-o error and is the result of neglecting higher order terms in the nite
dierence approximations obtained from Taylor series expansions. Successful numerical work
in conduction heat transfer requires attention to issues of accuracy and error control.
2
3 Solution of Transient Heat Conduction Problems by
the Finite Dierence Method
Consider the problem of transient 1D heat conduction inside a slab of span L with constant
properties. The governing equation is

2
T
x
2
=
1

T
t
This equation must be solved subject to specic boundary and initial conditions in order to
determine T(x, t).
The formulae given above can now be used to produce nite dierence equations approxi-
mating the heat conduction problem. Consider rst a mesh in space formed by points sep-
arated by constant spacing x. The mesh points in space are x
1
, x
2
, ..., x
i1
, x
i
, x
i+1
, ..., x
N
.
Note that nodes x
1
and x
N
are boundary nodes while all other nodes are interior nodes.
Consider also a mesh in time formed by instants of time separated by a constant
amount of time t. The mesh points in time are t
1
, t
2
, ..., t
j
, t
j+1
, ..., t
M
. Note that time level
t
1
represents the initial condition of the system.
With the above notation, the temperature at a particular node (x
i
, t
j
) is given by
T(x
i
, t
j
) = T
i,j
.
3.1 The Explicit Scheme
We can now use the nite dierence formulae given above to write approximations to the
derivatives in the heat conduction equations. For instance, using a forward dierence in time
to represent the time rate of change of temperature at nodal location (x
i
, t
j
) yields
1

T
t

1

T(x
i
, t
j
+ t) T(x
i
, t
j
)
t
=
1

T
i,j+1
T
i,j
t
A central dierence approximation to the right hand side term around the same nodal
location yields

2
T
x
2

T(x
i
+ x, t
j
) 2T(x
i
, t
j
) + T(x
i
x, t
j
)
x
2
=
T
i+1,j
2T
i,j
+ T
i1,j
x
2
Substituting and rearranging gives an explicit formula for the calculation of T
i,j+1
for
all interior nodes i, i.e.
T
i,j+1
= T
i,j
+
t
x
2
(T
i+1,j
2T
i,j
+ T
i1,j
)
If the problem to be solved involves Dirichlet boundary conditions, for instance
T(0, t) = T(x
1
, t
j
) = T
1,j
= T
1
3
and
T(L, t) = T(x
N
, t
j
) = T
N,j
= T
N
The above equations completely dene the temperatures at all the nodal locations. Since
T
1,j
and T
N,j
are given one computes only T
i,j
for i = 2, 3, ..., N 1 and for all time levels
j + 1.
An important limitation of the explicit scheme is that it is conditionally stable. It
can be shown that the calculation of T
i,j
with the above method produces stable and phys-
ically meaningful results only as long as the Courant-Friedrichs-Lewy (CFL) condition
is fullled, i.e. as long as
t
x
2

1
2
3.2 The Implicit Scheme
An alternative scheme is obtained by using instead a central dierence approximation to the
right hand side term around the nodal location (x
i
, t
j+1
). This gives

2
T
x
2

T(x
i
+ x, t
j+1
) 2T(x
i
, t
j+1
) + T(x
i
x, t
j+1
)
x
2
=
=
T
i+1,j+1
2T
i,j+1
+ T
i1,j+1
x
2
Substituting and rearranging gives an implicit formula for the calculation of T
i,j+1
for
all spatial nodes i, i.e.

t
x
2
T
i1,j+1
+ (2
t
x
2
+ 1)T
i,j+1

t
x
2
T
i+1,j+1
= T
i,j
For given temperatures at the boundaries, the above formula constitutes a system of
simultaneous algebraic equations the solution of which yields the desired values of T
i,j+1
for all i = 2, 3, ..., N 1 and for all time levels j + 1.
Introducing the expressions
a
i
= c
i
=
t
x
2
b
i
= 2
t
x
2
+ 1
and
d
i
= T
i,j
4
the system of equations becomes
a
i
T
i1,j+1
+ b
i
T
i,j+1
c
i
T
i+1,j+1
= d
i
for i = 2, 3, ..., N 1 for each and every time level j + 1 such that j = 1, 2, ..., M. Recall
that the values of T
i,1
are given for all i by the initial condition of the problem .
The resulting system is tridiagonal, the associated matrix is diagonally dominant
and it is easily and eciently solved by the Thomas algorithm.
The main idea in the Thomas algorithm is to rst reduce the original tridiagonal system
of equations to a simple upper triangular form and then back substitute to determine the
values of all the unknowns. Specically, new variables
i
, S
i
and D
i
for i = 1, 2, 3, ..., N are
introduced and computed as follows, rst

1
=
d
1
b
1
next, recursively for i = 2, 3, ..., N
S
i
=
a
i
b
i1
D
i
= b
i
S
i
c
i1

i
= d
i
S
i

i1
Then, back substitution is performed to obtain the solution, rst for i = N
T
N,j+1
=

N
D
N
and nally for i = N 1, N 2, ..., 2, 1 as follows
T
i,j+1
=
(
i
c
i
T
i+1,j+1
)
D
i
An advantage of the implicit scheme is that stability is unconditionally stable. However,
accuracy considerations preclude the use of large values of t.
3.3 The Semi-implicit Scheme
Still another possibility is to use weight averaging for the nite dierence approximation of
the right hand side term. Specically, consider the following approximation

2
T
x
2

T(x
i
+ x, t
j+1
) 2T(x
i
, t
j+1
) + T(x
i
x, t
j+1
)
x
2
+
+(1 )
T(x
i
+ x, t
j
) 2T(x
i
, t
j
) + T(x
i
x, t
j
)
x
2
=
=
T
i+1,j+1
2T
i,j+1
+ T
i+1,j+1
x
2
+ (1 )
T
i+1,j
2T
i,j
+ T
i+1,j
x
2
5
where 0 1.
Substituting and rearranging gives a semi-implicit formula for the calculation of T
i,j+1
for all spatial nodes i, i.e.

t
x
2
T
i1,j+1
+ (2
t
x
2
+ 1)T
i,j+1

t
x
2
T
i+1,j+1
=
= T
i,j
+ (1 )
t
x
2
(T
i+1,j
2T
i,j
+ T
i+1,j
)
The resulting system is also tridiagonal and it is also easily and eciently solved by the
Thomas algorithm. The scheme is also unconditionally stable. If =
1
2
one obtains the
Crank-Nicolson scheme.
Note that the above formula reduces to the explicit scheme when = 0 and to the implicit
scheme when = 1.
3.4 More General Boundary Conditions for a Slab
Consider the same problem as above except that the slab is assumed insulated at x = 0 and
that exchanges heat with an environment at T

by means of a heat transfer coecient h at


x = L. The boundary conditions are thus
k
T
x
= 0
at x = 0, and

T
x
= h(T T

)
at x = L.
Assuming a mesh consisting of nodes x
1
= 0, x
2
, ..., x
i1
, x
i
, x
i+1
, ..., x
N
= L as before, ap-
proximations to the boundary conditions are readily obtained by using one-sided dierences,
i.e.
k
T
2
T
1
x
= 0
which yields T
1
= T
2
at x = 0, and
k
T
N
T
N1
x
= h(T
N
T

)
These can be used with any of the time marching schemes described before by appropriate
selection of the time level used to evaluate the approximations. However, these formulae are
only rst order accurate and very ne meshes may be required to obtain good approximations.
The following approaches is recommended for higher accuracy.
6
Introduce auxiliary nodes outside the slab (symmetrically located with respect to x
1
and x
N
, respectively. Therefore, the auxiliary node to the left of node 1 will be labeled
node -2 and the one to the right of node N will be node N + 1. These nodes are ctitious
(sometimes they are called ghost nodes), they are only a device to obtain higher accuracy
and do not appear in the nal formulae. Second order accurate central dierence formulae
are derived by performing dierential energy balances to approximate the corresponding
boundary condition and the temperature of the ghost nodes is eliminated by combining the
result with the nite dierence formula corresponding to the boundary node.
Next, a central dierence formula is used to approximate the derivatives at the boundaries
and the values of temperature at the auxiliary nodes are eliminated by combining the result
with the dierence approximation of the heat equation.
A second order accurate nite dierence approximation at x = 0 is
k
T
2,j
T
2,j
2x
= 0
or T
2,j
= T
2,j
. A similar approximation at x = L yields
k
T
N+1,j
T
N1,j
2x
= h(T
N
T

)
or T
N+1,j
= T
N1,j
(
2h
k
)x(T
N,j
T

).
Combining with the nite dierence approximation according to the explicit scheme and
rearranging yields
T
1,j+1
= T
1,j
+ 2
t
x
2
(T
2,j
T
1,j
)
and
T
N,j+1
= T
N,j
+ 2
t
x
2
[T
N1,j
T
N,j
(1 + x
h
k
) + T

(x
h
k
)]
The above expressions provide explicit formulae for the calculation of the temperatures of
the boundary nodes.
While combining with the nite dierence approximation according to the implicit scheme
yields
(1 + 2
t
x
2
)T
1,j+1
(2
t
x
2
)T
2,j+1
= T
1,j
and
(2
t
x
2
)T
N1,j+1
+ (1 + 2
t
x
2
[1 + x
h
k
])T
N,j+1
= T
N,j
+ T

(2
t
x
2
)(x
h
k
)
The above expressions provide the necessary additional equations for the calculation of the
temperatures of the boundary nodes.
7
3.5 Transient Conduction in Cylindrical Coordinates
Consider the following transient heat conduction problem in a cylinder (radius = a),
C
p
T
t
=
1
r

r
(rk
T
r
) + g
Introduce a mesh or nodes r
i
, i = 1, 2, ..., N with uniform spacing r. An explicit scheme is
readily obtained by using a central dierences formula for the space derivative and an Euler-
forward dierence for the time derivative. Hence, writing T(r
i
, t
j
) T
i,j
, the FD analog
is
C
p
T
i,j+1
T
i,j
t
=
1
r
i
(kr)
i+
1
2
T
i+1,j
T
t
i,j
r
(kr)
i
1
2
T
i,j
T
i1,j
r
r
and for constant properties, the explicit nite dierence scheme is given by
T
i,j+1
= T
i,j
+
t
r
i
r
2
(r
i
1
2
T
i1,j
2r
i
T
i,j
+ r
i+
1
2
T
i+1,j
)
which is again a nice tri-diagonal system of algebraic equations.
While handling of Dirichlet boundary conditions is straightforward, care must be used
when implementing more general types of conditions.
3.6 More General Boundary Conditions in Cylindrical Coordi-
nates
Consider the problem of transient heat conduction in a long, solid cylinder (radius a), subject
to axi-symmetrical heat extraction. The corresponding boundary conditions are
k
T
r
= 0
at r = 0, and

T
r
= h(T T

)
at r = a.
The ghost node approach is easily implemented to obtain a nite dierence formula
representing the boundary condition at r = a. Using the ghost node approach and central
dierences at r = a readily yields
k
T
N+1,j
T
N1,j
2r
= h(T
N,j
T

)
8
Rearranging gives the following expression for the temperature of the ghost node T
N+1,j
=
T
N1,j
2
h
k
r(T
N,j
T

). Introduction of this result into the nite dierence formula for


the heat equation applied at the boundary node yields the following explicit formula
T
N,j+1
= T
N,j
+ 2
t
r
2
[T
N1,j
T
N,j
(
a
p
a
)(
h
k
)r(T
N,j
T

))]
where a
m
= a r/2 and a
p
= a + r/2.
Since the nite dierence analog of the heat equation is singular at r = 0 the ghost
node approach cannot be used in this case. A convenient and also accurate alternative is to
consider the plane perpendicular to the cylinder axis and switch to Cartesian coordinates at
the origin. The nite dierence formula for the node at the origin, i.e.
T
1,j+1
T
1,j
t
= (
T
north,j
2T
1,j
+ T
south,j
r
2
+
T
east,j
2T
1,j
+ T
west,j
r
2
)
where north, south, east and west are nodal locations a radial distance r from the origin,
on the plane normal to the axis of the cylinder. Because of the assumption of axi-symmetry
T
north,j
= T
south,j
= T
east,j
= T
west,j
= T
2,j
. Hence, rearranging
T
1,j+1
= T
1,j
+ 4
t
r
2
(T
2,j
T
1,j
)
Implicit formulae can be also readily obtained following the same procedure.
3.7 Multidimensional Systems in Cartesian Coordinates
Consider the following transient heat conduction problem with internal heat generation and
constant thermal properties in a three dimensional rectangular Cartesian system of coordi-
nates (x, y, z),
C
p
T
t
= k
2
T + g
First we create a rectangular mesh of points x
i
, i = 1, 2, 3..., N
x
, y
j
, j = 1, 2, 3, ..., N
y
and z
k
, k = 1, 2, 3, ..., N
z
. The temperature at a specic nodal location (x
i
, y
j
, z
k
) and time
t, will be denoted by T(x
i
, y
j
, z
k
, t) = T
t
i,j,k
.
An explicit nite dierence scheme is readily obtained by approximating the space deriva-
tives by second order accurate central dierences and the time derivative by a rst order
accurate Euler-forward dierence, i.e.
C
p
T
t+t
i,j,k
T
t
i,j,k
t
= k
T
t
i1,j,k
2T
t
i,j,k
+ T
t
i+1,j,k
x
2
+
k
T
t
i,j1,k
2T
t
i,j,k
+ T
t
i,j+1,k
y
2
+ k
T
t
i,j,k1
2T
t
i,j,k
+ T
t
i,j,k+1
z
2
+ g(x
i
, y
j
, z
k
, t)
9
Note that all quantities on the right hand side are evaluated at time level t and this allows
direct computation of the value of T
t+t
i,j,k
for each point (x
i
, y
j
, z
k
). Once all nodes have been
computed this way, the process advanced to the next time level in the same manner. This
scheme is easily implemented but it is conditionally stable. The CFL condition is this case,
requires that
t

2

1
2
where

2
=
x
2
y
2
z
2
x
2
y
2
+ y
2
z
2
+ z
2
x
2
An unconditionally stable implicit scheme is obtained by approximating the time deriva-
tive by a backward dierence formula, i.e.
C
p
T
t+t
i,j,k
T
t
i,j,k
t
= k
T
t+t
i1,j,k
2T
t+t
i,j,k
+ T
t+t
i+1,j,k
x
2
+
k
T
t+t
i,j1,k
2T
t+t
i,j,k
+ T
t+t
i,j+1,k
y
2
+ k
T
t+t
i,j,k1
2T
t+t
i,j,k
+ T
t+t
i,j,k+1
z
2
+ g(x
i
, y
j
, z
k
, t + t)
This however requires solving a system of algebraic equations at each time step. Such system
can be solved in various dierent ways but an ecient method consists of a combination of
SOR iteration and the tri-diagonal matrix algorithm. This is obtained by visiting lines of
nodes in sequence and solving for the temperatures of the nodes on the line, using the most
recent values stored in memory for nodes in neighboring lines and over-relaxation.
4 Solution of Transient Heat Conduction Problems by
the Finite Volume Method
An alternative discretization method is based on the idea of regarding the computation
domain as subdivided into a collection of nite volumes. In this view, each nite volume is
represented by a line in 1D, an area in 2D and a volume in 3D. Nodes, located inside each nite
volume, become the locus of computational values. In rectangular Cartesian coordinates in
2D the simplest nite volumes are rectangles. For each node, the rectangle faces are formed
by drawing perpendiculars through the midpoints between contiguous nodes. Discretization
equations are obtained by integrating the original partial dierential equation over the span
of each nite volume. The method is easily extended to nonlinear problems.
4.1 Transient Conduction in a Slab
Now we apply the nite volume method to the discretization of a transient problem. Consider
the problem of determining T(x, t) for the slab x [0, L] and t > 0 such that
C
p
T
t
=

x
(k
T
x
)
10
subject to
T(x, 0) = T
0
(x)
and
T(0, t) = T(L, t) = 0
The above is an approximate representation of the problem of quenching a slab.
Subdivide the slab into a collection of N adjacent segments of thickness (nite vol-
umes) and introduce a set of N + 1 nodes (one inside each volume and one on each bound-
ary). The positions of nodes are then labeled from left to right in the form of a sequence
x
1
, x
2
, x
3
, ..., x
i
, ...x
N+1
. To discretize time simply select time intervals of duration t at
which the calculations will be performed. Uniform time intervals will be assumed here. As
before, we focus on the derivation of the discretized heat equation for all the interior volumes.
Consider now an arbitrary nite volume of size x. Its representative node is locate at
x
P
and its boundaries are located at x
w
and x
e
. . The two contiguous nodes to the left
and right of node P are W and E and their locations are x
W
and x
E
. Introduce again the
various mesh spacings as in the steady case x
e
, x
e+
, x
e
, x
w
, x
w+
, x
w
and x
Integrate now the heat equation over the span of the nite volume (i.e. from x to x+x)
and also over the time interval from t to t + t , i.e.
_
t+t
t
_
xe
xw
C
p
T
t
dxdt =
_
t+t
t
_
xe
xw

x
(k
T
x
)dxdt =
_
t+t
t
_
xe
xw
(k
T
x
)dt
The double integration on the left hand side is straightforward and yields
_
t+t
t
_
xe
xw
C
p
T
t
dxdt = C
p
x(T
P
T
o
P
)
where T
P
is the value of T at P at time t + t and T
o
P
is the value of T at P at time t.
On the right hand side, the space integration is performed rst and the resulting deriva-
tives are approximated from a piecewise linear prole to yield
_
t+t
t
_
xe
xw
(k
T
x
)dt =
_
t+t
t
[(k
T
x
)|
e
(k
T
x
)|
w
]dt =
=
_
t+t
t
[k
e
T
E
T
P
x
e
k
w
T
P
T
W
x
w
]dt
To complete the process an important decision must be made when carrying out the time
integration. A very general proposition is to assume that the integrals are given by time-
weighed averages as follows
_
t+t
t
T
P
dt = [T
P
+ (1 )T
o
P
]t
11
_
t+t
t
T
E
dt = [T
E
+ (1 )T
o
E
]t
and
_
t+t
t
T
W
dt = [T
W
+ (1 )T
o
W
]t
where the weighing factor is a pure number with 0 1.
Introducing the above, the integrated heat equation then nally becomes
x
t
(T
P
T
o
P
) = [
k
e
(T
E
T
P
)
x
e

k
w
(T
P
T
W
)
x
w
] +
+(1 )[
k
e
(T
o
E
T
o
P
)
x
e

k
w
(T
o
P
T
o
W
)
x
w
]
Rearrangement gives
a
P
T
P
= a
E
[T
E
+ (1 )T
o
E
] + a
W
[T
W
+ (1 )T
o
W
] +
+[a
o
P
(1 )a
E
(1 )a
W
]T
o
P
where
a
E
=
k
e
x
e
a
W
=
k
w
x
w
a
o
P
= C
p
x
t
and
a
P
= a
E
+ a
W
+ a
o
P
Note that if nite volumes of uniform size are used with nodes at their midpoints, trans-
port properties are assumed constant and = 0 is assumed, the above reduces, after some
rearrangement to
T
P
T
o
P
t
=
k
C
p
T
o
W
2T
o
P
+ T
o
E
x
2
which is identical to the result obtained earlier using the nite dierence method with forward
dierencing in time.
12
4.2 More General Boundary Conditions for a Slab
Dirichlet conditions are easy to implement as the value of the temperature at a boundary
is specied. For more general boundary conditions, such as specied ux (Newmann) and
relationships between the ux and the boundary temperature the following approach is used.
While for interior nite volumes, their representative nodes are located in the interior of the
volume, the boundary nodes are envisioned as located on the outer edge of the boundary
volume. Hence the volume of the resulting nite volume is A
x
2
where A is the (unit) area
normal to the direction of heat ow (x). Next, one performs dierential energy balances on
the boundary volumes.
Specically, with the above boundary conditions, for x = 0
E
in
= E
out
+ E
acc
where E
in
, E
out
and E
acc
are, respectively, energy into the volume (at x = 0), energy out (at
x =
x
2
) and energy accumulated inside the element. Introducing the expressions for these
energies in terms of the temperature yields the following explicit formula
0 = k
T
2,j
T
1,j
x
At + C
p
(T
1,j+1
T
1,j
)A
x
2
Rearrangement gives
T
1,j+1
= T
1,j
+ 2
t
x
2
(T
2,j
T
1,j
)
Now for x = L
E
in
= E
out
+ E
acc
where E
in
, E
out
and E
acc
are, respectively, energy into the volume (at x = L
x
2
), energy
out (at x = L) and energy accumulated inside the element. Introducing the expressions for
these energies in terms of the temperature yields the following explicit formula
k
T
N,j
T
N1,j
x
At = h(T
N,j
T

)AtC
p
(T
1,j+1
T
1,j
)A
x
2
Rearrangement gives
T
N,j+1
= T
N,j
+ 2
t
x
2
[T
N1,j
T
N,j
(1 + x
h
k
) + T

(x
h
k
)]
These formulae are identical to that obtained using the ghost node approach. Corresponding
expressions for an implicit scheme are also readily obtained.
13
4.3 More General Boundary Conditions for the Cylinder
In the FVM, the condition
k
T
r
= 0
at the center of a solid cylinder is represented by the energy balance
E
in
= E
out
+ E
acc
= 0 = k
T
2,j
T
1,j
r
At + C
p
(T
1,j+1
T
1,j
)V
where A = r and V = r
2
/4. Rearranging yields
T
1,j+1
= T
1,j
+ 4
t
r
2
(T
2,j
T
1,j
)
which is identical to the expression obtained in the FDM using the ghost node approach.
Now, the boundary condition at the surface of the cylinder r = a
k
T
r
= h(T T

)
is represented by the energy balance E
in
= E
out
+ E
acc
as follows
k
T
N,j
T
N1,j
r
2a
m
t = h(T
n,j
T

)2at + C
p
(T
N,j+1
T
N,j
)(a
2
a
2
m
)
where a
m
= a r/2. Rearranging yields
T
N,j+1
= T
N,j
+ 2
t
r
2
[(
a
m
a
)T
N1,j
T
N,j
(
h
k
)r(T
N,j
T

)]
which is almost identical to the formula obtained in the FDM using the ghost node approach.
4.4 Transient Conduction in Multidimensional Systems
Consider the problem of estimating the temperature T(x, y, z, t) in a three-dimensional brick
x [0, X], y [0, Y ], z [0, Z] undergoing transient heat conduction with constant internal
heat generation. The heat equation for this case is
C
p
T
t
=

x
(k
T
x
) +

y
(k
T
y
) +

z
(k
T
z
) + g
subject to specied conditions at the boundaries of the domain.
The nite volume formulation regards the brick as composed of a set of adjoining volumes
each containing a node. The dimensions of the typical volume are x y z and the
14
typical node P has six neighbors E, W, N, S, T and B. Proceeding exactly as above, the
nite volume method produces the following result (with = 1)
a
P
T
P
= a
E
T
E
+ a
W
T
W
+ a
N
T
N
+ a
S
T
S
+ a
T
T
T
+ a
B
T
B
+ b
where
a
E
=
k
e
yz
x
e
a
W
=
k
w
yz
x
w
a
N
=
k
n
zx
y
n
a
S
=
k
w
zx
y
s
a
T
=
k
t
xy
z
t
a
B
=
k
b
xy
z
b
a
o
P
= C
p
xyz
t
b = gxyz + a
o
P
T
o
P
and
a
P
= a
E
+ a
W
+ a
N
+ a
S
+ a
T
+ a
B
+ a
o
P
Note that all the above expressions can all be generically written as
a
p
T
P
=

a
nb
T
nb
+ b
where the summation contains just T
E
and T
W
in the case of uni-dimensional systems,
contains T
E
, T
W
, T
N
and T
S
in the case of 2D systems and all T
E
, T
W
, T
N
, T
S
, T
T
and T
B
in
the case of three dimensional systems.
15
The discrete equation derived using the FV method can be rearranged for = 1 to
produce a very appealing and physically meaningful expression. Consider two dimensional
systems. The generic discrete form of the conservation equation is

P
(
P

o
P
)
V
t
= J
w
A
w
J
e
A
e
+ J
s
A
s
J
n
A
n
+ gV
where the dependent variable
i
is the temperature T, for heat transfer and the concentration
c, for mass transfer. Further, the J
i
s are the uxes of the transported quantity and the A
i
s
are the cross-sectional areas of the nite volume faces through which the transported quantity
enters/leaves the nite volume. Therefore the products J
i
A
i
are the rates of transport of
energy or mass through the various control volume faces. Moreover, = C
p
for heat transfer
and = 1 for mass transfer. The transport rates are given as
J
e
A
e
= [(
x
e

P
) + (
x
e+

E
)]
1
(
P

E
)A
e
J
w
A
w
= [(
x
w

W
) + (
x
w+

P
)]
1
(
W

P
)A
w
J
n
A
n
= [(
y
n

P
) + (
y
n+

N
)]
1
(
P

N
)A
n
J
s
A
s
= [(
y
s

S
) + (
y
s+

P
)]
1
(
S

P
)
where
i
= k
i
for heat transfer and = D for mass transfer.
Many special forms can be obtained by simplication of the above. For instance, for a
rectangle with constant thermal properties, without internal heat generation at steady state
and using x = y one obtains
T
P
=
1
4
[T
E
+ T
W
+ T
N
+ T
S
]
which is identical to the expression obtained before using the method of nite dierences.
5 Solution of Transient Heat Conduction Problems by
the Finite Element Method
To describe the nite element methodology fro transient problems it is convenient to review
the steady state problem rst.
16
5.1 Steady State Conduction
Recall the case of one-dimensional steady heat conduction with internal heat generation
inside a slab, i.e.

d
dx
(k
dT
dx
) = g (1)
in 0 x 1 and subject to the boundary conditions T(0) = T(1) = 0.
The Galerkin nite element method requires consideration of the variational statement
of the problem. This is obtained by taking scalar product of the (approximated) energy
equation with a smooth function v(x), i.e.
_
1
0

d
dx
(k
dT
dx
)vdx =
_
1
0
k
dT
dx
dv
dx
dx =
_
1
0
gvdx = (2)
where the term on the left hand side has been integrated by parts.
In the Galerkin formulation of the nite element method, the domain 0 x 1 is rst
subdivided into a set of N intervals (nite elements) of size x connected at their ends
(nodes). For each node i, introduce the following global shape function of position

i
(x) =
_

_
0 0 x x
i1
xx
i1
x
x
i1
x x
i
x
i+1
x
x
x
i
x x
i+1
0 x
i+1
x 1
(3)
Since the global functions constitute an orthogonal set, they serve as a basis from which
one can express the desired approximation as
T(x)
N+1

j=1
T
j

j
(x) (4)
where the coecients T
j
are the simply the values of T at the nodes j = 2, ..., N. Note that
the equations for nodes 1 and N + 1 are not needed since the values at those locations are
specied. Furthermore the function v is selected to be a simple linear combination of the
shape functions, i.e.
v(x) =
N+1

j=1

j
(x) (5)
Introducing the above into the variational statement of the problem nally yields
k
(x)
2
(T
i1
+ 2T
i
T
i+1
) = g (6)
which is simply a tridiagonal system of linear algebraic equations for i = 2, 3, ..., N. Note
in this case, this is exactly the same result obtained using the nite dierence or the nite
volume methods.
17
Using matrix notation, the above result is written as
KT = f (7)
where K is the global conductance matrix (analogous to the global stiness matrix in struc-
tural mechanics nite element analysis) given as
K =
_
_
_
_
_
_
_
K
1
11
0 0 0 . .
K
1
21
(K
1
22
+ K
2
11
) K
2
12
0 . .
0 K
2
21
(K
2
22
+ K
3
11
) K
3
12
0 .
0 0 K
3
21
(K
3
22
+ K
4
11
) K
4
12
0
0 . . . . .
_
_
_
_
_
_
_
(8)
The entries K
i
11
, K
i
12
, K
i
21
, and K
i
22
are the components of the element conductance matrix
for the i-th element, i.e.
K
i
=
_
K
i
11
K
i
12
K
i
21
K
i
22
_
=
k
(x)
2
_
1 1
1 1
_
(9)
Further, T is the vector of nodal temperatures,
T =
_
T
2
, T
2
, .., T
N
_
T
(10)
and f is the forcing vector.
f =
_
g, g, ..., g
_
T
(11)
5.2 Transient Conduction in a Slab
Now, let us consider how to modify the above formulation in order to be able to apply
the nite element method to the solution of transient problems. As a specic illustration
consider the problem of one-dimensional, transient heat conduction without internal heat
generation through a plane wall of thickness L = 1 with constant thermal properties and
internal heat generation. The heat equation is
C
p
T
t
= k

2
T
x
2
+ g (12)
The problem is to be solved subject to the boundary conditions
T(0, t) = T(1, t) = 0 (13)
and the initial condition
T(x, 0) = T
0
(14)
18
As before, the Galerkin nite element method subdivides the domain 0 x 1 into a
set of N intervals (nite elements) of representative size h = x connected at their ends
(nodes). For each node i, the global shape function is

i
(x) =
_

_
0 0 x x
i1
xx
i1
x
x
i1
x x
i
x
i+1
x
x
x
i
x x
i+1
0 x
i+1
x 1
(15)
The set of
i
s is used to construct the approximation to T
h
(x, t) as before
T
h
(x, t) =
n

j=1
T
j
(t)
j
(x) (16)
where the coecients T
j
are the (approximate) values of T at the nodes j = 2, ..., N. Note
that the Galerkin formulation separates the dependency of the problem on t from that of x
through the use of the shape functions. Note also that the equations for nodes 1 and N + 1
are also not needed here as the values of temperature at those locations are given. Moreover,
v(x) =
N+1

j=1

j
(x) (17)
The Galerkin method is based in the weighed minimization of the residual R = C
p
T
t

kT
xx
g by constructing the scalar product (R,
i
) of the (approximated) energy equation
with the shape functions, i.e.
(R,
i
) =
_
1
0
_
t
0
[C
p
T
t
k

2
T
x
2
g]
i
(x)dxdt = 0 (18)
Note that the scalar product now involves integration over time as well as over space.
The same value of the integral is obtained if one rst integrates over the interval [x
i1
, x
i+1
],
for all i and then collects all the resulting integrals, i.e.
n

i=1
_
x
i+1
x
i1
_
t
0
[C
p
T
t
k

2
T
x
2
g]
i
(x)dxdt = 0 (19)
Using the selected expressions for T
h
and v, this reduces to
n

i=1
_
x
i+1
x
i1
_
t
0
[C
p
dT
j
(t)
dt

j
(x)
i
(x) T
j
(t)k
d
2

j
(x)
dx
2
)
i
(x) g
i
(x)]dxdt = 0 (20)
Performing the indicated integrals this can nally be written using matrix notation as a
set of dierential-algebraic equations for the unknown T
i
s, i.e.
C
dT
dt
+KT = f (21)
19
where C is the global capacitance matrix given by
C = C
ij
=
_
1
0
C
p

i
dx (22)
Moreover, K, T and f are, respectively, the global conductance matrix, the vector of nodal
temperatures and the forcing vector and they all have the same form obtained for the steady
state case.
In order to solve the resulting system of dierential-algebraic equations, consider the
following generic implicit approximation with parameter such that 0 1,
C(
T
t+t
T
t
t
) +K(T
t+t
+ (1 )T
t
) = f (23)
For any value of a system of algebraic equations has to be solved. Note that = 0
corresponds to an explicit method, = 1 to a fully implicit method and = 0.5 corresponds
to a semi-implicit (Crank-Nicolson-type) method.
As in the steady case, introduction of the boundary conditions requires modication of
the nite element equations for the boundary nodes.
5.3 Multidimensional Systems
Again, it is useful to reconsider the steady state case rst.
5.4 Steady State Conduction
Consider a three dimensional body occupying the volume , inside which heat is generated
at a rate g and whose outer surface is subjected to homogeneous Dirichlet conditions at
its boundary. The heat equation is
(kT) = g
on and the boundary condition is T = 0 on .
The variational statement of the above problem involves the multiplication of the govern-
ing equation by the smooth function of the spatial coordinates v(x), then integrating over
the domain, i.e.
_

(k
2
T)vd =
_

gvd =
_

kTvd =
_

gvd
In the Galerkin formulation of the nite element method the domain is rst subdivided
into a number of regions with simple polygonal shape (representative element size h) and
the desired approximation to the temperature T
h
(x) is expressed as a linear combination of
the nodal values T
i
; i = 1, 2, ..., N, by means of global nite element basis functions, i.e.
T
h
(x) =
N

i=1

i
(x)T
i
= T
20
where N is the number of nodes in the nite element mesh and where and and T are,
respectively, the global basis function matrix and the vector of nodal temperatures. Fur-
thermore, the function v is selected to be equal the linear combination of the global basis
functions, i.e.
v(x) =
N

i=1
(x)
Substituting the above into the variational formulation yields the nite element equation
KT = f
where the stiness matrix is given by
K =
_

B
T
DBd
where
B =
_

1
x

2
x
...

N
x

1
y

2
y
...

N
y

1
z

2
z
...

N
z
_

_
and
D =
_

_
k 0 0
0 k 0
0 0 k
_

_
and the force vector is
f =
_

g
T
d
In order to assure convergence of the nite element model as the element size decreases the
basis functions must satisfy the standard requirements of compatibility and completeness, i.e.
the basis functions selected must provide for continuity of the temperature at the interface
between any two elements as well as for the continuity of temperature and heat ux inside
each element. Standard polynomials of order n satisfy the requirement.
5.5 Transient Conduction
Consider now instead the transient problem in , consisting of determining the function
T(x, t) that satises
C
p
T
t
(kT) = g
21
subject to homogeneous Dirichlet conditions at the boundary (i.e. T = 0 on .
Proceeding as in the steady state case, multiply the above by a suitably smooth function
v(x) and integrate over to obtain
_

C
p
T
t
vd
_

(k
2
T)vd =
_

gvd =
=
_

C
p
T
t
vd +
_

kTvd =
_

gvd
By introducing the representations
T
h
(x) =
N

i=1

i
(x)T
i
= T
and
v(x) =
N

i=1
(x)
One obtains the dierential-algebraic system
C
dT
dt
+KT = f (24)
where C is the global capacitance matrix given by
C = C
ij
=
_

C
p

i
d (25)
and K, T and f are, respectively, the global conductance matrix, the vector of nodal tem-
peratures and the forcing vector and they all have the same form obtained for the steady
state case.
As in the one dimensional setting, a generic implicit solution scheme for the resulting
system of dierential-algebraic equations involves the parameter such that 0 1,
C(
T
t+t
T
t
t
) +K(T
t+t
+ (1 )T
t
) = f (26)
22

Vous aimerez peut-être aussi