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
  • Index
  • » Users
  • » TimSchim2
  • » Profile

Posts

Posts

Jul-20-21 09:05:04
Modelica model simulating successfully in OMEdit but not as FMU

I am trying to export and simulate a model with the CVode solver.
If I simulate the model in OMEdit (Windows) using CVode the simulation finishes successfully, even if I use something like a rectangular pulse as input. However, if I export the model as FMU (via omc on Linux) with CVode simulation flag I get the following Error after some time:

[CVODE ERROR] CVode tout too close to t0 to start integration.
fmi2DoStep: ##CVODE## -27 error occurred at time = 1.001.Traceback (most recent call last):
...
Exception: fmi2DoStep failed with status 4.

To export the FMU I am using sundials-5.7.0 and for OMEdit OpenModelica1.17.0.

To my knowledge OMEdit uses the exact same solver, so I do not really understand why the simulation works in one case but not in the other.

Might this be related to running on Windows vs Linux, or does OMEdit maybe change some default simulation settings?

Any hints on possible causes and solutions are very welcome!

Notice: The CVode settings when simulating the FMU look like this:
LOG_SOLVER        | info    | CVODE linear multistep method CV_BDF
LOG_SOLVER        | info    | CVODE maximum integration order CV_ITER_NEWTON
LOG_SOLVER        | info    | CVODE use equidistant time grid YES
LOG_SOLVER        | info    | CVODE Using relative error tolerance 1.000000e-06
LOG_SOLVER        | info    | CVODE Using dense internal linear solver SUNLinSol_Dense.
LOG_SOLVER        | info    | CVODE Use internal dense numeric jacobian method.
LOG_SOLVER        | info    | CVODE uses internal root finding method NO
LOG_SOLVER        | info    | CVODE maximum absolut step size 0
LOG_SOLVER        | info    | CVODE initial step size is set automatically
LOG_SOLVER        | info    | CVODE maximum integration order 5
LOG_SOLVER        | info    | CVODE maximum number of nonlinear convergence failures permitted during one step 10
LOG_SOLVER        | info    | CVODE BDF stability limit detection algorithm OFF

  • Index
  • » Users
  • » TimSchim2
  • » Profile
You are here: