Brine (NaCl in H2O) fluid properties as a function of pressure (Pa), temperature (K) and NaCl mass fraction. More...
#include <BrineFluidProperties.h>
Public Member Functions | |
BrineFluidProperties (const InputParameters ¶meters) | |
virtual | ~BrineFluidProperties () |
virtual std::string | fluidName () const override |
Fluid name. More... | |
Real | molarMass (Real xnacl) const |
Average molar mass of brine. More... | |
FPDualReal | molarMass (const FPDualReal &xnacl) const |
Real | molarMassNaCl () const |
NaCl molar mass. More... | |
Real | molarMassH2O () const |
H2O molar mass. More... | |
virtual Real | rho_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override |
FPDualReal | rho_from_p_T_X (const FPDualReal &pressure, const FPDualReal &temperature, const FPDualReal &xnacl) const |
virtual void | rho_from_p_T_X (Real pressure, Real temperature, Real xnacl, Real &rho, Real &drho_dp, Real &drho_dT, Real &drho_dx) const override |
virtual Real | mu_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override |
virtual void | mu_from_p_T_X (Real pressure, Real temperature, Real xnacl, Real &mu, Real &dmu_dp, Real &dmu_dT, Real &dmu_dx) const override |
FPDualReal | h_from_p_T_X (const FPDualReal &pressure, const FPDualReal &temperature, const FPDualReal &xnacl) const |
virtual Real | h_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override |
virtual void | h_from_p_T_X (Real pressure, Real temperature, Real xnacl, Real &h, Real &dh_dp, Real &dh_dT, Real &dh_dx) const override |
virtual Real | cp_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override |
FPDualReal | e_from_p_T_X (const FPDualReal &pressure, const FPDualReal &temperature, const FPDualReal &xnacl) const |
virtual Real | e_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override |
virtual void | e_from_p_T_X (Real pressure, Real temperature, Real xnacl, Real &e, Real &de_dp, Real &de_dT, Real &de_dx) const override |
virtual Real | k_from_p_T_X (Real pressure, Real temperature, Real xnacl) const override |
Real | vaporPressure (Real temperature, Real xnacl) const |
Brine vapour pressure From Haas, Physical properties of the coexisting phases and thermochemical properties of the H2O component in boiling NaCl solutions, Geological Survey Bulletin, 1421-A (1976). More... | |
Real | haliteSolubility (Real temperature) const |
Solubility of halite (solid NaCl) in water Originally from Potter et al., A new method for determining the solubility of salts in aqueous solutions at elevated temperatures, J. More... | |
Real | henryConstant (Real temperature, const std::vector< Real > &coeffs) const |
IAPWS formulation of Henry's law constant for dissolution in water (implemented in water FluidProperties userobject) More... | |
void | henryConstant (Real temperature, const std::vector< Real > &coeffs, Real &Kh, Real &dKh_dT) const |
DualReal | henryConstant (const DualReal &temperature, const std::vector< Real > &coeffs) const |
virtual const SinglePhaseFluidProperties & | getComponent (unsigned int component) const override |
Get UserObject for specified component. More... | |
virtual void | rho_mu_from_p_T_X (Real pressure, Real temperature, Real xmass, Real &rho, Real &mu) const |
Density and viscosity. More... | |
virtual void | rho_mu_from_p_T_X (DualReal pressure, DualReal temperature, DualReal xmass, DualReal &rho, DualReal &mu) const |
virtual void | rho_mu_from_p_T_X (Real pressure, Real temperature, Real xmass, Real &rho, Real &drho_dp, Real &drho_dT, Real &drho_dx, Real &mu, Real &dmu_dp, Real &dmu_dT, Real &dmu_dx) const |
Density and viscosity and their derivatives wrt pressure, temperature and mass fraction. More... | |
virtual void | execute () final |
virtual void | initialize () final |
virtual void | finalize () final |
virtual void | threadJoin (const UserObject &) final |
virtual void | subdomainSetup () final |
Static Public Attributes | |
static const unsigned int | WATER = 0 |
Fluid component numbers for water and NaCl. More... | |
static const unsigned int | NACL = 1 |
static const Real | _R = 8.3144598 |
Universal gas constant (J/mol/K) More... | |
Protected Member Functions | |
Real | massFractionToMolalConc (Real xnacl) const |
Conversion from mass fraction to molal concentration (molality) More... | |
Real | massFractionToMoleFraction (Real xnacl) const |
Conversion from mass fraction to mole fraction. More... | |
FPDualReal | massFractionToMoleFraction (const FPDualReal &xnacl) const |
Protected Attributes | |
const Water97FluidProperties * | _water97_fp |
Water97FluidProperties UserObject (for Henry's law) More... | |
const SinglePhaseFluidProperties * | _water_fp |
Water97FluidProperties UserObject. More... | |
const SinglePhaseFluidProperties * | _nacl_fp |
NaClFluidProperties UserObject. More... | |
Real | _Mnacl |
Molar mass of NaCl (kg/mol) More... | |
Real | _Mh2o |
Molar mass of water (H2O) (kg/mol) More... | |
bool | _water_fp_derivs |
Flag to indicate whether to calculate derivatives in water_fp. More... | |
const Real | _T_c2k |
Conversion of temperature from Celsius to Kelvin. More... | |
const bool | _allow_imperfect_jacobians |
Flag to set unimplemented Jacobian entries to zero. More... | |
propfunc (rho, p, T, X) propfunc(mu | |
Compute a fluid property given for the state defined by three given properties. More... | |
X | propfunc (h, p, T, X) propfunc(cp |
X X | propfunc (e, p, T, X) propfunc(k |
p | |
X | p |
X X | p |
T | |
X | T |
X X | T |
Brine (NaCl in H2O) fluid properties as a function of pressure (Pa), temperature (K) and NaCl mass fraction.
Most properties from: Driesner, The system H2O-NaCl. Part II: Correlations for molar volume, enthalpy, and isobaric heat capacity from 0 to 1000 C, 1 to 5000 bar, and 0 to 1 Xnacl, Geochimica et Cosmochimica Acta 71, 4902-4919 (2007)
Viscosity and thermal conductivity from: Phillips et al, A technical databook for geothermal energy utilization, LbL-12810 (1981) Note: uses water thermal conductivity from IAPWS rather than the correlation given by Phillips et al.
Definition at line 38 of file BrineFluidProperties.h.
BrineFluidProperties::BrineFluidProperties | ( | const InputParameters & | parameters | ) |
Definition at line 25 of file BrineFluidProperties.C.
|
virtual |
Definition at line 73 of file BrineFluidProperties.C.
|
overridevirtual |
Definition at line 352 of file BrineFluidProperties.C.
FPDualReal BrineFluidProperties::e_from_p_T_X | ( | const FPDualReal & | pressure, |
const FPDualReal & | temperature, | ||
const FPDualReal & | xnacl | ||
) | const |
Definition at line 389 of file BrineFluidProperties.C.
Referenced by PorousFlowBrine::computeQpProperties(), e_from_p_T_X(), and PorousFlowBrine::initQpStatefulProperties().
|
overridevirtual |
Definition at line 400 of file BrineFluidProperties.C.
|
overridevirtual |
Definition at line 409 of file BrineFluidProperties.C.
|
inlinefinalvirtualinherited |
Definition at line 34 of file FluidProperties.h.
|
inlinefinalvirtualinherited |
Definition at line 36 of file FluidProperties.h.
|
overridevirtual |
Fluid name.
Reimplemented from MultiComponentFluidProperties.
Definition at line 92 of file BrineFluidProperties.C.
Referenced by PorousFlowBrineCO2::PorousFlowBrineCO2().
|
overridevirtual |
Get UserObject for specified component.
component | fluid component |
Reimplemented from MultiComponentFluidProperties.
Definition at line 76 of file BrineFluidProperties.C.
FPDualReal BrineFluidProperties::h_from_p_T_X | ( | const FPDualReal & | pressure, |
const FPDualReal & | temperature, | ||
const FPDualReal & | xnacl | ||
) | const |
Definition at line 264 of file BrineFluidProperties.C.
Referenced by PorousFlowBrine::computeQpProperties(), e_from_p_T_X(), h_from_p_T_X(), PorousFlowBrine::initQpStatefulProperties(), and PorousFlowBrineCO2::liquidProperties().
|
overridevirtual |
Definition at line 314 of file BrineFluidProperties.C.
|
overridevirtual |
Definition at line 326 of file BrineFluidProperties.C.
Real BrineFluidProperties::haliteSolubility | ( | Real | temperature | ) | const |
Solubility of halite (solid NaCl) in water Originally from Potter et al., A new method for determining the solubility of salts in aqueous solutions at elevated temperatures, J.
Res. U.S. Geol. Surv., 5, 389-395 (1977). Equation describing halite solubility is repeated in Chou, Phase relations in the system NaCI-KCI-H2O. III: Solubilities of halite in vapor-saturated liquids above 445 C and redetermination of phase equilibrium properties in the system NaCI-HzO to 1000 C and 1500 bars, Geochimica et Cosmochimica Acta 51, 1965-1975 (1987). Note: this correlation is valid for 0 <= T <= 424.5 C
temperature | temperature (K) |
Definition at line 471 of file BrineFluidProperties.C.
DualReal BrineFluidProperties::henryConstant | ( | const DualReal & | temperature, |
const std::vector< Real > & | coeffs | ||
) | const |
Definition at line 519 of file BrineFluidProperties.C.
Real BrineFluidProperties::henryConstant | ( | Real | temperature, |
const std::vector< Real > & | coeffs | ||
) | const |
IAPWS formulation of Henry's law constant for dissolution in water (implemented in water FluidProperties userobject)
T | fluid temperature (K) | |
coeffs | Henry's constant coefficients of gas | |
[out] | Kh | Henry's constant |
[out] | dKh_dT | derivative of Kh wrt temperature |
Definition at line 504 of file BrineFluidProperties.C.
Referenced by henryConstant(), and PorousFlowBrineCO2::henryConstant().
void BrineFluidProperties::henryConstant | ( | Real | temperature, |
const std::vector< Real > & | coeffs, | ||
Real & | Kh, | ||
Real & | dKh_dT | ||
) | const |
Definition at line 510 of file BrineFluidProperties.C.
|
inlinefinalvirtualinherited |
Definition at line 35 of file FluidProperties.h.
|
overridevirtual |
Definition at line 435 of file BrineFluidProperties.C.
|
protected |
Conversion from mass fraction to molal concentration (molality)
xnacl | NaCl mass fraction (kg/kg) |
Definition at line 480 of file BrineFluidProperties.C.
Referenced by k_from_p_T_X(), mu_from_p_T_X(), and vaporPressure().
|
protected |
Definition at line 495 of file BrineFluidProperties.C.
|
protected |
Conversion from mass fraction to mole fraction.
xnacl | NaCl mass fraction (kg/kg) |
Definition at line 486 of file BrineFluidProperties.C.
Referenced by cp_from_p_T_X(), h_from_p_T_X(), and rho_from_p_T_X().
FPDualReal BrineFluidProperties::molarMass | ( | const FPDualReal & | xnacl | ) | const |
Definition at line 98 of file BrineFluidProperties.C.
Real BrineFluidProperties::molarMass | ( | Real | xnacl | ) | const |
Average molar mass of brine.
xnacl | NaCl mass fraction (-) |
Definition at line 104 of file BrineFluidProperties.C.
Referenced by massFractionToMoleFraction(), and rho_from_p_T_X().
Real BrineFluidProperties::molarMassH2O | ( | ) | const |
H2O molar mass.
Definition at line 116 of file BrineFluidProperties.C.
Real BrineFluidProperties::molarMassNaCl | ( | ) | const |
NaCl molar mass.
Definition at line 110 of file BrineFluidProperties.C.
|
overridevirtual |
Definition at line 211 of file BrineFluidProperties.C.
Referenced by PorousFlowBrine::computeQpProperties(), and PorousFlowBrineCO2::liquidProperties().
|
overridevirtual |
Definition at line 230 of file BrineFluidProperties.C.
Compute a fluid property given for the state defined by three given properties.
For all functions, the first three arguments are the given properties that define the fluid state. For the three-argument variants, the desired property is the return value. The seven-argument variants also provide partial derivatives x/da, dx/db and dx/dc where x is the desired property being computed, a is the first given property, b is the second given property etc. The desired property, dx/da, dx/db and dx/dc are stored into the 4rd, 5th, 6th and 7th arguments respectively.
Properties/parameters used in these function are listed below with their units:
@begincode p pressure [Pa] T temperature [K] X solute mass fraction [-] e specific internal energy [J/kg] rho density [kg/m^3] h specific enthalpy [J/kg] mu viscosity [Pa*s] k thermal conductivity [W/(m*K)] c speed of sound [m/s] cp constant-pressure specific heat [J/K] cv constant-volume specific heat [J/K]
As an example:
@begincode // calculate desnity given pressure, temperature and solute mass fraction: auto density = your_fluid_properties_object.rho_from_p_T_X(p, T, X);
// or use the derivative variant: Real rho = 0; // density will be stored into here Real drho_dp = 0; // derivative will be stored into here Real drho_dT = 0; // derivative will be stored into here Real drho_dX = 0; // derivative will be stored into here your_fluid_properties_object.rho_from_p_T_X(p, T, X, rho, drho_dp, drho_dT, drho_dX);
Automatic differentiation (AD) support is provided through prop_from_p_T_X(DualReal p, DualReal T, DualReal X) versions of the functions where p, T and X must be ADReal/DualNumber's calculated using all AD-supporting values.
FPDualReal BrineFluidProperties::rho_from_p_T_X | ( | const FPDualReal & | pressure, |
const FPDualReal & | temperature, | ||
const FPDualReal & | xnacl | ||
) | const |
Definition at line 122 of file BrineFluidProperties.C.
|
overridevirtual |
Definition at line 171 of file BrineFluidProperties.C.
Referenced by PorousFlowBrine::computeQpProperties(), e_from_p_T_X(), PorousFlowBrine::initQpStatefulProperties(), PorousFlowBrineCO2::liquidProperties(), rho_from_p_T_X(), and PorousFlowBrineCO2::saturation().
|
overridevirtual |
Definition at line 185 of file BrineFluidProperties.C.
|
virtualinherited |
Definition at line 42 of file MultiComponentFluidProperties.C.
|
virtualinherited |
Density and viscosity and their derivatives wrt pressure, temperature and mass fraction.
pressure | fluid pressure (Pa) | |
temperature | fluid temperature (K) | |
xmass | mass fraction (-) | |
[out] | rho | density (kg/m^3) |
[out] | drho_dp | derivative of density wrt pressure |
[out] | drho_dT | derivative of density wrt temperature |
[out] | drho_dx | derivative of density wrt mass fraction |
[out] | mu | viscosity (Pa.s) |
[out] | dmu_dp | derivative of viscosity wrt pressure |
[out] | dmu_dT | derivative of viscosity wrt temperature |
[out] | dmu_dx | derivative of viscosity wrt mass fraction |
Definition at line 50 of file MultiComponentFluidProperties.C.
|
virtualinherited |
Density and viscosity.
pressure | fluid pressure (Pa) | |
temperature | fluid temperature (K) | |
xmass | mass fraction (-) | |
[out] | rho | density (kg/m^3) |
Definition at line 34 of file MultiComponentFluidProperties.C.
|
inlinefinalvirtualinherited |
Definition at line 39 of file FluidProperties.h.
|
inlinefinalvirtualinherited |
Definition at line 38 of file FluidProperties.h.
Real BrineFluidProperties::vaporPressure | ( | Real | temperature, |
Real | xnacl | ||
) | const |
Brine vapour pressure From Haas, Physical properties of the coexisting phases and thermochemical properties of the H2O component in boiling NaCl solutions, Geological Survey Bulletin, 1421-A (1976).
temperature | brine temperature (K) |
xnacl | salt mass fraction (-) |
Definition at line 451 of file BrineFluidProperties.C.
Referenced by PorousFlowBrineCO2::solveEquilibriumMoleFractionHighTemp().
|
protectedinherited |
Flag to set unimplemented Jacobian entries to zero.
Definition at line 48 of file FluidProperties.h.
Referenced by SinglePhaseFluidProperties::fluidPropError().
|
protected |
Molar mass of water (H2O) (kg/mol)
Definition at line 202 of file BrineFluidProperties.h.
Referenced by BrineFluidProperties(), molarMass(), molarMassH2O(), and rho_from_p_T_X().
|
protected |
Molar mass of NaCl (kg/mol)
Definition at line 200 of file BrineFluidProperties.h.
Referenced by BrineFluidProperties(), k_from_p_T_X(), massFractionToMolalConc(), massFractionToMoleFraction(), molarMass(), molarMassNaCl(), and mu_from_p_T_X().
|
protected |
NaClFluidProperties UserObject.
Definition at line 197 of file BrineFluidProperties.h.
Referenced by BrineFluidProperties(), and getComponent().
|
staticinherited |
Universal gas constant (J/mol/K)
Definition at line 42 of file FluidProperties.h.
Referenced by HelmholtzFluidProperties::c_from_p_T(), IdealGasFluidProperties::c_from_p_T(), HelmholtzFluidProperties::cp_from_p_T(), HelmholtzFluidProperties::cv_from_p_T(), HelmholtzFluidProperties::e_from_p_T(), HelmholtzFluidProperties::h_from_p_T(), HelmholtzFluidProperties::p_from_rho_T(), HelmholtzFluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), and HelmholtzFluidProperties::s_from_p_T().
|
protectedinherited |
Conversion of temperature from Celsius to Kelvin.
Definition at line 46 of file FluidProperties.h.
Referenced by NaClFluidProperties::cp_from_p_T(), cp_from_p_T_X(), NaClFluidProperties::h_from_p_T(), h_from_p_T_X(), haliteSolubility(), NaClFluidProperties::k_from_p_T(), k_from_p_T_X(), mu_from_p_T_X(), CO2FluidProperties::partialDensity(), NaClFluidProperties::rho_from_p_T(), and rho_from_p_T_X().
|
protected |
Water97FluidProperties UserObject (for Henry's law)
Definition at line 193 of file BrineFluidProperties.h.
Referenced by BrineFluidProperties(), and henryConstant().
|
protected |
Water97FluidProperties UserObject.
Definition at line 195 of file BrineFluidProperties.h.
Referenced by BrineFluidProperties(), cp_from_p_T_X(), getComponent(), h_from_p_T_X(), k_from_p_T_X(), mu_from_p_T_X(), rho_from_p_T_X(), and vaporPressure().
|
mutableprotected |
Flag to indicate whether to calculate derivatives in water_fp.
Definition at line 204 of file BrineFluidProperties.h.
Referenced by e_from_p_T_X(), h_from_p_T_X(), and rho_from_p_T_X().
|
static |
Definition at line 172 of file BrineFluidProperties.h.
Referenced by getComponent().
|
inherited |
Definition at line 123 of file MultiComponentFluidProperties.h.
Referenced by e_from_p_T_X(), h_from_p_T_X(), and rho_from_p_T_X().
|
inherited |
Definition at line 125 of file MultiComponentFluidProperties.h.
|
inherited |
Definition at line 127 of file MultiComponentFluidProperties.h.
|
inherited |
Definition at line 123 of file MultiComponentFluidProperties.h.
Referenced by e_from_p_T_X(), h_from_p_T_X(), and rho_from_p_T_X().
|
inherited |
Definition at line 125 of file MultiComponentFluidProperties.h.
|
inherited |
Definition at line 127 of file MultiComponentFluidProperties.h.
|
static |
Fluid component numbers for water and NaCl.
Definition at line 171 of file BrineFluidProperties.h.
Referenced by getComponent().