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

PorousFlowVolumetricStrain computes volumetric strains, and derivatives thereof. More...

#include <PorousFlowVolumetricStrain.h>

Inheritance diagram for PorousFlowVolumetricStrain:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 PorousFlowVolumetricStrain (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
 

Protected Attributes

const std::string _base_name
 base name used in the Tensor Mechanics strain calculator More...
 
const MaterialProperty< RankTwoTensor > & _total_strain
 total strain calculated by a Tensor Mechanics strain calculator More...
 
const MaterialProperty< RankTwoTensor > & _total_strain_old
 Old value of total strain calculated by a Tensor Mechanics strain calculator. More...
 
const unsigned int _ndisp
 Number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D) More...
 
std::vector< unsigned int_disp_var_num
 MOOSE variable number of the displacements variables provided. More...
 
MaterialProperty< Real > & _vol_strain_rate_qp
 The volumetric strain rate at the quadpoints. More...
 
MaterialProperty< std::vector< RealGradient > > & _dvol_strain_rate_qp_dvar
 The derivative of the volumetric strain rate with respect to the porous flow variables. More...
 
MaterialProperty< Real > & _vol_total_strain_qp
 The total volumetric strain at the quadpoints. More...
 
MaterialProperty< std::vector< RealGradient > > & _dvol_total_strain_qp_dvar
 The derivative of the total volumetric strain with respect to the porous flow variables. 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

PorousFlowVolumetricStrain computes volumetric strains, and derivatives thereof.

Definition at line 18 of file PorousFlowVolumetricStrain.h.

Constructor & Destructor Documentation

◆ PorousFlowVolumetricStrain()

PorousFlowVolumetricStrain::PorousFlowVolumetricStrain ( const InputParameters parameters)

Definition at line 35 of file PorousFlowVolumetricStrain.C.

36  : PorousFlowMaterialVectorBase(parameters),
37  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
38  _total_strain(getMaterialProperty<RankTwoTensor>(_base_name + "total_strain")),
39  _total_strain_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "total_strain")),
40  _ndisp(coupledComponents("displacements")),
41  _disp_var_num(coupledIndices("displacements")),
42 
43  _vol_strain_rate_qp(declareProperty<Real>("PorousFlow_volumetric_strain_rate_qp")),
45  declareProperty<std::vector<RealGradient>>("dPorousFlow_volumetric_strain_rate_qp_dvar")),
46  _vol_total_strain_qp(declareProperty<Real>("PorousFlow_total_volumetric_strain_qp")),
48  declareProperty<std::vector<RealGradient>>("dPorousFlow_total_volumetric_strain_qp_dvar"))
49 {
50  if (_ndisp != _mesh.dimension())
51  paramError("displacements", "The number of variables supplied must match the mesh dimension.");
52 
53  if (_nodal_material)
54  mooseError("PorousFlowVolumetricStrain classes are only defined for at_nodes = false");
55 }
MaterialProperty< std::vector< RealGradient > > & _dvol_strain_rate_qp_dvar
The derivative of the volumetric strain rate with respect to the porous flow variables.
void mooseError(Args &&... args)
const MaterialProperty< RankTwoTensor > & _total_strain_old
Old value of total strain calculated by a Tensor Mechanics strain calculator.
const unsigned int _ndisp
Number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D)
MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints.
MaterialProperty< Real > & _vol_strain_rate_qp
The volumetric strain rate at the quadpoints.
MaterialProperty< std::vector< RealGradient > > & _dvol_total_strain_qp_dvar
The derivative of the total volumetric strain with respect to the porous flow variables.
const MaterialProperty< RankTwoTensor > & _total_strain
total strain calculated by a Tensor Mechanics strain calculator
PorousFlowMaterialVectorBase(const InputParameters &parameters)
std::vector< unsigned int > _disp_var_num
MOOSE variable number of the displacements variables provided.
const std::string _base_name
base name used in the Tensor Mechanics strain calculator

Member Function Documentation

◆ computeQpProperties()

void PorousFlowVolumetricStrain::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 64 of file PorousFlowVolumetricStrain.C.

65 {
66  _vol_total_strain_qp[_qp] = _total_strain[_qp].trace();
67  _vol_strain_rate_qp[_qp] = (_vol_total_strain_qp[_qp] - _total_strain_old[_qp].trace()) / _dt;
68 
69  // prepare the derivatives with zeroes
72  for (unsigned i = 0; i < _ndisp; ++i)
73  if (_dictator.isPorousFlowVariable(_disp_var_num[i]))
74  {
75  // the i_th displacement is a PorousFlow variable
76  const unsigned int pvar = _dictator.porousFlowVariableNum(_disp_var_num[i]);
77  _dvol_strain_rate_qp_dvar[_qp][pvar](i) = 1.0 / _dt;
78  _dvol_total_strain_qp_dvar[_qp][pvar](i) = 1.0;
79  }
80 }
MaterialProperty< std::vector< RealGradient > > & _dvol_strain_rate_qp_dvar
The derivative of the volumetric strain rate with respect to the porous flow variables.
const MaterialProperty< RankTwoTensor > & _total_strain_old
Old value of total strain calculated by a Tensor Mechanics strain calculator.
const unsigned int _ndisp
Number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D)
MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints.
MaterialProperty< Real > & _vol_strain_rate_qp
The volumetric strain rate at the quadpoints.
MaterialProperty< std::vector< RealGradient > > & _dvol_total_strain_qp_dvar
The derivative of the total volumetric strain with respect to the porous flow variables.
const unsigned int _num_var
Number of PorousFlow variables.
const MaterialProperty< RankTwoTensor > & _total_strain
total strain calculated by a Tensor Mechanics strain calculator
std::vector< unsigned int > _disp_var_num
MOOSE variable number of the displacements variables provided.

◆ initQpStatefulProperties()

void PorousFlowVolumetricStrain::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 58 of file PorousFlowVolumetricStrain.C.

59 {
60  _vol_total_strain_qp[_qp] = 0.0;
61 }
MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints.

◆ validParams()

InputParameters PorousFlowVolumetricStrain::validParams ( )
static

Definition at line 18 of file PorousFlowVolumetricStrain.C.

19 {
21  params.addParam<std::string>("base_name",
22  "This should be the same base_name as given to the TensorMechanics "
23  "object that computes strain");
24  params.addRequiredCoupledVar(
25  "displacements",
26  "The displacements appropriate for the simulation geometry and coordinate system");
27  params.addClassDescription(
28  "Compute volumetric strain and the volumetric_strain rate, for use in PorousFlow.");
29  params.set<std::string>("pf_material_type") = "volumetric_strain";
30  params.set<bool>("stateful_displacements") = true;
31  params.set<bool>("at_nodes") = false;
32  return params;
33 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _base_name

const std::string PorousFlowVolumetricStrain::_base_name
protected

base name used in the Tensor Mechanics strain calculator

Definition at line 30 of file PorousFlowVolumetricStrain.h.

◆ _disp_var_num

std::vector<unsigned int> PorousFlowVolumetricStrain::_disp_var_num
protected

MOOSE variable number of the displacements variables provided.

Definition at line 42 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

◆ _dvol_strain_rate_qp_dvar

MaterialProperty<std::vector<RealGradient> >& PorousFlowVolumetricStrain::_dvol_strain_rate_qp_dvar
protected

The derivative of the volumetric strain rate with respect to the porous flow variables.

Since the volumetric strain rate depends on derivatives of the displacement variables, this should be multiplied by _grad_phi in kernels

Definition at line 52 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

◆ _dvol_total_strain_qp_dvar

MaterialProperty<std::vector<RealGradient> >& PorousFlowVolumetricStrain::_dvol_total_strain_qp_dvar
protected

The derivative of the total volumetric strain with respect to the porous flow variables.

Since the total volumetric strain depends on derivatives of the displacement variables, this should be multiplied by _grad_phi in kernels

Definition at line 62 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

◆ _ndisp

const unsigned int PorousFlowVolumetricStrain::_ndisp
protected

Number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D)

Definition at line 39 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties(), and PorousFlowVolumetricStrain().

◆ _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

◆ _total_strain

const MaterialProperty<RankTwoTensor>& PorousFlowVolumetricStrain::_total_strain
protected

total strain calculated by a Tensor Mechanics strain calculator

Definition at line 33 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

◆ _total_strain_old

const MaterialProperty<RankTwoTensor>& PorousFlowVolumetricStrain::_total_strain_old
protected

Old value of total strain calculated by a Tensor Mechanics strain calculator.

Definition at line 36 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

◆ _vol_strain_rate_qp

MaterialProperty<Real>& PorousFlowVolumetricStrain::_vol_strain_rate_qp
protected

The volumetric strain rate at the quadpoints.

Definition at line 45 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

◆ _vol_total_strain_qp

MaterialProperty<Real>& PorousFlowVolumetricStrain::_vol_total_strain_qp
protected

The total volumetric strain at the quadpoints.

Definition at line 55 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().


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