In Modelica I'm trying to define a dedicated data type OrifSizingCoeff
for the sizing coefficient on an hydraulic orifice.
The corresponding physical quantity is a volumetric flow rate divided by the square root of a pressure, therefore:
a) In SI units: m3/s
divided by sqrt(Pa)
;
b) In "practical" units: l/min
divided by sqrt(bar)
.
I defined the data type as follows:
type OrifSizingCoeff = Real(
final quantity="Orifice sizing coefficient",
final unit="m3/(s.Pa(1/2))",
displayUnit="l/(min.bar(1/2))");
I don't get any parsing error but the unit conversion doesn't work (parameter value doesn't change going from one unit to the other); the same happens if I replace (1/2)
with:
0.5
05
Instead, if I replace (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 replace (1/2)
with 1/2
, a conversion is executed but it's "wrong". (According to Modelica's syntax, Pa1/2
is interpreted as (Pa1)/2 = Pa/2
; same for bar1/2
. Therefore the two units correspond to m3/(s.Pa/2)
and l/(min.bar/2)
, respectively).
Is there a way to correctly define the units I need?