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

Finding out the corrector steps

Finding out the corrector steps

Hello all,

I have a separate tire model DLL working with Modelica solver. The DLL has been used with different solver and I am trying to replicate the results with Modelica. However, the DLL requires knowledge of the mode of the time steps taken by the solver.
Is there any way to find out which steps in Modelica simulations are predictor, corrector and converged (using DASSL solver)?

Thanks,
Pranay

Re: Finding out the corrector steps

No, there is no way to know this because the solver may not even solve the model time step by time step (Modelica makes very few assumptions on the solver that is used).

The only way to know what mode you are in is to use a sampled system and call your external function at these points (because then you know you are at a time or state event).

Re: Finding out the corrector steps

Can you elaborate a bit more on what you mean by sampled systems? I am already using time as an input to the function in the DLL and its working. I can also control the time steps if needed.

Thanks,
PK

Re: Finding out the corrector steps

See for example:

https://mbe.modelica.university/behavio … e-and-hold

https://mbe.modelica.university/behavio … /sampling/

Basically, inside a when-statement is the only time you really know in what state the solver is (because it needs to reset after discrete events)

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