Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions ModelicaTest/Media.mo
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,9 @@ is given to compare the approximation.
extends Modelica.Icons.Example;
package Medium = Modelica.Media.Air.MoistAir "Medium model";
SI.Temperature T = 273.15 + 100;
SI.AbsolutePressure p = 2e5 - 1.5e5*time;
parameter SI.AbsolutePressure p0 = 2e5 "p at time 0";
parameter Real pRate(unit = "Pa/s") = -1.5e5 "p's rate of change";
SI.AbsolutePressure p = p0 + pRate*time;
Medium.MassFraction X[Medium.nX] = {0.05,0.95};
Medium.ThermodynamicState state = Medium.setState_pTX(p,T,X);
SI.SpecificEntropy s = Medium.specificEntropy(state);
Expand All @@ -932,7 +934,9 @@ is given to compare the approximation.
extends Modelica.Icons.Example;
replaceable package Medium = Modelica.Media.R134a.R134a_ph "Medium model";
SI.Temperature T = 273.15 + 25;
SI.AbsolutePressure p = 10e5 + 20e5*time;
parameter SI.AbsolutePressure p0 = 10e5 "p at time 0";
parameter Real pRate(unit = "Pa/s") = 20e5 "p's rate of change";
SI.AbsolutePressure p = p0 + pRate*time;
Medium.ThermodynamicState state = Medium.setState_pTX(p, T);
SI.SpecificEnthalpy h = Medium.specificEnthalpy(state);
SI.Density rho = Medium.density(state);
Expand All @@ -946,7 +950,9 @@ is given to compare the approximation.
extends Modelica.Icons.Example;
replaceable package Medium = Modelica.Media.Water.WaterIF97_fixedregion "Medium model";
SI.Temperature T = 273.15 + 25;
SI.AbsolutePressure p = 10e5 + 20e5*time;
parameter SI.AbsolutePressure p0 = 10e5 "p at time 0";
parameter Real pRate(unit = "Pa/s") = 20e5 "p's rate of change";
SI.AbsolutePressure p = p0 + pRate*time;
Medium.ThermodynamicState state = Medium.setState_pTX(p, T);
SI.SpecificEnthalpy h_dew = Medium.dewEnthalpy(Medium.SaturationProperties(Tsat=Medium.saturationTemperature(state.p), psat=Medium.pressure(state)));
annotation (experiment(StopTime=1));
Expand Down