Simulation of ordinary and differential-algebraic equations
Contents
- Introduction to simulation
- Simulation of ordinary differential equations, including stiff problems
- Simulation of differential-algebraic equations
- Modelica and simulation of object-oriented models
Schedule 2026
| Lecture | Date | Room | Slides |
|---|---|---|---|
| ODE 1 | 16/1, 10:15 - 12:00 | L-huset | |
| ODE 2 | 16/1, 14:15 - 16:00 | L-huset | OH |
| ODE 3 | 23/1, 10:15 - 12:00 | L-huset | OH |
| ODE 4 | 23/1, 13:15 - 15:00 | L-huset | OH |
| Discussions, ODE | 5/2, 13:15 - 15:00 | L-huset | |
| DAE 1 | 4/2, 13:15 - 15:00 | L-huset | OH |
| DAE 2 | 4/2, 15:15 - 17:00 | L-huset | OH |
| DAE 3 | 19/2, 13:15 - 15:00 | Systemet | OH |
| DAE 4 | 19/2, 15:15 - 17:00 | Systemet | OH |
| Discussions, DAE | 3/3, 13:15 - 16:00 | Visionen, stora konferensrummet |
Examination
- Hand in of mandatory exercises in exercises.
- Report of a mandatory mini-project in a topic related to the course. For example, choose a simulation model, possibly related to your research project, and demonstrate the correctness of the simulation.
- Oral examination: Explain and discuss theory and methods
Course plan – ODE –
ODE 1 - Introduction/simulation of ordinary differential equations
- Responsible: Lars Eriksson
- Contents
- Basic ODE:
- Problem formulations (some classic problems from Hairer-Norsett-Wanner), existance and uniqueness.
- Simple one-step methods, implicit and explicit.
- Course material
- Material covering existance and uniqueness from Hairer, Norsett and Wanner and from Dahlqvist och Björk.
ODE 2 - Introduction/simulation of ordinary differential equations
- Responsible: Lars Eriksson
- Contents
- Concepts: Convergence, consistency, 0-stability, absolute stability. Stiff decay.
- Explicit one step methods: Runge-Kutta family.
- Step length control, parameters for step length control.
- Course material
- First 4 chapters in Ascher-Petzold until page 95.
ODE 3 - Introduction/simulation of ordinary differential equations
- Responsible: Lars Eriksson
- Contents
- More on implicit and multi-step methods.
- Step length control, parameters for step length control.
- Zero detection.
- Start implementation of an explicit (or implicit) method with step length control.
- Continued work on implementation and exercises in the course.
- Course material
- Ascher och Petzold, remaining parts of Chapter 4 and Chapter 5.
- Deuflhard och Bornemann, “Scientific Comupting with Ordinary Differential Equations”. Chapter 5 on step length control.
- John Mathews, “Computer Derivations of Numerical Differentiation Formulae (Classroom Notes)”, Int. J. of Math. Education in Sci. and Tech., V 34, No 2 (March-April 2003), pp.280-287.
ODE 4 - Introduction/simulation of ordinary differential equations
- Responsible: Lars Eriksson
- Contents
- Discussion about results from hand in assignments.
- Stiff problems, A-stability, L-stability.
- Implicit methods for stiff problems, BDF methods.
- Implementation of implicit methods.
- Course material
- Chapters 6-8 in Ascher and Petzold, with emphasis on Chapters 6-7.
- More material on stiff differential-equations from Shampine och Gear “A User’s View of Solving Stiff Ordinary Differential Equations”.
- Kjell Gustafsson, “Traps and Pitfalls in Simulantion”.
Course plan – DAE –
DAE 1 - Simulation of differential-algebraic equations
- Responsible: Erik Frisk
- Contents
- Introduction to differential-algebraic equations (DAE:s)
- Examples of DAE models
- Existence and uniqueness of solutions to DAE:s
- What is a DAE, compared to an ODE?
- Index definitions for DAE:s
- Initial conditions for DAE:s
- Why are index-1 DAE:s easy and index>1 DAE:s difficult to simulate?
- Course material
- C.W. Gear and L. Petzold, “ODE methods for the solution of differential/algebraic systems”, SIAM Journal on Numerical Analysis, Vol. 21, No. 4. (Aug., 1984), pp. 716-728.
- Page 372-381 and 452-454 in Hairer part 2.
- L. Petzold, “Differential/Algebraic Equations are not ODE’s”, SIAM journal on scientific and statistical computing, vol. 3, no. 3, 367-384, 1982.
Chapters 9 and 10 in Ascher/Petzold is good additional material. The paper S.L. Campbell and C.W. Gear, “The index of general nonlinear DAEs“, Numerische Mathematik, Vol 72, No. 2, 173-196, 1995 gives a thorough description of different index for anyone interested.
- Exercises: 2.1-3, 2.5, 2.7, 2.10a, 2.11
DAE 2 - Simulation of differential-algebraic equations
- Responsible: Erik Frisk
- Contents
- Introduction to method for semi-explicit index-1 DAE:s
- state-space
- epsilon-embedding + implicit Runge-Kutta
- BDF (DASSL)
- Pantelides algorithm for determination of consistent initial conditions
- Some methods for index reduction
- Problems with drift and possible solutions
- Baumgarte stabilization
- Projection methods
- Some about order and convergence with solvers, stiffly accurate methods
- ODE/DAE:er with invariants
- The unstructured problem F(y’,y,x)=0 and overdetermined models
- Introduction to method for semi-explicit index-1 DAE:s
- Course material
- pages 455-480 in Hairer part 2
- Exercises: 2.26, 2.14-15, 2.18, 2.22, 2.33
DAE 3 - Modelica and simulation of object-oriented models
Responsible: Erik F
- Contents:
- Adjoint sensitivity analysis
- Introduction to equation based models
- How to go from a Modelica model to simulation code in C
- Structural index
- How can you, in the model, give clues to the solver for choice of states and initial conditions.
- How to automatically generate crossing/event-functions
- Course material
- If you want to known a lot on how DASSL/DASPK is implemented, then I recommend Chapter 5 in K.E. Brenan, S.L. Campbell and L.R. Petzold, “Numerical Solution of Initial-Value Problems in Differential.Algebraic Equations”, SIAM, 1996. Describes the solver in detail.
-
Cao, Yang, et al. “Adjoint sensitivity analysis for differential-algebraic equations: The adjoint DAE system and its numerical solution”. SIAM journal on scientific computing 24.3 (2003): 1076-1089.
Rather technical paper: I suggest to read and Section 1, 2.1, 4.1-4.2 in a first reading.
- Chapter 17, 18 i “Principles of Object-Oriented Modeling and Simulation with Modelica 2.1”, P. Fritzson. For those not familiar with Modelica, recommended reading in Chapter 2.
- G. Reissig, W.S. Martinson, P.I. Barton, “Differential–Algebraic Equations of Index 1 May Have an Arbitrarily High Structural Index”, SIAM Journal on Scientific Computing, Volume 21, Number 6, pp. 1987-1990, 2000.
- For the interested, a brief, somewhat incomplete, but still interesting description of how OpenModelica goes from model to C code. Adrian Pop, OpenModelica Compiler Phases, Open Source Modelica Consortium, 2008-05-26.
- H. Elmqvist and M. Otter, “Methods for tearing systems of equations in object-oriented modeling”, Proceedings of the European Simulation Multiconference, pp. 326-332, Barcelona, Spain, 1994.
- Examples for Sundials – IDAS that compiles on charger (have a look at idasRoberts_ASAi_dns.c for adjoint sensitivity example). If you are interested, I recommend looking into the documentation, e.g., for the IDAS solver https://computing.llnl.gov/sites/default/files/public/idas_guide.pdf.
- Exercises: 2.9, 2.10b-d, 2.31
DAE4 - Modelica and simulation of object-oriented models
- Responsible: Erik F
- Contents:
- Pantelides algorithm
- Finding consistent initial conditions
- Computing structural index
- Index reduction using dummy-derivatives
- Course material:
- Kapitel 17,18 i “Principles of Object-Oriented Modeling and Simulation with Modelica 2.1”, P. Fritzson. For those not familiar with Modelica, recommended reading in Chapter 2.
-
C.C. pantelides “The consistent initialization of differential-algebraic systems”, SIAM Journal on scientific and statistical computing, Vol. 9, No. 2, pp. 213-231, March 1988.
The description of the graph theoretical algorith to find all MSS:s can be skipped
- Mattias Krysanders Matlab-implementation of Pantelides algoritm [zip, tar.gz]
- S. Mattson and G. Söderlind, “Index reduction in differential-algebraic equations using dummy derivatives”, SIAM Journal on Scientific Computing, vol. 14, No. 3, pp. 677-692. 1993.
- Exercises: 2.13, 2.29, 2.35, 2.30