20 params.
addParam<std::string>(
"uo_state_var_name",
21 "Name of state variable property: Same as "
22 "state variable user object specified in input "
24 params.
addClassDescription(
"Phenomenological constitutive model slip rate class. Override the "
25 "virtual functions in your class");
32 getMaterialProperty<
std::vector<Real>>(parameters.get<
std::string>(
"uo_state_var_name"))),
36 _flow_direction(getMaterialProperty<
std::vector<
RankTwoTensor>>(_name +
"_flow_direction"))
52 std::vector<Real> vec;
58 if (!(file >> vec[j]))
60 "Error CrystalPlasticitySlipRateGSS: Premature end of slip_sys_flow_rate_param file");
73 mooseError(
"CrystalPlasticitySlipRateGSS: Error in reading flow rate properties: Specify "
74 "input in .i file or a slip_sys_flow_prop_file_name");
83 for (
unsigned int i = 0; i <
_flowprops.size() / num_data_grp; ++i)
91 if (vs <= 0 || ve <= 0)
92 mooseError(
"CrystalPlasticitySlipRateGSS: Indices in flow rate parameter read must be "
93 "positive integers: is = ",
98 if (vs != std::floor(vs) || ve != std::floor(ve))
99 mooseError(
"CrystalPlasticitySlipRateGSS: Error in reading flow props: Values specifying "
100 "start and end number of slip system groups should be integer");
102 is =
static_cast<unsigned int>(vs);
103 ie =
static_cast<unsigned int>(ve);
106 mooseError(
"CrystalPlasticitySlipRateGSS: Start index is = ",
108 " should be greater than end index ie = ",
110 " in flow rate parameter read");
112 for (
unsigned int j = is; j <= ie; ++j)
121 if (!(
_a0(i) > 0.0 &&
_xm(i) > 0.0))
124 "CrystalPlasticitySlipRateGSS: Non-positive flow rate parameters ",
_a0(i),
",",
_xm(i));
132 std::vector<RankTwoTensor> & flow_direction)
const
141 mo(i * LIBMESH_DIM + j) = 0.0;
143 mo(i * LIBMESH_DIM + j) =
144 mo(i * LIBMESH_DIM + j) +
_crysrot[qp](j, k) *
_mo(i * LIBMESH_DIM + k);
149 no(i * LIBMESH_DIM + j) = 0.0;
151 no(i * LIBMESH_DIM + j) =
152 no(i * LIBMESH_DIM + j) +
_crysrot[qp](j, k) *
_no(i * LIBMESH_DIM + k);
160 flow_direction[i](j, k) = mo(i * LIBMESH_DIM + j) * no(i * LIBMESH_DIM + k);
174 std::copysign(1.0, tau(i));
178 mooseWarning(
"Maximum allowable slip increment exceeded ", std::abs(val[i]) * dt);
190 std::vector<Real> & val)
const
198 val[i] =
_a0(i) /
_xm(i) *
registerMooseObject("SolidMechanicsApp", CrystalPlasticitySlipRateGSS)
Phenomenological constitutive model slip rate userobject class.
virtual bool calcSlipRate(unsigned int qp, Real dt, std::vector< Real > &val) const
virtual void getFlowRateParams()
virtual void readFileFlowRateParams()
static InputParameters validParams()
const MaterialProperty< std::vector< Real > > & _mat_prop_state_var
virtual void calcFlowDirection(unsigned int qp, std::vector< RankTwoTensor > &flow_direction) const
CrystalPlasticitySlipRateGSS(const InputParameters ¶meters)
const MaterialProperty< std::vector< RankTwoTensor > > & _flow_direction
virtual bool calcSlipRateDerivative(unsigned int qp, Real, std::vector< Real > &val) const
const MaterialProperty< RankTwoTensor > & _pk2
Crystal plasticity slip rate userobject class The virtual functions written below must be over-ridden...
Real _slip_incr_tol
Slip increment tolerance.
unsigned int _num_slip_sys_flowrate_props
Number of slip system flow rate parameters.
std::string _slip_sys_flow_prop_file_name
File should contain values of the flow rate equation parameters.
static InputParameters validParams()
std::vector< Real > _flowprops
const MaterialProperty< RankTwoTensor > & _crysrot
Crystal rotation.
unsigned int _variable_size
void mooseError(Args &&... args) const
void mooseWarning(Args &&... args) const
bool checkFileReadable(const std::string &filename, bool check_line_endings, bool throw_on_unreadable, bool check_for_git_lfs_pointer)
static constexpr std::size_t dim