46template <
class Scalar,
class H2O>
56 static std::string_view
name()
85 constexpr Scalar M2 = 58e-3;
87 return M1*M2/(M2 + X2*(M1 - M2));
129 template <
class Evaluation>
136 template <
class Evaluation>
138 const Evaluation& pressure)
149 template <
class Evaluation>
151 const Evaluation& pressure)
154 static constexpr Scalar f[] = {
155 2.63500e-1, 7.48368e-6, 1.44611e-6, -3.80860e-10
159 static constexpr Scalar a[4][3] = {
160 { -9633.6, -4080.0, +286.49 },
161 { +166.58, +68.577, -4.6856 },
162 { -0.90963, -0.36524, +0.249667e-1 },
163 { +0.17965e-2, +0.71924e-3, -0.4900e-4 }
166 const Evaluation theta = temperature - 273.15;
169 const Evaluation S_lSAT =
173 + f[3]*pow(theta, 3);
182 const Evaluation h_NaCl =
183 (3.6710e4*temperature
184 + (6.2770e1/2)*temperature*temperature
185 - (6.6670e-2/3)*temperature*temperature*temperature
186 + (2.8000e-5/4)*pow(temperature, 4.0))/58.44e3
189 const Evaluation m = S/(1-S)/58.44e-3;
192 for (
int i = 0; i<=3; ++i) {
193 for (
int j = 0; j <= 2; ++j) {
194 d_h += a[i][j] * pow(theta, i) * pow(m, j);
198 const Evaluation delta_h = 4.184/(1e3 + (58.44 * m))*d_h;
201 const Evaluation h_ls = (1-S)*hw + S*h_NaCl + S*delta_h;
209 template <
class Evaluation>
211 const Evaluation& pressure)
213 Scalar eps = scalarValue(temperature)*1e-8;
220 template <
class Evaluation>
222 const Evaluation& pressure)
228 template <
class Evaluation>
230 const Evaluation& pressure)
240 template <
class Evaluation>
242 const Evaluation& pressure)
252 template <
class Evaluation>
253 static Evaluation
gasDensity(
const Evaluation& temperature,
const Evaluation& pressure)
263 template <
class Evaluation>
264 static Evaluation
liquidDensity(
const Evaluation& temperature,
const Evaluation& pressure,
bool extrapolate =
false)
266 Evaluation tempC = temperature - 273.15;
267 Evaluation pMPa = pressure/1.0E6;
289 template <
class Evaluation>
290 static Evaluation
gasPressure(
const Evaluation& temperature,
const Evaluation& density)
296 template <
class Evaluation>
297 static Evaluation
liquidPressure(
const Evaluation& temperature,
const Evaluation& density)
303 Scalar eps = scalarValue(pressure)*1e-7;
305 Evaluation deltaP = pressure*2;
308 && std::abs(scalarValue(pressure)*1e-9) < std::abs(scalarValue(deltaP));
311 const Evaluation f =
liquidDensity(temperature, pressure) - density;
313 Evaluation df_dp =
liquidDensity(temperature, pressure + eps);
328 template <
class Evaluation>
329 static Evaluation
gasViscosity(
const Evaluation& temperature,
const Evaluation& pressure)
340 template <
class Evaluation>
343 Evaluation T_C = temperature - 273.15;
344 if(temperature <= 275.)
347 Evaluation A = (0.42*std::pow((std::pow(
salinity, 0.8)-0.17), 2) + 0.045)*pow(T_C, 0.8);
350 return mu_brine/1000.0;
357template <
class Scalar,
class H2O>
Abstract base class of a pure chemical species.
A class for the brine fluid properties.
Definition Brine.hpp:48
static Scalar molarMass()
The molar mass in of the component.
Definition Brine.hpp:82
static Evaluation gasPressure(const Evaluation &temperature, const Evaluation &density)
The pressure of steam in at a given density and temperature.
Definition Brine.hpp:290
static Scalar criticalVolume()
Returns the critical volume of water.
Definition Brine.hpp:105
static Scalar tripleTemperature()
Returns the temperature at water's triple point.
Definition Brine.hpp:117
static Scalar criticalPressure()
Returns the critical pressure of water.
Definition Brine.hpp:99
static Evaluation gasInternalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy of steam and water vapor .
Definition Brine.hpp:229
static Evaluation vaporPressure(const Evaluation &T)
The vapor pressure in of pure water at a given temperature.
Definition Brine.hpp:130
static Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of the pure component in liquid.
Definition Brine.hpp:150
static std::string_view name()
A human readable name for the component.
Definition Brine.hpp:56
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition Brine.hpp:68
static Evaluation liquidDensity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
The density of the liquid component at a given pressure in and temperature in .
Definition Brine.hpp:264
static Evaluation gasViscosity(const Evaluation &temperature, const Evaluation &pressure)
The dynamic viscosity of steam.
Definition Brine.hpp:329
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure)
The density of steam in at a given pressure and temperature.
Definition Brine.hpp:253
static Scalar criticalTemperature()
Returns the critical temperature of water.
Definition Brine.hpp:93
static Scalar triplePressure()
Returns the pressure at water's triple point.
Definition Brine.hpp:123
static Evaluation gasHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of water steam .
Definition Brine.hpp:221
static Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &)
The dynamic viscosity of pure water.
Definition Brine.hpp:341
static Evaluation liquidInternalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy of liquid water .
Definition Brine.hpp:241
static Evaluation liquidPressure(const Evaluation &temperature, const Evaluation &density)
The pressure of liquid water in at a given density and temperature.
Definition Brine.hpp:297
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition Brine.hpp:74
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition Brine.hpp:62
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of the pure component in gas.
Definition Brine.hpp:137
static Scalar salinity
The mass fraction of salt assumed to be in the brine.
Definition Brine.hpp:51
static Scalar acentricFactor()
Definition Brine.hpp:111
static Evaluation liquidHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of liquid water .
Definition Brine.hpp:210
Abstract base class of a pure chemical species.
Definition Component.hpp:44
static Evaluation liquidDensity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
The density of pure water in at a given pressure and temperature.
Definition H2O.hpp:687
static const Scalar criticalTemperature()
Returns the critical temperature of water.
Definition H2O.hpp:95
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure)
The density of steam in at a given pressure and temperature.
Definition H2O.hpp:562
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition H2O.hpp:540
static Evaluation gasPressure(const Evaluation &temperature, Scalar density)
The pressure of steam in at a given density and temperature.
Definition H2O.hpp:643
static Evaluation vaporPressure(Evaluation temperature)
The vapor pressure in of pure water at a given temperature.
Definition H2O.hpp:141
static Evaluation gasViscosity(const Evaluation &temperature, const Evaluation &pressure)
The dynamic viscosity of steam.
Definition H2O.hpp:790
static Evaluation gasHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of water steam .
Definition H2O.hpp:279
static Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of liquid water .
Definition H2O.hpp:237
static const Scalar acentricFactor()
The acentric factor of water.
Definition H2O.hpp:89
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition H2O.hpp:627
static const Scalar criticalPressure()
Returns the critical pressure of water.
Definition H2O.hpp:101
static const Scalar molarMass()
The molar mass in of water.
Definition H2O.hpp:83
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition H2O.hpp:546
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of water steam .
Definition H2O.hpp:186
static const Scalar tripleTemperature()
Returns the temperature at water's triple point.
Definition H2O.hpp:119
static const Scalar triplePressure()
Returns the pressure at water's triple point.
Definition H2O.hpp:125
static const Scalar criticalVolume()
Returns the critical volume of water.
Definition H2O.hpp:107
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30