44 template <
class Scalar,
class H2O>
83 constexpr Scalar M2 = 58e-3;
85 return M1*M2/(M2 + X2*(M1 - M2));
127 template <
class Evaluation>
134 template <
class Evaluation>
136 const Evaluation& pressure)
147 template <
class Evaluation>
149 const Evaluation& pressure)
152 static constexpr Scalar f[] = {
153 2.63500e-1, 7.48368e-6, 1.44611e-6, -3.80860e-10
157 static constexpr Scalar a[4][3] = {
158 { -9633.6, -4080.0, +286.49 },
159 { +166.58, +68.577, -4.6856 },
160 { -0.90963, -0.36524, +0.249667e-1 },
161 { +0.17965e-2, +0.71924e-3, -0.4900e-4 }
164 const Evaluation theta = temperature - 273.15;
167 const Evaluation S_lSAT =
171 + f[3]*pow(theta, 3);
180 const Evaluation h_NaCl =
181 (3.6710e4*temperature
182 + (6.2770e1/2)*temperature*temperature
183 - (6.6670e-2/3)*temperature*temperature*temperature
184 + (2.8000e-5/4)*pow(temperature, 4.0))/58.44e3
187 const Evaluation m = S/(1-S)/58.44e-3;
190 for (
int i = 0; i<=3; ++i) {
191 for (
int j = 0; j <= 2; ++j) {
192 d_h += a[i][j] * pow(theta, i) * pow(m, j);
196 const Evaluation delta_h = 4.184/(1e3 + (58.44 * m))*d_h;
199 const Evaluation h_ls = (1-S)*hw + S*h_NaCl + S*delta_h;
207 template <
class Evaluation>
209 const Evaluation& pressure)
211 Scalar eps = scalarValue(temperature)*1e-8;
218 template <
class Evaluation>
220 const Evaluation& pressure)
226 template <
class Evaluation>
228 const Evaluation& pressure)
238 template <
class Evaluation>
240 const Evaluation& pressure)
250 template <
class Evaluation>
251 static Evaluation
gasDensity(
const Evaluation& temperature,
const Evaluation& pressure)
261 template <
class Evaluation>
262 static Evaluation
liquidDensity(
const Evaluation& temperature,
const Evaluation& pressure,
bool extrapolate =
false)
264 Evaluation tempC = temperature - 273.15;
265 Evaluation pMPa = pressure/1.0E6;
287 template <
class Evaluation>
288 static Evaluation
gasPressure(
const Evaluation& temperature,
const Evaluation& density)
294 template <
class Evaluation>
295 static Evaluation
liquidPressure(
const Evaluation& temperature,
const Evaluation& density)
301 Scalar eps = scalarValue(pressure)*1e-7;
303 Evaluation deltaP = pressure*2;
306 && std::abs(scalarValue(pressure)*1e-9) < std::abs(scalarValue(deltaP));
309 const Evaluation f =
liquidDensity(temperature, pressure) - density;
311 Evaluation df_dp =
liquidDensity(temperature, pressure + eps);
326 template <
class Evaluation>
327 static Evaluation
gasViscosity(
const Evaluation& temperature,
const Evaluation& pressure)
338 template <
class Evaluation>
341 Evaluation T_C = temperature - 273.15;
342 if(temperature <= 275.)
345 Evaluation A = (0.42*std::pow((std::pow(
salinity, 0.8)-0.17), 2) + 0.045)*pow(T_C, 0.8);
348 return mu_brine/1000.0;
355 template <
class Scalar,
class H2O>
Abstract base class of a pure chemical species.
A class for the brine fluid properties.
Definition: Brine.hpp:46
static Scalar molarMass()
The molar mass in of the component.
Definition: Brine.hpp:80
static Evaluation gasPressure(const Evaluation &temperature, const Evaluation &density)
The pressure of steam in at a given density and temperature.
Definition: Brine.hpp:288
static Scalar criticalVolume()
Returns the critical volume of water.
Definition: Brine.hpp:103
static Scalar tripleTemperature()
Returns the temperature at water's triple point.
Definition: Brine.hpp:115
static Scalar criticalPressure()
Returns the critical pressure of water.
Definition: Brine.hpp:97
static Evaluation gasInternalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy of steam and water vapor .
Definition: Brine.hpp:227
static Evaluation vaporPressure(const Evaluation &T)
The vapor pressure in of pure water at a given temperature.
Definition: Brine.hpp:128
static const char * name()
A human readable name for the component.
Definition: Brine.hpp:54
static Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of the pure component in liquid.
Definition: Brine.hpp:148
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition: Brine.hpp:66
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:262
static Evaluation gasViscosity(const Evaluation &temperature, const Evaluation &pressure)
The dynamic viscosity of steam.
Definition: Brine.hpp:327
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure)
The density of steam in at a given pressure and temperature.
Definition: Brine.hpp:251
static Scalar criticalTemperature()
Returns the critical temperature of water.
Definition: Brine.hpp:91
static Scalar triplePressure()
Returns the pressure at water's triple point.
Definition: Brine.hpp:121
static Evaluation gasHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of water steam .
Definition: Brine.hpp:219
static Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &)
The dynamic viscosity of pure water.
Definition: Brine.hpp:339
static Evaluation liquidInternalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy of liquid water .
Definition: Brine.hpp:239
static Evaluation liquidPressure(const Evaluation &temperature, const Evaluation &density)
The pressure of liquid water in at a given density and temperature.
Definition: Brine.hpp:295
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition: Brine.hpp:72
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition: Brine.hpp:60
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of the pure component in gas.
Definition: Brine.hpp:135
static Scalar salinity
The mass fraction of salt assumed to be in the brine.
Definition: Brine.hpp:49
static Scalar acentricFactor()
Definition: Brine.hpp:109
static Evaluation liquidHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of liquid water .
Definition: Brine.hpp:208
Abstract base class of a pure chemical species.
Definition: Component.hpp:42
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:698
static const Scalar criticalTemperature()
Returns the critical temperature of water.
Definition: H2O.hpp:92
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure)
The density of steam in at a given pressure and temperature.
Definition: H2O.hpp:572
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition: H2O.hpp:550
static Evaluation gasPressure(const Evaluation &temperature, Scalar density)
The pressure of steam in at a given density and temperature.
Definition: H2O.hpp:654
static Evaluation vaporPressure(Evaluation temperature)
The vapor pressure in of pure water at a given temperature.
Definition: H2O.hpp:138
static Evaluation gasViscosity(const Evaluation &temperature, const Evaluation &pressure)
The dynamic viscosity of steam.
Definition: H2O.hpp:802
static Evaluation gasHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of water steam .
Definition: H2O.hpp:280
static Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of liquid water .
Definition: H2O.hpp:236
static const Scalar acentricFactor()
The acentric factor of water.
Definition: H2O.hpp:86
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition: H2O.hpp:638
static const Scalar criticalPressure()
Returns the critical pressure of water.
Definition: H2O.hpp:98
static const Scalar molarMass()
The molar mass in of water.
Definition: H2O.hpp:80
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition: H2O.hpp:556
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of water steam .
Definition: H2O.hpp:183
static const Scalar tripleTemperature()
Returns the temperature at water's triple point.
Definition: H2O.hpp:116
static const Scalar triplePressure()
Returns the pressure at water's triple point.
Definition: H2O.hpp:122
static const Scalar criticalVolume()
Returns the critical volume of water.
Definition: H2O.hpp:104