22 params.
addRequiredParam<UserObjectName>(
"brine_fp",
"The name of the user object for brine");
23 params.
addRequiredParam<UserObjectName>(
"co2_fp",
"The name of the user object for CO2");
24 params.
addParam<
unsigned int>(
"salt_component", 2,
"The component number of salt");
31 _salt_component(getParam<unsigned
int>(
"salt_component")),
34 _Mh2o(_brine_fp.molarMassH2O()),
35 _invMh2o(1.0 / _Mh2o),
36 _Mco2(_co2_fp.molarMass()),
37 _Mnacl(_brine_fp.molarMassNaCl()),
42 _co2_henry(_co2_fp.henryCoefficients())
46 paramError(
"co2_fp",
"A valid CO2 FluidProperties UserObject must be provided");
49 paramError(
"brine_fp",
"A valid Brine FluidProperties UserObject must be provided");
60 "This value is larger than the possible number of phases ",
66 "This value is larger than the possible number of fluid components",
73 "The value provided must be different from the value entered in liquid_fluid_component");
78 "The value provided is larger than the possible number of fluid components",
96 std::vector<FluidStateProperties> & fsp)
const 117 std::vector<FluidStateProperties> & fsp)
const 176 std::vector<FluidStateProperties> & fsp)
const 198 phaseState(
Z.value(), Xco2.value(), Yco2.value(), phase_state);
244 std::vector<FluidStateProperties> & fsp)
const 250 ADReal co2_density, co2_viscosity;
260 mooseAssert(gas.
density.value() > 0.0,
"Gas density must be greater than zero");
268 std::vector<FluidStateProperties> & fsp)
const 281 const ADReal liquid_density = 1.0 / (Xco2 / co2_partial_density + (1.0 - Xco2) / brine_density);
295 const ADReal liquid_enthalpy = (1.0 - Xco2) * brine_enthalpy + Xco2 * (co2_enthalpy + hdis);
298 liquid.
density = liquid_density;
302 mooseAssert(liquid.
density.value() > 0.0,
"Liquid density must be greater than zero");
311 std::vector<FluidStateProperties> & fsp)
const 334 const ADReal liquid_density = 1.0 / (Xco2 / co2_partial_density + (1.0 - Xco2) / brine_density);
339 const ADReal K0 = Yco2 / Xco2;
340 const ADReal K1 = (1.0 - Yco2) / (1.0 - Xco2);
345 (gas_density + vapor_mass_fraction * (liquid_density - gas_density));
356 std::vector<FluidStateProperties> & fsp)
const 390 const ADReal mco2 = xco2 * (2.0 * mnacl +
_invMh2o) / (1.0 - xco2);
393 Xco2 = mco2 *
_Mco2 / denominator;
399 const ADReal & co2_density,
405 ": fugacityCoefficientsLowTemp() is not valid for T > 373.15K. Use " 406 "fugacityCoefficientsHighTemp() instead");
416 const Real bCO2 = 27.8;
417 const Real aCO2H2O = 7.89e7;
418 const Real bH2O = 18.18;
425 return std::log(V / (V - bCO2)) +
b / (V - bCO2) -
426 2.0 *
a / (
_Rbar * t15 * bCO2) * std::log((V + bCO2) / V) +
427 aCO2 *
b / (
_Rbar * t15 * bCO2 * bCO2) * (std::log((V + bCO2) / V) - bCO2 / (V + bCO2));
433 fh2o = std::exp(lnPhiH2O);
434 fco2 = std::exp(lnPhiCO2);
440 const ADReal & co2_density,
448 ": fugacityCoefficientsHighTemp() is not valid for T <= 373.15K. Use " 449 "fugacityCoefficientsLowTemp() instead");
458 const ADReal & co2_density,
460 const ADReal & yh2o)
const 468 const ADReal yco2 = 1.0 - yh2o;
469 const ADReal xh2o = 1.0 - xco2;
473 const Real bCO2 = 28.25;
474 const Real bH2O = 15.7;
477 const ADReal kH2OCO2 = KH2OCO2 * yh2o + KCO2H2O * yco2;
478 const ADReal kCO2H2O = KCO2H2O * yh2o + KH2OCO2 * yco2;
480 const ADReal aH2OCO2 = std::sqrt(aCO2 * aH2O) * (1.0 - kH2OCO2);
481 const ADReal aCO2H2O = std::sqrt(aCO2 * aH2O) * (1.0 - kCO2H2O);
483 const ADReal amix = yh2o * yh2o * aH2O + yh2o * yco2 * (aH2OCO2 + aCO2H2O) + yco2 * yco2 * aCO2;
484 const ADReal bmix = yh2o * bH2O + yco2 * bCO2;
490 ADReal term3 = (2.0 * yh2o * aH2O + yco2 * (aH2OCO2 + aCO2H2O) -
491 yh2o * yco2 * std::sqrt(aH2O * aCO2) * (kH2OCO2 - kCO2H2O) * (yh2o - yco2) +
492 xh2o * xco2 * std::sqrt(aH2O * aCO2) * (kH2OCO2 - kCO2H2O)) /
494 term3 -= bH2O / bmix;
495 term3 *= amix / (bmix *
_Rbar * t15) * std::log(V / (V + bmix));
498 return std::exp(lnPhiH2O);
504 const ADReal & co2_density,
506 const ADReal & yh2o)
const 514 const ADReal yco2 = 1.0 - yh2o;
515 const ADReal xh2o = 1.0 - xco2;
519 const Real bCO2 = 28.25;
520 const Real bH2O = 15.7;
523 const ADReal kH2OCO2 = KH2OCO2 * yh2o + KCO2H2O * yco2;
524 const ADReal kCO2H2O = KCO2H2O * yh2o + KH2OCO2 * yco2;
526 const ADReal aH2OCO2 = std::sqrt(aCO2 * aH2O) * (1.0 - kH2OCO2);
527 const ADReal aCO2H2O = std::sqrt(aCO2 * aH2O) * (1.0 - kCO2H2O);
529 const ADReal amix = yh2o * yh2o * aH2O + yh2o * yco2 * (aH2OCO2 + aCO2H2O) + yco2 * yco2 * aCO2;
530 const ADReal bmix = yh2o * bH2O + yco2 * bCO2;
537 ADReal term3 = (2.0 * yco2 * aCO2 + yh2o * (aH2OCO2 + aCO2H2O) -
538 yh2o * yco2 * std::sqrt(aH2O * aCO2) * (kH2OCO2 - kCO2H2O) * (yh2o - yco2) +
539 xh2o * xco2 * std::sqrt(aH2O * aCO2) * (kCO2H2O - kH2OCO2)) /
542 lnPhiCO2 += (term3 - bCO2 / bmix) * amix / (bmix *
_Rbar * t15) * std::log(V / (V + bmix));
544 return std::exp(lnPhiCO2);
555 const ADReal xh2o = 1.0 - xco2;
556 const ADReal Am = -3.084e-2 * Tref + 1.927e-5 * Tref * Tref;
558 return std::exp((Am - 2.0 * Am * xh2o) * xco2 * xco2);
570 const ADReal xh2o = 1.0 - xco2;
571 const ADReal Am = -3.084e-2 * Tref + 1.927e-5 * Tref * Tref;
573 return std::exp(2.0 * Am * xco2 * xh2o * xh2o);
580 const ADReal & Xnacl)
const 596 return std::exp(2.0 * lambda * mnacl + xi * mnacl * mnacl);
601 const ADReal & Xnacl)
const 612 return (1.0 - mnacl /
_invMh2o) * std::exp(2.0 * lambda * mnacl + xi * mnacl * mnacl);
620 const ADReal Tc2 = Tc * Tc;
621 const ADReal Tc3 = Tc2 * Tc;
622 const ADReal Tc4 = Tc3 * Tc;
627 logK0H2O = -2.209 + 3.097e-2 * Tc - 1.098e-4 * Tc2 + 2.048e-7 * Tc3;
629 else if (Tc > 99.0 && Tc < 109.0)
631 const ADReal Tint = (Tc - 99.0) / 10.0;
632 const ADReal Tint2 = Tint * Tint;
633 logK0H2O = -0.0204026 + 0.0152513 * Tint + 0.417565 * Tint2 - 0.278636 * Tint * Tint2;
637 logK0H2O = -2.1077 + 2.8127e-2 * Tc - 8.4298e-5 * Tc2 + 1.4969e-7 * Tc3 - 1.1812e-10 * Tc4;
647 const ADReal Tc2 = Tc * Tc;
648 const ADReal Tc3 = Tc2 * Tc;
653 logK0CO2 = 1.189 + 1.304e-2 * Tc - 5.446e-5 * Tc2;
655 else if (Tc > 99.0 && Tc < 109.0)
657 const ADReal Tint = (Tc - 99.0) / 10.0;
658 const ADReal Tint2 = Tint * Tint;
659 logK0CO2 = 1.9462 + 2.25692e-2 * Tint - 9.49577e-3 * Tint2 - 6.77721e-3 * Tint * Tint2;
663 logK0CO2 = 1.668 + 3.992e-3 * Tc - 1.156e-5 * Tc2 + 1.593e-9 * Tc3;
688 ADReal xco2_lower, yh2o_lower;
691 const Real dxco2_dT_lower = xco2_lower.derivatives()[
_Tidx];
692 const Real dyh2o_dT_lower = yh2o_lower.derivatives()[
_Tidx];
695 Real xco2_upper, yh2o_upper;
699 pressure.value(),
_Tupper, Xnacl.value(), co2_density_upper, xco2_upper, yh2o_upper);
701 Real A, dA_dp, dA_dT,
B, dB_dp, dB_dT, dB_dX;
716 const Real dyh2o_dT_upper =
717 ((1.0 -
B) * dA_dT + (
A - 1.0) *
A * dB_dT) / (1.0 -
A *
B) / (1.0 -
A *
B);
718 const Real dxco2_dT_upper = dB_dT * (1.0 - yh2o_upper) -
B * dyh2o_dT_upper;
721 Real xco2r, yh2or, dxco2_dT, dyh2o_dT;
723 Tint, xco2_lower.value(), dxco2_dT_lower, xco2_upper, dxco2_dT_upper, xco2r, dxco2_dT);
725 Tint, yh2o_lower.value(), dyh2o_dT_lower, yh2o_upper, dyh2o_dT_upper, yh2or, dyh2o_dT);
748 Real A, dA_dp, dA_dT,
B, dB_dp, dB_dT, dB_dX;
763 const Real dyh2o_dp =
764 ((1.0 -
B) * dA_dp + (
A - 1.0) *
A * dB_dp) / (1.0 -
A *
B) / (1.0 -
A *
B);
765 const Real dxco2_dp = dB_dp * (1.0 - yh2or) -
B * dyh2o_dp;
767 const Real dyh2o_dT =
768 ((1.0 -
B) * dA_dT + (
A - 1.0) *
A * dB_dT) / (1.0 -
A *
B) / (1.0 -
A *
B);
769 const Real dxco2_dT = dB_dT * (1.0 - yh2or) -
B * dyh2o_dT;
771 const Real dyh2o_dX = ((
A - 1.0) *
A * dB_dX) / (1.0 -
A *
B) / (1.0 -
A *
B);
772 const Real dxco2_dX = dB_dX * (1.0 - yh2or) -
B * dyh2o_dX;
795 ": equilibriumMoleFractionsLowTemp() is not valid for T > 373.15K. Use " 796 "equilibriumMoleFractions() instead");
809 const ADReal yh2ow = (1.0 -
B) / (1.0 /
A -
B);
810 const ADReal xco2w =
B * (1.0 - yh2ow);
816 const ADReal mco2 = mco2w / gamma;
823 xco2 = mco2 / total_moles;
824 yh2o =
A * (1.0 - xco2 - 2.0 * mnacl / total_moles);
830 const ADReal & co2_density,
836 ": funcABLowTemp() is not valid for T > 373.15K. Use funcABHighTemp() instead");
842 const Real pref = 1.0;
843 const Real vCO2 = 32.6;
844 const Real vH2O = 18.1;
846 const ADReal delta_pbar = pbar - pref;
857 A = K0H2O / (phiH2O * pbar) * std::exp(delta_pbar * vH2O / Rt);
858 B = phiCO2 * pbar / (
_invMh2o * K0CO2) * std::exp(-delta_pbar * vCO2 / Rt);
873 ": funcABHighTemp() is not valid for T <= 373.15K. Use funcABLowTemp() instead");
881 const Real pref = -1.9906e-1 + 2.0471e-3 * Tc + 1.0152e-4 * Tc * Tc - 1.4234e-6 * Tc * Tc * Tc +
882 1.4168e-8 * Tc * Tc * Tc * Tc;
883 const Real vCO2 = 32.6 + 3.413e-2 * (Tc - 100.0);
884 const Real vH2O = 18.1 + 3.137e-2 * (Tc - 100.0);
886 const Real delta_pbar = pbar - pref;
898 const ADReal rhoco2 = co2_density;
914 A = K0H2O * gammaH2O / (phiH2O.value() * pbar) * std::exp(delta_pbar * vH2O / Rt);
915 B = phiCO2.value() * pbar / (
_invMh2o * K0CO2 * gamma * gammaCO2) *
916 std::exp(-delta_pbar * vCO2 / Rt);
937 const Real dp = 1.0e-2;
938 const Real dT = 1.0e-6;
939 const Real dX = 1.0e-8;
943 dA_dp = (
A2 -
A) / dp;
944 dB_dp = (B2 -
B) / dp;
947 dA_dT = (
A2 -
A) / dT;
948 dB_dT = (B2 -
B) / dT;
951 dB_dX = (B2 -
B) / dX;
956 Real
pressure, Real
temperature, Real Xnacl, Real co2_density, Real & xco2, Real & yh2o)
const 963 const Real mnacl = Xnacl / (1.0 - Xnacl) /
_Mnacl;
982 const Real denominator = (1.0 /
A -
B) * (2.0 * mnacl +
_invMh2o) + 2.0 * mnacl *
B;
983 return 1.0 +
_invMh2o * dB / denominator +
985 (2.0 * mnacl * dB - (2.0 * mnacl +
_invMh2o) * (dB + dA /
A /
A)) / denominator /
991 const Real dy = 1.0e-8;
994 unsigned int iter = 0;
996 const unsigned int max_its = 10;
999 while (std::abs(fy(
y,
A,
B)) >
tol)
1007 y =
y - fy(
y,
A,
B) / dfy(
A,
B, dA, dB);
1027 const ADReal V = 37.51 - 9.585e-2 * Tc + 8.74e-4 * Tc * Tc - 5.044e-7 * Tc * Tc * Tc;
1029 return 1.0e6 *
_Mco2 / V;
1054 const ADReal Yco2 = 1.0 - Yh2o;
1082 const std::vector<Real>
b{1.19784e-1, -7.17823e-4, 4.93854e-6, -1.03826e-8, 1.08233e-11};
1088 for (
unsigned int i = 0; i <
b.size(); ++i)
1095 return Kh_h2o *
std::pow(10.0, xmol * kb);
1112 const Real dhdis_dT =
1115 const Real dX = Xnacl.value() * 1.0e-8;
1116 const ADReal X2 = Xnacl + dX;
1119 const Real dhdis_dX =
1123 hdis.derivatives() =
temperature.derivatives() * dhdis_dT + Xnacl.derivatives() * dhdis_dX;
1135 return delta_h * 1000.0 /
_Mco2;
1140 Real
temperature, Real f0, Real df0, Real f1, Real df1, Real & value, Real & deriv)
const 1146 const Real b = df0 * dT;
1147 const Real c = 3.0 * (f1 - f0) - (2.0 * df0 + df1) * dT;
1148 const Real d = 2.0 * (f0 - f1) + (df0 + df1) * dT;
1162 if (temperature < 285.15 || temperature > 573.15)
1164 " is outside range 285.15 K <= T <= 573.15 K");
1168 " must be less than 60 MPa");
void liquidProperties(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, std::vector< FluidStateProperties > &fsp) const
Thermophysical properties of the liquid state.
const unsigned int _aqueous_fluid_component
Fluid component number of the aqueous component.
const Real _Tlower
Temperature below which the Spycher, Pruess & Ennis-King (2003) model is used (K) ...
const unsigned int _aqueous_phase_number
Phase number of the aqueous phase.
unsigned int _num_phases
Number of phases.
const unsigned int _salt_component
Salt component index.
const Real _Mh2o
Molar mass of water (kg/mol)
ADReal activityCoefficient(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl) const
Activity coefficient for CO2 in brine.
const Real _T_c2k
Conversion from C to K.
FPADReal h_from_p_T_X(const FPADReal &pressure, const FPADReal &temperature, const FPADReal &xnacl) const
static InputParameters validParams()
virtual Real rho_from_p_T_X(Real pressure, Real temperature, Real xnacl) const override
ADReal activityCoefficientHighTemp(const ADReal &temperature, const ADReal &Xnacl) const
Activity coefficient for CO2 in brine used in the elevated temperature formulation.
const Real _Mnacl
Molar mass of NaCL.
ADReal equilibriumConstantH2O(const ADReal &temperature) const
Equilibrium constant for H2O For temperatures 12C <= T <= 99C, uses Spycher, Pruess and Ennis-King (2...
const Real _invMh2o
Inverse of molar mass of H2O (mol/kg)
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).
unsigned int _gas_fluid_component
Fluid component number of the gas phase.
virtual std::string fluidName() const override
Fluid name.
const std::vector< Real > _co2_henry
Henry's coefficeients for CO2.
const unsigned int _Tidx
Index of derivative wrt temperature.
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 funcABLowTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &co2_density, ADReal &A, ADReal &B) const
unsigned int _gas_phase_number
Phase number of the gas phase.
void clearFluidStateProperties(std::vector< FluidStateProperties > &fsp) const
Clears the contents of the FluidStateProperties data structure.
unsigned int _num_components
Number of components.
ADReal fugacityCoefficientH2OHighTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &co2_density, const ADReal &xco2, const ADReal &yh2o) const
const Real _Mco2
Molar mass of CO2 (kg/mol)
Compositional flash routines for miscible multiphase flow classes with multiple fluid components...
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...
const std::vector< double > y
static const std::string temperature
virtual Real mu_from_p_T_X(Real pressure, Real temperature, Real xnacl) const override
Brine (NaCl in H2O) fluid properties as a function of pressure (Pa), temperature (K) and NaCl mass fr...
DualNumber< Real, DNDerivativeType, true > ADReal
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) ...
virtual const std::string & name() const
const BrineFluidProperties & _brine_fp
Fluid properties UserObject for water.
Real vaporPressure(Real temperature, Real xnacl) const
Brine vapour pressure From Haas, Physical properties of the coexisting phases and thermochemical prop...
static InputParameters validParams()
virtual std::string fluidStateName() const override
Name of FluidState.
const SinglePhaseFluidProperties & _co2_fp
Fluid properties UserObject for the CO2.
const unsigned int _pidx
Index of derivative wrt pressure.
ADReal partialDensityCO2(const ADReal &temperature) const
Partial density of dissolved CO2 From Garcia, Density of aqueous solutions of CO2, LBNL-49023 (2001)
void funcABHighTemp(Real pressure, Real temperature, Real Xnacl, Real co2_density, Real xco2, Real yh2o, Real &A, Real &B) const
The function A (Eq.
virtual Real capillaryPressure(Real saturation, unsigned qp=0) const
Capillary pressure is calculated as a function of true saturation.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real deriv(unsigned n, unsigned alpha, unsigned beta, Real x)
const std::vector< double > x
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.
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 enthalpyOfDissolution(const ADReal &temperature) const
Enthalpy of dissolution of CO2 in brine calculated using linear fit to model of Duan and Sun...
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 Real _R
Universal gas constant (J/mol/K)
ADReal activityCoefficientH2O(const ADReal &temperature, const ADReal &xco2) const
Activity coefficient of H2O Eq.
AD data structure to pass calculated thermophysical properties.
Common class for single phase fluid properties.
FluidStatePhaseEnum
Phase state enum.
registerMooseObject("PorousFlowApp", PorousFlowBrineCO2)
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.
void paramError(const std::string ¶m, Args... args) const
ADReal activityCoefficientCO2(const ADReal &temperature, const ADReal &xco2) const
Activity coefficient of CO2 Eq.
ADReal fugacityCoefficientCO2HighTemp(const ADReal &pressure, const ADReal &temperature, const ADReal &co2_density, const ADReal &xco2, const ADReal &yh2o) const
std::string stringify(const T &t)
virtual void rho_mu_from_p_T(Real p, Real T, Real &rho, Real &mu) const
Combined methods.
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.
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.
static const std::string Z
const Real _Rbar
Molar gas constant in bar cm^3 /(K mol)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const PorousFlowCapillaryPressure & _pc
Capillary pressure UserObject.
void phaseState(Real Zi, Real Xi, Real Yi, FluidStatePhaseEnum &phase_state) const
Determines the phase state gven the total mass fraction and equilibrium mass fractions.
Real vaporMassFraction(Real Z0, Real K0, Real K1) const
Solves Rachford-Rice equation to provide vapor mass fraction.
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 gasProperties(const ADReal &pressure, const ADReal &temperature, std::vector< FluidStateProperties > &fsp) const
Thermophysical properties of the gaseous state.
Specialized class for brine and CO2 including calculation of mutual solubility of the two fluids usin...
static const std::string pressure
const unsigned int _Zidx
Index of derivative wrt total mass fraction Z.
void mooseError(Args &&... args) const
e e e e s T T T T T rho v v T e p T T virtual T std::string fluidName() const
Fluid name.
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
const unsigned int _Xidx
Index of derivative wrt salt mass fraction X.
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...
FluidStateProperties _empty_fsp
Empty FluidStateProperties object.
Real henryConstant(Real temperature, const std::vector< Real > &coeffs) const
IAPWS formulation of Henry's law constant for dissolution in water (implemented in water FluidPropert...
virtual void checkVariables(Real pressure, Real temperature) const
Check the input variables.
const Real _Zmin
Minimum Z - below this value all CO2 will be dissolved.
MooseUnits pow(const MooseUnits &, int)
PorousFlowBrineCO2(const InputParameters ¶meters)
ADReal henryConstant(const ADReal &temperature, const ADReal &Xnacl) const
Henry's constant of dissolution of gas phase CO2 in brine.
ADReal equilibriumConstantCO2(const ADReal &temperature) const
Equilibrium constant for CO2 For temperatures 12C <= T <= 99C, uses Spycher, Pruess and Ennis-King (2...
void ErrorVector unsigned int
std::vector< ADReal > mass_fraction
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.
const Real _Tupper
Temperature above which the Spycher & Pruess (2010) model is used (K)