You are on page 1of 7

Galerkin Finite Element Model

for Heat Transfer Problem


Introductory Course on Multiphysics Modelling
TOMASZ G. ZIELI

NSKI
Contents
1 Notation preliminaries 1
2 Local differential formulation 2
2.1 Partial Differential Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Initial and boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.3 Initial-Boundary-Value Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Global integral formulations 3
3.1 Test functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2 Weighted formulation and weak variational form . . . . . . . . . . . . . . . . 4
4 Matrix formulations 4
4.1 Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.2 Transient heat transfer (ordinary differential equations) . . . . . . . . . . . . 5
4.3 Stationary heat transfer (algebraic equations) . . . . . . . . . . . . . . . . . . 6
1 Notation preliminaries
The index notation is used with the summation over the index i. Obviously, i =1 in
1D, i =1, 2 in 2D, and i =1, 2, 3 in 3D.
Consequently, the summation rule is also used for the approximation expressions,
that is, over the indices r, s =1, . . . N (N is the number of degrees of freedom).
The symbol (. . .)
|i
means a (generalized) invariant partial differentiation over the
i-th coordinate:
(. . .)
|i
=
(. . .)
x
i
.
The invariancy involves the so-called Christoffel symbols (in the case of curvilinear
systems of reference).
1
(ICMM Lecture) Galerkin FEM for Heat Transfer Problem 2
Symbols dV and dS are completely omitted in all the integrals presented below
since it is obvious that one integrates over the specied domain or boundary. There-
fore, one should understand that:
_
B
(. . .) =
_
B
(. . .) dV(x) ,
_
B
(. . .) =
_
B
(. . .) dS(x) .
2 Local differential formulation
2.1 Partial Differential Equation
B
(, c, k)
B
n
heat source
f >0
heat sink
f <0
T
x
n<0
(cold)
T
x
n>0
(warm)
Material data
=(x) the density
_
kg
m
3
_
c = c(x) the thermal capacity
_
J
kgK
_
k = k(x) the thermal conductivity
_
W
mK
_
Known elds
f = f (x, t) the heat production rate
_
W
m
3
_
u
i
= u
i
(x, t) the convective velocity
_
m
s
_
The unknown eld
T =T(x, t) =? the temperature
_
K
_
Heat transfer equation
c

T+q
i|i
f =0 where the heat ux vector
_
W
K
_
:
q
i
= q
i
(T) =
_
_
_
kT
|i
for conduction (only),
kT
|i
+c u
i
T for conduction and convection,
and

T =
T
t
is the time rate of change of temperature
_
K
s
_
.
2.2 Initial and boundary conditions
The initial condition (at t = t
0
)
T(x, t
0
) =T
0
(x) in B
Prescribed eld:
T
0
=T
0
(x) the initial temperature
_
K
_
The boundary conditions (on B=B
T
B
q
)
the Dirichlet type:
T(x, t) =

T(x, t) on B
T
(ICMM Lecture) Galerkin FEM for Heat Transfer Problem 3
the Neumann type:
q
i
_
T(x, t)
_
n
i
= q(x, t) on B
q
Prescribed elds:

T =

T(x, t) the temperature on the boundary
_
K
_
q = q(x, t) the inward heat ux
_
W
m
2
_
For the sake of brevity, the Robin boundary condition is omitted. Usually, this condi-
tion is applied (in FEM) by means of the Lagrange multipliers.
2.3 Initial-Boundary-Value Problem
IBVP of the heat transfer
Find T = T(x, t) for x B and t [t
0
, t
1
] satisfying the equation of heat transfer by
conduction (a), or by conduction and convection (b):
c

T+q
i|i
f =0 where q
i
= q
i
(T) =
_
_
_
kT
|i
(a)
kT
|i
+c u
i
T (b)
(1)
with the initial condition (at t = t
0
):
T(x, t
0
) =T
0
(x) in B, (2)
and subject to the boundary conditions:
T(x, t) =

T(x, t) on B
T
, q
i
_
T(x, t)
_
n
i
= q(x, t) on B
q
(3)
where B
T
B
q
=B and B
T
B
q
=.
3 Global integral formulations
3.1 Test functions
Test function an arbitrary (but sufciently regular) function, T = T(x),
dened in B, which meets the admissibility condition:
T =0 on B
T
. (4)
T(x, t), T(x)
x
B
T
Dirichlet b.c.
T =

T, T =0
B
q
Neumann b.c.

T
solution and trial functions, T
test functions, T
Figure 1: Test and trial functions.
(ICMM Lecture) Galerkin FEM for Heat Transfer Problem 4
Notice that test functions are always time-independent (even for time-dependent
problems since this approximation concerns only space).
3.2 Weighted formulation and weak variational form
The heat transfer PDE is multiplied by a test function T and integrated over the do-
main B to obtain the weighted integral formulation

_
B
c

TT+
_
B
q
i|i
T
_
B
f T =0 (for every T) (5)
The term q
i|i
introduces the second derivative of T: q
i|i
= kT
|ii
+. . . . How-
ever, the heat PDE needs to be satised in the integral sense. Therefore, the
requirements for T can be weaken as follows.
Integrating by parts (using the divergence theorem)
_
B
q
i|i
T =
_
B
(q
i
T)
|i

_
B
q
i
T
|i
=
_
B
q
i
T n
i

_
B
q
i
T
|i
(6)
Using the Neumann boundary condition (3)
2
and the property of test function (4)
2
_
B
q
i
n
i
T =
_
B
q
q
i
n
i
. .
q
T+
_
B
T
q
i
n
i
T
..
0
=
_
B
q
qT (7)
Weak variational form is obtained

_
B
c

TT
_
B
q
i
T
|i

_
B
q
qT
_
B
f T =0 (for every T) (8)
Now, only the rst order spatial-differentiability of T is required.
In this formulation the Neumann boundary condition is already met (it has been used in
a natural way). Therefore, the additional requirements are only: the Dirichlet boundary
condition (3)
1
and the initial condition (2).
4 Matrix formulations
4.1 Approximation
The spatial approximation of solution in the domain B is accomplished by a linear com-
bination of (global) shape functions,
s
=
s
(x),
T(x, t) =
s
(t)
s
(x) (s =1, . . . N) (9)
where
s
(t)
_
K
_
are (time-dependent) coefcients the degrees of freedom (N is the
total number of degrees of freedom). Consistent result is obtained now for the time rate
of temperature

T(x, t) =

s
(t)
s
(x) where

s
(t) =
d
s
(t)
dt
_
K
s
_
. (10)
(ICMM Lecture) Galerkin FEM for Heat Transfer Problem 5
Distinctive feature of the Galerkin method:
the same shape functions are used to approximate the solution as well as the
test function
T(x) =
r

r
(x) (r =1, . . . N) . (11)
However, the test functions are time-independent (even for non-stationary problems) so
the coefcients
s
will be always numbers. Moreover, the approximation (11) must sat-
isfy the admissibility condition which is achieved easily in case of FEM, where the de-
grees of freedom are values in nodes some of which lie on the boundary.
4.2 Transient heat transfer (ordinary differential equations)
To reduce the regularity requirements for solution the approximations
T =
s

s
_

T =

s
_
, T =
r

r
(12)
are used for the weak variational form of the heat transfer problem
_
B
c

TT
_
B
q
i
T
|i

_
B
q
qT
_
B
f T =0. (13)
This substitution is carried out below successively for all four integral terms of the
weak form.
1.
_
B
c

TT =

r
_
B
c
s

r
=

r
M
rs
2.
_
B
q
i
T
|i
=
_
B
_
kT
|i
+c u
i
T
_
T
|i
=
s

r
_
B
_
k
s|i
+c u
i

s
_

r|i
=
s

r
K
rs
3.
_
B
q
qT =
r
_
B
q
q
r
=
r
Q
r
4.
_
B
f T =
r
_
B
f
r
=
r
F
r
During the procedure, coefcient matrices and right-hand-side vectors are dened so
the nal result can be presented in the compact form as follows.
Matrix formulation of the heat transfer problem
_
M
rs

s
K
rs

s
(Q
r
+F
r
)
_

r
=0 for every admissible
r
. (14)
This produces the following system of rst-order ordinary differential equations (for

s
=
s
(t) =?):

M
rs

s
K
rs

s
=(Q
r
+F
r
) (r, s =1, . . . N). (15)
This system can now be solved numerically using implicit or explicit time integration
procedures where initial condition (2) will be required. Moreover, the Dirichlet boundary
(ICMM Lecture) Galerkin FEM for Heat Transfer Problem 6
condition (3)
1
must be used (in a standard way, for FEM) rendering the system uniquely
solvable.
The coefcient matrices and right-hand-side vectors can be assigned physical mean-
ings:
M
rs
=
_
B
c
s

r
the thermal capacity matrix
_
J
K
_
,
K
rs
=
_
B
_
k
s|i
+c u
i

s
_

r|i
the heat transfer matrix
_
W
K
_
,
Q
r
=
_
B
q
q
r
the inward ow of heat vector
_
W
_
,
F
r
=
_
B
f
r
the heat production vector
_
W
_
.
Note that in the case of heat transfer by convection a time-variant convective velocity,
u
i
= u
i
(t), results in a time-dependent heat transfer matrix, K
rs
=K
rs
(t). Convection with
a constant velocity renders this matrix time-independent.
4.3 Stationary heat transfer (algebraic equations)
For stationary heat transfer all elds do not depend on time but only on the spatial
independent variables
T =T(x) , f = f (x) , u
i
= u
i
(x) (for x B) . (16)
This means that heat ow by convection must be with a constant convective velocity.
These assumptions lead to the following
BVP of stationary heat ow: Find T =T(x) satisfying (in B)
q
i|i
f =0 where q
i
= q
i
(T) =
_
_
_
kT
|i
(no convection)
kT
|i
+c u
i
T (with convection)
(17)
with boundary conditions: T =

T on B
T
(Dirichlet), and q
i
(T) n
i
= q on B
q
(Neumann).
Consequently:
The weak variational form lacks the rate integrand

_
B
q
i
T
|i

_
B
q
qT
_
B
f T =0. (18)
(ICMM Lecture) Galerkin FEM for Heat Transfer Problem 7
The approximations T(x) =
s

s
(x), T(x) =
r

r
(x) (where both
s
and
r
are
number values) lead to the following system of linear algebraic equations (for

s
=?):

K
rs

s
=(Q
r
+F
r
) (r, s =1, . . . N). (19)
This result can be obtained directly from (15) by applying

s
= 0. To solve that
system the Dirichlet boundary condition will also be used.

You might also like