You are on page 1of 73

Finite Element Methods (FEM)

Suzanne Vogel
COMP 259
Spring, 2002
Definition of FEM

The finite element method is the formulation


of a global model to simulate static or dynamic
response to applied forces.
• Models: energy, force, volume,…

This differs from a mass spring system, which


is a local model.
Top-Down: Steps in FEM
1. Set up a global model in terms of the world
coordinates of mass points of the object.
These equations will be continuous.
2. Discretize the object into a nodal mesh.
3. Discretize the equations using finite
differences and summations (rather than
derivatives and integrals).
4. Use (2) and (3) to write the global equations
as a stiffness matrix times a vector of
(unknown) nodal values.
Top-Down: Steps in FEM

6. Solve for the nodal values.


•Static – nodal values at equilibrium
•Dynamic – nodal values at next time step
7. Interpolate values between nodal coordinates.
8 7
discretize interpolate 5 6
object 4 u 3
1 2
nodal mesh interpolate values between nodes
+ +
global model local model
Bottom-Up: Steps in FEM
Nodes are point masses connected with springs.
A continuum equation is solved for the nodes,
and intermediate points are interpolated.

A collection of nodes forms an element.

A collection of elements forms the object.

8 7
5 6
4 u 3
1 2
Elements and Interpolations

Interpolating equations for an element are


determined by the number and distribution of
nodes within the element.

More nodes mean higher degree, for smoother


simulation.
Example: Hermite as 1D Cubic
Interpolation Equation
1. Assume
r (u)  au 3  bu 2  cu  d and
cubic equation

r (u)  N1 (u)  r1  N 2 (u)  r2  N3 (u)  r3  N 4 (u)  r4


equation using shape (blending) functions

u
Example: Hermite as 1D Cubic
Interpolation Equation
2. Normalize the element to [0,1] and rewrite
r (u)  au 3  bu 2  cu  d as a matrix equation

 0 0 0 1
 r1  u3
1
2
u
1 u1 1  a   1 1 1  a 
r   3 2     1  b 
 2   u u u2 1  b 
  27  
2 2
 9 3
 r3  u3 2
u u3 1  c   8 4 2
1  c 
       27  d 
3 3
27 27
r4  u 1 d 
3 2
u u4
4 4
 1 1 1 1

or R0  U 0  Q
Example: Hermite as 1D Cubic
Interpolation Equation
3. Solve for the coefficients Q
1
R0  U 0  Q  Q  U 0  R0  M H R0
4. Plug the coefficients into the cubic equation
r (u)  au 3  bu 2  cu  d
5. Rewrite the cubic equation in the form
r (u)  N1 (u)  r1  N 2 (u)  r2  N3 (u)  r3  N 4 (u)  r4
Example: Hermite as 1D Cubic
Interpolation Equation
4 + 5. are equivalent to the steps
r (u )  U  Q  U  ( M H  R0 )  (U 0  M H )  R0
 r1 
r 
r (u )  N1 (u ) N 2 (u ) N 3 (u ) N 4 (u )  2 
 r3 
 
shape (blending) functions
r4 
values at the 4 nodes of the element
Example: Hermite as 1D Cubic
Interpolation Equation

shape (blending) functions within one element


Let Ni  H i , u  t
r

u
1
 U0
1D Elements

(x) (x)

Example: bungee

(x)
2D Elements
(x,y)
(x,y)

Example: cloth
(x,y)
3D Elements

(x,y,z)

(x,y,z)

Example: skin
Static vs. Dynamic FEM
Static analysis is good for engineering, to find
just the end result.

Dynamic analysis is good for simulation, to


find all intermediate steps.
Types of Global Models[6]
Variational - Find the position function, w(t)
that minimizes the some variational integral.
This method is valid only if the position
computed satisfies the governing differential
equations.

Rayleigh-Ritz - Use the variational method


assuming some specific form of w(t) and
boundary conditions. Find the coefficients and
exponents of this assumed form of w(t).
Example of Variational Method[6]
Minimizing the variation w.r.t. w of the
variational function
1  2  
J ( w)     c2 w  c1 w w  2 fwd
2
 
under the conditions
   c1  (   a )
 a w b w c
w c2  (  b)
c3  (c  f )  0
satisfies the governing   
equation, Lagrange’s  w  w  f (t )  0
w
Equation
Types of Global Models[6]

Galerkin (weighted residual) - Minimize the


residual of the governing differential equation,
F(w,w’,w’’,…,t) = 0. The residual is the form of
F that results by plugging a specific form of the
position function w(t) into F. Find the
coefficients and exponents of this assumed form
of w(t).
Example of Galerkin Method[6]
We can approximate w(t) using Hooke’s Law
1
 1 1
 
1  L0 L0  f1 (t )  E   w1 (t ) 
   
E  1 
1   f 2 (t )  E   w2 (t )
 L0 L0 

If we use that equation to compute the 1st and


2nd time derivatives of w, then we can compute
the residual as
  
 w  w   f (t )  0
w
Example of Static, Elastic FEM
Problem: If you apply the pressure shown, what
is the resulting change in length?

Object
Example of Static, Elastic FEM

First step. Set up a continuum model:


Infinitessimal length:
•F = force
•P = pressure P  L  PL
F   E  L 
•A = area A  L  AE
•L = initial length Entire length:
•E = Young’s modulus
un PL PL un 1 PL un 1
L   du   du   du
u 0 AE E u 0 wh(u ) wE u 0 h(u )
Example of Static, Elastic FEM

Since the shape is regular, we can integrate to


find the solution analytically. But suppose we
want to find the solution numerically.

Next step. Discretize the object.


Example of Static, Elastic FEM

Discretization of object into


linear elements bounded by nodes
1 2 3 4
n1 n2 n3 n4 n5
Example of Static, Elastic FEM
Next step. Set up a local model.

Stress-Strain Relationship (like Hooke’s Law)


Young’s modulus distance between adjacent nodes

Ei , j
i  L  k i , j L  k i , j (ri  r j  L0 )  k i , j (ri  r j )  k i , j L0
L0
stress (elastic force)

 j   i  k i , j (ri  r j )  k i , j L0
Example of Static, Elastic FEM
Next step. Set up a local (element) stiffness matrix.
 i  k i , j (ri  r j )  k i , j L0
 j  k i , j (ri  r j )  k i , j L0 element stiffness matrix
nodal coordinates
nodal stresses
 i   k i , j  k i , j   ri   k i , j L0 
Rewrite the     k k     
r k L 
 j   i, j i, j   j   i, j 0 
above as a
 i  k i , j L0   k i , j  k i , j   ri 
matrix equation.      
 j  k i , j L0   k i , j k i , j  r j 
Same for the   j  k j , j 1 L0   k j , j 1  k j , j 1   r j 
     
adjacent element.  j 1  k j , j 1 L0   k j , j 1 k j , j 1  r j 1 
Example of Static, Elastic FEM
Now, all of the element stiffness matrices are as
follows. r is the x-coordinate of node u
i i

 1  k1, 2 L0   k1, 2  k1, 2   r1   2  k 2,3 L0   k 2,3  k 2,3  r2 


  k L    k     
k1, 2  r2   3  k 2,3 L0   k 2,3

k 2,3  r3 
 2 1, 2 0   1, 2

 3  k 3, 4 L0   k 3, 4  k 3, 4   r3   4  k 4,5 L0   k 4,5  k 4,5  r4 


  k L    k         
 4 3, 4 0   3, 4 k 3, 4  r4   5  k 4,5 L0   k 4,5 k 4,5  r5 

1 2 3 4
n1 n2 n3 n4 n5
Example of Static, Elastic FEM
Next step. Set up a global stiffness matrix.

Pad the element stiffness matrices with zeros


and sum them up. Example:
 0  0 0 0 0 0  r1 

 2  k 2,3 L0  0 k 2,3  k 2,3 0 0 r2 
 3  k 2,3 L0   0  k 2,3 k 2,3 0 0   r3 
     
 0  0 0 0 0 0 r4 
 0  0 0 0 0 0  r5 
Example of Static, Elastic FEM
Final step. Solve the matrix equation for the
nodal coordinates. Nodal coordinates.
Solve for these!
Applied forces

  1  k1, 2 L0   k1, 2  k1, 2 0 0 0   r1 


  (k  k ) L   k k1, 2  k 2,3  k 2,3 0 0  r2 
 2 1, 2 2,3 0  1, 2  
 3  (k 2,3  k 3, 4 ) L0    0  k 2,3 k 2,3  k 3, 4  k 3, 4 0    r3 
     

 4  ( k 3, 4  k 4,5 ) L0  0 0  k 3, 4 k 4,5  k 3, 4  k 4,5  r4 
  5  k 4,5 L0   0 0 0  k 4,5 k 4,5  r5 
  

Global stiffness matrix.


Captures material properties.
Elastic FEM

A material is elastic if its behavior depends only


on its state during the previous time step.
•Think: Finite state machine

The conditions under which an “elastic”


material behaves elastically are:
•Force is small.
•Force is applied slowly and steadily.
Inelastic FEM
A material is inelastic if its behavior depends on
all of its previous states.

A material may behave inelastically if:


•Force is large - fracture, plasticity.
•Force is applied suddenly and released, i.e., is
transient - viscoelasticity.

Conditions for elastic vs. inelastic depend on


the material.
Examples of Elasticity

Elasticity
•Springs, rubber, elastic, with small, slowly-
applied forces
Examples of Inelasticity
Inelasticity
•Viscoelasticity
•Silly putty bounces under transient force (but
flows like fluid under steady force)

•Plasticity
•Taffy pulls apart much more easily under
more force (material prop.)

•Fracture
•Lever fractures under heavy load
Linear and Nonlinear FEM
Similarly to elasticity vs. inelasticity, there are
conditions for linear vs. nonlinear deformation.
Often these coincide, as in elastoplastic.
 L
  Ee : e 
L0

=e
Elastic vs. Inelastic FEM
Elastic Deformation
 e loading unloading

e t

Hooke’s Law
stress
or   Ee : e  L strain

f  a0e L0
Young’s modulus
•Describes spring without damping
•Linear range of preceding stress vs. strain graph
Elastic vs. Inelastic FEM
Damped Elastic Deformation
 e loading unloading

. .
a1e a1e

e t
Rate of deformation is constant.


f  a1 e a0e
viscous linear stress
Elastic vs. Inelastic FEM
Viscoelastic Deformation depends on time t

 e loading unloading

.
e t
Rate of deformation is greatest
This graph is actually viscous, immediately after starting
but viscoelastic is probably similar loading or unloading.

   
b2f  b1 f  b0 
f  a2 e  a1 e a0 e
new term! viscous linear stress
Elastic vs. Inelastic FEM
Elastoplastic Deformation depends on force f

e
This graph is actually plastic,
but viscoelastic is probably similar

 f x
loading x
loading

compare
f  a0e e
unloading
x
e
Elastic vs. Inelastic FEM
Fracture depends on force f

•Force response is locally discontinuous


•Fracture will propogate if energy release rate
is greater than a threshold

 x
loading

e
unloading
x
Elastic vs. Inelastic
1. World FEM4,5
coordinates w
in inertial frame

(a frame with ref

object, or
constant velocity) r non-inertial


frame
2. Object
(material) 
world, or
coordinates r inertial frame

in non-inertial  origin of 
= center of mass in 
frame
r(w,t) = rref(w,t) + e(w,t)
Elastic vs. Inelastic
FEM4,5
Transform
•reference ref

component rref r
•elastic component e 
•object frame 

w.r.t. world frame 

r(w,t) = rref(w,t) + e(w,t)


Elastic vs. Inelastic FEM
All these equations are specific for:
•Elasticity
•Viscosity
•Viscoelasticity
•Plasticity
•Elastoplasticity
•Fracture
•(not mentioned) “Elastoviscoplasticity”

Ideally: We want a general equation that will


fit all these cases.
Elastic vs. Inelastic
FEM4,5
A More General Approach
To simulate dynamics we can use Lagrange’s
equation of strain force. At each timestep, the
force is calculated and used to update the
object’s state (including deformation).
stress component
of force
Lagrange’s Equation elastic potential energy

 
  ( / L0 ) E  e 
f ( w, t )   w  w    
w w w L0  w 
mass density damping density
Elastic vs. Inelastic
Given:
Mass density and damping density FEM
are known.
4,5
matrices

Elastic potential energy derivative w.r.t. r can be


approximated using one of various equations.
next slide

The current position wt of all nodes of the object


vector

are known.
Unknown:
vector

The new position wt+dt of nodes is solved for at


each timestep.
Lagrange’s   
Equation f ( w, t )   w  w
w
Elastic vs. Inelastic
elastic potential energy
  
FEM 4,5
f ( w, t )   w  w
w

For both elastic and inelastic deformation,


express elastic potential energy as an integral
in terms of elastic potential energy density.
elastic potential energy density

 e  2e  3e 
     r , , 2 , 3 ,...dr

 r r r 
Elastic vs. Inelastic
 FEM
Elastic potential energy density can be 4,5
approximated using one of various equations
which incorporate material properties.

• Elastic deformation: Use tensors called metric


(1D, 2D, 3D stretch), curvature (1D, 2D
bend), and “twist” (1D twist).

• Inelastic deformation: Use controlled-


continuity splines.
Elastic FEM4
For elastic potential energy density in 2D, use
• metric tensors G (for stretch)
• curvature tensors B (for bend)

 (r ) || G  G ||  || B  B || 
0 2 0 2

|| M || = weighted norm of matrix M


Elastic FEM4
Overview of derivation of metric tensor

Since the metric tensor G represents stretch, it


incorporates distances between adjacent points.
 w   w 
dL  dw  dw   
2
   dri dr j
 
i , j 1, 2  ri   r j 

object coordinates world coordinates  dr1dr1 


 dr dr 
 G dri dr j  G1,1 G1, 2 G2,1 G2 , 2   1 2 
i , j 1, 2
i, j
 dr2 dr1 
 
dr2 dr2 
T
 G1,1 G1, 2   dr1   dr1 
 1 1     
G2,1 G2, 2  dr2  dr2 

Elastic FEM4
Overview of metric and curvature tensors.
From the previous slides, we found:
 w   w 
Gi , j ( w(r ))       represents stretch
  r 
 i  j
r
Similarly:
 2w 
Bi , j ( w(r ))    represents bend
 r r 
 i j 
Theorem. G and B together determine shape.
Elastic FEM4
For elastic FEM, elastic potential energy
density in 2D incorporates changes in the
metric tensor G and the curvature tensor B.

 (r ) || G  G ||  || B  B || 
0 2 0 2

weights = material properties

|| M || = weighted norm of matrix M


Inelastic FEM5
For inelastic FEM, elastic potential energy
density is represented as a controlled-
continuity spline. weighting function = material property
2
1 p
m!  
m

   w j  j1 j 2 e
j

2 m0 | j|m j1! j 2 !... j d !  r r ...r jd 


For some degree p, dimensionality d, compute


the sum of sums of all combinations of
weighted 1st, 2nd,…, mth derivatives of strain e
w.r.t. node location r, where m <= p.
Inelastic FEM5
Then the elastic potential energy density
derivative w.r.t. strain e is:
weighting function = material property

 p  mj  m!   m

   1m  j1 j 2  w  j
e
e m0 | j|  m r r ...r
jd  j1! j 2 !... j d ! j  r j1r j 2 ...r jd 
  

Example: p = 2, d = 3

 0!   1!       1!   
 w00 e        
e 0!0! r1  1!0! w10  r e    r  0!1! w01  r e  
  1  2   2 
 2  2!  2    2  2!   2    2  2!  2 
  w11  e    2  w20  2 e    2  w02  2 e  
r1 r2  1!1!  r1 r2   r1  2!0!  r1   r2  0!2!  r2 
Elastic vs. Inelastic
Recap   Lagrange’s Eq’n

total force f ( w, t )   w  w
w
FEM 4,5 How it has been
(includes stress)
 expanded and is continuing
to be expanded...
elastic
 e  2 e  2 e 
potential energy      r , , 2 , 2 ,...dr
Elastic
u
 r r r 
4

 (r ) || G  G 0 ||2  || B  B 0 || 2 5
Inelastic
material properties 2
elastic potential 1 p
m!   m

    e
j
energy density wj
2 m0 | j|m j1! j 2 !... j d !  r j1r j 2 ...r jd 

5

 p j m
 m !   m

   1  j1 j 2
m  w j  j1 j 2
j
e
e m0 r r ...r jd  j1! j 2 !... j d !  r r ...r jd 
| j|  m
  
Elastic FEM4
Continuing  
f ( w, t )   w  w
w

 e  2 e  2 e 
     r , , 2 , 2 ,...dr  (r ) || G  G 0 ||2  || B  B 0 || 2
u
 r r r 

 (r )     G  G  0 2

  i, j B  B  dr
0 2
elastic
potential 
i, j
energy i , j 1, 2

i , j (r, w)  i , j (w)Gi , j  Gi0, j  i , j (r, w)   i , j (w)Gi , j  Gi0, j 

>0: surface wants to shrink >0: surface wants to flatten


<0: surface wants to expand <0: surface wants to bend
Inelastic FEM5
Continuing   
f ( w, t )   w  w elastic potential energy
w

 e  2 e  2 e 
     r , , 2 , 2 ,...dr
elastic potential
energy density
u
 r r r 

 p  mj  m!   m

   1m  j1 j 2  w  j
e
e m0 | j|  m r r ...r
jd  j1! j 2 !... j d ! j  r j1r j 2 ...r jd 
  
strain

Deformation has been modeled by


approximating elastic potential energy.
Inelastic FEM5
Continuing
Now rigid-body motion and other aspects of
deformation must be computed using physics
equations of motion.

In this way, both (in)elastic deformation and


rigid-body motion can be modeled, providing a
very general framework.

r(w,t) = rref(w,t) + e(w,t)


Inelastic FEM5
Motion of object (non-inertial) frame w.r.t.
world (inertial) frame
   
c(t )    (r )w(r, t ).dr w(r , t )  c(t )   (t )  c(t )  e(r , t )

  
f ( w, t )   w  w Combines
w
d  d  
dynamics of
f  (m c)    e(r , t ).dr    w(r , t ).dr
v
deformable
trans dt dt  

d  d   and rigid
f  ( I  )   r  e .dr   r  w .dr

rot dt dt   bodies
d         
f   (t )  (  e)   c     (  r )  2   e    r   w
e

elastic dt e
  
f ( w, t )   w  w Inelastic FEM5
w
Velocity of node of object (non-inertial) frame
w.r.t. world (inertial) frame (radians / sec) x (radius)
   
w(r , t )  c(t )   (t )  c(t )  e(r , t )
w.r.t. world

velocity of reference velocity of elastic


component component

 (t )
c (t )

 w(r , t ) Identically, in another
coordinate system,
e(t ) r(w,t) = rref(w,t) + e(w,t)
w.r.t. object
  
f ( w, t )   w  w Inelastic FEM5
w

d  d  
f  ( I  )   r  e .dr   r  w .dr
rot dt dt  

angular momentum

  ( w22  w32 ) w1 w2 )  w1 w3 


 
I (t )    w2 w1  ( w1  w3 )  w2 w3 dw(t )
2 2

  w w  w3 w2 2 
 ( w2  w3 ) 
2
inertia tensor 3 1

Angular momentum is conserved in the absense


of force. So a time-varying angular momentum
indicates the presence of foce.
 
f ( w, t )   w  w Inelastic FEM5
w

d  d  
f  ( I  )   r  e .dr   r  w .dr
rot dt dt  

indicates changing angle between position and direction of stretch

r (t ) 
e(t )
 
f ( w, t )   w  w Inelastic FEM5
w

d         
f e   (t )  (  e)   c     (  r )  2   e    r   w
elastic dt e
inertial centripetal Coriolis transverse damping restoring

elastic potential energy strain


If the reference component has no translation or
rotation, then e d  
f   (t )  (  e) 
dt e
Furthermore, if the elastic component has no
acceleration, then f e   (t )  
e
  
f ( w, t )   w  w Inelastic FEM5
w
Recall that non-elastic behavior is characterized
by acceleration of the elastic component
(strain)...
d  
f   (t )  (  e) 
e

dt e
And elastic behavior is characterized by
constant velocity of strain.

 loading x
f   (t ) 
e

e
f  a0e

e
Elastic vs. Inelastic
Now Lagrange’s equation has beenFEM
expanded.
4,5
  
f ( w, t )   w  w
w
Final Steps
•Discretize using finite differences (rather than
derivatives).
•Write as a matrix times a vector of nodal
coordinates (rather than a single mass point).
•Solve for the object’s new set of positions of
all nodes.
Discretization of FEM4,5
Discretize Lagrange’s equation over all nodes

 
f ( w, t )   w  w
w

  
f (t )  M  w C  w
w

Procedure described in [4] but not [5]


Discretization of Elastic FEM4
2w w
M 2 C  K ( wt  t ) wt  t  f t  t
t t
 MDt ( Dt ( wt ))  CDt ( wt )  K ( wt ) wt  t
wt  t  2wt  wt  t wt  t  wt t
M C  K ( wt ) wt  t
t 2
2t
 1 1   2   1 1 
 2 M   K ( wt )  wt  t  f t   2 M  wt   2 M  C  wt  t
 t 2t   t   t 2t 
 3 1  1 1  wt  wt  t
 ft   2 M  C  wt   M  C 
 t 2t   t 2  t
 3 1  1 1 
 ft   2 M  C  wt   M  C vt
 t 2t   t 2 
 At wt  t  g t ( wt , wt  t ) _ where
 1 1   3 1  1 1 
At   2 M   K ( wt ) , g t ( wt , wt  t )   2 M  C  wt   M  C vt
 t 2t   t 2t   t 2 
Results of Elastic FEM4
Results of Elastic FEM4
Results of Elastic FEM4
Results of Inelastic FEM5

3D plasticine bust of Victor Hugo.


180 x 127 mesh; 68,580 equations.
Results of Inelastic FEM5

Sphere pushing through 2D mesh.


23 x 23 mesh; 1,587 equations.
Yield limit is uniform, causing linear tears.
Results of Inelastic FEM5

2D paper tearing by opposing forces.


30 x 30 mesh; 2,700 equations.
Yield limit is perturbed stochastically,
causing randomly-propogating tears.
References
0. David Baraff. Rigid Body Simulation.
Physically Based Modeling, SIGGRAPH
Course Notes, August 2001.

1. George Buchanan. Schaum’s Outlines:


Finite Element Analysis. McGraw-Hill, 1995.

2. Peter Hunter and Andrew Pullan. FEM/BEM


Notes. The University of Auckland, New
Zealand, February 21 2001.
References
3. Tom Lassanske. [Slides from class lecture]

4. Demetri Terzopoulost, John Platt, Alan Barr,


and Kurt Fleischert. Elastically Deformable
Models. Computer Graphics, Volume 21,
Number 4, July 1987.

5. Demetri Terzopoulos and Kurrt Fleiseher.


Modeling Inelastic Deformation:
Viscoelasticity, Plasticity, Fracture. Computer
Graphics, Volume 22, Number 4, August 1988
Notation

r  object _ coordinates
w  world _ coordinates
e  strain _( stretch)
  stress _( force)
E  Young ' s _ mod ulus
  elastic _ potential _ energy
  elastic _ potential _ energy _ density

You might also like