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) *
Phenomenological constitutive model slip rate userobject class.
registerMooseObject("SolidMechanicsApp", CrystalPlasticitySlipRateGSS)
Crystal plasticity slip rate userobject class The virtual functions written below must be over-ridden...
static constexpr std::size_t dim
CrystalPlasticitySlipRateGSS(const InputParameters ¶meters)
void mooseWarning(Args &&... args) const
virtual bool calcSlipRate(unsigned int qp, Real dt, std::vector< Real > &val) const
static InputParameters validParams()
virtual bool calcSlipRateDerivative(unsigned int qp, Real, std::vector< Real > &val) const
virtual void calcFlowDirection(unsigned int qp, std::vector< RankTwoTensor > &flow_direction) const
virtual void getFlowRateParams()
static InputParameters validParams()
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
PetscErrorCode PetscInt const PetscInt IS * is
std::string _slip_sys_flow_prop_file_name
File should contain values of the flow rate equation parameters.
unsigned int _variable_size
Real _slip_incr_tol
Slip increment tolerance.
unsigned int _num_slip_sys_flowrate_props
Number of slip system flow rate parameters.
const MaterialProperty< std::vector< RankTwoTensor > > & _flow_direction
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< RankTwoTensor > & _crysrot
Crystal rotation.
const MaterialProperty< RankTwoTensor > & _pk2
IntRange< T > make_range(T beg, T end)
std::vector< Real > _flowprops
void mooseError(Args &&... args) const
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
virtual void readFileFlowRateParams()
MooseUnits pow(const MooseUnits &, int)
static const std::string k
const Elem & get(const ElemType type_in)
const MaterialProperty< std::vector< Real > > & _mat_prop_state_var