Commit 00837a1f authored by Henning Francke's avatar Henning Francke
Browse files

fixed endless loop in BrineProps2phaseFull

parent ba123a19
...@@ -141,11 +141,20 @@ partial package PartialBrineMultiSaltMultiGasTwoPhase "Template medium for aqueo ...@@ -141,11 +141,20 @@ partial package PartialBrineMultiSaltMultiGasTwoPhase "Template medium for aqueo
if debugmode then if debugmode then
print("Running density_pTX("+String(p/1e5)+","+String(T-273.15)+"degC, X="+Modelica.Math.Matrices.toString(transpose([X]))+")"); print("Running density_pTX("+String(p/1e5)+","+String(T-273.15)+"degC, X="+Modelica.Math.Matrices.toString(transpose([X]))+")");
end if; end if;
d:=density(setState_pTX(p,T,X,phase,n_g_norm_start)); d:=density(setState_pTX(p,T,X,phase,n_g_norm_start));
annotation(LateInline=true,inverse(p=pressure_dTX(d,T,X,phase,n_g_norm_start))); annotation(LateInline=true,inverse(p=pressure_dTX(d,T,X,phase,n_g_norm_start)));
end density_pTX; end density_pTX;
redeclare function density "density from state"
extends Modelica.Icons.Function;
input ThermodynamicState state "Thermodynamic state record";
output Density d "Density";
// extends Modelica.Media.Interfaces.PartialMedium.density;
algorithm
d := state.d;
end density;
redeclare function extends saturationTemperature "saturation temperature" redeclare function extends saturationTemperature "saturation temperature"
algorithm algorithm
T := 373.15; T := 373.15;
......
...@@ -15,6 +15,7 @@ nM_gas ...@@ -15,6 +15,7 @@ nM_gas
BaseProperties BaseProperties
ThermodynamicState ThermodynamicState
density_pTX density_pTX
density
saturationTemperature saturationTemperature
dewEnthalpy dewEnthalpy
bubbleEnthalpy bubbleEnthalpy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment