Professional Documents
Culture Documents
2.1 One-Dimensional Steady-State Heat Conduction
2.1 One-Dimensional Steady-State Heat Conduction
2.1 One-Dimensional Steady-State Heat Conduction
or
w D ¿ï8ªN¤-7
!
1 î ! x
where is temperature, ï28ªN¤ the heat sink and î the thermal conductivity (ð3ñUò¤òYá
ÎuóôÎ6õö ).
Consider the case where ï
w D
1 ! î ! x ¿v7 7Ìt§Ì/ (2.1)
3. Introduce the finite element approximation for the temperature field with nodal parameters
and element basis functions.
4. Integrate over the elements to calculate the element stiffness matrices and RHS vectors.
û( w D ý ýÕÿ
1 î !«7
¿
¼ þ ! ! x
(2.5)
formula
û( ( û(
¼ ! !£# ¼ 1 ¼
! !
gives
û( ý w ý w ( û( w ý
! 1î ,DÓx ! 1}î D!q
x 1 1î D, D@x !
¼ ¼ ¼
and Equation (2.5) becomes
û ( w , ý ý
D ý (
î D D ¿ x ! î ! (2.6)
¼ ¼
2.1.3 Finite element approximation
We divide the domain 7aÌÑÌ / into 3 equal length elements and replace the continuous field
variable within each element by the parametric finite element approximation
û( û û û(
!« D ! !
¼ Ä ¼ Ä
Ä
Ä
1
Boris G. Galerkin (1871-1945). Galerkin was a Russian engineer who published his first technical paper on the
buckling of bars while imprisoned in 1906 by the Tzar in pre-revolutionary Russia. In many Russian texts the Galerkin
finite element method is known as the Bubnov-Galerkin method. He published a paper using this idea in 1915. The
method was also attributed to I.G. Bubnov in 1913.
26 S TEADY-S TATE H EAT C ONDUCTION
ûø û(
!` D*
Ä ¼ Ä
ø
where ¹ !D*¾¹ is the Jacobian of the transformation
from coordinates to * coordinates.
¹¹ ¹¹
¹ ¹
2.1.4 Element integrals
The element integrals arising from the LHS of Equation (2.6) have the form
û ( w D ý ý
î ! ! 5 x !* (2.7)
ý ¼
where ` = EuFE and = . Since = E and = are both functions of * the derivatives with respect
to need to be converted to derivatives with respect to * . Thus Equation (2.7) becomes
û ( w = D* = E !*
E î !* ! !* ! == E x D* (2.8)
¼
Notice that FE has been taken outside the integral because it is not a function of * . The term
D* is
/ !
evaluated by substituting the finite element approximation *,Ö = E4#nE . In this case i * or
!* ;i and the Jacobian is ! ( . The term multiplying the nodal parameters FE is called
D !* "
the element stiffness matrix, E
û ( w = !* = E D* û ( w = = E
EQ î !* ! !* ! =Ö= E x !*Õ î D* i D* i¾ =Ö= E x i/ D*
¼ ¼
where the indices and G are / or j . To evaluate E we substitute the basis functions
= ()B*D-$/213* = (
or
!*= r 1Q/
= B *D-{* /
or
!* r
2 .1 O NE -D IMENSIONAL S TEADY-S TATE H EAT C ONDUCTION 27
Node 1 2 3 4
Node 1
X X 0 0 U( X
Node 2
X X X 0 U
X
=
Node 3
0 X X X U
" X
Node 4
0 0 X X Ul X
F IGURE 2.1: The rows of the global stiffness matrix are generated from the global weight
functions. The bar is shown at the top divided into three elements.
Thus,
/ û( é w = ( / û( é / wé /
(z(k =
î D*x (s D*Q i ÷ î01Q/P s/213*, ú!*Q i î i)x
i ¼ ¼
and, similarly, ²
w
/ 1 é Õî /
( (-
w i x
/ é /
z i î i)x
( é î ( ú ( 1 é îÕ ( ú
EQ
( " ÷1 é îÕ " ( ú " ( ÷ é î ( ú
" ÷ " ÷ "¬
¬
Notice that the element stiffness matrix is symmetric. Notice also that the stiffness matrix, in this
particular case, is the same for all elements. For simplicity we put înr/ in the following steps.
2.1.5 Assembly
The three element stiffness matrices (with î / ) are assembled into one global stiffness matrix.
This process is illustrated in Figure 2.1 where rows /6N%#ä# NYh of the global stiffness matrix (shown here
multiplied by the vector of global unknowns) are generalised from the weight function associated
with nodes /!N%# # NYh .
Note how each element stiffness matrix (the smaller square brackets in Figure 2.1) overlaps
28 S TEADY-S TATE H EAT C ONDUCTION
with its neighbour because they share a common global node. The assembly process gives
µ ±
1µ ( µ" µ
!#" #! "
± 7± 7 " Hk( "
1 ( "µ ±
µ 1 ( µ" µ 7 ± µ $ H $
7 1 ( "µ
± 1 µ( " H "
7 1 ( µ"
7 H]l
Notice that the first row (generating heat flux at node / ) has zeros multiplying H and HOl since
"
nodes i and h have no direct connection through the basis functions to node / . Finite element
matrices are always sparse matrices - containing many zeros - since the basis functions are local
to elements.
The RHS of Equation (2.6) is
D ý ø ( w D ý w D ý
î ! î ! x ¹ 1 î ! x ¹ (2.9)
¼ ø ( ¼
¹¹ ø ý ¹¹ ø
ý consider the weighting¹ function corresponding
¹
To evaluate these expressions
(see Fig.1.6). For node / ( ý is obtained from the basis function
ý = to each global node
( associated with the first node
ý element / and therefore (&% ¼ / . Also, since ( is identically zero outside element / ,
('% ( 7 . Thus Equation (2.9)ø for node / reduces to
of
ø
D ý ø ( w D
î ! ( r1 î !qx ¹ = flux entering node / .
ø ¼ ¹¹ ø ¼
Similarly, ¹
D ý ø (
î ! E 7 (nodes j and i )
ø ¼
and
, ý ø ( w D
î D l î !qx ¹ = flux entering node h .
ø ¼ ¹¹ ø (
¹
Note: î has been left in these expressions to emphasise that they are heat fluxes.
Putting these global equations together we get
w D
!"
µ ± !#" !#"
1
î !qx ¹ """
± 1µ ( µ" µ 7± 7 " Hk( " ¼ "
7 ¹¹¹ ø "
1 ( "µ ± µ 1 ( "µ µ 7 ± H
7 1 ( "µ ± 1 µ ( " µ $ H "$ w D 7
(2.10)
7 7 1 ( µ" ]H l î !qx ¹
$
¹¹ ø (
or (*) ¹
,+
2 .1 O NE -D IMENSIONAL S TEADY-S TATE H EAT C ONDUCTION 29
( )
where is the global “stiffness” matrix, the vector of unknowns and + the global “load” vector.
Note that if the governing differential equation had included a distributed source term that was
independent of , this term would appear - via its weighted integral - on the RHS of Equation (2.10)
rather than on the LHS as here. Moreover, if the source term was a function of , the contribution
from each element would be different - as shown in the next section.
2.1.8 ² Fluxes
The fluxes at nodes / and h are evaluated by substituting the nodal solutions Hk(q7 , H
6¶ ¶
H v7# 7 é!¶ and HOlr/ into Equation (2.10) ² 74#Sj ,
" w D
flux entering node /¾r1 î !Óxô¹ $1¾7# ¶ h é ( înr/ ; exact solution 7#
¶ 67 é )
w D ¹¹ ø ¼
h î ! x ¹ ¹ $/!#Çi/P ·
flux entering node Q ( înr/ ; exact solution /!#Çi/<i/ )
¹¹ ø (
¹
These fluxes are shown in Figure 2.2 as heat entering node h and leaving node / , consistent with
heat flow down the temperature gradient.
30 S TEADY-S TATE H EAT C ONDUCTION
/ /!#Çi/P ·
²
7# 7 é6¶
² 7#Sj !¶ ¶
74# ¶ h é (
7 " " /
F IGURE 2.2: Finite element solution of one-dimensional heat equation.
û ( w D ý ý
D ý ( û( ý
î ! ! ¿ x D` î ! ! (2.11)
¼ ¼ ¼
where the -dependent source term appears on the RHS because it is not dependent on . Replacing
the domain integral for this source term by the sum of three element integrals
û( ý û ý û ý û( ý
D` ! ! !
¼ ¼
ý
where
(
is chosen to be the appropriate basis function within each element. For example, the first
û( /
é @* 0/21a*,Â!*Q u/ h
¼
and
û( /
é * !*Q j / ·
¼
± (l
Thus, the contribution to the element / RHS vector from the source term is (´ .
Similarly, for element j ,
û( / j· û( /
´
é 0 /Ó5*,ys/213*,!*Q j and é 0 Ö
/ °
,
* C
-
* D* Q uh gives ± ± l
¼ ¼
and for element i ,
û( / · û( /
± ´ l±
é Àj25*,ys/213*,!*Q U h and é À j@°*,C*-D*Q u h gives ±l
¼ ¼
Assembling these into the global RHS vector, Equation (2.10) becomes
w D !"
±
µ ± µ !#" !#"
1 î "
"
± (l !#"
1 ± (" 7± 7 " Hk( " !qx ¹¹ ø ¼ "" "
±± ( ´
1 ( "µ ± 1 ± ( µ" 7 ± H 7 ¹¹ " ´ ´
¬ µ
7 1 ( " ± 1 µ( " H " µ $ $
w , 7 l ± ± l $
7 7 1 (" ¬ µ H]l $ ±l
î Dqx ¹
¹¹ ø (
¹
2.3 The Galerkin Weight Function Revisited
A key idea in the Galerkin finite element method is the choice of weighting functions which are
orthogonal to the equation residual) (thought of here as the error or amount by which the ) equation
)
/102/
fails to 02
be/ exactly zero). This idea is illustrated in Figure 2.3.
In Figure 2.3a an exact vector V (lying in 3D space) )4 is3 approximated by a vector )
where is a basis vector along the first coordinate axis (representing one degree of freedom
in the system). The difference between the exact vector and the approximate vector is the
32 S TEADY-S TATE H EAT C ONDUCTION
=
(a) (b)
" (c)
"
ü = ü
V
)
)( = ( ) )
where î NîA@ and îCB are the thermal diffusivities along the , ¦ and É axes respectively. If the
ø
material is assumed to be isotropic, î î2
@ îÂB î , and the above equation can be written as
ø
1ED ÀîFDn-7 (2.13)
Ä
and, if î is spatially constant (in the case of a homogeneous material), this reduces to Laplace’s
equation îFD ¨7 . Here we consider the solution of Equation (2.13) over the region G , subject
to boundary conditions on H (see Figure 2.4).
Solution region: G
[ [
Ý ^ _
¸ ^ ¸
I
" I l
] ]
_
¸ [( ³^ [(
^ ^
I l
I
" ^
]
³
[ [
I
^ ] ^ ]
³
I ( Þ (
I I
^
^ [( Þ
^ [(
^
F IGURE 2.5: Mapping each I to the [ ( Ûz[ plane in a 2` n element plane.
For each element, the basis functions and their derivatives are:
=
= (k¨0/Â13*u(¢s/21a*
Å *u( ( $ 1s/213* (2.19)
Å= (
Å * $1s/213*u( (2.20)
Å (2.21)
= v =
*U(¢s/Â13* Å *u( $/213* (2.22)
Å= (
Å * $12*u( (2.23)
Å (2.24)
= ¨ =
" 0/Â13*u(z* Å *u( " $12* (2.25)
Å=
Å * " $/213*u( (2.26)
Å (2.27)
=
= lÂv*U(z*
Å *u( l {* (2.28)
Å= l
Å * {*u( (2.29)
Å
36 S TEADY-S TATE H EAT C ONDUCTION
2.6 Integration
The equation is
ûK ý ûR ý
îSDn D G: -î Å G H (2.30)
Ä Å
w ý ý
i.e.,
ûK ûR ý
î Å Å Å ¦
Å ¦ x G: H (2.31) î ÅG
Å Å Å
Å ý Å
u has already been approximated by = E6FE
andý is a weight function but what should this be
chosen to be? For a Galerkin formulation choose = i.e., weight function is one of the basis
functions used to approximate the dependent variable.
This gives
ûK w = E = = E = ûR
FE î Å Å Å ¦ Å ¦ x G : î Å G = H (2.32)
í Å Å Å Å Å
where the stiffness matrix is E where r/!N%#%¥# #¢NYh and G$/6N%#%#%#>NYh and a is the (element)
load vector.
The names originated from earlier finite element applications and extension of spring systems,
i.e., M
a îC where î is the stiffness of spring and a is the force/load.
This yields the system of equations E!FE ba . e.g., heat flow in a unit square (see Fig-
ure 2.6).
¦ B *
/
7 / *u(
F IGURE 2.6: Considering heat flow in a unit square.
2 .7 A SSEMBLE G LOBAL E QUATIONS 37
û(û(
(z(qî
0/213¦ s/21a !£D¦
¼ ¼
ij î
and similarly for the other components of the matrix.
Note that if the element was not the unit square we would need to transform from BªNY¦ to
B*U(N¤* coordinates. In this case we would have to include the Jacobian of the transformation and
=í = = = =
also use the chain rule to calculate Å
. e.g., Å E Å u* (E Å *u ( Å * E Å * Å * íE Å * í .
Å
The system of E!FEÕca becomes
LV
Å Å Å Å Å Å Å
1 ( ( (
!" !"
" ( ( 1 ( ( 1 " ( (
"
" )( "
"
1 " ¬ ( " 1 1 ¬" 1 1( 1 "( "
"
"
"
¬( 1 ( " ¬ ¬(1 " ¬( 1 ( (
"
"
"
" "
1
1( ¬" ( " ( " ( 1 1 1
¬ ( ( ( " ( ( """ 1 Fl " üedgf
1 ( 1 1 ( 1 "( 1 1 (
" " ¬( " ¬( " 1 1 1 ¬" 1 1 ( 1 "( " ± "
"
¬" "
¬1 " ¬ 1 ¬ ( ¬ 1 1( " ¬ " ¬ ¬ 1 "( ¬ 1 " "
¬ 1 ( ¬(1 " ¬( ( " ( 1 ¬ ¬µ´
1 ¬" 1 1( 1 "( 1 " ¬( " 1 ( $ $
¬1 " ¬ 1 ¬ 1 " ¬
¬ ¬ (2.34)
38 S TEADY-S TATE H EAT C ONDUCTION
¦
· ¶ é
h
/ j
/ j i
F IGURE 2.7: Assembling unit sized elements into a global stiffness matrix.
there are only i unknown values of u at nodes (2,5 and 8), therefore there is a i
ji matrix to solve.
The RHS is known at these three nodes (see below). We can then solve the iQj i matrix and then
¶
multiply out the original matrix to find the unknown RHS values.
The RHS is 7 at nodes j and because ûR it isý insulated. To find out what the RHS is at node
we need to examine the RHS expression Å G H $7 at node . This is zero as flux is always
Å
7 at internal nodes. This can be explained in two ways.
¾(
G G
n n
Correct way: H does not pass through node and each basis function that is not zero at is zero
on H
B*D
....
o p *
*U( .... * *
F IGURE 2.9: Gaussian quadrature. q
[U is sampled at r
Y
Gauss points [ ( Ûz[ ~~~0[ ~
Y
û(
Let B*D2!*Q (s*u(> *
¼ k k
û( û( û( û( û(
*,Â!*Q !*¾t *k!*@t * !*@¿ * " !* (2.35)
¼ ¼ ¼ ¼ ¼
Since , , and are arbitrary coefficients, each integral on the RHS of 2.35 must be integrated
exactly. Thus,
û(
D*Q?/ (# /Ó #/ (2.36)
¼ k k
û(
*-D*Q j/ (#»*u() #»* (2.37)
¼ k k
û(
* D*Q i/ (#»* ( #»* (2.38)
¼ k k
û(
* " D*Q h / (#»* (" #»* " (2.39)
¼ k k
These four equations yield the solution for the two Gauss points and weights as follows:
2 .8 G AUSSIAN Q UADRATURE 41
(k /
k k
j#
Then, from (2.37),
* ?/@13*U(
and, substituting in (2.38),
* ( s/Â13*u(s ij
jU* ( 1¿jU*U() i/
7N
giving
*u(- ju/ t j v / i #
Equation (2.39) is satisfied identically. Thus, the two Gauss points are given by
*U(k j/ 1 j v /
iN
* j/ v / N (2.40)
j i
(q j/
k k
A similar calculation for a th
degree polynomial using three Gauss points gives
*U(k j/ 1 xj/ w i N
(k / ¶
k
* j/ N hé (2.41)
k
* " j/ jl/ w iN
" / ¶
k
2 For two- or three-dimensional Gaussian quadrature the Gauss point positions are simply the
values given above along each * í -coordinate with the weights scaled to sum to / e.g., for j x j Gauss
/
quadrature the h weights are all . The number of Gauss points chosen for each * í -direction is
h
governed by the complexity of the integrand in the element integral (2.8). In general two- and three-
dimensional problems the integral is not polynomial (owing to the Å L* Ví terms which come from the
Å
42 S TEADY-S TATE H EAT C ONDUCTION
inverse of the matrix Å * VLí ) and no attempt is made to achieve exact integration. The quadrature
error must be balanced Å against the discretization error. For example, if the two-dimensional basis
is cubic in the *u( -direction and linear in the * -direction, three Gauss points would be used in the
*u( -direction and two in the * -direction.
2. To solve for the steady state temperature distribution inside an annulus run CMISS example
i/Pj
3. To investigate the convergence of the steady state temperature distribution with mesh refine-
ment run CMISS examples i/%h/ , i/%h,j , i/%hDi and i/%h6h .