Consistent terminology: Modeling, DAE, ODE
Asked Answered
W

3

7

I am new to the subject "modeling of physical systems". I read some basic literature and did some tutorials in Modelica and Simulink/Simscape. I wanted to ask you, if I understand the following content correctly:

  • Symbolic manipulation is the process of transforming a differential-algebraic system of equation (physical model: DAE) into a system of differential equations (ODE) that can be solved by standard solvers (Runge, Kutta, BDF, ...)
  • There are also solver that can solve DAE's directly. But Modelica (openModelica, Dymola) and Simscape transfer the System into an ODE (why are this methods better compared to direct DAE solvers?)
  • A "flat Modelica code" is the result ( = ODE) of the transformation.

Thank you very much for your answers.

Wonderment answered 20/5, 2016 at 19:14 Comment(0)
M
9

Symbolic processing for Modelica includes:

  • remove object oriented structure and obtain an hybrid DAE (flat Modelica)
  • perform matching, index reduction, casualization to get an ODE
  • perform optimization (tearing, common subexpression elimination, etc)
  • generate code for a particular solver

OpenModelica can also solve the system in DAE mode without transforming it to ODE and I guess other Modelica tools can also do that.

A "flat Modelica code" is Modelica code where the object orientation is removed, connect equations are expanded to normal equations. The result is a hybrid DAE.

See Modelica Spec 3.3 for more info about all this (for example Appendix C): https://modelica.org/documents/ModelicaSpec33Revision1.pdf

Magnetograph answered 20/5, 2016 at 19:40 Comment(0)
N
3

So I think your understanding of the terminology is very good too. Due to the declarative way (opposed to imperative) of programming in modelica, we get immediately very high numbers of algebraic equations. Solving these (partly) symbolically has, above all, these essential advantages:

  • Speed. Without eliminating algebraic loops, modelica would not be practically usable for any real-world problem and even then only in simple cases no algebraic equations remain. It would be too slow and would force you to do transformations manually yourself in modelica too (as in imperative languages e.g. in C/C++ or Simulink). Even today modelica can still be slower than manually transformed and optimized solutions. Moreover modelica applications often need simulations in real-time.

  • Correctness. Symbolic transformations are based on proofs and modelica applications often are in the area of safety critical or cyber-physical systems.

Nordgren answered 22/5, 2016 at 9:13 Comment(0)
B
1

One additional consideration is that there are different forms of DAEs, and modeling often lead to high-index DAEs that are complicated to solve numerically (*). (Note "high" means index greater than 1, typically 2 - but sometimes even higher.)

Symbolic transformations can reduce high-index DAEs to semi-explicit index 1 DAEs, and then by (numerically) solving the systems of equations they are transformed into ODEs.

Thus even if a tool solves DAEs directly it is normally the semi-explicit index 1 DAEs that are solved, not the original high index DAE.

(I know this answer is late. The hybrid part for the symbolic transformations is more complicated, still working on that.)

For more information see https://en.wikipedia.org/wiki/Differential-algebraic_system_of_equations

(*): There are some solvers for high index DAEs (in particular index 2), but typically they rely on a specific structure of the model and finding that structure requires similar techniques as reducing the index to 1.

Barbell answered 29/1, 2021 at 10:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.