Professional Documents
Culture Documents
Objective
• Commercial packages
Course coverage
• Examples
WHY FEM ?
Simple Example
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
• For constant λ
u l +1 − 2 u l + u l −1
λ = fl l = 1..L
∆x 2
Finite difference formulation
• Combining
uL − uL−1 1
q − λL−1/2 = f L ∆x
∆x 2
Finite difference formulation
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
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.
N N
• Approximate solution uˆ = ∑φ
k =0
k uk = φ0 + ∑φ
k =1
k uk
∫Ω
wl rΩ = 0 l = 1, 2..., n
Trial solution procedure
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 =
2λ
q− f f 2
u = u0 + x+ x
λ 2λ
Galerkin method-limitations
?
Steps in the finite element method
∆ xe
x0 = 0 x 1 x e −1 xe xL = 1
---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
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
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
where
xe − x x − xe −1
φ =e
φ 2e =
∆ xe ∆ xe
1
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
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,
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
∆ 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
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
∆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
• Dirichlet condition
us = uˆ s
k ss = 1, f s = uˆ s , fˆi = fi − kis uˆs , k is = ksi = 0
•Neumann condition
( ∆ 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 7: Postprocessing
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
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