https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PorousFlowHystereticRelativePermeabilityGas Class Reference

Material to compute gas relative permeability for 1-phase and 2-phase hysteretic models. More...

#include <PorousFlowHystereticRelativePermeabilityGas.h>

Inheritance diagram for PorousFlowHystereticRelativePermeabilityGas:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 PorousFlowHystereticRelativePermeabilityGas (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeRelPermQp () override
 Compute the relative permeability and its derivative wrt the _phase_num saturation, at the quadpoints, and store the result in _relative_permeability[_qp] and _drelative_permeability_ds[_qp]. More...
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
virtual void computeTurningPoint0Info (Real tp_sat)
 Compute all relevant quantities at the zeroth turning point (the transition from primary drying to first-order wetting) More...
 

Protected Attributes

const unsigned _liquid_phase
 Phase number of liquid phase. More...
 
const Real _gamma
 gamma parameter used in the gas relative permeability More...
 
const Real _k_rg_max
 Value of the gas relative permeability at liquid saturation = _s_lr. More...
 
const Real _krel_gas_prime
 Value of the derivative of the cubic extension to the gas relative permeability at liquid saturation = _s_lr. More...
 
const Real _s_lr
 Liquid saturation at which the liquid relperm is zero and the gas relperm is k_rg_max. More...
 
const Real _s_gr_max
 Gas residual saturation. More...
 
const Real _m
 van Genuchten m parameter More...
 
const MaterialProperty< std::vector< Real > > & _saturation
 Saturation material property. More...
 
const MaterialProperty< unsigned > & _hys_order
 Hysteresis order, as computed by PorousFlowHysteresisOrder. More...
 
const MaterialProperty< unsigned > & _hys_order_old
 Old value of hysteresis order, as computed by PorousFlowHysteresisOrder. More...
 
const MaterialProperty< std::array< Real, PorousFlowConstants::MAX_HYSTERESIS_ORDER > > & _hys_sat_tps
 Saturation values at the turning points, as computed by PorousFlowHysteresisOrder. More...
 
MaterialProperty< Real > & _relative_permeability
 Computed relative permeability. More...
 
MaterialProperty< Real > & _drelative_permeability_ds
 Derivative of relative permeability wrt the saturation of _phase_num (which is not necessarily the liquid phase) More...
 
MaterialProperty< Real > & _s_gr_tp0
 Computed nodal or quadpoint values the Land expression, at the turning point from primary drying to first-order wetting. More...
 
const unsigned int _phase_num
 Phase number of fluid. More...
 
const std::string _phase
 Stringified fluid phase number. More...
 

Detailed Description

Material to compute gas relative permeability for 1-phase and 2-phase hysteretic models.

Definition at line 17 of file PorousFlowHystereticRelativePermeabilityGas.h.

Constructor & Destructor Documentation

◆ PorousFlowHystereticRelativePermeabilityGas()

PorousFlowHystereticRelativePermeabilityGas::PorousFlowHystereticRelativePermeabilityGas ( const InputParameters parameters)

Definition at line 43 of file PorousFlowHystereticRelativePermeabilityGas.C.

46  _liquid_phase(_phase_num == 0 ? 1 : 0),
47  _gamma(getParam<Real>("gamma")),
48  _k_rg_max(getParam<Real>("k_rg_max")),
49  _krel_gas_prime((getParam<MooseEnum>("gas_low_extension_type") == "linear_like")
50  ? ((_s_lr > 0) ? (_k_rg_max - 1.0) / _s_lr : 0.0)
52  _s_lr, _s_lr, 0.0, _s_gr_max, 1.0, _m, _gamma, _k_rg_max, 0.0))
53 {
54 }
const Real _s_lr
Liquid saturation at which the liquid relperm is zero and the gas relperm is k_rg_max.
const Real _krel_gas_prime
Value of the derivative of the cubic extension to the gas relative permeability at liquid saturation ...
const Real _gamma
gamma parameter used in the gas relative permeability
Real drelativePermeabilityNWHys(Real sl, Real slr, Real sgrdel, Real sgrmax, Real sldel, Real m, Real gamma, Real k_rg_max, Real y0p)
Derivative of hysteretic relative permeability for gas with respect to the liquid saturation...
const unsigned int _phase_num
Phase number of fluid.
const Real _k_rg_max
Value of the gas relative permeability at liquid saturation = _s_lr.

Member Function Documentation

◆ computeQpProperties()

void PorousFlowHystereticRelativePermeabilityBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 93 of file PorousFlowHystereticRelativePermeabilityBase.C.

94 {
95  PorousFlowMaterialBase::computeQpProperties();
96 
97  if (_hys_order[_qp] != _hys_order_old[_qp] && _hys_order[_qp] == 1)
99 
101 }
virtual void computeRelPermQp()=0
Compute the relative permeability and its derivative wrt the _phase_num saturation, at the quadpoints, and store the result in _relative_permeability[_qp] and _drelative_permeability_ds[_qp].
const MaterialProperty< unsigned > & _hys_order
Hysteresis order, as computed by PorousFlowHysteresisOrder.
const MaterialProperty< unsigned > & _hys_order_old
Old value of hysteresis order, as computed by PorousFlowHysteresisOrder.
virtual void computeTurningPoint0Info(Real tp_sat)
Compute all relevant quantities at the zeroth turning point (the transition from primary drying to fi...
const MaterialProperty< std::array< Real, PorousFlowConstants::MAX_HYSTERESIS_ORDER > > & _hys_sat_tps
Saturation values at the turning points, as computed by PorousFlowHysteresisOrder.

◆ computeRelPermQp()

void PorousFlowHystereticRelativePermeabilityGas::computeRelPermQp ( )
overrideprotectedvirtual

Compute the relative permeability and its derivative wrt the _phase_num saturation, at the quadpoints, and store the result in _relative_permeability[_qp] and _drelative_permeability_ds[_qp].

Implements PorousFlowHystereticRelativePermeabilityBase.

Definition at line 57 of file PorousFlowHystereticRelativePermeabilityGas.C.

58 {
59  const Real sl = _saturation[_qp][_liquid_phase];
60 
61  if (_hys_order[_qp] == 0)
62  {
64  sl, _s_lr, 0.0, _s_gr_max, 1.0, _m, _gamma, _k_rg_max, _krel_gas_prime);
65  // negative in the following from d(liquid_saturation)/d(gas_saturation)
67  sl, _s_lr, 0.0, _s_gr_max, 1.0, _m, _gamma, _k_rg_max, _krel_gas_prime);
68  }
69  else
70  {
71  // following ternary deals with the case where the turning-point saturation occurs in the
72  // low-saturation region (tp_sat < _s_lr). There is "no hysteresis along the extension"
73  // according to Doughty2008, so assume that the wetting curve is the same as would occur if
74  // the turning-point saturation occured at _s_lr
75  const Real effective_liquid_tp =
76  (_hys_sat_tps[_qp].at(0) < _s_lr) ? _s_lr : _hys_sat_tps[_qp].at(0);
77  const Real s_gas_max = (_hys_sat_tps[_qp].at(0) < _s_lr) ? _s_gr_max : _s_gr_tp0[_qp];
80  _s_lr,
81  s_gas_max,
82  _s_gr_max,
83  effective_liquid_tp,
84  _m,
85  _gamma,
86  _k_rg_max,
88  // negative in the following from d(liquid_saturation)/d(gas_saturation)
91  _s_lr,
92  s_gas_max,
93  _s_gr_max,
94  effective_liquid_tp,
95  _m,
96  _gamma,
97  _k_rg_max,
99  }
100 }
const Real _s_lr
Liquid saturation at which the liquid relperm is zero and the gas relperm is k_rg_max.
const Real _krel_gas_prime
Value of the derivative of the cubic extension to the gas relative permeability at liquid saturation ...
const Real _gamma
gamma parameter used in the gas relative permeability
Real relativePermeabilityNWHys(Real sl, Real slr, Real sgrdel, Real sgrmax, Real sldel, Real m, Real gamma, Real k_rg_max, Real y0p)
Hysteretic relative permeability for gas.
MaterialProperty< Real > & _s_gr_tp0
Computed nodal or quadpoint values the Land expression, at the turning point from primary drying to f...
Real drelativePermeabilityNWHys(Real sl, Real slr, Real sgrdel, Real sgrmax, Real sldel, Real m, Real gamma, Real k_rg_max, Real y0p)
Derivative of hysteretic relative permeability for gas with respect to the liquid saturation...
const MaterialProperty< unsigned > & _hys_order
Hysteresis order, as computed by PorousFlowHysteresisOrder.
const MaterialProperty< std::vector< Real > > & _saturation
Saturation material property.
MaterialProperty< Real > & _relative_permeability
Computed relative permeability.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialProperty< Real > & _drelative_permeability_ds
Derivative of relative permeability wrt the saturation of _phase_num (which is not necessarily the li...
const Real _k_rg_max
Value of the gas relative permeability at liquid saturation = _s_lr.
const MaterialProperty< std::array< Real, PorousFlowConstants::MAX_HYSTERESIS_ORDER > > & _hys_sat_tps
Saturation values at the turning points, as computed by PorousFlowHysteresisOrder.

◆ computeTurningPoint0Info()

void PorousFlowHystereticRelativePermeabilityBase::computeTurningPoint0Info ( Real  tp_sat)
protectedvirtualinherited

Compute all relevant quantities at the zeroth turning point (the transition from primary drying to first-order wetting)

Parameters
tp_satLiquid saturation at the turning point

Reimplemented in PorousFlowHystereticRelativePermeabilityLiquid.

Definition at line 111 of file PorousFlowHystereticRelativePermeabilityBase.C.

Referenced by PorousFlowHystereticRelativePermeabilityBase::computeQpProperties(), PorousFlowHystereticRelativePermeabilityLiquid::computeTurningPoint0Info(), and PorousFlowHystereticRelativePermeabilityBase::initQpStatefulProperties().

112 {
113  // s_gr_tp0 is the Land expression as a function of the zeroth turning point saturation
114  _s_gr_tp0[_qp] = landSat(tp_sat);
115 }
MaterialProperty< Real > & _s_gr_tp0
Computed nodal or quadpoint values the Land expression, at the turning point from primary drying to f...

◆ initQpStatefulProperties()

void PorousFlowHystereticRelativePermeabilityBase::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Definition at line 83 of file PorousFlowHystereticRelativePermeabilityBase.C.

84 {
85  PorousFlowMaterialBase::initQpStatefulProperties();
86  if (_hys_order[_qp] >= 1)
88 
90 }
virtual void computeRelPermQp()=0
Compute the relative permeability and its derivative wrt the _phase_num saturation, at the quadpoints, and store the result in _relative_permeability[_qp] and _drelative_permeability_ds[_qp].
const MaterialProperty< unsigned > & _hys_order
Hysteresis order, as computed by PorousFlowHysteresisOrder.
virtual void computeTurningPoint0Info(Real tp_sat)
Compute all relevant quantities at the zeroth turning point (the transition from primary drying to fi...
const MaterialProperty< std::array< Real, PorousFlowConstants::MAX_HYSTERESIS_ORDER > > & _hys_sat_tps
Saturation values at the turning points, as computed by PorousFlowHysteresisOrder.

◆ validParams()

InputParameters PorousFlowHystereticRelativePermeabilityGas::validParams ( )
static

Definition at line 16 of file PorousFlowHystereticRelativePermeabilityGas.C.

17 {
19  params.addRangeCheckedParam<Real>(
20  "gamma", 0.33, "gamma > 0", "Gamma parameter that is used for the gas relative permeability");
21  params.addRangeCheckedParam<Real>(
22  "k_rg_max",
23  1.0,
24  "k_rg_max > 0 & k_rg_max <= 1",
25  "Value of the gas relative permeability at liquid saturation = S_lr");
26  MooseEnum low_ext_enum("linear_like cubic", "linear_like");
27  params.addParam<MooseEnum>(
28  "gas_low_extension_type",
29  low_ext_enum,
30  "Type of extension to use for liquid saturation < S_lr for the gas relative permeability. "
31  "All extensions employ a cubic whose value is 1.0 at liquid saturation = 0, and whose "
32  "derivative is zero at liquid saturation = 0, and whose value is k_rg_max at liquid "
33  "saturation = S_lr. linear_like: the derivative at liquid_saturation = S_lr is equal to "
34  "(k_rg_max - 1) / S_lr. cubic: the derivative at liquid_saturation = S_lr equals the "
35  "derivative of the unextended drying curve at that point");
36  params.addClassDescription(
37  "PorousFlow material that computes relative permeability of the gas phase in 1-phase or "
38  "2-phase models that include hysteresis. You should ensure that the 'phase' for this "
39  "Material does indeed represent the gas phase");
40  return params;
41 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)

Member Data Documentation

◆ _drelative_permeability_ds

MaterialProperty<Real>& PorousFlowHystereticRelativePermeabilityBase::_drelative_permeability_ds
protectedinherited

Derivative of relative permeability wrt the saturation of _phase_num (which is not necessarily the liquid phase)

Definition at line 52 of file PorousFlowHystereticRelativePermeabilityBase.h.

Referenced by computeRelPermQp(), and PorousFlowHystereticRelativePermeabilityLiquid::computeRelPermQp().

◆ _gamma

const Real PorousFlowHystereticRelativePermeabilityGas::_gamma
protected

gamma parameter used in the gas relative permeability

Definition at line 30 of file PorousFlowHystereticRelativePermeabilityGas.h.

Referenced by computeRelPermQp().

◆ _hys_order

const MaterialProperty<unsigned>& PorousFlowHystereticRelativePermeabilityBase::_hys_order
protectedinherited

◆ _hys_order_old

const MaterialProperty<unsigned>& PorousFlowHystereticRelativePermeabilityBase::_hys_order_old
protectedinherited

Old value of hysteresis order, as computed by PorousFlowHysteresisOrder.

Definition at line 42 of file PorousFlowHystereticRelativePermeabilityBase.h.

Referenced by PorousFlowHystereticRelativePermeabilityBase::computeQpProperties().

◆ _hys_sat_tps

const MaterialProperty<std::array<Real, PorousFlowConstants::MAX_HYSTERESIS_ORDER> >& PorousFlowHystereticRelativePermeabilityBase::_hys_sat_tps
protectedinherited

◆ _k_rg_max

const Real PorousFlowHystereticRelativePermeabilityGas::_k_rg_max
protected

Value of the gas relative permeability at liquid saturation = _s_lr.

Definition at line 33 of file PorousFlowHystereticRelativePermeabilityGas.h.

Referenced by computeRelPermQp().

◆ _krel_gas_prime

const Real PorousFlowHystereticRelativePermeabilityGas::_krel_gas_prime
protected

Value of the derivative of the cubic extension to the gas relative permeability at liquid saturation = _s_lr.

Definition at line 36 of file PorousFlowHystereticRelativePermeabilityGas.h.

Referenced by computeRelPermQp().

◆ _liquid_phase

const unsigned PorousFlowHystereticRelativePermeabilityGas::_liquid_phase
protected

Phase number of liquid phase.

Definition at line 27 of file PorousFlowHystereticRelativePermeabilityGas.h.

Referenced by computeRelPermQp().

◆ _m

const Real PorousFlowHystereticRelativePermeabilityBase::_m
protectedinherited

◆ _phase

const std::string PorousFlowMaterialBase::_phase
protectedinherited

Stringified fluid phase number.

Definition at line 34 of file PorousFlowMaterialBase.h.

◆ _phase_num

const unsigned int PorousFlowMaterialBase::_phase_num
protectedinherited

◆ _relative_permeability

MaterialProperty<Real>& PorousFlowHystereticRelativePermeabilityBase::_relative_permeability
protectedinherited

◆ _s_gr_max

const Real PorousFlowHystereticRelativePermeabilityBase::_s_gr_max
protectedinherited

◆ _s_gr_tp0

MaterialProperty<Real>& PorousFlowHystereticRelativePermeabilityBase::_s_gr_tp0
protectedinherited

◆ _s_lr

const Real PorousFlowHystereticRelativePermeabilityBase::_s_lr
protectedinherited

◆ _saturation

const MaterialProperty<std::vector<Real> >& PorousFlowHystereticRelativePermeabilityBase::_saturation
protectedinherited

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