www.mooseframework.org
SolidModel.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 
10 #include "SolidModel.h"
11 #include "AxisymmetricRZ.h"
12 #include "NonlinearRZ.h"
13 #include "SphericalR.h"
14 #include "Linear.h"
15 #include "Nonlinear3D.h"
16 #include "PlaneStrain.h"
17 #include "NonlinearPlaneStrain.h"
18 #include "VolumetricModel.h"
19 #include "ConstitutiveModel.h"
21 #include "MooseApp.h"
22 #include "Problem.h"
23 #include "PiecewiseLinear.h"
24 
25 #include "libmesh/quadrature.h"
26 
27 registerMooseObject("SolidMechanicsApp", SolidModel);
28 
29 template <>
30 InputParameters
32 {
33  MooseEnum formulation(
34  "Nonlinear3D NonlinearRZ AxisymmetricRZ SphericalR Linear PlaneStrain NonlinearPlaneStrain");
35  MooseEnum compute_method("NoShearRetention ShearRetention");
36 
37  InputParameters params = validParams<Material>();
38  params.addParam<std::string>(
39  "appended_property_name", "", "Name appended to material properties to make them unique");
40  params.addParam<Real>("bulk_modulus", "The bulk modulus for the material.");
41  params.addParam<Real>("lambda", "Lame's first parameter for the material.");
42  params.addParam<Real>("poissons_ratio", "Poisson's ratio for the material.");
43  params.addParam<FunctionName>("poissons_ratio_function",
44  "Poisson's ratio as a function of temperature.");
45  params.addParam<Real>("shear_modulus", "The shear modulus of the material.");
46  params.addParam<Real>("youngs_modulus", "Young's modulus of the material.");
47  params.addParam<FunctionName>("youngs_modulus_function",
48  "Young's modulus as a function of temperature.");
49  params.addParam<Real>("thermal_expansion", "The thermal expansion coefficient.");
50  params.addParam<FunctionName>("thermal_expansion_function",
51  "Thermal expansion coefficient as a function of temperature.");
52  params.addCoupledVar("temp", "Coupled Temperature");
53  params.addParam<Real>(
54  "stress_free_temperature",
55  "The stress-free temperature. If not specified, the initial temperature is used.");
56  params.addParam<Real>("thermal_expansion_reference_temperature",
57  "Reference temperature for mean thermal expansion function.");
58  MooseEnum cte_function_type("instantaneous mean");
59  params.addParam<MooseEnum>("thermal_expansion_function_type",
60  cte_function_type,
61  "Type of thermal expansion function. Choices are: " +
62  cte_function_type.getRawNames());
63  params.addParam<std::vector<Real>>("initial_stress",
64  "The initial stress tensor (xx, yy, zz, xy, yz, zx)");
65  params.addParam<std::string>(
66  "cracking_release",
67  "abrupt",
68  "The cracking release type. Choices are abrupt (default) and exponential.");
69  params.addParam<Real>("cracking_stress",
70  0.0,
71  "The stress threshold beyond which cracking occurs. Must be positive.");
72  params.addParam<Real>(
73  "cracking_residual_stress",
74  0.0,
75  "The fraction of the cracking stress allowed to be maintained following a crack.");
76  params.addParam<Real>("cracking_beta", 1.0, "The coefficient used in the exponetional model.");
77  params.addParam<MooseEnum>(
78  "compute_method", compute_method, "The method used in the stress calculation.");
79  params.addParam<FunctionName>(
80  "cracking_stress_function", "", "The cracking stress as a function of time and location");
81  params.addParam<std::vector<unsigned int>>(
82  "active_crack_planes", "Planes on which cracks are allowed (0,1,2 -> x,z,theta in RZ)");
83  params.addParam<unsigned int>(
84  "max_cracks", 3, "The maximum number of cracks allowed at a material point.");
85  params.addParam<Real>("cracking_neg_fraction",
86  "The fraction of the cracking strain at which a "
87  "transitition begins during decreasing strain to "
88  "the original stiffness.");
89  params.addParam<MooseEnum>("formulation",
90  formulation,
91  "Element formulation. Choices are: " + formulation.getRawNames());
92  params.addParam<std::string>("increment_calculation",
93  "RashidApprox",
94  "The algorithm to use when computing the "
95  "incremental strain and rotation (RashidApprox or "
96  "Eigen). For use with Nonlinear3D/RZ formulation.");
97  params.addParam<bool>("large_strain",
98  false,
99  "Whether to include large strain terms in "
100  "AxisymmetricRZ, SphericalR, and PlaneStrain "
101  "formulations.");
102  params.addParam<bool>("compute_JIntegral", false, "Whether to compute the J Integral.");
103  params.addParam<bool>(
104  "compute_InteractionIntegral", false, "Whether to compute the Interaction Integral.");
105  params.addCoupledVar("disp_r", "The r displacement");
106  params.addCoupledVar("disp_x", "The x displacement");
107  params.addCoupledVar("disp_y", "The y displacement");
108  params.addCoupledVar("disp_z", "The z displacement");
109  params.addCoupledVar("strain_zz", "The zz strain");
110  params.addCoupledVar("scalar_strain_zz", "The zz strain (scalar variable)");
111  params.addParam<std::vector<std::string>>(
112  "dep_matl_props", "Names of material properties this material depends on.");
113  params.addParam<std::string>("constitutive_model", "ConstitutiveModel to use (optional)");
114  params.addParam<bool>("volumetric_locking_correction",
115  true,
116  "Set to false to turn off volumetric locking correction");
117  return params;
118 }
119 
120 namespace
121 {
123 getCrackingModel(const std::string & name)
124 {
125  std::string n(name);
126  std::transform(n.begin(), n.end(), n.begin(), ::tolower);
128  if (n == "abrupt")
130  else if (n == "exponential")
132  else if (n == "power")
134  if (cm == SolidModel::CR_UNKNOWN)
135  mooseError("Unknown cracking model");
136  return cm;
137 }
138 } // namespace
139 
140 SolidModel::SolidModel(const InputParameters & parameters)
141  : DerivativeMaterialInterface<Material>(parameters),
142  _appended_property_name(getParam<std::string>("appended_property_name")),
143  _bulk_modulus_set(parameters.isParamValid("bulk_modulus")),
144  _lambda_set(parameters.isParamValid("lambda")),
145  _poissons_ratio_set(parameters.isParamValid("poissons_ratio")),
146  _shear_modulus_set(parameters.isParamValid("shear_modulus")),
147  _youngs_modulus_set(parameters.isParamValid("youngs_modulus")),
148  _bulk_modulus(_bulk_modulus_set ? getParam<Real>("bulk_modulus") : -1),
149  _lambda(_lambda_set ? getParam<Real>("lambda") : -1),
150  _poissons_ratio(_poissons_ratio_set ? getParam<Real>("poissons_ratio") : -1),
151  _shear_modulus(_shear_modulus_set ? getParam<Real>("shear_modulus") : -1),
152  _youngs_modulus(_youngs_modulus_set ? getParam<Real>("youngs_modulus") : -1),
153  _youngs_modulus_function(
154  isParamValid("youngs_modulus_function") ? &getFunction("youngs_modulus_function") : NULL),
155  _poissons_ratio_function(
156  isParamValid("poissons_ratio_function") ? &getFunction("poissons_ratio_function") : NULL),
157  _cracking_release(getCrackingModel(getParam<std::string>("cracking_release"))),
158  _cracking_stress(
159  parameters.isParamValid("cracking_stress")
160  ? (getParam<Real>("cracking_stress") > 0 ? getParam<Real>("cracking_stress") : -1)
161  : -1),
162  _cracking_residual_stress(getParam<Real>("cracking_residual_stress")),
163  _cracking_beta(getParam<Real>("cracking_beta")),
164  _compute_method(getParam<MooseEnum>("compute_method")),
165  _cracking_stress_function(getParam<FunctionName>("cracking_stress_function") != ""
166  ? &getFunction("cracking_stress_function")
167  : NULL),
168  _cracking_alpha(0),
169  _active_crack_planes(3, 1),
170  _max_cracks(getParam<unsigned int>("max_cracks")),
171  _cracking_neg_fraction(
172  isParamValid("cracking_neg_fraction") ? getParam<Real>("cracking_neg_fraction") : 0),
173  _has_temp(isCoupled("temp")),
174  _temperature(_has_temp ? coupledValue("temp") : _zero),
175  _temperature_old(_has_temp ? coupledValueOld("temp") : _zero),
176  _temp_grad(coupledGradient("temp")),
177  _alpha(parameters.isParamValid("thermal_expansion") ? getParam<Real>("thermal_expansion") : 0.),
178  _alpha_function(parameters.isParamValid("thermal_expansion_function")
179  ? &getFunction("thermal_expansion_function")
180  : NULL),
181  _piecewise_linear_alpha_function(NULL),
182  _has_stress_free_temp(false),
183  _stress_free_temp(0.0),
184  _ref_temp(0.0),
185  _volumetric_models(),
186  _dep_matl_props(),
187  _stress(createProperty<SymmTensor>("stress")),
188  _stress_old_prop(getPropertyOld<SymmTensor>("stress")),
189  _stress_old(0),
190  _total_strain(createProperty<SymmTensor>("total_strain")),
191  _total_strain_old(getPropertyOld<SymmTensor>("total_strain")),
192  _elastic_strain(createProperty<SymmTensor>("elastic_strain")),
193  _elastic_strain_old(getPropertyOld<SymmTensor>("elastic_strain")),
194  _crack_flags(NULL),
195  _crack_flags_old(NULL),
196  _crack_flags_local(),
197  _crack_count(NULL),
198  _crack_count_old(NULL),
199  _crack_rotation(NULL),
200  _crack_rotation_old(NULL),
201  _crack_strain(NULL),
202  _crack_strain_old(NULL),
203  _crack_max_strain(NULL),
204  _crack_max_strain_old(NULL),
205  _principal_strain(3, 1),
206  _elasticity_tensor(createProperty<SymmElasticityTensor>("elasticity_tensor")),
207  _Jacobian_mult(createProperty<SymmElasticityTensor>("Jacobian_mult")),
208  _d_strain_dT(),
209  _d_stress_dT(createProperty<SymmTensor>("d_stress_dT")),
210  _total_strain_increment(0),
211  _mechanical_strain_increment(0),
212  _strain_increment(0),
213  _compute_JIntegral(getParam<bool>("compute_JIntegral")),
214  _compute_InteractionIntegral(getParam<bool>("compute_InteractionIntegral")),
215  _SED(NULL),
216  _SED_old(NULL),
217  _Eshelby_tensor(NULL),
218  _J_thermal_term_vec(NULL),
219  _current_instantaneous_thermal_expansion_coef(NULL),
220  _block_id(std::vector<SubdomainID>(blockIDs().begin(), blockIDs().end())),
221  _constitutive_active(false),
222  _step_zero(declareRestartableData<bool>("step_zero", true)),
223  _step_one(declareRestartableData<bool>("step_one", true)),
224  _element(NULL),
225  _local_elasticity_tensor(NULL)
226 {
227  bool same_coord_type = true;
228 
229  for (unsigned int i = 1; i < _block_id.size(); ++i)
230  same_coord_type &=
231  (_subproblem.getCoordSystem(_block_id[0]) == _subproblem.getCoordSystem(_block_id[i]));
232  if (!same_coord_type)
233  mooseError("Material '",
234  name(),
235  "' was specified on multiple blocks that do not have the same coordinate system");
236  // Use the first block to figure out the coordinate system (the above check ensures that they are
237  // the same)
238  _coord_type = _subproblem.getCoordSystem(_block_id[0]);
239 
240  if (_coord_type == Moose::COORD_RZ && _subproblem.getAxisymmetricRadialCoord() != 0)
241  mooseError(
242  "rz_coord_axis=Y is the only supported option for axisymmetric SolidMechanics models");
243 
245 
246  const std::vector<std::string> & dmp = getParam<std::vector<std::string>>("dep_matl_props");
247  _dep_matl_props.insert(dmp.begin(), dmp.end());
248  for (std::set<std::string>::const_iterator i = _dep_matl_props.begin();
249  i != _dep_matl_props.end();
250  ++i)
251  {
252  // Tell MOOSE that we need this MaterialProperty. This enables dependency checking.
253  getMaterialProperty<Real>(*i);
254  }
255 
257 
258  if (_cracking_stress > 0)
259  {
260  _crack_flags = &createProperty<RealVectorValue>("crack_flags");
261  _crack_flags_old = &getPropertyOld<RealVectorValue>("crack_flags");
263  {
264  _crack_count = &createProperty<RealVectorValue>("crack_count");
265  _crack_count_old = &getPropertyOld<RealVectorValue>("crack_count");
266  }
267  _crack_rotation = &createProperty<ColumnMajorMatrix>("crack_rotation");
268  _crack_rotation_old = &getPropertyOld<ColumnMajorMatrix>("crack_rotation");
269  _crack_max_strain = &createProperty<RealVectorValue>("crack_max_strain");
270  _crack_max_strain_old = &getPropertyOld<RealVectorValue>("crack_max_strain");
271  _crack_strain = &createProperty<RealVectorValue>("crack_strain");
272  _crack_strain_old = &getPropertyOld<RealVectorValue>("crack_strain");
273 
274  if (parameters.isParamValid("active_crack_planes"))
275  {
276  const std::vector<unsigned int> & planes =
277  getParam<std::vector<unsigned>>("active_crack_planes");
278  for (unsigned i(0); i < 3; ++i)
279  _active_crack_planes[i] = 0;
280 
281  for (unsigned i(0); i < planes.size(); ++i)
282  {
283  if (planes[i] > 2)
284  mooseError("Active planes must be 0, 1, or 2");
285  _active_crack_planes[planes[i]] = 1;
286  }
287  }
288  if (_cracking_residual_stress < 0 || _cracking_residual_stress > 1)
289  {
290  mooseError("cracking_residual_stress must be between 0 and 1");
291  }
292  if (isParamValid("cracking_neg_fraction") &&
293  (_cracking_neg_fraction <= 0 || _cracking_neg_fraction > 1))
294  {
295  mooseError("cracking_neg_fraction must be > zero and <= 1");
296  }
297  }
298 
299  if (parameters.isParamValid("stress_free_temperature"))
300  {
301  _has_stress_free_temp = true;
302  _stress_free_temp = getParam<Real>("stress_free_temperature");
303  if (!_has_temp)
304  mooseError("Cannot specify stress_free_temperature without coupling to temperature");
305  }
306 
307  if (parameters.isParamValid("thermal_expansion_function_type"))
308  {
309  if (!_alpha_function)
310  mooseError("thermal_expansion_function_type can only be set when thermal_expansion_function "
311  "is used");
312  MooseEnum tec = getParam<MooseEnum>("thermal_expansion_function_type");
313  if (tec == "mean")
314  _mean_alpha_function = true;
315  else if (tec == "instantaneous")
316  _mean_alpha_function = false;
317  else
318  mooseError("Invalid option for thermal_expansion_function_type");
319  }
320  else
321  _mean_alpha_function = false;
322 
323  if (parameters.isParamValid("thermal_expansion_reference_temperature"))
324  {
325  if (!_alpha_function)
326  mooseError("thermal_expansion_reference_temperature can only be set when "
327  "thermal_expansion_function is used");
329  mooseError("thermal_expansion_reference_temperature can only be set when "
330  "thermal_expansion_function_type = mean");
331  _ref_temp = getParam<Real>("thermal_expansion_reference_temperature");
332  if (!_has_temp)
333  mooseError(
334  "Cannot specify thermal_expansion_reference_temperature without coupling to temperature");
335  }
336 
338  {
339  if (!parameters.isParamValid("thermal_expansion_reference_temperature") ||
341  mooseError(
342  "Must specify both stress_free_temperature and thermal_expansion_reference_temperature "
343  "if thermal_expansion_function_type = mean");
344  }
345 
346  if (parameters.isParamValid("thermal_expansion") &&
347  parameters.isParamValid("thermal_expansion_function"))
348  mooseError("Cannot specify both thermal_expansion and thermal_expansion_function");
349 
350  if (_compute_JIntegral)
351  {
352  _SED = &declareProperty<Real>("strain_energy_density");
353  _SED_old = &getMaterialPropertyOld<Real>("strain_energy_density");
354  _Eshelby_tensor = &declareProperty<RankTwoTensor>("Eshelby_tensor");
355  _J_thermal_term_vec = &declareProperty<RealVectorValue>("J_thermal_term_vec");
357  &declareProperty<Real>("current_instantaneous_thermal_expansion_coef");
358  }
359 
361  !hasMaterialProperty<Real>("current_instantaneous_thermal_expansion_coef"))
363  &declareProperty<Real>("current_instantaneous_thermal_expansion_coef");
364 }
365 
367 
369 {
371  delete _element;
372 }
373 
375 
376 void
378 {
379  int num_elastic_constants = _bulk_modulus_set + _lambda_set + _poissons_ratio_set +
381 
382  if (num_elastic_constants != 2)
383  {
384  std::string err("Exactly two elastic constants must be defined for material '");
385  err += name();
386  err += "'.";
387  mooseError(err);
388  }
389 
390  if (_bulk_modulus_set && _bulk_modulus <= 0)
391  {
392  std::string err("Bulk modulus must be positive in material '");
393  err += name();
394  err += "'.";
395  mooseError(err);
396  }
397  if (_poissons_ratio_set && (_poissons_ratio <= -1.0 || _poissons_ratio >= 0.5))
398  {
399  std::string err("Poissons ratio must be greater than -1 and less than 0.5 in material '");
400  err += name();
401  err += "'.";
402  mooseError(err);
403  }
405  {
406  std::string err("Shear modulus must not be negative in material '");
407  err += name();
408  err += "'.";
409  mooseError(err);
410  }
412  {
413  std::string err("Youngs modulus must be positive in material '");
414  err += name();
415  err += "'.";
416  mooseError(err);
417  }
418 
419  // Calculate lambda, the shear modulus, and Young's modulus
420  if (_lambda_set && _shear_modulus_set) // First and second Lame
421  {
425  }
426  else if (_lambda_set && _poissons_ratio_set)
427  {
428  _shear_modulus = (_lambda * (1.0 - 2.0 * _poissons_ratio)) / (2.0 * _poissons_ratio);
431  }
432  else if (_lambda_set && _bulk_modulus_set)
433  {
434  _shear_modulus = 3.0 * (_bulk_modulus - _lambda) / 2.0;
438  }
439  else if (_lambda_set && _youngs_modulus_set)
440  {
442  ((_youngs_modulus - 3.0 * _lambda) / 4.0) +
443  (std::sqrt((_youngs_modulus - 3.0 * _lambda) * (_youngs_modulus - 3.0 * _lambda) +
444  8.0 * _lambda * _youngs_modulus) /
445  4.0);
447  }
449  {
450  _lambda = (2.0 * _shear_modulus * _poissons_ratio) / (1.0 - 2.0 * _poissons_ratio);
453  }
455  {
456  _lambda = _bulk_modulus - 2.0 * _shear_modulus / 3.0;
460  (3 * _bulk_modulus - 2 * _shear_modulus) / (2 * (3 * _bulk_modulus + _shear_modulus));
461  }
463  {
467  }
469  {
472  (3.0 * _bulk_modulus * (1.0 - 2.0 * _poissons_ratio)) / (2.0 * (1.0 + _poissons_ratio));
475  }
476  else if (_youngs_modulus_set && _poissons_ratio_set) // Young's Modulus and Poisson's Ratio
477  {
479  ((1.0 + _poissons_ratio) * (1 - 2.0 * _poissons_ratio));
480  _shear_modulus = _youngs_modulus / (2.0 * (1.0 + _poissons_ratio));
481  }
483  {
484  _lambda = 3.0 * _bulk_modulus * (3.0 * _bulk_modulus - _youngs_modulus) /
485  (9.0 * _bulk_modulus - _youngs_modulus);
489  }
490 
491  _lambda_set = true;
492  _shear_modulus_set = true;
493  _youngs_modulus_set = true;
494  _poissons_ratio_set = true;
495 }
496 
498 
499 void
501 {
502  bool constant(true);
503 
506  {
507  constant = false;
508  }
509 
511  mooseAssert(_youngs_modulus_set, "Internal error: Youngs modulus not set");
512  mooseAssert(_poissons_ratio_set, "Internal error: Poissons ratio not set");
515  iso->calculate(0);
516  elasticityTensor(iso);
517 }
518 
520 
521 void
523 {
524  // if (_cracking_stress > 0)
525  // {
526  // _cracked_this_step_count.clear();
527  // }
528 }
529 
531 
532 void
534 {
535  // if (_cracking_stress > 0)
536  // {
537  // for (std::map<Point, unsigned>::iterator i = _cracked_this_step.begin();
538  // i != _cracked_this_step.end(); ++i)
539  // {
540  // if (i->second)
541  // {
542  // ++_cracked_this_step_count[i->first];
543  // }
544  // }
545  // }
546 }
547 
549 
550 void
552 {
555 }
556 
558 
559 void
561 {
562  bool modified = false;
563  _d_strain_dT.zero();
564 
565  const SubdomainID current_block = _current_elem->subdomain_id();
567  {
568  MooseSharedPointer<ConstitutiveModel> cm = _constitutive_model[current_block];
569 
570  // Let's be a little careful and check for a non-existent
571  // ConstitutiveModel, which could be returned as a default value
572  // from std::map::operator[]
573  if (!cm)
574  mooseError("ConstitutiveModel not available for block ", current_block);
575 
576  cm->setQp(_qp);
577  modified |= cm->modifyStrainIncrement(*_current_elem, _strain_increment, _d_strain_dT);
578  }
579 
580  if (!modified)
581  {
583  }
584 
586 }
587 
589 
590 void
592 {
593  if (_has_temp && !_step_zero)
594  {
595  Real inc_thermal_strain;
596  Real d_thermal_strain_d_temp;
597 
598  Real old_temp;
600  old_temp = _stress_free_temp;
601  else
602  old_temp = _temperature_old[_qp];
603 
604  Real current_temp = _temperature[_qp];
605 
606  Real delta_t = current_temp - old_temp;
607 
608  Real alpha = _alpha;
609 
610  if (_alpha_function)
611  {
612  Point p;
613  Real alpha_current_temp = _alpha_function->value(current_temp, p);
614  Real alpha_old_temp = _alpha_function->value(old_temp, p);
615 
617  {
618  Real alpha_stress_free_temperature = _alpha_function->value(_stress_free_temp, p);
619  Real small(1e-6);
620 
621  Real numerator = alpha_current_temp * (current_temp - _ref_temp) -
622  alpha_old_temp * (old_temp - _ref_temp);
623  Real denominator = 1.0 + alpha_stress_free_temperature * (_stress_free_temp - _ref_temp);
624  if (denominator < small)
625  mooseError("Denominator too small in thermal strain calculation");
626  inc_thermal_strain = numerator / denominator;
627  d_thermal_strain_d_temp = alpha_current_temp * (current_temp - _ref_temp);
628  }
629  else
630  {
631  inc_thermal_strain = delta_t * 0.5 * (alpha_current_temp + alpha_old_temp);
632  d_thermal_strain_d_temp = alpha_current_temp;
633  }
634  }
635  else
636  {
637  inc_thermal_strain = delta_t * alpha;
638  d_thermal_strain_d_temp = alpha;
639  }
640 
641  _strain_increment.addDiag(-inc_thermal_strain);
642  _d_strain_dT.addDiag(-d_thermal_strain_d_temp);
643  }
644 }
645 
647 
648 void
650 {
651  const Real V0Vold = 1 / _element->volumeRatioOld(_qp);
652  const SubdomainID current_block = _current_elem->subdomain_id();
653  const std::vector<MooseSharedPointer<VolumetricModel>> & vm(_volumetric_models[current_block]);
654  for (unsigned int i(0); i < vm.size(); ++i)
655  {
656  vm[i]->modifyStrain(_qp, V0Vold, _strain_increment, _d_strain_dT);
657  }
658 }
659 
661 
662 void
663 SolidModel::rotateSymmetricTensor(const ColumnMajorMatrix & R,
664  const SymmTensor & T,
665  SymmTensor & result)
666 {
667 
668  // R T Rt
669  // 00 01 02 00 01 02 00 10 20
670  // 10 11 12 * 10 11 12 * 01 11 21
671  // 20 21 22 20 21 22 02 12 22
672  //
673  const Real T00 = R(0, 0) * T.xx() + R(0, 1) * T.xy() + R(0, 2) * T.zx();
674  const Real T01 = R(0, 0) * T.xy() + R(0, 1) * T.yy() + R(0, 2) * T.yz();
675  const Real T02 = R(0, 0) * T.zx() + R(0, 1) * T.yz() + R(0, 2) * T.zz();
676 
677  const Real T10 = R(1, 0) * T.xx() + R(1, 1) * T.xy() + R(1, 2) * T.zx();
678  const Real T11 = R(1, 0) * T.xy() + R(1, 1) * T.yy() + R(1, 2) * T.yz();
679  const Real T12 = R(1, 0) * T.zx() + R(1, 1) * T.yz() + R(1, 2) * T.zz();
680 
681  const Real T20 = R(2, 0) * T.xx() + R(2, 1) * T.xy() + R(2, 2) * T.zx();
682  const Real T21 = R(2, 0) * T.xy() + R(2, 1) * T.yy() + R(2, 2) * T.yz();
683  const Real T22 = R(2, 0) * T.zx() + R(2, 1) * T.yz() + R(2, 2) * T.zz();
684 
685  result.xx(T00 * R(0, 0) + T01 * R(0, 1) + T02 * R(0, 2));
686  result.yy(T10 * R(1, 0) + T11 * R(1, 1) + T12 * R(1, 2));
687  result.zz(T20 * R(2, 0) + T21 * R(2, 1) + T22 * R(2, 2));
688  result.xy(T00 * R(1, 0) + T01 * R(1, 1) + T02 * R(1, 2));
689  result.yz(T10 * R(2, 0) + T11 * R(2, 1) + T12 * R(2, 2));
690  result.zx(T00 * R(2, 0) + T01 * R(2, 1) + T02 * R(2, 2));
691 }
692 
694 
695 void
697 {
698  if (isParamValid("initial_stress"))
699  {
700  const std::vector<Real> & s = getParam<std::vector<Real>>("initial_stress");
701  if (6 != s.size())
702  {
703  mooseError("initial_stress must give six values");
704  }
705  _stress[_qp].fillFromInputVector(s);
706  }
707 
708  if (_cracking_stress_function != NULL)
709  {
710  _cracking_stress = _cracking_stress_function->value(_t, _q_point[_qp]);
711  }
712  if (_cracking_stress > 0)
713  {
714  (*_crack_flags)[_qp](0) = (*_crack_flags)[_qp](1) = (*_crack_flags)[_qp](2) = 1;
715  if (_crack_count)
716  {
717  (*_crack_count)[_qp](0) = (*_crack_count)[_qp](1) = (*_crack_count)[_qp](2) = 0;
718  }
719 
720  (*_crack_rotation)[_qp].identity();
721  }
722  if (_SED)
723  (*_SED)[_qp] = 0;
724 }
725 
727 
728 void
730 {
731  if (_t_step >= 1)
732  _step_zero = false;
733 
734  if (_t_step >= 2)
735  _step_one = false;
736 
737  elementInit();
738  _element->init();
739 
740  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
741  {
744 
747 
749 
751  computeStress();
752  else
754 
755  if (_compute_JIntegral)
757 
759 
761 
762  finalizeStress();
763 
764  if (_compute_JIntegral)
765  computeEshelby();
766 
769 
772 
774  }
775 }
776 
778 
779 void
781 {
782  mooseAssert(_SED, "_SED not initialized");
783  mooseAssert(_SED_old, "_SED_old not initialized");
784  (*_SED)[_qp] = (*_SED_old)[_qp] +
785  _stress[_qp].doubleContraction(_mechanical_strain_increment) / 2 +
786  _stress_old_prop[_qp].doubleContraction(_mechanical_strain_increment) / 2;
787 }
788 
790 
791 void
793 {
794  mooseAssert(_SED, "_SED not initialized");
795  mooseAssert(_Eshelby_tensor, "_Eshelby_tensor not initialized");
796  // Cauchy stress (sigma) in a colum major matrix:
797  ColumnMajorMatrix stress_CMM;
798  stress_CMM(0, 0) = _stress[_qp].xx();
799  stress_CMM(0, 1) = _stress[_qp].xy();
800  stress_CMM(0, 2) = _stress[_qp].xz();
801  stress_CMM(1, 0) = _stress[_qp].xy();
802  stress_CMM(1, 1) = _stress[_qp].yy();
803  stress_CMM(1, 2) = _stress[_qp].yz();
804  stress_CMM(2, 0) = _stress[_qp].xz();
805  stress_CMM(2, 1) = _stress[_qp].yz();
806  stress_CMM(2, 2) = _stress[_qp].zz();
807 
808  // Deformation gradient (F):
809  ColumnMajorMatrix F;
811  // Displacement gradient (H):
812  ColumnMajorMatrix H(F);
813  H.addDiag(-1.0);
814  Real detF = _element->detMatrix(F);
815  ColumnMajorMatrix Finv;
816  _element->invertMatrix(F, Finv);
817  ColumnMajorMatrix FinvT;
818  FinvT = Finv.transpose();
819  ColumnMajorMatrix HT;
820  HT = H.transpose();
821 
822  // 1st Piola-Kirchoff Stress (P):
823  ColumnMajorMatrix piola;
824  piola = stress_CMM * FinvT;
825  piola *= detF;
826 
827  // HTP = H^T * P = H^T * detF * sigma * FinvT;
828  ColumnMajorMatrix HTP;
829  HTP = HT * piola;
830 
831  ColumnMajorMatrix WI;
832  WI.identity();
833  WI *= (*_SED)[_qp];
834  WI *= detF;
835  (*_Eshelby_tensor)[_qp] = WI - HTP;
836 }
837 
839 
840 void
842 {
843  // Given the stretching, compute the stress increment and add it to the old stress. Also update
844  // the creep strain
845  // stress = stressOld + stressIncrement
846 
847  const SubdomainID current_block = _current_elem->subdomain_id();
848  MooseSharedPointer<ConstitutiveModel> cm = _constitutive_model[current_block];
849 
850  mooseAssert(_constitutive_active, "Logic error. ConstitutiveModel not active.");
851 
852  // Let's be a little careful and check for a non-existent
853  // ConstitutiveModel, which could be returned as a default value
854  // from std::map::operator[]
855  if (!cm)
856  mooseError("Logic error. No ConstitutiveModel for current_block=", current_block, ".");
857 
858  cm->setQp(_qp);
859  cm->computeStress(
860  *_current_elem, *elasticityTensor(), _stress_old, _strain_increment, _stress[_qp]);
861 }
862 
864 void
866 {
867  if (_cracking_stress_function != NULL)
868  {
869  _cracking_stress = _cracking_stress_function->value(_t, _q_point[_qp]);
870  }
871 
873 
875 
877 
879 
881 
882  if (changed || _cracking_stress > 0)
883  {
885  }
886 }
887 
889 
890 bool
892 {
893  bool changed(false);
895  {
896  const SubdomainID current_block = _current_elem->subdomain_id();
897  MooseSharedPointer<ConstitutiveModel> cm = _constitutive_model[current_block];
898 
899  // Let's be a little careful and check for a non-existent
900  // ConstitutiveModel, which could be returned as a default value
901  // from std::map::operator[]
902  if (!cm)
903  mooseError("ConstitutiveModel not available for block ", current_block);
904 
905  cm->setQp(_qp);
906  changed |= cm->updateElasticityTensor(tensor);
907  }
908 
910  {
911  SymmIsotropicElasticityTensor * t = dynamic_cast<SymmIsotropicElasticityTensor *>(&tensor);
912  if (!t)
913  {
914  mooseError("Cannot use Youngs modulus or Poissons ratio functions");
915  }
916  t->unsetConstants();
917  Point p;
919  ? _youngs_modulus_function->value(_temperature[_qp], p)
920  : _youngs_modulus));
922  ? _poissons_ratio_function->value(_temperature[_qp], p)
923  : _poissons_ratio));
924  changed = true;
925  }
926  return changed;
927 }
928 
930 
931 void
933 {
934  std::vector<SymmTensor *> t(3);
935  t[0] = &_elastic_strain[_qp];
936  t[1] = &_total_strain[_qp];
937  t[2] = &_stress[_qp];
939 }
940 
942 
943 void
945 {
946  mooseAssert(_local_elasticity_tensor, "null elasticity tensor");
947 
948  // _Jacobian_mult[_qp] = *_local_elasticity_tensor;
949  // _d_stress_dT[_qp] = *_local_elasticity_tensor * _d_strain_dT;
952 }
953 
955 
956 void
958 {
959 
961 
963 
964  // Load in the volumetric models and constitutive models
965  bool set_constitutive_active = false;
966  for (unsigned i(0); i < _block_id.size(); ++i)
967  {
968 
969  // const std::vector<MaterialBase*> * mats_p;
970  std::vector<MooseSharedPointer<MaterialBase>> const * mats_p;
971  std::string suffix;
972  if (_bnd)
973  {
974  mats_p = &_fe_problem.getMaterialWarehouse()[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(
975  _block_id[i], _tid);
976  suffix = "_face";
977  }
978  else
979  mats_p = &_fe_problem.getMaterialWarehouse().getActiveBlockObjects(_block_id[i], _tid);
980 
981  const std::vector<MooseSharedPointer<MaterialBase>> & mats = *mats_p;
982 
983  for (unsigned int j = 0; j < mats.size(); ++j)
984  {
985  MooseSharedPointer<VolumetricModel> vm =
986  MooseSharedNamespace::dynamic_pointer_cast<VolumetricModel>(mats[j]);
987  if (vm)
988  {
989  const std::vector<std::string> & dep_matl_props = vm->getDependentMaterialProperties();
990  for (unsigned k = 0; k < dep_matl_props.size(); ++k)
991  {
992  if ("" != dep_matl_props[k] &&
993  _dep_matl_props.find(dep_matl_props[k]) == _dep_matl_props.end())
994  {
995  mooseError("A VolumetricModel depends on " + dep_matl_props[k] +
996  ", but that material property was not given in the dep_matl_props line.");
997  }
998  }
999  _volumetric_models[_block_id[i]].push_back(vm);
1000  }
1001  }
1002 
1003  for (std::map<SubdomainID, MooseSharedPointer<ConstitutiveModel>>::iterator iter =
1004  _constitutive_model.begin();
1005  iter != _constitutive_model.end();
1006  ++iter)
1007  {
1008  iter->second->initialSetup();
1009  }
1010 
1011  if (isParamValid("constitutive_model") && !_constitutive_active)
1012  {
1013  // User-defined name of the constitutive model (a Material object)
1014  std::string constitutive_model = getParam<std::string>("constitutive_model") + suffix;
1015 
1016  for (unsigned int j = 0; j < mats.size(); ++j)
1017  {
1018  MooseSharedPointer<ConstitutiveModel> cm =
1019  MooseSharedNamespace::dynamic_pointer_cast<ConstitutiveModel>(mats[j]);
1020 
1021  if (cm && cm->name() == constitutive_model)
1022  {
1023  _constitutive_model[_block_id[i]] = cm;
1024  set_constitutive_active = true;
1025  break;
1026  }
1027  }
1028 
1029  if (!set_constitutive_active)
1030  mooseError("Unable to find constitutive model " + constitutive_model);
1031  }
1032  }
1033  if (set_constitutive_active)
1034  _constitutive_active = true;
1035 
1037  {
1038  // Make sure that timeDerivative is supported for _alpha_function. If not, it will error out.
1039  Point dummy_point;
1040  Real dummy_temp = 0;
1041  _alpha_function->timeDerivative(dummy_temp, dummy_point);
1042  }
1043 }
1044 
1046 
1047 void
1049 {
1050  bool cracking_locally_active(false);
1051  if (_cracking_stress > 0)
1052  {
1053  // Compute whether cracking has occurred
1054  (*_crack_rotation)[_qp] = (*_crack_rotation_old)[_qp];
1055 
1056  ColumnMajorMatrix RT((*_crack_rotation)[_qp].transpose());
1057  SymmTensor ePrime;
1058  rotateSymmetricTensor(RT, _elastic_strain[_qp], ePrime);
1059 
1060  for (unsigned int i(0); i < 3; ++i)
1061  {
1062  (*_crack_max_strain)[_qp](i) = (*_crack_max_strain_old)[_qp](i);
1063 
1064  if (_cracking_neg_fraction == 0 && ePrime(i, i) < 0)
1065  {
1066  _crack_flags_local(i) = 1;
1067  }
1068  else if (_cracking_neg_fraction > 0 &&
1069  (*_crack_strain)[_qp](i) * _cracking_neg_fraction > ePrime(i, i))
1070  {
1071  if (-(*_crack_strain)[_qp](i) * _cracking_neg_fraction > ePrime(i, i))
1072  {
1073  _crack_flags_local(i) = 1;
1074  }
1075  else
1076  {
1077  // s = a*e^2 + b*e + c
1078  // a = (Ec-Eo)/(4etr)
1079  // b = (Ec+Eo)/2
1080  // c = (Ec-Eo)*etr/4
1081  // etr = _cracking_neg_fraction * strain when crack occurred
1082  const Real etr = _cracking_neg_fraction * (*_crack_strain)[_qp](i);
1083  const Real Eo = _cracking_stress / (*_crack_strain)[_qp](i);
1084  const Real Ec = Eo * (*_crack_flags_old)[_qp](i);
1085  const Real a = (Ec - Eo) / (4 * etr);
1086  const Real b = (Ec + Eo) / 2;
1087  // Compute the ratio of the current transition stiffness to the original stiffness
1088  _crack_flags_local(i) = (2 * a * etr + b) / Eo;
1089  cracking_locally_active = true;
1090  }
1091  }
1092  else
1093  {
1094  _crack_flags_local(i) = (*_crack_flags_old)[_qp](i);
1095  if (_crack_flags_local(i) < 1)
1096  {
1097  cracking_locally_active = true;
1098  }
1099  }
1100  }
1101  }
1102  if (cracking_locally_active)
1103  {
1104  // Adjust the elasticity matrix for cracking. This must be used by the
1105  // constitutive law.
1106  if (_compute_method == "ShearRetention")
1108  else
1110 
1111  ColumnMajorMatrix R_9x9(9, 9);
1112  const ColumnMajorMatrix & R((*_crack_rotation)[_qp]);
1115 
1117  }
1118 }
1119 
1121 
1122 void
1123 SolidModel::applyCracksToTensor(SymmTensor & tensor, const RealVectorValue & sigma)
1124 {
1125  // Form transformation matrix R*E*R^T
1126  const ColumnMajorMatrix & R((*_crack_rotation)[_qp]);
1127 
1128  // Rotate to crack frame
1129  rotateSymmetricTensor(R.transpose(), tensor, tensor);
1130 
1131  // Reset stress if cracked
1132  if ((*_crack_flags)[_qp](0) < 1)
1133  {
1134  tensor(0, 0) = sigma(0);
1135  }
1136  if ((*_crack_flags)[_qp](1) < 1)
1137  {
1138  tensor(1, 1) = sigma(1);
1139  }
1140  if ((*_crack_flags)[_qp](2) < 1)
1141  {
1142  tensor(2, 2) = sigma(2);
1143  }
1144 
1145  // Rotate back to global frame
1146  rotateSymmetricTensor(R, tensor, tensor);
1147 }
1148 
1150 
1151 void
1152 SolidModel::computeCrackStrainAndOrientation(ColumnMajorMatrix & principal_strain)
1153 {
1154  // The rotation tensor is ordered such that known dirs appear last in the list of
1155  // columns. So, if one dir is known, it corresponds with the last column in the
1156  // rotation tensor.
1157  //
1158  // This convention is based on the eigen routine returning eigen values in
1159  // ascending order.
1160  const unsigned int numKnownDirs = getNumKnownCrackDirs();
1161 
1163 
1164  (*_crack_rotation)[_qp] = (*_crack_rotation_old)[_qp];
1165 
1166  if (numKnownDirs == 0)
1167  {
1168  ColumnMajorMatrix e_vec(3, 3);
1169  _elastic_strain[_qp].columnMajorMatrix().eigen(principal_strain, e_vec);
1170  // If the elastic strain is beyond the cracking strain, save the eigen vectors as
1171  // the rotation tensor.
1172  (*_crack_rotation)[_qp] = e_vec;
1173  }
1174  else if (numKnownDirs == 1)
1175  {
1176  // This is easily the most complicated case.
1177  // 1. Rotate the elastic strain to the orientation associated with the known
1178  // crack.
1179  // 2. Extract the upper 2x2 diagonal block into a separate tensor.
1180  // 3. Run the eigen solver on the result.
1181  // 4. Update the rotation tensor to reflect the effect of the 2 eigenvectors.
1182 
1183  // 1.
1184  ColumnMajorMatrix RT((*_crack_rotation)[_qp].transpose());
1185  SymmTensor ePrime;
1186  rotateSymmetricTensor(RT, _elastic_strain[_qp], ePrime);
1187 
1188  // 2.
1189  ColumnMajorMatrix e2x2(2, 2);
1190  e2x2(0, 0) = ePrime(0, 0);
1191  e2x2(1, 0) = ePrime(1, 0);
1192  e2x2(0, 1) = ePrime(0, 1);
1193  e2x2(1, 1) = ePrime(1, 1);
1194 
1195  // 3.
1196  ColumnMajorMatrix e_val2x1(2, 1);
1197  ColumnMajorMatrix e_vec2x2(2, 2);
1198  e2x2.eigen(e_val2x1, e_vec2x2);
1199 
1200  // 4.
1201  ColumnMajorMatrix e_vec(3, 3);
1202  e_vec(0, 0) = e_vec2x2(0, 0);
1203  e_vec(1, 0) = e_vec2x2(1, 0);
1204  e_vec(2, 0) = 0;
1205  e_vec(0, 1) = e_vec2x2(0, 1);
1206  e_vec(1, 1) = e_vec2x2(1, 1);
1207  e_vec(2, 1) = 0;
1208  e_vec(2, 0) = 0;
1209  e_vec(2, 1) = 0;
1210  e_vec(2, 2) = 1;
1211  (*_crack_rotation)[_qp] = (*_crack_rotation_old)[_qp] * e_vec;
1212 
1213  principal_strain(0, 0) = e_val2x1(0, 0);
1214  principal_strain(1, 0) = e_val2x1(1, 0);
1215  principal_strain(2, 0) = ePrime(2, 2);
1216  }
1217  else if (numKnownDirs == 2 || numKnownDirs == 3)
1218  {
1219  // Rotate to cracked orientation and pick off the strains in the rotated
1220  // coordinate directions.
1221  ColumnMajorMatrix RT((*_crack_rotation)[_qp].transpose());
1222  SymmTensor ePrime;
1223  rotateSymmetricTensor(RT, _elastic_strain[_qp], ePrime);
1224  principal_strain(0, 0) = ePrime.xx();
1225  principal_strain(1, 0) = ePrime.yy();
1226  principal_strain(2, 0) = ePrime.zz();
1227  }
1228  else
1229  {
1230  mooseError("Invalid number of known crack directions");
1231  }
1232 }
1233 
1235 
1236 void
1238 {
1239  if (_cracking_stress_function != NULL)
1240  {
1241  _cracking_stress = _cracking_stress_function->value(_t, _q_point[_qp]);
1242  }
1243 
1244  if (_cracking_stress > 0)
1245  {
1246 
1248 
1249  for (unsigned i(0); i < 3; ++i)
1250  {
1251  if (_principal_strain(i, 0) > (*_crack_max_strain_old)[_qp](i))
1252  {
1253  (*_crack_max_strain)[_qp](i) = _principal_strain(i, 0);
1254  }
1255  }
1256 
1257  // Check for new cracks.
1258  // This must be done in the crack-local coordinate frame.
1259 
1260  // Rotate stress to cracked orientation.
1261  ColumnMajorMatrix R((*_crack_rotation)[_qp]);
1262  ColumnMajorMatrix RT((*_crack_rotation)[_qp].transpose());
1263  SymmTensor sigmaPrime;
1264  rotateSymmetricTensor(RT, _stress[_qp], sigmaPrime);
1265 
1266  unsigned int num_cracks(0);
1267  for (unsigned i(0); i < 3; ++i)
1268  {
1269  _crack_flags_local(i) = 1;
1270  (*_crack_strain)[_qp](i) = (*_crack_strain_old)[_qp](i);
1271  if ((*_crack_flags_old)[_qp](i) < 1)
1272  {
1273  ++num_cracks;
1274  }
1275  }
1276 
1277  bool new_crack(false);
1278  bool cracked(false);
1279  RealVectorValue sigma;
1280  for (unsigned i(0); i < 3; ++i)
1281  {
1282  sigma(i) = sigmaPrime(i, i);
1283  (*_crack_flags)[_qp](i) = (*_crack_flags_old)[_qp](i);
1284  if (sigma(i) <= 1e-4)
1285  {
1286  if ((*_crack_flags)[_qp](i) == 1)
1287  {
1288  (*_crack_max_strain)[_qp](i) = _principal_strain(i, 0);
1289  }
1290  }
1291 
1292  // _cracked_this_step[_q_point[_qp]] = 0;
1293  Real crackFactor(1);
1294  if (_cracking_release == CR_POWER)
1295  {
1296  (*_crack_count)[_qp](i) = (*_crack_count_old)[_qp](i);
1297  }
1298  if ((_cracking_release == CR_POWER && sigma(i) > _cracking_stress &&
1299  _active_crack_planes[i] == 1
1300  // && (*_crack_count)[_qp](i) == 0
1301  )
1302  // || _cracked_this_step_count[_q_point[_qp]] > 5
1303  )
1304  {
1305  cracked = true;
1306  ++((*_crack_count)[_qp](i));
1307  // _cracked_this_step[_q_point[_qp]] = 1;
1308  // Assume Poisson's ratio drops to zero for this direction. Stiffness is then Young's
1309  // modulus.
1310  const Real stiff = _youngs_modulus_function
1311  ? _youngs_modulus_function->value(_temperature[_qp], Point())
1312  : _youngs_modulus;
1313 
1314  if ((*_crack_count_old)[_qp](i) == 0)
1315  {
1316  new_crack = true;
1317  ++num_cracks;
1318 
1319  (*_crack_strain)[_qp](i) = _cracking_stress / stiff;
1320  }
1321  // Compute stress, factor....
1322  (*_crack_flags)[_qp](i) *= 1. / 3.;
1323 
1324  if ((*_crack_max_strain)[_qp](i) < (*_crack_strain)[_qp](i))
1325  {
1326  (*_crack_max_strain)[_qp](i) = (*_crack_strain)[_qp](i);
1327  }
1328  sigma(i) = (*_crack_flags)[_qp](i) * stiff * _principal_strain(i, 0);
1329  }
1330  else if ((_cracking_release != CR_POWER && (*_crack_flags_old)[_qp](i) == 1 &&
1331  sigma(i) > _cracking_stress && num_cracks < _max_cracks &&
1332  _active_crack_planes[i] == 1)
1333  // || _cracked_this_step_count[_q_point[_qp]] > 5
1334  )
1335  {
1336  // A new crack
1337  // _cracked_this_step[_q_point[_qp]] = 1;
1338 
1339  cracked = true;
1340  new_crack = true;
1341  ++num_cracks;
1342 
1343  // Assume Poisson's ratio drops to zero for this direction. Stiffness is then Young's
1344  // modulus.
1345  const Real stiff = _youngs_modulus_function
1346  ? _youngs_modulus_function->value(_temperature[_qp], Point())
1347  : _youngs_modulus;
1348 
1349  (*_crack_strain)[_qp](i) = _cracking_stress / stiff;
1350  if ((*_crack_max_strain)[_qp](i) < (*_crack_strain)[_qp](i))
1351  {
1352  (*_crack_max_strain)[_qp](i) = (*_crack_strain)[_qp](i);
1353  }
1354 
1355  crackFactor = computeCrackFactor(i, sigma(i), (*_crack_flags)[_qp](i));
1356 
1357  (*_crack_flags)[_qp](i) = crackFactor;
1358  _crack_flags_local(i) = crackFactor;
1359 
1360  // May want to set the old value. This may help with the nonlinear solve
1361  // since the stress cannot bounce between just below the critical stress and
1362  // effectively zero. However, this may set allow cracking prematurely.
1363  // (*_crack_flags_old)[_qp](i) = crackFactor;
1364  // (*_crack_strain_old)[_qp](i) = _principal_strain(i,0);
1365  }
1366  else if (_cracking_release != CR_POWER && (*_crack_flags_old)[_qp](i) < 1 &&
1367  std::abs(_principal_strain(i, 0) - (*_crack_max_strain)[_qp](i)) < 1e-10)
1368  {
1369  // Previously cracked,
1370  // Crack opening
1371  cracked = true;
1372  crackFactor = computeCrackFactor(i, sigma(i), (*_crack_flags)[_qp](i));
1373  (*_crack_flags)[_qp](i) = crackFactor;
1374  _crack_flags_local(i) = crackFactor;
1375  }
1376  else if (_cracking_neg_fraction > 0 &&
1379  {
1380  // s = a*e^2 + b*e + c
1381  // a = (Ec-Eo)/(4etr)
1382  // b = (Ec+Eo)/2
1383  // c = (Ec-Eo)*etr/4
1384  // etr = _cracking_neg_fraction * strain when crack occurred
1385  cracked = true;
1386  const Real etr = _cracking_neg_fraction * (*_crack_strain)[_qp](i);
1387  const Real Eo = _cracking_stress / (*_crack_strain)[_qp](i);
1388  const Real Ec = Eo * (*_crack_flags_old)[_qp](i);
1389  const Real a = (Ec - Eo) / (4 * etr);
1390  const Real b = (Ec + Eo) / 2;
1391  const Real c = (Ec - Eo) * etr / 4;
1392  sigma(i) = (a * _principal_strain(i, 0) + b) * _principal_strain(i, 0) + c;
1393  }
1394  }
1395 
1396  if (!new_crack)
1397  {
1398  (*_crack_rotation)[_qp] = (*_crack_rotation_old)[_qp];
1399  }
1400  if (cracked)
1401  {
1402  applyCracksToTensor(_stress[_qp], sigma);
1403  }
1404  }
1405 }
1406 
1407 Real
1408 SolidModel::computeCrackFactor(int i, Real & sigma, Real & flagVal)
1409 {
1411  {
1412  if ((*_crack_max_strain)[_qp](i) < (*_crack_strain)[_qp](i))
1413  {
1414  std::stringstream err;
1415  err << "Max strain less than crack strain: " << i << " " << sigma << ", "
1416  << (*_crack_max_strain)[_qp](i) << ", " << (*_crack_strain)[_qp](i) << ", "
1417  << _principal_strain(0, 0) << ", " << _principal_strain(1, 0) << ", "
1418  << _principal_strain(2, 0) << _elastic_strain[_qp] << std::endl;
1419  mooseError(err.str());
1420  }
1421  const Real crackMaxStrain((*_crack_max_strain)[_qp](i));
1422  // Compute stress that follows exponental curve
1426  (crackMaxStrain - (*_crack_strain)[_qp](i))));
1427  // Compute ratio of current stiffness to original stiffness
1428  flagVal = sigma * (*_crack_strain)[_qp](i) / (crackMaxStrain * _cracking_stress);
1429  }
1430  else
1431  {
1432  if (_cracking_residual_stress == 0)
1433  {
1434  const Real tiny(1e-16);
1435  flagVal = tiny;
1436  sigma = tiny * (*_crack_strain)[_qp](i) * _youngs_modulus;
1437  }
1438  else
1439  {
1441  flagVal = sigma / ((*_crack_max_strain)[_qp](i) * _youngs_modulus);
1442  }
1443  }
1444  if (flagVal < 0)
1445  {
1446  std::stringstream err;
1447  err << "Negative crack flag found: " << i << " " << flagVal << ", "
1448  << (*_crack_max_strain)[_qp](i) << ", " << (*_crack_strain)[_qp](i) << ", " << std::endl;
1449  mooseError(err.str());
1450  }
1451  return flagVal;
1452 }
1453 
1454 unsigned int
1456 {
1457  const unsigned fromElement = _element->getNumKnownCrackDirs();
1458  unsigned int retVal(0);
1459  for (unsigned int i(0); i < 3 - fromElement; ++i)
1460  {
1461  retVal += ((*_crack_flags_old)[_qp](i) < 1);
1462  }
1463  return retVal + fromElement;
1464 }
1465 
1468 {
1469  std::string mat_name = name();
1470  InputParameters parameters = emptyInputParameters();
1471  parameters += this->parameters();
1472 
1474 
1475  std::string formulation = getParam<MooseEnum>("formulation");
1476  std::transform(formulation.begin(), formulation.end(), formulation.begin(), ::tolower);
1477  if (formulation == "nonlinear3d")
1478  {
1479  if (!isCoupled("disp_x") || !isCoupled("disp_y") || !isCoupled("disp_z"))
1480  mooseError("Nonlinear3D requires all three displacements");
1481 
1482  if (isCoupled("disp_r"))
1483  mooseError("Linear must not define disp_r");
1484 
1485  if (_coord_type == Moose::COORD_RZ)
1486  mooseError("Nonlinear3D formulation requested for coord_type = RZ problem");
1487 
1488  element = new SolidMechanics::Nonlinear3D(*this, mat_name, parameters);
1489  }
1490  else if (formulation == "nonlinearrz")
1491  {
1492  if (!isCoupled("disp_r") || !isCoupled("disp_z"))
1493  mooseError("NonlinearRZ must define disp_r and disp_z");
1494 
1495  element = new SolidMechanics::NonlinearRZ(*this, mat_name, parameters);
1496  }
1497  else if (formulation == "axisymmetricrz")
1498  {
1499  if (!isCoupled("disp_r") || !isCoupled("disp_z"))
1500  mooseError("AxisymmetricRZ must define disp_r and disp_z");
1501  element = new SolidMechanics::AxisymmetricRZ(*this, mat_name, parameters);
1502  }
1503  else if (formulation == "sphericalr")
1504  {
1505  if (!isCoupled("disp_r"))
1506  mooseError("SphericalR must define disp_r");
1507  element = new SolidMechanics::SphericalR(*this, mat_name, parameters);
1508  }
1509  else if (formulation == "planestrain")
1510  {
1511  if (!isCoupled("disp_x") || !isCoupled("disp_y"))
1512  mooseError("PlaneStrain must define disp_x and disp_y");
1513  element = new SolidMechanics::PlaneStrain(*this, mat_name, parameters);
1514  }
1515  else if (formulation == "nonlinearplanestrain")
1516  {
1517  if (!isCoupled("disp_x") || !isCoupled("disp_y"))
1518  mooseError("NonlinearPlaneStrain must define disp_x and disp_y");
1519  element = new SolidMechanics::NonlinearPlaneStrain(*this, mat_name, parameters);
1520  }
1521  else if (formulation == "linear")
1522  {
1523  if (isCoupled("disp_r"))
1524  mooseError("Linear must not define disp_r");
1525  if (_coord_type == Moose::COORD_RZ)
1526  mooseError("Linear formulation requested for coord_type = RZ problem");
1527  element = new SolidMechanics::Linear(*this, mat_name, parameters);
1528  }
1529  else if (formulation != "")
1530  mooseError("Unknown formulation: " + formulation);
1531 
1532  if (!element && _coord_type == Moose::COORD_RZ)
1533  {
1534  if (!isCoupled("disp_r") || !isCoupled("disp_z"))
1535  {
1536  std::string err(name());
1537  err += ": RZ coord sys requires disp_r and disp_z for AxisymmetricRZ formulation";
1538  mooseError(err);
1539  }
1540  element = new SolidMechanics::AxisymmetricRZ(*this, mat_name, parameters);
1541  }
1542  else if (!element && _coord_type == Moose::COORD_RSPHERICAL)
1543  {
1544  if (!isCoupled("disp_r"))
1545  {
1546  std::string err(name());
1547  err += ": RSPHERICAL coord sys requires disp_r for SphericalR formulation";
1548  mooseError(err);
1549  }
1550  element = new SolidMechanics::SphericalR(*this, mat_name, parameters);
1551  }
1552 
1553  if (!element)
1554  {
1555  if (isCoupled("disp_x") && isCoupled("disp_y") && isCoupled("disp_z"))
1556  {
1557  if (isCoupled("disp_r"))
1558  mooseError("Error with displacement specification in material " + mat_name);
1559  element = new SolidMechanics::Nonlinear3D(*this, mat_name, parameters);
1560  }
1561  else if (isCoupled("disp_x") && isCoupled("disp_y"))
1562  {
1563  if (isCoupled("disp_r"))
1564  mooseError("Error with displacement specification in material " + mat_name);
1565  element = new SolidMechanics::PlaneStrain(*this, mat_name, parameters);
1566  }
1567  else if (isCoupled("disp_r") && isCoupled("disp_z"))
1568  {
1569  if (_coord_type != Moose::COORD_RZ)
1570  mooseError("RZ coord system not specified, but disp_r and disp_z are");
1571  element = new SolidMechanics::AxisymmetricRZ(*this, mat_name, parameters);
1572  }
1573  else if (isCoupled("disp_r"))
1574  {
1575  if (_coord_type != Moose::COORD_RSPHERICAL)
1576  mooseError("RSPHERICAL coord system not specified, but disp_r is");
1577  element = new SolidMechanics::SphericalR(*this, mat_name, parameters);
1578  }
1579  else if (isCoupled("disp_x"))
1580  element = new SolidMechanics::Linear(*this, mat_name, parameters);
1581  else
1582  mooseError("Unable to determine formulation for material " + mat_name);
1583  }
1584 
1585  mooseAssert(element, "No Element created for material " + mat_name);
1586 
1587  return element;
1588 }
1589 
1590 void
1591 SolidModel::createConstitutiveModel(const std::string & cm_name)
1592 {
1593 
1594  Factory & factory = _app.getFactory();
1595  InputParameters params = factory.getValidParams(cm_name);
1596 
1597  params.applyParameters(parameters());
1598  params.set<SubProblem *>("_subproblem") = &_subproblem;
1599  params.applySpecificParameters(parameters(), {"_material_data_type", "_neighbor"}, true);
1600 
1601  MooseSharedPointer<ConstitutiveModel> cm =
1602  factory.create<ConstitutiveModel>(cm_name, name() + "Model", params, _tid);
1603 
1604  _models_to_free.insert(
1605  cm); // Keep track of the dynamic memory that is created internally to this object
1606 
1607  _constitutive_active = true;
1608  for (unsigned i(0); i < _block_id.size(); ++i)
1609  {
1610  _constitutive_model[_block_id[i]] = cm;
1611  }
1612 }
1613 
1614 void
1616 {
1617  for (_qp = 0; _qp < n_points; ++_qp)
1618  {
1620  }
1622  {
1623  const SubdomainID current_block = _current_elem->subdomain_id();
1624  MooseSharedPointer<ConstitutiveModel> cm = _constitutive_model[current_block];
1625  cm->initStatefulProperties(n_points);
1626  }
1627 }
1628 
1629 void
1631 {
1632  mooseAssert(_J_thermal_term_vec, "_J_thermal_term_vec not initialized");
1633 
1634  Real stress_trace = _stress[_qp].xx() + _stress[_qp].yy() + _stress[_qp].zz();
1635 
1637  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
1638  {
1639  Real dthermstrain_dx =
1641  (*_J_thermal_term_vec)[_qp](i) = stress_trace * dthermstrain_dx;
1642  }
1643 }
1644 
1645 void
1647 {
1649  "_current_instantaneous_thermal_expansion_coef not initialized");
1650 
1651  (*_current_instantaneous_thermal_expansion_coef)[_qp] = 0.0;
1652 
1653  if (_alpha_function)
1654  {
1655  Point p;
1656  Real current_temp = _temperature[_qp];
1657 
1658  if (!_mean_alpha_function)
1659  {
1660  Real alpha = _alpha_function->value(current_temp, p);
1661  (*_current_instantaneous_thermal_expansion_coef)[_qp] = alpha;
1662  }
1663  else
1664  {
1665  Real small(1e-6);
1666  Real dalphabar_dT = _alpha_function->timeDerivative(current_temp, p);
1667  Real alphabar_Tsf = _alpha_function->value(_stress_free_temp, p);
1668  Real alphabar = _alpha_function->value(current_temp, p);
1669  Real numerator = dalphabar_dT * (current_temp - _ref_temp) + alphabar;
1670  Real denominator = 1.0 + alphabar_Tsf * (_stress_free_temp - _ref_temp);
1671  if (denominator < small)
1672  mooseError("Denominator too small in thermal strain calculation");
1673  (*_current_instantaneous_thermal_expansion_coef)[_qp] = numerator / denominator;
1674  }
1675  }
1676  else
1678 }
SolidModel::_youngs_modulus
Real _youngs_modulus
Definition: SolidModel.h:74
SymmTensor::xx
Real xx() const
Definition: SymmTensor.h:131
SymmElasticityTensor::calculate
void calculate(unsigned int qp)
Public function that will be called whenever the values for this matrix need to be filled in.
Definition: SymmElasticityTensor.C:41
SolidModel::computeThermalJvec
virtual void computeThermalJvec()
Definition: SolidModel.C:1630
SolidModel::_active_crack_planes
std::vector< unsigned int > _active_crack_planes
Definition: SolidModel.h:87
SolidModel::_compute_JIntegral
const bool _compute_JIntegral
Definition: SolidModel.h:153
SymmElasticityTensor::rotateFromLocalToGlobal
void rotateFromLocalToGlobal(const ColumnMajorMatrix &R)
Definition: SymmElasticityTensor.C:360
SolidModel::_crack_rotation_old
const MaterialProperty< ColumnMajorMatrix > * _crack_rotation_old
Definition: SolidModel.h:128
SolidModel::_current_instantaneous_thermal_expansion_coef
MaterialProperty< Real > * _current_instantaneous_thermal_expansion_coef
Definition: SolidModel.h:163
SymmTensor::zx
Real zx() const
Definition: SymmTensor.h:136
VolumetricModel.h
SymmIsotropicElasticityTensor
Defines an Isotropic Elasticity Tensor.
Definition: SymmIsotropicElasticityTensor.h:33
SolidModel::_step_one
bool & _step_one
Definition: SolidModel.h:262
SolidModel::createElasticityTensor
virtual void createElasticityTensor()
Definition: SolidModel.C:500
SolidModel::elasticityTensor
SymmElasticityTensor * elasticityTensor() const
Definition: SolidModel.h:224
SolidModel::CRACKING_RELEASE
CRACKING_RELEASE
Definition: SolidModel.h:47
SolidModel::_crack_strain_old
const MaterialProperty< RealVectorValue > * _crack_strain_old
Definition: SolidModel.h:130
SolidModel::_cracking_alpha
Real _cracking_alpha
Definition: SolidModel.h:86
SolidMechanics::Element::init
virtual void init()
Definition: Element.h:48
SolidModel::_local_elasticity_tensor
SymmElasticityTensor * _local_elasticity_tensor
Definition: SolidModel.h:272
SymmTensor::zz
Real zz() const
Definition: SymmTensor.h:133
SolidModel::_d_stress_dT
MaterialProperty< SymmTensor > & _d_stress_dT
Definition: SolidModel.h:142
SymmTensor::zero
void zero()
Definition: SymmTensor.h:275
SolidModel::CR_ABRUPT
Definition: SolidModel.h:49
SolidModel::_shear_modulus
Real _shear_modulus
Definition: SolidModel.h:73
SolidModel::crackingStressRotation
virtual void crackingStressRotation()
Definition: SolidModel.C:1237
ConstitutiveModel.h
SolidModel::_cracking_release
const CRACKING_RELEASE _cracking_release
Definition: SolidModel.h:79
SolidModel::_temperature_old
const VariableValue & _temperature_old
Definition: SolidModel.h:95
SolidModel::computeProperties
virtual void computeProperties()
Definition: SolidModel.C:729
ConstitutiveModel
Definition: ConstitutiveModel.h:22
SolidModel::_compute_method
const std::string _compute_method
Definition: SolidModel.h:83
SolidMechanics::NonlinearPlaneStrain
NonlinearPlaneStrain is a class for large deformation plane strain.
Definition: NonlinearPlaneStrain.h:21
SolidModel::createElement
SolidMechanics::Element * createElement()
Definition: SolidModel.C:1467
SymmIsotropicElasticityTensor.h
SolidModel::_youngs_modulus_set
bool _youngs_modulus_set
Definition: SolidModel.h:68
SolidModel::_total_strain_increment
SymmTensor _total_strain_increment
Total strain increment, including mechanical strains and eigenstrains.
Definition: SolidModel.h:145
SolidModel::_constitutive_active
bool _constitutive_active
Definition: SolidModel.h:253
SolidModel::computeStrainEnergyDensity
virtual void computeStrainEnergyDensity()
Definition: SolidModel.C:780
SymmElasticityTensor::adjustForCracking
virtual void adjustForCracking(const RealVectorValue &crack_flags)
Definition: SymmElasticityTensor.C:372
SolidModel::_SED
MaterialProperty< Real > * _SED
Definition: SolidModel.h:157
registerMooseObject
registerMooseObject("SolidMechanicsApp", SolidModel)
SymmElasticityTensor::form9x9Rotation
void form9x9Rotation(const ColumnMajorMatrix &R_3x3, ColumnMajorMatrix &R_9x9) const
Definition: SymmElasticityTensor.C:341
SolidModel::_crack_flags
MaterialProperty< RealVectorValue > * _crack_flags
Definition: SolidModel.h:122
SymmElasticityTensor::adjustForCrackingWithShearRetention
virtual void adjustForCrackingWithShearRetention(const RealVectorValue &crack_flags)
Definition: SymmElasticityTensor.C:378
SolidModel::_J_thermal_term_vec
MaterialProperty< RealVectorValue > * _J_thermal_term_vec
Definition: SolidModel.h:160
SolidModel::getNumKnownCrackDirs
virtual unsigned int getNumKnownCrackDirs() const
Definition: SolidModel.C:1455
SolidModel::_max_cracks
const unsigned int _max_cracks
Definition: SolidModel.h:88
SolidModel::jacobianSetup
virtual void jacobianSetup()
Definition: SolidModel.C:533
SolidModel::_cracking_beta
const Real _cracking_beta
Definition: SolidModel.h:82
SolidModel::_compute_InteractionIntegral
const bool _compute_InteractionIntegral
Definition: SolidModel.h:154
SolidModel::_strain_increment
SymmTensor _strain_increment
In most models, this is the mechanical strain increment, but for inelastic models,...
Definition: SolidModel.h:151
SolidModel::_step_zero
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
Definition: SolidModel.h:261
SolidModel::_volumetric_models
std::map< SubdomainID, std::vector< MooseSharedPointer< VolumetricModel > > > _volumetric_models
Definition: SolidModel.h:105
SolidModel::_alpha_function
const Function * _alpha_function
Definition: SolidModel.h:98
SolidModel::CR_EXPONENTIAL
Definition: SolidModel.h:50
SolidModel::_Jacobian_mult
MaterialProperty< SymmElasticityTensor > & _Jacobian_mult
Definition: SolidModel.h:136
SolidModel::finalizeStress
virtual void finalizeStress()
Rotate stress to current configuration.
Definition: SolidModel.C:932
SolidModel::_mechanical_strain_increment
SymmTensor _mechanical_strain_increment
Mechanical strain increment, which is the total strain increment minus eigenstrains.
Definition: SolidModel.h:147
Nonlinear3D.h
SolidModel::_stress_old_prop
const MaterialProperty< SymmTensor > & _stress_old_prop
Definition: SolidModel.h:111
SolidModel::_constitutive_model
std::map< SubdomainID, MooseSharedPointer< ConstitutiveModel > > _constitutive_model
Definition: SolidModel.h:250
SolidModel::_poissons_ratio
Real _poissons_ratio
Definition: SolidModel.h:72
SolidModel::_crack_flags_old
const MaterialProperty< RealVectorValue > * _crack_flags_old
Definition: SolidModel.h:123
NonlinearRZ.h
SolidModel::_block_id
std::vector< SubdomainID > _block_id
Definition: SolidModel.h:248
SolidModel::_coord_type
Moose::CoordinateSystemType _coord_type
Definition: SolidModel.h:60
SolidModel::_crack_count
MaterialProperty< RealVectorValue > * _crack_count
Definition: SolidModel.h:125
SolidMechanics::AxisymmetricRZ
Definition: AxisymmetricRZ.h:19
SymmTensor::xy
Real xy() const
Definition: SymmTensor.h:134
SymmElasticityTensor
This class defines a basic set of capabilities any elasticity tensor should have.
Definition: SymmElasticityTensor.h:55
SolidModel::_bulk_modulus_set
bool _bulk_modulus_set
Definition: SolidModel.h:64
SolidMechanics::NonlinearRZ
NonlinearRZ is the base class for all RZ nonlinear solid mechanics material models.
Definition: NonlinearRZ.h:20
SolidMechanics::SphericalR
Definition: SphericalR.h:20
SolidModel::_temp_grad
const VariableGradient & _temp_grad
Definition: SolidModel.h:96
SolidModel::_bulk_modulus
Real _bulk_modulus
Definition: SolidModel.h:70
SolidModel::_d_strain_dT
SymmTensor _d_strain_dT
Definition: SolidModel.h:139
SolidModel::_has_stress_free_temp
bool _has_stress_free_temp
Definition: SolidModel.h:100
SolidModel::_lambda_set
bool _lambda_set
Definition: SolidModel.h:65
SolidModel::computeEshelby
virtual void computeEshelby()
Definition: SolidModel.C:792
SolidModel::_crack_strain
MaterialProperty< RealVectorValue > * _crack_strain
Definition: SolidModel.h:129
SymmIsotropicElasticityTensor::unsetConstants
void unsetConstants()
Definition: SymmIsotropicElasticityTensor.h:40
SolidModel::applyVolumetricStrain
virtual void applyVolumetricStrain()
Definition: SolidModel.C:649
SolidModel::_cracking_stress_function
const Function *const _cracking_stress_function
Definition: SolidModel.h:84
SolidModel::_models_to_free
std::set< MooseSharedPointer< ConstitutiveModel > > _models_to_free
Definition: SolidModel.h:252
SolidModel::~SolidModel
virtual ~SolidModel()
Definition: SolidModel.C:368
SolidModel::initialSetup
virtual void initialSetup()
Definition: SolidModel.C:957
SolidModel::computeCrackFactor
virtual Real computeCrackFactor(int i, Real &sigma, Real &flagVal)
Definition: SolidModel.C:1408
SolidModel::updateElasticityTensor
virtual bool updateElasticityTensor(SymmElasticityTensor &tensor)
Return true if the elasticity tensor changed.
Definition: SolidModel.C:891
SolidModel::computeCurrentInstantaneousThermalExpansionCoefficient
virtual void computeCurrentInstantaneousThermalExpansionCoefficient()
Definition: SolidModel.C:1646
SymmTensor::addDiag
void addDiag(Real value)
Definition: SymmTensor.h:281
AxisymmetricRZ.h
SolidModel::initStatefulProperties
virtual void initStatefulProperties(unsigned n_points)
Definition: SolidModel.C:1615
SolidModel::_total_strain_old
const MaterialProperty< SymmTensor > & _total_strain_old
Definition: SolidModel.h:117
SymmIsotropicElasticityTensor::setYoungsModulus
void setYoungsModulus(const Real E)
Set the Young's Modulus.
Definition: SymmIsotropicElasticityTensor.C:42
SolidModel::computeConstitutiveModelStress
virtual void computeConstitutiveModelStress()
Compute the stress (sigma += deltaSigma)
Definition: SolidModel.C:841
SolidModel
SolidModel is the base class for all this module's solid mechanics material models.
Definition: SolidModel.h:33
SolidModel::_crack_flags_local
RealVectorValue _crack_flags_local
Definition: SolidModel.h:124
name
const std::string name
Definition: Setup.h:21
SymmTensor::yz
Real yz() const
Definition: SymmTensor.h:135
SphericalR.h
SolidModel::elementInit
virtual void elementInit()
Definition: SolidModel.h:179
SolidModel::CR_POWER
Definition: SolidModel.h:51
SolidMechanics::Element
Element is the base class for all of this module's solid mechanics element formulations.
Definition: Element.h:25
SolidModel::_elasticity_tensor
MaterialProperty< SymmElasticityTensor > & _elasticity_tensor
Definition: SolidModel.h:135
SolidModel::modifyStrainIncrement
virtual void modifyStrainIncrement()
Modify increment for things like thermal strain.
Definition: SolidModel.C:560
SolidMechanics::Linear
Definition: Linear.h:20
SolidMechanics::Element::detMatrix
static Real detMatrix(const ColumnMajorMatrix &A)
Definition: Element.C:31
SolidModel::_SED_old
const MaterialProperty< Real > * _SED_old
Definition: SolidModel.h:158
SolidModel::_youngs_modulus_function
const Function * _youngs_modulus_function
Definition: SolidModel.h:76
SolidModel::_temperature
const VariableValue & _temperature
Definition: SolidModel.h:94
SolidModel::applyThermalStrain
virtual void applyThermalStrain()
Definition: SolidModel.C:591
SolidModel::computeStress
virtual void computeStress()
Compute the stress (sigma += deltaSigma)
Definition: SolidModel.h:190
SolidModel::_mean_alpha_function
bool _mean_alpha_function
Definition: SolidModel.h:102
SolidModel::_shear_modulus_set
bool _shear_modulus_set
Definition: SolidModel.h:67
SymmTensor
Definition: SymmTensor.h:21
SolidMechanics::Element::computeStrain
virtual void computeStrain(const unsigned qp, const SymmTensor &total_strain_old, SymmTensor &total_strain_new, SymmTensor &strain_increment)=0
SolidModel::_cracking_stress
Real _cracking_stress
Definition: SolidModel.h:80
SymmIsotropicElasticityTensor::setPoissonsRatio
void setPoissonsRatio(const Real nu)
Set Poissons Ratio.
Definition: SymmIsotropicElasticityTensor.C:49
SolidModel::applyCracksToTensor
void applyCracksToTensor(SymmTensor &tensor, const RealVectorValue &sigma)
Definition: SolidModel.C:1123
SolidModel::_crack_rotation
MaterialProperty< ColumnMajorMatrix > * _crack_rotation
Definition: SolidModel.h:127
SolidMechanics::Element::volumeRatioOld
virtual Real volumeRatioOld(unsigned) const
Definition: Element.h:60
SolidModel::crackingStrainDirections
virtual void crackingStrainDirections()
Determine cracking directions. Rotate elasticity tensor.
Definition: SolidModel.C:1048
SolidModel::_crack_max_strain
MaterialProperty< RealVectorValue > * _crack_max_strain
Definition: SolidModel.h:131
SolidModel::_total_strain
MaterialProperty< SymmTensor > & _total_strain
Definition: SolidModel.h:116
SolidModel::_Eshelby_tensor
MaterialProperty< RankTwoTensor > * _Eshelby_tensor
Definition: SolidModel.h:159
SolidModel::_dep_matl_props
std::set< std::string > _dep_matl_props
Definition: SolidModel.h:106
SolidModel::_element
SolidMechanics::Element * _element
Definition: SolidModel.h:270
SolidModel::_principal_strain
ColumnMajorMatrix _principal_strain
Definition: SolidModel.h:133
SolidModel::_elastic_strain_old
const MaterialProperty< SymmTensor > & _elastic_strain_old
Definition: SolidModel.h:120
SolidModel::_crack_max_strain_old
const MaterialProperty< RealVectorValue > * _crack_max_strain_old
Definition: SolidModel.h:132
SolidMechanics::Element::computeDeformationGradient
virtual void computeDeformationGradient(unsigned int, ColumnMajorMatrix &)
Definition: Element.h:50
SolidModel::CR_UNKNOWN
Definition: SolidModel.h:52
SolidModel::_has_temp
const bool _has_temp
Definition: SolidModel.h:93
SolidModel::_poissons_ratio_set
bool _poissons_ratio_set
Definition: SolidModel.h:66
SolidModel::_crack_count_old
const MaterialProperty< RealVectorValue > * _crack_count_old
Definition: SolidModel.h:126
SolidModel::_stress
MaterialProperty< SymmTensor > & _stress
Definition: SolidModel.h:108
SolidModel::rotateSymmetricTensor
static void rotateSymmetricTensor(const ColumnMajorMatrix &R, const SymmTensor &T, SymmTensor &result)
Definition: SolidModel.C:663
SolidModel::_cracking_neg_fraction
const Real _cracking_neg_fraction
Definition: SolidModel.h:89
Linear.h
SolidModel::initQpStatefulProperties
virtual void initQpStatefulProperties()
Definition: SolidModel.C:696
SolidModel::computePreconditioning
virtual void computePreconditioning()
Definition: SolidModel.C:944
SymmTensor::yy
Real yy() const
Definition: SymmTensor.h:132
validParams< SolidModel >
InputParameters validParams< SolidModel >()
Definition: SolidModel.C:31
SolidMechanics::PlaneStrain
Definition: PlaneStrain.h:18
SolidMechanics::Element::finalizeStress
virtual void finalizeStress(std::vector< SymmTensor * > &)
Rotate stress to current configuration.
Definition: Element.h:63
SolidModel::_lambda
Real _lambda
Definition: SolidModel.h:71
SolidModel::_ref_temp
Real _ref_temp
Definition: SolidModel.h:103
SolidMechanics::Nonlinear3D
Nonlinear3D is the base class for all 3D nonlinear solid mechanics material models.
Definition: Nonlinear3D.h:24
SolidModel::_stress_old
SymmTensor _stress_old
Definition: SolidModel.h:114
SolidModel.h
SolidModel::timestepSetup
virtual void timestepSetup()
Definition: SolidModel.C:522
SolidModel::computeCrackStrainAndOrientation
void computeCrackStrainAndOrientation(ColumnMajorMatrix &principal_strain)
Definition: SolidModel.C:1152
SolidMechanics::Element::getNumKnownCrackDirs
virtual unsigned int getNumKnownCrackDirs() const
Definition: Element.h:65
SolidModel::_elastic_strain
MaterialProperty< SymmTensor > & _elastic_strain
Definition: SolidModel.h:119
SolidModel::_alpha
const Real _alpha
Definition: SolidModel.h:97
SolidModel::SolidModel
SolidModel(const InputParameters &parameters)
Definition: SolidModel.C:140
SolidModel::computeElasticityTensor
void computeElasticityTensor()
Definition: SolidModel.C:865
NonlinearPlaneStrain.h
SolidModel::checkElasticConstants
virtual void checkElasticConstants()
Definition: SolidModel.C:377
SolidModel::_poissons_ratio_function
const Function * _poissons_ratio_function
Definition: SolidModel.h:77
SolidModel::_stress_free_temp
Real _stress_free_temp
Definition: SolidModel.h:101
SolidModel::createConstitutiveModel
void createConstitutiveModel(const std::string &cm_name)
Definition: SolidModel.C:1591
SolidModel::element
const SolidMechanics::Element * element() const
Definition: SolidModel.h:226
SolidModel::_cracking_residual_stress
const Real _cracking_residual_stress
Definition: SolidModel.h:81
SolidMechanics::Element::invertMatrix
static void invertMatrix(const ColumnMajorMatrix &A, ColumnMajorMatrix &Ainv)
Definition: Element.C:52
PlaneStrain.h