Opened 8 years ago

Last modified 8 years ago

#4122 assigned defect

Simulation fails in OpenModelica, Works in JModelica

Reported by: dma@… Owned by: Willi Braun
Priority: high Milestone: Future
Component: Backend Version: v1.11.0
Keywords: Cc: Lennart Ochel, Willi Braun

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)

by anonymous, 8 years ago

Attachment: DoubleMassVecLen.mo added

by anonymous, 8 years ago

Attachment: ExecutionErrors.txt added

by anonymous, 8 years ago

Attachment: JModelicaResult.png added

comment:1 by Martin Sjölund, 8 years ago

Cc: Lennart Ochel Willi Braun added
Component: *unknown*Backend
Owner: changed from somebody to Lennart Ochel

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 by Willi Braun, 8 years ago

Owner: changed from Lennart Ochel to Willi Braun
Status: newassigned

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.