17 params.
addClassDescription(
"Base class used to calculate viscoplastic responses to be used in " 18 "ComputeMultiplePorousInelasticStress");
21 "The maximum inelastic strain increment allowed in a time step");
23 "inelastic_strain_name",
25 "Name of the material property that stores the effective inelastic strain");
26 params.
addParam<
bool>(
"verbose",
false,
"Flag to output verbose information");
27 params.
addParam<MaterialPropertyName>(
28 "porosity_name",
"porosity",
"Name of porosity material property");
29 params.
addParam<std::string>(
"total_strain_base_name",
"Base name for the total strain");
31 "initial_porosity", 0.0,
"initial_porosity>=0.0 & initial_porosity<1.0",
"Initial porosity");
32 MooseEnum negative_behavior(
"ZERO INITIAL_CONDITION EXCEPTION",
"INITIAL_CONDITION");
34 "negative_behavior", negative_behavior,
"Enum how to handle negative porosities");
44 _total_strain_base_name(this->isParamValid(
"total_strain_base_name")
45 ? this->template getParam<
std::string>(
"total_strain_base_name") +
48 _strain_increment(this->template getGenericMaterialProperty<
RankTwoTensor, is_ad>(
49 _total_strain_base_name +
"strain_increment")),
50 _effective_inelastic_strain(this->template declareGenericProperty<
Real, is_ad>(
51 _base_name +
"effective_" + this->template getParam<
std::string>(
"inelastic_strain_name"))),
52 _effective_inelastic_strain_old(this->template getMaterialPropertyOld<
Real>(
53 _base_name +
"effective_" + this->template getParam<
std::string>(
"inelastic_strain_name"))),
54 _inelastic_strain(this->template declareGenericProperty<
RankTwoTensor, is_ad>(
55 _base_name + this->template getParam<
std::string>(
"inelastic_strain_name"))),
56 _inelastic_strain_old(this->template getMaterialPropertyOld<
RankTwoTensor>(
57 _base_name + this->template getParam<
std::string>(
"inelastic_strain_name"))),
58 _max_inelastic_increment(this->template getParam<
Real>(
"max_inelastic_increment")),
59 _intermediate_porosity(0.0),
60 _porosity_old(this->template getMaterialPropertyOld<
Real>(
"porosity_name")),
61 _verbose(this->template getParam<bool>(
"verbose")),
62 _initial_porosity(this->template getParam<
Real>(
"initial_porosity")),
63 _negative_behavior(this->template getParam<
MooseEnum>(
"negative_behavior")
72 _effective_inelastic_strain[_qp] = 0.0;
73 _inelastic_strain[_qp].zero();
80 _effective_inelastic_strain[_qp] = _effective_inelastic_strain_old[_qp];
81 _inelastic_strain[_qp] = _inelastic_strain_old[_qp];
88 const Real scalar_inelastic_strain_incr =
90 _effective_inelastic_strain_old[_qp]);
92 if (!scalar_inelastic_strain_incr)
93 return std::numeric_limits<Real>::max();
95 return _dt * _max_inelastic_increment / scalar_inelastic_strain_incr;
107 _intermediate_porosity =
108 (1.0 - _porosity_old[_qp]) * (_strain_increment[_qp] - elastic_strain_increment).trace() +
111 if (_intermediate_porosity < 0.0)
113 if (_negative_behavior == NegativeBehavior::ZERO)
114 _intermediate_porosity = 0.0;
115 if (_negative_behavior == NegativeBehavior::INITIAL_CONDITION)
116 _intermediate_porosity = _initial_porosity;
117 if (_negative_behavior == NegativeBehavior::EXCEPTION)
118 mooseException(
"In ", _name,
": porosity is negative.");
121 if (std::isnan(_intermediate_porosity))
122 mooseException(
"In ", _name,
": porosity is nan. Cutting timestep.");
virtual void propagateQpStatefulProperties() override
If updateState is not called during a timestep, this will be.
static InputParameters validParams()
void updateIntermediatePorosity(const GenericRankTwoTensor< is_ad > &elastic_strain_increment)
StressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in t...
ViscoplasticityStressUpdateBaseTempl(const InputParameters ¶meters)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeTimeStepLimit() override
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
virtual void initQpStatefulProperties() override