|
|
|
|
|
by choeger
2185 days ago
|
|
One thing about Modelica is quite important and might confuse newcomers: the language specification mostly only covers the model, not the equations. That is, when you evaluate your model under, e.g., Dymola and Openmodelica you will (most of the time) end up with equal (or rather similar) systems of equations. The meaning of these equations, i.e., the actual simulation can easily differ, though (except for the most trivial models). The reason for this is that the equations are extremely powerful (you can express pretty much anything computable inside an equation) and their numerical solution is often driven by heuristics (e.g., finding initial values). This makes it extremely difficult to come up with a common standard for the solution of Midelica's hybrid DAEs. Hence you will find little written information about what exactly happens during a simulation that applies to more than one implementation. |
|
One particular issue with the circuit model example in the article, for example, is that when you add switching elements you often end up with disconnected sub-diagrams and then the solver chokes trying to determine what the potential of the floating circuit is, even though it has no effect on anything you care about. So then you have to start adding stray capacitances and stray resistances to make the solver happy, etc.