You are on page 1of 27

FEM 2D

Diego F. Mendoza

FEM 2D

FEM 2D

Diego F. Mendoza

May 12, 2017


FEM 2D
Outline
Diego F. Mendoza

FEM 2D

FEM 2D
FEM 2D
Finite element function for 2D
Diego F. Mendoza

FEM 2D
Basic idea: 1D FEM approximates a curve with a series of
straight-line segments, now we approximate the surface with
a system of triangular flat plates.

It is important to note that the piecewise approximation is


completely defined by the nodal point values.
FEM 2D
Finite element solution approximation
Diego F. Mendoza

FEM 2D

 
a0
u(x, y ) = a0 + a1 x + a2 y = [1 x y ] a1  = mT a

a2
FEM 2D

Diego F. Mendoza
Here a’s are undetermined parameters of the approximating
FEM 2D
function. These coefficients can be determined using nodal
values     
uI 1 0 0 a0
 uJ  = 1 xj yj  a1 
uK 1 xk yk a2
or in compact form
ue = [A]a
The solution of this equation system is

a = [A]−1 ue

so,
u(x, y ) = mT [A]−1 ue
FEM 2D

where   Diego F. Mendoza

D 0 0
1  FEM 2D
[A]−1 = (yj − yk) yk −yj 
D
(xk − xj) −xk xj
where
D = kAk = (xj × yk − xk × yj)
now we can write

Ne = mT [A]−1
and
 
uI
u(x, y ) = [NI (x, y ) NJ (x, y ) NK (x, y )]  uJ 
uK
where Ne = [NI NJ NK ] are shape functions of element e.
FEM 2D

Diego F. Mendoza

FEM 2D
FEM 2D

Diego F. Mendoza

FEM 2D

The shape functions, have identical shapes.

There are three characteristics a shape function has:


1. Each must be linear function of x and y .
2. Each must be equal to unity at the node it
represents.
3. Each must be equal to zero along the opposite
side.
FEM 2D
Additional relations
Diego F. Mendoza

FEM 2D

Gradient of u(x, y )
 ∂u 
∇u = ∂x
∂u
∂y

for a single element, the above terms have the form


 
 ∂u  " ∂NI ∂NJ ∂NK # uI
∇ue = ∂u ∂x = ∂x ∂x ∂x  uJ 
∂NI ∂NJ ∂NK
∂y ∂y ∂y ∂y e u
K e

which can be written in compact form as

∇ue (x, y ) = [N 0 ]e ue
FEM 2D
Weighting function
Diego F. Mendoza

FEM 2D

The weighting function used in the weak form of the


equation is of the form

w (x, y ) = [N] w

and

∇w (x, y ) = [N 0 ] w
where w = [wI wJ wK ]T .
FEM 2D
Summary
Diego F. Mendoza

The shape functions for a triangular area element FEM 2D

1
NI = − [(x − xk)(yk − yj) − (y − yk)(xk − xj)]
D
1
NJ = [x yk − y xk]
D
1
NK = − [x yj − y xj]
D
The derivatives of these shape functions are:
dNI yk−yj dNI xk−xj
dx = − D dy = D
dNJ yk dNK xk
dx = D dy = − D
dNJ yj dNK xj
dx = − D dy = D

D = xj yk − xk yj
FEM 2D
Poison’s equation: FEM approximation
Diego F. Mendoza
Strong form
FEM 2D
   
∂ ∂u ∂ ∂u
kx + ky = −Q(x, y ) in V
∂x ∂x ∂y ∂y

kx ∂u ∂u ∗

∂x + ky ∂y = q on S
u = u∗

where nx , ny are the x and y components of the outward


unit normal vector to S; q∗, u∗ are the boundary values of
the quatities shown.
FEM 2D
Weak form
Diego F. Mendoza

FEM 2D

To obtain the variational form of the PDE, we start writing


the weighted integral of the PDE over the domain
Z      
∂ ∂u ∂ ∂u
w (x, y ) kx + ky + Q(x, y ) dV = 0
v ∂x ∂x ∂y ∂y

Now we use the product rule to rewrite


   
∂ ∂u ∂ ∂u ∂w ∂u
w kx = w − kx
∂x ∂x ∂x ∂x ∂x ∂x
   
∂ ∂u ∂ ∂u ∂w ∂u
w ky = w − ky
∂y ∂y ∂y ∂y ∂y ∂y
FEM 2D

Diego F. Mendoza
and substitute into the integral
FEM 2D
Z     
∂ ∂u ∂ ∂u
w + w dV
V ∂x ∂x ∂y ∂y
Z   Z
∂w ∂u ∂w ∂u
− kx + ky dV + QdV = 0
V ∂x ∂x ∂y ∂y V

We apply the divergence theorem (Green’s theorem) to the


first integral, so that it becomes
Z     
∂ ∂u ∂ ∂u
w + w dV =
V ∂x ∂x ∂y ∂y
Z  
∂u ∂u
w nx + ny dS
S ∂x ∂y
FEM 2D

Diego F. Mendoza

from the boundary condition we write FEM 2D

Z   Z
∂u ∂u
w nx + ny dS = w q ∗ dS
S ∂x ∂y S

Thus, the variational form of the Poisson’s equation

Z   Z Z
∂w ∂u ∂w ∂u
kx + ky dV = w QdV + w q ∗ dS
V ∂x ∂x ∂y ∂y V S

This is the form of the equation to obtain the finite element


approximation.
FEM 2D
Finite element approximation
Diego F. Mendoza
The abbreviated form of the weak form is:
FEM 2D
Z Z Z
∇T w [R] ∇u dV − w Q dV − w q ∗ dS = 0
V V S

where

∂u ∂u T
   
T ∂w ∂w
∇ w= ; ∇u =
∂x ∂y ∂x ∂y

and  
k 0
[R] = x
0 ky
The integral over all domain V and boundary S can be
computed as contributions of finite elements in V and S:
X Z Z Z
∇T w [R]e ∇ue dV − w Qe dV − w qS∗e dS = 0
elements Ve Ve Se
FEM 2D

Diego F. Mendoza

FEM 2D

Finite elements can be separated into contributions on V ,


elements: 1 to 8.
Z Z
T
∇ w [R]e ∇ue dV − w Qe dV
Ve Ve

and contributions over S, formed by the curve which nodes


are : 1, 2, 3, 6, 9, 8, 7 and 4.
Z
− w qS∗e dS
Se
FEM 2D

Now we focus on the V contribution of element e in the Diego F. Mendoza

domain
FEM 2D
Z Z
∇T w [R]e ∇ue dV − w Qe dV
Ve Ve

For this we use the approximating functions


 
 ∂u   ∂NI ∂NJ ∂NK  uI
∇ue = ∂x
∂u = ∂x
∂NI
∂x
∂NJ
∂x
∂NK
 uJ  = [N 0 ]e ue
∂y ∂y ∂y ∂y e uK
e
 
wI
w (x, y ) = [NI NJ NK ]e  wJ 
wK e
 
 ∂w   ∂NI ∂NJ ∂NK  wI
∇we = ∂w∂x = ∂N∂x ∂x ∂x  wJ 
I ∂NJ ∂NK
∂y ∂y ∂y ∂y e w
K e
FEM 2D

Diego F. Mendoza

FEM 2D
We replace these approximation in the first integral
Z Z
T
∇ we [R]e ∇ue dV = weT [N 0 ]T 0
e [R]e [N ]e ue dV
Ve Ve
= weT [K ]e ue

In expanded notation the element stiffness matrix is:


 ∂N ∂NI

I
Z ∂x ∂y   " ∂NI ∂NJ ∂NK #
 ∂NJ ∂NJ  x k 0 ∂x ∂x ∂x
[K ]e =  ∂x ∂y  0 ∂NI ∂NJ ∂NK dV
Ve ∂NK ∂NK k y ∂y ∂y ∂y
∂x ∂y

This is a 3 × 3 matrix.
FEM 2D

Diego F. Mendoza

FEM 2D

The shape functions are linear, therefore the gradients are


constant, so
 ∂N ∂NI

I
∂x ∂y   " ∂NI ∂NJ ∂NK #
 J ∂NJ  x k 0
[K ]e = Ve  ∂N
∂x ∂y  0
∂x
∂NI
∂x
∂NJ
∂x
∂NK
∂NK ∂NK ky ∂y ∂y ∂y
∂x ∂y

Where Ve is the area of the finite element e.


FEM 2D

Diego F. Mendoza

FEM 2D

The second volume integral is:


Z Z
w Q(x, y ) dV = w[N]T Q(x, y ) dV = wT Qe
Ve Ve

where  
Z NI
Qe =  NJ  Q(x, y ) dV
Ve N
K
FEM 2D

Diego F. Mendoza
Now we evaluate the integral over the boundary S. For a
line segment between nodal points m and n we assume u FEM 2D

linear. So we use shape functions developed for


one-dimensional problems.
     
S S wm
ws = 1− = N s ws
hs hs wn
Here hs is the segment length, thus the boundary integral
becomes
Z Z
q ∗ wdS = wsT NT T
s q(S) dS = ws Qs
Ss Ss

where   Z  S 
Qm 1 − hs
Qs = = S q(S)dS
Qn Ss hs
FEM 2D
so, we may write the contribution of a typical volume
Diego F. Mendoza
element in the weak form
Z Z Z FEM 2D
T
∇ w [R] ∇u dV − w Q dV − w q ∗ dS = 0
V V S

Ge = wT [K ]e u − wT Qe − wT QSs
The integral over the domain is the contribution of all
elements
X
G= Ge = 0
elements

Thus,
wT ([K ]u − Q − QS ) = 0
or
[K ]u − Q − QS = 0
since w 6= 0.
FEM 2D
Example
Diego F. Mendoza

Use FEM to solve FEM 2D

∂2u ∂2u
+ =0
∂x 2 ∂y 2

In this case Q − QS , therefore, the FEM problem gets the


form
[K ]u = 0
FEM 2D

Diego F. Mendoza

Node identification FEM 2D

Node I Node J Node K Element


1 2 5 1
2 3 5 2
3 4 5 3
4 1 5 4

Each node has its coordinates x, y .


Element 1   
k11 k12 k15 u1
k21 k22 k25  u2 
k51 k52 k55 u5
FEM 2D

Diego F. Mendoza

FEM 2D
Element 2   
k22 k23 k25 u2
k32 k33 k35  u3 
k52 k53 k55 u5
Element 3   
k33 k34 k35 u3
k43 k44 k45  u4 
k53 k54 k55 u5
Element 4   
k44 k41 k45 u4
k14 k11 k15  u1 
k54 k51 k55 u5
The global equation set to solve is FEM 2D

   Diego F. Mendoza
2k11 k12 0 k14 2k15 u1
 k21 2k22 k23 0 2k25  u2  FEM 2D
  
 0 k32 2k33 k34 2k35 
 u3 
 

 k41 0 k43 2k44 2k45 u4 

2k51 2k52 2k55 2k54 4k55 u5
The equation of interest is
2k51 u1 + 2k52 u2 + 2k55 u3 + 2k54 u4 + 4k55 u5 = 0
from this we get
k53
u5 = −100
k55
where
     
∂N5 ∂N3 ∂N5 ∂N3
k53 = V +
∂x ∂x ∂y ∂y
     
∂N5 ∂N5 ∂N5 ∂N5
k55 = V +
∂x ∂x ∂y ∂y

You might also like