You are on page 1of 40

Finite element method for structural dynamic

and stability analyses

Module-5

Time integration of equation of motion

Lecture-13: Mathematical preliminaries and terminologies;


Euler’s forward and backward difference methods

Prof C S Manohar
Department of Civil Engineering
IISc, Bangalore 560 012 India

1
Numerical integration of equations of equillibrium

Consider a N -dof system


MU  CU  KU  R U  t  ,U  t  , t   F  t 
U  0   U 0 ;U  0   U 0

Remarks:
This equation constitutes a set of semi-discretized system of
coupled second order ode-s. That is, these equations have been
obtained after discretizing the spatial variables.

This set of equations constitutes a set of initial value problems.

2
The time variable, t , however, is still continuous.
We consider now the problem of discretizing in time.
We consider solution of the above equation at a set of
discrete time instants t0  t1  t2   tn  with
tn  tn 1  tn .

The basic idea is to replace the derivatives appearing


in the above equations by finite difference approximations
and then solve the resulting algebraic equations.

3
Equations in standard form for a N -dof system
MU  CU  KU  R U  t  ,U  t  , t   F  t  ;U  t0   U 0 ,U  t0  =U 0
 U  M 1CU  M 1 KU  M 1R U  t  ,U  t  , t   M 1F  t 
Define X I  t   U  t  & X II  t   U  t  and
 X I  t  
x t      system state vector
 X II  t  

X I  X II
X II  M 1 F  t   M 1CX II  M 1 KX I  M 1R  X I , X II , t 
 X I  t    0 I   X I  t    0   0 
  1       1 
 X II  t     M K  M C   X II  t   
1
 M 1
R  I II  
X , X , t M F  
t
 Equation in state space form given by
x  a  x  t  , t  ; x  t0   x0 ; x  t  is 2 N 1.
4
The set of N coupled 2nd order ODE-s
MU  CU  KU  R U  t  ,U  t  , t   F  t  ;U  t0   U 0 ,U t0  =U 0
have been thus recast as the following set of 2 N first order coupled ODE-s
x  a  x  t  , t  ; x  t0   x0 ; x  t  is 2 N 1.
Denote by x  t , x0 , t0   solution of x  a  x  t  , t  with x  t0   x0
Discrete time approximation
time: t0  t1  t2   tn  ; tn  tn 1  tn
Denote yn  x  tn , x0 , t0 
How to approximate x in terms of yn ?

5
Use finite difference approximations. For example,
x  t  t   x  t  yn 1  yn
x t    yn 
t tn
 yn 1  yn  tn a  yn , tn  ; n  0,1, 2, with y0  x0
and yn  a  yn , tn   given that x t   a  x t  , t  
Here tn ; n  0,1, 2,  algorthmic parameters.
Accuracy depends upon the choice of tn ; n  0,1, 2,

6
Errors

Local discretization error: ln 1  x  tn 1 , xn , tn   yn 1

Global discretization error: en 1  x  tn 1 , x0 , t0   yn 1

Round-off error: Rn 1 (due to the use of finite precision calculations)

Dynamical system modeling errors: does the algorithm correctly


capture dynamical properties of systems (such as natural frequencies,
FRF, free vibration amplitudes, energy concservation,...)?

7
How to formulate the integration algorithms to achieve
acceptable accuracy? How to understand the nature of the errors?

 0?

lim en  c   ?
n   ?

How to select algorithmic parameters to achieve acceptable


performance of the integrators?
What are the expectations from a good integrator?
8
Dynamical system modeling errors:
Consider scalar equation u   2u  0; u (0)  u0 , u  0   u0
Exact solution
u0
u  t   u0 cos t  sin t  R cos t   

2
 u0  u0
R  u    & tan  
2

   u0
0

In the discrete approximation:


Do we get amplitude of response to be constant?
Otherwise we get numerical dissipation or growth.
Do we get the impulse response function correctly?
Is the distortion acceptable?
Is the vibration energy conserved? 9
Dynamical system modeling errors (continued):

Similarly, for the system


u  2u   2u  P exp  it  ; u (0)  u0 , u  0   u
are the properties of the frequency response curve preserved?

Similarly, for nonlinear systems we can pose questions on


bifurcation characteristics.

10
Outline
• Mathematical preliminaries
• The integration schemes
– Explicit/implicit
– Single step/multi step
• Consistency
• Stability
• Accuracy
• Energy conservation

11
Mathematical preliminaries-1

The O and o notations


The meaning of f ( x) being O  g  x   as x  a
f  x
The function f ( x) is said to be O  g  x   as x  a if lim 
xa g  x
f  x
The function f ( x) is said to be o  g  x   as x  a if lim 0
xa g  x 

f  x   O  g  x   as x  a

M  0 &   0  f  x   M g  x   x  a  

12
Examples
ax 7  bx3  cx  d
ax  bx  cx  d is O  x
7 3 7
 as x   lim 7
a
x  x
ax 7  bx3  cx  d
ax 7  bx3  cx  d is O  x 0  as x  0 lim 0
d 
x 0 x
ax 7
ax 7 is O  x 7  as x  0 lim 7  a  
x 0 x

ax 7
ax 7 is not O  x8  as x  0 lim 8  
x 0 x

13
Examples
sin  x 
 sin( x) is O  x  as x  0 lim 1  
x 0 x
sin  x 2 
 sin( x 2 ) is O  x 2  as x  0 lim 2
1  
x 0 x

cos  x 
 cos  x  is O  x 0
 as x  0 lim 0
1 
x 0 x
sin  x 
 sin( x) is o  x   o 1 as x  0 lim
0
0
0
x 0 x

  12  cos  x 
 cos  x  is o  x  as x  0 lim 1
 lim x cos  x   0  
x 0 x 0
  x

2

14
Mathematical preliminaries-2
Mean value theorem
Consider a function f ( x) to be continuous for a  x  b and differentiable
for a  x  b. According to the mean value theorem, there exists at least one
c satisfying a  c  b such that
df f b  f  a  f  x
c 
dx ba
 f b   f  a   b  a 
df f a
c  f b
dx

a b
x
c1 c2

15
Mathematical preliminaries-3

Taylor's series
Let f be a function of x with derivatives of all orders throughout
an interval containing the point a. The Taylor series generated by f
at x  a is given by

f
k
a f   a 
  x  a  f  a   f   a  x  a    x  a
k 2

k 0 k! 2!
f
n
a
   x  a 
n

n!

16
Mathematical preliminaries-3

Taylor's polynomial

Let f be a function of x with derivatives of orders n  0,1, 2, ,N


throughout an interval containing the point a. Then for any n   0, N 
the Taylor polynomial of order n generated by f at x  a is given by
f   a  f a
n

Pn  x   f  a   f  a  x  a  
  x  a    x  a
2 n
.
2! n!

17
Corollary to Taylor's theorem

If f has derivatives of all orders in an open interval I containing a, then


for each positive integer n and for each x in I ,
f   a  f a
n

f ( x)  f (a )  f   a  x  a    x  a   x  a  Rn  x 
2 n

2! n!
f   c
n 1

where Rn  x    x  a  for some c between a and x.


n 1

 n  1!

If lim Rn  x   0x  I , we say that the Taylor series generated by f at x  a


n 

converges to f on I , and we write

f  x  

f
n
 x
 x  a
n

n 1 n!

18
Mathematical preliminaries-4
Forward difference approximation to a derivative
h2 h3
f  x  h   f  x   hf   x   f   x   f   x  
2! 3!
f  x  h  f  x h h2
 f  x   f   x   f   x  
h 2! 3!
f  x  h  f  x
 f  x   O  h  as h  0
h
Backward difference approximation to a derivative
h2 h3
f  x  h   f  x   hf   x   f   x   f   x  
2! 3!
f  x  f  x  h h h2
 f  x   f   x   f   x  
h 2! 3!
f  x  f  x  h
 f  x 
  O  h  as h  0
h 19
Central difference approximation to a derivative
h2 h3
f  x  h   f  x   hf   x   f   x   f   x  
2! 3!
h2 h3
f  x  h   f  x   hf   x   f   x   f   x  
2! 3!
h3
 f  x  h   f  x  h   2hf   x   2 f   x  
3!
f  x  h  f  x  h
 f  x   O  h 2  as h  0
2h
Intutively
Error is of O  h  and we half step size  error gets halved.
Error is of O  h 2  and we half step size  error gets quartered.
Standard form
MU  t   CU  t   KU  t   R U  t  ,U  t  ,U  t  , t   F  t 
U  0  , U  0  specified
 x  a  x  t  , t  ; x  0   x0 ;0  t  t f
Strategy: replace derivatives by finite difference approximations.
Introduce 0  t1  t2   t N  t f & denote yn  x  tn , 0, x0 
Forward difference approximation
x  t  t   x  t 
At time=t , x  t    a  x  t  , t 
t
 yn 1  yn  tyn  yn  ta  yn   O  t 
Backward difference approximation
x  t  t   x  t 
At time=t  t , x  t  t    a  x  t  t  , t  t 
t
 yn 1  yn  tyn 1  yn  ta  yn 1   O  t  21
Central difference approximation
x  t  t   x  t  t 
At time=t , x  t    a  x  t  , t 
2t
 yn 1  yn 1  2tyn  yn 1  2ta  yn   O  t 2 
Trapezoidal rule
t tn1 tn tn1

x  t    x  s  ds  x  tn 1    x  s  ds   x  s  ds   x  s  ds
0 0 0 tn

 yn  0.5t  yn 1  yn 
 yn 1  yn  0.5t  yn 1  yn 
 yn  0.5t a  yn 1   a  yn 

22
Forward difference approximation
yn 1  yn  tyn  yn  ta  yn   O  t 
Backward difference approximation
yn 1  yn  tyn 1  yn  ta  yn 1   O  t 
Central difference approximation
yn 1  yn 1  2tyn  yn 1  2ta  yn   O  t 2 
Trapezoidal rule
yn 1  yn  0.5t a  yn 1   a  yn 
Generic form
yn 1  1 yn   2 yn 1    m yn 1 m  t   0 yn 1  1 yn    k yn 1 k 

23
Generic form

yn 1  1 yn   2 yn 1    m yn 1 m  t   0 yn 1  1 yn    k yn 1 k 

Definitions

 0  0  yn 1 depends upon derivative of the state at tn 1 , that is, upon yn 1.


The scheme is said to be implicit. Other wise the scheme is said to be explicit.

 If  2   3   m  0, &  2   3   k  0, the scheme is said to be a single


step scheme; otherwise it is called multi-step scheme.

Scheme is said to be self starting if yn for n  0 does not enter the calculations.

24
Forward difference approximation
yn 1  yn  tyn  yn  ta  yn   O  t 
Backward difference approximation
yn 1  yn  tyn 1  yn  ta  yn 1   O  t 
Central difference approximation
yn 1  yn 1  2tyn  yn 1  2ta  yn   O  t 2 
Trapezoidal rule
yn 1  yn  0.5t a  yn 1   a  yn 
Generic form
yn 1  1 yn   2 yn 1    m yn 1 m  t   0 yn 1  1 yn    k yn 1 k 
Forward difference approximation: single step, explicit, self-starting.
Backward difference approximation: single step, implicit, self-starting.
Central difference approximation: multistep, explicit, not self-starting.
Trapezoidal rule: single step, implicit, self-starting.
25
Remarks
t0  0  t1  t2   tN  t f
tn  nt  constant step size 
System states: U  t  , U  t  , U  t 
Assume: System states at t  tn are known. To find system states at t  tn 1.
Integration algorithms essentially achieve this.
Computation effort is proportional to number of time steps to advance
solution from t  0 to t  t f .The step size, therefore, need not be smaller than
what is essential. We need to be concerned about
Growth of errors (stability) and
Accuracy of the solution.
Undamped free vibration of a sdof system:
Check for amplitude
Frequency distortions
26
Remarks (continued)
The time integration method is the most generally applicable
method to solve equillibrium equations:

For linear systems, the solution does not require transformation


to natural coordinates. This enables treatment of general class of
viscous damping models without stipulating damping to be classical.
On the other hand, the method requires that damping be specified in
terms of the C matrix and not in terms of modal damping ratios.
Procedures to derive C matirx in terms of specified modal damping ratios
have been discussed in this course. The excitation could be periodic,
steady state aperiodic, or transient in nature.

The method remains applicable even when governing equations are


nonlinear in nature. 27
Remarks (continued)

For linear systems, the size of the model (dof-s) depend upon the
details of mesh used in spatial discretization. These details need
to be chosen such that the system behavior is well represented over
the frequency range over which excitations have significant power.
If  max is the highest frequency present in the excitations, then all the
modes present in the frequency range up to about 1.25 max needs to be
correctly captured. If the structure has, say, r modes in frequency range
up to 1.25 max , then the mesh details should be such that the model has
at least 10r dof-s.

28
Remarks (continued)

This invariably means that there would be a large number of higher order
modes that are present in the model (with frequencies beyond  max ) which
however do not contribute significantly to the response.

It is desirbale that the discretization scheme used should have inherent


capability to (numerically) dissipate the higher order spurious modes and
yet the same time not distort the lower order modes which contribute
significantly to the response.

29
Discussion on following methods
Explicit method with first order accuracy
Forward Euler
Implicit method with first order accuracy
Backward Euler
Explicit method with second order accuracy
Central difference
Implicit method with second order accuracy
Newmark's family of methods
HHT- method and generalization
Explicit-Implcit methods
HHT- with operator splitting
30
Strategy
Development of basic formulary
Pseudocode for implementation
Analysis of the method
Illustrative examples
Discussion on relative merits

31
Forward Euler Method

t0 tn tn 1 tf
     

MU  t   CU  t   KU  t   F  t 
U  0   U 0 ;U  0   U 0 ;0  t  t f
U  t  t   U (t ) 
U t    U n 1  tU n  U n 
t 
 This is an explicit scheme
U  t  t   U (t )
U t    U n 1  tU n  U n 
t 
 Condtion for equillibrium at tn 1 is given by
MU n 1  C  tU n  U n   K  tU n  U n   Fn

 U n 1   M 1 C  tU n  U n   K  tU n  U n   Fn  32


Implementation of the forward Euler Method

(1) n  0; t  0; Input U 0 & U 0


U 0   M 1 CU 0  KU 0  F0 

(2) U n 1   M 1 C  tU n  U n   K  tU n  U n   Fn 


(3) U n 1  tU n  U n
(4) U n 1  tU n  U n
(5) n  n  1
(6) If nt  t f , stop; else go to (2)

33
Implementation of the forward Euler Method

(1) Input K , M , C matrices; t; Fn  F ( nt ), U 0 & U 0


 2  A  M 1; B  AC; D  AK
 3 n  0; t  0; Input U 0 & U 0
U 0    BU 0  DU 0  AF0  ;
(4) U n 1   B  tU n  U n   D  tU n  U n   AFn
(5) U n 1  tU n  U n
(6) U n 1  tU n  U n
(7) n  n  1
(8) If nt  t f , stop; else go to (4)
34
Forward Euler Method : stability analysis

x  2 x   2 x  f  t  
U n 1  tU n  U n  t  2U n   2U n  f n   U n
U n 1  tU n  U n
 U n 1   1 t  U n   0 
  2    
 U n 1    t 1  2t   U n   tf n 
 Yn 1  AYn  Ln
Yn  Yn   n
 Yn 1   n 1  AYn  A n  Ln
  n 1  A n
35
Digression
Consider the scalar equation xn 1  axn with x0  0 sepecified.

x1  ax0
x2  ax1  a 2 x0

xn  axn 1  a n x0
Clearly
 0 if a  1

lim xn  x0 if a  1
n 
  if a  1

36
Let us now consider the s 1 vector equation xn 1  Axn
with x0  0 sepecified. Here A is a s  s matix.

x1  Ax0
x2  Ax1  A2 x0

xn  Axn 1  An x0
Let us introduce the transformation xn  zn
 zn 1  Azn
Let  be such that  t   I &  t A  Diag  i 
We can select  by solving the eigen value problem
associated with matrix A.
37
xn  zn
 zn 1  Azn
  t zn 1   t Azn  zn 1  Diag  i  zn
 znk1  k znk ; k  1, 2, ,s
 znk1  kn z0k ; k  1, 2, ,s
s
 xnj    jk kn z0k with z0  t x0
k 1

We are interested in whether or not lim xnj  0 for j  1, 2, s


n 

Clearly,
max k  1  lim xnj  0 for j  1, 2, s
1 k  s n 

That is, the behavior of lim xnj for j  1, 2, s controlled by the


n 

highest modulus of the eigenvalues of A.


38
Alternatively, consider
xn  Axn 1  An x0
Let us seek solution in the form xn   n x0
Here  is scalar which is in general complex valued.
xn   n x0  xn 1   n 1 x0
Consider the equation xn 1  Axn  An x0
 n 1 x0  A n x0  Ax0   x0
For nontrivial solutions A   I  0
  i   0i exp  ii 
Condtion for lim xnj  0 for j  1, 2, s is given by max  i  1
n  1i  s

By definition max  i    A  is called the spectral radius of A.


1i  s

39
max k  1  lim xnj  0 for j  1, 2, s
1 k  s n 

 The roots of the characteristic equation must lie within


the unit circle in the complex plane.
Im   
Unit circle
Unstable

Re   

Asymptotically
stable Stable

We do not need the value of the eigenvalues.


We need to only ascertain if all the roots of the characteristic
equation lie within the unit circle in the complex plane. 40

You might also like