Skip to content

Commit 7f46072

Browse files
Merge pull request modelica#4103 from qlambert-pro/pressure-rate
Fix unit error in SimpleLiquidWater model
2 parents 2518ca1 + f4c73e0 commit 7f46072

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Modelica/Media/package.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2149,6 +2149,7 @@ package Examples
21492149
model SimpleLiquidWater "Example for Water.SimpleLiquidWater medium model"
21502150
extends Modelica.Icons.Example;
21512151

2152+
constant SI.PressureRate pressureRate = 1e5/10;
21522153
parameter SI.Volume V=1 "Volume";
21532154
parameter SI.EnthalpyFlowRate H_flow_ext=1.e6
21542155
"Constant enthalpy flow rate into the volume";
@@ -2182,7 +2183,7 @@ package Examples
21822183
der(U) = H_flow_ext;
21832184

21842185
// Smooth state
2185-
medium2.p = 1e5*time/10;
2186+
medium2.p = pressureRate*time;
21862187
medium2.T = 330;
21872188
m_flow_ext2 = time - 30;
21882189
state = Medium.setSmoothState(

Modelica/Units.mo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ end UsersGuide;
342342
displayUnit="bar");
343343
type AbsolutePressure = Pressure (min=0.0, nominal = 1e5);
344344
type PressureDifference = Pressure;
345+
type PressureRate = Real (
346+
final quantity="PressureRate",
347+
final unit="Pa/s",
348+
displayUnit="bar/s");
345349
type BulkModulus = AbsolutePressure;
346350
type Stress = Real (final unit="Pa");
347351
type NormalStress = Stress;

0 commit comments

Comments
 (0)