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

Fixed integration step and event handling under OpenModelica

Fixed integration step and event handling under OpenModelica

i have a problem to understand how openmodelica handles events when using a fixed integration step.

When processing a continous DAE, is there a mechanism monitoring constantly all the conditions? An event may occur between two fixed steps of integration.. This event is handled, and its time event is calculated. So, in this case, did openmodelica adapt its fixed step to the time event? In this case, the "fixed" step changes... and we can not say that we have a fixed integration step...  It is a bit confusing to understand.


Thank you in advance.

Best Regards,
Jawhar

Re: Fixed integration step and event handling under OpenModelica

Hi,

By default OpenModelica uses the dassl solver which has a variable step size.
The stepSize for the solver is calculated as (stopTime-startTime)/numberOfIntervals.
However, the stepSize only gives the time where the solver should output values and is not the actual step size of the solver.
By default (if you don't give anything to the simulate command):
stopTime = 1.0
startTime = 0.0
numberOfIntervals = 500

You can also select as method="euler" when you call the simulate command.
In that case I think the step size is fixed.

You can send an email to Willi Braun [willi <dot> braun <at> fh-bielefeld <dot> de]
and ask how he  implemented events in the Euler solver (and maybe post back
here with the answer).
Another way would be to look into the code how is done:
https://openmodelica.org/svn/OpenModeli … _euler.cpp
user: anonymous
pass: none  <- write none here

Cheers,
Adrian Pop/

Re: Fixed integration step and event handling under OpenModelica

Thank you Adrian for answering.

I taked a look on to the Euler solver implemented in OpenModelica and it calls zero crossing functions. It outputs reults at fixed steps but iterations are done in the fixed step too.

Best Regards,
Jawhar

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