https://mooseframework.inl.gov
ComputeMultipleCrystalPlasticityStress.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 
13 #include "libmesh/utility.h"
14 #include "Conversion.h"
15 #include "MooseException.h"
16 
18 
21 {
23 
24  params.addClassDescription(
25  "Crystal Plasticity base class: handles the Newton iteration over the stress residual and "
26  "calculates the Jacobian based on constitutive laws from multiple material classes "
27  "that are inherited from CrystalPlasticityStressUpdateBase");
28  params.addParam<std::string>(
29  "base_name",
30  "Optional parameter that allows the user to define multiple mechanics material systems on "
31  "the same block, i.e. for multiple phases");
32 
33  params.addRequiredParam<std::vector<MaterialName>>(
34  "crystal_plasticity_models",
35  "The material objects to use to calculate crystal plasticity stress and strains.");
36  params.addParam<std::vector<MaterialName>>(
37  "eigenstrain_names", {}, "The material objects to calculate eigenstrains.");
38  params.addParam<MooseEnum>("tan_mod_type",
39  MooseEnum("exact none", "none"),
40  "Type of tangent moduli for preconditioner: default elastic");
41  params.addParam<Real>("rtol", 1e-6, "Constitutive stress residual relative tolerance");
42  params.addParam<Real>("abs_tol", 1e-6, "Constitutive stress residual absolute tolerance");
43  params.addParam<unsigned int>("maxiter", 100, "Maximum number of iterations for stress update");
44  params.addParam<unsigned int>(
45  "maxiter_state_variable", 100, "Maximum number of iterations for state variable update");
46  params.addParam<unsigned int>(
47  "maximum_substep_iteration", 1, "Maximum number of substep iteration");
48  params.addParam<bool>("use_line_search", false, "Use line search in constitutive update");
49  params.addParam<Real>("min_line_search_step_size", 0.01, "Minimum line search step size");
50  params.addParam<Real>("line_search_tol", 0.5, "Line search bisection method tolerance");
51  params.addParam<unsigned int>(
52  "line_search_maxiter", 20, "Line search bisection method maximum number of iteration");
53  params.addParam<MooseEnum>("line_search_method",
54  MooseEnum("CUT_HALF BISECTION", "CUT_HALF"),
55  "The method used in line search");
56  params.addParam<bool>(
57  "print_state_variable_convergence_error_messages",
58  false,
59  "Whether or not to print warning messages from the crystal plasticity specific convergence "
60  "checks on the stress measure and general constitutive model quantinties.");
61  return params;
62 }
63 
65  const InputParameters & parameters)
67  _num_models(getParam<std::vector<MaterialName>>("crystal_plasticity_models").size()),
68  _num_eigenstrains(getParam<std::vector<MaterialName>>("eigenstrain_names").size()),
69  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
70  _elasticity_tensor(getMaterialPropertyByName<RankFourTensor>(_base_name + "elasticity_tensor")),
71  _rtol(getParam<Real>("rtol")),
72  _abs_tol(getParam<Real>("abs_tol")),
73  _maxiter(getParam<unsigned int>("maxiter")),
74  _maxiterg(getParam<unsigned int>("maxiter_state_variable")),
75  _tan_mod_type(getParam<MooseEnum>("tan_mod_type").getEnum<TangentModuliType>()),
76  _max_substep_iter(getParam<unsigned int>("maximum_substep_iteration")),
77  _use_line_search(getParam<bool>("use_line_search")),
78  _min_line_search_step_size(getParam<Real>("min_line_search_step_size")),
79  _line_search_tolerance(getParam<Real>("line_search_tol")),
80  _line_search_max_iterations(getParam<unsigned int>("line_search_maxiter")),
81  _line_search_method(getParam<MooseEnum>("line_search_method").getEnum<LineSearchMethod>()),
82  _plastic_deformation_gradient(declareProperty<RankTwoTensor>("plastic_deformation_gradient")),
83  _plastic_deformation_gradient_old(
84  getMaterialPropertyOld<RankTwoTensor>("plastic_deformation_gradient")),
85  _eigenstrain_deformation_gradient(
86  _num_eigenstrains ? &declareProperty<RankTwoTensor>("eigenstrain_deformation_gradient")
87  : nullptr),
88  _eigenstrain_deformation_gradient_old(
89  _num_eigenstrains
90  ? &getMaterialPropertyOld<RankTwoTensor>("eigenstrain_deformation_gradient")
91  : nullptr),
92  _deformation_gradient(getMaterialProperty<RankTwoTensor>(_base_name + "deformation_gradient")),
93  _deformation_gradient_old(
94  getMaterialPropertyOld<RankTwoTensor>(_base_name + "deformation_gradient")),
95  _pk2(declareProperty<RankTwoTensor>("second_piola_kirchhoff_stress")),
96  _pk2_old(getMaterialPropertyOld<RankTwoTensor>("second_piola_kirchhoff_stress")),
97  _total_lagrangian_strain(
98  declareProperty<RankTwoTensor>("total_lagrangian_strain")), // Lagrangian strain
99  _updated_rotation(declareProperty<RankTwoTensor>("updated_rotation")),
100  _crysrot(getMaterialProperty<RankTwoTensor>(
101  _base_name + "crysrot")), // defined in the elasticity tensor classes for crystal plasticity
102  _print_convergence_message(getParam<bool>("print_state_variable_convergence_error_messages"))
103 {
104  _convergence_failed = false;
105 }
106 
107 void
109 {
112 
113  if (_num_eigenstrains)
114  {
115  (*_eigenstrain_deformation_gradient)[_qp].zero();
116  (*_eigenstrain_deformation_gradient)[_qp].addIa(1.0);
117  }
118  else
119  {
120  // set to identity if no eigenstrain is added
123  }
124 
125  _pk2[_qp].zero();
126 
128 
129  _updated_rotation[_qp].zero();
130  _updated_rotation[_qp].addIa(1.0);
131 
132  for (unsigned int i = 0; i < _num_models; ++i)
133  {
134  _models[i]->setQp(_qp);
135  _models[i]->initQpStatefulProperties();
136  }
137 
138  for (unsigned int i = 0; i < _num_eigenstrains; ++i)
139  {
140  _eigenstrains[i]->setQp(_qp);
141  _eigenstrains[i]->initQpStatefulProperties();
142  }
143 }
144 
145 void
147 {
148  // get crystal plasticity models
149  std::vector<MaterialName> model_names =
150  getParam<std::vector<MaterialName>>("crystal_plasticity_models");
151 
152  for (unsigned int i = 0; i < _num_models; ++i)
153  {
155  dynamic_cast<CrystalPlasticityStressUpdateBase *>(&getMaterialByName(model_names[i]));
156 
157  if (model)
158  {
159  _models.push_back(model);
160  // TODO: check to make sure that the material model is compatible with this class
161  }
162  else
163  mooseError("Model " + model_names[i] +
164  " is not compatible with ComputeMultipleCrystalPlasticityStress");
165  }
166 
167  // get crystal plasticity eigenstrains
168  std::vector<MaterialName> eigenstrain_names =
169  getParam<std::vector<MaterialName>>("eigenstrain_names");
170 
171  for (unsigned int i = 0; i < _num_eigenstrains; ++i)
172  {
175  &getMaterialByName(eigenstrain_names[i]));
176 
177  if (eigenstrain)
178  _eigenstrains.push_back(eigenstrain);
179  else
180  mooseError("Eigenstrain" + eigenstrain_names[i] +
181  " is not compatible with ComputeMultipleCrystalPlasticityStress");
182  }
183 }
184 
185 void
187 {
188  for (unsigned int i = 0; i < _num_models; ++i)
189  {
190  _models[i]->setQp(_qp);
191  _models[i]->setMaterialVectorSize();
192  }
193 
194  for (unsigned int i = 0; i < _num_eigenstrains; ++i)
195  _eigenstrains[i]->setQp(_qp);
196 
197  updateStress(_stress[_qp], _Jacobian_mult[_qp]); // This is NOT the exact jacobian
198 }
199 
200 void
202  RankFourTensor & jacobian_mult)
203 {
204  // Does not support face/boundary material property calculation
205  if (isBoundaryMaterial())
206  return;
207 
208  // Initialize substepping variables
209  unsigned int substep_iter = 1;
210  unsigned int num_substep = 1;
211 
215 
217 
218  // Loop through all models and calculate the schmid tensor for the current state of the crystal
219  // lattice
220  // Not sure if we should pass in the updated or the original rotation here
221  // If not, then we should not need to compute the flow direction every iteration here
222  for (unsigned int i = 0; i < _num_models; ++i)
223  _models[i]->calculateFlowDirection(_crysrot[_qp]);
224 
225  do
226  {
227  _convergence_failed = false;
228  preSolveQp();
229 
230  _substep_dt = _dt / num_substep;
231  for (unsigned int i = 0; i < _num_models; ++i)
232  _models[i]->setSubstepDt(_substep_dt);
233 
234  // calculate F^{eigen} only when we have eigenstrain
237  if (_num_eigenstrains)
239 
240  for (unsigned int istep = 0; istep < num_substep; ++istep)
241  {
243  (static_cast<Real>(istep) + 1) / num_substep * _delta_deformation_gradient;
245 
246  solveQp();
247 
249  {
251  mooseWarning(
252  "The crystal plasticity constitutive model has failed to converge. Increasing "
253  "the number of substeps.");
254 
255  substep_iter++;
256  num_substep *= 2;
257  break;
258  }
259  }
260 
261  if (substep_iter > _max_substep_iter && _convergence_failed)
262  mooseException("ComputeMultipleCrystalPlasticityStress: Constitutive failure");
263  } while (_convergence_failed);
264 
265  postSolveQp(cauchy_stress, jacobian_mult);
266 }
267 
268 void
270 {
271  for (unsigned int i = 0; i < _num_models; ++i)
272  _models[i]->setInitialConstitutiveVariableValues();
273 
274  _pk2[_qp] = _pk2_old[_qp];
276 }
277 
278 void
280 {
281  for (unsigned int i = 0; i < _num_models; ++i)
282  {
283  _models[i]->setSubstepConstitutiveVariableValues();
284  _models[i]->calculateSlipResistance();
285  }
286 
288 
291  return; // pop back up and take a smaller substep
292 
293  for (unsigned int i = 0; i < _num_models; ++i)
294  _models[i]->updateSubstepConstitutiveVariableValues();
295 
296  // save off the old F^{p} inverse now that have converged on the stress and state variables
298 }
299 
300 void
302  RankFourTensor & jacobian_mult)
303 {
304  cauchy_stress = _elastic_deformation_gradient * _pk2[_qp] *
306 
307  calcTangentModuli(jacobian_mult);
308 
313 
314  // Calculate crystal rotation to track separately
315  RankTwoTensor rot;
317  _updated_rotation[_qp] = rot * _crysrot[_qp];
318 }
319 
320 void
322 {
323  unsigned int iteration;
324  bool iter_flag = true;
325 
326  iteration = 0;
327  // Check for slip system resistance update tolerance
328  do
329  {
330  solveStress();
332  return;
333 
335  _inverse_plastic_deformation_grad.inverse(); // the postSoveStress
336 
337  // Update slip system resistance and state variable after the stress has been finalized
338  // We loop through all the models for each calculation
339  // in order to make sure that when coupling appears, the state variables are updated based on
340  // the same components
341  for (unsigned int i = 0; i < _num_models; ++i)
342  _models[i]->cacheStateVariablesBeforeUpdate();
343 
344  for (unsigned int i = 0; i < _num_models; ++i)
345  _models[i]->calculateStateVariableEvolutionRateComponent();
346 
347  for (unsigned int i = 0; i < _num_models; ++i)
348  if (!_models[i]->updateStateVariables())
349  _convergence_failed = true;
350 
351  for (unsigned int i = 0; i < _num_models; ++i)
352  _models[i]->calculateSlipResistance();
353 
355  return;
356 
357  for (unsigned int i = 0; i < _num_models; ++i)
358  {
359  // iter_flag = false, stop iteration if all values are converged and good to go
360  // iter_flag = true, continue iteration if any value is not converged
361  if (!_models[i]->areConstitutiveStateVariablesConverged())
362  {
363  iter_flag = true;
364  break;
365  }
366  else
367  iter_flag = false; // iter_flag = false, stop iteration only when all models returns true
368  }
369 
370  if (iter_flag)
371  {
373  mooseWarning("ComputeMultipleCrystalPlasticityStress: State variables (or the system "
374  "resistance) did not converge at element ",
375  _current_elem->id(),
376  " and qp ",
377  _qp,
378  "\n");
379  }
380  iteration++;
381  } while (iter_flag && iteration < _maxiterg);
382 
383  if (iteration == _maxiterg)
384  {
386  mooseWarning(
387  "ComputeMultipleCrystalPlasticityStress: Hardness Integration error. Reached the "
388  "maximum number of iterations to solve for the state variables at element ",
389  _current_elem->id(),
390  " and qp ",
391  _qp,
392  "\n");
393 
394  _convergence_failed = true;
395  }
396 }
397 
398 void
400 {
401  unsigned int iteration = 0;
402  RankTwoTensor dpk2;
403  Real rnorm, rnorm0, rnorm_prev;
404 
405  // Calculate stress residual
408  {
410  mooseWarning("ComputeMultipleCrystalPlasticityStress: the slip increment exceeds tolerance "
411  "at element ",
412  _current_elem->id(),
413  " and Gauss point ",
414  _qp);
415 
416  return;
417  }
418 
419  rnorm = _residual_tensor.L2norm();
420  rnorm0 = rnorm;
421 
422  // Check for stress residual tolerance; different from user object version which
423  // compares the absolute tolerance of only the original rnorm value
424  while (rnorm > _rtol * rnorm0 && rnorm > _abs_tol && iteration < _maxiter)
425  {
426  // Calculate stress increment
427  dpk2 = -_jacobian.invSymm() * _residual_tensor;
428  _pk2[_qp] = _pk2[_qp] + dpk2;
429 
431 
433  {
435  mooseWarning("ComputeMultipleCrystalPlasticityStress: the slip increment exceeds tolerance "
436  "at element ",
437  _current_elem->id(),
438  " and Gauss point ",
439  _qp);
440 
441  return;
442  }
443 
444  rnorm_prev = rnorm;
445  rnorm = _residual_tensor.L2norm();
446 
447  if (_use_line_search && rnorm > rnorm_prev && !lineSearchUpdate(rnorm_prev, dpk2))
448  {
450  mooseWarning("ComputeMultipleCrystalPlasticityStress: Failed with line search");
451 
452  _convergence_failed = true;
453  return;
454  }
455 
456  if (_use_line_search)
457  rnorm = _residual_tensor.L2norm();
458 
459  iteration++;
460  }
461 
462  if (iteration >= _maxiter)
463  {
465  mooseWarning("ComputeMultipleCrystalPlasticityStress: Stress Integration error rmax = ",
466  rnorm,
467  " and the tolerance is ",
468  _rtol * rnorm0,
469  " when the rnorm0 value is ",
470  rnorm0,
471  " for element ",
472  _current_elem->id(),
473  " and qp ",
474  _qp);
475 
476  _convergence_failed = true;
477  }
478 }
479 
480 // Calculates stress residual equation and jacobian
481 void
483 {
486  return;
488 }
489 
490 void
492 {
493  RankTwoTensor ce, elastic_strain, ce_pk2, equivalent_slip_increment_per_model,
494  equivalent_slip_increment, pk2_new;
495 
496  equivalent_slip_increment.zero();
497 
498  // calculate slip rate in order to compute F^{p-1}
499  for (unsigned int i = 0; i < _num_models; ++i)
500  {
501  equivalent_slip_increment_per_model.zero();
502 
503  // calculate shear stress with consideration of contribution from other physics
504  _models[i]->calculateShearStress(
506 
507  _convergence_failed = !_models[i]->calculateSlipRate();
508 
510  return;
511 
512  _models[i]->calculateEquivalentSlipIncrement(equivalent_slip_increment_per_model);
513  equivalent_slip_increment += equivalent_slip_increment_per_model;
514  }
515 
516  RankTwoTensor residual_equivalent_slip_increment =
517  RankTwoTensor::Identity() - equivalent_slip_increment;
519  _inverse_plastic_deformation_grad_old * residual_equivalent_slip_increment;
520 
524 
526 
527  elastic_strain = ce - RankTwoTensor::Identity();
528  elastic_strain *= 0.5;
529 
530  pk2_new = _elasticity_tensor[_qp] * elastic_strain;
531  _residual_tensor = _pk2[_qp] - pk2_new;
532 }
533 
534 void
536 {
537  // may not need to cache the dfpinvdpk2 here. need to double check
538  RankFourTensor dfedfpinv, deedfe, dfpinvdpk2, dfpinvdpk2_per_model;
539 
541 
542  for (const auto i : make_range(Moose::dim))
543  for (const auto j : make_range(Moose::dim))
544  for (const auto k : make_range(Moose::dim))
545  dfedfpinv(i, j, k, j) = ffeiginv(i, k);
546 
547  for (const auto i : make_range(Moose::dim))
548  for (const auto j : make_range(Moose::dim))
549  for (const auto k : make_range(Moose::dim))
550  {
551  deedfe(i, j, k, i) = deedfe(i, j, k, i) + _elastic_deformation_gradient(k, j) * 0.5;
552  deedfe(i, j, k, j) = deedfe(i, j, k, j) + _elastic_deformation_gradient(k, i) * 0.5;
553  }
554 
555  for (unsigned int i = 0; i < _num_models; ++i)
556  {
557  _models[i]->calculateTotalPlasticDeformationGradientDerivative(
558  dfpinvdpk2_per_model,
562  dfpinvdpk2 += dfpinvdpk2_per_model;
563  }
564 
565  _jacobian =
566  RankFourTensor::IdentityFour() - (_elasticity_tensor[_qp] * deedfe * dfedfpinv * dfpinvdpk2);
567 }
568 
569 void
571 {
572  switch (_tan_mod_type)
573  {
575  elastoPlasticTangentModuli(jacobian_mult);
576  break;
577  default:
578  elasticTangentModuli(jacobian_mult);
579  }
580 }
581 
582 void
584 {
585  RankFourTensor tan_mod;
586  RankTwoTensor pk2fet, fepk2, feiginvfpinv;
587  RankFourTensor deedfe, dsigdpk2dfe, dfedf;
588 
589  // Fill in the matrix stiffness material property
590  for (const auto i : make_range(Moose::dim))
591  for (const auto j : make_range(Moose::dim))
592  for (const auto k : make_range(Moose::dim))
593  {
594  deedfe(i, j, k, i) = deedfe(i, j, k, i) + _elastic_deformation_gradient(k, j) * 0.5;
595  deedfe(i, j, k, j) = deedfe(i, j, k, j) + _elastic_deformation_gradient(k, i) * 0.5;
596  }
597 
598  usingTensorIndices(i_, j_, k_, l_);
599  dsigdpk2dfe = _elastic_deformation_gradient.times<i_, k_, j_, l_>(_elastic_deformation_gradient) *
600  _elasticity_tensor[_qp] * deedfe;
601 
604 
605  for (const auto i : make_range(Moose::dim))
606  for (const auto j : make_range(Moose::dim))
607  for (const auto l : make_range(Moose::dim))
608  {
609  tan_mod(i, j, i, l) += pk2fet(l, j);
610  tan_mod(i, j, j, l) += fepk2(i, l);
611  }
612 
613  tan_mod += dsigdpk2dfe;
614 
615  const auto je = _elastic_deformation_gradient.det();
616  if (je > 0.0)
617  tan_mod /= je;
618 
620  for (const auto i : make_range(Moose::dim))
621  for (const auto j : make_range(Moose::dim))
622  for (const auto l : make_range(Moose::dim))
623  dfedf(i, j, i, l) = feiginvfpinv(l, j);
624 
625  jacobian_mult = tan_mod * dfedf;
626 }
627 
628 void
630 {
631  // update jacobian_mult
632  jacobian_mult = _elasticity_tensor[_qp];
633 }
634 
635 bool
637  const RankTwoTensor & dpk2)
638 {
640  {
641  Real rnorm;
642  Real step = 1.0;
643 
644  do
645  {
646  _pk2[_qp] = _pk2[_qp] - step * dpk2;
647  step /= 2.0;
648  _pk2[_qp] = _pk2[_qp] + step * dpk2;
649 
651  rnorm = _residual_tensor.L2norm();
652  } while (rnorm > rnorm_prev && step > _min_line_search_step_size);
653 
654  // has norm improved or is the step still above minumum search step size?
655  return (rnorm <= rnorm_prev || step > _min_line_search_step_size);
656  }
658  {
659  unsigned int count = 0;
660  Real step_a = 0.0;
661  Real step_b = 1.0;
662  Real step = 1.0;
663  Real s_m = 1000.0;
664  Real rnorm = 1000.0;
665 
667  auto s_b = _residual_tensor.doubleContraction(dpk2);
668  const auto rnorm1 = _residual_tensor.L2norm();
669  _pk2[_qp] = _pk2[_qp] - dpk2;
671  auto s_a = _residual_tensor.doubleContraction(dpk2);
672  const auto rnorm0 = _residual_tensor.L2norm();
673  _pk2[_qp] = _pk2[_qp] + dpk2;
674 
675  if ((rnorm1 / rnorm0) < _line_search_tolerance || s_a * s_b > 0)
676  {
678  return true;
679  }
680 
681  while ((rnorm / rnorm0) > _line_search_tolerance && count < _line_search_max_iterations)
682  {
683  _pk2[_qp] = _pk2[_qp] - step * dpk2;
684  step = 0.5 * (step_b + step_a);
685  _pk2[_qp] = _pk2[_qp] + step * dpk2;
688  rnorm = _residual_tensor.L2norm();
689 
690  if (s_m * s_a < 0.0)
691  {
692  step_b = step;
693  s_b = s_m;
694  }
695  if (s_m * s_b < 0.0)
696  {
697  step_a = step;
698  s_a = s_m;
699  }
700  count++;
701  }
702 
703  // below tolerance and max iterations?
704  return ((rnorm / rnorm0) < _line_search_tolerance && count < _line_search_max_iterations);
705  }
706  else
707  mooseError("Line search method is not provided.");
708 }
709 
710 void
712 {
715 
716  for (unsigned int i = 0; i < _num_eigenstrains; ++i)
717  {
718  _eigenstrains[i]->setSubstepDt(_substep_dt);
719  _eigenstrains[i]->computeQpProperties();
720  _inverse_eigenstrain_deformation_grad *= _eigenstrains[i]->getDeformationGradientInverse();
721  }
722  (*_eigenstrain_deformation_gradient)[_qp] = _inverse_eigenstrain_deformation_grad.inverse();
723 }
const MaterialProperty< RankTwoTensor > & _pk2_old
void solveStateVariables()
Solves the internal variables stress as a function of the slip specified by the constitutive model de...
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
virtual void computeQpStress() override
Compute the stress and store it in the _stress material property for the current quadrature point...
MaterialProperty< RankTwoTensor > & _total_lagrangian_strain
Lagrangian total strain measure for the entire crystal.
RankTwoTensorTempl< Real > inverse() const
void postSolveQp(RankTwoTensor &stress_new, RankFourTensor &jacobian_mult)
Save the final stress and internal variable values after the iterative solve.
RankTwoTensor _temporary_deformation_gradient
Helper deformation gradient tensor variables used in iterative solve.
Real _line_search_tolerance
Line search bisection method tolerance.
void calculateEigenstrainDeformationGrad()
Calculates the deformation gradient due to eigenstrain.
bool _convergence_failed
Flag to check whether convergence is achieved or if substepping is needed.
void calculateResidual()
Calculate stress residual as the difference between the stored material property PK2 stress and the e...
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static RankFourTensorTempl< Real > IdentityFour()
registerMooseObject("SolidMechanicsApp", ComputeMultipleCrystalPlasticityStress)
unsigned int _maxiter
Maximum number of iterations for stress update.
ComputeCrystalPlasticityEigenstrainBase is the base class for computing eigenstrain tensors in crysta...
ComputeMultipleCrystalPlasticityStress(const InputParameters &parameters)
static constexpr std::size_t dim
virtual void updateStress(RankTwoTensor &cauchy_stress, RankFourTensor &jacobian_mult)
Updates the stress (PK2) at a quadrature point by calling constiutive relationship as defined in a ch...
virtual bool isBoundaryMaterial() const override
static RankTwoTensorTempl Identity()
void mooseWarning(Args &&... args) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
const MaterialProperty< RankTwoTensor > & _crysrot
Crystal rotation in the original, or reference, configuration as defined by Euler angle arguments in ...
bool lineSearchUpdate(const Real &rnorm_prev, const RankTwoTensor &dpk2)
performs the line search update
virtual void initQpStatefulProperties() override
initializes the stateful properties such as PK2 stress, resolved shear stress, plastic deformation gr...
enum ComputeMultipleCrystalPlasticityStress::LineSearchMethod _line_search_method
void calculateJacobian()
Calculates the jacobian as ${J} = {I} - {C} {d{E}^e}{d{F}^e} {d{F}^e}{d{F}^P^{-1}} {d{F}^P^{-1}}{d{PK...
const MaterialProperty< RankTwoTensor > & _deformation_gradient
Total deformation gradient RankTwoTensor for the crystal.
void elastoPlasticTangentModuli(RankFourTensor &jacobian_mult)
Real _min_line_search_step_size
Minimum line search step size.
void addIa(const Real &a)
MaterialProperty< RankTwoTensor > & _pk2
Second Piola-Kirchoff stress measure.
Real doubleContraction(const RankTwoTensorTempl< Real > &a) const
Real _abs_tol
Stress residual equation absolute tolerance.
const PertinentGeochemicalSystem model(database, {"H2O", "H+", "HCO3-", "O2(aq)", "Ca++", ">(s)FeOH", "radius_neg1", "radius_neg1.5"}, {"Calcite"}, {}, {"Calcite_asdf"}, {"CH4(aq)"}, {">(s)FeOCa+"}, "O2(aq)", "e-")
ComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains...
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor as defined by a separate class.
MaterialBase & getMaterialByName(const std::string &name, bool no_warn=false, bool no_dep=false)
unsigned int _line_search_max_iterations
Line search bisection method maximum iteration number.
MaterialProperty< RankTwoTensor > & _updated_rotation
Tracks the rotation of the crystal during deformation Note: this rotation tensor is not applied to th...
unsigned int _max_substep_iter
Maximum number of substep iterations.
RankTwoTensorTempl< Real > transpose() const
MaterialProperty< RankTwoTensor > & _plastic_deformation_gradient
Plastic deformation gradient RankTwoTensor for the crystal.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
enum ComputeMultipleCrystalPlasticityStress::TangentModuliType _tan_mod_type
std::vector< CrystalPlasticityStressUpdateBase * > _models
The user supplied cyrstal plasticity consititutive models.
unsigned int _maxiterg
Maximum number of iterations for internal variable update.
RankFourTensorTempl< Real > times(const RankTwoTensorTempl< Real > &b) const
const MaterialProperty< RankTwoTensor > & _deformation_gradient_old
const MaterialProperty< RankTwoTensor > & _plastic_deformation_gradient_old
IntRange< T > make_range(T beg, T end)
void getRUDecompositionRotation(RankTwoTensorTempl< Real > &rot) const
void mooseError(Args &&... args) const
std::vector< ComputeCrystalPlasticityEigenstrainBase * > _eigenstrains
The user supplied cyrstal plasticity eigenstrains.
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MaterialProperty< RankTwoTensor > & _stress
Stress material property.
void calculateResidualAndJacobian()
Calls the residual and jacobian functions used in the stress update algorithm.
void solveQp()
Solve the stress and internal state variables (e.g.
ComputeMultipleCrystalPlasticityStress (used together with CrystalPlasticityStressUpdateBase) uses th...
void solveStress()
solves for stress, updates plastic deformation gradient.
const bool _print_convergence_message
Flag to print to console warning messages on stress, constitutive model convergence.
RankFourTensorTempl< T > invSymm() const
void calcTangentModuli(RankFourTensor &jacobian_mult)
Calculates the tangent moduli for use as a preconditioner, using the elastic or elastic-plastic optio...
RankTwoTensor _delta_deformation_gradient
Used for substepping; Uniformly divides the increment in deformation gradient.
Real _rtol
Stress residual equation relative tolerance.
static const std::string k
Definition: NS.h:130
void ErrorVector unsigned int
void preSolveQp()
Reset the PK2 stress and the inverse deformation gradient to old values and provide an interface for ...