Opened 8 years ago

Last modified 8 years ago

#4122 assigned defect

Simulation fails in OpenModelica, Works in JModelica

Reported by: dma@… Owned by: wbraun
Priority: high Milestone: Future
Component: Backend Version: v1.11.0
Keywords: Cc: lochel, wbraun

Description

The attached file produces incorrect (null) results when simulated with OpenModelica but produces a correct result in JModelica. I'm using the OpenModelica-v1.11.0-dev-201-gf2641d7-64bit.exe nightly build (it failed on earlier releases as well).

I have attached the Modelica source file, the errors generated during simulation, and a graph of the result produced by JModelica.

Attachments (3)

DoubleMassVecLen.mo (1.0 KB) - added by anonymous 8 years ago.
ExecutionErrors.txt (429.1 KB) - added by anonymous 8 years ago.
JModelicaResult.png (79.4 KB) - added by anonymous 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by anonymous

Changed 8 years ago by anonymous

Changed 8 years ago by anonymous

comment:1 Changed 8 years ago by sjoelund.se

  • Cc lochel wbraun added
  • Component changed from *unknown* to Backend
  • Owner changed from somebody to lochel

The results using -ls=umfpack says everything is OK, but der(v2[2]) is =-1.67 and v2[2] is always =0.

Using uode for index reduction yields:

Warning: Assuming fixed start value for the following 2 variables:
  v2[3]:VARIABLE(start = 0.0 fixed = false)
  x2[3]:VARIABLE(start = 0.0 fixed = false)

Using DSS:

v2[3] := DIVISION((x1[1] - x2[1]) * (v1[1] - v2[1]) - (x2[2] - x1[2]) * (v1[2] - v2[2]) - v1[3] * (x2[3] - x1[3]), x1[3] - x2[3])
x2[3] := x1[3] - $_signNoNull($TMP$VAR$12$0X$ABS) * abs((len ^ 2.0 - ((x1[1] - x2[1]) ^ 2.0 + (x1[2] - x2[2]) ^ 2.0)) ^ 0.5)

Using dummy derivatives:

v2[3] := DIVISION((x1[1] - x2[1]) * (v1[1] - v2[1]) - (x2[2] - x1[2]) * (v1[2] - v2[2]) - v1[3] * (x2[3] - x1[3]), x1[3] - x2[3])
x2[3] := x1[3] - $_signNoNull($TMP$VAR$12$0X$ABS) * abs((len ^ 2.0 - ((x1[1] - x2[1]) ^ 2.0 + (x1[2] - x2[2]) ^ 2.0)) ^ 0.5)

comment:2 Changed 8 years ago by wbraun

  • Owner changed from lochel to wbraun
  • Status changed from new to assigned

Improved the situation with the dynamic state selection in 6a8d607/OMCompiler. Now the model fails for some reasons by numerical exploding.

Note: See TracTickets for help on using tickets.