@@ -1065,6 +1065,48 @@ package Test "Test models for the different solvers"
1065
1065
varProps.Xi = X_var;
1066
1066
end incompressibleCoolPropMixture;
1067
1067
end Incompressible;
1068
+
1069
+ model RhoSmoothing
1070
+ extends Modelica.Icons.Example;
1071
+ package fluid_std
1072
+ extends ExternalMedia.Media.CoolPropMedium(
1073
+ mediumName = "Pentane" ,
1074
+ substanceNames = {"n-Pentane|rho_smoothing_xend=0.0" },
1075
+ inputChoice= ExternalMedia.Common.InputChoice.ph);
1076
+ end fluid_std;
1077
+
1078
+ package fluid_spl
1079
+ extends ExternalMedia.Media.CoolPropMedium(
1080
+ mediumName = "Pentane" ,
1081
+ substanceNames = {"n-Pentane|rho_smoothing_xend=0.2" },
1082
+ inputChoice= ExternalMedia.Common.InputChoice.ph);
1083
+ end fluid_spl;
1084
+
1085
+ fluid_std.ThermodynamicState state_std "Properties of the two-phase fluid" ;
1086
+ fluid_spl.ThermodynamicState state_spl "Properties of the two-phase fluid" ;
1087
+
1088
+ Modelica.SIunits.AbsolutePressure p;
1089
+ Modelica.SIunits.SpecificEnthalpy h;
1090
+
1091
+ fluid_std.SaturationProperties sat_std;
1092
+
1093
+ Modelica.SIunits.SpecificEnthalpy h_start;
1094
+ Modelica.SIunits.SpecificEnthalpy h_end;
1095
+ Modelica.SIunits.SpecificEnthalpy h_delta;
1096
+
1097
+ Modelica.SIunits.Time t = 1 ;
1098
+
1099
+ equation
1100
+ p = 10E5 ;
1101
+ sat_std = fluid_std.setSat_p(p);
1102
+ h_start = fluid_std.bubbleEnthalpy(sat_std);
1103
+ h_end = h_start;
1104
+ //h_end = fluid_std.dewEnthalpy(sat_std);
1105
+ h_delta = 1e3 ;
1106
+ h = (h_start - h_delta) + (h_end- h_start+ 2 * h_delta)* time/ t;
1107
+ state_std = fluid_std.setState_ph(p,h);
1108
+ state_spl = fluid_spl.setState_ph(p,h);
1109
+ end RhoSmoothing;
1068
1110
end CoolProp;
1069
1111
1070
1112
package WrongMedium "Test cases with wrong medium models"
0 commit comments