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

Float error? Simulation fails because -1.0!=-1

Float error? Simulation fails because -1.0!=-1

Hi, i have a problem with a simple spring model (see bottom) that is nonlinear, based on some simple geometric relations. I put it in a simple test rig:
Inertia component has fixed initial values w=6 &  phi=some value
When i set phi to anything other than 0 (e.g. 1e-6) , the simulation executes without problem
When phi= 0 i get the following error:
I can only assume it is some floatingpoint error as it says "outside the domain -1.0 <= -1 <= 1.0" but -1 should in theory be = -1.0   .

How do i find the cause of this?  I enabled the debug operations option and  looked at the debug more option, but i'm at a loss what the issue could be. I only found relations of the variables in the debugger, not the specific values the variables have at the point of failure. How would i find the cause of this issue? Or is it a case where the model is not properly written? Do i have to use algorithm here?

Edited by: MSMI - Nov-09-20 16:25:38
There are 0 guests and 0 other users also viewing this topic
You are here: