61 std::vector<FluidStateProperties> & fsp)
const override;
64 const ADReal & temperature,
68 std::vector<FluidStateProperties> & fsp)
const override;
85 const ADReal & temperature,
100 const ADReal & temperature,
117 const ADReal & temperature,
121 std::vector<FluidStateProperties> & fsp)
const;
131 const ADReal & temperature,
132 std::vector<FluidStateProperties> & fsp)
const;
143 const ADReal & temperature,
145 std::vector<FluidStateProperties> & fsp)
const;
158 const ADReal & temperature,
161 std::vector<FluidStateProperties> & fsp)
const;
174 const ADReal & temperature,
178 std::vector<FluidStateProperties> & fsp)
const;
191 const ADReal & temperature,
192 const ADReal & co2_density,
210 const ADReal & temperature,
211 const ADReal & co2_density,
218 const ADReal & temperature,
219 const ADReal & co2_density,
221 const ADReal & yh2o)
const;
224 const ADReal & temperature,
225 const ADReal & co2_density,
227 const ADReal & yh2o)
const;
265 const ADReal & temperature,
266 const ADReal & Xnacl)
const;
315 Real pressure, Real temperature, Real Xnacl, Real
saturation,
unsigned int qp)
const override;
374 const ADReal & temperature,
398 virtual void checkVariables(Real pressure, Real temperature)
const;
413 Real temperature, Real f0, Real df0, Real f1, Real df1, Real & value, Real & deriv)
const;
453 const ADReal & temperature,
454 const ADReal & co2_density,
DualNumber< Real, DNDerivativeType, true > ADReal
FluidStatePhaseEnum
Phase state enum.
Brine (NaCl in H2O) fluid properties as a function of pressure (Pa), temperature (K) and NaCl mass fr...
const InputParameters & parameters() const
Specialized class for brine and CO2 including calculation of mutual solubility of the two fluids usin...
void liquidProperties(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, std::vector< FluidStateProperties > &fsp) const
Thermophysical properties of the liquid state.
void funcABLowTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &co2_density, ADReal &A, ADReal &B) const
ADReal saturation(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, const ADReal &Z, std::vector< FluidStateProperties > &fsp) const
Gas saturation in the two-phase region.
ADReal fugacityCoefficientCO2HighTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &co2_density, const ADReal &xco2, const ADReal &yh2o) const
ADReal henryConstant(const ADReal &temperature, const ADReal &Xnacl) const
Henry's constant of dissolution of gas phase CO2 in brine.
const Real _Tlower
Temperature below which the Spycher, Pruess & Ennis-King (2003) model is used (K)
void gasProperties(const ADReal &pressure, const ADReal &temperature, std::vector< FluidStateProperties > &fsp) const
Thermophysical properties of the gaseous state.
const Real _Tupper
Temperature above which the Spycher & Pruess (2010) model is used (K)
const Real _invMh2o
Inverse of molar mass of H2O (mol/kg)
ADReal enthalpyOfDissolutionGas(const ADReal &temperature, const ADReal &Xnacl) const
Enthalpy of dissolution of gas phase CO2 in brine calculated using Henry's constant From Himmelblau,...
virtual void checkVariables(Real pressure, Real temperature) const
Check the input variables.
ADReal fugacityCoefficientH2OHighTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &co2_density, const ADReal &xco2, const ADReal &yh2o) const
ADReal partialDensityCO2(const ADReal &temperature) const
Partial density of dissolved CO2 From Garcia, Density of aqueous solutions of CO2,...
const Real _Rbar
Molar gas constant in bar cm^3 /(K mol)
void fugacityCoefficientsHighTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &co2_density, const ADReal &xco2, const ADReal &yh2o, ADReal &fco2, ADReal &fh2o) const
Fugacity coefficients for H2O and CO2 at elevated temperatures (100C < T <= 300C).
ADReal activityCoefficientHighTemp(const ADReal &temperature, const ADReal &Xnacl) const
Activity coefficient for CO2 in brine used in the elevated temperature formulation.
void solveEquilibriumMoleFractionHighTemp(Real pressure, Real temperature, Real Xnacl, Real co2_density, Real &xco2, Real &yh2o) const
Function to solve for yh2o and xco2 iteratively in the elevated temperature regime (T > 100C)
const Real _Mco2
Molar mass of CO2 (kg/mol)
void massFractions(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, const ADReal &Z, FluidStatePhaseEnum &phase_state, std::vector< FluidStateProperties > &fsp) const
Mass fractions of CO2 and H2O in both phases, as well as derivatives wrt PorousFlow variables.
void smoothCubicInterpolation(Real temperature, Real f0, Real df0, Real f1, Real df1, Real &value, Real &deriv) const
Cubic function to smoothly interpolate between the low temperature and elevated temperature models fo...
void funcABHighTemp(Real pressure, Real temperature, Real Xnacl, Real co2_density, Real xco2, Real yh2o, Real &A, Real &B) const
The function A (Eq.
const Real _Zmin
Minimum Z - below this value all CO2 will be dissolved.
const std::vector< Real > _co2_henry
Henry's coefficeients for CO2.
virtual std::string fluidStateName() const override
Name of FluidState.
void equilibriumMoleFractionsLowTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, ADReal &xco2, ADReal &yh2o) const
Mole fractions of CO2 in brine and water vapor in CO2 at equilibrium in the low temperature regime (T...
const BrineFluidProperties & _brine_fp
Fluid properties UserObject for water.
unsigned int saltComponentIndex() const
The index of the salt component.
void equilibriumMoleFractions(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, ADReal &xco2, ADReal &yh2o) const
Mole fractions of CO2 in brine and water vapor in CO2 at equilibrium.
virtual Real totalMassFraction(Real pressure, Real temperature, Real Xnacl, Real saturation, unsigned int qp) const override
Total mass fraction of fluid component summed over all phases in the two-phase state for a specified ...
void equilibriumMassFractions(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, ADReal &Xco2, ADReal &Yh2o) const
Mass fractions of CO2 in brine and water vapor in CO2 at equilibrium.
ADReal equilibriumConstantCO2(const ADReal &temperature) const
Equilibrium constant for CO2 For temperatures 12C <= T <= 99C, uses Spycher, Pruess and Ennis-King (2...
void twoPhaseProperties(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, const ADReal &Z, unsigned int qp, std::vector< FluidStateProperties > &fsp) const
Gas and liquid properties in the two-phase region.
ADReal activityCoefficient(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl) const
Activity coefficient for CO2 in brine.
const Real _Mh2o
Molar mass of water (kg/mol)
static InputParameters validParams()
const unsigned int _salt_component
Salt component index.
ADReal activityCoefficientCO2(const ADReal &temperature, const ADReal &xco2) const
Activity coefficient of CO2 Eq.
void fugacityCoefficientsLowTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &co2_density, ADReal &fco2, ADReal &fh2o) const
Fugacity coefficients for H2O and CO2 for T <= 100C Eq.
const SinglePhaseFluidProperties & _co2_fp
Fluid properties UserObject for the CO2.
ADReal enthalpyOfDissolution(const ADReal &temperature) const
Enthalpy of dissolution of CO2 in brine calculated using linear fit to model of Duan and Sun,...
ADReal activityCoefficientH2O(const ADReal &temperature, const ADReal &xco2) const
Activity coefficient of H2O Eq.
void thermophysicalProperties(Real pressure, Real temperature, Real Xnacl, Real Z, unsigned int qp, std::vector< FluidStateProperties > &fsp) const override
Determines the complete thermophysical state of the system for a given set of primary variables.
ADReal equilibriumConstantH2O(const ADReal &temperature) const
Equilibrium constant for H2O For temperatures 12C <= T <= 99C, uses Spycher, Pruess and Ennis-King (2...
const Real _Mnacl
Molar mass of NaCL.
Compositional flash routines for miscible multiphase flow classes with multiple fluid components.
Common class for single phase fluid properties.
Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revi...