https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PorousFlow1PhasePTempl< is_ad > Class Template Reference

Material designed to calculate fluid phase porepressure and saturation for the single-phase situation assuming constant effective saturation and porepressure as the nonlinear variable. More...

#include <PorousFlow1PhaseP.h>

Inheritance diagram for PorousFlow1PhasePTempl< is_ad >:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 PorousFlow1PhasePTempl (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 initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
void buildQpPPSS ()
 Assemble std::vectors of porepressure, saturation and temperature at the quadpoints. More...
 

Protected Attributes

const GenericVariableValue< is_ad > & _porepressure_var
 Nodal or quadpoint value of porepressure of the fluid phase. More...
 
const GenericVariableGradient< is_ad > & _gradp_qp_var
 Gradient(_porepressure at quadpoints) More...
 
const unsigned int _porepressure_varnum
 Moose variable number of the porepressure. More...
 
const unsigned int _p_var_num
 The PorousFlow variable number of the porepressure. More...
 
const PorousFlowCapillaryPressure_pc_uo
 Capillary pressure UserObject. More...
 
 usingPorousFlowVariableBaseMembers
 
const unsigned int _num_phases
 Number of phases. More...
 
const unsigned int _num_components
 Number of components. More...
 
const unsigned int _num_pf_vars
 Number of PorousFlow variables. More...
 
GenericMaterialProperty< std::vector< Real >, is_ad > & _porepressure
 Computed nodal or quadpoint values of porepressure of the phases. More...
 
MaterialProperty< std::vector< std::vector< Real > > > *const _dporepressure_dvar
 d(porepressure)/d(PorousFlow variable) More...
 
GenericMaterialProperty< std::vector< RealGradient >, is_ad > *const _gradp_qp
 Grad(p) at the quadpoints. More...
 
MaterialProperty< std::vector< std::vector< Real > > > *const _dgradp_qp_dgradv
 d(grad porepressure)/d(grad PorousFlow variable) at the quadpoints More...
 
MaterialProperty< std::vector< std::vector< RealGradient > > > *const _dgradp_qp_dv
 d(grad porepressure)/d(PorousFlow variable) at the quadpoints More...
 
GenericMaterialProperty< std::vector< Real >, is_ad > & _saturation
 Computed nodal or qp saturation of the phases. More...
 
MaterialProperty< std::vector< std::vector< Real > > > *const _dsaturation_dvar
 d(saturation)/d(PorousFlow variable) More...
 
GenericMaterialProperty< std::vector< RealGradient >, is_ad > *const _grads_qp
 Grad(s) at the quadpoints. More...
 
MaterialProperty< std::vector< std::vector< Real > > > *const _dgrads_qp_dgradv
 d(grad saturation)/d(grad PorousFlow variable) at the quadpoints More...
 
MaterialProperty< std::vector< std::vector< RealGradient > > > *const _dgrads_qp_dv
 d(grad saturation)/d(PorousFlow variable) at the quadpoints More...
 

Detailed Description

template<bool is_ad>
class PorousFlow1PhasePTempl< is_ad >

Material designed to calculate fluid phase porepressure and saturation for the single-phase situation assuming constant effective saturation and porepressure as the nonlinear variable.

Definition at line 22 of file PorousFlow1PhaseP.h.

Constructor & Destructor Documentation

◆ PorousFlow1PhasePTempl()

template<bool is_ad>
PorousFlow1PhasePTempl< is_ad >::PorousFlow1PhasePTempl ( const InputParameters parameters)

Definition at line 31 of file PorousFlow1PhaseP.C.

33  _porepressure_var(_nodal_material ? this->template coupledGenericDofValue<is_ad>("porepressure")
34  : this->template coupledGenericValue<is_ad>("porepressure")),
35  _gradp_qp_var(this->template coupledGenericGradient<is_ad>("porepressure")),
36  _porepressure_varnum(coupled("porepressure")),
37  _p_var_num(_dictator.isPorousFlowVariable(_porepressure_varnum)
38  ? _dictator.porousFlowVariableNum(_porepressure_varnum)
39  : 0),
40  _pc_uo(this->template getUserObject<PorousFlowCapillaryPressure>("capillary_pressure"))
41 {
42  if (_num_phases != 1)
43  mooseError("The Dictator proclaims that the number of phases is ",
44  _dictator.numPhases(),
45  " whereas PorousFlow1PhaseP can only be used for 1-phase simulations. Be aware "
46  "that the Dictator has noted your mistake.");
47 }
const unsigned int _p_var_num
The PorousFlow variable number of the porepressure.
const PorousFlowCapillaryPressure & _pc_uo
Capillary pressure UserObject.
void mooseError(Args &&... args)
Base class for capillary pressure for multiphase flow in porous media.
Base class for thermophysical variable materials, which assemble materials for primary variables such...
const GenericVariableGradient< is_ad > & _gradp_qp_var
Gradient(_porepressure at quadpoints)
const unsigned int _num_phases
Number of phases.
const GenericVariableValue< is_ad > & _porepressure_var
Nodal or quadpoint value of porepressure of the fluid phase.
const unsigned int _porepressure_varnum
Moose variable number of the porepressure.

Member Function Documentation

◆ buildQpPPSS()

template<bool is_ad>
void PorousFlow1PhasePTempl< is_ad >::buildQpPPSS ( )
protected

Assemble std::vectors of porepressure, saturation and temperature at the quadpoints.

Definition at line 94 of file PorousFlow1PhaseP.C.

95 {
96  _porepressure[_qp][0] = _porepressure_var[_qp];
98 }
const PorousFlowCapillaryPressure & _pc_uo
Capillary pressure UserObject.
GenericMaterialProperty< std::vector< Real >, is_ad > & _porepressure
Computed nodal or quadpoint values of porepressure of the phases.
Real saturation(Real pc, unsigned qp=0) const
Saturation as a function of capillary pressure.
GenericMaterialProperty< std::vector< Real >, is_ad > & _saturation
Computed nodal or qp saturation of the phases.
const GenericVariableValue< is_ad > & _porepressure_var
Nodal or quadpoint value of porepressure of the fluid phase.

◆ computeQpProperties()

template<bool is_ad>
void PorousFlow1PhasePTempl< is_ad >::computeQpProperties ( )
overrideprotectedvirtual

Reimplemented from PorousFlowVariableBaseTempl< is_ad >.

Definition at line 59 of file PorousFlow1PhaseP.C.

60 {
61  // size stuff correctly and prepare the derivative matrices with zeroes
63 
64  buildQpPPSS();
65 
66  const auto ds = _pc_uo.dSaturation(_porepressure_var[_qp]);
67 
68  if (!_nodal_material)
69  {
70  (*_gradp_qp)[_qp][0] = _gradp_qp_var[_qp];
71  (*_grads_qp)[_qp][0] = ds * _gradp_qp_var[_qp];
72  }
73 
74  // _porepressure is only dependent on _porepressure, and its derivative is 1
75  if constexpr (!is_ad)
76  if (_dictator.isPorousFlowVariable(_porepressure_varnum))
77  {
78  // _porepressure is a PorousFlow variable
79  (*_dporepressure_dvar)[_qp][0][_p_var_num] = 1.0;
80  (*_dsaturation_dvar)[_qp][0][_p_var_num] = ds;
81 
82  if (!_nodal_material)
83  {
84  (*_dgradp_qp_dgradv)[_qp][0][_p_var_num] = 1.0;
85  (*_dgrads_qp_dgradv)[_qp][0][_p_var_num] = ds;
86  (*_dgrads_qp_dv)[_qp][0][_p_var_num] =
88  }
89  }
90 }
const unsigned int _p_var_num
The PorousFlow variable number of the porepressure.
virtual void computeQpProperties() override
const PorousFlowCapillaryPressure & _pc_uo
Capillary pressure UserObject.
Real dSaturation(Real pc, unsigned qp=0) const
Derivative of saturation wrt capillary pressure.
const GenericVariableGradient< is_ad > & _gradp_qp_var
Gradient(_porepressure at quadpoints)
void buildQpPPSS()
Assemble std::vectors of porepressure, saturation and temperature at the quadpoints.
Real d2Saturation(Real pc, unsigned qp=0) const
Second derivative of saturation wrt capillary pressure.
const GenericVariableValue< is_ad > & _porepressure_var
Nodal or quadpoint value of porepressure of the fluid phase.
const unsigned int _porepressure_varnum
Moose variable number of the porepressure.

◆ initQpStatefulProperties()

template<bool is_ad>
void PorousFlow1PhasePTempl< is_ad >::initQpStatefulProperties ( )
overrideprotectedvirtual

Reimplemented from PorousFlowVariableBaseTempl< is_ad >.

Definition at line 51 of file PorousFlow1PhaseP.C.

52 {
54  buildQpPPSS();
55 }
virtual void initQpStatefulProperties() override
void buildQpPPSS()
Assemble std::vectors of porepressure, saturation and temperature at the quadpoints.

◆ validParams()

template<bool is_ad>
InputParameters PorousFlow1PhasePTempl< is_ad >::validParams ( )
static

Definition at line 18 of file PorousFlow1PhaseP.C.

19 {
21  params.addRequiredCoupledVar("porepressure",
22  "Variable that represents the porepressure of the single phase");
23  params.addRequiredParam<UserObjectName>("capillary_pressure",
24  "Name of the UserObject defining the capillary pressure");
25  params.addClassDescription("This Material is used for the partially saturated single-phase "
26  "situation where porepressure is the primary variable");
27  return params;
28 }
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _dgradp_qp_dgradv

template<bool is_ad>
MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowVariableBaseTempl< is_ad >::_dgradp_qp_dgradv
protectedinherited

d(grad porepressure)/d(grad PorousFlow variable) at the quadpoints

Definition at line 51 of file PorousFlowVariableBase.h.

◆ _dgradp_qp_dv

template<bool is_ad>
MaterialProperty<std::vector<std::vector<RealGradient> > >* const PorousFlowVariableBaseTempl< is_ad >::_dgradp_qp_dv
protectedinherited

d(grad porepressure)/d(PorousFlow variable) at the quadpoints

Definition at line 54 of file PorousFlowVariableBase.h.

◆ _dgrads_qp_dgradv

template<bool is_ad>
MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowVariableBaseTempl< is_ad >::_dgrads_qp_dgradv
protectedinherited

d(grad saturation)/d(grad PorousFlow variable) at the quadpoints

Definition at line 66 of file PorousFlowVariableBase.h.

◆ _dgrads_qp_dv

template<bool is_ad>
MaterialProperty<std::vector<std::vector<RealGradient> > >* const PorousFlowVariableBaseTempl< is_ad >::_dgrads_qp_dv
protectedinherited

d(grad saturation)/d(PorousFlow variable) at the quadpoints

Definition at line 69 of file PorousFlowVariableBase.h.

◆ _dporepressure_dvar

template<bool is_ad>
MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowVariableBaseTempl< is_ad >::_dporepressure_dvar
protectedinherited

d(porepressure)/d(PorousFlow variable)

Definition at line 45 of file PorousFlowVariableBase.h.

◆ _dsaturation_dvar

template<bool is_ad>
MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowVariableBaseTempl< is_ad >::_dsaturation_dvar
protectedinherited

d(saturation)/d(PorousFlow variable)

Definition at line 60 of file PorousFlowVariableBase.h.

◆ _gradp_qp

template<bool is_ad>
GenericMaterialProperty<std::vector<RealGradient>, is_ad>* const PorousFlowVariableBaseTempl< is_ad >::_gradp_qp
protectedinherited

Grad(p) at the quadpoints.

Definition at line 48 of file PorousFlowVariableBase.h.

◆ _gradp_qp_var

template<bool is_ad>
const GenericVariableGradient<is_ad>& PorousFlow1PhasePTempl< is_ad >::_gradp_qp_var
protected

◆ _grads_qp

template<bool is_ad>
GenericMaterialProperty<std::vector<RealGradient>, is_ad>* const PorousFlowVariableBaseTempl< is_ad >::_grads_qp
protectedinherited

Grad(s) at the quadpoints.

Definition at line 63 of file PorousFlowVariableBase.h.

◆ _num_components

template<bool is_ad>
const unsigned int PorousFlowVariableBaseTempl< is_ad >::_num_components
protectedinherited

◆ _num_pf_vars

template<bool is_ad>
const unsigned int PorousFlowVariableBaseTempl< is_ad >::_num_pf_vars
protectedinherited

Number of PorousFlow variables.

Definition at line 39 of file PorousFlowVariableBase.h.

◆ _num_phases

template<bool is_ad>
const unsigned int PorousFlowVariableBaseTempl< is_ad >::_num_phases
protectedinherited

◆ _p_var_num

template<bool is_ad>
const unsigned int PorousFlow1PhasePTempl< is_ad >::_p_var_num
protected

The PorousFlow variable number of the porepressure.

Definition at line 45 of file PorousFlow1PhaseP.h.

◆ _pc_uo

template<bool is_ad>
const PorousFlowCapillaryPressure& PorousFlow1PhasePTempl< is_ad >::_pc_uo
protected

Capillary pressure UserObject.

Definition at line 47 of file PorousFlow1PhaseP.h.

◆ _porepressure

template<bool is_ad>
GenericMaterialProperty<std::vector<Real>, is_ad>& PorousFlowVariableBaseTempl< is_ad >::_porepressure
protectedinherited

◆ _porepressure_var

template<bool is_ad>
const GenericVariableValue<is_ad>& PorousFlow1PhasePTempl< is_ad >::_porepressure_var
protected

Nodal or quadpoint value of porepressure of the fluid phase.

Definition at line 39 of file PorousFlow1PhaseP.h.

◆ _porepressure_varnum

template<bool is_ad>
const unsigned int PorousFlow1PhasePTempl< is_ad >::_porepressure_varnum
protected

Moose variable number of the porepressure.

Definition at line 43 of file PorousFlow1PhaseP.h.

◆ _saturation

template<bool is_ad>
GenericMaterialProperty<std::vector<Real>, is_ad>& PorousFlowVariableBaseTempl< is_ad >::_saturation
protectedinherited

◆ usingPorousFlowVariableBaseMembers

template<bool is_ad>
PorousFlow1PhasePTempl< is_ad >::usingPorousFlowVariableBaseMembers
protected

Definition at line 49 of file PorousFlow1PhaseP.h.


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