Repository navigation
Express speeds given in rpm using from_rpm - #4818
Conversation
Speeds given in revolutions per minute were converted with expressions like 1440.45*2*pi/60, where the unit only works out because of the unit that pi gets from the unit of the output of Modelica.Math.asin, and where nothing expresses that 1440.45 is a number of revolutions per minute. Using Modelica.Units.Conversions.from_rpm, which is already used for the same purpose elsewhere in the library, makes the conversion explicit and unit consistent regardless of the unit of pi. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The nominal load speed of a few more examples was given as 1440.45*2*pi/60, and is now written Modelica.Units.Conversions.from_rpm(1440.45) like in the other examples: - Modelica.Electrical.Machines.Examples.InductionMachines.IMC_InverterDrive - Modelica.Electrical.Machines.Examples.InductionMachines.IMC_YD - Modelica.Electrical.PowerConverters.Examples.ACAC.SoftStarter - Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.InductionMachines.ComparisonPolyphase.IMC_DOL_CommonLeakage Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
HansOlsson
left a comment
There was a problem hiding this comment.
LGTM.
Regarding "rpm" in general. Dymola uses "r" for rotation so "r/min" (as well as "rpm") works.
I know that "r" is now a small SI-prefix ("ronto") - but similarly as "T" being both "Tesla" and "Tera" that shouldn't cause problems.
The MSL already has: so |
AHaumer
left a comment
There was a problem hiding this comment.
fine with me
(although as far as I see the discussion about the unit of pi is nit finished)
|
Using displayUnit like |
If I plot that variable, why shouldn't I set |
This is the RPM (revolutions per minute) variant of #4817. Since the unit
"rev"is not supported by the Modelica specification, the issues addressed by this PR cannot be fixed using unitful literals with unit"rev/min", so instead theModelica.Units.Conversions.from_rpmfunction is used.Unlike #4817, this PR does not require the Modelica 3.7 specification, but I think this is a good time to discuss whether the
"rev"= 2π"rad"unit should be added to the additional non-SI units supported by the language specification.