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

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.

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

Edited by: wbraun - Sep-21-14 13:50:54

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

There are 0 guests and 0 other users also viewing this topic