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

Material designed to provide the porosity in PorousFlow simulations chemistry + biot + (phi0 - reference_chemistry - biot) * exp(-vol_strain. More...

#include <PorousFlowPorosity.h>

Inheritance diagram for PorousFlowPorosity:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 PorousFlowPorosity (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 Real atNegInfinityQp () const override
 Returns "a" at the quadpoint (porosity = a + (b - a) * exp(decay)) More...
 
virtual Real datNegInfinityQp (unsigned pvar) const override
 d(a)/d(PorousFlow variable pvar) More...
 
virtual Real atZeroQp () const override
 Returns "b" at the quadpoint (porosity = a + (b - a) * exp(decay)) More...
 
virtual Real datZeroQp (unsigned pvar) const override
 d(a)/d(PorousFlow variable pvar) More...
 
virtual Real decayQp () const override
 Returns "decay" at the quadpoint (porosity = a + (b - a) * exp(decay)) More...
 
virtual Real ddecayQp_dvar (unsigned pvar) const override
 d(decay)/d(PorousFlow variable pvar) More...
 
virtual RealGradient ddecayQp_dgradvar (unsigned pvar) const override
 d(decay)/d(grad(PorousFlow variable pvar)) More...
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 

Protected Attributes

const bool _mechanical
 Porosity is a function of volumetric strain. More...
 
const bool _fluid
 Porosity is a function of effective porepressure. More...
 
const bool _thermal
 Porosity is a function of temperature. More...
 
const bool _chemical
 Porosity is a function of chemistry. More...
 
const VariableValue_phi0
 Porosity at zero strain and zero porepressure and zero temperature. More...
 
const Real _biot
 Biot coefficient. More...
 
const Real _exp_coeff
 Thermal expansion coefficient of the solid porous skeleton. More...
 
const Moose::Functor< Real > * _solid_bulk
 Drained bulk modulus of the porous skeleton (as a functor; can be variable, function, etc.) Only used if _fluid is True. More...
 
const Real _coeff
 Short-hand number (biot-1). Please note: this variable is not yet divided by solid_bulk. More...
 
const VariableValue_t_reference
 Reference temperature. More...
 
const VariableValue_p_reference
 Reference porepressure. More...
 
const unsigned _num_c_ref
 Number of reference mineral concentrations provided by user. More...
 
std::vector< const VariableValue * > _c_reference
 Reference mineral concentrations. More...
 
const unsigned _num_initial_c
 Number of reference mineral concentrations provided by user. More...
 
std::vector< const VariableValue * > _initial_c
 Reference mineral concentrations. More...
 
std::vector< Real_c_weights
 Weights for the mineral concentrations. More...
 
const MaterialProperty< Real > *const _porosity_old
 Old value of porosity. More...
 
const MaterialProperty< Real > *const _vol_strain_qp
 Strain (first const means we never want to dereference and change the value, second means we'll always be pointing to the same address after initialization (like a reference)) More...
 
const MaterialProperty< std::vector< RealGradient > > *const _dvol_strain_qp_dvar
 d(strain)/(dvar) (first const means we never want to dereference and change the value, second means we'll always be pointing to the same address after initialization (like a reference)) More...
 
const MaterialProperty< Real > *const _pf
 Effective porepressure at the quadpoints or nodes. More...
 
const MaterialProperty< std::vector< Real > > *const _dpf_dvar
 d(effective porepressure)/(d porflow variable) More...
 
const MaterialProperty< Real > *const _temperature
 Temperature at the quadpoints or nodes. More...
 
const MaterialProperty< std::vector< Real > > *const _dtemperature_dvar
 d(temperature)/(d porflow variable) More...
 
const MaterialProperty< std::vector< Real > > *const _mineral_conc_old
 Old value of mineral concentration at the quadpoints or nodes. More...
 
const MaterialProperty< std::vector< Real > > *const _reaction_rate
 Reaction rate of mineralisation. More...
 
const MaterialProperty< std::vector< std::vector< Real > > > *const _dreaction_rate_dvar
 d(reaction_rate_conc)/d(porflow variable) More...
 
const unsigned int _aq_ph
 Aqueous phase number. More...
 
const MaterialProperty< std::vector< Real > > *const _saturation
 Saturation. More...
 
const MaterialProperty< std::vector< std::vector< Real > > > *const _dsaturation_dvar
 d(saturation)/d(PorousFlow var) More...
 
const bool _strain_at_nearest_qp
 When calculating nodal porosity, use the strain at the nearest quadpoint to the node. More...
 
const bool _ensure_positive
 for decayQp() > 0, porosity can be negative when using porosity = a + (b - a) * exp(decay). More...
 
const Real _porosity_min
 Minimum allowed porosity. More...
 
const Real _zero_modifier
 If the porosity_min floor is active the porosity derivatives are set to _zero_modifier times their unfloored values (rather than exactly zero) to hint to the Newton process that porosity is not strictly constant, which aids convergence. More...
 
GenericMaterialProperty< Real, is_ad > & _porosity
 Computed porosity at the nodes or quadpoints. More...
 
MaterialProperty< std::vector< Real > > *const _dporosity_dvar
 d(porosity)/d(PorousFlow variable) More...
 
MaterialProperty< std::vector< RealGradient > > *const _dporosity_dgradvar
 d(porosity)/d(grad PorousFlow variable) More...
 
const unsigned int _num_phases
 Number of phases. More...
 
const unsigned int _num_components
 Number of fluid components. More...
 
const unsigned int _num_var
 Number of PorousFlow variables. More...
 

Detailed Description

Material designed to provide the porosity in PorousFlow simulations chemistry + biot + (phi0 - reference_chemistry - biot) * exp(-vol_strain.

Definition at line 20 of file PorousFlowPorosity.h.

Constructor & Destructor Documentation

◆ PorousFlowPorosity()

PorousFlowPorosity::PorousFlowPorosity ( const InputParameters parameters)

Definition at line 61 of file PorousFlowPorosity.C.

63 
64  _mechanical(getParam<bool>("mechanical")),
65  _fluid(getParam<bool>("fluid")),
66  _thermal(getParam<bool>("thermal")),
67  _chemical(getParam<bool>("chemical")),
68  _phi0(coupledValue("porosity_zero")),
69  _biot(getParam<Real>("biot_coefficient")),
70  _exp_coeff(isParamValid("thermal_expansion_coeff") ? getParam<Real>("thermal_expansion_coeff")
71  : 0.0),
72  _solid_bulk(isParamValid("solid_bulk") ? &(getFunctor<Real>("solid_bulk")) : nullptr),
73  _coeff(isParamValid("biot_coefficient_prime") ? (getParam<Real>("biot_coefficient_prime") - 1.0)
74  : (_biot - 1.0)),
75 
76  _t_reference(_nodal_material ? coupledDofValues("reference_temperature")
77  : coupledValue("reference_temperature")),
78  _p_reference(_nodal_material ? coupledDofValues("reference_porepressure")
79  : coupledValue("reference_porepressure")),
80  _num_c_ref(coupledComponents("reference_chemistry")),
82  _num_initial_c(coupledComponents("initial_mineral_concentrations")),
84  _c_weights(isParamValid("chemical_weights") ? getParam<std::vector<Real>>("chemical_weights")
85  : std::vector<Real>(_num_c_ref, 1.0)),
86 
87  _porosity_old(_chemical ? (_nodal_material
88  ? &getMaterialPropertyOld<Real>("PorousFlow_porosity_nodal")
89  : &getMaterialPropertyOld<Real>("PorousFlow_porosity_qp"))
90  : nullptr),
91  _vol_strain_qp(_mechanical ? &getMaterialProperty<Real>("PorousFlow_total_volumetric_strain_qp")
92  : nullptr),
93  _dvol_strain_qp_dvar(_mechanical ? &getMaterialProperty<std::vector<RealGradient>>(
94  "dPorousFlow_total_volumetric_strain_qp_dvar")
95  : nullptr),
96 
97  _pf(_fluid ? (_nodal_material
98  ? &getMaterialProperty<Real>("PorousFlow_effective_fluid_pressure_nodal")
99  : &getMaterialProperty<Real>("PorousFlow_effective_fluid_pressure_qp"))
100  : nullptr),
101  _dpf_dvar(_fluid ? (_nodal_material ? &getMaterialProperty<std::vector<Real>>(
102  "dPorousFlow_effective_fluid_pressure_nodal_dvar")
103  : &getMaterialProperty<std::vector<Real>>(
104  "dPorousFlow_effective_fluid_pressure_qp_dvar"))
105  : nullptr),
106 
108  ? (_nodal_material ? &getMaterialProperty<Real>("PorousFlow_temperature_nodal")
109  : &getMaterialProperty<Real>("PorousFlow_temperature_qp"))
110  : nullptr),
112  _thermal
113  ? (_nodal_material
114  ? &getMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_nodal_dvar")
115  : &getMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_qp_dvar"))
116  : nullptr),
117 
118  _mineral_conc_old(_chemical ? (_nodal_material ? &getMaterialPropertyOld<std::vector<Real>>(
119  "PorousFlow_mineral_concentration_nodal")
120  : &getMaterialPropertyOld<std::vector<Real>>(
121  "PorousFlow_mineral_concentration_qp"))
122  : nullptr),
123  _reaction_rate(_chemical ? (_nodal_material ? &getMaterialProperty<std::vector<Real>>(
124  "PorousFlow_mineral_reaction_rate_nodal")
125  : &getMaterialProperty<std::vector<Real>>(
126  "PorousFlow_mineral_reaction_rate_qp"))
127  : nullptr),
128  _dreaction_rate_dvar(_chemical ? (_nodal_material
129  ? &getMaterialProperty<std::vector<std::vector<Real>>>(
130  "dPorousFlow_mineral_reaction_rate_nodal_dvar")
131  : &getMaterialProperty<std::vector<std::vector<Real>>>(
132  "dPorousFlow_mineral_reaction_rate_qp_dvar"))
133  : nullptr),
134  _aq_ph(_dictator.aqueousPhaseNumber()),
136  ? (_nodal_material
137  ? &getMaterialProperty<std::vector<Real>>("PorousFlow_saturation_nodal")
138  : &getMaterialProperty<std::vector<Real>>("PorousFlow_saturation_qp"))
139  : nullptr),
141  ? (_nodal_material ? &getMaterialProperty<std::vector<std::vector<Real>>>(
142  "dPorousFlow_saturation_nodal_dvar")
143  : &getMaterialProperty<std::vector<std::vector<Real>>>(
144  "dPorousFlow_saturation_qp_dvar"))
145  : nullptr)
146 {
147  if (_thermal && !isParamValid("thermal_expansion_coeff"))
148  mooseError("PorousFlowPorosity: When thermal=true you must provide a thermal_expansion_coeff");
149  if (_fluid && !_solid_bulk)
150  mooseError("PorousFlowPorosity: When fluid=true you must provide a solid_bulk");
151  if (_chemical && _num_c_ref != _dictator.numAqueousKinetic())
152  mooseError("PorousFlowPorosity: When chemical=true you must provide the reference_chemistry "
153  "values. The Dictator proclaims there should be ",
154  _dictator.numAqueousKinetic(),
155  " of these");
156  if (_chemical && _num_initial_c != _dictator.numAqueousKinetic())
157  mooseError("PorousFlowPorosity: When chemical=true you must provide the "
158  "initial_mineral_concentrations. "
159  "The Dictator proclaims there should be ",
160  _dictator.numAqueousKinetic(),
161  " of these");
162  if (_chemical && _c_weights.size() != _dictator.numAqueousKinetic())
163  mooseError(
164  "PorousFlowPorosity: When chemical=true you must provde the correct number of "
165  "chemical_weights (which the Dictator knows is ",
166  _dictator.numAqueousKinetic(),
167  ") or do not provide any chemical_weights and use the default value of 1 for each mineral");
168 
169  for (unsigned i = 0; i < _num_c_ref; ++i)
170  {
171  _c_reference[i] = (_nodal_material ? &coupledDofValues("reference_chemistry", i)
172  : &coupledValue("reference_chemistry", i));
173  _initial_c[i] = (_nodal_material ? &coupledDofValues("initial_mineral_concentrations", i)
174  : &coupledValue("initial_mineral_concentrations", i));
175  }
176 }
const Real _coeff
Short-hand number (biot-1). Please note: this variable is not yet divided by solid_bulk.
const MaterialProperty< std::vector< Real > > *const _dtemperature_dvar
d(temperature)/(d porflow variable)
const Real _biot
Biot coefficient.
const VariableValue & _t_reference
Reference temperature.
const VariableValue & _phi0
Porosity at zero strain and zero porepressure and zero temperature.
const MaterialProperty< std::vector< Real > > *const _reaction_rate
Reaction rate of mineralisation.
void mooseError(Args &&... args)
const MaterialProperty< std::vector< Real > > *const _saturation
Saturation.
const MaterialProperty< std::vector< Real > > *const _mineral_conc_old
Old value of mineral concentration at the quadpoints or nodes.
const bool _thermal
Porosity is a function of temperature.
std::vector< Real > _c_weights
Weights for the mineral concentrations.
const bool _chemical
Porosity is a function of chemistry.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dreaction_rate_dvar
d(reaction_rate_conc)/d(porflow variable)
const unsigned _num_c_ref
Number of reference mineral concentrations provided by user.
const MaterialProperty< Real > *const _porosity_old
Old value of porosity.
PorousFlowPorosityExponentialBase(const InputParameters &parameters)
const unsigned int _aq_ph
Aqueous phase number.
const MaterialProperty< Real > *const _pf
Effective porepressure at the quadpoints or nodes.
std::vector< const VariableValue * > _initial_c
Reference mineral concentrations.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dsaturation_dvar
d(saturation)/d(PorousFlow var)
const MaterialProperty< std::vector< Real > > *const _dpf_dvar
d(effective porepressure)/(d porflow variable)
const MaterialProperty< Real > *const _temperature
Temperature at the quadpoints or nodes.
const Real _exp_coeff
Thermal expansion coefficient of the solid porous skeleton.
const VariableValue & _p_reference
Reference porepressure.
const unsigned _num_initial_c
Number of reference mineral concentrations provided by user.
const Moose::Functor< Real > * _solid_bulk
Drained bulk modulus of the porous skeleton (as a functor; can be variable, function, etc.) Only used if _fluid is True.
const bool _fluid
Porosity is a function of effective porepressure.
std::vector< const VariableValue * > _c_reference
Reference mineral concentrations.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const bool _mechanical
Porosity is a function of volumetric strain.
const MaterialProperty< std::vector< RealGradient > > *const _dvol_strain_qp_dvar
d(strain)/(dvar) (first const means we never want to dereference and change the value, second means we&#39;ll always be pointing to the same address after initialization (like a reference))
const MaterialProperty< Real > *const _vol_strain_qp
Strain (first const means we never want to dereference and change the value, second means we&#39;ll alway...

Member Function Documentation

◆ atNegInfinityQp()

Real PorousFlowPorosity::atNegInfinityQp ( ) const
overrideprotectedvirtual

Returns "a" at the quadpoint (porosity = a + (b - a) * exp(decay))

Implements PorousFlowPorosityExponentialBase.

Definition at line 179 of file PorousFlowPorosity.C.

180 {
181  /*
182  *
183  * Note the use of the OLD value of porosity here.
184  * This strategy, which breaks the cyclic dependency between porosity
185  * and mineral concentration, is used in
186  * Kernel: PorousFlowPreDis
187  * Material: PorousFlowPorosity
188  * Material: PorousFlowAqueousPreDisChemistry
189  * Material: PorousFlowAqueousPreDisMineral
190  *
191  */
192  Real result = _biot;
193  if (_chemical)
194  {
195  if (_t_step == 0 && !_app.isRestarting())
196  for (unsigned i = 0; i < _num_c_ref; ++i)
197  result -= _c_weights[i] * (*_initial_c[i])[_qp];
198  else
199  for (unsigned i = 0; i < _num_c_ref; ++i)
200  result -= _c_weights[i] * ((*_mineral_conc_old)[_qp][i] + _dt * (*_porosity_old)[_qp] *
201  (*_saturation)[_qp][_aq_ph] *
202  (*_reaction_rate)[_qp][i]);
203  }
204  return result;
205 }
const Real _biot
Biot coefficient.
const MaterialProperty< std::vector< Real > > *const _mineral_conc_old
Old value of mineral concentration at the quadpoints or nodes.
std::vector< Real > _c_weights
Weights for the mineral concentrations.
const bool _chemical
Porosity is a function of chemistry.
const unsigned _num_c_ref
Number of reference mineral concentrations provided by user.
const unsigned int _aq_ph
Aqueous phase number.
std::vector< const VariableValue * > _initial_c
Reference mineral concentrations.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ atZeroQp()

Real PorousFlowPorosity::atZeroQp ( ) const
overrideprotectedvirtual

Returns "b" at the quadpoint (porosity = a + (b - a) * exp(decay))

Implements PorousFlowPorosityExponentialBase.

Definition at line 220 of file PorousFlowPorosity.C.

221 {
222  // note the [0] below: _phi0 is a constant monomial and we use [0] regardless of _nodal_material
223  Real result = _phi0[0];
224  if (_chemical)
225  {
226  if (_t_step == 0 && !_app.isRestarting())
227  for (unsigned i = 0; i < _num_c_ref; ++i)
228  result -= _c_weights[i] * ((*_initial_c[i])[_qp] - (*_c_reference[i])[_qp]);
229  else
230  for (unsigned i = 0; i < _num_c_ref; ++i)
231  result -= _c_weights[i] * ((*_mineral_conc_old)[_qp][i] +
232  _dt * (*_porosity_old)[_qp] * (*_saturation)[_qp][_aq_ph] *
233  (*_reaction_rate)[_qp][i] -
234  (*_c_reference[i])[_qp]);
235  }
236  return result;
237 }
const VariableValue & _phi0
Porosity at zero strain and zero porepressure and zero temperature.
const MaterialProperty< std::vector< Real > > *const _mineral_conc_old
Old value of mineral concentration at the quadpoints or nodes.
std::vector< Real > _c_weights
Weights for the mineral concentrations.
const bool _chemical
Porosity is a function of chemistry.
const unsigned _num_c_ref
Number of reference mineral concentrations provided by user.
const unsigned int _aq_ph
Aqueous phase number.
std::vector< const VariableValue * > _initial_c
Reference mineral concentrations.
std::vector< const VariableValue * > _c_reference
Reference mineral concentrations.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeQpProperties()

void PorousFlowPorosityExponentialBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Reimplemented in PorousFlowPorosityHMBiotModulus.

Definition at line 85 of file PorousFlowPorosityExponentialBase.C.

86 {
87  const Real a = atNegInfinityQp();
88  const Real b = atZeroQp();
89  const Real decay = decayQp();
90  Real exp_term = 1.0; // set appropriately below
91 
92  Real deriv = 0.0; // = d(porosity)/d(decay)
93  if (decay <= 0.0 || !_ensure_positive)
94  {
95  exp_term = std::exp(decay);
96  _porosity[_qp] = a + (b - a) * exp_term;
97  deriv = _porosity[_qp] - a;
98  }
99  else
100  {
101  const Real c = std::log(a / (a - b));
102  const Real expx = std::exp(-decay / c);
103  // note that at decay = 0, we have expx = 1, so porosity = a + b - a = b
104  // and at decay = infinity, expx = 0, so porosity = a + (b - a) * a / (a - b) = 0
105  exp_term = std::exp(c * (1.0 - expx));
106  _porosity[_qp] = a + (b - a) * exp_term;
107  deriv = (_porosity[_qp] - a) * expx;
108  }
109 
110  (*_dporosity_dvar)[_qp].resize(_num_var);
111  (*_dporosity_dgradvar)[_qp].resize(_num_var);
112  for (unsigned int v = 0; v < _num_var; ++v)
113  {
114  (*_dporosity_dvar)[_qp][v] = ddecayQp_dvar(v) * deriv;
115  (*_dporosity_dgradvar)[_qp][v] = ddecayQp_dgradvar(v) * deriv;
116 
117  const Real da = datNegInfinityQp(v);
118  const Real db = datZeroQp(v);
119  (*_dporosity_dvar)[_qp][v] += da * (1 - exp_term) + db * exp_term;
120 
121  if (!(decay <= 0.0 || !_ensure_positive))
122  {
123  const Real c = std::log(a / (a - b));
124  const Real expx = std::exp(-decay / c);
125  const Real dc = (a - b) * (da * b / a - db) / std::pow(a, 2);
126  (*_dporosity_dvar)[_qp][v] += (b - a) * exp_term * dc * (1 - expx - expx / c);
127  }
128  }
129 
130  // Apply the porosity floor last, after the unfloored derivatives above have been
131  // formed. When floored, soften the derivatives with _zero_modifier so the Newton
132  // process still sees porosity as weakly varying (cf. PorousFlowPorosityLinear).
133  if (_porosity[_qp] < _porosity_min)
134  {
135  _porosity[_qp] = _porosity_min;
136  for (unsigned int v = 0; v < _num_var; ++v)
137  {
138  (*_dporosity_dvar)[_qp][v] *= _zero_modifier;
139  (*_dporosity_dgradvar)[_qp][v] *= _zero_modifier;
140  }
141  }
142 }
const bool _ensure_positive
for decayQp() > 0, porosity can be negative when using porosity = a + (b - a) * exp(decay).
virtual Real atZeroQp() const =0
Returns "b" at the quadpoint (porosity = a + (b - a) * exp(decay))
const double v
const GeochemicalDatabaseReader db("database/moose_testdb.json", true, true, false)
Real deriv(unsigned n, unsigned alpha, unsigned beta, Real x)
virtual Real datZeroQp(unsigned pvar) const =0
d(a)/d(PorousFlow variable pvar)
const Real _porosity_min
Minimum allowed porosity.
virtual Real decayQp() const =0
Returns "decay" at the quadpoint (porosity = a + (b - a) * exp(decay))
const unsigned int _num_var
Number of PorousFlow variables.
virtual Real atNegInfinityQp() const =0
Returns "a" at the quadpoint (porosity = a + (b - a) * exp(decay))
virtual RealGradient ddecayQp_dgradvar(unsigned pvar) const =0
d(decay)/d(grad(PorousFlow variable pvar))
GenericMaterialProperty< Real, is_ad > & _porosity
Computed porosity at the nodes or quadpoints.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real datNegInfinityQp(unsigned pvar) const =0
d(a)/d(PorousFlow variable pvar)
virtual Real ddecayQp_dvar(unsigned pvar) const =0
d(decay)/d(PorousFlow variable pvar)
const Real _zero_modifier
If the porosity_min floor is active the porosity derivatives are set to _zero_modifier times their un...
MooseUnits pow(const MooseUnits &, int)

◆ datNegInfinityQp()

Real PorousFlowPorosity::datNegInfinityQp ( unsigned  pvar) const
overrideprotectedvirtual

d(a)/d(PorousFlow variable pvar)

Implements PorousFlowPorosityExponentialBase.

Definition at line 208 of file PorousFlowPorosity.C.

209 {
210  Real result = 0.0;
211  if (_chemical && (_t_step >= 1 || _app.isRestarting()))
212  for (unsigned i = 0; i < _num_c_ref; ++i)
213  result -= _c_weights[i] * _dt * (*_porosity_old)[_qp] *
214  ((*_saturation)[_qp][_aq_ph] * (*_dreaction_rate_dvar)[_qp][i][pvar] +
215  (*_dsaturation_dvar)[_qp][_aq_ph][pvar] * (*_reaction_rate)[_qp][i]);
216  return result;
217 }
std::vector< Real > _c_weights
Weights for the mineral concentrations.
const bool _chemical
Porosity is a function of chemistry.
const unsigned _num_c_ref
Number of reference mineral concentrations provided by user.
const MaterialProperty< Real > *const _porosity_old
Old value of porosity.
const unsigned int _aq_ph
Aqueous phase number.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ datZeroQp()

Real PorousFlowPorosity::datZeroQp ( unsigned  pvar) const
overrideprotectedvirtual

d(a)/d(PorousFlow variable pvar)

Implements PorousFlowPorosityExponentialBase.

Definition at line 240 of file PorousFlowPorosity.C.

241 {
242  Real result = 0.0;
243  if (_chemical && (_t_step >= 1 || _app.isRestarting()))
244  for (unsigned i = 0; i < _num_c_ref; ++i)
245  result -= _c_weights[i] * _dt * (*_porosity_old)[_qp] *
246  ((*_saturation)[_qp][_aq_ph] * (*_dreaction_rate_dvar)[_qp][i][pvar] +
247  (*_dsaturation_dvar)[_qp][_aq_ph][pvar] * (*_reaction_rate)[_qp][i]);
248  return result;
249 }
std::vector< Real > _c_weights
Weights for the mineral concentrations.
const bool _chemical
Porosity is a function of chemistry.
const unsigned _num_c_ref
Number of reference mineral concentrations provided by user.
const MaterialProperty< Real > *const _porosity_old
Old value of porosity.
const unsigned int _aq_ph
Aqueous phase number.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ ddecayQp_dgradvar()

RealGradient PorousFlowPorosity::ddecayQp_dgradvar ( unsigned  pvar) const
overrideprotectedvirtual

d(decay)/d(grad(PorousFlow variable pvar))

Implements PorousFlowPorosityExponentialBase.

Definition at line 341 of file PorousFlowPorosity.C.

342 {
343  RealGradient result(0.0, 0.0, 0.0);
344  if (_mechanical)
345  {
346  const unsigned qp_to_use =
347  (_nodal_material && (_bnd || _strain_at_nearest_qp) ? nearestQP(_qp) : _qp);
348  result += -(*_dvol_strain_qp_dvar)[qp_to_use][pvar];
349  }
350  return result;
351 }
const bool _strain_at_nearest_qp
When calculating nodal porosity, use the strain at the nearest quadpoint to the node.
const bool _mechanical
Porosity is a function of volumetric strain.

◆ ddecayQp_dvar()

Real PorousFlowPorosity::ddecayQp_dvar ( unsigned  pvar) const
overrideprotectedvirtual

d(decay)/d(PorousFlow variable pvar)

Implements PorousFlowPorosityExponentialBase.

Definition at line 302 of file PorousFlowPorosity.C.

303 {
304  Real result = 0.0;
305 
306  if (_thermal)
307  result += _exp_coeff * (*_dtemperature_dvar)[_qp][pvar];
308 
309  if (_fluid)
310  {
311  Real solid_bulk;
312  // Using Qp 0 can leverage the functor caching
313  // TODO: Find a way to effectively use subdomain-constant-ness
314  unsigned int qp_used = (_constant_option == ConstantTypeEnum::NONE) ? _qp : 0;
315  if (_nodal_material)
316  {
317  const std::set<SubdomainID> subdomain_set = {_current_elem->subdomain_id()};
318  const Moose::NodeArg space_arg = {_current_elem->node_ptr(qp_used), &subdomain_set};
319  solid_bulk = (*_solid_bulk)(space_arg, Moose::currentState());
320  }
321  else if (_bnd)
322  {
323  const Moose::ElemSideQpArg space_arg = {
324  _current_elem, _current_side, qp_used, _qrule, _q_point[qp_used]};
325  solid_bulk = (*_solid_bulk)(space_arg, Moose::currentState());
326  }
327  else
328  {
329  const Moose::ElemQpArg space_arg = {_current_elem, qp_used, _qrule, _q_point[qp_used]};
330  solid_bulk = (*_solid_bulk)(space_arg, Moose::currentState());
331  }
332  if (solid_bulk <= 0)
333  mooseError("PorousFlowPorosity: solid_bulk must be larger than Zero.");
334  result += _coeff / solid_bulk * (*_dpf_dvar)[_qp][pvar];
335  }
336 
337  return result;
338 }
const Real _coeff
Short-hand number (biot-1). Please note: this variable is not yet divided by solid_bulk.
void mooseError(Args &&... args)
const bool _thermal
Porosity is a function of temperature.
const Real _exp_coeff
Thermal expansion coefficient of the solid porous skeleton.
const bool _fluid
Porosity is a function of effective porepressure.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
StateArg currentState()

◆ decayQp()

Real PorousFlowPorosity::decayQp ( ) const
overrideprotectedvirtual

Returns "decay" at the quadpoint (porosity = a + (b - a) * exp(decay))

Implements PorousFlowPorosityExponentialBase.

Definition at line 252 of file PorousFlowPorosity.C.

253 {
254  Real result = 0.0;
255 
256  if (_thermal)
257  result += _exp_coeff * ((*_temperature)[_qp] - _t_reference[_qp]);
258 
259  if (_fluid)
260  {
261  Real solid_bulk;
262  // Using Qp 0 can leverage the functor caching
263  // TODO: Find a way to effectively use subdomain-constant-ness
264  unsigned int qp_used = (_constant_option == ConstantTypeEnum::NONE) ? _qp : 0;
265  if (_nodal_material)
266  {
267  const std::set<SubdomainID> subdomain_set = {_current_elem->subdomain_id()};
268  const Moose::NodeArg space_arg = {_current_elem->node_ptr(qp_used), &subdomain_set};
269  solid_bulk = (*_solid_bulk)(space_arg, Moose::currentState());
270  }
271  else if (_bnd)
272  {
273  const Moose::ElemSideQpArg space_arg = {
274  _current_elem, _current_side, qp_used, _qrule, _q_point[qp_used]};
275  solid_bulk = (*_solid_bulk)(space_arg, Moose::currentState());
276  }
277  else
278  {
279  const Moose::ElemQpArg space_arg = {_current_elem, qp_used, _qrule, _q_point[qp_used]};
280  solid_bulk = (*_solid_bulk)(space_arg, Moose::currentState());
281  }
282  if (solid_bulk <= 0)
283  mooseError("PorousFlowPorosity: solid_bulk must be larger than Zero");
284  result += _coeff / solid_bulk * ((*_pf)[_qp] - _p_reference[_qp]);
285  }
286 
287  if (_mechanical)
288  {
289  // Note that in the following _strain[_qp] is evaluated at q quadpoint
290  // So _porosity_nodal[_qp], which should be the nodal value of porosity
291  // actually uses the strain at a quadpoint. This
292  // is OK for LINEAR elements, as strain is constant over the element anyway.
293  const unsigned qp_to_use =
294  (_nodal_material && (_bnd || _strain_at_nearest_qp) ? nearestQP(_qp) : _qp);
295  result += -(*_vol_strain_qp)[qp_to_use];
296  }
297 
298  return result;
299 }
const Real _coeff
Short-hand number (biot-1). Please note: this variable is not yet divided by solid_bulk.
const VariableValue & _t_reference
Reference temperature.
const bool _strain_at_nearest_qp
When calculating nodal porosity, use the strain at the nearest quadpoint to the node.
void mooseError(Args &&... args)
const bool _thermal
Porosity is a function of temperature.
const Real _exp_coeff
Thermal expansion coefficient of the solid porous skeleton.
const VariableValue & _p_reference
Reference porepressure.
const bool _fluid
Porosity is a function of effective porepressure.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const bool _mechanical
Porosity is a function of volumetric strain.
StateArg currentState()

◆ initQpStatefulProperties()

void PorousFlowPorosityExponentialBase::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Definition at line 64 of file PorousFlowPorosityExponentialBase.C.

65 {
66  const Real a = atNegInfinityQp();
67  const Real b = atZeroQp();
68  mooseAssert(a > b, "PorousFlowPorosityExponentialBase a must be larger than b");
69  const Real decay = decayQp();
70 
71  if (decay <= 0.0 || !_ensure_positive)
72  _porosity[_qp] = a + (b - a) * std::exp(decay);
73  else
74  {
75  const Real c = std::log(a / (a - b));
76  const Real expx = std::exp(-decay / c);
77  _porosity[_qp] = a + (b - a) * std::exp(c * (1.0 - expx));
78  }
79 
80  if (_porosity[_qp] < _porosity_min)
81  _porosity[_qp] = _porosity_min;
82 }
const bool _ensure_positive
for decayQp() > 0, porosity can be negative when using porosity = a + (b - a) * exp(decay).
virtual Real atZeroQp() const =0
Returns "b" at the quadpoint (porosity = a + (b - a) * exp(decay))
const Real _porosity_min
Minimum allowed porosity.
virtual Real decayQp() const =0
Returns "decay" at the quadpoint (porosity = a + (b - a) * exp(decay))
virtual Real atNegInfinityQp() const =0
Returns "a" at the quadpoint (porosity = a + (b - a) * exp(decay))
GenericMaterialProperty< Real, is_ad > & _porosity
Computed porosity at the nodes or quadpoints.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ validParams()

InputParameters PorousFlowPorosity::validParams ( )
static

Definition at line 15 of file PorousFlowPorosity.C.

Referenced by PorousFlowPorosityHMBiotModulus::validParams().

16 {
18  params.addParam<bool>(
19  "mechanical", false, "If true, porosity will be a function of total volumetric strain");
20  params.addParam<bool>(
21  "fluid", false, "If true, porosity will be a function of effective porepressure");
22  params.addParam<bool>("thermal", false, "If true, porosity will be a function of temperature");
23  params.addParam<bool>("chemical", false, "If true, porosity will be a function of precipitate");
24  params.addRequiredCoupledVar("porosity_zero",
25  "The porosity at zero volumetric strain and "
26  "reference temperature and reference effective "
27  "porepressure and reference chemistry. This must be a real number "
28  "or a constant monomial variable (not a linear lagrange or other "
29  "type of variable)");
30  params.addParam<Real>("thermal_expansion_coeff",
31  "Volumetric thermal expansion coefficient of the drained porous solid "
32  "skeleton (only used if thermal=true)");
33  params.addRangeCheckedParam<Real>(
34  "biot_coefficient", 1, "biot_coefficient>=0 & biot_coefficient<=1", "Biot coefficient");
35  params.addParam<Real>("biot_coefficient_prime",
36  "Biot coefficient that appears in the term (biot_coefficient_prime - 1) * "
37  "(P - reference_porepressure) / solid_bulk. If not provided, this "
38  "defaults to the standard biot_coefficient");
39  params.addParam<MooseFunctorName>(
40  "solid_bulk", "Bulk modulus of the drained porous solid skeleton (only used if fluid=true)");
41  params.addCoupledVar(
42  "reference_temperature", 0.0, "Reference temperature (only used if thermal=true)");
43  params.addCoupledVar(
44  "reference_porepressure", 0.0, "Reference porepressure (only used if fluid=true)");
45  params.addCoupledVar("reference_chemistry",
46  "Reference values of the solid mineral concentrations "
47  "(m^3(precipitate)/m^3(porous material)), entered as "
48  "a vector (one value per mineral). (Only used if chemical=true)");
49  params.addCoupledVar(
50  "initial_mineral_concentrations",
51  "Initial mineral concentrations (m^3(precipitate)/m^3(porous material)), entered as "
52  "a vector (one value per mineral). (Only used if chemical=true)");
53  params.addParam<std::vector<Real>>("chemical_weights",
54  "When chemical=true, porosity is a linear combination of the "
55  "solid mineral concentrations multiplied by these weights. "
56  "Default=1 for all minerals.");
57  params.addClassDescription("This Material calculates the porosity PorousFlow simulations");
58  return params;
59 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, 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

◆ _aq_ph

const unsigned int PorousFlowPorosity::_aq_ph
protected

Aqueous phase number.

Definition at line 116 of file PorousFlowPorosity.h.

Referenced by atNegInfinityQp(), atZeroQp(), datNegInfinityQp(), and datZeroQp().

◆ _biot

const Real PorousFlowPorosity::_biot
protected

Biot coefficient.

Definition at line 52 of file PorousFlowPorosity.h.

Referenced by atNegInfinityQp(), and PorousFlowPorosityHMBiotModulus::computeQpProperties().

◆ _c_reference

std::vector<const VariableValue *> PorousFlowPorosity::_c_reference
protected

Reference mineral concentrations.

Definition at line 74 of file PorousFlowPorosity.h.

Referenced by atZeroQp(), and PorousFlowPorosity().

◆ _c_weights

std::vector<Real> PorousFlowPorosity::_c_weights
protected

Weights for the mineral concentrations.

Definition at line 83 of file PorousFlowPorosity.h.

Referenced by atNegInfinityQp(), atZeroQp(), datNegInfinityQp(), datZeroQp(), and PorousFlowPorosity().

◆ _chemical

const bool PorousFlowPorosity::_chemical
protected

Porosity is a function of chemistry.

Definition at line 46 of file PorousFlowPorosity.h.

Referenced by atNegInfinityQp(), atZeroQp(), datNegInfinityQp(), datZeroQp(), and PorousFlowPorosity().

◆ _coeff

const Real PorousFlowPorosity::_coeff
protected

Short-hand number (biot-1). Please note: this variable is not yet divided by solid_bulk.

Definition at line 62 of file PorousFlowPorosity.h.

Referenced by ddecayQp_dvar(), and decayQp().

◆ _dpf_dvar

const MaterialProperty<std::vector<Real> >* const PorousFlowPorosity::_dpf_dvar
protected

d(effective porepressure)/(d porflow variable)

Definition at line 98 of file PorousFlowPorosity.h.

◆ _dporosity_dgradvar

template<bool is_ad>
MaterialProperty<std::vector<RealGradient> >* const PorousFlowPorosityBaseTempl< is_ad >::_dporosity_dgradvar
protectedinherited

d(porosity)/d(grad PorousFlow variable)

Definition at line 33 of file PorousFlowPorosityBase.h.

Referenced by PorousFlowPorosityLinear::computeQpProperties(), and PorousFlowPorosityHMBiotModulus::computeQpProperties().

◆ _dporosity_dvar

template<bool is_ad>
MaterialProperty<std::vector<Real> >* const PorousFlowPorosityBaseTempl< is_ad >::_dporosity_dvar
protectedinherited

d(porosity)/d(PorousFlow variable)

Definition at line 30 of file PorousFlowPorosityBase.h.

Referenced by PorousFlowPorosityLinear::computeQpProperties(), and PorousFlowPorosityHMBiotModulus::computeQpProperties().

◆ _dreaction_rate_dvar

const MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowPorosity::_dreaction_rate_dvar
protected

d(reaction_rate_conc)/d(porflow variable)

Definition at line 113 of file PorousFlowPorosity.h.

◆ _dsaturation_dvar

const MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowPorosity::_dsaturation_dvar
protected

d(saturation)/d(PorousFlow var)

Definition at line 122 of file PorousFlowPorosity.h.

◆ _dtemperature_dvar

const MaterialProperty<std::vector<Real> >* const PorousFlowPorosity::_dtemperature_dvar
protected

d(temperature)/(d porflow variable)

Definition at line 104 of file PorousFlowPorosity.h.

◆ _dvol_strain_qp_dvar

const MaterialProperty<std::vector<RealGradient> >* const PorousFlowPorosity::_dvol_strain_qp_dvar
protected

d(strain)/(dvar) (first const means we never want to dereference and change the value, second means we'll always be pointing to the same address after initialization (like a reference))

Definition at line 92 of file PorousFlowPorosity.h.

◆ _ensure_positive

const bool PorousFlowPorosityExponentialBase::_ensure_positive
protectedinherited

for decayQp() > 0, porosity can be negative when using porosity = a + (b - a) * exp(decay).

This expression is modified if ensure_positive = true to read porosity = a + (b - a) * exp(c * (1 - Exp(- decay / c))) where c = log(a/(b-a))

Definition at line 73 of file PorousFlowPorosityExponentialBase.h.

Referenced by PorousFlowPorosityExponentialBase::computeQpProperties(), and PorousFlowPorosityExponentialBase::initQpStatefulProperties().

◆ _exp_coeff

const Real PorousFlowPorosity::_exp_coeff
protected

Thermal expansion coefficient of the solid porous skeleton.

Definition at line 55 of file PorousFlowPorosity.h.

Referenced by ddecayQp_dvar(), and decayQp().

◆ _fluid

const bool PorousFlowPorosity::_fluid
protected

Porosity is a function of effective porepressure.

Definition at line 40 of file PorousFlowPorosity.h.

Referenced by ddecayQp_dvar(), decayQp(), and PorousFlowPorosity().

◆ _initial_c

std::vector<const VariableValue *> PorousFlowPorosity::_initial_c
protected

Reference mineral concentrations.

Definition at line 80 of file PorousFlowPorosity.h.

Referenced by atNegInfinityQp(), atZeroQp(), and PorousFlowPorosity().

◆ _mechanical

const bool PorousFlowPorosity::_mechanical
protected

Porosity is a function of volumetric strain.

Definition at line 37 of file PorousFlowPorosity.h.

Referenced by ddecayQp_dgradvar(), and decayQp().

◆ _mineral_conc_old

const MaterialProperty<std::vector<Real> >* const PorousFlowPorosity::_mineral_conc_old
protected

Old value of mineral concentration at the quadpoints or nodes.

Definition at line 107 of file PorousFlowPorosity.h.

Referenced by atNegInfinityQp(), and atZeroQp().

◆ _num_c_ref

const unsigned PorousFlowPorosity::_num_c_ref
protected

Number of reference mineral concentrations provided by user.

Definition at line 71 of file PorousFlowPorosity.h.

Referenced by atNegInfinityQp(), atZeroQp(), datNegInfinityQp(), datZeroQp(), and PorousFlowPorosity().

◆ _num_components

const unsigned int PorousFlowMaterialVectorBase::_num_components
protectedinherited

◆ _num_initial_c

const unsigned PorousFlowPorosity::_num_initial_c
protected

Number of reference mineral concentrations provided by user.

Definition at line 77 of file PorousFlowPorosity.h.

Referenced by PorousFlowPorosity().

◆ _num_phases

const unsigned int PorousFlowMaterialVectorBase::_num_phases
protectedinherited

◆ _num_var

const unsigned int PorousFlowMaterialVectorBase::_num_var
protectedinherited

◆ _p_reference

const VariableValue& PorousFlowPorosity::_p_reference
protected

Reference porepressure.

Definition at line 68 of file PorousFlowPorosity.h.

Referenced by decayQp().

◆ _pf

const MaterialProperty<Real>* const PorousFlowPorosity::_pf
protected

Effective porepressure at the quadpoints or nodes.

Definition at line 95 of file PorousFlowPorosity.h.

Referenced by PorousFlowPorosityHMBiotModulus::computeQpProperties().

◆ _phi0

const VariableValue& PorousFlowPorosity::_phi0
protected

Porosity at zero strain and zero porepressure and zero temperature.

Definition at line 49 of file PorousFlowPorosity.h.

Referenced by atZeroQp().

◆ _porosity

template<bool is_ad>
GenericMaterialProperty<Real, is_ad>& PorousFlowPorosityBaseTempl< is_ad >::_porosity
protectedinherited

◆ _porosity_min

const Real PorousFlowPorosityExponentialBase::_porosity_min
protectedinherited

Minimum allowed porosity.

The ensure_positive transform above only acts for decay > 0, so chemistry-driven porosity (which enters through "a" and "b", not "decay") is otherwise unbounded below and can go negative once pore space is filled by precipitated mineral. If the computed porosity is less than this value it is set to this value instead. Defaults to no floor.

Definition at line 82 of file PorousFlowPorosityExponentialBase.h.

Referenced by PorousFlowPorosityExponentialBase::computeQpProperties(), and PorousFlowPorosityExponentialBase::initQpStatefulProperties().

◆ _porosity_old

const MaterialProperty<Real>* const PorousFlowPorosity::_porosity_old
protected

Old value of porosity.

Definition at line 86 of file PorousFlowPorosity.h.

Referenced by datNegInfinityQp(), and datZeroQp().

◆ _reaction_rate

const MaterialProperty<std::vector<Real> >* const PorousFlowPorosity::_reaction_rate
protected

Reaction rate of mineralisation.

Definition at line 110 of file PorousFlowPorosity.h.

◆ _saturation

const MaterialProperty<std::vector<Real> >* const PorousFlowPorosity::_saturation
protected

Saturation.

Definition at line 119 of file PorousFlowPorosity.h.

◆ _solid_bulk

const Moose::Functor<Real>* PorousFlowPorosity::_solid_bulk
protected

Drained bulk modulus of the porous skeleton (as a functor; can be variable, function, etc.) Only used if _fluid is True.

Definition at line 59 of file PorousFlowPorosity.h.

Referenced by PorousFlowPorosity().

◆ _strain_at_nearest_qp

const bool PorousFlowPorosityExponentialBase::_strain_at_nearest_qp
protectedinherited

When calculating nodal porosity, use the strain at the nearest quadpoint to the node.

Definition at line 64 of file PorousFlowPorosityExponentialBase.h.

Referenced by PorousFlowPorosityHMBiotModulus::computeQpProperties(), ddecayQp_dgradvar(), and decayQp().

◆ _t_reference

const VariableValue& PorousFlowPorosity::_t_reference
protected

Reference temperature.

Definition at line 65 of file PorousFlowPorosity.h.

Referenced by decayQp().

◆ _temperature

const MaterialProperty<Real>* const PorousFlowPorosity::_temperature
protected

Temperature at the quadpoints or nodes.

Definition at line 101 of file PorousFlowPorosity.h.

◆ _thermal

const bool PorousFlowPorosity::_thermal
protected

Porosity is a function of temperature.

Definition at line 43 of file PorousFlowPorosity.h.

Referenced by ddecayQp_dvar(), decayQp(), and PorousFlowPorosity().

◆ _vol_strain_qp

const MaterialProperty<Real>* const PorousFlowPorosity::_vol_strain_qp
protected

Strain (first const means we never want to dereference and change the value, second means we'll always be pointing to the same address after initialization (like a reference))

Definition at line 89 of file PorousFlowPorosity.h.

Referenced by PorousFlowPorosityHMBiotModulus::computeQpProperties().

◆ _zero_modifier

const Real PorousFlowPorosityExponentialBase::_zero_modifier
protectedinherited

If the porosity_min floor is active the porosity derivatives are set to _zero_modifier times their unfloored values (rather than exactly zero) to hint to the Newton process that porosity is not strictly constant, which aids convergence.

Definition at line 90 of file PorousFlowPorosityExponentialBase.h.

Referenced by PorousFlowPorosityExponentialBase::computeQpProperties().


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