13 #include "libmesh/quadrature.h" 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");
26 "The displacements appropriate for the simulation geometry and coordinate system");
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;
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")),
43 _vol_strain_rate_qp(declareProperty<
Real>(
"PorousFlow_volumetric_strain_rate_qp")),
44 _dvol_strain_rate_qp_dvar(
45 declareProperty<
std::vector<
RealGradient>>(
"dPorousFlow_volumetric_strain_rate_qp_dvar")),
46 _vol_total_strain_qp(declareProperty<
Real>(
"PorousFlow_total_volumetric_strain_qp")),
47 _dvol_total_strain_qp_dvar(
48 declareProperty<
std::vector<
RealGradient>>(
"dPorousFlow_total_volumetric_strain_qp_dvar"))
50 if (
_ndisp != _mesh.dimension())
51 paramError(
"displacements",
"The number of variables supplied must match the mesh dimension.");
54 mooseError(
"PorousFlowVolumetricStrain classes are only defined for at_nodes = false");
72 for (
unsigned i = 0; i <
_ndisp; ++i)
76 const unsigned int pvar = _dictator.porousFlowVariableNum(
_disp_var_num[i]);
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)
PorousFlowVolumetricStrain computes volumetric strains, and derivatives thereof.
static InputParameters validParams()
static InputParameters validParams()
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)
virtual void computeQpProperties() override
MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints.
Base class for all PorousFlow vector materials.
virtual void initQpStatefulProperties() override
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.
registerMooseObject("PorousFlowApp", PorousFlowVolumetricStrain)
PorousFlowVolumetricStrain(const InputParameters ¶meters)
const unsigned int _num_var
Number of PorousFlow variables.
const MaterialProperty< RankTwoTensor > & _total_strain
total strain calculated by a Tensor Mechanics strain calculator
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< unsigned int > _disp_var_num
MOOSE variable number of the displacements variables provided.