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

different simulation results between dymola and openmodelica

different simulation results between dymola and openmodelica

I'm wondering why if I run that code in OpenModelica 1.5.0 and then in  Dymola 7.4 (with visual studio 2008)
I have different results

model tentative
Real a(start=0);
Real T=0.1;
Real a_steady(start=0);

algorithm
    a_steady:=a_steady+1;
equation
  der(a)=(a_steady-a)/T;
end tentative;

with the same simulation parameter

with openmodelica a_steady fast grows for each time step of the simulation, instead with dymola a_steady remains constantly to 1, and  a has a few growing.
instead in dymola the system behaves like a_steady=1 for all the simulation.

can anyone help me to understand, please?
what is it supposed to be the normal behavior? the one of dymola or the one of openmodelica?
It can be the compiler, isn't it?
c'est werid for me.

thanks for your time

have good day

here are the pictures
http://www.mypicx.com/09032010/modelica/
I've some problems to attach them I don't know the reason

Re: different simulation results between dymola and openmodelica

There are many possible causes, bugs in the back-end, numerical problems, etc.
If you use simulate(Model, method="dassl2") the results are similar to Dymola.

Your model is rather strange, you increase a_steady via an algorithm.
It might be better to use a when equation instead to be able to specify when a_steady should be increased.

Cheers,
Adrian Pop/

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