Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

algebaric loop over external function

algebaric loop over external function

Suppose I have accelaration dependent forces like in fluid dynamic simulations.
If I use a model-part which describes the body's motion, and another which handles the fuid forces acting on the body, this results in an algebraic loop, which, in classical simulations needs to be iteratively converged (estimate acceleration, calc. forces, adapt acceleration estimation etc.).

My understandin is, that in modelica, the compiler solves this for me.


What if I would have the part of the model handling the fluid forces in an external (c) function?
Would omc produce code that e.g. uses multiple calls to the external function?

Now suppose the external function would be an interface to a more complex fluid-dynamics simulation.
Do I have any chance to provide additional information to the 'external module'?
In typ. implementations, the fluid-dynamics simulation needs to know if the call belongs to another step in the iteration process for the algebraic loop, or to the next timestep.
Would such an interface be possible?

Thx
Alex

There are 0 guests and 0 other users also viewing this topic
You are here: