www.mooseframework.org
CrystalPlasticityStateVarRateComponentGSS.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<CrystalPlasticityStateVarRateComponent>();
14  params.addParam<std::string>(
15  "uo_slip_rate_name",
16  "Name of slip rate property: Same as slip rate user object specified in input file.");
17  params.addParam<std::string>("uo_state_var_name",
18  "Name of state variable property: Same as "
19  "state variable user object specified in input "
20  "file.");
21  params.addParam<FileName>(
22  "slip_sys_hard_prop_file_name",
23  "",
24  "Name of the file containing the values of hardness evolution parameters");
25  params.addParam<std::vector<Real>>("hprops", "Hardening properties");
26  params.addClassDescription("Phenomenological constitutive model state variable evolution rate "
27  "component base class. Override the virtual functions in your class");
28  return params;
29 }
30 
32  const InputParameters & parameters)
34  _mat_prop_slip_rate(
35  getMaterialProperty<std::vector<Real>>(parameters.get<std::string>("uo_slip_rate_name"))),
36  _mat_prop_state_var(
37  getMaterialProperty<std::vector<Real>>(parameters.get<std::string>("uo_state_var_name"))),
38  _slip_sys_hard_prop_file_name(getParam<FileName>("slip_sys_hard_prop_file_name")),
39  _hprops(getParam<std::vector<Real>>("hprops"))
40 {
41 }
42 
43 bool
45  unsigned int qp, std::vector<Real> & val) const
46 {
47  val.assign(_variable_size, 0.0);
48 
49  Real r = _hprops[0];
50  Real h0 = _hprops[1];
51  Real tau_sat = _hprops[2];
52 
53  DenseVector<Real> hb(_variable_size);
54  Real qab;
55  Real a = _hprops[3]; // Kalidindi
56 
57  for (unsigned int i = 0; i < _variable_size; ++i)
58  hb(i) = h0 * std::pow(std::abs(1.0 - _mat_prop_state_var[qp][i] / tau_sat), a) *
59  copysign(1.0, 1.0 - _mat_prop_state_var[qp][i] / tau_sat);
60 
61  for (unsigned int i = 0; i < _variable_size; ++i)
62  for (unsigned int j = 0; j < _variable_size; ++j)
63  {
64  unsigned int iplane, jplane;
65  iplane = i / 3;
66  jplane = j / 3;
67 
68  if (iplane == jplane) // Kalidindi
69  qab = 1.0;
70  else
71  qab = r;
72 
73  val[i] += std::abs(_mat_prop_slip_rate[qp][j]) * qab * hb(j);
74  }
75 
76  return true;
77 }
virtual bool calcStateVariableEvolutionRateComponent(unsigned int qp, std::vector< Real > &val) const
CrystalPlasticityStateVarRateComponentGSS(const InputParameters &parameters)
InputParameters validParams< CrystalPlasticityStateVarRateComponent >()
const MaterialProperty< std::vector< Real > > & _mat_prop_state_var
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Crystal plasticity state variable evolution rate component userobject base class. ...
InputParameters validParams< CrystalPlasticityStateVarRateComponentGSS >()
const MaterialProperty< std::vector< Real > > & _mat_prop_slip_rate