openmodelicainterest  

Acausal systems modelling and compilation

Arquimedes Canedo
Tue, 15 Dec 2009 20:50:12 -0800

Hello,

I am new to Modelica and the acausal paradigm of system design. I am
familiar with the causal block-diagram notation but it seems that
Modelica is just a different world. I am also learning about the
underlying mathematics of Modelica.

I have several questions about the compilation of acausal systems into
simulation code and I hope this is the right place to ask them.

I have read the Open Modelica Compiler Phases document and it gives a
very good high-level perspective on how the omc works. I have also
read some of the related papers on the omc compiler and this is where
things start getting fuzzy.

While I can see the benefit of ordering the dependency matrix in BLT
form for reducing the reaching definitions of variables for
parallelization, I don't fully understand why this step is necessary
for generating uniprocessor code. Is it to reduce the complexity of
the matrix manipulation algorithms ? How does the BLT form affect the
quality of the generated code, in the case of uniprocessor ?.

Concerning the numerical solver selection, I have seen the ongoing
discussion about DAEs with index > 1. It seems that DAEs are passed to
the index reduction and if the resulting system has an index == 1 then
we can easily solve with fixed-step ODE solvers, Runge-Kutta methods
for example. However, if the index > 1, are we forced to use DASSL ?.
What criteria does openmodelica apply for the selection of DASSL or
Euler ?

I know this is highly dependent on the problem itself, but how often
do you get systems with index >= 2 ? How do you handle them ?, is it
possible to apply index reduction again and again until we reach our
target ?

Finally, I would like to ask about the meaning of 'acausality' inside
a Modelica compiler, openmodelica in this case. After deciding the
ordering of equations based on their data dependencies and scheduling
them, aren't we transforming the 'acausal' system into a 'causal' one
?


Thank you,

Arquimedes