Opened 8 years ago
Last modified 3 years ago
#4194 accepted defect
Severe bug in unit conversion
Reported by: | 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 , 8 years ago
comment:2 by , 8 years ago
Seems we have issues with unit "1/min"
as revolutions per minute
we support "rpm"
instead, see #4195.
comment:3 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:4 by , 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 , 8 years ago
Priority: | blocker → 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 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:7 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
comment:9 by , 5 years ago
Milestone: | 1.14.0 → 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:11 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
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.