15 params.
addClassDescription(
"Combined isotropic and kinematic plasticity model with nonlinear " 16 "hardening rules, including a Voce model for isotropic hardening and " 17 "an Armstrong-Fredrick model for kinematic hardening.");
18 params.
addParam<
Real>(
"q", 0.0,
"Saturation value for isotropic hardening (Q in Voce model)");
19 params.
addParam<
Real>(
"b", 0.0,
"Rate constant for isotropic hardening (b in Voce model)");
20 params.
addParam<FunctionName>(
"yield_stress_function",
21 "Yield stress as a function of temperature");
22 params.
addParam<
Real>(
"yield_stress",
"The point at which plastic strain begins accumulating");
23 params.
addParam<FunctionName>(
"isotropic_hardening_function",
24 "True stress as a function of plastic strain");
25 params.
addParam<
Real>(
"isotropic_hardening_constant",
"Isotropic hardening slope");
26 params.
addCoupledVar(
"temperature", 0.0,
"Coupled Temperature");
27 params.
set<std::string>(
"effective_inelastic_strain_name") =
"effective_plastic_strain";
28 params.
addParam<
Real>(
"kinematic_hardening_modulus", 0.0,
"Kinematic hardening modulus");
30 "gamma", 0.0,
"The nonlinear hardening parameter (gamma) for back stress evolution");
39 _yield_stress_function(this->isParamValid(
"yield_stress_function")
40 ? &this->getFunction(
"yield_stress_function")
42 _yield_stress(this->isParamValid(
"yield_stress") ? this->template getParam<
Real>(
"yield_stress")
44 _isotropic_hardening_constant(
45 this->isParamValid(
"isotropic_hardening_constant")
46 ? this->template getParam<
Real>(
"isotropic_hardening_constant")
48 _isotropic_hardening_function(this->isParamValid(
"isotropic_hardening_function")
49 ? &this->getFunction(
"isotropic_hardening_function")
51 _yield_condition(-1.0),
52 _isotropic_hardening_slope(0.0),
54 this->template declareGenericProperty<
RankTwoTensor, is_ad>(_base_name +
"plastic_strain")),
56 this->template getMaterialPropertyOld<
RankTwoTensor>(_base_name +
"plastic_strain")),
57 _kinematic_hardening_modulus(this->template getParam<
Real>(
"kinematic_hardening_modulus")),
58 _gamma(this->template getParam<
Real>(
"gamma")),
59 _q(this->template getParam<
Real>(
"q")),
60 _b(this->template getParam<
Real>(
"b")),
61 _isotropic_hardening_variable(this->template declareGenericProperty<
Real, is_ad>(
62 _base_name +
"isotropic_hardening_variable")),
63 _isotropic_hardening_variable_old(
64 this->template getMaterialPropertyOld<
Real>(_base_name +
"isotropic_hardening_variable")),
65 _kinematic_hardening_variable(
66 this->template declareGenericProperty<
Real, is_ad>(
"kinematic_hardening_variable")),
67 _kinematic_hardening_variable_old(
68 this->template getMaterialPropertyOld<
Real>(
"kinematic_hardening_variable")),
69 _temperature(this->template coupledGenericValue<is_ad>(
"temperature"))
72 mooseError(
"Yield stress must be greater than zero");
75 mooseError(
"Either yield_stress or yield_stress_function must be given");
76 if (!parameters.
isParamValid(
"isotropic_hardening_constant") &&
79 "Either isotropic_hardening_constant or isotropic_hardening_function must be defined");
83 "Only the isotropic_hardening_constant or only the isotropic_hardening_function can be " 84 "defined but not both");
91 _isotropic_hardening_variable[_qp] = 0.0;
92 _kinematic_hardening_variable[_qp] = 0.0;
93 _plastic_strain[_qp].zero();
101 _isotropic_hardening_variable[_qp] = _isotropic_hardening_variable_old[_qp];
102 _kinematic_hardening_variable[_qp] = _kinematic_hardening_variable_old[_qp];
103 _plastic_strain[_qp] = _plastic_strain_old[_qp];
108 template <
bool is_ad>
119 effective_trial_stress - _isotropic_hardening_variable_old[_qp] - _yield_stress;
120 _plastic_strain[_qp] = _plastic_strain_old[_qp];
123 template <
bool is_ad>
128 mooseAssert(_yield_condition != -1.0,
129 "the yield stress was not updated by computeStressInitialize");
130 if (_yield_condition > 0.0)
132 _isotropic_hardening_slope = computeIsotropicHardeningDerivative(scalar);
133 _isotropic_hardening_variable[_qp] = computeIsotropicHardeningValue(scalar);
134 _kinematic_hardening_variable[_qp] = computeKinematicHardeningValue(scalar);
135 GenericReal<is_ad> residual = (effective_trial_stress - _kinematic_hardening_variable[_qp] -
136 _isotropic_hardening_variable[_qp] - _yield_stress) /
137 _three_shear_modulus -
144 template <
bool is_ad>
149 if (_yield_condition > 0.0)
150 return -1.0 - _isotropic_hardening_slope / _three_shear_modulus;
154 template <
bool is_ad>
159 if (_yield_condition > 0.0)
161 _isotropic_hardening_variable[_qp] = computeIsotropicHardeningValue(scalar);
162 _kinematic_hardening_variable[_qp] = computeKinematicHardeningValue(scalar);
166 template <
bool is_ad>
171 _plastic_strain[_qp] += plastic_strain_increment;
172 this->_backstress[_qp] =
173 this->_backstress_old[_qp] +
174 (2.0 / 3.0) * _kinematic_hardening_modulus * plastic_strain_increment -
175 _gamma * this->_backstress[_qp] * this->_effective_inelastic_strain_increment;
178 template <
bool is_ad>
183 const Real _q = this->
template getParam<Real>(
"q");
184 const Real _b = this->
template getParam<Real>(
"b");
185 if (_isotropic_hardening_function)
187 const Real strain_old = this->_effective_inelastic_strain_old[_qp];
188 return _isotropic_hardening_function->value(strain_old + scalar) - _yield_stress;
191 _isotropic_hardening_variable[_qp] = _q * (1.0 - std::exp(-_b * scalar));
193 return (_isotropic_hardening_variable_old[_qp] + _isotropic_hardening_slope * scalar +
194 _b * (_q - _isotropic_hardening_variable_old[_qp]) *
195 this->_effective_inelastic_strain_increment);
198 template <
bool is_ad>
203 if (_isotropic_hardening_function)
205 const Real strain_old = this->_effective_inelastic_strain_old[_qp];
206 return _isotropic_hardening_function->timeDerivative(strain_old);
208 return _isotropic_hardening_constant;
211 template <
bool is_ad>
216 _kinematic_hardening_variable[_qp] = _kinematic_hardening_modulus * scalar;
217 return _kinematic_hardening_variable[_qp];
220 template <
bool is_ad>
225 if (_yield_stress_function)
228 _yield_stress = _yield_stress_function->value(_temperature[_qp], p);
229 if (_yield_stress <= 0.0)
232 ": The calculated yield stress (",
234 ") is less than zero");
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.
Moose::GenericType< Real, is_ad > GenericReal
virtual GenericReal< is_ad > computeIsotropicHardeningValue(const GenericReal< is_ad > &scalar)
registerMooseObject("SolidMechanicsApp", ADCombinedNonlinearHardeningPlasticity)
CombinedNonlinearHardeningPlasticityTempl(const InputParameters ¶meters)
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 GenericReal< is_ad > computeKinematicHardeningValue(const GenericReal< is_ad > &scalar)
static InputParameters validParams()
virtual void computeStressFinalize(const GenericRankTwoTensor< is_ad > &plastic_strain_increment) override
Perform any necessary steps to finalize state after 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.
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType
bool isParamValid(const std::string &name) const
virtual void initQpStatefulProperties() override
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
static InputParameters validParams()
virtual void initQpStatefulProperties() override
virtual void propagateQpStatefulProperties() override
If updateState is not called during a timestep, this will be.
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.
const Function * _yield_stress_function
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void propagateQpStatefulPropertiesRadialReturn()
Propagate the properties pertaining to this intermediate class.
void mooseError(Args &&... args) const
const InputParameters & parameters() const
virtual void iterationFinalize(const GenericReal< is_ad > &scalar) override
Finalize internal state variables for a model for a given iteration.
GenericReal< is_ad > _yield_stress
virtual void computeYieldStress(const GenericRankFourTensor< is_ad > &elasticity_tensor)
virtual GenericReal< is_ad > computeIsotropicHardeningDerivative(const GenericReal< is_ad > &scalar)
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor