Numerical integration of DAE s seminar Sandra Allaart-Bruin sbruin@win.tue.nl seminar p.1
Seminar overview February 18 Arie Verhoeven Introduction to DAE s seminar p.2
Seminar overview February 18 Arie Verhoeven Introduction to DAE s March 10 Sandra Allaart-Bruin Numerical Integration of DAE s seminar p.2
Seminar overview February 18 Arie Verhoeven Introduction to DAE s March 10 Sandra Allaart-Bruin Numerical Integration of DAE s March 17 Pieter Heres DAE s in electrical circuits seminar p.2
Seminar overview February 18 Arie Verhoeven Introduction to DAE s March 10 Sandra Allaart-Bruin Numerical Integration of DAE s March 17 Pieter Heres DAE s in electrical circuits March 31 Mikhail Sizov DAE s in Multibody systems seminar p.2
Seminar overview February 18 Arie Verhoeven Introduction to DAE s March 10 Sandra Allaart-Bruin Numerical Integration of DAE s March 17 Pieter Heres DAE s in electrical circuits March 31 Mikhail Sizov DAE s in Multibody systems April 28 Michael Guenther Expert seminar p.2
Overview Test DAE seminar p.3
Overview Test DAE Trapezoidal rule seminar p.3
Overview Test DAE Trapezoidal rule Backward Differentiation Formulae seminar p.3
Overview Test DAE Trapezoidal rule Backward Differentiation Formulae Modified Extended BDF seminar p.3
Overview Test DAE Trapezoidal rule Backward Differentiation Formulae Modified Extended BDF Codes seminar p.3
Simple test-case DAE: x(t) = sin(t) x (t) + y(t) = 0 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) 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 coefficients: Ax (t) + Bx(t) = g(t) [ ] ( ) [ ] ( ) ( ) 0 0 x (t) 1 0 x(t) sin(t) 1 0 y + = (t) 0 1 y(t) 0 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 coefficients: Ax (t) + Bx(t) = g(t) [ ] ( ) [ ] ( ) ( ) 0 0 x (t) 1 0 x(t) sin(t) 1 0 y + = (t) 0 1 y(t) 0 What is the index? seminar p.4
Differential index The differential index k of a (non)linear, sufficiently smooth DAE is the smallest k such that f(x, x, t) = 0 d dt f(x, x, t) = 0. d k dt k f(x, x, t) = 0 uniquely determines x as a continuous function of (x, t). seminar p.5
Index Differential index δ = 2 seminar p.6
Index Differential index δ = 2 Tractability index τ = 2 seminar p.6
Index Differential index δ = 2 Tractability index τ = 2 Perturbation index π = 2 seminar p.6
Index Differential index δ = 2 Tractability index τ = 2 Perturbation index π = 2 There always holds that: δ τ δ + 1 seminar p.6
Consistent Initial Values f(x, x, t) = 0 x 0 is a consistent initial value, if there exists a smooth solution that fullfills x(t 0 ) = x 0 and this solution is defined for all t. seminar p.7
Consistent Initial Values x(t) = sin(t) x (t) + y(t) = 0 x 0 is a consistent initial value, if there exists a smooth solution that fullfills x(t 0 ) = x 0 and this solution is defined for all t. seminar p.7
Consistent Initial Values x(t) = sin(t) x (t) + y(t) = 0 x 0 is a consistent initial value, if there exists a smooth solution that fullfills x(t 0 ) = x 0 and this solution is defined for all t. Algebraic constraint: x(t) = sin(t) seminar p.7
Consistent Initial Values x(t) = sin(t) x (t) + y(t) = 0 x 0 is a consistent initial value, if there exists a smooth solution that fullfills x(t 0 ) = x 0 and this solution is defined for all t. Algebraic constraint: x(t) = sin(t) Hidden algebraic constraint: y(t) = cos(t) seminar p.7
Consistent Initial Values x(t) = sin(t) x (t) + y(t) = 0 x 0 is a consistent initial value, if there exists a smooth solution that fullfills x(t 0 ) = x 0 and this solution is defined for all t. Algebraic constraint: x(t) = sin(t) Hidden algebraic constraint: y(t) = cos(t) Consistent initial values: x 0 y 0 = sin(0) = cos(0) seminar p.7
Trapezoidal rule Consider the following ODE: x (t) = f(x(t), t) The trapezoidal rule applied: x n+1 x n h = 1 2 (f(x n+1, t n+1 ) + f(x n, t n )) seminar p.8
Trapezoidal rule test DAE x(t) = sin(t) x (t) + y(t) = 0 The Trapezoidal rule applied: x n+1 + x n = sin(t n+1 ) + sin(t n ) x n+1 x n h + 1 2 (y n+1 + y n ) = 0 seminar p.9
Trapezoidal rule 1.5 Trapeziodal rule 1 x 0 = sin(0) y 0 = cos(0) 0.5 0 0.5 1 x y 1.5 seminar p.10
Trapezoidal rule 1.5 Trapezoidal rule 1 x 0 = sin(0) y 0 = cos(0) h 0.5 0 0.5 1 x y 1.5 seminar p.10
Trapezoidal rule 1500 1000 x y Trapezoidal rule x 0 = h y 0 = cos(0) 500 0 500 1000 1500 seminar p.10
Analysis Trapezoidal rule x n+1 = sin(t n+1 ) + x n sin(t n ) y n+1 = y n 2 h (x n+1 x n ) If x 0 sin(0) then x n+1 is never equal to sin(t n+1 ). seminar p.11
Backward Diff. Formula Consider the following ODE: x (t) = f(x(t), t) The Backward Differentiation Formula applied: k j=1 α j x n+j = hβ k f(x n+k, t n+k ) Remark: 1-step BDF is Euler Implicit (α 0 = 1, α 1 = 1, β 1 = 1) seminar p.12
Backward Diff. Formula test DAE x(t) = sin(t) x (t) + y(t) = 0 1-step BDF x n+1 = sin(t n+1 ) x n+1 x n h + y n+1 = 0 seminar p.13
Backward Diff. Formula 1.5 1 step BDF 1 x 0 = sin(0) y 0 = cos(0) 0.5 0 0.5 1 x y 1.5 seminar p.14
Backward Diff. Formula 1.5 1 step BDF 1 x 0 = sin(0) y 0 = cos(0) h 0.5 0 0.5 1 x y 1.5 seminar p.14
Backward Diff. Formula 1.5 1 step BDF 1 x 0 = h y 0 = cos(0) 0.5 0 0.5 1 x y 1.5 seminar p.14
analysis 1-step BDF x n+1 = sin(t n+1 ) y n+1 = x n+1 x n h seminar p.15
analysis 1-step BDF x n+1 = sin(t n+1 ) y n+1 = x n+1 x n h BDF solves the algebraic equation exact! 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. 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? seminar p.16
BDF BDF method perfect? seminar p.17
BDF BDF method perfect? A-stable up to order 2 (Dalhquist Barrier). seminar p.17
BDF BDF method perfect? A-stable up to order 2 (Dalhquist Barrier). A(α) stable up to order 6. seminar p.17
BDF BDF method perfect? A-stable up to order 2 (Dalhquist Barrier). A(α) stable up to order 6. other methods? seminar p.17
Modified Extended BDF Ax (t) + g(x(t), t) = 0 1st BDF step x n k x n k 1 x n 1 x n x n+1 2nd BDF step g( x n,t n ) g(x n+1,t n ) Evaluation step Final step x n (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 + seminar p.19
Available codes code method authors DAE index IDE 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 seminar p.20
Available codes http://www-iam.mathematik.hu-berlin.de/ lamour/ code for index reduction and computing consistent initial values. 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 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 seminar p.21
Summary Trapezoidal rule is not suited for DAE s. seminar p.22
Summary Trapezoidal rule is not suited for DAE s. BDF with fixed stepsize is suited for DAE s. seminar p.22
Summary Trapezoidal rule is not suited for DAE s. BDF with fixed stepsize is suited for DAE s. Index of DAE is important for convergence results. seminar p.22
Summary Trapezoidal rule is not suited for DAE s. BDF with fixed stepsize is suited for DAE s. Index of DAE is important for convergence results. There are a lot of different codes available for DAE s with index 3. 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 seminar p.23
Questions? seminar p.24