www.mooseframework.org
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
BrineFluidProperties Class Reference

Brine (NaCl in H2O) fluid properties as a function of pressure (Pa), temperature (K) and NaCl mass fraction. More...

#include <BrineFluidProperties.h>

Inheritance diagram for BrineFluidProperties:
[legend]

Public Member Functions

 BrineFluidProperties (const InputParameters &parameters)
 
virtual ~BrineFluidProperties ()
 
virtual std::string fluidName () const override
 Fluid name. More...
 
Real molarMass (Real xnacl) const
 Average molar mass of brine. More...
 
Real molarMassNaCl () const
 NaCl molar mass. More...
 
Real molarMassH2O () const
 H2O molar mass. More...
 
virtual Real rho (Real pressure, Real temperature, Real xnacl) const override
 Density. More...
 
virtual void rho_dpTx (Real pressure, Real temperature, Real xnacl, Real &rho, Real &drho_dp, Real &drho_dT, Real &drho_dx) const override
 Density and its derivatives wrt pressure, temperature and mass fraction. More...
 
virtual Real mu_from_rho_T (Real water_density, Real temperature, Real xnacl) const override
 
virtual void mu_drhoTx (Real water_density, Real temperature, Real xnacl, Real dwater_density_dT, Real &mu, Real &dmu_drho, Real &dmu_dT, Real &dmu_dx) const override
 Dynamic viscosity and its derivatives wrt density, temperature and mass fraction. More...
 
virtual Real h (Real pressure, Real temperature, Real xnacl) const override
 Enthalpy. More...
 
virtual void h_dpTx (Real pressure, Real temperature, Real xnacl, Real &h, Real &dh_dp, Real &dh_dT, Real &dh_dx) const override
 Enthalpy and derivatives wrt pressure, temperature and mass fraction. More...
 
virtual Real cp (Real pressure, Real temperature, Real xnacl) const override
 Isobaric specific heat capacity. More...
 
virtual Real e (Real pressure, Real temperature, Real xnacl) const override
 Internal energy. More...
 
virtual void e_dpTx (Real pressure, Real temperature, Real xnacl, Real &e, Real &de_dp, Real &de_dT, Real &de_dx) const override
 Internal energy and its derivatives wrt pressure, temperature and mass fraction. More...
 
virtual Real k_from_rho_T (Real water_density, Real temperature, Real xnacl) const override
 Thermal conductivity. More...
 
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...
 
virtual const SinglePhaseFluidPropertiesPTgetComponent (unsigned int component) const override
 Get UserObject for specified component. More...
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 

Static Public Attributes

static const unsigned int WATER = 0
 Fluid component numbers for water and NaCl. More...
 
static const unsigned int NACL = 1
 

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...
 

Protected Attributes

const Water97FluidProperties_water97_fp
 Water97FluidProperties UserObject. More...
 
const SinglePhaseFluidPropertiesPT_water_fp
 Water97FluidProperties UserObject. More...
 
const SinglePhaseFluidPropertiesPT_nacl_fp
 NaClFluidProperties UserObject. More...
 
Real _Mnacl
 Molar mass of NaCl (kg/mol) More...
 
Real _Mh2o
 Molar mass of water (H2O) (kg/mol) More...
 
const Real _T_c2k
 Conversion of temperature from Celcius to Kelvin. More...
 

Detailed Description

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 34 of file BrineFluidProperties.h.

Constructor & Destructor Documentation

BrineFluidProperties::BrineFluidProperties ( const InputParameters &  parameters)

Definition at line 19 of file BrineFluidProperties.C.

20  : MultiComponentFluidPropertiesPT(parameters), _Mnacl(58.443e-3)
21 {
22  // Water97FluidProperties UserObject for water (needed to access vapor pressure)
23  std::string water97_name = name() + ":water97";
24  {
25  std::string class_name = "Water97FluidProperties";
26  InputParameters params = _app.getFactory().getValidParams(class_name);
27  _fe_problem.addUserObject(class_name, water97_name, params);
28  }
29  _water97_fp = &_fe_problem.getUserObject<Water97FluidProperties>(water97_name);
30 
31  // SinglePhaseFluidPropertiesPT UserObject for water to provide to getComponent
32  std::string water_name = name() + ":water";
33  {
34  std::string class_name = "Water97FluidProperties";
35  InputParameters params = _app.getFactory().getValidParams(class_name);
36  _fe_problem.addUserObject(class_name, water_name, params);
37  }
38  _water_fp = &_fe_problem.getUserObject<SinglePhaseFluidPropertiesPT>(water_name);
39 
40  // SinglePhaseFluidPropertiesPT UserObject for NaCl to provide to getComponent
41  std::string nacl_name = name() + ":nacl";
42  {
43  std::string class_name = "NaClFluidProperties";
44  InputParameters params = _app.getFactory().getValidParams(class_name);
45  _fe_problem.addUserObject(class_name, nacl_name, params);
46  }
47  _nacl_fp = &_fe_problem.getUserObject<SinglePhaseFluidPropertiesPT>(nacl_name);
48 
49  // Molar mass of NaCl and H20
52 }
const SinglePhaseFluidPropertiesPT * _nacl_fp
NaClFluidProperties UserObject.
const Water97FluidProperties * _water97_fp
Water97FluidProperties UserObject.
MultiComponentFluidPropertiesPT(const InputParameters &parameters)
Common class for single phase fluid properties using a pressure and temperature formulation.
virtual Real molarMass() const =0
Molar mass.
Real _Mnacl
Molar mass of NaCl (kg/mol)
virtual Real e(Real pressure, Real temperature, Real xnacl) const override
Internal energy.
Real _Mh2o
Molar mass of water (H2O) (kg/mol)
Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revi...
const SinglePhaseFluidPropertiesPT * _water_fp
Water97FluidProperties UserObject.
BrineFluidProperties::~BrineFluidProperties ( )
virtual

Definition at line 54 of file BrineFluidProperties.C.

54 {}

Member Function Documentation

Real BrineFluidProperties::cp ( Real  pressure,
Real  temperature,
Real  xmass 
) const
overridevirtual

Isobaric specific heat capacity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
Returns
cp (J/kg/K)

Implements MultiComponentFluidPropertiesPT.

Definition at line 264 of file BrineFluidProperties.C.

265 {
266  Real q1, q2, q10, q11, q12, q20, q21, q22, q23, q1x1, q2x1, Th;
267 
268  // The correlation requires the pressure in bar, not Pa.
269  Real pbar = pressure * 1.0e-5;
270  Real pbar2 = pbar * pbar;
271 
272  // The correlation requires mole fraction
273  Real Xnacl = massFractionToMoleFraction(xnacl);
274 
275  q11 = -32.1724 + 0.0621255 * pbar;
276  q21 = -1.69513 - 4.52781e-4 * pbar - 6.04279e-8 * pbar2;
277  q22 = 0.0612567 + 1.88082e-5 * pbar;
278 
279  q1x1 = 47.9048 - 9.36994e-3 * pbar + 6.51059e-6 * pbar2;
280  q2x1 = 0.241022 + 3.45087e-5 * pbar - 4.28356e-9 * pbar2;
281 
282  q12 = -q11 - q1x1;
283  q10 = q1x1;
284 
285  q20 = 1.0 - q21 * std::sqrt(q22);
286  q23 = q2x1 - q20 - q21 * std::sqrt(1.0 + q22);
287 
288  q1 = q10 + q11 * (1.0 - Xnacl) + q12 * (1.0 - Xnacl) * (1.0 - Xnacl);
289  q2 = q20 + q21 * std::sqrt(Xnacl + q22) + q23 * Xnacl;
290  // The temperature Th where the brine has the same isobaric heat capacity
291  // as pure water. Note: correlation uses temperature in Celcius
292  Th = q1 + q2 * (temperature - _T_c2k);
293 
294  // The brine isobaric heat capacity is then given by the isobaric heat
295  // capacity of water at temperature Th multiplied by q2
296  // Note: water isobaric heat capacity requires temperature in Kelvin
297  return q2 * _water_fp->cp(pressure, Th + _T_c2k);
298 }
virtual Real cp(Real pressure, Real temperature) const =0
Isobaric specific heat capacity.
const std::string temperature
Definition: NS.h:25
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
const std::string pressure
Definition: NS.h:24
Real massFractionToMoleFraction(Real xnacl) const
Conversion from mass fraction to mole fraction.
const SinglePhaseFluidPropertiesPT * _water_fp
Water97FluidProperties UserObject.
Real BrineFluidProperties::e ( Real  pressure,
Real  temperature,
Real  xmass 
) const
overridevirtual

Internal energy.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
Returns
internal energy (J/kg)

Implements MultiComponentFluidPropertiesPT.

Definition at line 301 of file BrineFluidProperties.C.

Referenced by e_dpTx(), haliteSolubility(), PorousFlowBrine::initQpStatefulProperties(), k_from_rho_T(), and rho().

302 {
303  Real enthalpy = h(pressure, temperature, xnacl);
304  Real density = rho(pressure, temperature, xnacl);
305 
306  return enthalpy - pressure / density;
307 }
const std::string density
Definition: NS.h:15
const std::string temperature
Definition: NS.h:25
const std::string enthalpy
Definition: NS.h:26
virtual Real rho(Real pressure, Real temperature, Real xnacl) const override
Density.
const std::string pressure
Definition: NS.h:24
virtual Real h(Real pressure, Real temperature, Real xnacl) const override
Enthalpy.
void BrineFluidProperties::e_dpTx ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  e,
Real &  de_dp,
Real &  de_dT,
Real &  de_dx 
) const
overridevirtual

Internal energy and its derivatives wrt pressure, temperature and mass fraction.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
[out]einternal energy (J/kg)
[out]de_dpderivative of internal energy wrt pressure
[out]de_dTderivative of internal energy wrt temperature
[out]de_dxderivative of internal energy wrt mass fraction

Implements MultiComponentFluidPropertiesPT.

Definition at line 310 of file BrineFluidProperties.C.

Referenced by PorousFlowBrine::computeQpProperties().

317 {
318  e = this->e(pressure, temperature, xnacl);
319  // Derivatives are calculated using finite differences due to complexity of correlation
320  Real eps = 1.0e-8;
321  Real peps = pressure * eps;
322  Real Teps = temperature * eps;
323  de_dp = (this->e(pressure + peps, temperature, xnacl) - e) / peps;
324  de_dT = (this->e(pressure, temperature + Teps, xnacl) - e) / Teps;
325  de_dx = (this->e(pressure, temperature, xnacl + eps) - e) / eps;
326 }
const std::string temperature
Definition: NS.h:25
virtual Real e(Real pressure, Real temperature, Real xnacl) const override
Internal energy.
const std::string pressure
Definition: NS.h:24
virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 25 of file FluidProperties.h.

25 {}
virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 27 of file FluidProperties.h.

27 {}
std::string BrineFluidProperties::fluidName ( ) const
overridevirtual

Fluid name.

Returns
"brine"

Implements MultiComponentFluidPropertiesPT.

Definition at line 73 of file BrineFluidProperties.C.

Referenced by PorousFlowFluidStateBrineCO2::PorousFlowFluidStateBrineCO2().

74 {
75  return "brine";
76 }
const SinglePhaseFluidPropertiesPT & BrineFluidProperties::getComponent ( unsigned int  component) const
overridevirtual

Get UserObject for specified component.

Parameters
componentfluid component
Returns
reference to SinglePhaseFluidPropertiesPT UserObject for component

Implements MultiComponentFluidPropertiesPT.

Definition at line 57 of file BrineFluidProperties.C.

Referenced by PorousFlowBrine::PorousFlowBrine().

58 {
59  switch (component)
60  {
61  case WATER:
62  return *_water_fp;
63 
64  case NACL:
65  return *_nacl_fp;
66 
67  default:
68  mooseError("BrineFluidProperties::getComponent has been provided an incorrect component");
69  }
70 }
const SinglePhaseFluidPropertiesPT * _nacl_fp
NaClFluidProperties UserObject.
Real component(const SymmTensor &symm_tensor, unsigned int index)
static const unsigned int NACL
static const unsigned int WATER
Fluid component numbers for water and NaCl.
const SinglePhaseFluidPropertiesPT * _water_fp
Water97FluidProperties UserObject.
Real BrineFluidProperties::h ( Real  pressure,
Real  temperature,
Real  xmass 
) const
overridevirtual

Enthalpy.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
Returns
enthalpy (J/kg)

Implements MultiComponentFluidPropertiesPT.

Definition at line 209 of file BrineFluidProperties.C.

Referenced by e(), h_dpTx(), and PorousFlowBrine::initQpStatefulProperties().

210 {
211  Real q1, q2, q10, q11, q12, q20, q21, q22, q23, q1x1, q2x1, Th;
212 
213  // The correlation requires the pressure in bar, not Pa.
214  Real pbar = pressure * 1.0e-5;
215  Real pbar2 = pbar * pbar;
216 
217  // The correlation requires mole fraction
218  Real Xnacl = massFractionToMoleFraction(xnacl);
219 
220  q11 = -32.1724 + 0.0621255 * pbar;
221  q21 = -1.69513 - 4.52781e-4 * pbar - 6.04279e-8 * pbar2;
222  q22 = 0.0612567 + 1.88082e-5 * pbar;
223 
224  q1x1 = 47.9048 - 9.36994e-3 * pbar + 6.51059e-6 * pbar2;
225  q2x1 = 0.241022 + 3.45087e-5 * pbar - 4.28356e-9 * pbar2;
226 
227  q12 = -q11 - q1x1;
228  q10 = q1x1;
229 
230  q20 = 1.0 - q21 * std::sqrt(q22);
231  q23 = q2x1 - q20 - q21 * std::sqrt(1.0 + q22);
232 
233  q1 = q10 + q11 * (1.0 - Xnacl) + q12 * (1.0 - Xnacl) * (1.0 - Xnacl);
234  q2 = q20 + q21 * std::sqrt(Xnacl + q22) + q23 * Xnacl;
235  // The temperature Th where the brine has the same enthalpy as pure water
236  // Note: correlation uses temperature in Celcius
237  Th = q1 + q2 * (temperature - _T_c2k);
238 
239  // The brine enthalpy is then given by the enthalpy of water at temperature Th
240  // Note: water enthalpy requires temperature in Kelvin
241  return _water_fp->h(pressure, Th + _T_c2k);
242 }
const std::string temperature
Definition: NS.h:25
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
virtual Real h(Real p, Real T) const =0
Specific enthalpy.
const std::string pressure
Definition: NS.h:24
Real massFractionToMoleFraction(Real xnacl) const
Conversion from mass fraction to mole fraction.
const SinglePhaseFluidPropertiesPT * _water_fp
Water97FluidProperties UserObject.
void BrineFluidProperties::h_dpTx ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  h,
Real &  dh_dp,
Real &  dh_dT,
Real &  dh_dx 
) const
overridevirtual

Enthalpy and derivatives wrt pressure, temperature and mass fraction.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
[out]henthalpy (J/kg)
[out]dh_dpderivative of enthalpy wrt pressure
[out]dh_dTderivative of enthalpy wrt temperature
[out]dh_dxderivative of enthalpy wrt mass fraction

Implements MultiComponentFluidPropertiesPT.

Definition at line 245 of file BrineFluidProperties.C.

Referenced by PorousFlowBrine::computeQpProperties().

252 {
253  h = this->h(pressure, temperature, xnacl);
254  // Derivatives are calculated using finite differences due to complexity of correlation
255  Real eps = 1.0e-8;
256  Real peps = pressure * eps;
257  Real Teps = temperature * eps;
258  dh_dp = (this->h(pressure + peps, temperature, xnacl) - h) / peps;
259  dh_dT = (this->h(pressure, temperature + Teps, xnacl) - h) / Teps;
260  dh_dx = (this->h(pressure, temperature, xnacl + eps) - h) / eps;
261 }
const std::string temperature
Definition: NS.h:25
const std::string pressure
Definition: NS.h:24
virtual Real h(Real pressure, Real temperature, Real xnacl) const override
Enthalpy.
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

Parameters
temperaturetemperature (K)
Returns
halite solubility (kg/kg)

Definition at line 365 of file BrineFluidProperties.C.

366 {
367  // This correlation requires temperature in Celcius
368  Real Tc = temperature - _T_c2k;
369 
370  return (26.18 + 7.2e-3 * Tc + 1.06e-4 * Tc * Tc) / 100.0;
371 }
const std::string temperature
Definition: NS.h:25
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
virtual Real e(Real pressure, Real temperature, Real xnacl) const override
Internal energy.
virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 26 of file FluidProperties.h.

26 {}
Real BrineFluidProperties::k_from_rho_T ( Real  density,
Real  temperature,
Real  xmass 
) const
overridevirtual

Thermal conductivity.

Parameters
water_densitywater density (kg/m^3)
temperaturefluid temperature (K)
xmassmass fraction (-)
Returns
thermal conductivity (W/m/K)

Implements MultiComponentFluidPropertiesPT.

Definition at line 329 of file BrineFluidProperties.C.

330 {
331  // Correlation requires molal concentration (mol/kg)
332  Real mol = massFractionToMolalConc(xnacl);
333  // Correlation requires temperature in C
334  Real Tc = temperature - _T_c2k;
335 
336  Real S = 100.0 * _Mnacl * mol / (1.0 + _Mnacl * mol);
337  Real lambdaw = _water_fp->k_from_rho_T(water_density, temperature);
338  Real lambda = 1.0 - (2.3434e-3 - 7.924e-6 * Tc + 3.924e-8 * Tc * Tc) * S +
339  (1.06e-5 - 2.0e-8 * Tc - 1.2e-10 * Tc * Tc) * S * S;
340 
341  return lambda * lambdaw;
342 }
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)
const std::string temperature
Definition: NS.h:25
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
Real _Mnacl
Molar mass of NaCl (kg/mol)
virtual Real e(Real pressure, Real temperature, Real xnacl) const override
Internal energy.
virtual Real k_from_rho_T(Real density, Real temperature) const =0
Thermal conductivity as a function of density and temperature.
const SinglePhaseFluidPropertiesPT * _water_fp
Water97FluidProperties UserObject.
Real BrineFluidProperties::massFractionToMolalConc ( Real  xnacl) const
protected

Conversion from mass fraction to molal concentration (molality)

Parameters
xnaclNaCl mass fraction (kg/kg)
Returns
molal concentration (mol/kg)

Definition at line 374 of file BrineFluidProperties.C.

Referenced by k_from_rho_T(), mu_drhoTx(), mu_from_rho_T(), and vaporPressure().

375 {
376  return xnacl / ((1.0 - xnacl) * _Mnacl);
377 }
Real _Mnacl
Molar mass of NaCl (kg/mol)
Real BrineFluidProperties::massFractionToMoleFraction ( Real  xnacl) const
protected

Conversion from mass fraction to mole fraction.

Parameters
xnaclNaCl mass fraction (kg/kg)
Returns
mole fraction (mol/mol)

Definition at line 380 of file BrineFluidProperties.C.

Referenced by cp(), h(), and rho().

381 {
382  // The average molar mass of brine from the mass fraction
383  Real Mbrine = molarMass(xnacl);
384  // The mole fraction is then
385  return xnacl * Mbrine / _Mnacl;
386 }
Real molarMass(Real xnacl) const
Average molar mass of brine.
Real _Mnacl
Molar mass of NaCl (kg/mol)
Real BrineFluidProperties::molarMass ( Real  xnacl) const

Average molar mass of brine.

Parameters
xnaclNaCl mass fraction (-)
Returns
average molar mass (kg/mol)

Definition at line 79 of file BrineFluidProperties.C.

Referenced by massFractionToMoleFraction(), and rho().

80 {
81  return 1.0 / (xnacl / _Mnacl + (1.0 - xnacl) / _Mh2o);
82 }
Real _Mnacl
Molar mass of NaCl (kg/mol)
Real _Mh2o
Molar mass of water (H2O) (kg/mol)
Real BrineFluidProperties::molarMassH2O ( ) const

H2O molar mass.

Returns
molar mass of H2O (kg/mol)

Definition at line 91 of file BrineFluidProperties.C.

92 {
93  return _Mh2o;
94 }
Real _Mh2o
Molar mass of water (H2O) (kg/mol)
Real BrineFluidProperties::molarMassNaCl ( ) const

NaCl molar mass.

Returns
molar mass of NaCl (kg/mol)

Definition at line 85 of file BrineFluidProperties.C.

86 {
87  return _Mnacl;
88 }
Real _Mnacl
Molar mass of NaCl (kg/mol)
void BrineFluidProperties::mu_drhoTx ( Real  density,
Real  temperature,
Real  xmass,
Real  ddensity_dT,
Real &  mu,
Real &  dmu_drho,
Real &  dmu_dT,
Real &  dmu_dx 
) const
overridevirtual

Dynamic viscosity and its derivatives wrt density, temperature and mass fraction.

Parameters
densityfluid density (kg/m^3)
temperaturefluid temperature (K)
xmassmass fraction (-)
ddensity_dTderivative of density wrt temperature
[out]muviscosity (Pa.s)
[out]dmu_drhoderivative of viscosity wrt density
[out]dmu_dTderivative of viscosity wrt temperature
[out]dmu_dxderivative of viscosity wrt mass fraction

Implements MultiComponentFluidPropertiesPT.

Definition at line 173 of file BrineFluidProperties.C.

Referenced by PorousFlowBrine::computeQpProperties(), and PorousFlowFluidStateBrineCO2::thermophysicalProperties().

181 {
182  // Viscosity of water and derivatives wrt water density and temperature
183  Real muw, dmuw_drhow, dmuw_dT;
185  water_density, temperature, dwater_density_dT, muw, dmuw_drhow, dmuw_dT);
186 
187  // Correlation requires molal concentration (mol/kg)
188  Real mol = massFractionToMolalConc(xnacl);
189  Real dmol_dx = 1.0 / ((1.0 - xnacl) * (1.0 - xnacl) * _Mnacl);
190  Real mol2 = mol * mol;
191  Real mol3 = mol2 * mol;
192 
193  // Correlation requires temperature in C
194  Real Tc = temperature - _T_c2k;
195 
196  Real a = 1.0 + 0.0816 * mol + 0.0122 * mol2 + 0.128e-3 * mol3 +
197  0.629e-3 * Tc * (1.0 - std::exp(-0.7 * mol));
198  Real da_dx =
199  (0.0816 + 0.0244 * mol + 3.84e-4 * mol2 + 4.403e-4 * Tc * std::exp(-0.7 * mol)) * dmol_dx;
200  Real da_dT = 0.629e-3 * (1.0 - std::exp(-0.7 * mol));
201 
202  mu = a * muw;
203  dmu_drho = a * dmuw_drhow;
204  dmu_dx = da_dx * muw;
205  dmu_dT = da_dT * muw + a * dmuw_dT;
206 }
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)
const std::string temperature
Definition: NS.h:25
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
Real _Mnacl
Molar mass of NaCl (kg/mol)
virtual void mu_drhoT_from_rho_T(Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const =0
Dynamic viscosity and its derivatives wrt density and temperature.
const SinglePhaseFluidPropertiesPT * _water_fp
Water97FluidProperties UserObject.
Real BrineFluidProperties::mu_from_rho_T ( Real  water_density,
Real  temperature,
Real  xnacl 
) const
overridevirtual

Implements MultiComponentFluidPropertiesPT.

Definition at line 156 of file BrineFluidProperties.C.

157 {
158  // Correlation requires molal concentration (mol/kg)
159  Real mol = massFractionToMolalConc(xnacl);
160  Real mol2 = mol * mol;
161  Real mol3 = mol2 * mol;
162 
163  // Correlation requires temperature in C
164  Real Tc = temperature - _T_c2k;
165 
166  Real a = 1.0 + 0.0816 * mol + 0.0122 * mol2 + 0.128e-3 * mol3 +
167  0.629e-3 * Tc * (1.0 - std::exp(-0.7 * mol));
168 
169  return a * _water_fp->mu_from_rho_T(water_density, temperature);
170 }
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)
virtual Real mu_from_rho_T(Real density, Real temperature) const =0
const std::string temperature
Definition: NS.h:25
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
const SinglePhaseFluidPropertiesPT * _water_fp
Water97FluidProperties UserObject.
Real BrineFluidProperties::rho ( Real  pressure,
Real  temperature,
Real  xmass 
) const
overridevirtual

Density.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
Returns
density (kg/m^3)

Implements MultiComponentFluidPropertiesPT.

Definition at line 97 of file BrineFluidProperties.C.

Referenced by e(), PorousFlowBrine::initQpStatefulProperties(), rho_dpTx(), and PorousFlowFluidStateBrineCO2::thermophysicalProperties().

98 {
99  Real n1, n2, n11, n12, n1x1, n20, n21, n22, n23, n2x1, Tv;
100  Real water_density;
101 
102  // The correlation requires the pressure in bar, not Pa.
103  Real pbar = pressure * 1.0e-5;
104  Real pbar2 = pbar * pbar;
105  Real pbar3 = pbar2 * pbar;
106 
107  // The correlation requires mole fraction
108  Real Xnacl = massFractionToMoleFraction(xnacl);
109 
110  n11 = -54.2958 - 45.7623 * std::exp(-9.44785e-4 * pbar);
111  n21 = -2.6142 - 2.39092e-4 * pbar;
112  n22 = 0.0356828 + 4.37235e-6 * pbar + 2.0566e-9 * pbar2;
113  n1x1 = 330.47 + 0.942876 * std::sqrt(pbar) + 0.0817193 * pbar - 2.47556e-8 * pbar2 +
114  3.45052e-10 * pbar3;
115  n2x1 = -0.0370751 + 0.00237723 * std::sqrt(pbar) + 5.42049e-5 * pbar + 5.84709e-9 * pbar2 -
116  5.99373e-13 * pbar3;
117  n12 = -n1x1 - n11;
118  n20 = 1.0 - n21 * std::sqrt(n22);
119  n23 = n2x1 - n20 - n21 * std::sqrt(1.0 + n22);
120 
121  // The temperature Tv where the brine has the same molar volume as pure water
122  // Note: correlation uses temperature in Celcius
123  n1 = n1x1 + n11 * (1.0 - Xnacl) + n12 * (1.0 - Xnacl) * (1.0 - Xnacl);
124  n2 = n20 + n21 * std::sqrt(Xnacl + n22) + n23 * Xnacl;
125  Tv = n1 + n2 * (temperature - _T_c2k);
126 
127  // The density of water at temperature Tv
128  // Note: convert Tv to Kelvin to calculate water density
129  water_density = _water_fp->rho(pressure, Tv + _T_c2k);
130 
131  // The brine density is given by the water density scaled by the ratio of
132  // brine molar mass to pure water molar mass
133  return water_density * molarMass(xnacl) / _Mh2o;
134 }
Real molarMass(Real xnacl) const
Average molar mass of brine.
const std::string temperature
Definition: NS.h:25
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
virtual Real e(Real pressure, Real temperature, Real xnacl) const override
Internal energy.
Real _Mh2o
Molar mass of water (H2O) (kg/mol)
virtual Real rho(Real pressure, Real temperature) const =0
Density.
const std::string pressure
Definition: NS.h:24
Real massFractionToMoleFraction(Real xnacl) const
Conversion from mass fraction to mole fraction.
const SinglePhaseFluidPropertiesPT * _water_fp
Water97FluidProperties UserObject.
void BrineFluidProperties::rho_dpTx ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  drho_dx 
) const
overridevirtual

Density and its derivatives wrt pressure, temperature and mass fraction.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density wrt pressure
[out]drho_dTderivative of density wrt temperature
[out]drho_dxderivative of density wrt mass fraction

Implements MultiComponentFluidPropertiesPT.

Definition at line 137 of file BrineFluidProperties.C.

Referenced by PorousFlowBrine::computeQpProperties(), and PorousFlowFluidStateBrineCO2::thermophysicalProperties().

144 {
145  rho = this->rho(pressure, temperature, xnacl);
146  // Derivatives are calculated using finite differences due to complexity of correlation
147  Real eps = 1.0e-8;
148  Real peps = pressure * eps;
149  Real Teps = temperature * eps;
150  drho_dp = (this->rho(pressure + peps, temperature, xnacl) - rho) / peps;
151  drho_dT = (this->rho(pressure, temperature + Teps, xnacl) - rho) / Teps;
152  drho_dx = (this->rho(pressure, temperature, xnacl + eps) - rho) / eps;
153 }
const std::string temperature
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature, Real xnacl) const override
Density.
const std::string pressure
Definition: NS.h:24
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).

Parameters
temperaturebrine temperature (K)
xnaclsalt mass fraction (-)
Returns
brine vapour pressure (Pa)

Definition at line 345 of file BrineFluidProperties.C.

346 {
347  // Correlation requires molal concentration (mol/kg)
348  Real mol = massFractionToMolalConc(xnacl);
349  Real mol2 = mol * mol;
350  Real mol3 = mol2 * mol;
351 
352  Real a = 1.0 + 5.93582e-6 * mol - 5.19386e-5 * mol2 + 1.23156e-5 * mol3;
353  Real b = 1.1542e-6 * mol + 1.41254e-7 * mol2 - 1.92476e-8 * mol3 - 1.70717e-9 * mol * mol3 +
354  1.0539e-10 * mol2 * mol3;
355 
356  // The temperature of pure water at the same pressure as the brine is given by
357  Real th20 = std::exp(std::log(temperature) / (a + b * temperature));
358 
359  // The brine vapour pressure is then found by evaluating the saturation pressure for pure water
360  // using this effective temperature. Note: requires _water97_fp UserObject
361  return _water97_fp->vaporPressure(th20);
362 }
Real massFractionToMolalConc(Real xnacl) const
Conversion from mass fraction to molal concentration (molality)
const Water97FluidProperties * _water97_fp
Water97FluidProperties UserObject.
const std::string temperature
Definition: NS.h:25
Real vaporPressure(Real temperature) const
Saturation pressure as a function of temperature.

Member Data Documentation

Real BrineFluidProperties::_Mh2o
protected

Molar mass of water (H2O) (kg/mol)

Definition at line 169 of file BrineFluidProperties.h.

Referenced by BrineFluidProperties(), molarMass(), molarMassH2O(), and rho().

Real BrineFluidProperties::_Mnacl
protected
const SinglePhaseFluidPropertiesPT* BrineFluidProperties::_nacl_fp
protected

NaClFluidProperties UserObject.

Definition at line 164 of file BrineFluidProperties.h.

Referenced by BrineFluidProperties(), and getComponent().

const Real MultiComponentFluidPropertiesPT::_T_c2k
protectedinherited

Conversion of temperature from Celcius to Kelvin.

Definition at line 172 of file MultiComponentFluidPropertiesPT.h.

Referenced by cp(), h(), haliteSolubility(), k_from_rho_T(), mu_drhoTx(), mu_from_rho_T(), and rho().

const Water97FluidProperties* BrineFluidProperties::_water97_fp
protected

Water97FluidProperties UserObject.

Definition at line 160 of file BrineFluidProperties.h.

Referenced by BrineFluidProperties(), and vaporPressure().

const SinglePhaseFluidPropertiesPT* BrineFluidProperties::_water_fp
protected
const unsigned int BrineFluidProperties::NACL = 1
static

Definition at line 140 of file BrineFluidProperties.h.

Referenced by getComponent().

const unsigned int BrineFluidProperties::WATER = 0
static

Fluid component numbers for water and NaCl.

Definition at line 139 of file BrineFluidProperties.h.

Referenced by getComponent(), and PorousFlowBrine::PorousFlowBrine().


The documentation for this class was generated from the following files: