Skip to content

Commit 96589ae

Browse files
committed
Fix R134a_setState_pTX and WaterIF97_dewEnthalpy in the same way
1 parent edf832c commit 96589ae

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

ModelicaTest/Media.mo

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,9 @@ is given to compare the approximation.
934934
extends Modelica.Icons.Example;
935935
replaceable package Medium = Modelica.Media.R134a.R134a_ph "Medium model";
936936
SI.Temperature T = 273.15 + 25;
937-
SI.AbsolutePressure p = 10e5 + 20e5*time;
937+
parameter SI.AbsolutePressure p0 = 10e5 "p at time 0";
938+
parameter Real pRate(unit = "Pa/s") = 20e5 "p's rate of change";
939+
SI.AbsolutePressure p = p0 + pRate*time;
938940
Medium.ThermodynamicState state = Medium.setState_pTX(p, T);
939941
SI.SpecificEnthalpy h = Medium.specificEnthalpy(state);
940942
SI.Density rho = Medium.density(state);
@@ -948,7 +950,9 @@ is given to compare the approximation.
948950
extends Modelica.Icons.Example;
949951
replaceable package Medium = Modelica.Media.Water.WaterIF97_fixedregion "Medium model";
950952
SI.Temperature T = 273.15 + 25;
951-
SI.AbsolutePressure p = 10e5 + 20e5*time;
953+
parameter SI.AbsolutePressure p0 = 10e5 "p at time 0";
954+
parameter Real pRate(unit = "Pa/s") = 20e5 "p's rate of change";
955+
SI.AbsolutePressure p = p0 + pRate*time;
952956
Medium.ThermodynamicState state = Medium.setState_pTX(p, T);
953957
SI.SpecificEnthalpy h_dew = Medium.dewEnthalpy(Medium.SaturationProperties(Tsat=Medium.saturationTemperature(state.p), psat=Medium.pressure(state)));
954958
annotation (experiment(StopTime=1));

0 commit comments

Comments
 (0)