I am confused about the solving DAEs process in Dymola. So I made an example to explore it.
Here is the screenshot of the example scheme and control equations
Based on the following definition of variables, I think the solving DAEs process is to
I build the model in Dymola with the following debug settings.
Since the DAE's index in my model is 3, there is a need to do index reduction, after using the Pantelides Algorithm, Dymola would adding more differentiated equations to the DAE system.
The translate log verified my deduction.
Now, according to the equation browser, it is apparent the DAE system has been modified into a BLT form, I think I could just use the newton method with the current equation system, but Dymola would use the DASSL algorithm. And apparently, DASSL would do build the Structural Jacobian Matrix from scratch again, so during the initialization(using Pantelides Algorithm) and simulation(using DASSL Algorithm) processes, different Structural Jacobian Matrix would be used.
My question is:
After using Pantelides Algorithm to do index reduction and partitioning, I could solve the equations with Newton Method, but why does Dymola have to do partitioning again and use DASSL Algorithm?
In addition, I compared the Structural Jacobian Matrix in initialization and simulation process in Wolfram System Modeler, which showed these two matrices are different.
After using Pantelides Algorithm to do index reduction and partitioning, I could solve the equations with Newton Method, but why does Dymola have to do partitioning again and use DASSL Algorithm?
The simple answer is: it doesn't have to do either additional partitioning or use DASSL. You can just click a few buttons and change the algorithm to cvode, Runge-Kutta, Euler, etc. I'm a bit unsure, but I don't think Dymola does any additional partitioning for DASSL in ODE mode (I know for sure that OpenModelica's DASSL algorithm does not - although it's a little silly using a DAE solver to solve an ODE system). If you run the simulation in DAE mode, you can perhaps even skip index reduction (depending on the index of the system).
What the integration method (e.g. dassl) does is actually solve the system time step by time step. What Pantelides algorithm does is index reduction (in Modelica tools usually to ODE form, which is what most of the integration methods require).