16
POLI POLI di di MI MI tecnico tecnico lano lano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli Politecnico di Milano, Italy Daniel Dopico University of La Coruña, Spain ACMD 2006 The University of Tokyo Komaba, Tokyo, August 1-4, 2006

POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Embed Size (px)

Citation preview

Page 1: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

PO

LIPO

LI

di

di M

IM

Itecn

ico

tecn

ico

lano

lano

OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED

MECHANICAL SYSTEMS IN INDEX THREE FORM

Carlo L. Bottasso, Lorenzo TrainelliPolitecnico di Milano, Italy

Daniel Dopico

University of La Coruña, Spain

ACMD 2006The University of Tokyo

Komaba, Tokyo, August 1-4, 2006

OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED

MECHANICAL SYSTEMS IN INDEX THREE FORM

Carlo L. Bottasso, Lorenzo TrainelliPolitecnico di Milano, Italy

Daniel Dopico

University of La Coruña, Spain

ACMD 2006The University of Tokyo

Komaba, Tokyo, August 1-4, 2006

Page 2: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

OutlineOutline

• Introduction and background, with specific reference to Newmark’s method;

• Conditioning and sensitivity to perturbations of index 3 DAEs;

• Optimal preconditioning by scaling;

• Conclusions:

Index 3 DAEs can be made as easy to integrate as well behaved ODEs!

Page 3: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Constrained mechanical (multibody) systems in index 3 form:

where

• Displacements:

• Velocities:

• Lagrange multipliers:

• Constraint Jacobian:

Index 3 Multibody DAEsIndex 3 Multibody DAEs

M v0= f (u;v;t) + G(u;t) ¸ ;

u0= v;

0= ©(u;t);

u

v

¸

G := ©;Tu

Page 4: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Newmark’s methodNewmark’s method in three-field form (Newmark 1959):

and similarly for HHT, generalized-α, etc.

RemarkRemark: the analysis is easily extended to other integration other integration methodsmethods, for example BDF-type integrators (Bottasso et al. 2006).

Newmark’s MethodNewmark’s Method

1° h

M (vn+1 ¡ vn) = f n+1 +Gn+1¸ n+1 ¡µ

1¡1°

¶M an ;

un+1 ¡ un = hµ

¯°

vn+1 +µ

1¡¯°

vn

¶¶¡

h2

2

µ1¡

2¯°

¶an;

0= ©n+1;

Page 5: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Solving with Newton’s methodNewton’s method at each time step:

where the iteration matrix is

and the right hand side is

Linearization of Newmark’s MethodLinearization of Newmark’s Method

Displacements

Velocities

Multipliers

{ { {Kinematic eqs.

Equilibrium eqs.

Constraint eqs.

{

{

{

J q = ¡ b;

J =

2

6664

X1

° hU ¡ G

I ¡¯ h°

I 0

GT 0 0

3

7775

X := ¡ (f ;u )n+1 ¡³(G ¸ );u

´

n+1;

Y := ¡ (f ;v)n+1 ;

U := M +° hY :

b =

0

BB@

1° h M (vn+1 ¡ vn) ¡ (f n+1 + Gn+1¸ n+1) +

³1¡ 1

°

´M an

un+1 ¡ un ¡ h³

¯° vn+1 +

³1¡ ¯

° vn

´´+ h2

2

³1¡ 2¯

°

´an

©n+1

1

CCA :

Page 6: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Model effects of finite precision arithmeticsfinite precision arithmetics by means of the small parameter :

Perturbation AnalysisPerturbation Analysis

b(h;") = b(h;0) +"@b@"

¯¯¯¯(h;0)

+O("2);

J (h;") = J (h;0) + "@J@"

¯¯¯¯(h;0)

+ O("2);

q(h;") = q(h;0) +"@q@"

¯¯¯¯(h;0)

+ O("2):

"

¯¯¯¯limh! 0

qi (h;")¯¯¯¯·

°°°° lim

h! 0J ¡ 1(h;0)

°°°°

1

°°°° lim

h! 0b(h;")

°°°°

1

:

J q = ¡ b

limh! 0

q(h;0) = 0

limh! 0

b(h;0) = 0

Insert into and neglect higher order terms to get

Page 7: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Interpretation of the main result

If and/or depend on negative powers of , accuracy will be very poor for small time stepsaccuracy will be very poor for small time steps (this will spoil the order of convergencespoil the order of convergence of the integration scheme).

Perturbation AnalysisPerturbation Analysis

¯¯¯¯limh! 0

qi (h;")¯¯¯¯·

°°°° lim

h! 0J ¡ 1(h;0)

°°°°

1

°°°° lim

h! 0b(h;")

°°°°

1

:

J ¡ 1 b h

Page 8: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Apply perturbation analysis to three-field form:

AccuracyAccuracy of the solution:

RemarkRemark: severe loss of accuracy (ill conditioning) for small !

Perturbation Analysis of NewmarkPerturbation Analysis of Newmark

limh! 0

J =

2

4O(h0) O(h¡ 1) O(h0)O(h0) O(h1) 0O(h0) 0 0

3

5 ;

limh! 0

J ¡ 1 =

2

4O(h2) O(h0) O(h0)O(h1) O(h¡ 1) O(h¡ 1)O(h0) O(h¡ 2) O(h¡ 2)

3

5 :

h

¯¯¯¯limh! 0

¢ un+1

¯¯¯¯· O(h0);

¯¯¯¯limh! 0

¢ vn+1

¯¯¯¯· O(h¡ 1);

¯¯¯¯limh! 0

¢ ¸ n+1

¯¯¯¯· O(h¡ 2):

limh! 0

b=

8<

:

O(h¡ 1)O(h0)O(h0)

9=

;:

Page 9: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Perturbation Analysis of NewmarkPerturbation Analysis of Newmark

Perturbation analysis for other possible forms of Newmark’s method:

(u;v;a;¸ ) (u;v;¸ ) (u;¸ ) (v;¸ ) (a;¸ )¢ u O(h0) O(h0) O(h0) O(h0)¤ O(h0)¤¢ v O(h¡ 1) O(h¡ 1) O(h¡ 1)¤ O(h¡ 1) O(h¡ 1)¤¢ a O(h¡ 2) O(h¡ 2)¤ O(h¡ 2)¤ O(h¡ 2)¤ O(h¡ 2)¢ ¸ O(h¡ 2) O(h¡ 2) O(h¡ 2) O(h¡ 2) O(h¡ 2)

Page 10: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Index 3 Multibody DAEsIndex 3 Multibody DAEs

Solutions proposed in the literature:

• Index two formIndex two form (velocity level constraints), but drift and need for stabilization;

• Position and velocity level constraintsPosition and velocity level constraints (GGL of Gear et al. 1985, Embedded Projection of Borri et al. 2004), but increased cost and complexity;

• ScalingScaling, simple and straightforward to implement (related work: Petzold Lötstedt 1986, Cardona Geradin 1994, Negrut 2005).

Page 11: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Scale equationsScale equations and unknowns unknowns of Newton’s problem:

with

where

= left preconditioner, scales the equations;

= right preconditioner, scales the unknowns.

RemarkRemark: scale back unknowns once at convergence of Newton’s iterations for the current time step.

Left and Right PreconditioningLeft and Right Preconditioning

¹J ¹q = ¡ ¹b;

¹J := D L J D R ; ¹q := D ¡ 1R q; ¹b := D L b;

D L

D R

Page 12: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Left scaling:

Right scaling:

Accuracy of the solution:

RemarkRemark: accuracy (conditioning) independent of time step size, as for well behaved ODEs! Same results for all other forms of the scheme.

Optimal PreconditioningOptimal Preconditioning

Scale equilibrium eqs. by

D L =

2

4¯ h2I 0 0

0 I 00 0 I

3

5 h2

D R =

2

6664

I 0 0

¯ hI 0

0 01

¯ h2I

3

7775

Scale velocities by

Scale Lagrange multipliers by

h2

h

¯¯¯¯limh! 0

¢ un+1

¯¯¯¯· O(h0);

¯¯¯¯limh! 0

¢ vn+1

¯¯¯¯· O(h0);

¯¯¯¯limh! 0

¢ ¸ n+1

¯¯¯¯· O(h0):

Page 13: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Numerical ExampleNumerical Example

Andrews’ squeezing mechanism:

At each Newton iteration, solve

Stop at first non-decreasingfirst non-decreasing Newton correction, i.e.:

A measure of the tightest achievable convergencetightest achievable convergence of Netwon method.

J j qj = ¡ bj

kqj +1k ¸ kqj k

Page 14: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Numerical ExampleNumerical Example

Page 15: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

Numerical ExampleNumerical Example

Page 16: POLI di MI tecnicolano OPTIMAL PRECONDITIONERS FOR THE SOLUTION OF CONSTRAINED MECHANICAL SYSTEMS IN INDEX THREE FORM Carlo L. Bottasso, Lorenzo Trainelli

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

Op

tim

al S

calin

g o

f In

dex T

hre

e

Op

tim

al S

calin

g o

f In

dex T

hre

e

DA

Es

DA

Es

POLITECNICO di MILANO

ConclusionsConclusions

• DAEs can be made as easy to solve numerically as well DAEs can be made as easy to solve numerically as well behaved ODEsbehaved ODEs;

• Recipe for Newmark’s scheme:

- Use any form of the algorithm (two field forms are more computationally convenient);

- Use left andleft and right scalingright scaling of primary unknowns;

- RecoverRecover scaled quantities at convergence.

• Simple to implement in existing codes.