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

d  du 
λ = f on Ω : 0≤x≤1
dx  dx 
• Boundary conditions

∂Ω 0 : u(0) = u0 ∂Ω1 :
du
λ (1) = q
dx
( Dirichlet ) ( Neumann )

Strong form
Analytical solution

d  du 
λ = f
dx  dx 
Integrating both sides

fx 2
λu = + C1x + C 2
2
Imposing the boundary conditions we get

C1 = q − f C2 = λ u0

q− f  f 2
u = u0 +   x+ x
 λ  2λ
Finite difference formulation
∆x
x0 = 0 x1 xl xl +1 xL = 1
du
• is approximated in the mid-point of the interval
dx

(xl , xl +1 ) and ( xl −1, xl ) by


 du  ul +1 − ul  du  ul − ul −1
 dx  ≈ ≈
 l +1 / 2 ∆x  
 dx l −1 / 2 ∆x
• Finite difference approximation
λl+1/2 (ul +1 − ul ) − λ l −1/2 (ul − ul −1 )
= fl
∆x 2

• For constant λ
u l +1 − 2 u l + u l −1
λ = fl l = 1..L
∆x 2
Finite difference formulation

• Discretisation at the end l=L

λL +1/2 (uL +1 − uL ) − λ L−1/2 (uL − uL−1 )


= fL
∆x 2

• Neumann boundary condition

1 λL +1 / 2 (uL +1 − uL ) 1 λ L −1/2 (uL − u L −1 )


+ =q
2 ∆x 2 ∆x

• Combining
uL − uL−1 1
q − λL−1/2 = f L ∆x
∆x 2
Finite difference formulation

• Discrete problem-algebraic equations

KU = F

where,  ∆x 2 
 u0 − f1 
 λ 
 2 −1   u1   ∆x 2 
−1  u   − λ f2 
2 −1  2   
 
K =   U =  M F =  M 
...
     ∆ x 2 
 −1 2 − 1 u
 L −1   − f L −1 
  λ 
−1 1   u L   ∆x 
 ∆ x 2

q− f
 λ 2λ 
Finite difference -solution

For a three noded mesh

u0 u1 u2

u1

 ∆x2 
 u0 − f 
 2 − 1 
 1 u  λ
 −1 1   u  =  
   2   ∆x ∆x2 
 λ q − 2 λ f 
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

N N
• Approximate solution uˆ = ∑φ
k =0
k uk = φ0 + ∑φ
k =1
k uk

• on substitution leaves a residual


d  duˆ 
rΩ = λ − f
dx  dx 

• Optimizing criterion- the weighted integral of the residual is zero.

∫Ω
wl rΩ = 0 l = 1, 2..., n
Trial solution procedure

Trial solution u Optimizing criterion Approximate solution


ui’’s undetermined Determines best values of ui Accuracy

Accuracy unacceptable repeat cycle with a different trial function


Galerkin’s weighted residual method

• weight functions are the basis functions wl = φl

• 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


Galerkin method

Approximating function of the form


uˆ ( x ) = u 0 + u1 x + u2 x 2
ui ' s are to be determined

Imposing the boundary conditions


q
u0 = u0 u1 = − 2u2
λ
 q 
uˆ ( x ) = u0 +  − 2u2  x + u 2 x 2
λ 
 q 
= +
 0 λ 
u x − 2 u 2 x + u 2 x 2

 
Galerkin’s method

 q 
uˆ ( x ) = +
 0 λ 
u x − 2 u 2 x + u 2 x 2

 

q φ2 ( x) = x 2
φ0 = u0 + x φ1 ( x ) = x
λ

R ( x : u ) = 2u2λ − f
f
From the weighted residual statements we get u2 =

q− f  f 2
u = u0 +  x+ x
 λ  2λ
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 ui have no physical meaning.


Finite Element Method

• Approximating field is defined in a piecewise fashion by


dividing the entire region over subregions

• Undetermined parameters u i 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.
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

∆ xe
x0 = 0 x 1 x e −1 xe xL = 1

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

xe−1 ≤ x ≤ xe
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.

 d  du e  
∫ wl  λ  − f  dx = 0
 dx  dx  
Ωe

(ii) Move the differentiation to the weight function by by doing integration by parts
xe
 du 
e
dwl due
wl λ   − ∫Ωe λ dx − ∫ e wl fdx = 0

 dx  xe−1 dx dx

xe
dwl du e
 du  e

∫Ωe λ dx dx dx =−∫Ωe wl fdx+ wlλ dx 


x e−1

Weak Form
Steps in the finite element method

du du
q e −1 =λ qe = λ
dx x e−1 dx xe

e xe
du
wl λ = wl ( xe ).qe − wl ( xe−1 ).qe−1
dx xe−1

Weak Form

dwl due
∫Ωe λ dx dx dx =−∫Ωe wl f dx + wl (xe ).qe −wl (xe−1).qe−1
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
wl = φle

Steps in the finite element method

Step 3: FEM model from the weak form


Approximation over a finite element Ðe
2
u ( x) =
e
∑u φ
j =1
e
j
e
j

where
xe − x x − xe −1
φ =e
φ 2e =
∆ xe ∆ xe
1

From the weak form

dwl  2 e d φ ej 
∫Ω e λ dx  ∑ u j  d x = − ∫Ω e wl fdx + wl ( xe ).qe − wl ( xe −1 ).qe −1
 j =1 dx 
Steps in the finite element method

The choice w1 = φ1 and w2 = φ2e gives


e

dφ  e
2 d φ e

∫Ω e dx  ∑
λ  dx = − ∫Ωe φ1 fdx + φ1 ( xe )qe − φ1 ( xe−1 )qe−1
j
 1 e e e e
u j
 j =1 dx 

dφ  e2 d φ j 
e

∫Ωe dx  ∑
λ   = − ∫ φ + φ − φ
2 e e e e
u j  dx 2 fdx 2 ( xe ) qe 2 ( xe −1 ) qe −1
dx  Ω e

 j =1
Now,

φ1e ( xe )qe −φ1e ( xe−1)qe−1 = −qe−1 = q1e

φ (xe )qe − φ ( xe−1 )qe−1 = qe = q


e
2
e
2
e
2
Steps in the finite element method

The choice w1 = φ1 and w2 = φ2e gives


e

dφ  e2 d φ e

∫Ω e dx  ∑
λ  dx = − ∫Ω e φ1 fdx + q1
j
1 e e e
u j
 j =1 dx 
dφ2e  2 e dφ ej 
∫Ωe λ dx  ∑ u j  dx = − ∫Ωe φ2 fdx + q2
e e

 j =1 dx 
which takes the form

K ijeu ej = f i e + q ie

d φ e
d φ e
qe

K ije = ∫ e λ i f i e = − ∫ e φie fdx qi =  e 
j e 1
Ω dx dx Ω
q2 
Steps in the finite element method

• The element equations are

 ∆ xe 
− f
λ 1 − 1   u 1e   2   q e

 e =  +  e
1

∆ xe  −1  ∆ xe   q 2 
 1  u2  
− f
 2 

Diagram here
u1e u2e
q1e q e2
1 2
Results

• Draw a diagram for assembly here


1 1 2 2 3

u12 u22
u11 1 u12 2

1 2 2 3
First we rewrite the element matrices in terms of the global numbering scheme
 ∆xe 
− 2 f 
1 −1 0   u1  
1
  q1 
1

λ     ∆x   
forelement 1 −1 1 0  u12  =  − e f  + q12 
∆ xe  2   
 0 0 0  0   0
 0   
 
 
 
 0 
0 0 0  0    0
λ     ∆x   
for element 2  0 1 − 1 u12  =  − e f  + q12 
∆x e 2
 0 −1 1  u22    q 2 
 ∆ xe   2 
 − 2 f 
Steps in the finite element method

Step 4: Assemble the element equations to obtain the global


system

 ∆xe 
 − f
 1 −1 0   u1  2  q 1
  q1 
1

λ       1
1
 2  
 − 1 2 − 1  u  =  −∆ x f  +  q + q  =  0 
∆xe
2 e 2 1

 0 −1 1   u3   ∆xe   q22   q22 


− f
 λ 
Steps in the finite element method

• STEP 5: Imposition of boundary conditions

• Dirichlet condition
us = uˆ s
k ss = 1, f s = uˆ s , fˆi = fi − kis uˆs , k is = ksi = 0

•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

 ( ∆ xe ) 
2

 − f 
 2λ 
1 0 0   u1     q11 
( ∆ xe )
2
0       
 2 − 1  u 2  =  − f + u0 + 0
   λ  0
 0 −1 1   u 3   
 ( ∆ x )2 q ∆xe 
− e
f + 
 2λ λ 
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

Finite Finite
Exact
Element Difference

u1
0 0 0
(@ x=0)

u2
0.625 0.625 0.625
(@ x=0.5)

u3
1.5 1.5 1.5
(@ x=1.0)
Results

1.6
1.4
Exact Solution
1.2 Finite Element solution
displacement, u

Finite Element solution


1

0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2
spatial co-ordinate, x
FEM and FDM

•FDM is a direct method- replaces •FEM is an indirect method- works on a


•differential equations by a difference weak form
approximations

•Based on rectangular discretisation


•Arbitrary geometry can be modelled
•(can be rectangular, quadrilateral,
triangle)

•Treatment of boundary conditions •Boundary conditions is more


needs extra care systematic

•Making higher order approximation is •Making higher order approximation is


tedious easy
FEM and FDM

• No closed form solution that permits analytical study of the


effects of changing various parameters.

• Good engineering judgement is required


- type of element
- type of difference approximation

• Many input data are required and voluminous output must


be sorted and understood

You might also like