https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
63void
73
74void
81
82void
84{
85 // Would also set substepped dislocation densities here if included in this model
87}
88
89bool
91{
92 for (const auto i : make_range(_number_slip_systems))
93 {
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
111void
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
125void
127 std::vector<Real> & dslip_dtau)
128{
129 for (const auto i : make_range(_number_slip_systems))
130 {
131 if (MooseUtils::absoluteFuzzyEqual(_tau[_qp][i], 0.0))
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) /
137 }
138}
139
140bool
148
149void
151{
152 // Would also set substepped dislocation densities here if included in this model
154}
155
156void
161
162void
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
194bool
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
206
207 if (_slip_resistance[_qp][i] < 0.0)
208 return false;
209 }
210 return true;
211}
registerMooseObject("SolidMechanicsApp", CrystalPlasticityKalidindiUpdate)
CrystalPlasticityKalidindiUpdate uses the multiplicative decomposition of the deformation gradient an...
virtual void updateSubstepConstitutiveVariableValues() override
Stores the current value of the slip system resistance into a separate material property in case subs...
virtual void initQpStatefulProperties() override
initializes the stateful properties such as stress, plastic deformation gradient, slip system resista...
const MaterialProperty< Real > *const _twin_volume_fraction_total
User-defined material property name for the total volume fraction of twins in a twinning propagation ...
virtual bool areConstitutiveStateVariablesConverged() override
Determines if all the state variables have converged.
std::vector< Real > _hb
Slip system interaction matrix used to calculate the hardening contributions from the self and latent...
virtual void setInitialConstitutiveVariableValues() override
Sets the value of the current and previous substep iteration slip system resistance to the old value ...
const Real _r
Varibles used in the Kalidindi 1992 slip system resistance constiutive model.
CrystalPlasticityKalidindiUpdate(const InputParameters &parameters)
virtual void setSubstepConstitutiveVariableValues() override
Sets the current slip system resistance value to the previous substep value.
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...
virtual void cacheStateVariablesBeforeUpdate() override
Finalizes the values of the state variables and slip system resistance for the current timestep after...
const bool _include_twinning_in_Lp
Flag to include the total twin volume fraction in the plastic velocity gradient calculation,...
virtual void calculateStateVariableEvolutionRateComponent() override
Following the Constitutive model for slip system resistance as given in Kalidindi,...
virtual bool calculateSlipRate() override
This virtual method is called to calculate the slip system slip increment based on the constitutive m...
std::vector< Real > _slip_resistance_increment
Increment of increased resistance for each slip system.
virtual bool updateStateVariables() override
Finalizes the values of the state variables and slip system resistance for the current timestep after...
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 calculateEquivalentSlipIncrement(RankTwoTensor &) override
std::vector< Real > _previous_substep_slip_resistance
Stores the values of the slip system resistance from the previous substep In classes which use disloc...
virtual void calculateEquivalentSlipIncrement(RankTwoTensor &)
const unsigned int _number_slip_systems
Maximum number of active slip systems for the crystalline material being modeled.
MaterialProperty< std::vector< Real > > & _slip_resistance
Slip system resistance.
const bool _print_convergence_message
Flag to print to console warning messages on stress, constitutive model convergence.
MaterialProperty< std::vector< Real > > & _slip_increment
Current slip increment material property.
Real _substep_dt
Substepping time step value used within the inheriting constitutive models.
virtual void initQpStatefulProperties() override
initializes the stateful properties such as PK2 stress, resolved shear stress, plastic deformation gr...
Real _zero_tol
Residual tolerance when variable value is zero. Default 1e-12.
MaterialProperty< std::vector< RankTwoTensor > > & _flow_direction
Real _resistance_tol
Tolerance for change in slip system resistance over an increment.
MaterialProperty< std::vector< Real > > & _tau
Resolved shear stress on each slip system.
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 MaterialProperty< std::vector< Real > > & _slip_resistance_old
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
void mooseWarning(Args &&... args) const