https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
PorousFlowPorosityLinear Class Reference

Material designed to provide the porosity in PorousFlow simulations porosity_ref + P_coeff * (P - P_ref) + T_coeff * (T - T_ref) + epv_coeff * (epv - epv_ref), where P is the effective porepressure, T is the temperature and epv is the volumetric strain. More...

#include <PorousFlowPorosityLinear.h>

Inheritance diagram for PorousFlowPorosityLinear:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 PorousFlowPorosityLinear (const InputParameters &parameters)
 
virtual void initialSetup () override
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
Moose::Kokkos::MaterialProperty< U, dimension > declareKokkosPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
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="")
 
Moose::Kokkos::MaterialProperty< U, dimension > getKokkosMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
Moose::Kokkos::MaterialProperty< U, dimension > getKokkosMaterialPropertyDerivative (const std::string &base, const SymbolName &c1)
 
Moose::Kokkos::MaterialProperty< U, dimension > getKokkosMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
Moose::Kokkos::MaterialProperty< U, dimension > getKokkosMaterialPropertyDerivative (const std::string &base, const SymbolName &c1)
 
Moose::Kokkos::MaterialProperty< U, dimension > getKokkosMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
Moose::Kokkos::MaterialProperty< U, dimension > getKokkosMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
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 initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
virtual void computeUnboundedPorosityQp ()
 Computes porosity and its derivatives at the current node or quadrature point, without applying the porosity_min lower bound.
 
void applyPorosityMin ()
 If _porosity[_qp] < porosity_min, set _porosity[_qp] = porosity_min and multiply the derivatives of porosity by _zero_modifier (the derivative material properties for non-AD objects, and the AD derivatives for AD objects).
 

Protected Attributes

const bool _strain_at_nearest_qp
 When calculating nodal porosity, use the strain at the nearest quadpoint to the node.
 
const VariableValue & _phi_ref
 Porosity at reference porepressure, temperature and volumetric strain.
 
const VariableValue & _P_ref
 Reference effective porepressure.
 
const VariableValue & _T_ref
 Reference temperature.
 
const VariableValue & _epv_ref
 Reference volumetric strain.
 
const Real _P_coeff
 coefficient of effective porepressure
 
const Real _T_coeff
 coefficient of temperature
 
const Real _epv_coeff
 coefficient of volumetric strain
 
const bool _uses_volstrain
 whether epv_coeff has been set
 
const OptionalMaterialProperty< Real > & _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))
 
const OptionalMaterialProperty< std::vector< RealGradient > > & _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))
 
const bool _uses_pf
 whether P_coeff has been set
 
const OptionalMaterialProperty< Real > & _pf_nodal
 Effective porepressure at the quadpoints or nodes.
 
const OptionalMaterialProperty< Real > & _pf_qp
 
const MaterialProperty< Real > * _pf
 
const OptionalMaterialProperty< std::vector< Real > > & _dpf_dvar_nodal
 d(effective porepressure)/(d porflow variable)
 
const OptionalMaterialProperty< std::vector< Real > > & _dpf_dvar_qp
 
const MaterialProperty< std::vector< Real > > * _dpf_dvar
 
const bool _uses_T
 whether T_coeff has been set
 
const OptionalMaterialProperty< Real > & _temperature_nodal
 Temperature at the quadpoints or nodes.
 
const OptionalMaterialProperty< Real > & _temperature_qp
 
const MaterialProperty< Real > * _temperature
 
const OptionalMaterialProperty< std::vector< Real > > & _dtemperature_dvar_nodal
 d(temperature)/(d porflow variable)
 
const OptionalMaterialProperty< std::vector< Real > > & _dtemperature_dvar_qp
 
const MaterialProperty< std::vector< Real > > * _dtemperature_dvar
 
GenericMaterialProperty< Real, is_ad > & _porosity
 Computed porosity at the nodes or quadpoints.
 
MaterialProperty< std::vector< Real > > *const _dporosity_dvar
 d(porosity)/d(PorousFlow variable)
 
MaterialProperty< std::vector< RealGradient > > *const _dporosity_dgradvar
 d(porosity)/d(grad PorousFlow variable)
 
const Real _porosity_min
 Minimum allowed porosity (default zero, so porosity is never negative)
 
const Real _zero_modifier
 When the porosity_min floor is active, the porosity derivatives are multiplied by this.
 
const unsigned int _num_phases
 Number of phases.
 
const unsigned int _num_components
 Number of fluid components.
 
const unsigned int _num_var
 Number of PorousFlow variables.
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase & _dmi_fe_problem
 

Detailed Description

Material designed to provide the porosity in PorousFlow simulations porosity_ref + P_coeff * (P - P_ref) + T_coeff * (T - T_ref) + epv_coeff * (epv - epv_ref), where P is the effective porepressure, T is the temperature and epv is the volumetric strain.

Definition at line 19 of file PorousFlowPorosityLinear.h.

Constructor & Destructor Documentation

◆ PorousFlowPorosityLinear()

PorousFlowPorosityLinear::PorousFlowPorosityLinear ( const InputParameters &  parameters)

Definition at line 53 of file PorousFlowPorosityLinear.C.

54 : PorousFlowPorosityBase(parameters),
55 _strain_at_nearest_qp(getParam<bool>("strain_at_nearest_qp")),
56 _phi_ref(coupledValue("porosity_ref")),
57 _P_ref(nodalOrQpValue("P_ref")),
58 _T_ref(nodalOrQpValue("T_ref")),
59 _epv_ref(coupledValue("epv_ref")),
60 _P_coeff(getParam<Real>("P_coeff")),
61 _T_coeff(getParam<Real>("T_coeff")),
62 _epv_coeff(getParam<Real>("epv_coeff")),
63
64 _uses_volstrain(parameters.isParamSetByUser("epv_coeff") && _epv_coeff != 0.0),
65 _vol_strain_qp(getOptionalMaterialProperty<Real>("PorousFlow_total_volumetric_strain_qp")),
66 _dvol_strain_qp_dvar(getOptionalMaterialProperty<std::vector<RealGradient>>(
67 "dPorousFlow_total_volumetric_strain_qp_dvar")),
68
69 _uses_pf(parameters.isParamSetByUser("P_coeff") && _P_coeff != 0.0),
70 _pf_nodal(getOptionalMaterialProperty<Real>("PorousFlow_effective_fluid_pressure_nodal")),
71 _pf_qp(getOptionalMaterialProperty<Real>("PorousFlow_effective_fluid_pressure_qp")),
72 _dpf_dvar_nodal(getOptionalMaterialProperty<std::vector<Real>>(
73 "dPorousFlow_effective_fluid_pressure_nodal_dvar")),
74 _dpf_dvar_qp(getOptionalMaterialProperty<std::vector<Real>>(
75 "dPorousFlow_effective_fluid_pressure_qp_dvar")),
76
77 _uses_T(parameters.isParamSetByUser("T_coeff") && _T_coeff != 0.0),
78 _temperature_nodal(getOptionalMaterialProperty<Real>("PorousFlow_temperature_nodal")),
79 _temperature_qp(getOptionalMaterialProperty<Real>("PorousFlow_temperature_qp")),
81 getOptionalMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_nodal_dvar")),
83 getOptionalMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_qp_dvar"))
84{
85}
PorousFlowPorosityBaseTempl< false > PorousFlowPorosityBase
bool isParamSetByUser(const std::string &name) const
const OptionalMaterialProperty< Real > & _pf_nodal
Effective porepressure at the quadpoints or nodes.
const Real _P_coeff
coefficient of effective porepressure
const OptionalMaterialProperty< Real > & _pf_qp
const VariableValue & _P_ref
Reference effective porepressure.
const bool _uses_T
whether T_coeff has been set
const OptionalMaterialProperty< std::vector< RealGradient > > & _dvol_strain_qp_dvar
d(strain)/(dvar) (first const means we never want to dereference and change the value,...
const bool _uses_volstrain
whether epv_coeff has been set
const Real _T_coeff
coefficient of temperature
const OptionalMaterialProperty< std::vector< Real > > & _dtemperature_dvar_qp
const VariableValue & _phi_ref
Porosity at reference porepressure, temperature and volumetric strain.
const VariableValue & _epv_ref
Reference volumetric strain.
const OptionalMaterialProperty< std::vector< Real > > & _dtemperature_dvar_nodal
d(temperature)/(d porflow variable)
const OptionalMaterialProperty< std::vector< Real > > & _dpf_dvar_nodal
d(effective porepressure)/(d porflow variable)
const OptionalMaterialProperty< std::vector< Real > > & _dpf_dvar_qp
const bool _strain_at_nearest_qp
When calculating nodal porosity, use the strain at the nearest quadpoint to the node.
const OptionalMaterialProperty< Real > & _vol_strain_qp
Strain (first const means we never want to dereference and change the value, second means we'll alway...
const bool _uses_pf
whether P_coeff has been set
const VariableValue & _T_ref
Reference temperature.
const Real _epv_coeff
coefficient of volumetric strain
const OptionalMaterialProperty< Real > & _temperature_qp
const OptionalMaterialProperty< Real > & _temperature_nodal
Temperature at the quadpoints or nodes.

Member Function Documentation

◆ applyPorosityMin()

template<bool is_ad>
void PorousFlowPorosityBaseTempl< is_ad >::applyPorosityMin ( )
protectedinherited

If _porosity[_qp] < porosity_min, set _porosity[_qp] = porosity_min and multiply the derivatives of porosity by _zero_modifier (the derivative material properties for non-AD objects, and the AD derivatives for AD objects).

Otherwise do nothing. Derived classes call this at the end of computeQpProperties(), after the unfloored porosity and its derivatives have been computed.

Definition at line 58 of file PorousFlowPorosityBase.C.

59{
61 return;
62
63 if constexpr (!is_ad)
64 {
66 for (unsigned int v = 0; v < _num_var; ++v)
67 {
68 (*_dporosity_dvar)[_qp][v] *= _zero_modifier;
69 (*_dporosity_dgradvar)[_qp][v] *= _zero_modifier;
70 }
71 }
72 else
73 {
74 // The AD path carries its derivatives inside the value and has no derivative material
75 // properties, so the value and the derivatives are softened separately. Assigning
76 // _porosity_min to the ADReal would instead discard the derivatives entirely.
77 _porosity[_qp].value() = _porosity_min;
78 _porosity[_qp].derivatives() *= _zero_modifier;
79 }
80}
const double v
const unsigned int _num_var
Number of PorousFlow variables.
const Real _zero_modifier
When the porosity_min floor is active, the porosity derivatives are multiplied by this.
const Real _porosity_min
Minimum allowed porosity (default zero, so porosity is never negative)
GenericMaterialProperty< Real, is_ad > & _porosity
Computed porosity at the nodes or quadpoints.
auto raw_value(const Eigen::Map< T > &in)

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

◆ computeQpProperties()

void PorousFlowPorosityLinear::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 121 of file PorousFlowPorosityLinear.C.

122{
125}
void applyPorosityMin()
If _porosity[_qp] < porosity_min, set _porosity[_qp] = porosity_min and multiply the derivatives of p...
virtual void computeUnboundedPorosityQp()
Computes porosity and its derivatives at the current node or quadrature point, without applying the p...

◆ computeUnboundedPorosityQp()

void PorousFlowPorosityLinear::computeUnboundedPorosityQp ( )
protectedvirtual

Computes porosity and its derivatives at the current node or quadrature point, without applying the porosity_min lower bound.

Derived classes may override this to add further terms to _porosity and its derivatives; computeQpProperties() then applies porosity_min

Reimplemented in PorousFlowPorosityVinsomeWesterveld.

Definition at line 128 of file PorousFlowPorosityLinear.C.

129{
130 // note the [0] below: _phi_ref is a constant monomial and we use [0] regardless of
131 // _nodal_material
133 if (_uses_pf)
134 porosity += _P_coeff * ((*_pf)[_qp] - _P_ref[_qp]);
135 if (_uses_T)
136 porosity += _T_coeff * ((*_temperature)[_qp] - _T_ref[_qp]);
137 if (_uses_volstrain)
138 {
139 // Note that in the following _strain[_qp] is evaluated at q quadpoint
140 // So _porosity_nodal[_qp], which should be the nodal value of porosity
141 // actually uses the strain at a quadpoint. This
142 // is OK for LINEAR elements, as strain is constant over the element anyway.
143 const unsigned qp_to_use =
144 (_nodal_material && (_bnd || _strain_at_nearest_qp) ? nearestQP(_qp) : _qp);
145 porosity += _epv_coeff * (_vol_strain_qp[qp_to_use] - _epv_ref[0]);
146 }
147
148 _porosity[_qp] = porosity;
149
150 (*_dporosity_dvar)[_qp].resize(_num_var);
151 (*_dporosity_dgradvar)[_qp].resize(_num_var);
152 for (unsigned int pvar = 0; pvar < _num_var; ++pvar)
153 {
154 Real deriv = 0.0;
155 if (_uses_pf)
156 deriv += _P_coeff * (*_dpf_dvar)[_qp][pvar];
157 if (_uses_T)
158 deriv += _T_coeff * (*_dtemperature_dvar)[_qp][pvar];
159 (*_dporosity_dvar)[_qp][pvar] = deriv;
160
161 RealGradient deriv_grad(0.0, 0.0, 0.0);
162 if (_uses_volstrain)
163 {
164 const unsigned qp_to_use =
165 (_nodal_material && (_bnd || _strain_at_nearest_qp) ? nearestQP(_qp) : _qp);
166 deriv_grad += _epv_coeff * _dvol_strain_qp_dvar[qp_to_use][pvar];
167 }
168 (*_dporosity_dgradvar)[_qp][pvar] = deriv_grad;
169 }
170}
Real deriv(unsigned n, unsigned alpha, unsigned beta, Real x)
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by computeQpProperties(), and PorousFlowPorosityVinsomeWesterveld::computeUnboundedPorosityQp().

◆ initialSetup()

void PorousFlowPorosityLinear::initialSetup ( )
overridevirtual

Reimplemented in PorousFlowPorosityVinsomeWesterveld.

Definition at line 88 of file PorousFlowPorosityLinear.C.

89{
90 _pf = _nodal_material ? _pf_nodal.get() : _pf_qp.get();
91 _dpf_dvar = _nodal_material ? _dpf_dvar_nodal.get() : _dpf_dvar_qp.get();
92 if (!(_pf && _dpf_dvar) && _uses_pf)
93 {
94 mooseError("PorousFlowPorosityLinear: When P_coeff is given you must have an effective fluid "
95 "pressure Material");
96 }
97
98 _temperature = _nodal_material ? _temperature_nodal.get() : _temperature_qp.get();
100 _nodal_material ? _dtemperature_dvar_nodal.get() : _dtemperature_dvar_qp.get();
101 if (!_temperature && _uses_T)
103 "PorousFlowPorosityLinear: When T_coeff is given you must have a temperature Material");
104
106 mooseError("PorousFlowPorosityLinear: When epv_coeff is given you must have a "
107 "volumetric-strain Material");
108
109 PorousFlowPorosityBase::initialSetup();
110}
void mooseError(Args &&... args)
const MooseArray< Moose::GenericType< T, is_ad > > & get() const
const MaterialProperty< std::vector< Real > > * _dtemperature_dvar
const MaterialProperty< Real > * _pf
const MaterialProperty< std::vector< Real > > * _dpf_dvar
const MaterialProperty< Real > * _temperature

Referenced by PorousFlowPorosityVinsomeWesterveld::initialSetup().

◆ initQpStatefulProperties()

void PorousFlowPorosityLinear::initQpStatefulProperties ( )
overrideprotectedvirtual

Reimplemented in PorousFlowPorosityVinsomeWesterveld.

Definition at line 113 of file PorousFlowPorosityLinear.C.

114{
115 _porosity[_qp] = _phi_ref[0];
116 (*_dporosity_dvar)[_qp].assign(_num_var, 0.0);
117 (*_dporosity_dgradvar)[_qp].assign(_num_var, 0.0);
118}

Referenced by PorousFlowPorosityVinsomeWesterveld::initQpStatefulProperties().

◆ validParams()

InputParameters PorousFlowPorosityLinear::validParams ( )
static

Definition at line 15 of file PorousFlowPorosityLinear.C.

16{
18 params.addParam<bool>("strain_at_nearest_qp",
19 false,
20 "When calculating nodal porosity that depends on strain, use the strain at "
21 "the nearest quadpoint. This adds a small extra computational burden, and "
22 "is not necessary for simulations involving only linear lagrange elements. "
23 " If you set this to true, you will also want to set the same parameter to "
24 "true for related Kernels and Materials");
26 "porosity_ref",
27 "The porosity at reference effective porepressure, temperature and volumetric strain. This "
28 "must be a real number or a constant monomial variable (not a linear lagrange or other type "
29 "of variable)");
30 params.addCoupledVar(
31 "P_ref",
32 0.0,
33 "The reference effective porepressure. This should usually be a linear-lagrange variable");
34 params.addCoupledVar(
35 "T_ref",
36 0.0,
37 "The reference temperature. This should usually be a linear-lagrange variable");
38 params.addCoupledVar("epv_ref",
39 0.0,
40 "The reference volumetric strain. This must be a real number or a constant "
41 "monomial variable (not a linear lagrange or other type of variable)");
42 params.addParam<Real>("P_coeff", 0.0, "Effective porepressure coefficient");
43 params.addParam<Real>("T_coeff", 0.0, "Temperature coefficient");
44 params.addParam<Real>("epv_coeff", 0.0, "Volumetric-strain coefficient");
46 "This Material calculates the porosity in PorousFlow simulations using the relationship "
47 "porosity_ref + P_coeff * (P - P_ref) + T_coeff * (T - T_ref) + epv_coeff * (epv - epv_ref), "
48 "where P is the effective porepressure, T is the temperature and epv is the volumetric "
49 "strain");
50 return params;
51}
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()

Referenced by PorousFlowPorosityVinsomeWesterveld::validParams().

Member Data Documentation

◆ _dpf_dvar

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

Definition at line 83 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _dpf_dvar_nodal

const OptionalMaterialProperty<std::vector<Real> >& PorousFlowPorosityLinear::_dpf_dvar_nodal
protected

d(effective porepressure)/(d porflow variable)

Definition at line 81 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _dpf_dvar_qp

const OptionalMaterialProperty<std::vector<Real> >& PorousFlowPorosityLinear::_dpf_dvar_qp
protected

Definition at line 82 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _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 42 of file PorousFlowPorosityBase.h.

Referenced by PorousFlowPorosityHMBiotModulus::computeQpProperties().

◆ _dporosity_dvar

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

◆ _dtemperature_dvar

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

◆ _dtemperature_dvar_nodal

const OptionalMaterialProperty<std::vector<Real> >& PorousFlowPorosityLinear::_dtemperature_dvar_nodal
protected

d(temperature)/(d porflow variable)

Definition at line 94 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _dtemperature_dvar_qp

const OptionalMaterialProperty<std::vector<Real> >& PorousFlowPorosityLinear::_dtemperature_dvar_qp
protected

Definition at line 95 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _dvol_strain_qp_dvar

const OptionalMaterialProperty<std::vector<RealGradient> >& PorousFlowPorosityLinear::_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 70 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp(), and initialSetup().

◆ _epv_coeff

const Real PorousFlowPorosityLinear::_epv_coeff
protected

coefficient of volumetric strain

Definition at line 61 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp().

◆ _epv_ref

const VariableValue& PorousFlowPorosityLinear::_epv_ref
protected

Reference volumetric strain.

Definition at line 52 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp().

◆ _num_components

const unsigned int PorousFlowMaterialVectorBase::_num_components
protectedinherited

◆ _num_phases

const unsigned int PorousFlowMaterialVectorBase::_num_phases
protectedinherited

◆ _num_var

const unsigned int PorousFlowMaterialVectorBase::_num_var
protectedinherited

◆ _P_coeff

const Real PorousFlowPorosityLinear::_P_coeff
protected

coefficient of effective porepressure

Definition at line 55 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp().

◆ _P_ref

const VariableValue& PorousFlowPorosityLinear::_P_ref
protected

Reference effective porepressure.

Definition at line 46 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp().

◆ _pf

const MaterialProperty<Real>* PorousFlowPorosityLinear::_pf
protected

Definition at line 78 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _pf_nodal

const OptionalMaterialProperty<Real>& PorousFlowPorosityLinear::_pf_nodal
protected

Effective porepressure at the quadpoints or nodes.

Definition at line 76 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _pf_qp

const OptionalMaterialProperty<Real>& PorousFlowPorosityLinear::_pf_qp
protected

Definition at line 77 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _phi_ref

const VariableValue& PorousFlowPorosityLinear::_phi_ref
protected

Porosity at reference porepressure, temperature and volumetric strain.

Definition at line 43 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp(), and initQpStatefulProperties().

◆ _porosity

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

◆ _porosity_min

template<bool is_ad>
const Real PorousFlowPorosityBaseTempl< is_ad >::_porosity_min
protectedinherited

Minimum allowed porosity (default zero, so porosity is never negative)

Definition at line 45 of file PorousFlowPorosityBase.h.

◆ _strain_at_nearest_qp

const bool PorousFlowPorosityLinear::_strain_at_nearest_qp
protected

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

Definition at line 40 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp().

◆ _T_coeff

const Real PorousFlowPorosityLinear::_T_coeff
protected

coefficient of temperature

Definition at line 58 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp().

◆ _T_ref

const VariableValue& PorousFlowPorosityLinear::_T_ref
protected

Reference temperature.

Definition at line 49 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp().

◆ _temperature

const MaterialProperty<Real>* PorousFlowPorosityLinear::_temperature
protected

◆ _temperature_nodal

const OptionalMaterialProperty<Real>& PorousFlowPorosityLinear::_temperature_nodal
protected

Temperature at the quadpoints or nodes.

Definition at line 89 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _temperature_qp

const OptionalMaterialProperty<Real>& PorousFlowPorosityLinear::_temperature_qp
protected

Definition at line 90 of file PorousFlowPorosityLinear.h.

Referenced by initialSetup().

◆ _uses_pf

const bool PorousFlowPorosityLinear::_uses_pf
protected

whether P_coeff has been set

Definition at line 73 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp(), and initialSetup().

◆ _uses_T

const bool PorousFlowPorosityLinear::_uses_T
protected

whether T_coeff has been set

Definition at line 86 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp(), and initialSetup().

◆ _uses_volstrain

const bool PorousFlowPorosityLinear::_uses_volstrain
protected

whether epv_coeff has been set

Definition at line 64 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp(), and initialSetup().

◆ _vol_strain_qp

const OptionalMaterialProperty<Real>& PorousFlowPorosityLinear::_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 67 of file PorousFlowPorosityLinear.h.

Referenced by computeUnboundedPorosityQp(), and initialSetup().

◆ _zero_modifier

template<bool is_ad>
const Real PorousFlowPorosityBaseTempl< is_ad >::_zero_modifier
protectedinherited

When the porosity_min floor is active, the porosity derivatives are multiplied by this.

Definition at line 48 of file PorousFlowPorosityBase.h.


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