Skip to content

Commit

Permalink
Add test-case
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson authored and beutlich committed Jan 18, 2024
1 parent 0f50d98 commit 03af0d9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ModelicaTest/Media.mo
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,22 @@ is given to compare the approximation.
annotation (experiment(StopTime=1));
end R134a_setState_pTX;

model R134a_setState_phX "Test setState_phX() of R134a"
extends Modelica.Icons.Example;
replaceable package Medium = Modelica.Media.R134a.R134a_ph "Medium model";
SI.Temperature h = Medium.h_default;
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_phX(p, h);
SI.SpecificEnthalpy T= Medium.temperature(state);
SI.Density rho = Medium.density(state);
SI.DynamicViscosity mu = Medium.dynamicViscosity(state);
SI.SpecificHeatCapacity cp = Medium.specificHeatCapacityCp(state);
SI.ThermalConductivity k = Medium.thermalConductivity(state);
annotation (experiment(StopTime=1));
end R134a_setState_phX;

model WaterIF97_dewEnthalpy "Test dewEnthalpy of WaterIF97"
extends Modelica.Icons.Example;
replaceable package Medium = Modelica.Media.Water.WaterIF97_fixedregion "Medium model";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
time
T
rho
mu
cp
k

0 comments on commit 03af0d9

Please sign in to comment.