Opened 8 years ago

Last modified 3 years ago

#4194 accepted defect

Severe bug in unit conversion

Reported by: ahaumer@… Owned by: Adrian Pop
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 by Adrian Pop, 8 years ago

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 by Adrian Pop, 8 years ago

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

comment:3 by Adrian Pop, 8 years ago

Owner: changed from Adeel Asghar to Adrian Pop
Status: newaccepted

comment:4 by ahaumer@…, 8 years ago

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 by ahaumer@…, 8 years ago

Priority: blockernormal

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 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:7 by Adeel Asghar, 7 years ago

Milestone: 1.12.01.13.0

comment:8 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:9 by Francesco Casella, 5 years ago

Milestone: 1.14.01.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 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:11 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:12 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.