23 params.
addClassDescription(
"This class uses the discrete material in a radial return isotropic " 24 "plasticity model. This class is one of the basic radial return " 25 "constitutive models, yet it can be used in conjunction with other " 26 "creep and plasticity materials for more complex simulations.");
28 params.
addParam<FunctionName>(
"yield_stress_function",
29 "Yield stress as a function of temperature");
30 params.
addParam<
Real>(
"yield_stress",
"The point at which plastic strain begins accumulating");
31 params.
addParam<FunctionName>(
"hardening_function",
32 "True stress as a function of plastic strain");
33 params.
addParam<
Real>(
"hardening_constant",
"Hardening slope");
34 params.
addCoupledVar(
"temperature", 0.0,
"Coupled Temperature");
38 "String that is prepended to the plastic_strain Material Property",
39 "This has been replaced by the 'base_name' parameter");
40 params.
set<std::string>(
"effective_inelastic_strain_name") =
"effective_plastic_strain";
49 _plastic_prepend(this->template getParam<
std::string>(
"plastic_prepend")),
50 _yield_stress_function(this->isParamValid(
"yield_stress_function")
51 ? &this->getFunction(
"yield_stress_function")
53 _yield_stress(this->isParamValid(
"yield_stress") ? this->template getParam<
Real>(
"yield_stress")
55 _hardening_constant(this->isParamValid(
"hardening_constant")
56 ? this->template getParam<
Real>(
"hardening_constant")
58 _hardening_function(this->isParamValid(
"hardening_function")
59 ? &this->getFunction(
"hardening_function")
61 _yield_condition(-1.0),
62 _hardening_slope(0.0),
63 _plastic_strain(this->template declareGenericProperty<
RankTwoTensor, is_ad>(
64 _base_name + _plastic_prepend +
"plastic_strain")),
65 _plastic_strain_old(this->template getMaterialPropertyOld<
RankTwoTensor>(
66 _base_name + _plastic_prepend +
"plastic_strain")),
68 this->template declareGenericProperty<
Real, is_ad>(_base_name +
"hardening_variable")),
69 _hardening_variable_old(
70 this->template getMaterialPropertyOld<
Real>(_base_name +
"hardening_variable")),
71 _temperature(this->template coupledGenericValue<is_ad>(
"temperature"))
74 mooseError(
"Yield stress must be greater than zero");
78 mooseError(
"Either yield_stress or yield_stress_function must be given");
80 mooseError(
"Either hardening_constant or hardening_function must be defined");
84 "Only the hardening_constant or only the hardening_function can be defined but not both");
91 _hardening_variable[_qp] = 0.0;
92 _plastic_strain[_qp].zero();
99 _hardening_variable[_qp] = _hardening_variable_old[_qp];
100 _plastic_strain[_qp] = _plastic_strain_old[_qp];
105 template <
bool is_ad>
116 _yield_condition = effective_trial_stress - _hardening_variable_old[_qp] - _yield_stress;
117 _hardening_variable[_qp] = _hardening_variable_old[_qp];
118 _plastic_strain[_qp] = _plastic_strain_old[_qp];
121 template <
bool is_ad>
126 mooseAssert(_yield_condition != -1.0,
127 "the yield stress was not updated by computeStressInitialize");
129 if (_yield_condition > 0.0)
131 _hardening_slope = computeHardeningDerivative(scalar);
132 _hardening_variable[_qp] = computeHardeningValue(scalar);
134 return (effective_trial_stress - _hardening_variable[_qp] - _yield_stress) /
135 _three_shear_modulus -
142 template <
bool is_ad>
147 if (_yield_condition > 0.0)
148 return -1.0 - _hardening_slope / _three_shear_modulus;
153 template <
bool is_ad>
157 if (_yield_condition > 0.0)
158 _hardening_variable[_qp] = computeHardeningValue(scalar);
161 template <
bool is_ad>
166 _plastic_strain[_qp] += plastic_strain_increment;
169 template <
bool is_ad>
174 if (_hardening_function)
176 const Real strain_old = this->_effective_inelastic_strain_old[_qp];
177 return _hardening_function->value(strain_old + scalar) - _yield_stress;
180 return _hardening_variable_old[_qp] + _hardening_slope * scalar;
183 template <
bool is_ad>
188 if (_hardening_function)
190 const Real strain_old = this->_effective_inelastic_strain_old[_qp];
191 return _hardening_function->timeDerivative(strain_old);
194 return _hardening_constant;
197 template <
bool is_ad>
202 if (_yield_stress_function)
205 _yield_stress = _yield_stress_function->value(_temperature[_qp], p);
207 if (_yield_stress <= 0.0)
210 ": The calculated yield stress (",
212 ") is less than zero");
const Function * _yield_stress_function
Moose::GenericType< Real, is_ad > GenericReal
virtual void computeYieldStress(const GenericRankFourTensor< is_ad > &elasticity_tensor)
virtual void computeStressFinalize(const GenericRankTwoTensor< is_ad > &plastic_strain_increment) override
Perform any necessary steps to finalize state after return mapping iterations.
static InputParameters validParams()
This class uses the Discrete material in a radial return isotropic plasticity model.
virtual void iterationFinalize(const GenericReal< is_ad > &scalar) override
Finalize internal state variables for a model for a given iteration.
void mooseError(Args &&... args)
virtual void computeStressInitialize(const GenericReal< is_ad > &effective_trial_stress, const GenericRankFourTensor< is_ad > &elasticity_tensor)
Perform any necessary initialization before return mapping iterations.
virtual void computeStressInitialize(const GenericReal< is_ad > &effective_trial_stress, const GenericRankFourTensor< is_ad > &elasticity_tensor) override
Perform any necessary initialization before return mapping iterations.
virtual GenericReal< is_ad > computeDerivative(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar) override
Compute the derivative of the residual as a function of the scalar variable.
static InputParameters validParams()
RadialReturnStressUpdate computes the radial return stress increment for an isotropic elastic-viscopl...
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType
virtual void propagateQpStatefulProperties() override
If updateState is not called during a timestep, this will be.
bool isParamValid(const std::string &name) const
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
IsotropicPlasticityStressUpdateTempl(const InputParameters ¶meters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual GenericReal< is_ad > computeHardeningValue(const GenericReal< is_ad > &scalar)
void propagateQpStatefulPropertiesRadialReturn()
Propagate the properties pertaining to this intermediate class.
virtual GenericReal< is_ad > computeResidual(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar) override
Compute the residual for a predicted value of the scalar.
virtual void initQpStatefulProperties() override
void mooseError(Args &&... args) const
const InputParameters & parameters() const
registerMooseObject("SolidMechanicsApp", ADIsotropicPlasticityStressUpdate)
virtual GenericReal< is_ad > computeHardeningDerivative(const GenericReal< is_ad > &scalar)
GenericReal< is_ad > _yield_stress
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor