Skip to content

Commit 1e7ad17

Browse files
committed
Fix unit error in SimpleLiquidWater model
1 parent 7051091 commit 1e7ad17

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Modelica/Media/package.mo

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

2152+
constant SI.PressureRate pressureRate = 1e4;
2153+
21522154
parameter SI.Volume V=1 "Volume";
21532155
parameter SI.EnthalpyFlowRate H_flow_ext=1.e6
21542156
"Constant enthalpy flow rate into the volume";
@@ -2182,7 +2184,7 @@ package Examples
21822184
der(U) = H_flow_ext;
21832185

21842186
// Smooth state
2185-
medium2.p = 1e5*time/10;
2187+
medium2.p = pressureRate*time;
21862188
medium2.T = 330;
21872189
m_flow_ext2 = time - 30;
21882190
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)