In Modelica, I am trying to define a dedicated data type (OrifSizingCoeff) for a calibration factor on a hydraulic hole. The corresponding physical quantity is the volume flow divided by the square root of the pressure, therefore: a) in SI units: m3 / s divided by sqrt (Pa); b) In "practical" units: 1 / min divided by sqrt (bar). I defined the data type as follows: type OrifSizingCoeff = Real (final quantity = "Hole calibration coefficient", final unit = "m3 / (s.Pa (1/2))", displayUnit = "l / (min.bar (1 / 2)) ");
I do not get any parsing errors, but the conversion of units does not work (the value of the parameter does not change, moving from one device to another); the same thing happens if (1/2) is replaced by:
Instead, if I replaced (1/2) with:
- (0.5)
- 0.5
- (0.5)
- ^ (1/2)
- ^ (0.5)
I get a parsing error. (I tried any crazy thing I could think of).
And, if I replaced (1/2) with 1/2, the conversion is performed, but it is "wrong." (According to Modelica sintax, Pa1 / 2 is interpreted as (Pa1) / 2 = Pa / 2, the same for bar1 / 2. Therefore, two units correspond to m3 / (s.Pa/2) and l / (min.bar/2) , respectively).
Is there a way to correctly determine the units that I need?
source
share