- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Simulation does not finish
Simulation does not finish
Simulation does not finish
Hey
I am working on a simulation of a hydride reactor with basically two boundary values: the temperature of the cooling fluid and the pressure inside the reactor.
Simulation of the adsorption and desorption cycle works perfectly if I leave one of these boundary values constant (i.e der(p) = 0; T=f(t) or the other way around ). One simulation run takes about 5min.
But as soon as I vary both of them the simulation does not finish, even if I wait for more than an hour. The program seems to be stuck in a loop.
Since the simulation does not crash I am not getting any debug information in OMC.
Do you have an idea what might cause this problem?
How do I get debug information when the simulation does not finish?
Thank you
Felix
Re: Simulation does not finish
You can try to simulate for a shorter time and enable performance profiling to see which blocks are slow to solve. You could also try a different solver to see if it is dassl that found a stiff system and decreases the step size.
- sjoelund.se
- 1700 Posts
Re: Simulation does not finish
FelixB wrote:
Do you have an idea what might cause this problem?
How do I get debug information when the simulation does not finish?
Too many events, stiff system, hard non-linear systems,
long initialization run, etc. there are a lot of things that might
cause performance issues.
You can run the simulation application with some debug flags:
-lv LOG_SOLVER -> [additional information about solver process]
-lv LOG_EVENTS -> [additional information during event iteration]
-lv LOG_INIT -> [additional information during initialization]
-lv LOG_SOTI -> [final solution of the initialization]
so long.
Willi
- wbraun
- 75 Posts
Re: Simulation does not finish
Thank you two for the tips.
I spent the last couple of days trying to pinpoint the problem and I'm pretty sure that I'm facing the same problem in the fluid library as reported here:
https://www.openmodelica.org/forum/defa … ples#p4720
Unfortunately there seems to be no solution yet.
Anyways - I upgraded to the latest nightly and now I'm getting another weird error. I filed a ticket, because I'm pretty sure that the problem does not lie within my code: https://trac.openmodelica.org/OpenModel … action=new
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Simulation does not finish