-
Boundary Value Problems Finite Element Method
Introduction to the Finite Element MethodLecture 02 & 03
P.S. Koutsourelakis
[email protected] Hollister Hall
August 30 - September 13 2010Last Updated: September 13,
2010
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Boundary Value Problem
Example
Consider a bar of length L, cross-sectional area A which is held
fixed on theleft end and pulled with a force F on the right end and
stretched with adistributed force b(x) along its length. Whats will
be the deformation of thebar u(x) at each point x?
A
b(x)
Fu(x)
LBoundary Value Problem (BVP)
EAd2 u(x)
dx2+ b(x) = 0 x (0,L)
with boundary conditions: u(0) = 0, E A dudx |x=L = F
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Boundary Value Problem
Boundary Value Problem (BVP)
EAd2 u(x)
dx2+ b(x) = 0 x (0,L)
with boundary conditions: u(0) = 0, E A dudx |x=L = FAlthough it
is straightforward to derive a closed-form solution(right?) things
are not necessarily so if:
elastic modulus varies E(x)cross-sectional area varies A(x)if we
are considering two or three dimensional versions witharbitrary
boundary shapes/conditions.
we need a general computational method that is able to
produceefficiently, accurate solutions of BVPs.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Boundary Value Problem
Boundary Value Problem (BVP)
EAd2 u(x)
dx2+ b(x) = 0 x (0,L)
Approximate derivatives with finite differences, i.e.:
dudx = limh0
u(x+h/2)u(xh/2)h
u(x+h/2)u(xh/2)h for 0 < h
-
Boundary Value Problems Finite Element Method
Boundary Value Problem
Boundary Value Problem (BVP)
EAd2 u(x)
dx2+ b(x) = 0 x (0,L) (1)
define N grid points xi = i h where h = LN and let ui =
u(xi)
if h is small enough then I can approximate:
d2 u(x)dx2
|x=xi ui+1 2ui + ui1
h2
substitute in Equation (1) for x = xi , i to obtain N
algebraicequations w.r.t N unknowns ui .
this is the the Finite Difference Method
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Finite Difference Method (FDM)
Ed2 u(x)
dx2+ b(x) = 0 x (0, L)
(discretization)
EAui+1 2ui + ui1
h2+ b(xi) = 0 xi , i = 1, 2, . . . ,N
Observe that in FDM we approximate the PDE itself
FDM is still used in a wide range of problems and we will use it
intime-dependent problems to discretize time-derivatives.
In the Finite Element Method (FEM) we approximate the solutionof
an equivalent form of the PDE.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Finite Element Method
Figure: The FREU(E)D roadmap to Finite Elements
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Finite Element Method
Roadmap to FEM approximations:1 Function Spaces: We are going to
define where we are going to to be
looking for solutions, i.e. which function space2 Reformulate:
We are going to reformulate the original problem, i.e.
the PDE and Boundary Conditions - Weak form.3 Equivalence: We
are going to show that this new form is actually
equivalent to the original, i.e. any solution of the former is a
solution ofthe latter and vice versa.
4 Unique: We are going to show that the solution is unique.5
Equivalence 2: We are going to look at some equivalent forms
which
can be considered as special cases.6 Discretization: We are
going to propose ways to discretize all these
equivalent [email protected] Cornell UniversityLecture 02
& 03
-
Boundary Value Problems Finite Element Method
Function Spaces
Since we are going to be approximating solutions of PDEs i.e.
functions,it makes sense to recap some of the basic function spaces
and theirproperties. If is an open subset of R (or Rn) in general,
then:C() contains all functions defined on which are continuous.Ck
() contains all functions defined on which have
continuousderivatives up to order k .Ckb () same as C
k () plus the function is boundedL2() contains all functions
defined on which are square integrablei.e.:
u2(x) dx < +
H1() contains all functions in L2 whose derivatives are also
squareintegrable i.e.:
|du/dx |2(x) dx < +
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Function Spaces
Boundary Value Problem (BVP)
EAd2 u(x)
dx2+ b(x) = 0 x (0, L)
with boundary conditions: u(0) = u0, E A dudx |x=L = F
We are going to look for solutions in the trial or candidate
solution spaceS:
S = {u(x) : (0, L) R|u(0) = u0,
(0,L)E A
du(x)dx
2
dx < +}
Observe that:
u S satisfy exactly only one of the two boundary conditions.
ThisBC is called essential.u S have finite strain energy!u S are
continuous and bounded.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Function Spaces
Boundary Value Problem (BVP)
EAd2 u(x)
dx2+ b(x) = 0 x (0, L)
with boundary conditions: u(0) = u0, E A dudx |x=L = FWe are
going to look for solutions in the space S:
S = {u(x) : (0, L) R|u(0) = u0,
(0,L)E A
du(x)dx
2
dx < +}
Observe that:The space S is much larger than what the PDE and BC
wouldimply.Even though a 2nd order derivative of appears in the
BVP, we arelooking for solutions that are guaranteed to have a 1st
orderderivative.Even though a force BC must be satisfied, we are
looking forsolutions that are not a priori guaranteed to satisfy
it.
we have RELAXED already the original [email protected]
Cornell UniversityLecture 02 & 03
-
Boundary Value Problems Finite Element Method
Finite Element Method
Roadmap to FEM approximations:1 We are going to define where we
are going to to be looking for solutions,
i.e. which function space
2 We are going to reformulate the original problem, i.e. PDE and
BC.
3 We are going to show that this new form is actually equivalent
to theoriginal, i.e. any solution of the former is a solution of
the latter and viceversa.
4 We are going to show that the solution is unique.
5 If that wasnt enough, we are going to look at some equivalent
formswhich can be considered as special cases.
6 We are going to propose ways to discretize all these
equivalent forms.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Weak FormsBoundary Value Problem (BVP)
EAd2 u(x)
dx2+ b(x) = 0 x (0, L) (2)
with boundary conditions: u(0) = u0, E A dudx |x=L = F
We are going to look for solutions in the space S:
S = {u(x) : (0, L) R|u(0) = u0,
(0,L)E A|
dudx
|2(x) dx < +}
An arbitrary u S will not satisfy Equation (2) exactly (unless
it is thesolution) and in general there will be a residual R(x)
R(x) = EAd2 u(x)
dx2+ b(x) 6= 0
There will also be a residual R(L) = E A dudx |x=L F because u S
donot a priori satisfy this BC
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Weak Forms
How can we make those residuals zero?
R(x) = EAd2 u(x)
dx2+ b(x) R(L) = F EA
dudx
|x=L
(Bubnov)-Galerkin approach
Figure: Boris Galerkin (1871-1945)
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Weak Forms
How can we make those residuals zero?
R(x) = EAd2 u(x)
dx2+ b(x) R(L) = F EA
dudx
|x=L
(Bubnov)-Galerkin or Weighted Residual approach: define another
setof functions called weight functions w W:
W = {w(x) : (0, L) R|w(0) = 0,
(0,L)E A|
dw(x)dx
|2 dx < +}
Find u S such that for all w W:
L0 w(x)R(x) dx = 0
w(L)R(L) = w(L)(F EA dudx |x=L
)= 0
Note that the residual is not zero in the STRONG sense i.e.R(x)
= 0 x but the condition is enforced WEAKLY as above.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Weak Forms
After some mainipulation (see Integration by parts)
STRONG form:
EA d2 u(x)dx2
+ b(x) = 0u(0) = u0F = EA dudx |x=L
WEAK form:{ L
0 EAdudx
dwdx dx =
L0 b(x)w(x)dx + w(L)F w W
u S
Does the weak form remind you of something?
Principle of Virtual WorkThe necessary and sufficient condition
for a system in equilibrium is thatthe work done by internal forces
should be equal to the work done byexternals loads for any
kinematically acceptable virtual displacement
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Weak Forms
WEAK form:{ L
0 EAdudx
dwdx dx =
L0 b(x)w(x)dx + w(L) F w W
u S
Principle of Virtual Work:a virtual kinematically acceptable
displacement w(x) is one thatdoes not violate displacement boundary
conditions u(0) = u0, i.e.w(0) = 0.Work of internal forces:
Wint(w) = A
u(x)
stress from u
w (x)
strain from w
dx = A
Edudx
dwdx
dx
Work of external forces:
Wext(w) =
b(x) w(x) dx + F w(L)
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Finite Element Method
Roadmap to FEM approximations:1 We are going to define where we
are going to to be looking for solutions,
i.e. which function space
2 We are going to reformulate the original problem, i.e. PDE and
BC.
3 We are going to show that this new form is actually equivalent
to theoriginal, i.e. any solution of the former is a solution of
the latter and viceversa.
4 We are going to show that the solution is unique.
5 If that wasnt enough, we are going to look at some equivalent
formswhich can be considered as special cases.
6 We are going to propose ways to discretize all these
equivalent forms.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Equivalence of Strong and Weak forms
Equivalence of Strong and Weak forms
A) Strong Weak:
EA u,xx + b(x) = 0
(EA u,xx + b(x))w(x)dx = 0 w W
[EA u,x v ]
L0
EA u,x v,x dx
+
b(x)w(x)dx = 0
EAu,x(L)w(L)
EA u,x v,x dx
+
b(x)w(x)dx = 0 (since w(0) = 0)
Fw(L)
EA u,x v,x dx
+
b(x)w(x)dx = 0 (since EAu,x(L) = F )
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Equivalence of Strong and Weak forms
Equivalence of Strong and Weak forms
B) Weak Strong:
L
0EA
dudx
dwdx
dx = L
0b(x)w(x)dx + w(L)F w W
w(L)(F EAu,x(L)) + [EA u,x w ]
L0
EA u,x w,x dx
+
b(x)w(x)dx = 0 (since w(0) = 0)
w(L)(F EAu,x(L)) +
(EA u,xx + b(x))w(x)dx = 0 w W
Take w(x) = (EA u,xx + b(x)) x(L x)
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Equivalence of Strong and Weak forms
Finite Element Method
Roadmap to FEM approximations:1 We are going to define where we
are going to to be looking for solutions,
i.e. which function space
2 We are going to reformulate the original problem, i.e. PDE and
BC.
3 We are going to show that this new form is actually equivalent
to theoriginal, i.e. any solution of the former is a solution of
the latter and viceversa.
4 We are going to show that the solution is unique.
5 If that wasnt enough, we are going to look at some equivalent
formswhich can be considered as special cases.
6 We are going to propose ways to discretize all these
equivalent forms.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Uniqueness
Uniqueness
Suppose u1, u2 S that satisfy the weak form: L
0 EAdujdx
dwdx dx =
L0 b(x)w(x)dx + w(L) F v W, j = 1, 2
L
0 EA(du1dx
du2dx )
dwdx = 0
Let w = u1 u2 (is this a legitimate member of W?) L
0EA(
du1dx
du2dx
)2dx = 0
du1dx
du2dx
= 0
u1(x) u2(x) = C
u1(x) = u2(x) (since u1(0) = u2(0) = u0)
Note what happens if only force BC are [email protected]
Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Uniqueness
Finite Element Method
Roadmap to FEM approximations:1 We are going to define where we
are going to to be looking for solutions,
i.e. which function space
2 We are going to reformulate the original problem, i.e. PDE and
BC.
3 We are going to show that this new form is actually equivalent
to theoriginal, i.e. any solution of the former is a solution of
the latter and viceversa.
4 We are going to show that the solution is unique.
5 If that wasnt enough, we are going to look at some equivalent
formswhich can be considered as special cases.
6 We are going to propose ways to discretize all these
equivalent forms.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Alternative/Special Forms
Alternative/Special FormsLets rewrite the weak form (i.e
principle of virtual work in mechanics):
L0 EA
dudx
dwdx dx =
L0 b(x)w(x)dx + w(L) F v W
u Sw W
more compactly as:
a(u,w) = f (w) w W
where:- a(u,w) =
L0 EA
dudx
dwdx dx
- f (w) = L
0 b(x)w(x)dx + w(L) FDefine the functional (i.e. a function of
functions) (u):
(u) =12
a(u, u) f (u)
=12
EA|dudx
|2dx
b(x)u(x)dx u(L) F
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Alternative/Special Forms
Alternative/Special FormsPrinciple of Minimum Potential
Energy:The equilibrium configuration u minimizes the potential
energy of thesystemDoes the solution of the weak form minimize the
potential energy?Consider configurations u = u + w where u S is the
solution of theweak form and w W (note that u S). Then
(u + w) =12
a(u + w , u + v) f (u + w)
=
(12
a(u, u) f (u))
+ (a(u,w) f (w))
+ a(w ,w)
= (u) + 0 + a(w ,w)
(u)
can you show the minimizer u is [email protected] Cornell
University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Alternative/Special Forms
Alternative/Special Forms
STRONG form WEAK form Min. Pot. Energy
the usefulness of the Min. Potential Energy Principle is (at
least)twofold:
By formulating the problem as an optimization problem we canmake
use of all these methods/algorithms that have beendevelopped to
solve them.Since (u) (u) u S we have an error bound. No matterwhat
approximation u of the solution we come up with, its
potentialenergy will always be greater than the potential energy of
the truesolution u.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Alternative/Special Forms
Finite Element Method
Roadmap to FEM approximations:1 We are going to define where we
are going to to be looking for solutions,
i.e. which function space
2 We are going to reformulate the original problem, i.e. PDE and
BC.
3 We are going to show that this new form is actually equivalent
to theoriginal, i.e. any solution of the former is a solution of
the latter and viceversa.
4 We are going to show that the solution is unique.
5 If that wasnt enough, we are going to look at some equivalent
formswhich can be considered as special cases.
6 We are going to propose ways to discretize all these
equivalent forms.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
We started with the PDE and BCs (STRONG form):
EA d2 u(x)dx2
+ b(x) = 0u(0) = u0F = EA dudx |x=L
and derived an equivalent WEAK form (Principle of Virtual
Work):
L0 EA
dudx
dwdx dx =
L0 b(x)w(x)dx + w(L) F v W
u Sw W
and another one (Principle of Minimum Potential Energy)
u = argminuS(u) =12
EA|dudx
|2dx
A b(x)u(x)dx u(L) F
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
We now have to work with integrals (WEAK form) instead of
differential(STRONG form) operators which are more stable in
numericaloperations.
In FEM we discretize the solution in order to find
approximations, i.e.discretize the functions appearing in the weak
forms.
Let S S and W W finite dimensional subsets (approximations)
tothe function spaces of interest.
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
Let S S and W W finite dimensional subsets (approximations)
tothe function spaces of interest.
Example:W = span{Nj(x), j = 1, . . . , n}
i.e. any w(x) W can be written as:
w(x) = c1N1(x) + c2N2(x) + . . .+ cnNn(x)W
WN1(x)
N2(x)
Can we select any Nj(x)? No we have to make sure that Nj(0) = 0
and|dNj(x)/dx |2dx < + since:
W = {w(x) : (0, L) R|w(0) = 0,
(0,L)E A|
dwdx
|2(x) dx < +}
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
What about S S?
S = {u(x) : (0, L) R|u(0) = u0,
(0,L)E A|
dudx
|2(x) dx < +}
We can define a similar approximation using different basis
functions, orwe can simply add a N0(x) such that N0(0) = u0 and
considerapproximations:
u(x) = N0(x) + d1N1(x) + d2N2(x) + . . .+ dnNn(x)
such that:N0(0) = u0
Note that this way: u(0) = u0Note that when u0 = 0 trivially
N0(x) = 0
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
DiscretizationDiscretize Principle of Minimum Potential
Energy:
(u) =12
EA|dudx
|2dx L
0A b(x)u(x)dx u(L) F
or more succintly:(u) =
12
a(u, u) f (u)
Substituting for u:
(u) =12
a(N0(x) +n
i=1
diNi(x), N0(x) +n
j=1
djNj(x)
f (N0(x) +n
j=1
djNj(x)) =12
n
i=1
n
j=1
didj a(Ni(x),Nj(x))
+n
j=1
dj a(N0(x),Nj(x))n
j=1
dj f (Nj(x)) + f (N0(x))
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
DiscretizationDiscretized Principle of Minimum Potential
Energy:
(u) =12
n
i=1
n
j=1
didj a(Ni(x),Nj(x)) +n
j=1
dj a(N0(x),Nj(x))
n
j=1
dj f (Nj(x)) + f (N0(x))
To minimize w.r.t. u:
dj= 0 j = 1, 2, . . . , n
which leads to n equations:
n
i=1
di a(Ni(x),Nj(x)) + a(N0(x),Nj(x)) f (Nj(x)) j
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
DiscretizationDiscretized Principle of Minimum Potential
Energy:
n
i=1
di a(Ni(x),Nj(x)) + a(N0(x),Nj(x)) f (Nj(x)) j
or:K d = F
where:
K =
a(N1(x),N1(x)) . an(N1(x),Nn(x)a(N2(x),N1(x)) .
an(N2(x),Nn(x)
. . .a(Nn(x),N1(x)) . an(Nn(x),Nn(x)
F T = [f (N1(x)) a(N0(x),N1(x)), .., f (Nn(x))
a(N0(x),Nn(x))]
This is also called the Ritz-Galerkin method
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
DiscretizationExample:
EAd2 u(x)
dx2+ b(x) = 0 u(0) = u0, E A
dudx
|x=L = F
with: E = 1, A = 1, L = 1, u0 = 0, F = 1/2, b(x) = x and
solution:
u(x) = x3/6
For n = 2 and:
N1(x) = x N2(x) = x2 u(x) = d1 x + d2 x
2
Since u0, trivially N0(x) = 0
K d = F[ 1
0 1 1dx 1
0 1 2xdx 10 1 2xdx
10 2x 2xdx
] [d1d2
]
=
[ 10 (x) xdx + 1/2 1
0 (x) x2dx + 1/2
]
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
Example:
EAd2 u(x)
dx2+ b(x) = 0 u(0) = u0, E A
dudx
|x=L = F
with: E = 1, A = 1, L = 1, u0 = 0, F = 1/2, b(x) = x and
solution:
u(x) = x3/6
[1 11 4/3
] [d1d2
]
=
[1/61/4
]
[d1d2
]
=
[1/12
1/4
]
u(x) = 1
12x +
14
x2
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1x
-0.05
0
0.05
0.1
0.15
0.2u(
x) -
disp
lace
men
t
exactapproximation
u(1/2) = u(1/2) and u(1) = u(1)
E A dudx |x=L =5
12 6= F =12
(u) = 7288 > (u) = 1
40
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
Discretized WEAK form (Principle of Virtual Work): L
0EA
dudx
dwdx
dx = L
0b(x)w(x)dx + w(L) F w W
or more succintly:a(u, w) = f (w) w W
Substituting for u and w :
a(N0 +n
i=1
diNi(x),n
j=1
cjNj(x)) = f (n
j=1
cjNj(x))
i
j
di a(Ni(x),Nj(x))cj +
j
a(N0(x),Nj(x))
=
j
cj f (Nj(x))
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
n
j=1
cj
(n
i=1
di a(Ni(x),Nj(x)) + a(N0(x),Nj(x)) f (Nj(x))
)
= 0
If this is to hold w(x) =
j cjNj(x), all the coefficient of cj aboveshould be 0:
n
i=1
di a(Ni(x),Nj(x)) + a(N0(x),Nj(x)) f (Nj(x)) = 0 j
K d = F
where:
K is a n n matrix such that: Ki,j = a(Ni (x), Nj (x)) = EA
L0
dNidx
dNjdx dx
d is a n-dimensional vector of djF is a n-dimensional vector
such that Fj = f (Nj (x)) a(N0(x), Nj (x))
[email protected] Cornell University
Lecture 02 & 03
-
Boundary Value Problems Finite Element Method
Discretization
Discretization
Observe that if the same basis functions are used for S and
Wthen the resulting system from the Principle of Virtual Work:
is symmetriccoincides with the system arising from the Principle
of MinimumPotential Energy.
This is also called the Bubnov-Galerkin method.Note however that
the WEAK form does not require that thesame basis functions are
used for S and W .For example in the previous problem, one could
use:
u(x) = d1x + d2x2 and w(x) = c1x2 + c2x3
The resulting system will still be valid but non-symmetricThis
is also called the Petrov-Galerkin method
[email protected] Cornell University
Lecture 02 & 03
Boundary Value ProblemsFinite Element MethodEquivalence of
Strong and Weak formsUniquenessAlternative/Special
FormsDiscretization