A Finite Element Method Tutorial
A Finite Element Method Tutorial
Kathryn Gillow
Computational Biology Group
11th January 2005
Overview
Finite element methods the basics
Adaptive finite element methods
Applications
Conclusions
Exact solution
Model problem:
into subintervals
FEM idea: split the interval
(elements) and approximate the solution by a polynomial on
each subinterval.
Solutions
Continuous FEM solution
0.9
0.9
0.8
0.8
0.7
0.7
0.6
0.6
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
where
0.9
0.9
0.8
0.8
0.7
0.7
0.6
0.6
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.7
0.8
0.9
0.6
0.2
0.1
10
10
|| uuh ||H1
10
|| uuh ||H1
10
10
10
10
10
10
10
10
10
10
0.9
0.9
0.8
0.8
0.7
0.7
0.6
0.6
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
|| uuDG ||H1
10
10
10
10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.2
1.4
1.6
1.8
2.2
2.4
2.6
2.8
polynomial degree
0.9
0.9
0.8
0.8
0.7
0.7
0.6
0.6
10
10
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
|| uuh ||H1
0.5
10
10
10
10
10
10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.5
2.5
3.5
4.5
polynomial degree
Convergence
where
in
on
on
Then
so by Greens theorem
such
, then
Choose
for all
Key idea
Expand
as a linear combination of the finite element
basis functions leads to a (sparse) linear system to solve
for the coefficients:
Continuous or discontinuous?
Continuous is simpler.
For a given mesh a continuous method is cheaper.
0.4
0.4
0.35
0.35
0.3
0.3
0.25
0.25
0.2
0.2
0.15
0.15
0.1
0.1
0.05
0.05
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.9
1
0.8
0.8
0.7
0.6
0.6
0.4
0.5
0.4
0.2
0.3
0
1
0.2
0.8
1
0.6
0.1
0.8
0.6
0.4
0.4
0.2
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.2
0
Continuous or discontinuous?
For convectiondominated diffusion problems
numerical stabilisation is needed with the continuous
method but not with the discontinuous method.
1.6
1
1.4
1.2
0.8
1
0.6
0.8
0.6
0.4
0.4
0.2
0.2
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.8
0.6
0.4
0.2
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
to
given by
and an approximation
0.06
0.06
0.05
0.07
mesh
0.8
mesh
Solution
Example
0.7
0.05
0.04
0.6
0.04
0.5
0.03
0.4
0.03
0.3
0.02
0.02
0.2
0.01
0.01
0.1
0
2
0
2
1.5
0
2
1.5
1.5
0.5
0.5
1
0.5
0.5
0
0.5
0
Refined mesh
2
1.5
1
0.5
1.5
1.5
1.8
0.06
1.6
0.05
1.4
0.04
1.2
0.03
1
0.02
0.8
0.01
0.6
0
2
0.4
1.5
2
1.5
1
1
0.5
0.5
0
0.2
0.2
0.4
0.6
0.8
1.2
1.4
1.6
1.8
TOL nele
TOL nele , for
Equidistribution of error:
Refine elements for which
Derefine elements for which
.
some
Given TOL
, an initial mesh
of polynomial degrees , set
An adaptive algorithm
and an initial distribution
and
.
and
3. If
and
such that
such that
In particular
Let satisfy
Then
on
in element
Define
on
Then
where
Example 1
known
known
DGFEM)
Choose
. Final mesh has 287 degrees of
=
.
freedom. Error in
Final mesh with -refinement has 1396 degrees of freedom.
Final mesh using continuous FEM has 11728 degrees of
freedom.
Polynomial degree
1.8
1.6
4
1.4
1.2
1
2
0.8
0.6
1
0.4
0.2
0
0
0
0.5
1.5
10
sqrt(degrees of freedom)
hpDGFEM
hDGFEM
hCGFEM
10
10
10
0.01
0.02
0.03
TOL
0.04
0.05
0.06
10
hpDGFEM
hDGFEM
hCGFEM
3
10
CPU time
10
10
10
10
0.01
0.02
0.03
TOL
0.04
0.05
0.06
Example 2
Choose
and
of freedom. Error in
5
3.5
1
4
0.8
0.6
2.5
3
0.4
2
2
0.2
0
4
1.5
3
0.5
2
0
0
0
4
3
0.5
1.5
2.5
3.5
1
0
Choose
and
degrees of freedom. Error in
5
3.5
1
4
0.8
0.6
2.5
3
0.4
2
2
0.2
0
4
1.5
3
0.5
0
0
0
4
3
0.5
1.5
2.5
3.5
1
0
electrolyte:
membrane:
sample:
Example 3
Solutions:
1
0.8
0.6
0.4
0.2
0
10
8
10
6
8
6
4
4
2
0
polynomial degree
Primal Mesh Number 3 with 7253 degrees of freedom
5
4.5
3.5
3
2.5
2.5
2
2
1.5
1.5
0.5
0.5
0
Solutions:
1
0.8
0.6
0.4
0.2
0
10
8
10
6
8
6
4
4
2
0
polynomial degree
Primal Mesh Number 6 with 8836 degrees of freedom
5
4.5
3.5
3
2.5
2.5
2
2
1.5
1.5
0.5
0.5
0
CGFEM
Approx
DGFEM
0.5
1.0
24.45
0.5141
0.5301
34811
0.5216
6996
0.5
1.0
1.22
0.9665
1.0157
14668
0.9935
7253
2.0
4.0
84.11
0.6672
0.6833
41914
0.6788
7030
2.0
4.0
24.45
0.7530
0.7758
16007
0.7611
7054
2.0
4.0
1.53
0.9683
1.0113
13291
0.9805
7166
2.0
2.5
19.00
0.8667
0.8847
24132
0.8776
26226
2.0
2.5
1.22
0.9942
1.0185
21644
1.0070
26282
Current
Comparison of results
Current
DOF
Current
DOF
Summary
Described an adaptive finite element algorithm for
computing solutions of PDEs (or linear functionals of
these solutions) to within a specified tolerance.
-refinement
References
K ENNETH E RIKSSON , D ON E STEP, P ETER H ANSBO &
C LAES J OHNSON .
Introduction to Adaptive Methods for Differential Equations.
Acta Numerica (1995) 105158.
C LAES J OHNSON .
A New Paradigm for Adaptive Finite Element Methods.
The Mathematics of Finite Elements and Applications
(1994) Chapter 6.