Documente Academic
Documente Profesional
Documente Cultură
Mathematics
Diego Mendoza,
PhD.
Introduction
FEM 1D
Advanced Mathematics formulation
May 1, 2017
Advanced
Outline Mathematics
Diego Mendoza,
PhD.
Introduction
FEM 1D
formulation
Introduction
FEM 1D formulation
Advanced
What is the finite element method? Mathematics
Diego Mendoza,
The finite element method (FEM) is a numerical technique PhD.
for solving problems described by partial differential
Introduction
equations.
FEM 1D
formulation
Advanced
Mathematics
Diego Mendoza,
PhD.
A domain of interest is represented by an assembly of finite
elements. A continuous physical problem is transformed into Introduction
Diego Mendoza,
PhD.
Introduction
The main steps in the FEM are:
FEM 1D
1. Discretize the continuum: Divide a solution region into formulation
finite elements.
2. Select interpolation functions: Interpolation functions
are used to interpolate the filed variables over the
element.
3. Find the elemen properties: The matrix equation for the
finite element should be stablished.
4. Assemble the element equations. To Find the global
equation system for the whole solution region we must
assemble all the element equations.
5. Solve the global equation system.
Advanced
Mathematics
Diego Mendoza,
PhD.
Introduction
Suppose we need to solve numerically the following BVP FEM 1D
formulation
u (1) = q, − ux ( 0 ) = h
Diego Mendoza,
A boundary-value problem for PhD.
uxx + f (x ) = 0 on Ω Introduction
FEM 1D
formulation
involves imposing boundary conditions on the function u. There
are many possibilities, a set of them are
u (1) = g , − ux ( 0 ) = h
Diego Mendoza,
PhD.
FEM works with the weak form of the problem. To
define the weak form we need to characterize two classes of Introduction
functions. FEM 1D
formulation
S = {u |u ∈ H 1 , u (1) = q }
Advanced
Mathematics
Diego Mendoza,
PhD.
W = {w |w ∈ H 1 , w (1) = 0}
Diego Mendoza,
PhD.
Introduction
FEM 1D
formulation
Proposition
a Let u be a solution of the strong problem, then u
is also a solution of the weak problem
b Let u be a solution of the weak problem, then u
is a solution of the strong problem.
Thus, by (a) and (b), the strong and weak solutions
are one and the same, consequently the weak and
strong formulations are equivalent.
Advanced
Proof Mathematics
Diego Mendoza,
Let us prove the part (a) of the proposition. Since u is PhD.
write FEM 1D
Z 1 formulation
− w (uxx + f )dx = 0
0
for any w ∈ W . Further development
Z 1 Z 1
− wuxx dx − fdx = 0
0 0
Z 1 Z 1 Diego Mendoza,
1 PhD.
− wuxx dx = − (wux )|0 + ux wx dx
0 0 Introduction
Z 1 Z 1
FEM 1D
− wuxx dx = w (0)ux (0) − w (1)ux (1) + ux wx dx formulation
0 0
Z 1 Z 1 Z 1
− w (uxx + f )dx = −w (0)h + ux wx dx − fdx
0 0 0
Diego Mendoza,
PhD.
Notation Introduction
Z 1
(w , f ) = wfdx
0
a(u, w ) = (w , f ) + w (0)h
Advanced
Galerkin’s approxmation method Mathematics
Diego Mendoza,
PhD.
Introduction
This method aims to obtain approximte solutions to BVP FEM 1D
based upon weak formulations. formulation
Diego Mendoza,
PhD.
Introduction
FEM 1D
formulation
a (w h , u h ) = (w h , f ) + w h (0)h
Advanced
Matrix equations Mathematics
Diego Mendoza,
PhD.
NA (1) = 0, A = 1, . . . , n
n Diego Mendoza,
uh = ∑ dA NA + Nn+1 g
PhD.
A=1 Introduction
FEM 1D
where Nn+1 (1) = 1, and dA ’s are constants. This solution formulation
a (w h , u h ) = (w h , f ) + w h (0)h
yields
!
n n
a ∑ cA NA , ∑ dA NA =
A=1 B =1
!
n
(w h , f ) + w h (0)h − a ∑ cA NA , gNn+1
A=1
Advanced
Further development of these terms Mathematics
Diego Mendoza,
n PhD.
∑ cA GA = 0 Introduction
A=1
FEM 1D
formulation
where
Diego Mendoza,
PhD.
The equation set can be written in concise form as follows:
let Introduction
FEM 1D
formulation
KAB = a(NA , NB )
F A = ( N A , f ) + NA ( 0 ) h − a ( NA , N n + 1 ) g
so GA becomes
n
∑ KAB dB = FA , A = 1, 2, . . . , n
B =1
Kd = F
Advanced
Mathematics
where Diego Mendoza,
K11 · · · K1n PhD.
.. .. ..
K= . . . Introduction
Fn
Diego Mendoza,
PhD.
Introduction
FEM 1D
formulation
Once d is known, uh is obtained
n
u h (x ) = ∑ dA NA (x ) + gNn+1 (x )
A=1
Diego Mendoza,
PhD.
Introduction
FEM 1D
formulation
Diego Mendoza,
PhD.
Introduction
Use Galerkin’s finite element to solve the following BVP FEM 1D
formulation
d 2u
=x 0<x <2
dx 2
with
u (0) = 0 u (2) = 0
First of all we need to transform this problem into its
variational form, that is the weighted residual of the ODE
Z 2 2
d u
w − x dx = 0
0 dx 2
Advanced
Mathematics
we rewrite this expression as
Diego Mendoza,
PhD.
Z 2 2 Z 2
d u
w dx = wxdx Introduction
0 dx 2 0
FEM 1D
formulation
Now we focus on the LHS integral and solve it integrating by
parts
du 2
Z 2 2 Z 2
d u du dw
w dx = w − dx
0 dx 2 dx 0 0 dx dx
Z 2
du dw
=− dx
0 dx dx
du h dw h
=
dx dx
4 4
dN1 dNB dN2 dNB
c1
dx ∑ dB dx
+ c2
dx ∑ dB dx
+
B =1 B =1
4 4
dN3 dNB dN4 dNB
c3
dx ∑ dB
dx
+ c4
dx ∑ dB dx
B =1 B =1
Advanced
and Mathematics
w h x = c1 N1 x + c2 N2 x + c3 N3 x + c4 N4 x Diego Mendoza,
PhD.
Z 2 FEM 1D
du dw formulation
+ wx dx =
0 dx dx
" #
dN1 4
Z 2
dNB
dx B∑
c1 dB + N1 x dx +
0 =1 dx
" #
dN2 4
Z 2
dNB
dx B∑
c2 dB + N2 x dx +
0 =1 dx
" #
dN3 4
Z 2
dNB
dx B∑
c3 dB + N3 x dx +
0 =1 dx
" #
dN4 4
Z 2
dNB
dx B∑
c4 dB + N1 x dx = 0
0 =1 dx
Advanced
Mathematics
Diego Mendoza,
c1 , c2 , c3 , c4 are arbitrary (possitive) constants, then PhD.
Introduction
" #
dN1 4
Z 2
dNB
dx B∑
dB + N1 x dx = 0 FEM 1D
0 =1 dx formulation
" #
dN2 4
Z 2
dNB
dx B∑
dB + N2 x dx = 0
0 =1 dx
" #
dN3 4
Z 2
dNB
dx B∑
dB + N3 x dx = 0
0 =1 dx
" #
dN4 4
Z 2
dNB
dx B∑
dB + N1 x dx = 0
0 =1 dx
dN1 4
Z 2 Z 2
dNB dN1 dN1
0 dx ∑ d B
dx
+ N 1 x dx = d1
0 dx dx
dx Introduction
B =1 FEM 1D
Z 2 Z 2 Z 2 formulation
dN1 dN2 dN1 dN3 dN1 dN4
d2 dx + d3 dx + d4 dx +
0 dx dx 0 dx dx 0 dx dx
Z 2
N1 xdx = 0
0
or
k11 d1 + k12 d2 + k13 d3 + k14 d4 = F1
where
Z 2 Z 2
dNA dNB
kAB = kBA = dx and F1 = − N1 xdx
0 dx dx 0
Diego Mendoza,
PhD.
Introduction
FEM 1D
The equation set of the Galerkin’s formulation becomes formulation
k11 k12 k13 k14 d1 F1
k21 k22 k23 k24 d2 F 2
=
k31 k32 k33 k34 d3 F3
k41 k42 k43 k44 d4 F4
Diego Mendoza,
PhD.
Introduction
FEM 1D
formulation
The shape functions of internal nodes (2 ≤ A ≤ 4) Advanced
Mathematics
x −x Diego Mendoza,
A−1
hA−1 , xA−1 ≤ x ≤ xA
PhD.
Introduction
NA (x ) = xA+h1 −x , xA ≤ x ≤ xA+1 FEM 1D
A formulation
0, elsewhere
Diego Mendoza,
PhD.
Z 2 Z x2 FEM 1D
dN1 dN1 1 1 1 1 formulation
k11 = dx = dx = 2 (x2 − x1 ) =
0 dx dx x1 h1 h1 h1 h 1
(1)2 (−1)2
Z 2 Z x2 Z x3
dN2 dN2 1 1
k22 = dx = dx + dx = +
0 dx dx x1 h12 x2 h22 h1 h2
(1)2 (−1)2
Z 2 Z x3 Z x4
dN3 dN3 1 1
k33 = dx = dx + dx = +
0 dx dx x2 h22 x3 h32 h2 h3
(1)2 (−1)2
Z 2 Z x4 Z x5
dN4 dN4 1 1
k44 = dx = dx + dx = +
0 dx dx x3 h32 x4 h42 h3 h4
Advanced
Mathematics
Diego Mendoza,
PhD.
Z 2 Z x2
dN1 dN1 −1 1 1 Introduction
k12 = k21 = dx = dx = − FEM 1D
0 dx dx x1 h1 h1 h1 formulation
Z 2
dN2 dN2
k13 = k31 = dx =0
0 dx dx
Z 2
dN3 dN3
k14 = k14 = dx =0
0 dx dx
Z 2 Z x3
dN4 dN4 −1 1 1
k23 = k32 = dx = dx = −
0 dx dx x2 h2 h2 h2
Z 2
dN4 dN4
k24 = k42 = dx =0
0 dx dx
Z 2 Z x4
dN4 dN4 −1 1 1
k34 = k43 = dx = dx = −
0 dx dx x3 h3 h3 h3
Advanced
Mathematics
Diego Mendoza,
PhD.
Introduction
FEM 1D
The stiffness matrix for the problem is: formulation
1 1
h1 − h 1
0 0
1 1 1
− h1 + − h12 0
h1 h2
k=
1 1 1 1
0 − h2 h2 + h3 − h3
1 1 1
0 0 − h3 h3 + h4
Advanced
Mathematics
Diego Mendoza,
PhD.
Now, we compute the elements of force vector
Introduction
Z 2 Z x2
x2 − x
FEM 1D
F1 = − N1 xdx = − xdx formulation
0 x1 h1
Z 2 Z x2 Z x3
x − x1 x3 − x
F2 = − N2 xdx = − xdx − xdx
0 x1h1 x2 h2
Z 2 Z x3 Z x4
x − x2 x4 − x
F3 = − N3 xdx = − xdx − xdx
0 x2 h2 x3 h3
Z 2 Z x4 Z x5
x − x3 x5 − x
F4 = − N4 xdx = − xdx − xdx
0 x3 h3 x4 h4
Advanced
Mathematics
Diego Mendoza,
PhD.
Introduction
x23 −x13 x 2 −x 2 FEM 1D
3h1 − x2 22h1 1 formulation
F1 3 3
− x2 −x1 + x x22 −x12 − x x32 −x22 + x33 −x23
F2 3h1 1 2h1 3 2h2 3h2
F= =
F3 3 3
2 2 2 2 3 3
− x3 −x2 + x2 x3 −x2 − x4 x4 −x3 + x4 −x3
F4
3h1 2h2 2h3 3h2
3 3
x −x x 2 −x 2 x 2 −x 2 3
x5 −x4 3
− 43h3 3 + x3 42h3 3 − x5 52h4 4 + 3h4