22 params.addParam<std::string>(
"uo_state_var_name",
23 "Name of state variable property: Same as "
24 "state variable user object specified in input "
26 params.addClassDescription(
"Phenomenological constitutive model slip rate class. Override the "
27 "virtual functions in your class");
34 getMaterialProperty<std::vector<Real>>(parameters.get<std::string>(
"uo_state_var_name"))),
38 _flow_direction(getMaterialProperty<std::vector<
RankTwoTensor>>(_name +
"_flow_direction"))
54 std::vector<Real> vec;
60 if (!(file >> vec[j]))
62 "Error CrystalPlasticitySlipRateGSS: Premature end of slip_sys_flow_rate_param file");
75 mooseError(
"CrystalPlasticitySlipRateGSS: Error in reading flow rate properties: Specify "
76 "input in .i file or a slip_sys_flow_prop_file_name");
85 for (
unsigned int i = 0; i <
_flowprops.size() / num_data_grp; ++i)
93 if (vs <= 0 || ve <= 0)
94 mooseError(
"CrystalPlasticitySlipRateGSS: Indices in flow rate parameter read must be "
95 "positive integers: is = ",
100 if (vs != std::floor(vs) || ve != std::floor(ve))
101 mooseError(
"CrystalPlasticitySlipRateGSS: Error in reading flow props: Values specifying "
102 "start and end number of slip system groups should be integer");
104 is = static_cast<unsigned int>(vs);
105 ie = static_cast<unsigned int>(ve);
108 mooseError(
"CrystalPlasticitySlipRateGSS: Start index is = ",
110 " should be greater than end index ie = ",
112 " in flow rate parameter read");
114 for (
unsigned int j = is; j <= ie; ++j)
123 if (!(
_a0(i) > 0.0 &&
_xm(i) > 0.0))
126 "CrystalPlasticitySlipRateGSS: Non-positive flow rate parameters ",
_a0(i),
",",
_xm(i));
134 std::vector<RankTwoTensor> & flow_direction)
const
141 for (
unsigned int j = 0; j < LIBMESH_DIM; ++j)
143 mo(i * LIBMESH_DIM + j) = 0.0;
144 for (
unsigned int k = 0; k < LIBMESH_DIM; ++k)
145 mo(i * LIBMESH_DIM + j) =
146 mo(i * LIBMESH_DIM + j) +
_crysrot[qp](j, k) *
_mo(i * LIBMESH_DIM + k);
149 for (
unsigned int j = 0; j < LIBMESH_DIM; ++j)
151 no(i * LIBMESH_DIM + j) = 0.0;
152 for (
unsigned int k = 0; k < LIBMESH_DIM; ++k)
153 no(i * LIBMESH_DIM + j) =
154 no(i * LIBMESH_DIM + j) +
_crysrot[qp](j, k) *
_no(i * LIBMESH_DIM + k);
160 for (
unsigned int j = 0; j < LIBMESH_DIM; ++j)
161 for (
unsigned int k = 0; k < LIBMESH_DIM; ++k)
162 flow_direction[i](j, k) = mo(i * LIBMESH_DIM + j) * no(i * LIBMESH_DIM + k);
176 std::copysign(1.0, tau(i));
180 mooseWarning(
"Maximum allowable slip increment exceeded ", std::abs(val[i]) * dt);
192 std::vector<Real> & val)
const
200 val[i] =
_a0(i) /
_xm(i) *