Commit 0edd107f authored by Henning Francke's avatar Henning Francke
Browse files

removed duplicate functions

parent e8a7f512
within BrineProp.Brine3salts3gas;
function fugacity_H2O
"Calculation of fugacity coefficient according to (Duan 2003)"
// extends fugacity_pTX;
input SI.Pressure p;
input SI.Temp_K T;
output Real phi;
protected
Types.Pressure_bar p_bar=SI.Conversions.to_bar(p);
Real[:] a = {1.86357885E-03,
1.17332094E-02,
7.82682497E-07,
-1.15662779E-05,
-3.13619739,
-1.29464029E-03};
extends partial_fugacity_pTX;
algorithm
phi := exp(a[1] + a[2]*p_bar + a[3]*p_bar^2 + a[4]*p_bar*T + a[5]*p_bar/T + a[6]*p_bar^2/T);
phi:=GasData.fugacity_H2O_Duan2003(p, T);
end fugacity_H2O;
fugacity_H2O
setState_pTX
setState_phX
setState_dTX
......@@ -14,3 +13,4 @@ thermalConductivity
surfaceTension
specificHeatCapacityCp_liq
specificHeatCapacityCp_gas
fugacity_H2O
within BrineProp.Brine3salts4gas;
function fugacity_H2O
"Calculation of fugacity coefficient according to (Duan 2003)"
extends partial_fugacity_pTX;
algorithm
phi:=GasData.fugacity_H2O_Duan2003(p, T);
end fugacity_H2O;
within BrineProp.GasData;
function fugacity_H2O_Duan2003
"Calculation of fugacity coefficient according to (Duan 2003)"
extends partial_fugacity_pTX;
protected
Types.Pressure_bar p_bar=SI.Conversions.to_bar(p);
Real[:] a = {1.86357885E-03,
1.17332094E-02,
7.82682497E-07,
-1.15662779E-05,
-3.13619739,
-1.29464029E-03};
algorithm
phi := exp(a[1] + a[2]*p_bar + a[3]*p_bar^2 + a[4]*p_bar*T + a[5]*p_bar/T + a[6]*p_bar^2/T);
end fugacity_H2O_Duan2003;
......@@ -39,3 +39,4 @@ solubility_H2_pTb_Chabab2020_molality
solubility_H2_pTb_Chabab2020_y
solubility_H2_pT_Chabab2020_y
degassingPressure_H2_Chabab2020
fugacity_H2O_Duan2003
......@@ -152,13 +152,6 @@ d := state.d;
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;
......@@ -203,16 +196,6 @@ d := state.d;
output MassFraction solu[nX_gas] "gas concentration in kg_gas/kg_fluid";
end solubilities_pTX;
replaceable function fugacity_pTX
"Calculation of nitrogen fugacity coefficient extracted from EES"
input SI.Pressure p;
input SI.Temp_K T;
input MassFraction X[:]=reference_X "Mass fractions";
input String substancename;
output Real phi;
protected
Types.Pressure_bar p_bar=SI.Conversions.to_bar(p);
end fugacity_pTX;
redeclare function vapourQuality
"Returns vapour quality, needs to be defined to overload function defined in PartialMixtureTwoPhaseMedium"
......@@ -833,21 +816,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";
......
......@@ -16,14 +16,12 @@ BaseProperties
ThermodynamicState
density
density_pTX
density_liq_pTX
density_gas_pTX
saturationTemperature
dewEnthalpy
bubbleEnthalpy
solutionEnthalpy
solubilities_pTX
fugacity_pTX
vapourQuality
temperature_phX
pressure_dTX
......@@ -37,5 +35,4 @@ setState_phX
specificHeatCapacityCp
specificHeatCapacityCp_liq
specificHeatCapacityCp_gas
isobaricExpansionCoefficient_liq
specificEnthalpy
......@@ -754,7 +754,7 @@ protected
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.Pressure p;
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";
......
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