14 #include "PiecewiseLinear.h"
24 params.set<Real>(
"yield_stress") = 1.0;
25 params.set<Real>(
"hardening_constant") = 1.0;
27 params.suppressParameter<Real>(
"yield_stress");
28 params.suppressParameter<FunctionName>(
"yield_stress_function");
29 params.suppressParameter<Real>(
"hardening_constant");
30 params.suppressParameter<FunctionName>(
"hardening_function");
32 params.addRequiredParam<std::vector<FunctionName>>(
33 "hardening_functions",
34 "List of functions of true stress as function of plastic strain at different temperatures");
35 params.addRequiredParam<std::vector<Real>>(
37 "List of temperatures corresponding to the functions listed in 'hardening_functions'");
44 _hardening_functions_names(getParam<std::vector<FunctionName>>(
"hardening_functions")),
45 _hf_temperatures(getParam<std::vector<Real>>(
"temperatures"))
49 mooseError(
"At least two stress-strain curves must be provided in hardening_functions");
54 mooseError(
"The vector of hardening function temperatures must have the same length as the "
55 "vector of temperature dependent hardening functions.");
58 for (
unsigned int i = 1; i < len_temps; ++i)
61 mooseError(
"The temperature dependent hardening functions and corresponding temperatures "
62 "should be listed in order of increasing temperature.");
65 std::vector<Real> yield_stress_vec;
66 for (
unsigned int i = 0; i < len; ++i)
68 const PiecewiseLinear *
const f =
75 yield_stress_vec.push_back(f->value(0.0, Point()));
87 dynamic_cast<const SymmIsotropicElasticityTensor *>(&elasticityTensor);
89 mooseError(
"IsotropicPlasticity requires a SymmIsotropicElasticityTensor");
133 mooseError(
"The hardening function fraction cannot be less than zero.");
152 const Real derivative =
165 mooseError(
"The yield stress must be greater than zero, but during the simulation your yield "
166 "stress became less than zero.");