Skip to content

Commit

Permalink
Merge pull request modelica#4103 from qlambert-pro/pressure-rate
Browse files Browse the repository at this point in the history
Fix unit error in SimpleLiquidWater model
  • Loading branch information
arunkumar-narasimhan committed Jan 14, 2024
2 parents 2518ca1 + f4c73e0 commit 7f46072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Modelica/Media/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2149,6 +2149,7 @@ package Examples
model SimpleLiquidWater "Example for Water.SimpleLiquidWater medium model"
extends Modelica.Icons.Example;

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

// Smooth state
medium2.p = 1e5*time/10;
medium2.p = pressureRate*time;
medium2.T = 330;
m_flow_ext2 = time - 30;
state = Medium.setSmoothState(
Expand Down
4 changes: 4 additions & 0 deletions Modelica/Units.mo
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ end UsersGuide;
displayUnit="bar");
type AbsolutePressure = Pressure (min=0.0, nominal = 1e5);
type PressureDifference = Pressure;
type PressureRate = Real (
final quantity="PressureRate",
final unit="Pa/s",
displayUnit="bar/s");
type BulkModulus = AbsolutePressure;
type Stress = Real (final unit="Pa");
type NormalStress = Stress;
Expand Down

0 comments on commit 7f46072

Please sign in to comment.