You are on page 1of 25

Intro to FEM

Soren
Boettcher
Introduction to the Finite Element Method
Soren Boettcher
09.06.2009
Intro to FEM
Soren
Boettcher
Outline
Motivation
Partial Dierential Equations (PDEs)
Finite Dierence Method (FDM)
Finite Element Method (FEM)
References
Intro to FEM
Soren
Boettcher
Motivation
Figure: cross section of the room
(cf. A. J ungel, Das kleine Finite-Elemente-Skript)
Situation:
R
2
- room
D
1
- window
D
2
- heating
N
1
- isolated walls, ceiling
N
2
- totally isolated oor
- temperature
Intro to FEM
Soren
Boettcher
Motivation
Conservation of energy:
_
T
0
_

0
c
e

t
dx dt =
_
T
0
_

d
x
dt +
_
T
0
_

f dx dt
Heat equation:

0
c
e

t
div() = f in for t > 0
Assumptions:
no time rate of change of the temperature, i.e.

t
= 0
no interior heat source/sink, i.e. f = 0
= 1
Intro to FEM
Soren
Boettcher
Motivation
Model:
= 0 in
=
W
on D
1
=
H
on D
2
= 0 on N
2
+ (
W
) = 0 on N
1
Example:

W
= 10

H
= 70

C
= 0.05
Figure: temperature distribution
in the heated room
(cf. A. J ungel, Das kleine Finite-Elemente-Skript)
Intro to FEM
Soren
Boettcher
Partial Dierential Equations (PDEs)
Second-order PDEs
Elliptic PDE (stationary) e.g. Poisson Equation (scalar)
u = f in
or stationary elasticity (vector-valued)
div() = f in
Parabolic PDE e.g. heat equation

div() = f in (0, T)
Hyperbolic PDE e.g. instationary elasticity
u

div() = f in (0, T)
Intro to FEM
Soren
Boettcher
Classication of PDEs
Linear PDE

= f in (0, T)
Semilinear PDE

= f () in (0, T)
Quasilinear PDE

div(()) = f in (0, T)
Fully nonlinear PDE

g() = f in (0, T)
Intro to FEM
Soren
Boettcher
Boundary Conditions (BCs)
Dirichlet BC (rst kind, essential BC)
u = g on
Neumann BC (second kind, natural BC)
u =
u

= g on
Robin BC (Cauchy BC, third kind)
u

+ u = g on
Intro to FEM
Soren
Boettcher
Methods for solving PDEs
Analytical Methods for PDEs / Existence and Uniqueness
Method of Separation of Variables
Method of Eigenfunction Expansion
Method of Diagonalisation (Fourier Transformation)
Method of Laplace Transformation
Method of Greens Functions
Method of Characteristics
Method of Semigroups
Variational Methods (e.g. Galerkin Approximation)
Intro to FEM
Soren
Boettcher
Methods for solving PDEs
Numerical Methods for PDEs
Finite Dierence Method (FDM)
pointwise approximation of the dierential equation
geometry is divided into an orthogonal grid
Finite Element Method (FEM)
powerful computational technique for the solution of
dierential and integral equations that arise in various
elds of engineering and applied sciences
dierential equations will be solved with an equivalent
variation problem
geometry must be divided into small elements
problem is solved by choosing basis functions which are
supposed to approximate the problem
Intro to FEM
Soren
Boettcher
FDM
Consider
u = f in , u = 0 on
Idea:
approximate dierential quotients by dierence quotients
reduce dierential equation to algebraic system
Assumptions:
= (0, 1)
2
equidistant nodes (x
i
, y
j
) (i , j = 0, . . . , N) with
h = x
i +1
x
i
= y
i +1
y
i
Taylor Expansion
u(x
i +1
, y
j
) = u(x
i
, y
j
) +
u
x
(x
i
, y
j
)h +
1
2

2
u
x
2
(x
i
, y
j
)h
2
+O(h
3
)
u(x
i 1
, y
j
) = u(x
i
, y
j
)
u
x
(x
i
, y
j
)h +
1
2

2
u
x
2
(x
i
, y
j
)h
2
+O(h
3
)
Intro to FEM
Soren
Boettcher
FDM
Second-order centered dierence

2
u
x
2
=
1
h
2
_
u(x
i +1
, y
j
) 2u(x
i
, y
j
) + u(x
i 1
, y
j
)
_
+O(h)

2
u
y
2
=
1
h
2
_
u(x
i
, y
j +1
) 2u(x
i
, y
j
) + u(x
i
, y
j 1
)
_
+O(h)
Approximation of u
u(x
i
, y
j
)
1
h
2
_
u
i +1,j
+ u
i 1,j
+ u
i ,j +1
+ u
i ,j 1
4u
ij
_
Find u
ij
= u(x
i
, y
j
) s.t.
u
i +1,j
u
i 1,j
u
i ,j +1
u
i ,j 1
+ 4u
ij
= h
2
f
ij
, (x
i
, y
j
)
u
ij
= 0, (x
i
, y
j
)
whereas f
ij
= f (x
i
, y
j
)
Intro to FEM
Soren
Boettcher
FDM
Linear system of equations:
U
k
:= u
ij
, F
k
:= f
ij
with k = iN + j leads to AU = F
A =
1
h
2

A
0
I 0
I A
0
I
.
.
.
.
.
.
.
.
.
I A
0
I
0 I A
0

, A
0
=
1
h
2

4 1 0
1 4 1
.
.
.
.
.
.
.
.
.
1 4 1
0 1 4

Disadvantages of FDM
complex (or changing) geometries and BCs
existence of third derivatives
f not continuous
Intro to FEM
Soren
Boettcher
FEM
Consider
u = f in , u = 0 on
Trick: transform PDE into equivalent variational form
Multiplication with arbitrary v X and integration over
_

fv dx =
_

div(u)v dx
=
_

vu dx
. .
=0
+
_

uv dx
Find u X: v X
_

uv dx =
_

fv dx
Intro to FEM
Soren
Boettcher
FEM
Approximation: Find solution of a nite dimensional problem
Let (X
h
)
h0
a sequence of nite dimensional spaces with
X
h
X (h 0) and elements of X
h
vanish on
Find u
h
X
h
s.t. v X
h
_

u
h
v dx =
_

fv dx
Let {
i
}
i =1,...,N
a basis of X
h
. The ansatz
u
h
(x) =

N
i =1
y
i

i
(x) and the choice v =
j
lead to
N

i =1
y
i
_

j
dx
. .
=:A
ij
=
_

f
j
dx
. .
=:F
j
, j = 1, . . . , N
Intro to FEM
Soren
Boettcher
FEM
Linear system of equations:
N

i =1
A
ij
y
i
= F
j
, j = 1, . . . , N
Notation:
A - stiness matrix
F - force vector
y
i
= u
h
(x
i
) - solution vector
Questions: What about X, X
h
, {
i
}
i =1,...,N
?
Hint: choose basis s.t. as much as possible A
ij
= 0!
(A less costly to form, Ay = F can be solved more eciently)
Intro to FEM
Soren
Boettcher
FEM
Idea: discretise the domain into nite elements and dene basis
functions which vansih on most of these elements
1D: interval
2D: triangular/quadrilateral shape
3D: tetrahedral, hexahedral forms
Ansatz functions:
support of basis functions as small as possible and number
of basis functions whose supports intersect as small as
possible
use of piecewise (images of) polynomials
Intro to FEM
Soren
Boettcher
FEM
Example:
R
2
bounded Lipschitz domain, f L
2
()
X = H
1
0
()
Triangulation of by subdividing into a set
T
h
= {K
1
, . . . , K
n
} of non-overlapping triangles K
i
s.t. no
vertex of a triangle lies on the edge of another triangle
=
KT
h
K
Mesh parameter h = max
KT
h
diam(K)
X
h
:= {u
h
C(, R): u
h
piecewise linear, u
h
= 0 on }
Linear elements in 1D:

i
(x) =
_

_
xx
i 1
x
i
x
i 1
, x
i 1
x x
i
x
i +1
x
x
i +1
x
i
, x
i 1
x x
i
0 , otherwise
, i = 1, . . . , N 1
Intro to FEM
Soren
Boettcher
FEM
Figure: basis of 1D linear nite elements (cf. T. M. Wagner, A very short
introduction to the FEM)
Figure: linear nite elements in 1D (cf. T. M. Wagner, A very short introduction to the
FEM)
Intro to FEM
Soren
Boettcher
FEM
Figure: basis function of 2D linear nite elements (cf. T. M. Wagner, A very
short introduction to the FEM)
Linear or high-order elements?
Advantages: small error, better approximation, fast error
convergence, less computing time for same error
Disadvantages: larger matrix for same grid, no
conservation of algebraic sign
Intro to FEM
Soren
Boettcher
FEM
Matrix A is large, but sparse: only a few matrix elements are
not equal to zero
(intersection of the support of basis function is mostly empty)
A symmetric, positive denit unique solution
Linear system of equations: many methods in numerical linear
algebra exist to solve linear systems of equations
direct solvers (Gaussian elemination, LU decomposition,
Cholesky decomposition): for N N matrix N
3
operations
iterative solvers (CG, GMRES, . . . ): N operations for
each iteration
Runge-Kutta methods (ODEs for unsteady problems)
Intro to FEM
Soren
Boettcher
FEM
Standard Error Estimation (P
k
-elements, u suciently smooth):
__

|u u
h
|
2
dx
_
1
2
c h
k+1
__

|D
k+1
u|
2
dx
_
1
2
__

|u u
h
|
2
dx
_
1
2
c h
k
__

|D
k+1
u|
2
dx
_
1
2
Consistency: exact solution solves approximate problem but for
error that vanishes as h 0
Stability: errors remain bounded as h 0
Convergence: approximate solution must converge to a solution
of the original problem for h 0
suitable for adaptive method
Intro to FEM
Soren
Boettcher
Model Algorithm of the FEM
1 Transformation of the given PDE via the variational principle
2 Selection of a nite element type
3 Discretization of the domain of interest into elements
4 Derivation of the basis from the discretisation and the chosen
ansatz function
5 Calculation of the stiness matrix and the right-hand side
6 Solution of the linear system of equations
7 Obtainment (and visualisation) of the approximation
Software: ALBERTA, COMSOL, MATLAB, SYSWELD
Intro to FEM
Soren
Boettcher
References
K. Atkinson, W. Han; Theoretical Numerical Analysis.
D. Braess; Finite Elements.
R. Dautray, J.-L. Lions; Mathematical Analysis and Numerical
Methods for Science and Technology, Vol. 6: Evolution Problems II.
C. Grossmann, H.-G. Roos; Numerical Treatment of PDEs.
K. Knothe, H. Wessels; Finite elements.
G. R. Liu, S. S. Quek; The FEM.
M. Renardy, R. C. Rogers; An Introduction to PDEs.
E. G. Thompson; Introduction to the FEM.
Intro to FEM
Soren
Boettcher
Thank you for your attention.

You might also like