Opened 8 years ago

Last modified 8 years ago

#4195 new defect

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

Reported by: adrpo Owned by: somebody
Priority: high Milestone: Future
Component: Frontend Version:
Keywords: Cc: rfranke, casella

Description (last modified by adrpo)

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 Changed 8 years ago by adrpo

  • Description modified (diff)

comment:2 Changed 8 years ago by adrpo

  • Cc rfranke casella added

comment:3 Changed 8 years ago by adrpo

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.