Vous êtes sur la page 1sur 56

Numerical integration of DAEs

seminar
Sandra Allaart-Bruin
sbruin@win.tue.nl

Scientic Computing Group

seminar p.1

Seminar overview
February 18 Arie Verhoeven Introduction to DAEs

Scientic Computing Group

seminar p.2

Seminar overview
February 18 Arie Verhoeven Introduction to DAEs March 10 Sandra Allaart-Bruin Numerical Integration of DAEs

Scientic Computing Group

seminar p.2

Seminar overview
February 18 Arie Verhoeven Introduction to DAEs March 10 Sandra Allaart-Bruin Numerical Integration of DAEs March 17 Pieter Heres DAEs in electrical circuits

Scientic Computing Group

seminar p.2

Seminar overview
February 18 Arie Verhoeven Introduction to DAEs March 10 Sandra Allaart-Bruin Numerical Integration of DAEs March 17 Pieter Heres DAEs in electrical circuits March 31 Mikhail Sizov DAEs in Multibody systems

Scientic Computing Group

seminar p.2

Seminar overview
February 18 Arie Verhoeven Introduction to DAEs March 10 Sandra Allaart-Bruin Numerical Integration of DAEs March 17 Pieter Heres DAEs in electrical circuits March 31 Mikhail Sizov DAEs in Multibody systems April 28 Michael Guenther Expert
Scientic Computing Group

seminar p.2

Overview
Test DAE

Scientic Computing Group

seminar p.3

Overview
Test DAE Trapezoidal rule

Scientic Computing Group

seminar p.3

Overview
Test DAE Trapezoidal rule Backward Differentiation Formulae

Scientic Computing Group

seminar p.3

Overview
Test DAE Trapezoidal rule Backward Differentiation Formulae Modied Extended BDF

Scientic Computing Group

seminar p.3

Overview
Test DAE Trapezoidal rule Backward Differentiation Formulae Modied Extended BDF Codes

Scientic Computing Group

seminar p.3

Simple test-case
DAE: x(t) = sin(t) x (t) + y(t) = 0

Scientic Computing Group

seminar p.4

Simple test-case
DAE: x(t) = sin(t) x (t) + y(t) = 0 exact solution x(t) = sin(t) y(t) = cos(t)

Scientic Computing Group

seminar p.4

Simple test-case
DAE: x(t) = sin(t) x (t) + y(t) = 0 exact solution x(t) = sin(t) y(t) = cos(t)

linear constant coefcients: Ax (t) + Bx(t) = g(t) 0 0 1 0 x (t) y (t) 1 0 + 0 1 x(t) y(t) = sin(t) 0

Scientic Computing Group

seminar p.4

Simple test-case
DAE: x(t) = sin(t) x (t) + y(t) = 0 exact solution x(t) = sin(t) y(t) = cos(t)

linear constant coefcients: Ax (t) + Bx(t) = g(t) 0 0 1 0 x (t) y (t) 1 0 + 0 1 x(t) y(t) = sin(t) 0

What is the index?


Scientic Computing Group

seminar p.4

Differential index
The differential index k of a (non)linear, sufciently smooth DAE is the smallest k such that f (x , x, t) = 0 d f (x , x, t) = 0 dt . . . dk f (x , x, t) = 0 k dt uniquely determines x as a continuous function of (x, t).
Scientic Computing Group

seminar p.5

Index
Differential index = 2

Scientic Computing Group

seminar p.6

Index
Differential index = 2 Tractability index = 2

Scientic Computing Group

seminar p.6

Index
Differential index = 2 Tractability index = 2 Perturbation index = 2

Scientic Computing Group

seminar p.6

Index
Differential index = 2 Tractability index = 2 Perturbation index = 2 There always holds that: +1

Scientic Computing Group

seminar p.6

Consistent Initial Values


f (x , x, t) = 0 x0 is a consistent initial value, if there exists a smooth solution that fulllls x(t0 ) = x0 and this solution is dened for all t.

Scientic Computing Group

seminar p.7

Consistent Initial Values


x(t) = sin(t) x (t) + y(t) = 0 x0 is a consistent initial value, if there exists a smooth solution that fulllls x(t0 ) = x0 and this solution is dened for all t.

Scientic Computing Group

seminar p.7

Consistent Initial Values


x(t) = sin(t) x (t) + y(t) = 0 x0 is a consistent initial value, if there exists a smooth solution that fulllls x(t0 ) = x0 and this solution is dened for all t. Algebraic constraint: x(t) = sin(t)

Scientic Computing Group

seminar p.7

Consistent Initial Values


x(t) = sin(t) x (t) + y(t) = 0 x0 is a consistent initial value, if there exists a smooth solution that fulllls x(t0 ) = x0 and this solution is dened for all t. Algebraic constraint: x(t) = sin(t) Hidden algebraic constraint: y(t) = cos(t)

Scientic Computing Group

seminar p.7

Consistent Initial Values


x(t) = sin(t) x (t) + y(t) = 0 x0 is a consistent initial value, if there exists a smooth solution that fulllls x(t0 ) = x0 and this solution is dened for all t. Algebraic constraint: x(t) = sin(t) Hidden algebraic constraint: y(t) = cos(t) Consistent initial values:
Scientic Computing Group

x0 = sin(0) y0 = cos(0)

seminar p.7

Trapezoidal rule
Consider the following ODE: x (t) = f (x(t), t) The trapezoidal rule applied: xn+1 xn 1 = (f (xn+1 , tn+1 ) + f (xn , tn )) h 2

Scientic Computing Group

seminar p.8

Trapezoidal rule
test DAE x(t) = sin(t) x (t) + y(t) = 0 The Trapezoidal rule applied: xn+1 + xn = sin(tn+1 ) + sin(tn ) xn+1 xn 1 + (yn+1 + yn ) = 0 h 2

Scientic Computing Group

seminar p.9

Trapezoidal rule
Trapeziodal rule
1.5

0.5

x0 = sin(0) y0 = cos(0)

0.5

1.5
Scientic Computing Group

seminar p.10

Trapezoidal rule
Trapezoidal rule
1.5

0.5

x0 = sin(0) y0 = cos(0) h

0.5

1.5
Scientic Computing Group

seminar p.10

Trapezoidal rule
Trapezoidal rule
1500 x y 1000

500

x0 = h y0 = cos(0)

500

1000

1500
Scientic Computing Group

seminar p.10

Analysis Trapezoidal rule


xn+1 = sin(tn+1 ) + xn sin(tn ) 2 yn+1 = yn (xn+1 xn ) h If x0 = sin(0) then xn+1 is never equal to sin(tn+1 ).

Scientic Computing Group

seminar p.11

Backward Diff. Formula


Consider the following ODE: x (t) = f (x(t), t) The Backward Differentiation Formula applied:
k

j xn+j = hk f (xn+k , tn+k )


j=1

Remark: 1-step BDF is Euler Implicit (0 = 1, 1 = 1, 1 = 1)


Scientic Computing Group

seminar p.12

Backward Diff. Formula


test DAE x(t) = sin(t) x (t) + y(t) = 0 1-step BDF xn+1 = sin(tn+1 ) xn+1 xn + yn+1 = 0 h

Scientic Computing Group

seminar p.13

Backward Diff. Formula


1 step BDF
1.5

0.5

x0 = sin(0) y0 = cos(0)

0.5

1.5
Scientic Computing Group

seminar p.14

Backward Diff. Formula


1 step BDF
1.5

0.5

x0 = sin(0) y0 = cos(0) h

0.5

1.5
Scientic Computing Group

seminar p.14

Backward Diff. Formula


1 step BDF
1.5

0.5

x0 = h y0 = cos(0)

0.5

1.5
Scientic Computing Group

seminar p.14

analysis 1-step BDF


xn+1 = sin(tn+1 ) xn+1 xn yn+1 = h

Scientic Computing Group

seminar p.15

analysis 1-step BDF


xn+1 = sin(tn+1 ) xn+1 xn yn+1 = h BDF solves the algebraic equation exact!

Scientic Computing Group

seminar p.15

BDF convergence
A k step BDF with constant stepsize, applied to a const. coeff. DAE with diff. index , is convergent with order p = k after ( 1)k + 1 steps.

Scientic Computing Group

seminar p.16

BDF convergence
A k step BDF with constant stepsize, applied to a const. coeff. DAE with diff. index , is convergent with order p = k after ( 1)k + 1 steps.

What if we use variable stepsizes?

Scientic Computing Group

seminar p.16

BDF
BDF method perfect?

Scientic Computing Group

seminar p.17

BDF
BDF method perfect? A-stable up to order 2 (Dalhquist Barrier).

Scientic Computing Group

seminar p.17

BDF
BDF method perfect? A-stable up to order 2 (Dalhquist Barrier). A() stable up to order 6.

Scientic Computing Group

seminar p.17

BDF
BDF method perfect? A-stable up to order 2 (Dalhquist Barrier). A() stable up to order 6. other methods?

Scientic Computing Group

seminar p.17

Modied Extended BDF


Ax (t) + g(x(t), t) = 0
1st BDF step
xnk xnk1
xn1

xn

xn+1

2nd BDF step

Evaluation step
g(xn,tn)
g(xn+1,t n)

Final step

xn
Scientic Computing Group

(3 x same Jacobian)

seminar p.18

Order reduction
k-step Convergence order consistent method index-1 DAE index-2 DAE solutions BDF k k + MEBDF k+1 k +

Scientic Computing Group

seminar p.19

Available codes

code method authors DAEindex ID RADAU IRK Hairer, Wanner 3 GELDA BDF,RK Mehrmann + MEBDFI MEBDF Abdulla, Cash 3 + DASSL BDF Petzold 1 + PSIDE IRK De Swart a.o. 3 + GAMD BVM Iavernaro, 3 + Mazzia

Scientic Computing Group

seminar p.20

Available codes
http://www-iam.mathematik.hu-berlin.de/lamour/ code for index reduction and computing consistent initial values.

Scientic Computing Group

seminar p.21

Available codes
http://www-iam.mathematik.hu-berlin.de/lamour/ code for index reduction and computing consistent initial values. index 2: x(t) = sin(t) x (t) + y(t) = 0

Scientic Computing Group

seminar p.21

Available codes
http://www-iam.mathematik.hu-berlin.de/lamour/ code for index reduction and computing consistent initial values. index 2: x(t) = sin(t) x (t) + y(t) = 0 index 1: x(t) = cos(t) x (t) + y(t) = 0

Scientic Computing Group

seminar p.21

Summary
Trapezoidal rule is not suited for DAEs.

Scientic Computing Group

seminar p.22

Summary
Trapezoidal rule is not suited for DAEs. BDF with xed stepsize is suited for DAEs.

Scientic Computing Group

seminar p.22

Summary
Trapezoidal rule is not suited for DAEs. BDF with xed stepsize is suited for DAEs. Index of DAE is important for convergence results.

Scientic Computing Group

seminar p.22

Summary
Trapezoidal rule is not suited for DAEs. BDF with xed stepsize is suited for DAEs. Index of DAE is important for convergence results. There are a lot of different codes available for DAEs with index 3.

Scientic Computing Group

seminar p.22

References
Ordinary Differential Equations in Theory and Practice, Mattheij and Molenaar Solving Ordinary Differential Equations II, Hairer and Wanner Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations, Brenan, Campbell and Petzold http://pitagora.dm.uniba.it/testset

Scientic Computing Group

seminar p.23

Questions?

Scientic Computing Group

seminar p.24

Vous aimerez peut-être aussi