Opened 8 years ago

Last modified 3 years ago

#4194 accepted defect

Severe bug in unit conversion

Reported by: ahaumer@… Owned by: adrpo
Priority: normal Milestone:
Component: OMEdit Version: v1.11.0
Keywords: unit conversion Cc:

Description

Please consider the following simple example:

model Test
  Modelica.SIunits.AngularAcceleration a=10*exp(-10*time);
  Modelica.SIunits.AngularVelocity w(displayUnit="1/min", start=0, fixed=true);
  Modelica.SIunits.Angle phi(displayUnit="deg", start=0, fixed=true);
equation
  der(w)=a;
  der(phi)=w;
end Test;

The results are horribly wrong!
If I remove the "displayUnit", the absolete value of the results is correct, but the sign of phi is the opposite of the obvious solution! I'd prefer OpenModelica for my lectures, but how should I use that for teaching? I'm really upset.

Change History (12)

comment:1 Changed 8 years ago by adrpo

Hi Anton, what version of OpenModelica are you using?
This should be fixed in the latest nightly builds or 1.11 beta2:
https://openmodelica.org/download/download-windows
I fixed i recently, it was bug: #4125.

comment:2 Changed 8 years ago by adrpo

Seems we have issues with unit "1/min" as revolutions per minute we support "rpm" instead, see #4195.

comment:3 Changed 8 years ago by adrpo

  • Owner changed from adeas31 to adrpo
  • Status changed from new to accepted

comment:4 Changed 8 years ago by ahaumer@…

I'm a few days only sporadically online.
I'm using 1.11 beta1, I'll try beta2.
With beta1 the result of angular velocity w in "rpm" is wrong, too.
And even worse: The result of angle phi is COMPLETELY wrong even if i remove both "displayUnit" (opposite sign, wrong value)!

comment:5 Changed 8 years ago by ahaumer@…

  • Priority changed from blocker to normal

Adrian you're right:
Beta 2 works fine if I'm using "rpm" instead of "1/min", this is fine for me at the moment. So this is no "blocker", I lowered the priority to "normal".

comment:6 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.11.0 to 1.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:7 Changed 7 years ago by adeas31

  • Milestone changed from 1.12.0 to 1.13.0

comment:8 Changed 6 years ago by casella

  • Milestone changed from 1.13.0 to 1.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:9 Changed 5 years ago by casella

  • Milestone changed from 1.14.0 to 1.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:10 Changed 4 years ago by casella

  • Milestone changed from 1.16.0 to 1.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:11 Changed 4 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:12 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.