Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

Fundamentals of the Finite Elements Method

Christian Kuschel
University Erlangen-Nuremberg
December 13, 2010
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 1 / 37
Outline
1
Introduction
2
Road to Finite Elements Method
3
The Finite Elements Method
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 2 / 37
Initial Situation
Problem
Solve u = f in numerically
Considerations
u is a function
Transform problem in a linear system of equations
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 3 / 37
Straight-forward Approach
Finite Difference Method
Numerically approximate u = f
Calculate function values at certain points
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 4 / 37
Hooks of Finite Difference Method
Problems
Grid cannot be chosen arbitrarily
u has to be in C
4
()
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 5 / 37
Our Desire
We want . . .
solutions on any domain
solutions independent of mesh shape
solutions with softer constraints
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 6 / 37
Set-up
Initial Problem
Dicult to solve
Hard Constraints
Initial Situation
Solve u = f in numerically
Approach
Analyse properties of u
Use math to reformulate problem
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 7 / 37
What if we found a potential Solution?
Assume . . .
we know true solution u
we solved Poissons equations and got a function z
How can we show that u and z are identical?
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 8 / 37
Intermezzo: Comparison
true solution
derived solution
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 9 / 37
Intermezzo: Comparison
true solution
derived solution
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 9 / 37
Comparison in Mathematics
Equivalence of Functions
Choose a test function v C

0
()
Apply test function to candidates u and z

u vdx =

z vdx, v C

0
If both integrals are equal, we conclude u z
Integration implies u z almost everywhere
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 10 / 37
Conclusion

u vdx =

z vdx

(u z) vdx = 0
Fundamental Theorem of Calculus of Variations

F vdx = 0 F = 0, v C

0
()
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 11 / 37
Reformulating Poissons Equation
Applying Fundamental Theorem of Calculus of Variations
Consider u = f in
Multiplying with v and integration yields

u vdx =

f vdx
Implications on Laplaces Equation
f = 0
We immediately derive

u vdx = 0 u = 0
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 12 / 37
Impact on Laplaces Equation
Removing second Derivatives
Alternative formulation of Laplaces equation:

u vdx = 0, v C

0
()
Remember: u := (u)
Integration by parts yields (divergence theorem):

u vdx

u vd = 0
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 13 / 37
Properties of u revisited
Weak Formulation

u vdx =

u vdx = 0, v C

0
()
Only rst derivative required
In particular, only weak derivatives are required
Soften Restrictions on u
u must have one weak derivative
u and u must be square integrable
We conclude: u W
1,2
()
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 14 / 37
Stopover
Weak Formulation
Soften Constraints
Solvable?
Initial Problem
Dicult to solve
Hard Constraints
Achievements
We derived an alternative formulation for our problem
We softened restrictions of the solution
So far we ended up with a solution in W
1,2
()
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 15 / 37
Eye on Vector Spaces
The Sobolev Space W
1,2
()
contains functions which are differentiable once
contains functions which are square integrable
The Hilbert Space H
1
()
has scalar product ,
has innetely many dimenions
has always a basis
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 16 / 37
Solution in the Hilbert Space

u vdx = 0, u, v H
1
()
Operator notation
Dene scalar product:
u, v :=

H
1
() H
1
() R
(u, v)

u vdx
Introducing an operator: a(u, v) := u, v
New formulation: a(u, v) = 0
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 17 / 37
Assembling all Pieces
Lax-Milgrams Theorem
a(u, v) = f (v) has always a unique solution in H
1
()
f must be a continuous and linear operator
Conclusions
a(u, v) = 0 is equivalent to Laplaces equation
a(u, v) = f (v) is equivalent to Poissons equation
Both equations have a unique solution
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 18 / 37
What did we gain?
Weak Formulation
Soften Constraints
Solvable!
Initial Problem
Dicult to solve
Hard Constraints
We softened the restrictions of the solution
Our problem always has a unique solution now
How do we calculate the solution?
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 19 / 37
Galerkins Method
Idea
Express u by linear combination of a
basis in H
1
()
u
Recall
There always exists a basis in H
1
()
H
1
() has innitely many dimensions
Approximate H
1
() with a nite basis
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 20 / 37
Approximation of the Hilbert Space
Recall
Find u such that a(u, v) = f (v) holds
Approach
Choose n basis functions
i
Express u w.r.t.
i
: u
h
=

i

i

i
Express v w.r.t.
i
: v
h
=

i

i

i
a and f can be expressed in terms of
i
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 21 / 37
Operator Notation revisited
Reformulation
Applying linear combination and linearity of a:
a(u
h
, v
h
) =
n

i =1
n

j =1

i
a(
j
,
i
) =
n

i =1

i
f (
i
)
Weak formulation holds for all v, we choose one suitable v
We arrive at a linear system of equations:
n

j =1
a(
j
,
i
)
j
= f (
i
)
We get Au = f
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 22 / 37
Finding a Solution
Procedure
1
Choose any basis functions
i
from H
1
()
2
Set up and solve linear system of equations
Considerations
Can we choose any function from H
1
()?
Yes, but A may be ill-conditioned and dense
Remember: a(
j
,
i
) =

j

i
dx
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 23 / 37
Example
y = 1
y = x
y = x
2
u
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 24 / 37
Review
Weak Formulation
Soften Constraints
Solvable
Initial Problem
Dicult to solve
Hard Constraints
LSE
Achievements
We reformulated our problem
We found a linear system of equations which solves our problem
We are still unhappy with the basis functions
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 25 / 37
Basis Functions revisited
y = 1
y = x
y = x
2
u
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 26 / 37
Basis Functions revisited
u
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 26 / 37
Discretizing the Domain

C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 27 / 37


Finite Elements Discretization
Triangularize domain
Basis functions which are non-zero in small parts of the domain
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 28 / 37
Focus on a single Element

One pyramid function

Pyramid functions on single


element
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 29 / 37
Solving the Problem on one Element

1
2
3
* * *
* * *
* * *
1
2
3
1 2 3
Observations
Solve a(
j
,
i
) = f (
i
) locally
Local solution has only local inuence
We get a local matrix
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 30 / 37
Assembling Elements
* * *
* * *
* * *
*
*
*
* *
*
*
*
*
Assembling A
Transfer local matrix entries to global matrix
A is sparse symmetric positive-denite
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 31 / 37
Reminder
Weak Formulation
Soften Constraints
Solvable
Initial Problem
Dicult to solve
Hard Constraints
LSE
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 32 / 37
Improving the Approximation
u
u
h
u
u
h
How to obtain better Approximations
Choose more basis functions
Choose higher order basis functions
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 33 / 37
Evaluation of the Solution
How good is our solution?
We found approximated u
h
solving Poissons equation
Due to the fundamental theorem of calculus of variations u
h
u
Boundary conditions can be incorporated too
Does Finite Elements Method work for all PDEs?
It works well for elliptic PDEs
Connection between strong and weak formulation is essential
Finite Elements Method can be extended for hyperbolic PDEs
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 34 / 37
Summary
Weve discussed . . .
how to obtain the weak formulation
how we can nd a solution
how to choose suitable basis functions
how to solve the problem
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 35 / 37
Thank you for listening!
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 36 / 37
Sources
1 Strang, Fix: An Analysis of the Finite Element Method. Second
edition, Wellesley-Cambridge Press, 2008.
2 Knabner, Angermann: Numerical Methods for Elliptic and
Parabolic Partial Differential Equations. Springer, 2003.
3 Lecture notes from Simulation and Scientic Computing 2,
summer term 2010.
C. Kuschel (FAU Erlangen) Fundamentals of FEM 12/13/2010 37 / 37

You might also like