You are on page 1of 41

Finite Element Method Modeling Dr.

Slim Choura

2
Finite element
analysis of two-
dimensional
Problems


















Finite Element Method Modeling Dr. Slim Choura

Page 47
The objective of this chapter is to extend the basic steps discussed earlier for one-
dimensional problems to two-dimensional boundary-value problems involving a single
dependent variable.

2.1 Boundary Value Problems
2.2 The Model Equation

Consider the problem of finding the solution u of the second-order partial differential
equation

11 12 21 22 00
0
u u u u
a a a a a u f
x x y y x y
| | | |
+ + + =
| |

\ \
(2. 1)

where ( ) 2 , 1 , = j i a
ij
,
00
a and f , and the specified boundary conditions are given. The
Poisson equation corresponds to a a a
22 11
= = and
12 21 00
0 a a a = = = :

( ) a u f = in (2. 2)
where is the gradient operator defined by


x y

= +

i j (2. 3)
2 2
2
2 2
x y


= = +

(2. 4)
with
2
defined as the Laplacian operator, and i

and j

are the unit vectors along the x


and y axes, respectively. Equation (2.2) in the cartesian coordinate system takes the form:

u u
a a f
x x y y
| | | |
=
| |

\
\
(2. 5)

2.2.1 Finite Element Discretization

In two dimensions, there is more than one simple geometric shape that can be used in a
finite element (see figure 2.1). As will be discussed, a triangle is the easiest geometric
shape, followed by a rectangle.
Finite Element Method Modeling Dr. Slim Choura

Page 48









Figure 2.1. A typical triangular element

The general rule of mesh generation for finite element formulations includes the
following:

1. Select elements that characterize the governing equations of the problem.
2. The number, shape, and type of elements should be such that the geometry of the
domain is represented as accurately as desired.
3. The density of elements should be such that regions of large gradients of the
solution are adequately modeled.
4. Mesh refinements should vary gradually from high density regions to low-density
regions. If transition elements are used, they should be used away from critical
regions (i.e., regions of large gradients). Transition elements are those that
connect lower-order elements to higher-order elements (e.g., linear to quadratic).

2.2.2 Weak Form

Integrate the resulting equation over the element domain
e
:
( ) ( )
e
1 2 00
0 w F F a u f dxdy
x y

(
+ =
(


(2. 6)
where

e

ds
e

i


x
y
n



Finite Element Method Modeling Dr. Slim Choura

Page 49
1 11 12 2 21 22

u u u u
F a a F a a
x y x y

= + = +

(2. 7)

In the second step, we distribute the differentiable equally between u and w. First we
note the following identity:

( ) ( )
1 2
1 1 2 2

F F w w
w F wF w F wF
x x x y y y

= =

(2. 8)

Using the gradient (or divergence) theorem:

( )
e e
1 1 x
wF dxdy wF n ds
x


(2. 9)
( )
e e
2 2 y
wF dxdy wF n ds
y


(2. 10)
where
x
n and
y
n are the direction cosines of the unit normal vector


cos sin
x y
n n = + = + i j i j (2. 11)
on the boundary
e
, and ds is the arc length of infinitesimal line element along the
boundary (see figure 2.1). Using (2.8), (2.9) and (2.10) in (2.6) we get

e
e
11 12 21 22 00
11 12 21 22
0

x y
w u u w u u
a a a a a wu wf dxdy
x x y y x y
u u u u
w n a a n a a ds
x y x y

( | | | |
= + + + +
( | |

\ \

( | | | |
+ + +
( | |

\ \


(2. 12)

From the above equation, u is the primary variable and

11 12 21 22 n x y
u u u u
q n a a n a a
x y x y
| | | |
+ + +
| |

\ \
(2. 13)

is the secondary variable of the formulation.

Finite Element Method Modeling Dr. Slim Choura

Page 50
The third and last step is to use the definition (2.13) in (2.13) and write the weak form of
(2.1) as:

e
e
11 12 21 22 00
0=

n
w u u w u u
a a a a a wu wf dxdy
x x y y x y
w q ds

( | | | |
+ + + +
( | |

\ \


(2. 14)
or
( ) ( ) , B w u l w = (2. 15)
where
( )
e
11 12 21 22 00
,
w u u w u u
B w u a a a a a wu dxdy
x x y y x y

( | | | |
= + + + +
( | |

\ \

(2. 16)

( )
e e

n
l w wf dxdy wq ds

=

(2. 17)
The quadratic functional can be obtained when the ( ) , B is symmetric (
12 21
a a = )
( ) ( ) ( )
1
,
2
I u B u u l u = (2. 18)

2.2.3 Finite Element Model

Suppose that u is approximated over a typical element
e
by the expression
( ) ( ) ( )
1
, , ,
n
e e e
j j
j
u x y U x y u x y
=
=

(2. 19)
where
e
j
u is the value of
e
U at the j
th
node
( )
,
j j
x y of the element, and
e
j
are the
Lagrange interpolation functions, with the property

( )
,
e
i j j ij
x y = (2. 20)

Substituting (2.19) into (2.14), we obtain

Finite Element Method Modeling Dr. Slim Choura

Page 51
e
e
11 12
1 1
21 22
1 1
00
1
0

n n
e e
j j
e e
j j
j j
n n
e e
j j e e
j j
j j
n
e e
j j n
j

w
a u a u
x x y

w
a u a u
y x y
a w u wf dxdy w q ds

= =
= =

=
| |

|
= +
|

|

\
| |

|
+ +
|

|
\
(
(
+
(
(


(2. 21)

Since we need n independent algebraic equations to solve for the n unknowns
1 2
, , ... ,
e e e
n
u u u we choose n independent functions for w:
1 1
, , ,
e e e
n
w = . The i
th

algebraic equation is obtained by substituting
e
i
w = into (2.21):

e
11 12 21 22 00
1
0
( 1, 2, , )
e
e
n
e e e e
e e
j j j j e e i i
i j j

j
e e
i i n


a a a a a dxdy u
x x y y x y
f dxdy q ds i n
=


(
| | | |


= + + + + ( | |
`
| |

(
\ \
)
=


(2. 22)
or
1
n
e e e e
ij j i i
j
K u f Q
=
= +

(2. 23)
where

11 12 21 22 00

e
e e
e e e e
e e
j j j j e e e i i
ij i j

e e e e
i i i n i



K a a a a a dxdy
x x y y x y
f f dxdy Q q ds
( | | | |

= + + + + ( | |
| |

(
\ \
= =



(2. 24)
In matrix notation, (2.24) takes the form

{ } { } { }
e e e e
K u f Q ( = +

(2. 25)
Finite Element Method Modeling Dr. Slim Choura

Page 52
Note that
e e
ij ji
K K = only when
12 21
a a = . Equation (2.25) represents the finite element
model of (2.1).

2.2.4 Interpolation Functions

An examination of the variational form (2.14) and the finite element matrices in (2.24)
shows that
e
i
should be at least linear functions of x and y . We shall consider linear
triangular elements and linear rectangular elements.

2.2.4.1. Linear triangular element

Consider the linear approximation

( )
1 2 3
,
e
U x y c c x c y = + + (2. 26)

We must rewrite the approximation (2.26) such it satisfies the conditions


( )
,
e e e e
i i i
U x y u = (2. 27)
where
( )
,
e e
i i
x y (i = 1, 2, 3) are the global coordinates of the three vertices of the triangle
e





Thus,
( )
( )
( )
e
1 1 1 1 2 1 3 1
e
2 2 2 1 2 2 3 2
e
3 3 3 1 2 3 3 3
,
,
,
u U x y c c x c y
u U x y c c x c y
u U x y c c x c y
= + +
= + +
= + +
(2. 28)
In matrix form:
1 1 1 1
2 2 2 2
3 3 3 3
1
1
1
u x y c
u x y c
u x y c
(
(
=
` `
(

(
) )
(2. 29)
1
2
3
Finite Element Method Modeling Dr. Slim Choura

Page 53
Solving for the cs we obtain
( )
( )
( )
1 1 1 2 2 3 3
2 1 1 2 2 3 3
3 1 1 2 2 3 3
1
2
1
2
1
2
e
e
e
c u u u
A
c u u u
A
c u u u
A



= + +
= + +
= + +
(2. 30)
where
1 2 3
2
e
A
+ +
= (2. 31)
is the area of the triangle and
i
,
i
and
i
are the geometric constants

( )
( ) ; and , and permute in a natural order
i j k k j
i j k
i j k
x y x y
y y i j k i j k
x x

=
`

=

)
(2. 32)
Substituting for
i
c from (2.30) into (2.26), we get
( ) ( ) ( ) ( )
( )
1 1 2 2 3 3 1 1 2 2 3 3 1 1 2 2 3 3
3
1
1
,
2
,
e
e
e e
i i
i
U x y u u u u u u x u u u y
A
u x y

=
(
= + + + + + + + +

=


(2. 33)
where
e
i
are the linear interpolation functions for the triangular element
( )
1
( 1, 2, 3)
2
e
i i i i
e
x y i
A
= + + = (2. 34)

The linear interpolation functions
e
i
are shown in figure (2.2). They have the properties

( )
,
e e e
i j j ij
x y = (i, j = 1, 2, 3) (2. 35)

3 3 3
1 1 1
1, 0, 0
e e
e i i
i
i i i
x y

= = =

= = =


(2. 36)
Finite Element Method Modeling Dr. Slim Choura

Page 54
Figure 2.2. Linear interpolation functions for the three-node triangular element

Example 2.1

Consider the triangular element shown in figure 2.3.








Figure 2.3. A triangular element with element nodes and coordinates

It can be shown that
1 2 3
1 2 3
1 2 3
11 5 1
1 3 2
2 1 3



= = =
= = =
= = =

and
( ) ( ) ( )
1 2 3
1 1 1
11 2 5 3 1 2 3
7 7 7
e e e
x y x y x y = = + = +

2.2.4.2. Linear rectangular element

Here we consider an approximation of the form
( )
1 2 3 4
,
e
U x y c c x c y c xy = + + + (2. 37)
1
2
3
1

2
3
1
3

1
2
3
2

1
1
1
1
2
3
(2 , 1)
(5 , 3)
(3 , 4)
x
y
Finite Element Method Modeling Dr. Slim Choura

Page 55
and use a rectangular element of sides a and b (see figure 2.4).





(a)










(b)
Figure 2.2. Linear rectangular elements and its interpolation functions

For the sake of convenience we choose a local coordinate system ( ) y x , to derive the
interpolation functions. We assume that

( )
1 2 3 4
,
e
U x y c c x c y c xy = + + + (2. 38)
and require
( )
( )
( )
( )
1 1
2 1 2
3 1 2 3 4
4 1 3
0, 0
, 0
,
0,
e
e
e
e
u U c
u U a c c a
u U a b c c a c b c ab
u U b c c b
= =
= = +
= = + + +
= = +
(2. 39)

Solving for
i
c ( 1, 2, 3, 4 i = ), we obtain
1 1
c u =
2 1
2
u u
c
a

=
4 1
3
u u
c
b

=
3 4 1 2
4
u u u u
c
ab
+
= (2. 40)
x
x
y
y
a
b
1
4 3
2
1
2
3
4
1
1

1
2
3
4
1
2

1
2
3
4
1
3

1
2
3
4
1
4

Finite Element Method Modeling Dr. Slim Choura

Page 56
Substituting these into (2.38), we obtain
( ) ( )
4
1
, ,
e e e
i i
i
U x y u x y
=
=

(2. 41)
where
1 2 3 4
1 1 1 1
e e e e
x y x y x y x y
a b a b a b a b

| || | | | | |
= = = =
| | | |
\ \ \ \
(2. 42)


2.2.5 Evaluation of Element Matrices, and Vectors

The exact solution of the element matrices
e
K (

and
{ }
e
f in (2.24) is, in general, not
easy. Therefore, they are evaluated using numerical integration techniques. However,
when
ij
a ,
00
a , and f are element-wise constant, it is possible to evaluate the integrals
exactly over the linear triangular and rectangular elements.

Let
e
K (

in (2.24) be rewritten as the sum of basic matrices S

(

( 2 , 1 , 0 , = ):


00 11 12 12 22
00 11 12 21 22
T
e
K a S a S a S a S a S ( ( ( ( ( ( = + + + +

(2. 43)
where
e

ij i, j,
S dxdy

(2. 44)

2.2.5.1 Element matrices for a linear triangular element


For a triangle, the following exact integral formulae are available for evaluating the
integrals. Let

m n
mn
I x y dxdy

(2. 45)
Then we have

Finite Element Method Modeling Dr. Slim Choura

Page 57

00 e
I A = (area of the triangle)
10

e
I A x =
3
1
1

3
i
i
x x
=
=


01

e
I A y =
3
1
1

3
i
i
y y
=
=



3
11
1
9
12
e
i i
i
A
I x y xy
=
| |
|
= +
|
\


3
2 2
20
1
9
12
e
i
i
A
I x x
=
| |
|
= +
|
\


3
2 2
02
1
9
12
e
i
i
A
I y y
=
| |
|
= +
|
\


(2. 46)
Using the linear interpolation functions (2.34) in (2.44), and noting that
2
i i
e

x A

=


2
i i
e

y A

=

(2. 47)
we obtain:
( ) ( )
{
( )
}
11 12 22
00
20 11 02
1 1 1

4 4 4
1

4
1

ij i j ij i j ij i j
e e e
ij i j i j j i i j j i
e
i j i j j i i j
e
S S S
A A A
S x y
A
I I I
A



= = =
(
= + + + +

(
+ + + +

(2. 48)
In view of the identity
2

3
i i i e
x y A + + = [which follows from (2.32) and (2.46)] for
an element-wise constant value of
e
f f = , we have

( )
1 1

2 3
e
i e i i i e e
f f x y f A = + + = (2. 49)

which implies an equal distribution among the loads. Once the coordinates of the element
nodes are known, one can compute
i i i
and , from (2.32) and substitute into (2.48) to
obtain the element matrices, which is turn can be used in (2.43) to obtain the element
matrix
e
K (

. For example, when
00 21 12
and , a a a are zero, and
22 11
and a a are element-
wise constant, we have

Finite Element Method Modeling Dr. Slim Choura

Page 58
( )
11 22
1
4
e e e e e e e
ij i j i j
e
K a a
A
= + (2. 50)
2.2.5.2 Element matrices for a linear rectangular element

When ( ) , 0, 1, 2
ij
a i j = and f are constants, we can use the interpolation functions of
(2.42) expressed in the local coordinates, which are related to the local coordinates by

1
e
x x x = +
1
e
y y y = + dx dx = dy dy = (2. 51)
where
( )
1 1
,
e e
x y are the global coordinates of node 1 of element
e
with respect to the
global coordinate system. For example, we have

1 1
1 1
00
0 0

e e
e e
x a y b a b
ij i j i j
x y
S dxdy dxdy
+ +
= =


where a and b are the lengths along the x and y axes of the element. Consider the
coefficient
2 2
00
11 1 1
0 0 0 0
1 1
9
a b a b
x y ab
S dxdy dxdy
a b
| | | |
= = =
| |
\ \

Similarly, we can evaluate all the matrices S

(

with the aid of the integral identities

2
0
1
3
a
x a
dx
a
| |
=
|
\
,
0
1
6
a
x x a
dx
a a
| |
=
|
\
,
0
1
2
a
x a
dx
a
| |
=
|
\
,
0
2
a
x a
dx
a
=

(2. 52)
We have
11 12
22 00
2 2 1 1 1 1 1 1
2 2 1 1 1 1 1 1
1

1 1 2 2 1 1 1 1 6 4
1 1 2 2 1 1 1 1
2 1 1 2 4 2 1 2
1 2 2 1 2 4 2 1

1 2 2 1 1 2 4 2 6 36
2 1 1 2 2 1 2 4
b
S S
a
a ab
S S
b
( (
( (

( (
( ( = =

( (
( (


( (
( (

( (
( ( = =

( (
( (


(2. 53)

Finite Element Method Modeling Dr. Slim Choura

Page 59
{ } { }
1
1 1 1 1
4
T
f fab =

2.2.5.3 Evaluation of the boundary integrals

Here we consider the evaluation of the boundary integrals of the type

( )
e

e e e
i n i
Q q s ds

=

(2. 54)
where
e
n
q is a function of the distance s along the boundary
e
.

Let us consider the linear triangular element shown in figure 2.5. The linear interpolation
functions associated with this element are given by (2.34).









Figure 2.5. The linear triangular element in the global and local coordinate systems

Now let us choose a coordinate system (s , t) with its origin at node 1 and the coordinate s
parallel to the side connecting nodes 1 and 2. The two coordinate system (x , y) and (s , t)
are related by
1 1 1
x a b s c t = + +
2 2 2
y a b s c t = + +
The constants
1
a ,
1
b ,
1
c ,
2
a ,
2
b and
2
c can be determined from the following
conditions:
when 0 s = , 0 t = ,
1
x x = ,
1
y y =
when a s = , 0 = t ,
2
x x = ,
2
y y =
when c s = , b t = ,
3
x x = ,
3
y y =
1
i


x
y
Side 1
Side 3
t
s
a
2
Side 2
b c
3
Finite Element Method Modeling Dr. Slim Choura

Page 60
We obtain
( ) ( )
( ) ( )
1 2 1 1 2 3
1 2 1 1 2 3
, 1
, 1
s c c t
x s t x x x x x x
a a a b
s c c t
y s t y y y y y y
a a a b
( | |
= + + +
| (
\
( | |
= + + +
| (
\
(2. 55)

These expressions allow us to express ( ) y x
i
, as ( ) t s
i
, , which can be evaluated on
the side connecting nodes 1 and 2 by setting 0 = t in ( ) t s
i
, :

( ) ( ) ( ) ( ) ( )
, 0 , 0 , , 0
i i i
s s x s y s =
( ) ( )
1 2 1
s
x s x x x
a
= + ( ) ( )
1 2 1
s
y s y y y
a
= +
For instance,
( )
( )
1 1 1 1 2 1 1 2
1 2 3
1
1 1
2
1
1 1
2
s s s s
s x x y y
A a a a a
s s
A a a


( ( | | | |
= + + + +
`
| | ( (
\ \ )
| |
= + + =
|
\

where the definitions of
1
,
1
and
1
have been used to rewrite the entire expression.
Similarly,
( )
2
s
s
a
= ( )
3
0 s =
where
12
a h = is the length of side 1-2. When ( ) ,
i
x y are evaluated on side 3-1 of the
element, we obtain
( )
1
13
s
s
h
= ( )
2
0 s = ( )
3
13
1
s
s
h
=
where the s coordinate is taken along the side 3-1, with origin at node 3, and
13
h is the
length of side 3-1. Thus evaluation of
e
i
Q involves the use of appropriate 1-D
interpolation functions and the known variation of n q on the boundary:

( ) ( ) ( ) ( ) ( ) ( )
1 2 2 3 3 1
1 2 3
e
i i n i n i n
e e e
i i i
Q s q s ds s q s ds s q s ds
Q Q Q


= + +
+ +

(2. 56)
Finite Element Method Modeling Dr. Slim Choura

Page 61

where

j i
denotes the integral over line connecting node i to node j, the s coordinate is
taken from node i to node j, with the origin at node i, and
e
iJ
Q is defined as the
contribution to
e
i
Q from
e
n q on side J (see figure 2.5) of the element
e
:

( ) ( )
side
e
iJ i n
J
Q s q s ds =

(2. 57)
For example,
( ) ( ) ( )
1 1 1 1
1 2 3 1
1 2 3 1
0
e
e
n n n

Q q s ds q ds q ds


= = + +


The contribution from side 2-3 is zero, because
1
is zero on side 2-3 of a triangular
element. For a rectangular, element,
e
Q
1
has contributions from sides 1-2 and 4-1,
because
1
is zero on sides 2-3 and 3-4.

Example













Figure 2.6. Evaluation of boundary integrals in the finite element analysis

e h
0
q
1
2
3
s
Case 1
e h
0
q
1 2
3
s
Case 2
e h
0
q
2 3
1
s
Case 4
e h
0
q
1
2
3

Case 3
0
q
4
6
5
1
q
Finite Element Method Modeling Dr. Slim Choura

Page 62
Consider the evaluation of the boundary integral
e
i
Q in (2.54) for the four cases of ( ) s q
and finite elements shown in figure 2.6. For each case, we must use the ( ) s q and the
interpolation functions associated with the type of boundary element (i.e., linear or
quadratic).

Case 1: ( ) constant
0
= = q s q ; linear element:
( )
e
0 0
0
0 0 1, 2, 3
e
h
e
i i i
Q q ds q ds i

= = + + =


where
( )
1
1
e
s
s
h
= ( )
2
e
s
s
h
= ( )
3
0 s =
We have
( )
1 0 11
1

2
e e
e
Q q h Q = =
( )
2 0 21
1

2
e e
e
Q q h Q = =
3
0
e
Q =
Case 2: ( )
0
(linear variation)
e
s
q s q
h
= ; linear element:
( )
e
0
0
0
1, 2, 3
e
h
e
i i i
e e
q s
Q q ds s ds i
h h

= = =


where
( )
1
1
e
s
s
h
= ( )
2
e
s
s
h
= ( )
3
0 s =
We have
( )
1 0 11
1

6
e e
e
Q q h Q = =
( )
2 0 21
1

3
e e
e
Q q h Q = =
3
0
e
Q =
Case 3: ( ) constant
0
= = q s q ; quadratic element:
( )
e
0
1, 2, ... , 6
e
i i
Q q ds i

= =


where
( )
1
2
1 1
e e
s s
s
h h

| || |
=
| |
\ \
( )
2
4
1
e e
s s
s
h h

| |
=
|
\
( )
3
2
1
e e
s s
s
h h

| |
=
|
\

Finite Element Method Modeling Dr. Slim Choura

Page 63
and
4
,
5
and
6
are zero on side 1-2-3. We have
( )
1 0 11
1

6
e e
e
Q q h Q = =
( )
2 0 21
4

6
e e
e
Q q h Q = =
( )
3 0 31
1

6
e e
e
Q q h Q = =
Case 4: ( ) s q as shown in figure 2.6; linear element:
( ) ( )
e
0 1 1 2 3
12
1 2 2 3
0 0
e e e e
i i i i i i i
s
Q q s ds q ds q ds Q Q Q
h


= = + + = + =


we obtain:

1 0 0 12 11
12 12
1 2
2 0 1 0 12 1 23 21 22
12 12 23
1 2 2 3
3 1 1 23 32
23
2 3
1
1 0 0 ( )
6
1 1
1 0 ( )
3 2
1
0 0 ( )
2
e e
e e e
e e
s s
Q q ds q h Q
h h
s s s
Q q ds q ds q h q h Q Q
h h h
s
Q q ds q h Q
h

| |
= + + = =
|
\
| |
= + + = + = =
|
\
= + + = =



2.2.6 Assembly of Element Equations

The assembly of finite element equations is based on the continuity of primary variables
and the equilibrium of secondary variables. We illustrate the procedure by considering a
finite element mesh consisting of a triangular element and a quadrilateral element (see
figure 2.7).






(a)





1
2
3
5
4
1 2
Side 3
Side 2
Side 1
Side 3
Side 1
1
2
3
1 2
3
4
1
11 11
1
12 12
1 2
22 22 11
14
15
1 2
23 23 14
Global Local
0
0
K K
K K
K K K
K
K
K K K

+
+


1
4
3
5
2
1
4
1
3
4
1
2
2
3
3
2
1
1
1
3
3 2
2
7
6
1
14 13
1 2
34 43 31
17
1 2 3 4
44 33 11 11 11
2 3
45 12 13
56
3 4
47 12 13
Global Local
0
0
K K
K K K
K
K K K K K
K K K
K
K K K

+
+ + +
+
+


Finite Element Method Modeling Dr. Slim Choura

Page 64



(b)

Figure 2.7. Assembly of finite element coefficient matrices (a) assembly of two elements
(b) assembly of several elements


From the finite element mesh shown in figure 2.7a, we note the following connectivity
relations between the global and element nodes:

(


=
3 5 4 2
3 2 1
B (2. 58)
where indicates that there is no entry. The correspondence between the local and global
nodal values is (see figure 2.7a)

1
1 1
u U = ,
1 2
2 1 2
u u U = = ,
1 2
3 4 3
u u U = = ,
2
2 4
u U = ,
2
3 5
u U = (2. 59)

Next we use the balance of secondary variables. At the interface between the two
elements, the fluxes from them should be equal in magnitude and opposite in sign. In
figure 2.7a, the interface is along the side connecting global nodes 2 and 3. Hence, the
internal flux
1
n
q on side 2-3 of element 1 should balance the flux
2
n
q on side 4-1 of
element 2
( ) ( )
1 2
2 3 4 1
n n
q q

= or
( ) ( )
1 2
2 3 1 4
n n
q q

= (2. 60)
In the finite element method, we impose the above relation in a weighted-residual sense:

1 2
23 14
1 1 2 2
2 1 n n
h h
q ds q ds =


1 2
23 14
1 1 2 2
3 4 n n
h h
q ds q ds =

(2. 61)
where
e
pq
h denotes the length of the side connecting node p to node q of the element
e
.
The above equations can be written in the form

1 2
23 14
1 1 2 2
2 1
0
n n
h h
q ds q ds + =


1 2
23 14
1 1 2 2
3 4
0
n n
h h
q ds q ds + =

(2. 62)
or
Finite Element Method Modeling Dr. Slim Choura

Page 65
1 2
22 14
0 Q Q + =
1 2
32 44
0 Q Q + = (2. 63)

where
e
iJ
Q denotes the part of
e
i
Q that comes from side J of element e [see (2.57)]
( ) ( )
side

e e e
iJ n i
J
Q q s s ds =

(2. 64)

The element equations of the two elements are written first. For the model at hand there
is only one primary degree of freedom per node. For the triangular element, the element
equations are of the form

1 1 1 1 1 1 1 1
11 1 12 2 13 3 1 1
1 1 1 1 1 1 1 1
21 1 22 2 23 3 2 2
1 1 1 1 1 1 1 1
31 1 32 2 33 3 3 3
K u K u K u f Q
K u K u K u f Q
K u K u K u f Q
+ + = +
+ + = +
+ + = +
(2. 65)

For the rectangular element, the element equations are given by


2 2 2 2 2 2 2 2 2 2
11 1 12 2 13 3 14 4 1 1
2 2 2 2 2 2 2 2 2 2
21 1 22 2 23 3 24 4 2 2
2 2 2 2 2 2 2 2 2 2
31 1 32 2 33 3 34 4 3 3
2 2 2 2 2 2 2 2 2 2
41 1 42 2 43 3 44 4 4 4
K u K u K u K u f Q
K u K u K u K u f Q
K u K u K u K u f Q
K u K u K u K u f Q
+ + + = +
+ + + = +
+ + + = +
+ + + = +
(2.
66)

In order to impose the balance of secondary variables in (2.63), we must add the second
equation of element 1 to the first equation of element 2, and also add the third equation of
element 1 to the fourth equation of element 2 (using the global-variable notation (2.59)):

( ) ( ) ( )
( ) ( ) ( )
1 1 2 1 2 2 2 1 2 1 2
21 1 22 11 2 23 14 3 12 4 13 5 2 1 2 1
1 1 2 1 2 2 2 1 2 1 2
31 1 32 41 2 33 44 3 42 4 43 5 3 4 3 4
K U K K U K K U K U K U f f Q Q
K U K K U K K U K U K U f f Q Q
+ + + + + + = + + +
+ + + + + + = + + +


Now we can impose the conditions in (8.52) by setting appropriate portions of the
expressions in parentheses on the right-hand sides of the above equations equal to zero:

Finite Element Method Modeling Dr. Slim Choura

Page 66
( ) ( )
( )
1 2 1 1 1 2 2 2 2
2 1 21 22 23 11 12 13 14
1 1 1 2 2 2 2
21 23 22 14 11 12 13
Q Q Q Q Q Q Q Q Q
Q Q Q Q Q Q Q
+ = + + + + + +
= + + + + + +


( ) ( )
( )
1 2 1 1 1 2 2 2 2
3 4 31 32 33 41 42 43 44
1 1 1 2 2 2 2
31 33 32 44 41 42 43
Q Q Q Q Q Q Q Q Q
Q Q Q Q Q Q Q
+ = + + + + + +
= + + + + + +


2.2.7 Postprocessing

The finite element solution at any point (x , y) in an element
e
is given by
( ) ( )
1
, ,
n
e e e
j j
j
U x y u x y
=
=

(2. 67)
and its derivatives are computed as:
1

n
e
e
j e
j
j
U
u
x x

,
1

n
e
e
j e
j
j
U
u
y y

(2. 68)

Equations (2.67) and (2.68) can be used to compute the solution and its derivatives at any
point (x , y) in the element. It is useful to generate, by interpolation from (2.67),
information needed to plot contours of
e
U and its gradient.

2.2.8 Axisymmetric Problems

Model equation

( )
11 22 00
1

,
u u
ra a a u f r z
r r r z z
| | | |
+ =
| |

\ \
(2. 69)

where
00
a ,
11
a ,
22
a and f

are given as functions of r and z. For example, this equation


arises in the study of heat transfer in cylindrical geometries.

Weak form

Following the three-step procedure, we write the weak form of (2.69)

0
0
Finite Element Method Modeling Dr. Slim Choura

Page 67
( i ) ( )
11 22 00
1

0 ,
e
u u
w ra a a u f r z rdrdz
r r r z z

( | | | |
= +
| | (

\ \

( ii ) ( )
11 22 00

0 ,
e
w u w u
ra ra wa ru wrf r z drdz
r r z z

| |
= + +
|

\


11 22

e
r r
u u
w ra n ra n ds
r z

| |
+
|

\

( iii ) ( )
11 22 00

0 ,
e
w u w u
ra ra wa ru wrf r z drdz
r r z z

| |
= + +
|

\

e

n
wq ds


(2. 70)
where w is the weight function and
n
q is the normal flux,
11 22

n r r
u u
q r a n a n
r z
| |
= +
|

\
(2. 71)

Finite element model

Let us assume that ( ) z r u , is approximated by
( ) ( )
1
, ,
n
e e e
j j
j
u U r z u r z
=
=

(2. 72)
The interpolation functions ( ) ,
e
j
r z are the same as those developed in (2.34) and (2.42)
for triangular and rectangular elements, with x r = and y z = . Substitution of (2.72) for
u and
e
j
for w into the weak form gives the i
th
equation of the finite element model:

e e
11 22 00
1
0


e
n
e e
e e
j j
e e e i i
i j j
j
e e
i i n


a a a rdrdz u
r r z z
f rdrdz q ds

=

(
| |

(
= + + |
|
(
\



(2. 73)
or
Finite Element Method Modeling Dr. Slim Choura

Page 68
1
0
n
e e e e
ij j i i
j
K u f Q
=
=

(2. 74)
where
11 22 00

e
e e
e e
j j
e e e i i
ij i j


K a a a rdrdz
r r z z

| |

= + + |
|

\


e e
i i
f f rdrdz

,
e
e e
i i n
Q q ds

=

(2. 75)
Exact evaluation of the integrals in
e
ij
K and
e
i
f for polynomial forms of
ij
a and f

is
possible. However, we evaluate them numerically using the numerical integration
methods.


2.2.9 Example: Poisson Equation

Consider the Poisson equation
0
2
f u = or
0
2
2
2
2





f
y
u
x
u
=
|
|

\
|

in (2. 76)
0
u
y

in a square region (see figure 2.8). The boundary condition of the problem is
0 u = on (2. 77)
We wish to solve the problem using the finite element method.










0 =

n
u

y
x
0 = u
0 = u
Domain used for the
triangular-element meshes
0 =

y
u

0 =

x
u

Line of symmetry
Finite Element Method Modeling Dr. Slim Choura

Page 69

(a)











(b) (c)
Figure 2.8. (a) Geometry and computational domain, and boundary conditions (b) coarse
finite element mesh of linear triangular elements (c) refined finite element mesh of linear
triangular elements

Note that the problem at hand has symmetry about x = 0 and y = 0 axes; it is also
symmetric about the diagonal line x = y (see figure 2.8a).

Solution by linear triangular elements

At a first choice, we use a uniform mesh of four linear triangular elements to represent
the domain shown in figure 2.8b. Note that elements 1, 3 and 4 are identical in orientation
as well as geometry. Element 2 is geometrically identical with element 1, except that it is
oriented differently. If we number the local nodes of element 2 to match those of element
1 then all four elements have the same element matrices, and it is necessary to compute
them only for element 1.

We consider element 1 as the typical element, with its local coordinate system ( ) y x , .
Suppose that the element dimensions, i.e., length and height, are a and b, respectively.
The coordinates of the element nodes are

( ) ( ) 0 , 0 ,
1 1
= y x , ( ) ( ) 0 , ,
2 2
a y x = , ( ) ( ) b a y x , ,
3 3
=
0 =

n
u

y
x
0 = u
0 =

y
u

1 2 4
3
5
6
1
2
3
4
1 2
3
1
1
1 2
2
2
3
3
3
1 2 4
3
5
15
1
1
2
3
4
5
6
7
6
7
8
9
10
11
12
13
14
1 1 1
1 1 1
1 1 1
1 1
1 1
1
1
Finite Element Method Modeling Dr. Slim Choura

Page 70

Hence, the parameters
i
,
i
and
i
are given by

( ) ( ) ( )
1 2 3 3 2 2 3 1 1 3 3 1 2 2 1
1 2 3 2 3 1 3 1 2
1 2 3 2 3 1 3 1 2
0 0
0
0
x y x y ab x y x y x y x y
y y b y y b y y
x x x x a x x a



= = = = = =
= = = = = =
= = = = = =


The element coefficients
e
ij
K and
e
i
f are given by
2 2
1 2 2 2 2
2 2
0
1
2
0
b b
K b a b a
ab
a a
(
(
( = +
(
(


,
{ }
1 0
1
1
6
1
f ab
f


=
`

)
(2. 78)

The element matrix in (2.78) is valid for the Laplace operator
2
on any right-angled
triangle with sides a and b in which the right-angle is at node 2, and the diagonal line of
the triangle connects node 3 and node 1. Note that the off-diagonal coefficient associated
with the nodes on the diagonal line is zero for a right-angled triangle. These observations
can be used to write the element matrix associated with the Laplace operator or any right-
angled triangle. For example, if the right-angled corner is numbered as node 1, and the
diagonal-line nodes are numbered as 2 and 3 (following the counter-clockwise numbering
scheme), we have (note that a denotes the length of side connecting nodes 1 and 2)

2 2 2 2
1 2 2
2 2

1
0
2
0
a b b a
K b b
ab
a a
( +
(
( =
(
(




For the mesh shown in figure 2.8b, we have

1 2 3 4
K K K K ( ( ( ( = = =

,
{ } { } { } { }
1 2 3 4
f f f f = = =

For a = b, the coefficient matrix in (2.78),
1
1 1 0
1
1 2 1
2
0 1 1
K
(
(
( =

(
(

(2. 79)
Finite Element Method Modeling Dr. Slim Choura

Page 71

The assembled coefficient matrix for the finite element mesh is 6 6 , because there are
six global nodes, with one unknown per node. The assembled matrix can be obtained
directly by using the correspondence between the global nodes and the local nodes,
expressed through the connectivity matrix
(
(
(
(

=
6 5 3
5 4 2
2 3 5
3 2 1
B (2. 80)

The assembled system of equations is

1
1 1
1 2 3
2 3 1 2
1 2 4
3 3 2 1 0
3
2 4
2 3 4
5 1 3 2
4
6 3
1 1 0 0 0 0 1
1 4 2 1 0 0 3
0 2 4 0 2 0 3
1
0 1 0 2 1 0 1 2 24
0 0 2 1 4 1 3
0 0 0 0 1 1 1
Q U
Q Q Q U
U Q Q Q f
Q U
U Q Q Q
U Q
(
(
+ +
(
( + +

= +
( ` ` `

(
(
+ +
(

) ) )
(2. 81)

The sums of the secondary variables at global nodes 2, 3 and 5 are

1 2 3
2 3 1 2

Q Q Q Q + + = ,
1 2 4
3 2 1 3

Q Q Q Q + + = ,
2 3 4
1 3 2 5

Q Q Q Q + + = (2. 82)

At nodes 1, 4 and 6 we have
1
1 1

Q Q = ,
3
2 4

Q Q = and
4
3 6

Q Q = .

The specified boundary conditions on the primary degrees of freedom of the problem are

4 5 6
0 U U U = = = (2. 83)
The specified secondary degrees of freedom are (all due to symmetry)

1 2 3

0 Q Q Q = = = (2. 84)
Since
4
U ,
5
U and
6
U are known, the secondary variables at these nodes, i.e.,
4

Q ,
5

Q
and
6

Q are unknown, and can be obtained in the post-computation.



Finite Element Method Modeling Dr. Slim Choura

Page 72
Since the only unknown primary variables are (
1
U ,
2
U , and
3
U ), and (
4
U ,
5
U , and
6
U )
are specified to be zero, the condensed equations for the primary unknowns can be
obtained by deleting rows and columns 4, 5 and 6 from the system (2.81). In retrospect, it
would have been sufficient to assemble the element coefficients associated with the
global nodes 1, 2 and 3, i.e., writing out equations 1, 2 and 3:

1 1 1 1
11 12 13 1 1
1 1 2 3 1 2 1 2 3
21 22 33 11 23 32 2 2 3 1
1 1 2 1 2 4 1 2 4
31 32 23 33 22 11 3 3 2 1
0
0
0
K K K U f
K K K K K K U f f f
K K K K K K U f f f
(

(
+ + + = + + +
` ` `
(

(
+ + + + +
) )
)
(2. 85)
The unknown secondary variables
4

Q ,
5

Q and
6

Q can be computed either from the


equations (i.e., from equilibrium)
1 1
4
1 12 1
2 3 4 1 3 2 4
5 1 3 2 13 31 12 21 2
4 4
3 31 3
6

0 0

0
0 0
Q
f K U
Q f f f K K K K U
f K U
Q

(


(
= + + + + +
` ` `
(

(
)
)

)
(2. 86)
or from their definitions (2.82) and (2.56). For example, we have
3 3 3 3 3 3 3
4 22 2 2 2
1 2 2 3 3 1

n n n
Q Q q dx q dy q ds

= = + +

(2. 87)
where
( )
3
1 2
1 2
0 0, 0
n x y x
u u u
q n n n
x y y

| | | |
= + = = =
| |

\ \

( ) ( )
3
2 3
2 3
1, 0
n x y x x
u u u
q n n n n
x y x

| |
= + = = =
|

\

( ) ( )
3 3
2 2
2 3 1 3
23
1 , 0
y
h


= =
Thus,
23
3
4 22
23
0

1
h
u y
Q Q dy
x h
| |
= =
|


where
u
x

from the finite element interpolation is


Finite Element Method Modeling Dr. Slim Choura

Page 73
3
3
3
3
1
2
j
j
j
u
u
x A



We obtain (
23
h a = ,
3
1
a = ,
2
3
2A a = ,
4 5
0 U U = = )
3
3 3 23
4 2
3
1

0.5
4
j j
j
h
Q u U
A

=
= =

(2. 88)
Using the numerical values of the coefficients
e
ij
K and
e
i
f (with 1
0
= f ), we write the
condensed equations for
1
U ,
2
U , and
3
U as
1
2
3
0.5 0.5 0 1
1
0.5 2.0 1.0 3
24
0 1.0 2.0 3
U
U
U
(

(
=
` `
(

(
) )
(2. 89)
Solving (2.89) for
i
U (i = 1, 2, 3), we obtain
1
0.31250 U =
2
0.22917 U =
3
0.17708 U =

and from (2.86), we have
3
1 22
3 4
32 22 2
4
32 3
1 0 0.5 0 0.197917
1
3 0 0 1 0.302083
24
3 0 0 0 0.041667
U Q
Q Q U
Q U
(

(
+ = + =
` ` ` `
(

(
) ) )
)
(2. 90)

By interpolation,
3
22
Q , for example, is equal to
2
5 . 0 U , and it differs from
3
22
Q computed
from equilibrium by the amount
3
2
1
24
f
| |
=
|
\
.

Solution by linear rectangular elements

Note that we cannot exploit the symmetry along the diagonal y x= to our advantage when
we use a mesh of rectangular elements. Therefore, we use a 2 2 uniform mesh of
rectangular elements (see figure 2.9) to discretize a quadrant of the domain.



Finite Element Method Modeling Dr. Slim Choura

Page 74

Four-element mesh Sixteen-element mesh


Figure 2.9. Finite element discretization by linear rectangular elements

Note that no discretization error is introduced in this case. Since all elements are
identical, we shall compute the element matrices for only one element, say element 1. We
have

( ) ( ) ( ) ( )
1 2 3 4
1 2 1 2 2 1 2 4 1 2 2 x y x y x y x y = = = = (2. 91)


0.5 0.5
0 0
j j e i i
ij
K dxdy
x x y y


| |
= +
|

\

(2. 92)
0.5 0.5
0
0 0

e
i i
f f dxdy =


Evaluating these integrals, we obtain {see (2.53):
11 22 e
K S S ( ( ( = +

}

e
Q
44
e
Q
14
e
Q
43

e
Q
11

e
Q
21
e
Q
33
e
Q
22
e
Q
32
0 =

x
u

0 = u
0 =

y
u

1 2
4
3
5
6
1 2
3 4
1 2 4 3 5
1
6
9 8 7
0 = u
2 1 3 4
6 5 7 8
9
16
12 11 10
14 15 13
10
15
20
25
11
16
21 22 23 24
0 =

x
u

0 = u
0 = u
0 =

y
u

Finite Element Method Modeling Dr. Slim Choura

Page 75
4 1 2 1
1 4 1 2
1
2 1 4 1 6
1 2 1 4
e
K
(
(

(
( =

(
(



{ }
1
2
3
4
1
1
1
1 16
1
e
e
e
e
e
Q
Q
F
Q
Q



= +
` `


) )
(2. 93)
where
( ) ( )
( ) ( )
2 3
1 2
4 1
3 4
0
0
x y
e (e) (e)
i n i n i
y x a
x y
x y
(e) (e)
n i n i
y b x
x y
Q q x , y dx q x , y dy
q x , y dy q x , y dy
= =
= =
( ( = +

( ( + +



(2. 94)
and ( )
i i
y , x denote the local coordinates of the element nodes (and
2 1 3 4
a x x x x = =
and
4 1 3 2
b y y y y = = ).

The condensed equations are:

1 1 1 1
11 12 14 13 1
1 1 2 1 1 2
12 22 11 24 23 14 2
1 1 1 3 1 3
14 24 44 11 43 12 4
1 1 2 1 3 1 2 4 3
13 23 14 43 12 33 44 11 22 5
1 1
1 1
1 2 1
2 1 2
1 3
4 1
1 2 4 3
3 4 1 2
K K K K U
K K K K K K U
K K K K K K U
K K K K K K K K K U
f Q
f f Q
f f
f f f f
(

(

+ +

(
`
(
+ +

(

+ + + + +
( )



+ +

= +
`
+


+ + +
)
2
1
1 3
4 1
1 2 4 3
3 4 1 2
Q
Q Q
Q Q Q Q



`
+


+ + +
)
(2.95)
The boundary conditions on the secondary variables are:
1
1
0 Q =
1 2
2 1
0 Q Q + =
1 3
4 1
0 Q Q + = (2. 96)
and the balance of secondary variables at global node 5 requires

1 2 4 3
3 4 1 2
0 Q Q Q Q + + + =
Thus, we have
1
2
4
5
4 1 1 2 1
1 8 2 2 2
1 1

1 2 8 2 2 6 16
2 2 2 16 4
U
U
U
U
(
(


(
=
` `
(

(


) )
(2. 97)
Finite Element Method Modeling Dr. Slim Choura

Page 76
The solution of these equations is

31071 . 0
1
= U 24107 . 0
2
= U 24107 . 0
4
= U 19286 . 0
5
= U
The secondary variables
3

Q ,
6

Q and
9

Q at nodes 3, 6 and 9, respectively, can be


computed from the equations (
2
2 3

Q Q = ,
4
2
2
3 6

Q Q Q + = ,
4
3 9

Q Q = )
1 2
3
2 31 32 34 35
2 2 4
6 3 2 61 62 64 65
4 4
3 91 92 94 95
9
5
1 2 2 2
2 21 34
2 2 4 2 2 4
3 2 31 34 21
4 4 4
3 31
5

0 0
0 0
0 0 0
U
Q
f K K K K
U
Q f f K K K K
U
f K K K K
Q
U
U
f K K
U
f f K K K
U
f K
U



(



(
= + +
` ` `
(

(

)

)
)

(

(
= + + +
`
(

(
)

1
2
4
5
1 0 1 0 2 0.16697
1 1
2 0 2 0 2 0.26964
16 6
1 0 0 0 2 0.12679
U
U
U
U

`


)

(


(
= + =
` ` `
(

(
) )

)
(2. 98)
It can be shown that the exact solution to Equation (2.76) is given by the following series
solution
( ) ( )
( )
( )
2 0
3
1
1 cos cosh
1
, 1 4 2 1
2 2 cosh
n
n n
n
n n
n
y x
f
u x y y n


=
(

(
= + =
(

(2. 99)

The finite element solutions obtained using two different meshes of triangular elements
and two different meshes of rectangular elements are compared in Table 2.1 with the 50-
term series solution (at x = 0 for varying y) in (2.99) ( 1
0
= f ).







Finite Element Method Modeling Dr. Slim Choura

Page 77
Triangular elements Rectangular elements Series
solution y 4 elements 16 elements 4 elements 16 elements
0.00 0.3125 0.3013 0.3107 0.2984 0.2947
0.25 0.2709
*
0.2805 0.2759
*
0.2824 0.2789
0.50 0.2292 0.2292 0.2411 0.2322 0.2293
0.75 0.1146
*
0.1393 0.1205
*
0.1414 0.1397
1.00 0.0000 0.0000 0.0000 0.0000 0.0000
*
Interpolated values
Table 2.1. Comparison of the finite element solution u(0 , y) with the series solution

The finite element solution obtained using 16 triangular elements is the most accurate one
when compared with the series solution. The accuracy of the triangular element mesh is
due to the large number it has compared with the number of elements in the rectangular
element mesh for the same size of domain.
The solution u and its gradient can be computed at any interior point of the domain. For a
point (x , y) in the element
e
, we have
( ) ( )
1
, ,
n
e e
j j
j
U x y u x y
=
=

(2. 100)
( )
1
,
n
e
e i
y i
i
U
q x y u
y y

=

= =

, ( )
1
,
n
e
e i
x i
i
U
q x y u
x x

=

= =

(2. 101)

2.2.10 Example: Heat Conduction
Consider steady-state heat conduction in an isotropic rectangular region of dimension 3a
by 2a (see figure 2.10a).
Finite Element Method Modeling Dr. Slim Choura

Page 78


Figure 2.10. Finite element analysis of a heat conduction problem over a rectangular
domain
We wish to determine the temperature distribution using the finite element method in the
region and the heat required at the boundary x = 3a to maintain it at zero temperature.
We note that the problem at hand is governed by (no internal heat generation ( ) 0
0
= f and
no convection boundary conditions)
2
0 k u = (2. 102)
where k is conductivity of the medium. Hence the finite element model of the problem is
given by

{ } { } { } { }
( )
0
e e e e
K u Q f ( = =


insulated
insulated
a
x
T T
6
cos
0

=
0 = T
x
y
a 3
a 2
1 2 3 4
1 2 3
6 5 4
1 2 3 4
8 7 6 5
9 10 11 12
1
2
3
6
5
4
9 10 11 12
8 7 6 5
7
8
9
12
11
10
(a)
(b)
(c)
Finite Element Method Modeling Dr. Slim Choura

Page 79
where
e
i
u is the temperature at node i of the element
e
, and
e
j j e i i
ij
K k dxdy
x x y y

| |
= +
|

\


e
e
i n i
Q q ds

=

(2. 103)

Triangular element mesh (12 elements) (figure 2.10b)

By renumbering the element nodes, all elements can be made to have a common
geometric shape, and thus the elements need to be computed only for a single element.
Thus, for a typical element of the mesh of triangles in figure 2.10b, the element
coefficient matrix is: (see 2.79)
1 1 0
1 2 1
2
0 1 1
e
k
K
(
(
( =

(
(

(2. 104)
The boundary conditions require that
4 8 12
0 U U U = = = ,
9 0
U T = ,
10 0
1
3
2
U T = ,
11 0
1
2
U T =
1 2 3 5
0 F F F F = = = = (zero heat flow due to insulated boundary) (2. 105)
We first write the six finite elements equations for the six unknown primary variables.
These equations come from nodes 1, 2, 3, 5, 6, and 7:

1
2
3
0
5
0 6
7
0
0
2 1 0 1 0 0
0
1 4 1 0 2 0
0
0 1 4 0 0 2
1 0 0 4 2 0 2 2
0 2 0 2 8 2 3
0 0 2 0 2 8
U
U
U k k
T
U
T U
U
T

(

(


(

(

=
( ` `

(
(

(

)
)
(2. 106)
The solution of these equations is (in
o
C)

1 0
0.6362 U T = ,
2 0
0.5510 U T = ,
3 0
0.3181 U T =

5 0
0.7214 U T = ,
6 0
0.6248 U T = ,
7 0
0.3607 U T = (2. 107)

The exact solution of (2.102) for the boundary conditions shown in figure (2.10a)

Finite Element Method Modeling Dr. Slim Choura

Page 80
( )
( ) ( )
( )
0
cosh / 6 cos / 6
,
cosh / 3
y a x a
T x y T

= (2. 108)
Evaluating the exact solution at the nodes, we have (in
o
C)

1 0
0.6249 T T = ,
2 0
0.5412 T T = ,
3 0
0.3124 T T =
5 0
0.7125 T T = ,
6 0
0.6171 T T = ,
7 0
0.3563 T T = (2. 109)
The heat at node 4, for example, can be compared from the fourth finite element
equation:

5
4 2 41 1 42 2 43 3 44 4 45 5 46 6 47 7 48 8
F Q K U K U K U K U K U K U K U K U = = + + + + + + + +
(2. 110)
Noting that
41 42 43 44 45 46 47 48 49 4(10) 4(11) 4(12)
0 K K K K K K K K K K K K = = = = = = = = = = = =
and 0
8 4
= =U U , we obtain
5
4 2 3 0
1
0.1591
2
F Q kU kT = = = (in W) (2. 111)

Rectangular element mesh (6 elements) (figure 2.10c)

The element coefficient matrix is given by (2.43) and (2.53) with
00
0 a = ,
11 22
a a k = = ,
12 21
0 a a = = , and a = b = 1:
4 1 2 1
1 4 1 2
2 1 4 1 6
1 2 1 4
e
k
K
(
(

(
( =

(
(


,
{ } { } 0
e
f = (2. 112)

The present mesh of rectangular elements is node-wise equivalent to the triangular
element mesh considered in figure 2.10b. Hence, the boundary conditions (2.105) are
valid for the present case. The six finite element equations for the unknowns
1
U ,
2
U ,
3
U ,
5
U ,
6
U and
7
U have the same form as before.

Finite Element Method Modeling Dr. Slim Choura

Page 81
1
2
3
0 0
5
6 0 0 0
7
0 0
0
4 1 0 1 2 0
0
1 8 1 2 2 2
0
0 1 8 0 2 2

3
1 2 0 8 2 0 6 6
2 2 2 2 16 2
2 3
0 2 2 0 2 16
3
U
U
U k k
T T
U
U T T T
U
T T

(

(


(

(

=
( ` `
+

(
(

+ +
(

) +
)
(2. 113)
Their solution is

1 0
0.6128 U T = ,
2 0
0.5307 U T = ,
3 0
0.3064 U T =
5 0
0.7030 U T = ,
6 0
0.6088 U T = ,
7 0
0.3515 U T = (2. 114)
The heat at node 4 is given by
2
3 43 3 47 7 3 7 0
2
0.1682 (in W)
6 6
k k
Q K U K U U U T = + = =

Triangles Rectangles Analytical
solution x y 2 3 4 6 2 3 4 6
0.0 0.0 0.6362 0.6278 0.6128 0.6219 0.6249
0.5 0.0 0.6064 0.6007 0.6036
1.0 0.0 0.5510 0.5437 0.5307 0.5386 0.5412
1.5 0.0 0.4439 0.4398 0.4419
2.0 0.0 0.3181 0.3139 0.3064 0.3110 0.3124
2.5 0.0 0.1625 0.1610 0.1617
0.0 1.0 0.7214 0.7148 0.7030 0.7102 0.7125
0.5 1.0 0.6904 0.6860 0.6882
1.0 1.0 0.6248 0.6190 0.6088 0.6150 0.6171
1.5 1.0 0.5054 0.5022 0.5038
2.0 1.0 0.3607 0.3574 0.3515 0.3551 0.3563
2.5 1.0 0.1850 0.1838 0.1844

Table 2.2. Comparison of the nodal temperatures ( )
0
/ , T y x T using various finite element
meshes, with the analytical solution


2.2.11 Example: Heat Convection

The governing equation for steady-state heat transfer in plane systems is a special case of
(2.1), and is given by

Finite Element Method Modeling Dr. Slim Choura

Page 82
( ) ,
x y
T T
k k f x y
x x y y
| | | |
=
| |

\
\
(2. 115)

where T is the temperature (in
o
C ),
x
k and
y
k are the thermal conductivities (in W m
-1
o
C
-1
) along the x and y directions, respectively, and f is the internal heat generation per
unit volume (in W m
-3
). For a convective boundary, the natural boundary condition is a
balance of energy transfer across the boundary due to conduction and/or convection (i.e.,
Newtons law of cooling):
( )

x x y y n
T T
k n k n T T q
x y


+ + =

(2. 116)
where is the convective conductance (in W m
-2

o
C
1
),

T is the ambient temperature


of the surrounding, and
n
q is the specified heat flow. It is the presence of the term
( )

T T that requires some modification of Equation (2.14)-(2.17). These become



( )
( ) ( )
0

,
e e
e e
x y x x y y
x y n
w T w T w w
k k wf dxdy w k n k n ds
x x y y x y
w T w T
k k wf dxdy w q T T ds
x x y y
B w T l w


| | | |
= + +
| |

\ \
| |
( = +
|


\
=

(2. 117)
where
( ) ,
e e
x y
w T w T
B w u k k dxdy wTds
x x y y


| |
= + +
|

\
(2. 118)
( )
e e e

n
l w wf dxdy wT ds wq ds


= + +

(2. 119)
The finite element model of (2.115) is obtained by substituting the finite element
approximation of the form
( ) ( )
1
, ,
n
e e
j j
j
T x y T x y
=
=

(2. 120)
for T and
e
j
for w into (2.117)
Finite Element Method Modeling Dr. Slim Choura

Page 83
( )
1

n
e e e e e
ij ij j i i
j
K H T F P
=
+ = +

(2. 121)
e
e e
e e


j j e i i
ij x y
e e e e
i i n i i i
e e e e
ij i j i i
K k k dxdy
x x y y
F f dxdy q ds f Q
H ds P T ds




| |
= +
|

\
= + +
= =


(2. 122)
The coefficients and
e
i
e
ij
P H (due to convection) for a linear triangular element (see
figure 2.11) are defined by

12 23 31
12 23 31
12 23 31
0 0 0
12 23 31
12 23 31
0 0 0


e e e
e e e
h h h
e e e e e e e e e e
ij i j i j i j
h h h
e e e e e e e
i i i i
H ds ds ds
P T ds T ds T ds



= + +
= + +


(2. 123)
where
e
ij
is the film coefficient (assumed to be constant) for the side connecting nodes i
and j of the element
e
,
ij
T

is the ambient temperature on that side, and


e
ij
h is the length
of the side. For a rectangular element, the expressions in (2.123) must be modified to
account for four line integrals on four sides of the element.








Figure 2.11. Triangular and quadrilateral elements with node numbers and local
coordinates for the evaluation of the boundary integrals

For a linear triangular element, the matrices
e
H (

and
{ }
e
P are given by
1
Side 1
Side 3
s
2
Side 2
3
s
s
1
Side 1
Side 4
s
2
Side 2
4
s s
3
Side 3
s
Finite Element Method Modeling Dr. Slim Choura

Page 84

23 23 31 31 12 12
2 1 0 0 0 0 2 0 1
1 2 0 0 2 1 0 0 0
6 6 6
0 0 0 0 1 2 1 0 2
e e e e e e
e
h h h
H

( ( (
( ( (
( = + +

( ( (
( ( (

(2. 124)
{ }
23 31 12
23 23 31 31 12 12
1 0 1
1 1 0
2 2 2
0 1 1
e e e e e e
e
T h T h T h
P




= + +
` ` `

) ) )
(2. 125)
For a linear rectangular element, they are given by

23 23 12 12
34 34 41 41
2 1 0 0 0 0 0 0
1 2 0 0 0 2 1 0
0 0 0 0 0 1 2 0 6 6
0 0 0 0 0 0 0 0
0 0 0 0 2 0 0 1
0 0 0 0 0 0 0 0
0 0 2 1 0 0 0 0 6 6
0 0 1 2 1 0 0 2
e e e e
e
e e e e
h h
H
h h


( (
( (
( (
( = +

( (
( (

( (
( (
( (
+ +
( (
( (

(2. 126)
{ }
23 34 12 41
23 23 34 34 12 12 41 41
1 0 0 1
1 1 0 0
0 1 1 0 2 2 2 2
0 0 1 1
e e e e e e e e
e
T h T h T h T h
P





= + + +
` ` ` `


) ) ) )
(2. 127)

As an example, consider the heat transfer in a rectangular region of dimensions a by b,
subject to the boundary conditions shown in figure 2.12.








Figure 2.12. Domain and boundary conditions for convective heat transfer

1 2 3
7 6 5
1 2 3 4
9 8 7 6
11 12 13 14
insulated
insulated
( ) 0 = +

T T
x
T
k
0
T T =
x
y a
b
8
4
15
10
5
Finite Element Method Modeling Dr. Slim Choura

Page 85
The heat transfer in the region is governed by
0
x y
T T
k k
x x y y
| | | |
=
| |

\
\
(2. 128)
The finite element model of the equation is given by

{ } { } { } { } { }
( )
0
e e e e e e
K H u Q P f ( + = + =

(2. 129)
where
e
i
u denotes the temperature at node i of the element
e
. The element matrices are
2 2 1 1 2 1 1 2
2 2 1 1 1 2 2 1
1 1 2 2 1 2 2 1 6 6
1 1 2 2 2 1 1 2
y
e x
k
k r
K
r
( (
( (

( (
( = +

( (
( (



( )
23 23
0 0 0 0
0 2 1 0
4, 8
0 1 2 0 6
0 0 0 0
e e
e
h
H e

(
(
(
( = =

(
(


( )
23
23 23
0
1
4, 8
1 2
0
e e
e
T h
P e




( = =
`



)
(2. 130)
where
1
2
2
1
4
b
b
r
a
a
= =
There are 10 nodal temperatures that are to be determined and heats at all nodes except
nodes 7, 8, 9, and 10 are to be computed. To illustrate the procedure, we write algebraic
equations for only representative temperatures and heats.

Node 10 (for temperatures)

( ) ( ) ( )
( ) ( ) ( )
4 4 4 4 8 4 4 8 8 8
31 4 32 32 5 43 21 9 33 33 22 22 10 24 14
8 8 4 4 8 8 4 8
23 23 15 3 3 2 2 3 2
(known)
K U K H U K K U K H K H U K U
K H U Q P Q P P P
+ + + + + + + + +
+ + = + + + = +


Finite Element Method Modeling Dr. Slim Choura

Page 86
Node 14 (for heat
14
Q )

( ) ( )
7 8 7 7 8 8 7 7 8 8
14 3 4 31 8 32 41 9 42 10 34 13 33 44 14 43 15
Q Q Q K U K H U K U K U K K U K U + = + + + + + + +

From the boundary conditions, we know the temperatures at nodes 11-15 (i.e.,
11
U ,
12
U ,
13
U ,
14
U ,
15
U are known). Substituting the values of
e
ij
K ,
e
ij
H and
e
i
P , we obtain explicit
form of the algebraic equations. For example, the algebraic equation corresponding to
node 10 is

4 5 9
10 14 15
2
1 1 1 1
2 2
6 6 12 6
2 1 1 1
2
3 2 6 6 2 2
y y y y
x x x x
y y y
x x x
k k k k
k r U k r b U k r k r U
r r r r
k k k
b b
k r U k r U k r U bT
r r r

( ( | | | | | | | |
+ + + + + + +
( ( | | | |
( ( \ \ \ \
( | | | | | |
+ + + + + + =
( | | |
( \ \ \

You might also like