www.mooseframework.org
ComputeSmearedCrackingStress.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 "ElasticityTensorTools.h"
12 #include "StressUpdateBase.h"
13 #include "Conversion.h"
14 
16 
19 {
21  params.addClassDescription("Compute stress using a fixed smeared cracking model");
22  params.addRequiredParam<std::vector<MaterialName>>(
23  "softening_models",
24  "The material objects used to compute softening behavior for loading a crack."
25  "Either 1 or 3 models must be specified. If a single model is specified, it is"
26  "used for all directions. If 3 models are specified, they will be used for the"
27  "3 crack directions in sequence");
28  params.addRequiredCoupledVar(
29  "cracking_stress",
30  "The stress threshold beyond which cracking occurs. Negative values prevent cracking.");
31  MultiMooseEnum direction("x y z");
32  params.addParam<MultiMooseEnum>(
33  "prescribed_crack_directions", direction, "Prescribed directions of first cracks");
34  params.addParam<unsigned int>(
35  "max_cracks", 3, "The maximum number of cracks allowed at a material point.");
36  params.addRangeCheckedParam<Real>("cracking_neg_fraction",
37  0,
38  "cracking_neg_fraction <= 1 & cracking_neg_fraction >= 0",
39  "The fraction of the cracking strain at which "
40  "a transition begins during decreasing "
41  "strain to the original stiffness.");
42  params.addParam<Real>(
43  "max_stress_correction",
44  1.0,
45  "Maximum permitted correction to the predicted stress as a ratio of the "
46  "stress change to the predicted stress from the previous step's damage level. "
47  "Values less than 1 will improve robustness, but not be as accurate.");
48 
49  params.addRangeCheckedParam<Real>(
50  "shear_retention_factor",
51  0.0,
52  "shear_retention_factor>=0 & shear_retention_factor<=1.0",
53  "Fraction of original shear stiffness to be retained after cracking");
54  params.set<std::vector<MaterialName>>("inelastic_models") = {};
55 
56  MooseEnum crackedElasticityType("DIAGONAL FULL", "DIAGONAL");
57  crackedElasticityType.addDocumentation(
58  "DIAGONAL", "Zero out terms coupling with directions orthogonal to a crack (legacy)");
59  crackedElasticityType.addDocumentation(
60  "FULL", "Consistently scale all entries based on damage (recommended)");
61  params.addParam<MooseEnum>(
62  "cracked_elasticity_type",
63  crackedElasticityType,
64  "Method to modify the local elasticity tensor to account for cracking");
65 
66  return params;
67 }
68 
70  : ComputeMultipleInelasticStress(parameters),
71  _cracking_stress(coupledValue("cracking_stress")),
72  _max_cracks(getParam<unsigned int>("max_cracks")),
73  _cracking_neg_fraction(getParam<Real>("cracking_neg_fraction")),
74  _shear_retention_factor(getParam<Real>("shear_retention_factor")),
75  _max_stress_correction(getParam<Real>("max_stress_correction")),
76  _cracked_elasticity_type(
77  getParam<MooseEnum>("cracked_elasticity_type").getEnum<CrackedElasticityType>()),
78  _crack_damage(declareProperty<RealVectorValue>(_base_name + "crack_damage")),
79  _crack_damage_old(getMaterialPropertyOld<RealVectorValue>(_base_name + "crack_damage")),
80  _crack_flags(declareProperty<RealVectorValue>(_base_name + "crack_flags")),
81  _crack_rotation(declareProperty<RankTwoTensor>(_base_name + "crack_rotation")),
82  _crack_rotation_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "crack_rotation")),
83  _crack_initiation_strain(
84  declareProperty<RealVectorValue>(_base_name + "crack_initiation_strain")),
85  _crack_initiation_strain_old(
86  getMaterialPropertyOld<RealVectorValue>(_base_name + "crack_initiation_strain")),
87  _crack_max_strain(declareProperty<RealVectorValue>(_base_name + "crack_max_strain")),
88  _crack_max_strain_old(getMaterialPropertyOld<RealVectorValue>(_base_name + "crack_max_strain"))
89 {
90  MultiMooseEnum prescribed_crack_directions =
91  getParam<MultiMooseEnum>("prescribed_crack_directions");
92  if (prescribed_crack_directions.size() > 0)
93  {
94  if (prescribed_crack_directions.size() > 3)
95  mooseError("A maximum of three crack directions may be specified");
96  for (unsigned int i = 0; i < prescribed_crack_directions.size(); ++i)
97  {
98  for (unsigned int j = 0; j < i; ++j)
99  if (prescribed_crack_directions[i] == prescribed_crack_directions[j])
100  mooseError("Entries in 'prescribed_crack_directions' cannot be repeated");
102  static_cast<unsigned int>(prescribed_crack_directions.get(i)));
103  }
104 
105  // Fill in the last remaining direction if 2 are specified
106  if (_prescribed_crack_directions.size() == 2)
107  {
108  std::set<unsigned int> available_dirs = {0, 1, 2};
109  for (auto dir : _prescribed_crack_directions)
110  if (available_dirs.erase(dir) != 1)
111  mooseError("Invalid prescribed crack direction:" + Moose::stringify(dir));
112  if (available_dirs.size() != 1)
113  mooseError("Error in finding remaining available crack direction");
114  _prescribed_crack_directions.push_back(*available_dirs.begin());
115  }
116  }
117  if (!isParamSetByUser("cracked_elasticity_type"))
118  paramWarning(
119  "cracked_elasticity_type",
120  "Defaulting to the legacy option of 'DIAGONAL', but the 'FULL' option is preferred");
121 
122  _local_elastic_vector.resize(9);
123 }
124 
125 void
127 {
129 
130  _crack_damage[_qp] = 0.0;
131 
133  _crack_max_strain[_qp](0) = 0.0;
134 
135  switch (_prescribed_crack_directions.size())
136  {
137  case 0:
138  {
140  break;
141  }
142  case 1:
143  {
144  _crack_rotation[_qp].zero();
145  switch (_prescribed_crack_directions[0])
146  {
147  case 0:
148  {
149  _crack_rotation[_qp](0, 0) = 1.0;
150  _crack_rotation[_qp](1, 1) = 1.0;
151  _crack_rotation[_qp](2, 2) = 1.0;
152  break;
153  }
154  case 1:
155  {
156  _crack_rotation[_qp](1, 0) = 1.0;
157  _crack_rotation[_qp](0, 1) = 1.0;
158  _crack_rotation[_qp](2, 2) = 1.0;
159  break;
160  }
161  case 2:
162  {
163  _crack_rotation[_qp](2, 0) = 1.0;
164  _crack_rotation[_qp](0, 1) = 1.0;
165  _crack_rotation[_qp](1, 2) = 1.0;
166  break;
167  }
168  }
169  break;
170  }
171  case 2:
172  {
173  mooseError("Number of prescribed crack directions cannot be 2");
174  break;
175  }
176  case 3:
177  {
178  for (unsigned int i = 0; i < _prescribed_crack_directions.size(); ++i)
179  {
180  RealVectorValue crack_dir_vec;
181  crack_dir_vec(_prescribed_crack_directions[i]) = 1.0;
182  _crack_rotation[_qp].fillColumn(i, crack_dir_vec);
183  }
184  }
185  }
186 }
187 
188 void
190 {
192 
194  mooseError("ComputeSmearedCrackingStress requires that the elasticity tensor be "
195  "guaranteed isotropic");
196 
197  std::vector<MaterialName> soft_matls = getParam<std::vector<MaterialName>>("softening_models");
198  for (auto soft_matl : soft_matls)
199  {
201  dynamic_cast<SmearedCrackSofteningBase *>(&getMaterialByName(soft_matl));
202  if (scsb)
203  _softening_models.push_back(scsb);
204  else
205  paramError("softening_models", "Model " + soft_matl + " is not a softening model");
206  }
207  if (_softening_models.size() == 1)
208  {
209  // Reuse the same model in all 3 directions
210  _softening_models.push_back(_softening_models[0]);
211  _softening_models.push_back(_softening_models[0]);
212  }
213  else if (_softening_models.size() != 3)
214  paramError("softening_models", "Either 1 or 3 softening models must be specified");
215 }
216 
217 void
219 {
220  bool force_elasticity_rotation = false;
221 
222  if (!previouslyCracked())
224  else
225  {
227 
228  // Propagate behavior from the (now inactive) inelastic models
230  for (auto model : _models)
231  {
232  model->setQp(_qp);
233  model->propagateQpStatefulProperties();
234  }
235 
236  // Since the other inelastic models are inactive, they will not limit the time step
237  _material_timestep_limit[_qp] = std::numeric_limits<Real>::max();
238 
239  // update _local_elasticity_tensor based on cracking state in previous time step
241 
242  // Calculate stress in intermediate configuration
244 
246  force_elasticity_rotation = true;
247  }
248 
249  // compute crack status and adjust stress
251 
253  {
254  finiteStrainRotation(force_elasticity_rotation);
256  }
257 }
258 
259 void
261 {
262  const Real youngs_modulus =
264 
265  bool cracking_locally_active = false;
266 
267  const Real cracking_stress = _cracking_stress[_qp];
268 
269  if (cracking_stress > 0)
270  {
271  RealVectorValue stiffness_ratio_local(1.0, 1.0, 1.0);
274  ePrime.rotate(R.transpose());
275 
276  for (unsigned int i = 0; i < 3; ++i)
277  {
278  // Update elasticity tensor based on crack status of the end of last time step
279  if (_crack_damage_old[_qp](i) > 0.0)
280  {
281  if (_cracking_neg_fraction == 0.0 && MooseUtils::absoluteFuzzyLessThan(ePrime(i, i), 0.0))
282  stiffness_ratio_local(i) = 1.0;
283  else if (_cracking_neg_fraction > 0.0 &&
286  {
288  const Real Eo = cracking_stress / _crack_initiation_strain_old[_qp](i);
289  const Real Ec = Eo * (1.0 - _crack_damage_old[_qp](i));
290  const Real a = (Ec - Eo) / (4 * etr);
291  const Real b = (Ec + Eo) / 2;
292  // Compute the ratio of the current transition stiffness to the original stiffness
293  stiffness_ratio_local(i) = (2.0 * a * etr + b) / Eo;
294  cracking_locally_active = true;
295  }
296  else
297  {
298  stiffness_ratio_local(i) = (1.0 - _crack_damage_old[_qp](i));
299  cracking_locally_active = true;
300  }
301  }
302  }
303 
304  if (cracking_locally_active)
305  {
306  // Update the elasticity tensor in the crack coordinate system
308  {
309  const bool c0_coupled = MooseUtils::absoluteFuzzyEqual(stiffness_ratio_local(0), 1.0);
310  const bool c1_coupled = MooseUtils::absoluteFuzzyEqual(stiffness_ratio_local(1), 1.0);
311  const bool c2_coupled = MooseUtils::absoluteFuzzyEqual(stiffness_ratio_local(2), 1.0);
312 
313  const Real c01 = (c0_coupled && c1_coupled ? 1.0 : 0.0);
314  const Real c02 = (c0_coupled && c2_coupled ? 1.0 : 0.0);
315  const Real c12 = (c1_coupled && c2_coupled ? 1.0 : 0.0);
316 
317  const Real c01_shear_retention = (c0_coupled && c1_coupled ? 1.0 : _shear_retention_factor);
318  const Real c02_shear_retention = (c0_coupled && c2_coupled ? 1.0 : _shear_retention_factor);
319  const Real c12_shear_retention = (c1_coupled && c2_coupled ? 1.0 : _shear_retention_factor);
320 
321  _local_elastic_vector[0] = (c0_coupled ? _elasticity_tensor[_qp](0, 0, 0, 0)
322  : stiffness_ratio_local(0) * youngs_modulus);
323  _local_elastic_vector[1] = _elasticity_tensor[_qp](0, 0, 1, 1) * c01;
324  _local_elastic_vector[2] = _elasticity_tensor[_qp](0, 0, 2, 2) * c02;
325  _local_elastic_vector[3] = (c1_coupled ? _elasticity_tensor[_qp](1, 1, 1, 1)
326  : stiffness_ratio_local(1) * youngs_modulus);
327  _local_elastic_vector[4] = _elasticity_tensor[_qp](1, 1, 2, 2) * c12;
328  _local_elastic_vector[5] = (c2_coupled ? _elasticity_tensor[_qp](2, 2, 2, 2)
329  : stiffness_ratio_local(2) * youngs_modulus);
330  _local_elastic_vector[6] = _elasticity_tensor[_qp](1, 2, 1, 2) * c12_shear_retention;
331  _local_elastic_vector[7] = _elasticity_tensor[_qp](0, 2, 0, 2) * c02_shear_retention;
332  _local_elastic_vector[8] = _elasticity_tensor[_qp](0, 1, 0, 1) * c01_shear_retention;
333  }
334  else // _cracked_elasticity_type == CrackedElasticityType::FULL
335  {
336  const Real & c0 = stiffness_ratio_local(0);
337  const Real & c1 = stiffness_ratio_local(1);
338  const Real & c2 = stiffness_ratio_local(2);
339 
340  const Real c01 = c0 * c1;
341  const Real c02 = c0 * c2;
342  const Real c12 = c1 * c2;
343 
344  const Real c01_shear_retention = std::max(c01, _shear_retention_factor);
345  const Real c02_shear_retention = std::max(c02, _shear_retention_factor);
346  const Real c12_shear_retention = std::max(c12, _shear_retention_factor);
347 
348  _local_elastic_vector[0] = _elasticity_tensor[_qp](0, 0, 0, 0) * c0;
349  _local_elastic_vector[1] = _elasticity_tensor[_qp](0, 0, 1, 1) * c01;
350  _local_elastic_vector[2] = _elasticity_tensor[_qp](0, 0, 2, 2) * c02;
351  _local_elastic_vector[3] = _elasticity_tensor[_qp](1, 1, 1, 1) * c1;
352  _local_elastic_vector[4] = _elasticity_tensor[_qp](1, 1, 2, 2) * c12;
353  _local_elastic_vector[5] = _elasticity_tensor[_qp](2, 2, 2, 2) * c2;
354  _local_elastic_vector[6] = _elasticity_tensor[_qp](1, 2, 1, 2) * c12_shear_retention;
355  _local_elastic_vector[7] = _elasticity_tensor[_qp](0, 2, 0, 2) * c02_shear_retention;
356  _local_elastic_vector[8] = _elasticity_tensor[_qp](0, 1, 0, 1) * c01_shear_retention;
357  }
358 
359  // Filling with 9 components is sufficient because these are the only nonzero entries
360  // for isotropic or orthotropic materials.
363 
364  // Rotate the modified elasticity tensor back into global coordinates
366  }
367  }
368  if (!cracking_locally_active)
370 }
371 
372 void
374 {
375  const Real youngs_modulus =
377 
378  Real cracking_stress = _cracking_stress[_qp];
379 
380  if (cracking_stress > 0)
381  {
382  // Initializing crack states
384 
385  for (unsigned i = 0; i < 3; ++i)
386  {
390  }
391 
392  // Compute crack orientations: updated _crack_rotation[_qp] based on current strain
393  RealVectorValue strain_in_crack_dir;
394  computeCrackStrainAndOrientation(strain_in_crack_dir);
395 
396  for (unsigned i = 0; i < 3; ++i)
397  {
398  if (strain_in_crack_dir(i) > _crack_max_strain[_qp](i))
399  _crack_max_strain[_qp](i) = strain_in_crack_dir(i);
400  }
401 
402  // Check for new cracks.
403  // Rotate stress to cracked orientation.
404  const RankTwoTensor & R = _crack_rotation[_qp];
405  RankTwoTensor sigmaPrime(_stress[_qp]);
406  sigmaPrime.rotate(R.transpose()); // stress in crack coordinates
407 
408  unsigned int num_cracks = 0;
409  for (unsigned int i = 0; i < 3; ++i)
410  {
411  if (_crack_damage_old[_qp](i) > 0.0)
412  ++num_cracks;
413  }
414 
415  bool cracked(false);
417  mooseAssert(_softening_models.size() == 3, "Must have 3 softening models");
418  for (unsigned int i = 0; i < 3; ++i)
419  {
420  sigma(i) = sigmaPrime(i, i);
421 
422  Real stiffness_ratio = 1.0 - _crack_damage[_qp](i);
423 
424  const bool pre_existing_crack = (_crack_damage_old[_qp](i) > 0.0);
425  const bool met_stress_criterion = (sigma(i) > cracking_stress);
426  const bool loading_existing_crack = (strain_in_crack_dir(i) >= _crack_max_strain[_qp](i));
427  const bool allowed_to_crack = (pre_existing_crack || num_cracks < _max_cracks);
428  bool new_crack = false;
429 
430  cracked |= pre_existing_crack;
431 
432  // Adjustments for newly created cracks
433  if (met_stress_criterion && !pre_existing_crack && allowed_to_crack)
434  {
435  new_crack = true;
436  ++num_cracks;
437 
438  // Assume Poisson's ratio drops to zero for this direction. Stiffness is then Young's
439  // modulus.
440  _crack_initiation_strain[_qp](i) = cracking_stress / youngs_modulus;
441 
444  }
445 
446  // Update stress and stiffness ratio according to specified crack release model
447  if (new_crack || (pre_existing_crack && loading_existing_crack))
448  {
449  cracked = true;
450  _softening_models[i]->computeCrackingRelease(sigma(i),
451  stiffness_ratio,
452  strain_in_crack_dir(i),
455  cracking_stress,
456  youngs_modulus);
457  _crack_damage[_qp](i) = 1.0 - stiffness_ratio;
458  }
459 
460  else if (cracked && _cracking_neg_fraction > 0 &&
461  _crack_initiation_strain[_qp](i) * _cracking_neg_fraction > strain_in_crack_dir(i) &&
462  -_crack_initiation_strain[_qp](i) * _cracking_neg_fraction < strain_in_crack_dir(i))
463  {
465  const Real Eo = cracking_stress / _crack_initiation_strain[_qp](i);
466  const Real Ec = Eo * (1.0 - _crack_damage_old[_qp](i));
467  const Real a = (Ec - Eo) / (4.0 * etr);
468  const Real b = 0.5 * (Ec + Eo);
469  const Real c = 0.25 * (Ec - Eo) * etr;
470  sigma(i) = (a * strain_in_crack_dir(i) + b) * strain_in_crack_dir(i) + c;
471  }
472  }
473 
474  if (cracked)
476  }
477 
478  _crack_flags[_qp](0) = 1.0 - _crack_damage[_qp](2);
479  _crack_flags[_qp](1) = 1.0 - _crack_damage[_qp](1);
480  _crack_flags[_qp](2) = 1.0 - _crack_damage[_qp](0);
481 }
482 
483 void
485  RealVectorValue & strain_in_crack_dir)
486 {
487  // The rotation tensor is ordered such that directions for pre-existing cracks appear first
488  // in the list of columns. For example, if there is one existing crack, its direction is in the
489  // first column in the rotation tensor.
490  const unsigned int num_known_dirs = getNumKnownCrackDirs();
491 
492  if (num_known_dirs == 0)
493  {
494  std::vector<Real> eigval(3, 0.0);
495  RankTwoTensor eigvec;
496 
497  _elastic_strain[_qp].symmetricEigenvaluesEigenvectors(eigval, eigvec);
498 
499  // If the elastic strain is beyond the cracking strain, save the eigen vectors as
500  // the rotation tensor. Reverse their order so that the third principal strain
501  // (most tensile) will correspond to the first crack.
502  _crack_rotation[_qp].fillColumn(0, eigvec.column(2));
503  _crack_rotation[_qp].fillColumn(1, eigvec.column(1));
504  _crack_rotation[_qp].fillColumn(2, eigvec.column(0));
505 
506  strain_in_crack_dir(0) = eigval[2];
507  strain_in_crack_dir(1) = eigval[1];
508  strain_in_crack_dir(2) = eigval[0];
509  }
510  else if (num_known_dirs == 1)
511  {
512  // This is easily the most complicated case.
513  // 1. Rotate the elastic strain to the orientation associated with the known
514  // crack.
515  // 2. Extract the lower 2x2 block into a separate tensor.
516  // 3. Run the eigen solver on the result.
517  // 4. Update the rotation tensor to reflect the effect of the 2 eigenvectors.
518 
519  // 1.
520  const RankTwoTensor & R = _crack_rotation[_qp];
522  ePrime.rotate(R.transpose()); // elastic strain in crack coordinates
523 
524  // 2.
525  ColumnMajorMatrix e2x2(2, 2);
526  e2x2(0, 0) = ePrime(1, 1);
527  e2x2(1, 0) = ePrime(2, 1);
528  e2x2(0, 1) = ePrime(1, 2);
529  e2x2(1, 1) = ePrime(2, 2);
530 
531  // 3.
532  ColumnMajorMatrix e_val2x1(2, 1);
533  ColumnMajorMatrix e_vec2x2(2, 2);
534  e2x2.eigen(e_val2x1, e_vec2x2);
535 
536  // 4.
537  RankTwoTensor eigvec(
538  1.0, 0.0, 0.0, 0.0, e_vec2x2(0, 1), e_vec2x2(1, 1), 0.0, e_vec2x2(0, 0), e_vec2x2(1, 0));
539 
540  _crack_rotation[_qp] = _crack_rotation_old[_qp] * eigvec; // Roe implementation
541 
542  strain_in_crack_dir(0) = ePrime(0, 0);
543  strain_in_crack_dir(1) = e_val2x1(1, 0);
544  strain_in_crack_dir(2) = e_val2x1(0, 0);
545  }
546  else if (num_known_dirs == 2 || num_known_dirs == 3)
547  {
548  // Rotate to cracked orientation and pick off the strains in the rotated
549  // coordinate directions.
550  const RankTwoTensor & R = _crack_rotation[_qp];
552  ePrime.rotate(R.transpose()); // elastic strain in crack coordinates
553 
554  strain_in_crack_dir(0) = ePrime(0, 0);
555  strain_in_crack_dir(1) = ePrime(1, 1);
556  strain_in_crack_dir(2) = ePrime(2, 2);
557  }
558  else
559  mooseError("Invalid number of known crack directions");
560 }
561 
562 unsigned int
564 {
565  unsigned int num_known_dirs = 0;
566  for (unsigned int i = 0; i < 3; ++i)
567  {
568  if (_crack_damage_old[_qp](i) > 0.0 || _prescribed_crack_directions.size() >= i + 1)
569  ++num_known_dirs;
570  }
571  return num_known_dirs;
572 }
573 
574 void
576  const RealVectorValue & sigma)
577 {
578  // Get transformation matrix
579  const RankTwoTensor & R = _crack_rotation[_qp];
580  // Rotate to crack frame
581  tensor.rotate(R.transpose());
582 
583  // Reset stress if cracked
584  for (unsigned int i = 0; i < 3; ++i)
585  if (_crack_damage[_qp](i) > 0.0)
586  {
587  const Real stress_correction_ratio = (tensor(i, i) - sigma(i)) / tensor(i, i);
588  if (stress_correction_ratio > _max_stress_correction)
589  tensor(i, i) *= (1.0 - _max_stress_correction);
590  else if (stress_correction_ratio < -_max_stress_correction)
591  tensor(i, i) *= (1.0 + _max_stress_correction);
592  else
593  tensor(i, i) = sigma(i);
594  }
595 
596  // Rotate back to global frame
597  tensor.rotate(R);
598 }
599 
600 bool
602 {
603  for (unsigned int i = 0; i < 3; ++i)
604  if (_crack_damage_old[_qp](i) > 0.0)
605  return true;
606  return false;
607 }
ComputeSmearedCrackingStress computes the stress for a finite strain material with smeared cracking...
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...
void updateStressTensorForCracking(RankTwoTensor &tensor, const RealVectorValue &sigma)
Updates the full stress tensor to account for the effect of cracking using the provided stresses in t...
ComputeMultipleInelasticStress computes the stress, the consistent tangent operator (or an approximat...
const MaterialProperty< RankTwoTensor > & _rotation_increment
Rotation increment material property.
MaterialProperty< RealVectorValue > & _crack_max_strain
MaterialProperty< RealVectorValue > & _crack_initiation_strain
const unsigned int _max_cracks
Maximum number of cracks permitted at a material point.
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
const MaterialProperty< RankTwoTensor > & _crack_rotation_old
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
virtual void finiteStrainRotation(const bool force_elasticity_rotation=false)
Rotate _elastic_strain, _stress, _inelastic_strain, and _Jacobian_mult to the new configuration...
void updateLocalElasticityTensor()
Update the local elasticity tensor (_local_elasticity_tensor) due to the effects of cracking...
registerMooseObject("SolidMechanicsApp", ComputeSmearedCrackingStress)
const MaterialProperty< RealVectorValue > & _crack_max_strain_old
MaterialProperty< RankTwoTensor > & _crack_rotation
VectorValue< Real > column(const unsigned int i) const
T & set(const std::string &name, bool quiet_mode=false)
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
const MaterialProperty< RankTwoTensor > & _strain_increment
bool previouslyCracked()
Check to see whether there was cracking in any diretion in the previous time step.
std::vector< SmearedCrackSofteningBase * > _softening_models
The user-supplied list of softening models to be used in the 3 crack directions.
unsigned int size() const
ComputeSmearedCrackingStress(const InputParameters &parameters)
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method)
std::vector< Real > _local_elastic_vector
Vector helper to update local elasticity tensor.
static RankTwoTensorTempl Identity()
const std::string _elasticity_tensor_name
Name of the elasticity tensor material property.
void eigen(ColumnMajorMatrixTempl< Real > &eval, ColumnMajorMatrixTempl< Real > &evec) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void rotate(const RankTwoTensorTempl< Real > &R)
enum ComputeSmearedCrackingStress::CrackedElasticityType _cracked_elasticity_type
void computeCrackStrainAndOrientation(RealVectorValue &strain_in_crack_dir)
Compute the crack strain in the crack coordinate system.
const VariableValue & _cracking_stress
Input parameters for smeared crack models.
const Real _max_stress_correction
Controls the maximum amount that the damaged elastic stress is corrected to folow the release model d...
virtual void initQpStatefulProperties() override
bool absoluteFuzzyLessThan(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
MaterialProperty< RealVectorValue > & _crack_flags
Vector of values going from 1 to 0 as crack damage accumulates.
void paramError(const std::string &param, Args... args) const
MaterialProperty< RankTwoTensor > & _inelastic_strain
The sum of the inelastic strains that come from the plastic models.
std::string stringify(const T &t)
CrackedElasticityType
Enum defining the method used to adjust the elasticity tensor for cracking.
void rotate(const TypeTensor< T > &R)
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-")
MaterialBase & getMaterialByName(const std::string &name, bool no_warn=false, bool no_dep=false)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
virtual unsigned int getNumKnownCrackDirs() const
Get the number of known crack directions.
SmearedCrackSofteningBase is the base class for a set of models that define the softening behavior of...
static const std::string R
Definition: NS.h:147
bool isParamSetByUser(const std::string &nm) const
unsigned int get(unsigned int i) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _cracking_neg_fraction
Defines transition to changed stiffness during unloading.
MaterialProperty< RealVectorValue > & _crack_damage
const Real _shear_retention_factor
Controls the amount of shear retained.
void addDocumentation(const std::string &name, const std::string &doc)
const MaterialProperty< RealVectorValue > & _crack_damage_old
std::vector< unsigned int > _prescribed_crack_directions
User-prescribed cracking directions.
const MaterialProperty< RealVectorValue > & _crack_initiation_strain_old
MaterialProperty< RankTwoTensor > & _elastic_strain
Elastic strain material property.
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MaterialProperty< RankTwoTensor > & _stress
Stress material property.
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
void paramWarning(const std::string &param, Args... args) const
bool hasGuaranteedMaterialProperty(const MaterialPropertyName &prop, Guarantee guarantee)
virtual void computeQpStressIntermediateConfiguration()
Compute the stress for the current QP, but do not rotate tensors from the intermediate configuration ...
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
old value of inelastic strain
T getIsotropicYoungsModulus(const RankFourTensorTempl< T > &elasticity_tensor)
Get the Young&#39;s modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must b...
virtual void updateCrackingStateAndStress()
Update all cracking-related state variables and the stress tensor due to cracking in all directions...
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
Strain tensors.
void ErrorVector unsigned int