Go to the documentation of this file.
11 #include "MooseMesh.h"
13 #include "libmesh/quadrature.h"
22 params.addRequiredCoupledVar(
24 "The displacements appropriate for the simulation geometry and coordinate system");
25 params.addParam<
bool>(
"consistent_with_displaced_mesh",
27 "The volumetric strain rate will "
28 "include terms that ensure fluid "
29 "mass conservation in the "
31 params.addClassDescription(
32 "Compute volumetric strain and the volumetric_strain rate, for use in PorousFlow.");
33 params.set<std::string>(
"pf_material_type") =
"volumetric_strain";
34 params.set<
bool>(
"stateful_displacements") =
true;
35 params.set<
bool>(
"at_nodes") =
false;
41 _consistent(getParam<bool>(
"consistent_with_displaced_mesh")),
42 _ndisp(coupledComponents(
"displacements")),
48 _vol_strain_rate_qp(declareProperty<Real>(
"PorousFlow_volumetric_strain_rate_qp")),
49 _dvol_strain_rate_qp_dvar(
50 declareProperty<std::vector<
RealGradient>>(
"dPorousFlow_volumetric_strain_rate_qp_dvar")),
51 _vol_total_strain_qp(declareProperty<Real>(
"PorousFlow_total_volumetric_strain_qp")),
52 _dvol_total_strain_qp_dvar(
53 declareProperty<std::vector<
RealGradient>>(
"dPorousFlow_total_volumetric_strain_qp_dvar"))
55 if (
_ndisp != _mesh.dimension())
56 paramError(
"displacements",
"The number of variables supplied must match the mesh dimension.");
59 for (
unsigned int i = 0; i <
_ndisp; ++i)
61 _disp[i] = &coupledValue(
"displacements", i);
63 _grad_disp[i] = &coupledGradient(
"displacements", i);
68 for (
unsigned i =
_ndisp; i < 3; ++i)
77 if (_nodal_material ==
true)
78 mooseError(
"PorousFlowVolumetricStrain classes are only defined for at_nodes = false");
100 RankTwoTensor total_strain_increment = 0.5 * (A + A.transpose());
109 for (
unsigned i = 0; i <
_ndisp; ++i)
113 const unsigned int pvar = _dictator.porousFlowVariableNum(
_disp_var_num[i]);
Base class for all PorousFlow vector materials.
InputParameters validParams< PorousFlowMaterialVectorBase >()
MaterialProperty< std::vector< RealGradient > > & _dvol_strain_rate_qp_dvar
The derivative of the volumetric strain rate with respect to the porous flow variables.
const unsigned int _ndisp
Number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D)
const bool _consistent
If true then the strain rate will include terms that ensure mass is conserved when doing integrals ov...
VectorValue< Real > RealGradient
InputParameters validParams< PorousFlowVolumetricStrain >()
std::vector< const VariableValue * > _disp
Displacement variable values at the quad point.
virtual void initQpStatefulProperties() override
virtual void computeQpProperties() override
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)
std::vector< const VariableGradient * > _grad_disp_old
Old value of gradient of the displacements.
PorousFlowVolumetricStrain(const InputParameters ¶meters)
PorousFlowVolumetricStrain computes volumetric strains, and derivatives thereof.
std::vector< unsigned int > _disp_var_num
MOOSE variable number of the displacements variables provided.
MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints.
const unsigned int _num_var
Number of PorousFlow variables.
MaterialProperty< Real > & _vol_strain_rate_qp
The volumetric strain rate at the quadpoints.
std::vector< const VariableGradient * > _grad_disp
Gradient of the displacements.