https://mooseframework.inl.gov
CrystalPlasticityKalidindiUpdate.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 "libmesh/int_range.h"
12 
14 
17 {
19  params.addClassDescription("Kalidindi version of homogeneous crystal plasticity.");
20  params.addParam<Real>("r", 1.0, "Latent hardening coefficient");
21  params.addParam<Real>("h", 541.5, "hardening constants");
22  params.addParam<Real>("t_sat", 109.8, "saturated slip system strength");
23  params.addParam<Real>("gss_a", 2.5, "coefficient for hardening");
24  params.addParam<Real>("ao", 0.001, "slip rate coefficient");
25  params.addParam<Real>("xm", 0.1, "exponent for slip rate");
26  params.addParam<Real>("gss_initial", 60.8, "initial lattice friction strength of the material");
27 
28  params.addParam<MaterialPropertyName>(
29  "total_twin_volume_fraction",
30  "Total twin volume fraction, if twinning is considered in the simulation");
31 
32  return params;
33 }
34 
36  const InputParameters & parameters)
38  // Constitutive values
39  _r(getParam<Real>("r")),
40  _h(getParam<Real>("h")),
41  _tau_sat(getParam<Real>("t_sat")),
42  _gss_a(getParam<Real>("gss_a")),
43  _ao(getParam<Real>("ao")),
44  _xm(getParam<Real>("xm")),
45  _gss_initial(getParam<Real>("gss_initial")),
46 
47  // resize vectors used in the consititutive slip hardening
48  _hb(_number_slip_systems, 0.0),
49  _slip_resistance_increment(_number_slip_systems, 0.0),
50 
51  // resize local caching vectors used for substepping
52  _previous_substep_slip_resistance(_number_slip_systems, 0.0),
53  _slip_resistance_before_update(_number_slip_systems, 0.0),
54 
55  // Twinning contributions, if used
56  _include_twinning_in_Lp(parameters.isParamValid("total_twin_volume_fraction")),
57  _twin_volume_fraction_total(_include_twinning_in_Lp
58  ? &getMaterialPropertyOld<Real>("total_twin_volume_fraction")
59  : nullptr)
60 {
61 }
62 
63 void
65 {
67  for (const auto i : make_range(_number_slip_systems))
68  {
70  _slip_increment[_qp][i] = 0.0;
71  }
72 }
73 
74 void
76 {
77  // Would also set old dislocation densities here if included in this model
80 }
81 
82 void
84 {
85  // Would also set substepped dislocation densities here if included in this model
87 }
88 
89 bool
91 {
92  for (const auto i : make_range(_number_slip_systems))
93  {
94  _slip_increment[_qp][i] =
95  _ao * std::pow(std::abs(_tau[_qp][i] / _slip_resistance[_qp][i]), 1.0 / _xm);
96  if (_tau[_qp][i] < 0.0)
97  _slip_increment[_qp][i] *= -1.0;
98 
99  if (std::abs(_slip_increment[_qp][i]) * _substep_dt > _slip_incr_tol)
100  {
102  mooseWarning("Maximum allowable slip increment exceeded ",
103  std::abs(_slip_increment[_qp][i]) * _substep_dt);
104 
105  return false;
106  }
107  }
108  return true;
109 }
110 
111 void
113  RankTwoTensor & equivalent_slip_increment)
114 {
116  {
117  for (const auto i : make_range(_number_slip_systems))
118  equivalent_slip_increment += (1.0 - (*_twin_volume_fraction_total)[_qp]) *
120  }
121  else // if no twinning volume fraction material property supplied, use base class
123 }
124 
125 void
127  std::vector<Real> & dslip_dtau)
128 {
129  for (const auto i : make_range(_number_slip_systems))
130  {
132  dslip_dtau[i] = 0.0;
133  else
134  dslip_dtau[i] = _ao / _xm *
135  std::pow(std::abs(_tau[_qp][i] / _slip_resistance[_qp][i]), 1.0 / _xm - 1.0) /
136  _slip_resistance[_qp][i];
137  }
138 }
139 
140 bool
142 {
147 }
148 
149 void
151 {
152  // Would also set substepped dislocation densities here if included in this model
154 }
155 
156 void
158 {
160 }
161 
162 void
164 {
165  for (const auto i : make_range(_number_slip_systems))
166  {
167  // Clear out increment from the previous iteration
169 
170  _hb[i] = _h * std::pow(std::abs(1.0 - _slip_resistance[_qp][i] / _tau_sat), _gss_a);
171  const Real hsign = 1.0 - _slip_resistance[_qp][i] / _tau_sat;
172  if (hsign < 0.0)
173  _hb[i] *= -1.0;
174  }
175 
176  for (const auto i : make_range(_number_slip_systems))
177  {
178  for (const auto j : make_range(_number_slip_systems))
179  {
180  unsigned int iplane, jplane;
181  iplane = i / 3;
182  jplane = j / 3;
183 
184  if (iplane == jplane) // self vs. latent hardening
186  std::abs(_slip_increment[_qp][j]) * _hb[j]; // q_{ab} = 1.0 for self hardening
187  else
189  std::abs(_slip_increment[_qp][j]) * _r * _hb[j]; // latent hardenign
190  }
191  }
192 }
193 
194 bool
196 {
197  // Now perform the check to see if the slip system should be updated
198  for (const auto i : make_range(_number_slip_systems))
199  {
203  else
204  _slip_resistance[_qp][i] =
206 
207  if (_slip_resistance[_qp][i] < 0.0)
208  return false;
209  }
210  return true;
211 }
const Real _r
Varibles used in the Kalidindi 1992 slip system resistance constiutive model.
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
virtual bool updateStateVariables() override
Finalizes the values of the state variables and slip system resistance for the current timestep after...
virtual void initQpStatefulProperties() override
initializes the stateful properties such as PK2 stress, resolved shear stress, plastic deformation gr...
virtual void setInitialConstitutiveVariableValues() override
Sets the value of the current and previous substep iteration slip system resistance to the old value ...
virtual void calculateEquivalentSlipIncrement(RankTwoTensor &)
MaterialProperty< std::vector< Real > > & _slip_increment
Current slip increment material property.
virtual bool areConstitutiveStateVariablesConverged() override
Determines if all the state variables have converged.
virtual void updateSubstepConstitutiveVariableValues() override
Stores the current value of the slip system resistance into a separate material property in case subs...
std::vector< Real > _previous_substep_slip_resistance
Stores the values of the slip system resistance from the previous substep In classes which use disloc...
MaterialProperty< std::vector< Real > > & _slip_resistance
Slip system resistance.
void mooseWarning(Args &&... args) const
Real _substep_dt
Substepping time step value used within the inheriting constitutive models.
virtual void calculateStateVariableEvolutionRateComponent() override
Following the Constitutive model for slip system resistance as given in Kalidindi, S.R., C.A.
unsigned int _qp
virtual void setSubstepConstitutiveVariableValues() override
Sets the current slip system resistance value to the previous substep value.
const unsigned int _number_slip_systems
Maximum number of active slip systems for the crystalline material being modeled. ...
Real _zero_tol
Residual tolerance when variable value is zero. Default 1e-12.
const MaterialProperty< std::vector< Real > > & _slip_resistance_old
MaterialProperty< std::vector< RankTwoTensor > > & _flow_direction
virtual void calculateEquivalentSlipIncrement(RankTwoTensor &) override
virtual void cacheStateVariablesBeforeUpdate() override
Finalizes the values of the state variables and slip system resistance for the current timestep after...
CrystalPlasticityKalidindiUpdate uses the multiplicative decomposition of the deformation gradient an...
virtual bool calculateSlipRate() override
This virtual method is called to calculate the slip system slip increment based on the constitutive m...
CrystalPlasticityKalidindiUpdate(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void calculateConstitutiveSlipDerivative(std::vector< Real > &dslip_dtau) override
This virtual method is called to find the derivative of the slip increment with respect to the applie...
virtual void initQpStatefulProperties() override
initializes the stateful properties such as stress, plastic deformation gradient, slip system resista...
MaterialProperty< std::vector< Real > > & _tau
Resolved shear stress on each slip system.
std::vector< Real > _slip_resistance_increment
Increment of increased resistance for each slip system.
IntRange< T > make_range(T beg, T end)
virtual bool isConstitutiveStateVariableConverged(const std::vector< Real > &current_var, const std::vector< Real > &var_before_update, const std::vector< Real > &previous_substep_var, const Real &tolerance)
Check if a typical state variable, e.g.
const bool _print_convergence_message
Flag to print to console warning messages on stress, constitutive model convergence.
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
registerMooseObject("SolidMechanicsApp", CrystalPlasticityKalidindiUpdate)
std::vector< Real > _hb
Slip system interaction matrix used to calculate the hardening contributions from the self and latent...
Real _resistance_tol
Tolerance for change in slip system resistance over an increment.
std::vector< Real > _slip_resistance_before_update
Caches the value of the current slip system resistance immediately prior to the update of the slip sy...
MooseUnits pow(const MooseUnits &, int)
const bool _include_twinning_in_Lp
Flag to include the total twin volume fraction in the plastic velocity gradient calculation, per Kalidindi IJP (2001).