www.mooseframework.org
CrystalPlasticityStateVarRateComponentGSS.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 #include <cmath>
12 
14 
16 
17 InputParameters
19 {
20  InputParameters params = CrystalPlasticityStateVarRateComponent::validParams();
21  params.addParam<std::string>(
22  "uo_slip_rate_name",
23  "Name of slip rate property: Same as slip rate user object specified in input file.");
24  params.addParam<std::string>("uo_state_var_name",
25  "Name of state variable property: Same as "
26  "state variable user object specified in input "
27  "file.");
28  params.addParam<FileName>(
29  "slip_sys_hard_prop_file_name",
30  "",
31  "Name of the file containing the values of hardness evolution parameters");
32  params.addParam<std::vector<Real>>("hprops", "Hardening properties");
33  params.addClassDescription("Phenomenological constitutive model state variable evolution rate "
34  "component base class. Override the virtual functions in your class");
35  return params;
36 }
37 
39  const InputParameters & parameters)
41  _mat_prop_slip_rate(
42  getMaterialProperty<std::vector<Real>>(parameters.get<std::string>("uo_slip_rate_name"))),
43  _mat_prop_state_var(
44  getMaterialProperty<std::vector<Real>>(parameters.get<std::string>("uo_state_var_name"))),
45  _slip_sys_hard_prop_file_name(getParam<FileName>("slip_sys_hard_prop_file_name")),
46  _hprops(getParam<std::vector<Real>>("hprops"))
47 {
48 }
49 
50 bool
52  unsigned int qp, std::vector<Real> & val) const
53 {
54  val.assign(_variable_size, 0.0);
55 
56  Real r = _hprops[0];
57  Real h0 = _hprops[1];
58  Real tau_sat = _hprops[2];
59 
60  DenseVector<Real> hb(_variable_size);
61  Real qab;
62  Real a = _hprops[3]; // Kalidindi
63 
64  for (unsigned int i = 0; i < _variable_size; ++i)
65  hb(i) = h0 * std::pow(std::abs(1.0 - _mat_prop_state_var[qp][i] / tau_sat), a) *
66  std::copysign(1.0, 1.0 - _mat_prop_state_var[qp][i] / tau_sat);
67 
68  for (unsigned int i = 0; i < _variable_size; ++i)
69  for (unsigned int j = 0; j < _variable_size; ++j)
70  {
71  unsigned int iplane, jplane;
72  iplane = i / 3;
73  jplane = j / 3;
74 
75  if (iplane == jplane) // Kalidindi
76  qab = 1.0;
77  else
78  qab = r;
79 
80  val[i] += std::abs(_mat_prop_slip_rate[qp][j]) * qab * hb(j);
81  }
82 
83  return true;
84 }
CrystalPlasticityStateVarRateComponentGSS::_hprops
std::vector< Real > _hprops
Definition: CrystalPlasticityStateVarRateComponentGSS.h:39
pow
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Definition: ExpressionBuilder.h:673
CrystalPlasticityStateVarRateComponentGSS::calcStateVariableEvolutionRateComponent
virtual bool calcStateVariableEvolutionRateComponent(unsigned int qp, std::vector< Real > &val) const
Definition: CrystalPlasticityStateVarRateComponentGSS.C:51
CrystalPlasticityStateVarRateComponentGSS.h
CrystalPlasticityStateVarRateComponentGSS::CrystalPlasticityStateVarRateComponentGSS
CrystalPlasticityStateVarRateComponentGSS(const InputParameters &parameters)
Definition: CrystalPlasticityStateVarRateComponentGSS.C:38
CrystalPlasticityStateVarRateComponentGSS
Phenomenological constitutive model state variable evolution rate component userobject class.
Definition: CrystalPlasticityStateVarRateComponentGSS.h:22
registerMooseObject
registerMooseObject("TensorMechanicsApp", CrystalPlasticityStateVarRateComponentGSS)
CrystalPlasticityStateVarRateComponentGSS::validParams
static InputParameters validParams()
Definition: CrystalPlasticityStateVarRateComponentGSS.C:18
CrystalPlasticityUOBase::_variable_size
unsigned int _variable_size
Definition: CrystalPlasticityUOBase.h:33
CrystalPlasticityStateVarRateComponent::validParams
static InputParameters validParams()
Definition: CrystalPlasticityStateVarRateComponent.C:15
defineLegacyParams
defineLegacyParams(CrystalPlasticityStateVarRateComponentGSS)
CrystalPlasticityStateVarRateComponentGSS::_mat_prop_slip_rate
const MaterialProperty< std::vector< Real > > & _mat_prop_slip_rate
Definition: CrystalPlasticityStateVarRateComponentGSS.h:33
CrystalPlasticityStateVarRateComponentGSS::_mat_prop_state_var
const MaterialProperty< std::vector< Real > > & _mat_prop_state_var
Definition: CrystalPlasticityStateVarRateComponentGSS.h:34
CrystalPlasticityStateVarRateComponent
Crystal plasticity state variable evolution rate component userobject base class.
Definition: CrystalPlasticityStateVarRateComponent.h:24