https://mooseframework.inl.gov
CrystalPlasticityTwinningKalidindiUpdate.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(
20  "Twinning propagation model based on Kalidindi's treatment of twinning in a FCC material");
21  params.addParam<Real>(
22  "initial_total_twin_volume_fraction",
23  0.0,
24  "The initial sum of the twin volume fraction across all twin systems in the crystal, if "
25  "any. This value is distributed evenly across all twin systems in the crystal.");
26  params.addRangeCheckedParam<Real>(
27  "twin_reference_strain_rate",
28  1.0e-3,
29  "twin_reference_strain_rate>0",
30  "The reference strain rate, gamma_o, for the power law plastic slip law "
31  "due to twin propagation.");
32  params.addRangeCheckedParam<Real>(
33  "twin_strain_rate_sensitivity_exponent",
34  0.05,
35  "twin_strain_rate_sensitivity_exponent>0",
36  "The strain rate sensitivity exponent for twin propagation power law "
37  "strain rate calculation");
38  params.addRangeCheckedParam<Real>(
39  "characteristic_twin_shear",
40  1.0 / std::sqrt(2.0),
41  "characteristic_twin_shear>0",
42  "The amount of shear that is associated with a twin in this cubic structure");
43  params.addRangeCheckedParam<Real>(
44  "initial_twin_lattice_friction",
45  0.0,
46  "initial_twin_lattice_friction>=0",
47  "The initial value of the lattice friction for twin propogation, often "
48  "calculated as a fraction of the Peierls strength");
49  params.addRangeCheckedParam<Real>(
50  "non_coplanar_coefficient_twin_hardening",
51  8000.0,
52  "non_coplanar_coefficient_twin_hardening>=0",
53  "The factor to apply to the hardening of non-coplanar twin systems "
54  "strength as a function of the volume fraction of twins");
55  params.addRangeCheckedParam<Real>(
56  "coplanar_coefficient_twin_hardening",
57  800.0,
58  "coplanar_coefficient_twin_hardening>=0",
59  "Hardening coefficient for coplanar twin systems strength as a function of "
60  "the volume fraction of twins");
61  params.addRangeCheckedParam<Real>(
62  "non_coplanar_twin_hardening_exponent",
63  0.05,
64  "non_coplanar_twin_hardening_exponent>=0",
65  "Parameter used to increase the hardening of non-coplanar twin systems such that the "
66  "propagation of twins on conplanar systems is favored at early deformation stages.");
67  params.addRangeCheckedParam<Real>(
68  "upper_limit_twin_volume_fraction",
69  0.8,
70  "upper_limit_twin_volume_fraction>0&upper_limit_twin_volume_fraction<=1",
71  "The maximumum amount of twinning volume fraction allowed");
72 
73  return params;
74 }
75 
77  const InputParameters & parameters)
79 
80  _total_twin_volume_fraction(declareProperty<Real>(_base_name + "total_volume_fraction_twins")),
81  _total_twin_volume_fraction_old(
82  getMaterialPropertyOld<Real>(_base_name + "total_volume_fraction_twins")),
83  _initial_total_twin_volume_fraction(getParam<Real>("initial_total_twin_volume_fraction")),
84  _twin_volume_fraction(
85  declareProperty<std::vector<Real>>(_base_name + "twin_system_volume_fraction")),
86  _twin_volume_fraction_old(
87  getMaterialPropertyOld<std::vector<Real>>(_base_name + "twin_system_volume_fraction")),
88  _twin_volume_fraction_increment(
89  declareProperty<std::vector<Real>>(_base_name + "twin_system_volume_fraction_increment")),
90  _reference_strain_rate(getParam<Real>("twin_reference_strain_rate")),
91  _rate_sensitivity_exponent(getParam<Real>("twin_strain_rate_sensitivity_exponent")),
92  _characteristic_twin_shear(getParam<Real>("characteristic_twin_shear")),
93  _twin_initial_lattice_friction(getParam<Real>("initial_twin_lattice_friction")),
94  _non_coplanar_coefficient_twin_hardening(
95  getParam<Real>("non_coplanar_coefficient_twin_hardening")),
96  _coplanar_coefficient_twin_hardening(getParam<Real>("coplanar_coefficient_twin_hardening")),
97  _noncoplanar_exponent(getParam<Real>("non_coplanar_twin_hardening_exponent")),
98  _limit_twin_volume_fraction(getParam<Real>("upper_limit_twin_volume_fraction")),
99 
100  // resize local caching vectors used for substepping
101  _previous_substep_twin_resistance(_number_slip_systems, 0.0),
102  _previous_substep_twin_volume_fraction(_number_slip_systems, 0.0),
103  _twin_resistance_before_update(_number_slip_systems, 0.0),
104  _twin_volume_fraction_before_update(_number_slip_systems, 0.0)
105 {
106 }
107 
108 void
110 {
112 
113  // Resize constitutive-model specific material properties
115 
116  // Set constitutive-model specific initial values from parameters
118  const Real twin_volume_fraction_per_system =
120  for (const auto i : make_range(_number_slip_systems))
121  {
122  _twin_volume_fraction[_qp][i] = twin_volume_fraction_per_system;
124  _slip_increment[_qp][i] = 0.0;
125  }
126 }
127 
128 void
130 {
132 
133  // Resize non-stateful material properties
135 }
136 
137 void
139 {
142 
145 }
146 
147 void
149 {
152 }
153 
154 bool
156 {
157  Real total_twin_volume_fraction = 0.0;
158  for (const auto i : make_range(_number_slip_systems))
159  total_twin_volume_fraction += _twin_volume_fraction[_qp][i];
160 
161  if (total_twin_volume_fraction < _limit_twin_volume_fraction)
162  {
163  for (const auto i : make_range(_number_slip_systems))
164  {
165  if (_tau[_qp][i] > 0.0)
166  {
167  const Real driving_force = (_tau[_qp][i] / _slip_resistance[_qp][i]);
168  _slip_increment[_qp][i] = std::pow(driving_force, (1.0 / _rate_sensitivity_exponent)) *
170  }
171  else // twin propagation is directional
172  _slip_increment[_qp][i] = 0.0;
173 
174  // Check for allowable plastic strain due to twin propagation
176  {
178  mooseWarning("Maximum allowable plastic slip increment due to twinning exceeded the "
179  "user-defined tolerance on twin system ",
180  i,
181  ", with a value of",
182  _slip_increment[_qp][i],
183  " when the increment tolerance is set at ",
185 
186  return false;
187  }
188  }
189  }
190  else // Once reach the limit of volume fraction, all subsequent increments will be zero
191  std::fill(_slip_increment[_qp].begin(), _slip_increment[_qp].end(), 0.0);
192 
193  return true;
194 }
195 
196 void
198  std::vector<Real> & dslip_dtau)
199 {
200  Real total_twin_volume_fraction = 0.0;
201  for (const auto i : make_range(_number_slip_systems))
202  total_twin_volume_fraction += _twin_volume_fraction[_qp][i];
203 
204  // Once reach the limit of volume fraction, all plastic slip increments will be zero
205  if (total_twin_volume_fraction >= _limit_twin_volume_fraction)
206  std::fill(dslip_dtau.begin(), dslip_dtau.end(), 0.0);
207  else
208  {
209  for (const auto i : make_range(_number_slip_systems))
210  {
211  if (_tau[_qp][i] <= 0.0)
212  dslip_dtau[i] = 0.0;
213  else
214  dslip_dtau[i] =
216  }
217  }
218 }
219 
220 bool
222 {
231  return true;
232  return false;
233 }
234 
235 void
237 {
240 }
241 
242 void
244 {
247 }
248 
249 void
251 {
252  for (const auto i : make_range(_number_slip_systems))
255 }
256 
257 bool
259 {
261  return true;
262  else
263  return false;
264 }
265 
266 bool
268 {
270 
271  for (const auto i : make_range(_number_slip_systems))
272  {
276  else
279 
280  if (_twin_volume_fraction[_qp][i] < 0.0)
281  {
283  mooseWarning("A negative twin volume fraction value was computed: ",
285  " on twin system ",
286  i);
287  return false;
288  }
289  else
291  }
292 
295  {
297  mooseWarning("Maximum allowable twin volume fraction limit exceeded with a value of ",
299  " when the limit is set as ",
301  " with a user-set tolerance value of ",
303 
304  return false;
305  }
306  else
307  {
309  return true;
310  }
311 }
312 
313 void
315 {
316  DenseVector<Real> twin_hardening_increment(_number_slip_systems);
317 
318  for (const auto i : make_range(_number_slip_systems))
319  {
320  twin_hardening_increment(i) = 0.0;
321  for (const auto j : make_range(_number_slip_systems))
322  {
325  // If the first two are the same, the third index will have to be as well
326  {
327  if (_slip_increment[_qp][j] > 0.0)
328  twin_hardening_increment(i) += _coplanar_coefficient_twin_hardening *
331  }
332  else // assume non-coplanar
333  {
334  if (_slip_increment[_qp][j] > 0.0)
335  twin_hardening_increment(i) +=
339  }
340  }
341  }
342 
343  for (const auto i : make_range(_number_slip_systems))
344  {
345  twin_hardening_increment(i) *= _characteristic_twin_shear;
346  if (twin_hardening_increment(i) <= 0.0)
348  else
349  _slip_resistance[_qp][i] = twin_hardening_increment(i) + _previous_substep_twin_resistance[i];
350  }
351 }
CrystalPlasticityTwinningKalidindiUpdate(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
virtual void initQpStatefulProperties() override
initializes the stateful properties such as PK2 stress, resolved shear stress, plastic deformation gr...
bool calculateTwinVolumeFraction()
Calculate the current value of the twin volume fraction from the incremented twin volume fraction on ...
MaterialProperty< std::vector< Real > > & _slip_increment
Current slip increment material property.
virtual void initQpStatefulProperties() override
initializes the stateful properties such as PK2 stress, resolved shear stress, plastic deformation gr...
MaterialProperty< std::vector< Real > > & _slip_resistance
Slip system resistance.
std::vector< Real > _previous_substep_twin_resistance
Stores the twin system resistance, twin volume fractions from the previous substep.
void mooseWarning(Args &&... args) const
virtual void cacheStateVariablesBeforeUpdate() override
Finalizes the values of the state variables and slip system resistance for the current timestep after...
virtual void resize(const std::size_t size) override final
Real _substep_dt
Substepping time step value used within the inheriting constitutive models.
unsigned int _qp
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 Real _characteristic_twin_shear
Coefficients for twin dislocation propagation.
const MaterialProperty< std::vector< Real > > & _slip_resistance_old
CrystalPlasticityTwinningKalidindiUpdate uses the multiplicative decomposition of the deformation gra...
void calculateTwinResistance()
Calculates the resistance to twin propagation, following Kalidindi IJP 17 (2001) 837-860 eqn 22...
const MaterialProperty< std::vector< Real > > & _twin_volume_fraction_old
Real _rel_state_var_tol
Internal variable update equation tolerance.
std::vector< Real > _twin_resistance_before_update
Caching current twin resistance, twin volume fractions values before final update.
virtual void calculateStateVariableEvolutionRateComponent() override
Following the constitutive model contributions to plastic shear due to deformation twinning propagati...
virtual bool calculateSlipRate() override
Despite the misnomer which results from the inheriting class structure, Calculates the twin shear inc...
virtual void setInitialConstitutiveVariableValues() override
This virtual method is called to set the constitutive internal state variables current value and the ...
MaterialProperty< std::vector< Real > > & _twin_volume_fraction_increment
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool relativeFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
MaterialProperty< Real > & _total_twin_volume_fraction
Total volume fraction of twins across all twin systems.
MaterialProperty< std::vector< Real > > & _tau
Resolved shear stress on each slip system.
virtual void setSubstepConstitutiveVariableValues() override
This virtual method is called to set the current constitutive internal state variable value to that o...
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)
virtual bool areConstitutiveStateVariablesConverged() override
Determines if all the state variables have converged.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
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 bool updateStateVariables() override
Finalizes the values of the state variables and slip system resistance for the current timestep after...
const Real _reference_strain_rate
Power-law slip rate calculation coefficients, from Kalidindi IJP 17 (2001), 837-860.
Real _resistance_tol
Tolerance for change in slip system resistance over an increment.
registerMooseObject("SolidMechanicsApp", CrystalPlasticityTwinningKalidindiUpdate)
MooseUnits pow(const MooseUnits &, int)
MaterialProperty< std::vector< Real > > & _twin_volume_fraction
Twin volume fraction per twin system.
virtual void updateSubstepConstitutiveVariableValues() override
Stores the current value of the constitutive internal state variables into a separate material proper...