+ All Categories
Home > Documents > Numerical Integration of Equations of...

Numerical Integration of Equations of...

Date post: 08-Oct-2019
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
22
1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion Prof. Olivier Verlinden (FPMs) [email protected] Prof. Olivier Brüls [email protected] GraSMech course 2009-2010 Computer-aided analysis of rigid and flexible multibody systems GraSMech – Multibody 2 Modelling steps Choose the configuration parameters (q) Set up the kinematics: express position, velocity and acceleration (rotational and translational) in terms of q and its first and second time derivatives Express the forces in terms of q, its time derivatives and time t Build the differential equations of motion Numerical treatment of the equations (lesson 5) GraSMech – Multibody 3 Layout of the presentation General principle of an integration scheme (O. Verlinden) ODEs (without constraints) principle of integration principal methods: multistep (Newmark), Runge-Kutta practical realization of a time step (explicit and implicit) DAEs (with constraints) Properties of integration methods (O. Brüls) ODEs Accuracy, stability Stiff ODEs DAEs The index Index reduction methods
Transcript
Page 1: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

1

GraSMech – Multibody 1

Numerical Integration of Equations of Motion

Prof. Olivier Verlinden (FPMs)

[email protected]

Prof. Olivier Brü[email protected]

GraSMech course 2009-2010

Computer-aided analysis of rigid

and flexible multibody systems

GraSMech – Multibody 2

Modelling steps

� Choose the configuration parameters (q)

� Set up the kinematics: express position, velocity and acceleration (rotational and translational) in terms of qand its first and second time derivatives

� Express the forces in terms of q, its time derivatives and time t

� Build the differential equations of motion

� Numerical treatment of the equations (lesson 5)

GraSMech – Multibody 3

Layout of the presentation

� General principle of an integration scheme (O. Verlinden)

� ODEs (without constraints)

� principle of integration

� principal methods: multistep (Newmark), Runge-Kutta

� practical realization of a time step (explicit and implicit)

� DAEs (with constraints)

� Properties of integration methods (O. Brüls)

� ODEs

� Accuracy, stability

� Stiff ODEs

� DAEs

� The index

� Index reduction methods

Page 2: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

2

GraSMech – Multibody 4

Concerned equations

The equations of motion consist of

� ncp differential equations (dynamic equilibrium)

� n_c constraint equations

�at position level

�or at velocity level

�or at acceleration level

=> nc+ncp differential-algebraic equations (DAE)

GraSMech – Multibody 5

Residuals

The equations of motion are considered in residual form

From the formulation, we can only estimate the residuals f (≠ 0) for given values of q and its time derivatives, λλλλ and t

=> It is the job of the numerical integration to draw them to zero by finding the right values of q(t) and λλλλ !

GraSMech – Multibody 6

Principle of numerical integration

� We want to integrate the equations of motion without constraints

� Step by step procedure

One or several states at and before t

h=time step

3xncp unknowns

Page 3: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

3

GraSMech – Multibody 7

Basic equations

� The 3xncp corresponding equations are

� the ncp residuals

� and the 2xncp integrals

� The integrals are replaced by integration formulas

example: Newmark formulas (0<β<0.5, 0<γ<1)

GraSMech – Multibody 8

First-order form

� Integration methods generally deal with first-order differential equations

with integration formulas of the form

� N second order differential equations

can be transformed into 2N equivalent first-order differential equations

GraSMech – Multibody 9

Implicit - explicit

� The integration formula is implicit if it involves the term in

and explicit otherwise

� Number of steps: number of known configurations at and before time t involved in the integration formula

Page 4: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

4

GraSMech – Multibody 10

Adams-Moulton integration formulas

� m=0 (Euler implicit)

� m=1 (one step,=trapezoidal rule)

� m=2 (two steps)

GraSMech – Multibody 11

BDF integration formulas

� m=1 (=ADAMS-0)

� m=2 (two steps)

� m=3 (three steps)

GraSMech – Multibody 12

General form of multistep formulas

� General form of multistep integration formulas

or

method explicit if β0=0

� ADAMS-m: p=0 and k=mADAMS-2: α0=12, α1=-12, β0=5 , β1=8 , β2=-1

� BDF-m: p=m and k=0BDF-3: α0=11, α1=-18, α2=9, α3=-2 , β0=6

Page 5: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

5

GraSMech – Multibody 13

Generating second-order formulas

� By applying recursively implicit first-order formulas

you can generate second-order formulas

=> more efficient than working with 2N equations

GraSMech – Multibody 14

Equivalent 2nd order ADAMS-Moulton

� m=0

� m=1

� m=2

GraSMech – Multibody 15

Equivalent 2nd order BDF formulas

� m=1

� m=2

Page 6: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

6

GraSMech – Multibody 16

Consistent initial conditions

� The initial conditions are

and must be given by the user

� The initial accelerations must verify the equations of motion

and are then given by

GraSMech – Multibody 17

Resolution with explicit formulas

The accelerations are calculated as for the initial accelerations

GraSMech – Multibody 18

Resolution with implicit formulas

� Once positions and velocities have been replaced by the integration formulas, the only unkowns are the

accelerations at t+h

� solved by iterative procedure of Newton-Raphson

with J the iteration matrix (Jacobian matrix)

Page 7: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

7

GraSMech – Multibody 19

Computation of the iteration matrix

� The accelerations at t+h intervenes at three levels

� The iteration matrix is given by

KT, CT= tangent stiffness and damping matrices

GraSMech – Multibody 20

Computation of iteration matrix

� Formulas of Newmark

� an approximate iteration matrix is sufficient to get convergence

� J tends to M when h decreases (always possible to get convergence with M by decreasing h -> not efficient with stiff systems)

GraSMech – Multibody 21

Integration with constraints

� The system of equations of motion is

� or

� or

Page 8: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

8

GraSMech – Multibody 22

Constraints and initial conditions

� The equations of motion with constraints at acceleration level must be used

� The constraint equations at acceleration level must be used to get consistent intial accelerations

� The same relationship can be used with explicit integration formulas but unavoidable drift of the constraints at velocity and position levels !

GraSMech – Multibody 23

Constraints and implicit formulas

� The constraints simply consist of some more nonlinear equations in the accelerations (and

Lagrange multipliers) at t+h

whatever the constraint level

� which can be solved by Newton-Raphson

GraSMech – Multibody 24

Runge-Kutta methods

� So-called « stage » methods: simultaneous resolution of the equations of motion at s instants ti = tn + ci hbetween t and t+h

with formulas

� => sxN set of equations to solve simultaneously

Page 9: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

9

GraSMech – Multibody 25

Runge-Kutta methods

� The state at time tn+1 is given by other formulas

GraSMech – Multibody 26

Example: RKI 5/12 (Radau)

� 2 stages implicit scheme (γ=5/12 for RKI 5/12)

GraSMech – Multibody 27

Resolution for RKI 5/12

� The set of 2N nonlinear equations is solved by the usual iterative procedure of Newton-Raphson

� and state at tn+1 is given by

Page 10: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

10

GraSMech – Multibody 28

Integration – second part

� Properties of integration methods

=> Olivier Brüls

GraSMech – Multibody 29

Time integration

I. General principle of an integration scheme (O. Verlinden)

II. Properties and specific methods (O. Brüls)

� ODEs

�Multistep (Newmark), Runge-Kutta

�Accuracy, stability

�Stiff ODEs

� DAEs

�The index

� Index reduction methods

GraSMech – Multibody 30

ODEs: Multistep methods

Differential equation:

+ Adams 2:

Algebraic equation:

General form of a linear multistep method (k steps):

Implicit : ( in the RHS ⇒ nonlinear probl)

BDF:

Adams:

Page 11: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

11

GraSMech – Multibody 31

ODEs: Multistep methods

� Newmark: (*)

� Implementation: Newmark formulae into (*)

� Theoretical analysis:

� Two-step method with a one-step implementation

GraSMech – Multibody 32

ODEs: Runge-Kutta methods

� Euler explicit:

ERK:

IRK:

Intermediate Euler step:

1-step formula:

� Mid-point rule?

�s stages:

GraSMech – Multibody 33

ODEs: Accuracy

� Global error:

� Order p if when

Order

Adams with k steps k + 1

BDF with k steps k

Newmark 1 or 2

RADAU5 (3 stages) 5

for intermediate h : constant of errors!

Page 12: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

12

GraSMech – Multibody 34

ODEs: Accuracy

Periodicity error:

2 0q qω+ =��

2T

π

ω=

T

T T

T

Exact period:

Numerical result:

Undamped oscillator:

GraSMech – Multibody 35

ODEs: Stability

� Undamped oscillator Euler explicit

-1 1

x

x

� Linear scalar test equation

Stability region

GraSMech – Multibody 36

ODEs: Stability

� Undamped oscillator Euler implicit

-1 1

x

x

� Linear test equation

The stability region

includes the left half plane

Page 13: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

13

GraSMech – Multibody 37

ODEs: Stability

� Unconditional stability (A-stability):

« stable solution for any stable linear system »

(whatever h)

� Stability regions for BDFs

BDF1 = Euler implicit

� Dahlquist’s barrier for linear multistep methods:

Unconditional stability is only possible for p ≤ 2

GraSMech – Multibody 38

ODEs: Stability

� Linear multistep method for

� Linear test equation:

� Eigenvalues of the difference equation

� Spectral radius

« amplification factor » at each time step

� Stability region:

GraSMech – Multibody 39

ODEs: Stability

Spectral radius:on the imaginary axis

= measure of the numerical damping

xjωωωωh

2 0q qω+ =��

Page 14: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

14

GraSMech – Multibody 40

Matlab

� ode45 = Dormand/Prince method

(explicit Runge-Kutta)

� ode15s = BDF of order 1 to 5

(implicit multistep)

On the web

� dopri5.f, dopri5.c (Dormand/Prince method)

� lsode.f, dassl.f, cvode.c (BDF)

� radau5.f (implicit Runge-Kutta)

13.6 Comparaison de quelques méthodesAvailable methods

GraSMech – Multibody 41

Example – 2 dof system

� Properties of the system

�k1 = 79.15 N/m and k2 = 1961 N/m

�m =1 kg

�Eigen frequencies: 1 and 10 Hz

� Simulation from initial conditions q1=0 and q2=1

GraSMech – Multibody 42

2 dof system – 20 steps per period

Page 15: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

15

GraSMech – Multibody 43

2 dof system – 5 steps per period

GraSMech – Multibody 44

Stiff ODEs

� Stiff differential equations: slow & fast modes

�Example: FE model with thousands of dofs

� Accuracy is mostly required for the slow modes

� Stability is also required for the fast modes

� Explicit methods

�Restricted stability region ⇒ very small time steps

� Implicit methods

�Large stability domain ⇒ larger time steps

�Price to pay: nonlinear equations to solve

GraSMech – Multibody 45

Stiff ODEs

Higher order explicit methods result in similar stability problems

Limit of explicit methods

Page 16: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

16

GraSMech – Multibody 46

Stiff ODEs

Newmark formulae:

To be solved with:

� From , we seek satisfying

� one non-linear equation

� two linear equations

2 2

1 1

1 1

(0.5 )

(1 )

n n n n n

n n n n

h h h

h h

β β

γ γ+ +

+ +

= + + − +

= + − +

q q q q q

q q q q

� �� ��

� � �� ��

1 1 1 1 1( ) ( , , )n n n n nt+ + + + ++ =M q q h q q 0�� �

, ,n n nq q q� �� 1 1 1, ,n n n+ + +q q q� ��

� Choice of parameters

�Undamped

�Damped 2nd-order accuracy

GraSMech – Multibody 47

Stiff ODEs

Newmark formulae:

To be solved with:

2 2

1 1

1 1

(0.5 )

(1 )

n n n n n

n n n n

h h h

h h

β β

γ γ+ +

+ +

= + + − +

= + − +

q q q a a

q q a a

� �

1 1 1 1 1( ) ( , , )n n n n nt+ + + + ++ =M q q h q q 0�� �

1 1(1 ) (1 )m n m n f n f n

α α α α+ +− + = − +a a q q�� ��

Generalized-αααα method [Chung & Hulbert 1993]

� Two types of acceleration variables:

� Second-order accuracy + numerical damping

GraSMech – Multibody 48

Stiff ODEs

� Spectral radius: Newmark vs. Generalized-α

Page 17: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

17

GraSMech – Multibody 49

ODEs: summary

� Multistep

�Dahlquist’s barrier: stability vs. accuracy

�Variable step-size: implementation is not trivial

� Runge-Kutta

�Higher orders of precision are possible

� IRK: all stages are coupled (n x s unknowns!)

� Generalized-α

�One-step method

�Unconditional stability (numerical damping)

�Second-order accuracy

GraSMech – Multibody 50

DAEs

� Consider the scalar singular perturbation problem:

if , the system becomes very stiff

� Limit case = DAE:

� Underlying ODE?

Differentiation index of the original DAE = 1

� Integration procedure:

GraSMech – Multibody 51

DAEs

� Multibody system

�Constraints at velocity level:

�Constraints at acceleration level:

�One more differentiation to obtain

� Differentiation index = 3 !Hidden

constraints

� Index reduction

�constraints at velocity level: index-2

�constraints at acceleration level: index-1 ⇒ drift !!

Page 18: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

18

GraSMech – Multibody 52

DAEs

� General forms of DAEs(singular matrix)

Numerical problems Precision (constraints)

Index-1 ~ ODE Large drift

Index-2

Index-3 Highly sensitive No error at position level

Multibody

simulation

� Perturbation index:

High-index problems = highly sensitive !

GraSMech – Multibody 53

DAEs: Direct methods

� Generalized-α method [Arnold & B. ’07]

2 2

1 1

1 1

(0.5 )

(1 )

n n n n n

n n n n

h h h

h h

β β

γ γ+ +

+ +

= + + − +

= + − +

q q q a a

q q a a

� �

1 1(1 ) (1 )m n m n f n f n

α α α α+ +− + = − +a a q q�� ��

1 1 1 1 1 1 1

1

( ) ( , , )

( )

T

n n n n n n n

n

t+ + + + + + +

+

+ + =

=

M q q h q q B λ 0

Φ q 0

�� � (1)

(2)

GraSMech – Multibody 54

DAEs: Direct methods

� Generalized-α method [Arnold & B. ’07]

Good prediction required for Newton process

⇒ if no convergence, h may be reduced

Newton iterations

Stopping criterion

Linearized problem

Page 19: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

19

GraSMech – Multibody 55

DAEs: Direct methods

Bad numerical conditioning for small h

⇒ scaling strategy required

�Iteration matrix :

� Generalized-α method [Arnold & B. ’07]

( )( ) ( , , ) ( ) /

( , , ) /

T

t

t

t

t

= ∂ + + ∂

= ∂ ∂

K M q q h q q B q λ q

C h q q q

�� �

� �

�Tolerance: ( )Ttol ATOL RTOL= + + + +Mq h B λ Φ��

GraSMech – Multibody 56

DAEs: Direct methods

� Generalized-α for a double pendulum [Géradin & Cardona ‘01]

Undamped scheme Damped scheme

stability

+

accuracy

Weak instability for

index-3 DAEs!

GraSMech – Multibody 57

DAEs: Direct methods

� DAEs direct solvers

�Generalized-α: index-3 (numerical damping)

� IRK / RADAU5 (Hairer): index ≤ 3

�BDF / DASSL (Petzold): index ≤ 1

� Index reduction ?

�Projection

�Stabilization (Baumgarte, GGL, overdetermined DAEs)

�Coordinate partitioning / splitting

Page 20: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

20

GraSMech – Multibody 58

DAEs: Index reduction

� Projection

� Index-1 solution:

�After each time-step: project on the constraints

with the condition

with the condition

GraSMech – Multibody 59

DAEs: Index reduction

� Baumgarte stabilization:

�Any drift converges dynamically to zero

�Choice of the parameters?

[Gear, Leimkuhler, Gupta ’85]

ODASSL

[Führer, Leimkuhler ’91]

� GGL formulation:

� Overdetermined DAE:

GraSMech – Multibody 60

DAEs: Index reduction

� Generalized coordinate partitioning

�System with n coordinates and m constraints

�Locally, select n - m independent coord.

�Solve for :

�Eliminate (+ derivatives) from the eq. of motion

�Underlying ODE:

�Efficient numerical implementation

[Wehage & Haug ’82]

Page 21: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

21

GraSMech – Multibody 61

DAEs: Index reduction

� Coordinate splitting:

ok by construction

[Yen ’93]

� null space matrix P:

P = basis of the tangent space…

� Index-1 DAE:

GraSMech – Multibody 62

DAEs: Index reduction

Span the tangent space

Null space matrix (n = 3, m = 1)

= independent coord.

GraSMech – Multibody 63

DAEs: etc…

� Partitioned methods (e.g. half-explicit methods)

� Implicit method for the « algebraic part »

�Explicit method for the « differential part »

� Energy conserving schemes, variational integrators…

�1st-integrals (energy, momenta) & symplecticity

�Nonlinear stability analysis

�Longer integration intervals are possible

Page 22: Numerical Integration of Equations of Motionhosting.umons.ac.be/html/mecara/grasmech/TimeIntegration-3spp.pdf · 1 GraSMech – Multibody 1 Numerical Integration of Equations of Motion

22

GraSMech – Multibody 64

Time integration: Conclusion

� Multibody system = index-3 DAE

�Need sophisticated implicit algorithms

� Combine DAE solvers (RADAU5, DASSL) and

�Projection (velocity level)

�Stabilization (GGL, ODAE)

�Coordinate partitioning / splitting

� Flexible multibody dynamics

�Large & stiff systems

�Generalized-α scheme (MECANO: HHT)

�Energy conserving schemes, variational integrators

GraSMech – Multibody 65

Time integration: References

Technical books� E. Hairer, S.P. Norsett, and G. Wanner. Solving Ordinary

Differential Equations I - Nonstiff Problems. Springer-Verlag, 2nd edition, 1993.

� E. Hairer and G. Wanner. Solving Ordinary Differential Equations II - Stiff and Differential-Algebraic Problems. Springer-Verlag, 2nd edition, 1996.

� K.E. Brenan, S.L. Campbell, and L.R. Petzold. Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations. SIAM, Philadelphia, 2nd edition, 1996.

Numerical methods in multibody dynamics� M. Géradin and A. Cardona. Flexible Multibody Dynamics: A Finite

Element Approach. John Wiley & Sons, New York, 2001.� E. Eich-Soellner, Claus Führer: Numerical Methods in Multibody

Dynamics, ECMI-Series, Teubner, Stuttgart, 1998.

GraSMech – Multibody 66

Time integration: References

A few papers…

� C.W. Gear, B. Leimkuhler, and G.K. Gupta. Automatic Integration of Euler-Lagrange Equations with Constraints. J. Comput. Appl. Mech. 12 & 13: 77-90, 1985.

� R. A. Wehage, and E. J. Haug. Generalized Coordinate Partitioning for Dimension Reduction in Analysis of Constrained Dynamic Systems. ASME J. Mech. Des., 104: 247-255, 1982.

� J. Yen. Constrained Equations of Motion in Multibody Dynamics as ODEs on Manifolds. SIAM J. Numer. Anal., 30:553-568, 1993.

� J. Chung and G.M. Hulbert. A time integration algorithm for structural dynamics with improved numerical dissipation: The generalized-α method. J. of Applied Mechanics, 60:371-375, 1993.

� B. Owren and H.H. Simonsen. Alternative integration methods for problems in structural dynamics. Computer Methods in Applied Mechanics and Engineering, 122:110, 1995.

� M. Arnold and O. Brüls. Convergence of the generalized-alpha scheme for constrained mechanical systems. Multibody System Dynamics, 18(2):185-202, 2007.

� M. Arnold. Numerical methods for simulation in applied mechanics. In: Simulation techniques for applied mechanics, Eds: M. Arnold and W. Schiehlen, Springer, 2008.


Recommended