Opened 8 years ago

Last modified 8 years ago

#4195 new defect

How to disambiguate "1/min" from "rpm" vs "1/60s"?

Reported by: Adrian Pop Owned by: somebody
Priority: high Milestone: Future
Component: Frontend Version:
Keywords: Cc: Rüdiger Franke, Francesco Casella

Description (last modified by Adrian Pop)

Currently we have:

convertUnits("1/min", "rad/s") -> (true,60.0,0.0) // wrong, just coverts min to seconds
convertUnits("rpm", "rad/s") -> (true,9.549296585513719,0.0) // correct

The question is how do we know when is revolutions / minute vs 1 / minute as they have exactly the same representation "1/min"?

Change History (3)

comment:1 by Adrian Pop, 8 years ago

Description: modified (diff)

comment:2 by Adrian Pop, 8 years ago

Cc: Rüdiger Franke Francesco Casella added

comment:3 by Adrian Pop, 8 years ago

The Modelica specs says: "The unit of measure of a dimension free quantity is denoted by 1."
The unit grammar given is:

unit_expression:
  unit_numerator [ "/" unit_denominator ]

unit_numerator:
  "1" | unit_factors | "(" unit_expression ")"

So OpenModelica correctly interprets 1/min as 1 divided by minute conform to Modelica Specification.

Note: See TracTickets for help on using tickets.