Search code examples
modelicadymolasystemmodeler

The process of solving DAE in Dymola


I am trying to understand the process of solving DAEs in Dymola. According to Chapter 13.8 of Dymola's help document, Dymola would first use an index reduction algorithm to transform the original DAE into ODE, then get a BLT form after partitioning and tearing, so Dymola could solve ODE with BDF method like DASSL.

Here is the screenshot of Dymola's help document. enter image description here

I also found some material about how to solve DAE from Wolfram mathematica, as shown in the following screenshot, there could be different strategies in different phases, I marked the method I think adopted in Dymola. My question is:

  1. Does Dymola just adopt the method as I marked?
  2. Or Dymola also adopt the method as Wolfram Mathematica, which is using different methods in different phases? If so, how does Dymola determine using which method? enter image description here

Solution

  • Dymola does something resembling that red line, and ignoring many of the choices in that flow-chart as they are not relevant and there many equally important choices hidden. E.g.,

    • The index reduction algorithm will work even if the index is 1 or 0 - it will just not do anything.
    • The dummy derivatives method can be seen as a projection method. (I did my master's thesis on implementing it a long time ago.)
    • IDAS is one of the solvers in the sundials suite. Dymola can use sundials solvers for integration, as well as a number of other solvers; and both have the model as ODE or as index 1 DAE for suitable solvers - but that's handled in the generated C-code, and doesn't influence other parts.