You are on page 1of 37

# FINITE ELEMENT METHOD

Objective
The purpose of the present course is to describe the use of
Finite Element method for the solution of problems of fluid
flow or seepage through porous media.
What is FEM
Powerful computational technique for the solution of
differential equtions.
too complicated to be solved satisfactorily by classical
analytical methods.
Problems-Solid mechanics, Heat transfer, fluid mechanics,
acoustics, electromagnetism, coupled interaction of these
phenomena
Commercial packages
Course coverage
Finite element Basic concepts
Formulation of Finite elements
Steps in the finite element method
Examples
WHY FEM ?
Simple Example
Simple 1-D problem
f
dx
du
dx
d

,
_

0 1 x
on
Boundary conditions
0
) 0 ( u u
(1)
du
q
dx

( Dirichlet )
( Neumann )

:
0

:
1

:
Strong form
Analytical solution
2
0
2
q f f
u u x x

_
+ +

,
d du
f
dx dx

,
Integrating both sides
2
1 2
2
f x
u C x C + +
Imposing the boundary conditions we get
1 2 0
C q f C u
Finite difference formulation
is approximated in the mid-point of the interval
dx
du
1
1/ 2
l l
l
u u du
dx x
+
+

,
1
1/ 2
l l
l
u u du
dx x

,
1/2 1 1/ 2 1
2
( ) ( )
l l l l l l
l
u u u u
f
x

+ +

## Finite difference approximation

l
l l l
f
x
u u u

+
+
2
1 1
2

For constant
1.. l L
0
0 x
1
x
l
x
1
L
x
1 l
x
+
x
1 1
( , ) ( , )
l l l l
x x and x x by
+
Finite difference formulation
Neumann boundary condition
1/ 2 1 1/ 2 1
( ) ( ) 1 1
2 2
L L L L L L
u u u u
q
x x

+ +

+

Discretisation at the end l=L
1/2 1 1/2 1
2
( ) ( )
L L L L L L
L
u u u u
f
x

+ +

Combining
1
1/2
1
2
L L
L L
u u
q f x
x

## Finite difference formulation

Discrete problem-algebraic equations
KU F
2 1
1 2 1
...
1 2 1
1 1
K

1
1

1
1
1

1
1

]
2
0 1
2
2
2
1
2
2
L
x
u f
x
f
F
x
f
x x
q f

1
1
1

1
1

1
1

1
1

1

]
M
where,
1
2
1 L
L
u
u
U
u
u

1
1
1
1
1
1
1
]
M
Finite difference -solution
2
0
1
2
2
1
2 1
1
2
x
u f
u
u
x x
q f

1
1

' )
1

1
]

1
]
For a three noded mesh
1
u
0
u
1
u
2
u
Finite difference formulation
Grid is structured .
Equation is discretized.
Proper treatment of boundary conditions is vitally important.
Gives solution at only discrete points in the domain grid
points.
FEM- Building blocks
Form of the approximate solution is assumed apriori
Approximate solution
0
0 1

N N
k k k k
k k
u u u

+

on substitution leaves a residual
d du
r f
dx dx

_

,
Optimizing criterion- the weighted integral of the residual is zero.
0
l
w r

1, 2..., l n
Trial solution procedure
Trial solution u
u
i
s undetermined
Optimizing criterion
Determines best values of u
i
Approximate solution
Accuracy
Accuracy unacceptable repeat cycle with a different trial function
Galerkins weighted residual method
weight functions are the basis functions
The optimization criteria transforms the original differential
equation into a set of algebraic equations.
Can be solved to determined the undetermined parameters
Can be applied to any differential equation
l l
w
Galerkin method
2
0 1 2
( ) u x u u x u x + +
Approximating function of the form
are to be determined
Imposing the boundary conditions
'
i
u s
0 0 1 2
2
q
u u u u

2
0 2 2
2
0 2 2
( ) 2
2
q
u x u u x u x
q
u x u x u x

_
+ +

,
_
+ +

,
Galerkins method
x x ) (
1

2
2
) ( x x
2
( : ) 2 R x u u f
2
0
2
q f f
u u x x

_
+ +

,
From the weighted residual statements we get
2
2
u
f

2
0 2 2
( ) 2
q
u x u x u x u x

_
+ +

,
0 0
q
u x

+
Galerkin method-limitations
Approximating field is defined over the entire domain.
Major disadvantage is the construction of approximation
functions that satisfy the boundary conditions of the problem
Approximating fields must be admissible and easy to use.
Only polynomials and sine and cosine functions are simple
enough to be practicable.
The undetermined parameters have no physical meaning.
i
u
Finite Element Method
Approximating field is defined in a piecewise fashion by
dividing the entire region over subregions
Undetermined parameters are the nodal values of the field
The approximation functions can be generated systematically
over these subregions
FEM is the piecewise (or elementwise )application of the
weighted residual method.
We get different finite element approximations depending on
the choice of the weighted residual method.
i
u
Steps in the finite element method
Discretization of the domain into a set of finite elements.
Defining an approximate solution over the element.
Weighted integral formulation of the differential equation.
Substitute the approximate solution and get the algebraic
equation
?
Steps in the finite element method
1. Discretization of the domain into a set of finite elements (mesh generation).
--- the domain is subdivided into non-overlapping subdomains e called
elements of simple geometrical form.
---for this 1-D problem an obvious choice for an element e is the interval
1 e e
x x x

0
0 x
1
x
1 e
x

1
L
x
e
x
e
x
Steps in the finite element method
Step 2: To set up a weak formulation of the differential equation.
(i) Multiply the equation by a weight function and integrate the equation over the
domain e.
0
e
e
l
d du
w f dx
dx dx

1
_

1
1
,
]

(ii) Move the differentiation to the weight function by by doing integration by parts
1
0
e
e e
e
x
e e
l
l l
x
dw du du
w dx w fdx
dx dx dx

_

,

1
e
e e
e
x
e e
l
l l
x
dw du du
dx wfdx w
dx dx dx

_
+

,

Weak Form
Steps in the finite element method
1
1
e e
e e
x x
du du
q q
dx dx

1
1 1
( ). ( ).
e
e
x
e
l l e e l e e
x
du
w w x q w x q
dx

Weak Form
1 1
( ). ( ).
e e
e
l
l l e e l e e
dw du
dx wf dx w x q w x q
dx dx

+

Equivalent to both the governing differential equation and the associated natural boundary condition
Steps in the development of weak form
Multiply the equation by a weight function and integrate the
equation over the domain e.
Distribute the differentiation among the weight function w
and u
e
by doing integration by parts
Use the definition of the natural boundary condition in the
weak form
Steps in the finite element method
Step 3: FEM model from the weak form
Approximation over a finite element
e
2
1
( )
e e e
j j
j
u x u

1
e
e
e
x x
x

where
1
2
e
e
e
x x
x

## From the weak form

e
l l
w
2
1 1
1
( ). ( ).
e e
e
j
l e
e
l
e l e e j l
j
d
dw
u d w x q w x q x w fdx
dx dx

_
+

,

Steps in the finite element method
The choice
1 1 2 2
e e
w and w gives
2
1
1
1
1 1 1 1
( ) ( )
e e
e
e
j
e e
j
e e
e e e e
j
d
d
u dx x q x q fdx
dx dx

_
+

,

Now,
2
2
2
1
2 2 1 1
( ) ( )
e e
e
e
j
e e
j
e e
e e e e
j
d
d
u dx x q x q fdx
dx dx

_
+

,

1 1 1 1 1 1
( ) ( )
e e e
e e e e e
x q x q q q

2 2 1 1 2
( ) ( )
e e e
e e e e e
x q x q q q

Steps in the finite element method
The choice
1 1 2 2
e e
w and w gives
2
1
1 1
1
e e
e
e
j
e e e
j
j
d
d
u dx fdx q
dx dx

_
+

,

e e e e
ij j i i
K u f q +
which takes the form
e
e
e
j e
i
ij
d
d
K
dx dx

e
e e
i i
f fdx

1
2
e
e
i
e
q
q
q

' )

2
2
2 2
1
e e
e
e
j
e e e
j
j
d
d
u dx fdx q
dx dx

_
+

,

Steps in the finite element method
The element equations are
1 1
2 2
1 1
2
1 1
2
e
e e
e e
e e
x
f
u q
x x u q
f

1

+
' ) ' ) ' )
1

]

Diagram here
2
e
u
1
1
e
u
2
2
e
q 1
e
q
Results
Draw a diagram for assembly here
1 1
1 1
1 1
2 2
2
1 1 0
1 1 1 0
2
0 0 0 0 0
0
e
e
e
x
f
u q
x
forelement u f q
x

1

1
+
' ) ' ) ' )
1

1
]

First we rewrite the element matrices in terms of the global numbering scheme
2
1
2
2
2
1
2
2
0
0 0 0 0
2 0 1 1
1
2
0
2
0 1
e
e
e
x
for element f q
x
u
x
f
u
q

' )

1

1
+
' ) ' )
1

1
]

1
1
u
2
1
u 1
2
u
2
2
u
1 2 3
1
2
2
3
1 2
1
2
Steps in the finite element method
Step 4: Assemble the element equations to obtain the global
system
1 1
1 1 1
1 2
2 2 1
2 2
3 2 2
1 1 0
2
1 2 1 0
0 1 1
e
e
e
e
x
f
u q q
u x f q q
x
u x q q
f

1

1
+ +
' ) ' ) ' ) ' )
1

1
]

Steps in the finite element method
STEP 5: Imposition of boundary conditions
Dirichlet condition

1, , , 0
s s
ss s s i i is s is si
u u
k f u f f k u k k

Neumann condition
Replace the corresponding component of the right hand column by
the specified value.
Steps in the finite element method
STEP 5: Imposition of boundary conditions
( )
( )
( )
2
1
2
1 1
2 0
2 3
2
1 0 0
0 2 1 0
0 1 1 0
2
e
e
e
e
x
f
u q
x
u f u
q x
u
x
f

1
+ +
' ) ' ) ' )
1

1

## Steps in the finite element method

Step 6: Solution of the algebraic system of equations
This is a standard matrix equation can be solved by direct or
indirect(iterative) method.
Step 7: Postprocessing
This final operation displays the solution to system equations in
tabular graphical or pictorial form. Other meaningful quantities
may be derived from the solution and also displayed
Results
1.5 1.5 1.5
u
3
(@ x=1.0)
0.625 0.625 0.625
u
2
(@ x=0.5)
0 0 0
u
1
(@ x=0)
Finite
Difference
Finite
Element
Exact
Results
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
0 0.2 0.4 0.6 0.8 1 1.2
spatial co-ordinate, x
d
i
s
p
l
a
c
e
m
e
n
t
,

u
Exact Solution
Finite Element solution
Finite Element solution
FEM and FDM

## FDM is a direct method- replaces

differential equations by a difference
approximations
Based on rectangular discretisation
Treatment of boundary conditions
needs extra care
Making higher order approximation is
tedious
FEM is an indirect method- works on a
weak form
Arbitrary geometry can be modelled