Commit f504dd44 authored by Henning Francke's avatar Henning Francke
Browse files

moved functions to parent packages because of issues in YAWS.Annulus models

parent 9f13f615
......@@ -146,22 +146,6 @@ partial package PartialBrineMultiSaltMultiGasTwoPhase "Template medium for aqueo
annotation(LateInline=true,inverse(p=pressure_dTX(d,T,X,phase,n_g_norm_start)));
end density_pTX;
replaceable function density_liq_pTX "Density of the liquid phase"
input SI.Pressure p "TODO: Rename to density_liq_pTX";
input SI.Temp_K T;
input MassFraction X[nX] "mass fraction m_NaCl/m_Sol";
input SI.MolarMass MM[:] "=MM_vec =fill(0,nX) molar masses of components";
output SI.Density d;
end density_liq_pTX;
replaceable function density_gas_pTX "Density of the gas phase"
input SI.Pressure p;
input SI.Temp_K T;
input MassFraction X[:] "nX_gas mass fraction";
input SI.MolarMass MM[:] "=MM_vec =fill(0,nX) molar masses of components";
output SI.Density d;
end density_gas_pTX;
redeclare function extends saturationTemperature "saturation temperature"
algorithm
T := 373.15;
......@@ -686,10 +670,10 @@ protected
h_g := -1;
end if;
d_l :=if not x < 1 then -1 else density_liq_pTX(
p,
T2,
X_l,
MM_vec) "no 1-phase gas";
p,
T2,
X_l,
MM_vec) "no 1-phase gas";
h_l := specificEnthalpy_liq_pTX(p,T,X_l,ignoreTlimit);
end if "TwoPhaseWater";
......@@ -827,22 +811,6 @@ protected
SI.SpecificHeatCapacity cp_vec[nX_gas+1];
end specificHeatCapacityCp_gas;
replaceable function isobaricExpansionCoefficient_liq
// extends isobaricExpansionCoefficient;
input ThermodynamicState state;
input SI.Density d_l;
output SI.LinearTemperatureCoefficient beta;
protected
constant SI.Temperature Delta_T= 1;
algorithm
// beta :=d_l*(1/d_l - 1/(density_liquid_pTX(state.p,state.T - Delta_T,state.X,MM_vec)))/Delta_T;
beta :=(1 - d_l/(density_liq_pTX(
state.p,
state.T - Delta_T,
state.X,
MM_vec)))/Delta_T;
end isobaricExpansionCoefficient_liq;
redeclare replaceable function specificEnthalpy
input ThermodynamicState state "Thermodynamic state record";
output SI.SpecificEnthalpy h;
......
......@@ -15,8 +15,6 @@ nM_gas
BaseProperties
ThermodynamicState
density_pTX
density_liq_pTX
density_gas_pTX
saturationTemperature
dewEnthalpy
bubbleEnthalpy
......@@ -36,5 +34,4 @@ setState_phX
specificHeatCapacityCp
specificHeatCapacityCp_liq
specificHeatCapacityCp_gas
isobaricExpansionCoefficient_liq
specificEnthalpy
......@@ -736,6 +736,39 @@ algorithm
annotation (Documentation(info="<html></html>"));
end pressure_dTX;
replaceable function isobaricExpansionCoefficient_liq
// extends isobaricExpansionCoefficient;
input ThermodynamicState state;
input SI.Density d_l;
input SI.MolarMass MM[:] "=MM_vec =fill(0,nX) molar masses of components";
output SI.LinearTemperatureCoefficient beta;
protected
constant SI.Temperature Delta_T= 1;
algorithm
// beta :=d_l*(1/d_l - 1/(density_liquid_pTX(state.p,state.T - Delta_T,state.X,MM_vec)))/Delta_T;
beta := (1 - d_l/(density_liq_pTX(
state.p,
state.T - Delta_T,
state.X,
MM)))/Delta_T;
end isobaricExpansionCoefficient_liq;
replaceable function density_liq_pTX "Density of the liquid phase"
input SI.Pressure p "TODO: Rename to density_liq_pTX";
input SI.Temp_K T;
input MassFraction X[nX] "mass fraction m_NaCl/m_Sol";
input SI.MolarMass MM[:] "=MM_vec =fill(0,nX) molar masses of components";
output SI.Density d;
end density_liq_pTX;
replaceable function density_gas_pTX "Density of the gas phase"
input SI.Pressure p;
input SI.Temp_K T;
input MassFraction X[:] "nX_gas mass fraction";
input SI.MolarMass MM[:] "=MM_vec =fill(0,nX) molar masses of components";
output SI.Density d;
end density_gas_pTX;
annotation (Documentation(info="<html>
<h4>PartialMixtureTwoPhaseMedium</h4>
<p><br>This is a template for two phase medium of a mixture of substances and is used by REFPROPMedium.</p>
......
......@@ -59,3 +59,6 @@ dynamicViscosity_liq
dynamicViscosity_gas
temperature
pressure_dTX
isobaricExpansionCoefficient_liq
density_liq_pTX
density_gas_pTX
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