Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

Finite element method for structural dynamic

and stability analyses

Module-5

Time integration of equation of motion

Lecture-14 Forward and Backward Euler Methods. Central difference


method.

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

1
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 n 1  tU n  U n
U n 1  tU n  U n
U n 1   M 1 C  tU n  U n   K  tU n  U n   Fn 

2
Forward Euler Method : stability analysis
SDOF system as the test system
x  2 x   2 x  f  t  
 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

3
xn 1  Axn
A  
max k  1  lim xnj  0 for j  1, 2, s
1 k  s n 

Im   
Unit circle
Unstable

Re   

Asymptotically
stable Stable
4
Let us consider the analysis of the forward difference scheme.
Yn 1  AYn  Ln
Yn  Yn   n
 Yn 1   n 1  AYn  A n  Ln
  n 1  A n
 n 1  A n  An 1 0
This equation describes how error introduced at n  0 grows in time.
Seek the solution of the form  n   n  0   n 1 0  A n  0
  A   I  0  0  A   I  0
Let    0 exp  i    n   0n exp  in   0
 max  0 j  1  lim  n  0
1 j  2 n 

 1 t 
A 2  : Amplification matrix
  t 1  2t  5
A  I  0 
1   1  2t      2 t 2  0
 1  2t      2t   2   2 t 2  0
  2  2 1  t   1  2t   2 t 2  0

4 1   2 2 t 2  2t   4 1  2t   2 t 2 
1
   1  t  
2
1
 1  t   4 2 2 t 2  4 2 t 2
2
 1  t   t  2  1
   1  t   id t

6
  1  t   id t
 max  1  t    2 1   2  t 2  1   2 t 2  2t
2 2

2
 max  1  1   t  2t  1  t 
2 2

Conclusion

 2 
The scheme is conditionally stable for damped systems  t  
  
and is unstable for all choices of step size for undamped systems.
 In an undamped system, the scheme introduces an artificial
negative damping into the discretized model.
7
Backward 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
Consider time instant t  t
U  t  t   U (t )
U  t  t    U n 1  tU n 1  U n
t
U  t  t   U (t )
U  t  t    U n 1  tU n 1  U n
t
This is an implicit scheme since the RHS contains
unknown U n 1 & U n 1 8
 Condition for equillibrium at tn 1 is given by

MU n 1  C  tU n 1  U n   K  tU n 1  U n   Fn 1

 
 MU n 1  C  tU n 1  U n   K t  tU n 1  U n   U n  Fn 1

MU n 1  C  tU n 1  U n   t 2 KU n 1  tKU n  KU n  Fn 1
 M  tC  t 2 K  U n 1    C  tK  U n  KU n  Fn 1
1
U n 1   M  tC  t K     C  tK U n  KU n  Fn 1 
2

9
Implementation of the backward Euler Method - I

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


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

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

10
Implementation of the backward Euler Method - II

(1) Read M , C , K , Fn , U 0 & U 0


1
 2  A=  M  tC  t 2
K  ; B   A  C  tK  ; D   AK
 3 n  0; t  0
(4) U n 1  BU n  DU n  AFn 1
(5) U n 1  tU n 1  U n
(6) U n 1  tU n 1  U n
(7) n  n  1
(8) If nt  t f , stop; else go to (4)

11
Backward Euler Method : stability analysis
Consider x  2 x   2 x  0
U n 1  tU n 1  U n
U n 1  tU n 1  U n  t  2U n 1   2U n 1   U n
U n 1  tU n 1  U n
U n 1  t 2U n 1   2 tU n 1  U n
 1 t   U n 1   U n 
 2 t 1  2t   U    U 
   n 1   n 
1
 U n 1   1 t   U n 
  2   
 U n 1   t 1  2t   U n 
12
1
 1 t 
The amplification matrix is A=  2  .
 t 1  2t 
Eigenvalues of A can be obtained as reciprocals of eigenvalues of A1.
1  t
 0    1   t   i 1   2

 2 t 1  2t  
1  t
 0    1   t   i t 1   2

 2 t 1  2t  
1
 
1

1  t   it 1   2
 1  t   i 1   1  t    2 1   2 
2 2

13
1
  A  max  
1  t 
2
  2
t 2
 
1   2

Note   A  1t
 The integration scheme is unconditionally stable.

14
x  4 2 x  0; x  0   0; x  0   1
Forward difference scheme; t  1/100 s.
0.4
Numerical
0.3
Exact

0.2

0.1
x(t)

-0.1

-0.2

-0.3

-0.4
0 0.5 1 1.5 2 2.5 3 3.5 4
ts 15
2 2  0.03
x  2  0.03  2 x  4 x  0; x  0   0; x  0   1; tcr 
2

 2
Forward difference scheme; t  2tcr s.
0.4

0.3

0.2

0.1
x(t)

-0.1

-0.2

Numerical
-0.3 Exact

-0.4
0 0.5 1 1.5 2 2.5 3 3.5 4
16
ts
2 2  0.03
x  2  0.03  2 x  4 2 x  0; x  0   0; x  0   1; tcr  
 2
Forward difference scheme; t  tcr s.

0.2
Numerical
Exact
0.15

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 17
ts
2 2  0.03
x  2  0.03  2 x  4 x  0; x  0   0; x  0   1; tcr 
2

 2
Forward difference scheme; t  0.5tcr s.

0.2
Numerical
Exact
0.15

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 18
ts
2 2  0.03
x  2  0.03  2 x  4 x  0; x  0   0; x  0   1; tcr 
2

 2
Forward difference scheme; t  tcr /20 s.

0.2
Numerical
Exact
0.15

0.1

0.05
x(t)

-0.05

-0.1

-0.15
ts
-0.2 19
0 0.5 1 1.5 2 2.5 3 3.5 4
x  2  0.03  2 x  4 2 x  0; x  0   0; x  0   1
Backward difference scheme; t  1/25 s.

0.2
Numerical
0.15 Exact

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4
20
ts
x  2  0.03  2 x  4 2 x  0; x  0   0; x  0   1
Backward difference scheme; t  1/50 s.

0.2
Numerical
0.15 Exact

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4
ts 21
x  2  0.03  2 x  4 2 x  0; x  0   0; x  0   1
Backward difference scheme; t  1/100 s.

0.2
Numerical
0.15 Exact

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 22
ts
x  2  0.03  2 x  4 2 x  0; x  0   0; x  0   1
Backward difference scheme; t  1/200 s.

0.2
Numerical
0.15 Exact

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4
23
ts
x  2  0.03  2 x  4 2 x  0; x  0   0; x  0   1
Backward difference scheme; t  1/400 s.

0.2
Numerical
0.15 Exact

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4
24
ts
x  2  0.03  2 x  4 2 x  0; x  0   0; x  0   1
Backward difference scheme; t  1/800 s.
0.2
Numerical
0.15 Exact

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4
ts
25
x  2  0.03  2 x  4 2 x  0; x  0   0; x  0   1
Backward difference scheme; t  1/1600 s.
0.2
Numerical
0.15 Exact

0.1

0.05
x(t)

-0.05

-0.1

-0.15

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4
ts
26
0.04

0.035

0.03
Dt=1/200 s
0.025
|e|

0.02

0.015

0.01

0.005

0
0 2 4 6 8 10 12 14 16 18 20
ts
-3
x 10
6

5
Dt=1/1600 s
4
|e|

 xexact  xnum    xexact  xnum  / 


2
e
2
1

0 27
0 2 4 6 8 10 12 14 16 18 20
ts
Remarks

• Modes of unsatisfactory performance of a given scheme:

– Lack of stability
– Numerical dissipation and amplitude distortion
– Frequency distortion
– Low order of accuracy (resulting in requiring smaller step size to
get acceptable solutions).

• Stability of the scheme does not guarantee that solutions


obtained would possess acceptable accuracy.

28
Direct integration and modal superposition

Direct integration
Integrate MU  CU  KU  F  t  ;U  0  ,U  0  numerically
directly (that is without introducing any transformation on the
dependent variable). Here would be integrating a set of N coupled ODE-s.
Mode superposition
U  Z with
 t M   I ;  t C   Diag  2nn  ;  t K   Diag n2 
 zn  2nn zn  n2 zn  pn  t  ; zn  0   zn 0 ; zn  0   zn 0  n  1, 2, ,N
with
p  t    t F  t  ; Z  0    t MU  0  & Z  0    t MU  0 
Integrate numerically the above set of N second order, uncoupled ODE-s
and obtain U  Z .
Remarks
Evaluating U  t  by integrating
zn  2nn zn  n2 zn  pn  t  ; zn  0   zn 0 ; zn  0   zn 0 ;
n  1, 2, , N with a common step size of t is equivalent to
evaluating U  t  by integrating
MU  CU  KU  F  t  ;U  0  ,U  0  with a step size of t.
Suppose we use forward difference scheme, which is conditionally
stable, to integrate MU  CU  KU  F  t  ;U  0  , U  0  . In order
2n
that we get stable solutions, we need to use a step size of t  min .
1 n  N n
2
If n   , the critical step size is given by . This places severe demand
N
on the step size.
30
Remarks
 Conversely, if we use backward difference scheme, which is
unconditionally stable, to integrate
MU  CU  KU  F  t  ;U  0  ,U  0  , the scheme would provide
stable solutions for any step size. The choice of step size to be used
in this case is governed by considerations on accuracy of the
solutions and this choice calls for engineering judgement.
From the numerical scheme we see that, typically, we need to
use about 800-1600 steps within a cycle of oscillation at the
highest frequency expected in the response.

When an conditionally stable explicit scheme is used for analyzing


mdof systems, the requirment on step size to ensure stable solution
typically results in stronger requirments than requirments on step size
imposed by consideration of accuracy of solutions. 31
Central difference method : Preliminaries

 t   t 
U  t   U  t  
U t     O  t 2 
2   2 
t
 t   t 
U  t   U  t  
U t     O  t 2 
2   2 
t
1 U  t  t   U  t  U  t   U  t  t  
 
t  t

t
  O  t 2



1
t

2 
U  t  t   2U (t )  U  t  t  
  O  t 2

32
Central difference Method

MU  t   CU  t   KU  t   F  t 
U  0   U 0 ;U  0   U 0 ;0  t  t f
Consider equillibrium at time t and use
U  t  t   U  t  t 
U t  
2t
1
U  t   2 U  t  t   2U (t )  U  t  t  
t

M C
2 
U  t  t   2U (t )  U  t   t  
  U  t  t   U  t  t    KU  t   F  t 
t 2t
M C   2M  M C 
 t 2  2t  U  t  t   F  t    K  t 2  U  t    t 2  2t  U  t  t 

33
M C   2M  M C 
 t 2  2t  U  t  t   F  t    K  t 2  U  t    t 2  2t  U  t  t 

1
M C    2M  M C  
U  t  t    2   F t    K  2  U t    2   U  t  t  
 t 2t    t   t 2t  

1
M C    2M  M C  
U n 1   2    Fn   K  2  U n   2   U n 1 
 t 2t    t   t 2t  

34
1
M C    2M  M C  
U n 1   2  
 n 
F K  U  
 t 2 2t  n 1 
U
 t 2t   t 2 
n
   
U  U n 1 1
U n  n 1 & U n  2 U n 1  2U n  U n 1 
2t t
1
M C    2M  M C  
n  0  U1   2    F   K  U
2  0
 
 t 2 2t  1 
U
  
0
 t 2 t    t    
U  U 1 1
U0  1 & U 0  2 U1  2U 0  U 1 
2t t
What is U 1 ?
U1  U 1
U0   U1  2tU 0  U 1
2t
1 1
U 0  2 U1  2U 0  U 1   2  2tU 0  U 1  2U 0  U 1 
t t
t 2
 U 1  U 0  tU 0  U 0
2
Note: U  0   M 1  F (0)  CU 0  KU 0 
35
Implementation of the central difference method

1 Set n  0;
U  0   M 1  F (0)  CU 0  KU 0 
t 2
U 1  U 0  tU 0  U 0
2
1

 2  Evaluate A=  2   
M C 2M  M C 
; B  A K  2  & D  A  2   .
 t 2t   t   t 2t 
 3 Evaluate
U n 1  AFn  BU n  DU n 1
U n 1  U n 1
Un 
2t
1
U n  2 U n 1  2U n  U n 1 
t
 4  n  n  1; if nt  t f , stop; other wise go to  3 .

36
Mathematical preliminaries-6

Jury's criterion
Consider the polynomial
P  z   a0 z n  a1 z n 1   an 1 z  an ; a0  0
Jury's criterion provides necessary and sufficient condtions for
the roots of the polynomial to lie within unit circle in the complex plane.
The necessary conditions are P 1  0 and  1 P  1  0.
n

Jury's table helps us to construct the sufficient conditions.

37
Jury's table for P  z   a0 z n  a1 z n 1   an 1 z  an ; a0  0 Stability criteria:
Row z0 z1 z2 z3 z n2 z n 1 zn Necessary conditions
1 an an 1 an  2 an  3 a2 a1 a0 P 1  0
2 a0 a1 a2 a3 an  2 an 1 an  0 for n even
3 bn 1 bn  2 bn 3 bn  4 b1 b0 P  1  
 0 for n odd
4 b0 b1 b2 b3 bn 2 bn 1
Sufficient conditions
5 cn  2 cn 3 cn  4 cn 5 c0
an  a0
6 c0 c1 c2 c3 cn 2
bn 1  b0

2n  5 p3 p2 p1 p0 cn  2  c0
2n  4 p0 p1 p2 p3
2n  3 q2 q1 q0 q2  q0
Number of sufficient
an an 1 k
bk  ; k  0,1, 2, , n 1 conditions=n -1.
a0 ak 1
bn 1 bn  2 k Remark
ck  ; k  0,1, 2, ,n  2
b0 bk 1 The criteria do not provide
p3 p2 k information on the value of
qk  ; k  0,1, 2
p0 pk 1 the roots.
Stability analysis of central difference method
Consider x  2 x   2 x  r  t 
xn  2 xn   2 xn  rn
1 xn 1  xn 1
xn   xn 1  2 x  xn 1  & x 
t 2 2t
n n

1  xn 1  xn 1 
 2  xn 1  2 xn  xn 1   2     2
xn  rn
t  2  t 
2   2 t 2 1  t t 2
 xn 1  xn  xn 1  rn
1  t 1  t 1  t
Combining this equation with the identity xn  xn we get
 2   2 t 2 1  t   t 2 
 xn 1      xn    
    1  t 1  t     1   t  rn
 xn     n 1  
x 
 1 0 0 
 2   2 t 2 1  t 

Amplification matrix A=  1  t 
1  t 

 1 0 
39
2   2 t 2 1  t
   2   2 t 2   1  t 
A   I = 1  t 1  t  0     
2
 0
 1    t   1  t 
1 
Jury's criteria
 2   2 t 2   1  t 
P       
2
 
 1    t   1  t 
Necessary conditions
 2   2 t 2   1  t   2 t 2
P 1  1      0  OK 
 1    t   1   t  1   t
 2   2 t 2   1  t  4   2 t 2
 1 P  1  1     0
2

 1  t   1  t  1  t


2 Tn
 4   2 t 2  0  t  
 
Sufficient conditions 2 Tn
Number of conditions=2-1=1 t  
1  t  
a0  a2  1  OK 
1  t 40
Remarks
The method is an explicit method with second order accuracy.
2
The method is conditionally stable with critical step size= .

The critical step size is independent of damping.
The method requires a special starting procedure.
We have assumed that step size is constant.
If M is diagonal and C is proportional to M , the method does not require
inversion of any matrix.
M C 
If not,  2   needs to be inverted once.
 t 2t 
M C 
If t is not constant, the matrix  2   needs to be inverted at every step.
 t 2t 
The method is easily implementable even if the system is nonlinear.
t is the only algorithmic parameter to be selected.
41
1000

Exact
Central diff   2 rad/s
500
 =0
u(t)

-500
t  1.05tcr

-1000
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time t

0.5
Exact
Central diff
u(t)

0
t  0.95tcr

-0.5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time t 42
0.2
Exact
Central diff

0.1

t  tcr / 5
u(t)

-0.1

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time t

0.2
Exact
Central diff
0.1 t  tcr /10
u(t)

-0.1

-0.2 43
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time t
300

Exact   2 rad/s
200
Central diff  =0.05
100
u(t)

-100
t  1.05tcr

-200

-300
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time t

0.5
Exact
Central diff

t  0.95tcr
u(t)

-0.5 44
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time t
0.2
Exact
Central diff
0.1

0 t  tcr / 5
u(t)

-0.1

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time t

0.2
Exact
Central diff
0.1
t  tcr /10
u(t)

-0.1

-0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time t 45
Mathematical preliminaries-7
z - transform
Let f (t ) be function of time t such that f (t )  0 for t  0,
and s  complex number. The Laplace transform of f (t ) is defined as

F  s    f  t  exp   st  dt
0

Sampled form of f (t ) with sampling interval T



f  t    f  t    t  nT 
n 0
  
F  s     f  t    t  nT  exp   st  dt   f  nT  exp   snT 
0 n0 n0
 
  f  nT  exp  sT    f  nT  z  n with z = exp  sT 
n

n 0 n 0

z  transform of f (t )

F  z    f  nT  z  n
n 0
46

z  transform of f (t ) : F  z    f  nT  z  n
n 0

Geometric progression
sn  1  r  r 2   rn
rsn  r  r 2   r n 1
 1  r  sn  1  r n 1
1  r n 1 1
 sn  ; r  1  lim sn  s 
1  r  n  1  r 
Examples
 f  t   U  t   f  nT   1 for n  0 otherwise 0

1 1 1 z
 F z   z n
 1  2   1

n 0 z z 1 z z 1
47
f  t   kt for t  0 otherwise 0
 f  nT   nT for n  0 otherwise 0.
 
 F  z    nTz  n  T  nz  n  T  z 1  2 z 2  3z 3  
n 0 n 0

z 1 1 ds 1 2 3
s  1  2    2  3  4
z 1 z z dz z z z
  z   z 1  2 z 2  3z 3  
ds
dz
ds 1

dz  z  12

 F  z   T  z  2 z  3z  
1 2 3 Tz
 z  1
2

48
z  transform of f (t ) :

F  z    f  nT  z  n
n 0

a n for n  0,1, 2,3, 


1 z
 f  nT     F z  a z n n
 1

 0 for n  0 n 0 1  az za
exp  anT  for n  0,1, 2,3,
 f  nT   
 0 0 for n  0

1 z
 F  z    exp  aT   z
n n
 
n0 1  exp  aT  z 1
z  exp  aT 
z sin T
 f  t   sin t  F  z   2
z  2 z cos T  1
z 2  z cos T
 f  t   cos t  F  z   2
z  2 z cos T  1
49

z  transform of f (t ) : F  z    f  nT  z  n  Z  f  nT    F  z 
n 0

Z  af  nT    aF  z 
Z  a n f  nT    F  a 1 z 
Z  f  t  nT    z  n F  z 
 n 1

Z  f  t  nT    z  F  z    f  kT  z  k  ; n  0; integer
n

 k 0 

Z  f  k  1   zF  z   zx  0 
Z  f  k  2    z 2 F  z   z 2  0   zf 1
Z  f  k  n    z n F  z   z n f  0   z n 1 f 1   zf  n  1 ; n  0; integer
k
y  k    x  n ; k  0,1, 2,; y (k )  0 for k  0
n 0

 y  k   y  k  1  x  k   Z  y  k   y  k  1   X  z 
X  z
 Y  z 1  z   X  z   Y  z  
1 z 50
z  transform of f (t ) :

F  z    f  nT  z  n  Z  f  nT    F  z 
n 0

Conisder a dynamical system with input x  t  and output y  t 


Let the input output relation for the sampled data be given by
y  n   a1 y  n  1   ak y  n  k   b0 x  n   b1 x  n  1   bm x  n  m 
 Y  z  1  a1 z 1   ak z  k   X  z  b0  b1 z 1   bm z  m 
 z  FRF is given by
Y  z  1  a1 z 1   ak z  k

X  z  b0  b1 z 1   bm z  m

51
Stability analysis of central difference scheme : alternative
formulation

2   2 t 2 1  t
xn 1  xn  xn 1
1  t 1  t
2   2 t 2 1  t
 xn  xn 1  xn  2
1  t 1  t
2   2 t 2 1 1  t 2
 X z  z X z  z X z
1  t 1  t
 2 2   2 t 2 1  t 
 X  z z  z  0
 1  t 1  t 
2   2 t 2 1  t
z 
2
z 0 (*)
1  t 1  t
This is identical to the characteristic equation obtained earlier:
 2   2 t 2   1  t 
 
2
 0
 1  t   1  t 
Apply Jury's criterion on (*). 52

You might also like