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

OpenModelica 1.6.0 problem for very small time step

OpenModelica 1.6.0 problem for very small time step

Hi,
I have been using OpenModelica 1.5.0 for my project and works fine, but when I updated to OpenModelica 1.6.0, it stops working. I think it is a problem in small time step that I use. Now in OpenModelica 1.6.0, it does not give any output for the time step that I use. To test, can use this simple model

Code:


model test
  Real a=2;
  Real b;
equation
  a=b;
end test

and run with:

Code:


simulate(test,startTime=0,stopTime=5e-14,method="dassl2",numberOfIntervals=500

The output has only 1 data point instead of 500. But when I changed the stopTime=1, it gives the correct data points.

Is this a bug?

Re: OpenModelica 1.6.0 problem for very small time step

Code:

$ ./test -v

jac flag set : 0
read start = 0 from init file.
read stop = 5e-14 from init file.
read stepSize = 1e-16 from init file.
read tolerance = 1e-06 from init file.
read method = dassl2 from init file.
read outputFormat = plt from init file.
read $dummy = 0 from init file.
read der($dummy) = 0 from init file.
read a = 2 from init file.
read b = 2 from init file.
Read parameter data from file test_init.txt
Notice: Calculated time of sample events is not yet used!
Number of sorted, unique sample events: 0
initDelay called with startTime = 0.000000
Allocated simulation result data storage for method 'plt' and file='test_res.plt'
Recognized solver: dassl2.
Calculated bound parameters
Initialization by method: simplex
fixed attribute for states:
$dummy(fixed=true)
number of non-fixed variables: 0
No initial values to calculate
Save ZeroCrossings
**Calling DDASRT the first time...
**Calling DDASRT from 0 to 2.22045e-13...
**Deleting work arrays after last DDASRT call...
Save ZeroCrossings
Performed initial value calculation.
Start numerical solver from 2.22045e-13 to 5e-14
    *** Statistics ***
Events: 0
State Events: 0
Sample Events: 0

The problem is in the initialization we do, apparently:
Start numerical solver from 2.22045e-13 to 5e-14. The "small" step we take to initialize derivatives is not so small for you. In fact, it's as big as 2000 of your time steps, and it's supposed to be in the order of 1e-9 of a time step. Might be a bug; I'll try to fix it.

Re: OpenModelica 1.6.0 problem for very small time step

Thanks a lot, let me know when the fix is released current/smile

Re: OpenModelica 1.6.0 problem for very small time step

This is fixed in r7508. From your user agent, you seem to be using Windows so you need to wait until Adrian makes a new OpenModelica build.

Re: OpenModelica 1.6.0 problem for very small time step

A build of revision 5424 is uploading now:
http://build.openmodelica.org/omc/build … ses/1.6.0/

Cheers,
Adrian Pop/

Re: OpenModelica 1.6.0 problem for very small time step

Thanks now it works fine current/smile

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