www.mooseframework.org
PorousFlowWaterNCG.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 
16 class PorousFlowWaterNCG;
17 
18 template <>
19 InputParameters validParams<PorousFlowWaterNCG>();
20 
34 {
35 public:
36  PorousFlowWaterNCG(const InputParameters & parameters);
37 
38  virtual std::string fluidStateName() const override;
39 
41  Real temperature,
42  Real Xnacl,
43  Real Z,
44  unsigned int qp,
45  std::vector<FluidStateProperties> & fsp) const override;
56  void equilibriumMassFractions(const DualReal & pressure,
57  const DualReal & temperature,
58  DualReal & Xncg,
59  DualReal & Yh2o) const;
60 
71  void massFractions(const DualReal & pressure,
72  const DualReal & temperature,
73  const DualReal & Z,
74  FluidStatePhaseEnum & phase_state,
75  std::vector<FluidStateProperties> & fsp) const;
76 
84  void gasProperties(const DualReal & pressure,
85  const DualReal & temperature,
86  std::vector<FluidStateProperties> & fsp) const;
100  void liquidProperties(const DualReal & pressure,
101  const DualReal & temperature,
102  std::vector<FluidStateProperties> & fsp) const;
103 
116  DualReal liquidDensity(const DualReal & pressure, const DualReal & temperature) const;
117 
125  DualReal gasDensity(const DualReal & pressure,
126  const DualReal & temperature,
127  std::vector<FluidStateProperties> & fsp) const;
128 
138  DualReal saturation(const DualReal & pressure,
139  const DualReal & temperature,
140  const DualReal & Z,
141  std::vector<FluidStateProperties> & fsp) const;
142 
152  void twoPhaseProperties(const DualReal & pressure,
153  const DualReal & temperature,
154  const DualReal & Z,
155  unsigned int qp,
156  std::vector<FluidStateProperties> & fsp) const;
157 
166  DualReal enthalpyOfDissolution(const DualReal & temperature) const;
167 
168  virtual Real totalMassFraction(
169  Real pressure, Real temperature, Real Xnacl, Real saturation, unsigned int qp) const override;
170 
171 protected:
177  DualReal moleFractionToMassFraction(const DualReal & xmol) const;
178 
183  void checkVariables(Real temperature) const;
184 
192  const Real _Mh2o;
194  const Real _Mncg;
200  const std::vector<Real> _ncg_henry;
201 };
PorousFlowWaterNCG::liquidDensity
DualReal liquidDensity(const DualReal &pressure, const DualReal &temperature) const
Density of the liquid phase Note: The pressure here is the gas pressure.
Definition: PorousFlowWaterNCG.C:274
PorousFlowWaterNCG::moleFractionToMassFraction
DualReal moleFractionToMassFraction(const DualReal &xmol) const
Convert mole fraction to mass fraction.
Definition: PorousFlowWaterNCG.C:378
SinglePhaseFluidProperties
Common class for single phase fluid properties.
Definition: SinglePhaseFluidProperties.h:89
PorousFlowWaterNCG::_ncg_fp
const SinglePhaseFluidProperties & _ncg_fp
Fluid properties UserObject for the NCG.
Definition: PorousFlowWaterNCG.h:190
PorousFlowFluidStateMultiComponentBase
Compositional flash routines for miscible multiphase flow classes with multiple fluid components.
Definition: PorousFlowFluidStateMultiComponentBase.h:23
PorousFlowWaterNCG::saturation
DualReal saturation(const DualReal &pressure, const DualReal &temperature, const DualReal &Z, std::vector< FluidStateProperties > &fsp) const
Gas saturation in the two-phase region.
Definition: PorousFlowWaterNCG.C:300
PorousFlowWaterNCG::gasDensity
DualReal gasDensity(const DualReal &pressure, const DualReal &temperature, std::vector< FluidStateProperties > &fsp) const
Density of the gas phase.
Definition: PorousFlowWaterNCG.C:280
PorousFlowWaterNCG::twoPhaseProperties
void twoPhaseProperties(const DualReal &pressure, const DualReal &temperature, const DualReal &Z, unsigned int qp, std::vector< FluidStateProperties > &fsp) const
Gas and liquid properties in the two-phase region.
Definition: PorousFlowWaterNCG.C:334
PorousFlowWaterNCG::enthalpyOfDissolution
DualReal enthalpyOfDissolution(const DualReal &temperature) const
Enthalpy of dissolution of NCG in water calculated using Henry's constant From Himmelblau,...
Definition: PorousFlowWaterNCG.C:394
FluidStatePhaseEnum
FluidStatePhaseEnum
Phase state enum.
Definition: PorousFlowFluidStateBase.h:18
PorousFlowWaterNCG::fluidStateName
virtual std::string fluidStateName() const override
Name of FluidState.
Definition: PorousFlowWaterNCG.C:66
PorousFlowWaterNCG::_water_fp
const SinglePhaseFluidProperties & _water_fp
Fluid properties UserObject for water.
Definition: PorousFlowWaterNCG.h:186
PorousFlowWaterNCG::liquidProperties
void liquidProperties(const DualReal &pressure, const DualReal &temperature, std::vector< FluidStateProperties > &fsp) const
Liquid properties - density, viscosity and enthalpy Note: The pressure here is the liquid pressure.
Definition: PorousFlowWaterNCG.C:243
PorousFlowWaterNCG::_Mh2o
const Real _Mh2o
Molar mass of water (kg/mol)
Definition: PorousFlowWaterNCG.h:192
PorousFlowWaterNCG::_water_critical_temperature
const Real _water_critical_temperature
Critical temperature of water (K)
Definition: PorousFlowWaterNCG.h:198
PorousFlowFluidStateMultiComponentBase.h
PorousFlowWaterNCG::gasProperties
void gasProperties(const DualReal &pressure, const DualReal &temperature, std::vector< FluidStateProperties > &fsp) const
Gas properties - density, viscosity and enthalpy.
Definition: PorousFlowWaterNCG.C:203
PorousFlowWaterNCG::checkVariables
void checkVariables(Real temperature) const
Check that the temperature is between the triple and critical values.
Definition: PorousFlowWaterNCG.C:384
validParams< PorousFlowWaterNCG >
InputParameters validParams< PorousFlowWaterNCG >()
Definition: PorousFlowWaterNCG.C:19
Water97FluidProperties
Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revi...
Definition: Water97FluidProperties.h:42
PorousFlowWaterNCG::equilibriumMassFractions
void equilibriumMassFractions(const DualReal &pressure, const DualReal &temperature, DualReal &Xncg, DualReal &Yh2o) const
Mass fractions of NCG in liquid phase and H2O in gas phase at thermodynamic equilibrium.
Definition: PorousFlowWaterNCG.C:354
PorousFlowWaterNCG::totalMassFraction
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 ...
Definition: PorousFlowWaterNCG.C:416
PorousFlowWaterNCG::PorousFlowWaterNCG
PorousFlowWaterNCG(const InputParameters &parameters)
Definition: PorousFlowWaterNCG.C:29
PorousFlowWaterNCG
Specialized class for water and a non-condensable gas (NCG) Includes dissolution of gas in liquid wat...
Definition: PorousFlowWaterNCG.h:33
PorousFlowWaterNCG::_Mncg
const Real _Mncg
Molar mass of non-condensable gas (kg/mol)
Definition: PorousFlowWaterNCG.h:194
PorousFlowWaterNCG::thermophysicalProperties
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.
Definition: PorousFlowWaterNCG.C:72
PorousFlowWaterNCG::_water97_fp
const Water97FluidProperties & _water97_fp
Fluid properties UserObject for water (used to access Henry's law)
Definition: PorousFlowWaterNCG.h:188
NS::temperature
const std::string temperature
Definition: NS.h:26
PorousFlowWaterNCG::_water_triple_temperature
const Real _water_triple_temperature
Triple point temperature of water (K)
Definition: PorousFlowWaterNCG.h:196
PorousFlowWaterNCG::massFractions
void massFractions(const DualReal &pressure, const DualReal &temperature, const DualReal &Z, FluidStatePhaseEnum &phase_state, std::vector< FluidStateProperties > &fsp) const
Mass fractions of NCG and H2O in both phases, as well as derivatives wrt PorousFlow variables.
Definition: PorousFlowWaterNCG.C:139
PorousFlowWaterNCG::_ncg_henry
const std::vector< Real > _ncg_henry
Henry's coefficients for the NCG.
Definition: PorousFlowWaterNCG.h:200
NS::pressure
const std::string pressure
Definition: NS.h:25