17 container.addString(
"law",
"Name of the hardening law (e.g. PowerLawHardening)").required(
true);
18 container.addDouble(
"sigma_y",
"Yield strength");
19 container.addDouble(
"eta",
"Plastic viscosity");
22 container.addDouble(
"n",
"Hardening index in reciprocal form");
23 container.addDouble(
"eps0",
"Reference value of accumulated plastic strain");
26 container.addDouble(
"sigma_sat",
"Saturation value of flow strength");
27 container.addDouble(
"strain_constant",
"Constant dictating how fast the exponential decays");
30 container.registerVerifier([](
const axom::inlet::Container& c) ->
bool {
31 axom::inlet::InletType double_type = axom::inlet::InletType::Double;
32 bool sigma_y_present = c.contains(
"sigma_y") && (c[
"sigma_y"].
type() == double_type);
33 bool n_present = c.contains(
"n") && (c[
"n"].
type() == double_type);
34 bool eps0_present = c.contains(
"eps0") && (c[
"eps0"].
type() == double_type);
35 bool sigma_sat_present = c.contains(
"sigma_sat") && (c[
"sigma_sat"].
type() == double_type);
36 bool strain_constant_present = c.contains(
"strain_constant") && (c[
"strain_constant"].
type() == double_type);
37 bool eta_present = c.contains(
"eta") && (c[
"eta"].
type() == double_type);
39 std::string law = c[
"law"];
40 if (law ==
"PowerLawHardening") {
41 return sigma_y_present && n_present && eps0_present && eta_present && !sigma_sat_present && !sigma_sat_present;
42 }
else if (law ==
"VoceHardening") {
43 return sigma_y_present && eta_present && !n_present && !eps0_present && sigma_sat_present &&
44 strain_constant_present;
56 std::string law = base[
"law"];
57 if (law ==
"PowerLawHardening") {
59 .
sigma_y = base[
"sigma_y"], .n = base[
"n"], .eps0 = base[
"eps0"], .eta = base[
"eta"]};
60 }
else if (law ==
"VoceHardening") {
62 .sigma_sat = base[
"sigma_sat"],
63 .strain_constant = base[
"strain_constant"],
Accelerator functionality.
constexpr SERAC_HOST_DEVICE auto type(const tuple< T... > &values)
a function intended to be used for extracting the ith type from a tuple.
std::variant< solid_mechanics::LinearHardening, solid_mechanics::PowerLawHardening, solid_mechanics::VoceHardening > var_hardening_t
Holds all possible isotropic hardening laws that can be utilized in our input file.
The material and load types for the solid functional physics module.
serac::var_hardening_t operator()(const axom::inlet::Container &base)
Returns created object from Inlet container.
Power-law isotropic hardening law.
double sigma_y
yield strength
Voce's isotropic hardening law.
double sigma_y
yield strength