www.mooseframework.org
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ComputeSmearedCrackingStress Class Reference

ComputeSmearedCrackingStress computes the stress for a finite strain material with smeared cracking. More...

#include <ComputeSmearedCrackingStress.h>

Inheritance diagram for ComputeSmearedCrackingStress:
[legend]

Public Types

enum  CRACKING_RELEASE { CR_ABRUPT = 0, CR_EXPONENTIAL, CR_POWER, CR_UNKNOWN }
 

Public Member Functions

 ComputeSmearedCrackingStress (const InputParameters &parameters)
 
virtual void initialSetup ()
 

Protected Types

enum  TangentOperatorEnum { TangentOperatorEnum::elastic, TangentOperatorEnum::nonlinear }
 what sort of Tangent operator to calculate More...
 

Protected Member Functions

virtual void initQpStatefulProperties ()
 
virtual void computeQpStress ()
 
void updateElasticityTensor ()
 
virtual void crackingStressRotation ()
 
virtual Real computeCrackFactor (int i, Real &sigma, Real &flag_value, const Real cracking_stress, const Real cracking_alpha, const Real youngs_modulus)
 
virtual unsigned int getNumKnownCrackDirs () const
 
void computeCrackStrainAndOrientation (RealVectorValue &principal_strain)
 
void applyCracksToTensor (RankTwoTensor &tensor, const RealVectorValue &sigma)
 
bool previouslyCracked ()
 
virtual void computeQpStressIntermediateConfiguration ()
 Compute the stress for the current QP, but do not rotate tensors from the intermediate configuration to the new configuration. More...
 
virtual void finiteStrainRotation (const bool force_elasticity_rotation=false)
 Rotate _elastic_strain, _stress, _inelastic_strain, and _Jacobian_mult to the new configuration. More...
 
virtual void updateQpState (RankTwoTensor &elastic_strain_increment, RankTwoTensor &combined_inelastic_strain_increment)
 Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order to find an admissible stress (which is placed into _stress[_qp]) and set of inelastic strains, as well as the tangent operator (which is placed into _Jacobian_mult[_qp]). More...
 
virtual void updateQpStateSingleModel (unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &combined_inelastic_strain_increment)
 An optimised version of updateQpState that gets used when the number of plastic models is unity, or when we're cycling through models Given the _strain_increment[_qp], find an admissible stress (which is put into _stress[_qp]) and inelastic strain, as well as the tangent operator (which is placed into _Jacobian_mult[_qp]) More...
 
virtual void computeQpJacobianMult ()
 Using _elasticity_tensor[_qp] and the consistent tangent operators, _comsistent_tangent_operator[...] computed by the inelastic models, compute _Jacobian_mult[_qp]. More...
 
virtual void computeAdmissibleState (unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &inelastic_strain_increment, RankFourTensor &consistent_tangent_operator)
 Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_number model produce an admissible stress (gets placed back in _stress[_qp]), and decompose the strain increment into an elastic part (gets placed back into elastic_strain_increment) and an inelastic part (inelastic_strain_increment), as well as computing the consistent_tangent_operator. More...
 
virtual void rotateQpInitialStress ()
 InitialStress Deprecation: remove this method. More...
 
virtual void computeQpProperties () override
 
void addQpInitialStress ()
 InitialStress Deprecation: remove this method. More...
 
bool hasGuaranteedMaterialProperty (const MaterialPropertyName &prop, Guarantee guarantee)
 

Protected Attributes

bool _is_finite_strain
 
const bool _perform_finite_strain_rotations
 after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rotation_increment More...
 
MaterialProperty< RankTwoTensor > & _inelastic_strain
 The sum of the inelastic strains that come from the plastic models. More...
 
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
 old value of inelastic strain More...
 
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type
 
const unsigned _num_models
 number of plastic models More...
 
const std::vector< Real > _inelastic_weights
 _inelastic_strain = sum_i (_inelastic_weights_i * inelastic_strain_from_model_i) More...
 
std::vector< RankFourTensor > _consistent_tangent_operator
 the consistent tangent operators computed by each plastic model More...
 
const bool _cycle_models
 whether to cycle through the models, using only one model per timestep More...
 
MaterialProperty< Real > & _matl_timestep_limit
 
std::vector< StressUpdateBase * > _models
 The user supplied list of inelastic models to use in the simulation. More...
 
bool _is_elasticity_tensor_guaranteed_isotropic
 is the elasticity tensor guaranteed to be isotropic? More...
 
const MaterialProperty< RankTwoTensor > & _rotation_increment
 
const MaterialProperty< RankTwoTensor > & _stress_old
 
const std::string _base_name
 
const std::string _elasticity_tensor_name
 
const MaterialProperty< RankTwoTensor > & _mechanical_strain
 
MaterialProperty< RankTwoTensor > & _stress
 
MaterialProperty< RankTwoTensor > & _elastic_strain
 
const MaterialProperty< RankTwoTensor > & _extra_stress
 Extra stress tensor. More...
 
std::vector< Function * > _initial_stress_fcn
 initial stress components More...
 
MaterialProperty< RankFourTensor > & _Jacobian_mult
 derivative of stress w.r.t. strain (_dstress_dstrain) More...
 
const bool _store_stress_old
 Parameter which decides whether to store old stress. This is required for HHT time integration and Rayleigh damping. More...
 
const bool _initial_stress_provided
 Whether initial stress was provided. InitialStress Deprecation: remove this. More...
 
MaterialProperty< RankTwoTensor > * _initial_stress
 Initial stress, if provided. InitialStress Deprecation: remove this. More...
 
const MaterialProperty< RankTwoTensor > * _initial_stress_old
 Old value of initial stress, which is needed to correctly implement finite-strain rotations. InitialStress Deprecation: remove this. More...
 
const CRACKING_RELEASE _cracking_release
 Input parameters for smeared crack models. More...
 
const Real _cracking_residual_stress
 
const VariableValue & _cracking_stress
 
std::vector< unsigned int > _active_crack_planes
 
const unsigned int _max_cracks
 
const Real _cracking_neg_fraction
 
const Real _cracking_beta
 
const Real _shear_retention_factor
 
const Real _max_stress_correction
 
MaterialProperty< RealVectorValue > & _crack_flags
 
const MaterialProperty< RealVectorValue > & _crack_flags_old
 
MaterialProperty< RealVectorValue > * _crack_count
 
const MaterialProperty< RealVectorValue > * _crack_count_old
 
MaterialProperty< RankTwoTensor > & _crack_rotation
 
const MaterialProperty< RankTwoTensor > & _crack_rotation_old
 
MaterialProperty< RealVectorValue > & _crack_strain
 
const MaterialProperty< RealVectorValue > & _crack_strain_old
 
MaterialProperty< RealVectorValue > & _crack_max_strain
 
const MaterialProperty< RealVectorValue > & _crack_max_strain_old
 
RankFourTensor _local_elasticity_tensor
 
const unsigned int _max_iterations
 Input parameters associated with the recompute iteration to return the stress state to the yield surface. More...
 
const Real _relative_tolerance
 
const Real _absolute_tolerance
 
const bool _output_iteration_info
 
const MaterialProperty< RankFourTensor > & _elasticity_tensor
 Rank-4 and Rank-2 elasticity and elastic strain tensors. More...
 
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
 
const MaterialProperty< RankTwoTensor > & _strain_increment
 

Detailed Description

ComputeSmearedCrackingStress computes the stress for a finite strain material with smeared cracking.

Definition at line 18 of file ComputeSmearedCrackingStress.h.

Member Enumeration Documentation

what sort of Tangent operator to calculate

Enumerator
elastic 
nonlinear 

Definition at line 134 of file ComputeMultipleInelasticStress.h.

134 { elastic, nonlinear } _tangent_operator_type;
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type

Constructor & Destructor Documentation

ComputeSmearedCrackingStress::ComputeSmearedCrackingStress ( const InputParameters &  parameters)

Definition at line 79 of file ComputeSmearedCrackingStress.C.

80  : ComputeMultipleInelasticStress(parameters),
81  _cracking_release(getCrackingModel(getParam<std::string>("cracking_release"))),
82  _cracking_residual_stress(getParam<Real>("cracking_residual_stress")),
83  _cracking_stress(coupledValue("cracking_stress")),
85  _max_cracks(getParam<unsigned int>("max_cracks")),
86  _cracking_neg_fraction(getParam<Real>("cracking_neg_fraction")),
87  _cracking_beta(getParam<Real>("cracking_beta")),
88  _shear_retention_factor(getParam<Real>("shear_retention_factor")),
89  _max_stress_correction(getParam<Real>("max_stress_correction")),
90  _crack_flags(declareProperty<RealVectorValue>(_base_name + "crack_flags")),
91  _crack_flags_old(getMaterialPropertyOld<RealVectorValue>(_base_name + "crack_flags")),
92  _crack_count(NULL),
93  _crack_count_old(NULL),
94  _crack_rotation(declareProperty<RankTwoTensor>(_base_name + "crack_rotation")),
95  _crack_rotation_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "crack_rotation")),
96  _crack_strain(declareProperty<RealVectorValue>(_base_name + "crack_strain")),
97  _crack_strain_old(getMaterialPropertyOld<RealVectorValue>(_base_name + "crack_strain")),
98  _crack_max_strain(declareProperty<RealVectorValue>(_base_name + "crack_max_strain")),
99  _crack_max_strain_old(getMaterialPropertyOld<RealVectorValue>(_base_name + "crack_max_strain"))
100 {
102  {
103  _crack_count = &declareProperty<RealVectorValue>(_base_name + "crack_count");
104  _crack_count_old = &getMaterialPropertyOld<RealVectorValue>(_base_name + "crack_count");
105  }
106 
107  if (parameters.isParamValid("active_crack_planes"))
108  {
109  const std::vector<unsigned int> & planes =
110  getParam<std::vector<unsigned>>("active_crack_planes");
111  for (unsigned int i = 0; i < 3; ++i)
112  _active_crack_planes[i] = 0;
113 
114  for (unsigned int i = 0; i < planes.size(); ++i)
115  {
116  if (planes[i] > 2)
117  mooseError("Active planes must be 0, 1, or 2");
118  _active_crack_planes[planes[i]] = 1;
119  }
120  }
121  if (_cracking_residual_stress < 0 || _cracking_residual_stress > 1)
122  mooseError("cracking_residual_stress must be between 0 and 1");
123  if (parameters.isParamSetByUser("cracking_neg_fraction") &&
124  (_cracking_neg_fraction <= 0 || _cracking_neg_fraction > 1))
125  mooseError("cracking_neg_fraction must be > zero and <= 1");
126 }
MaterialProperty< RealVectorValue > & _crack_max_strain
std::vector< unsigned int > _active_crack_planes
const MaterialProperty< RankTwoTensor > & _crack_rotation_old
const MaterialProperty< RealVectorValue > & _crack_flags_old
MaterialProperty< RealVectorValue > & _crack_strain
const MaterialProperty< RealVectorValue > & _crack_max_strain_old
MaterialProperty< RankTwoTensor > & _crack_rotation
const MaterialProperty< RealVectorValue > & _crack_strain_old
MaterialProperty< RealVectorValue > * _crack_count
const MaterialProperty< RealVectorValue > * _crack_count_old
MaterialProperty< RealVectorValue > & _crack_flags
const std::string _base_name
const CRACKING_RELEASE _cracking_release
Input parameters for smeared crack models.
ComputeMultipleInelasticStress(const InputParameters &parameters)

Member Function Documentation

void ComputeStressBase::addQpInitialStress ( )
protectedinherited

InitialStress Deprecation: remove this method.

Adds initial stress, if it is provided, to _stress[_qp]. This function should NOT be used if you calculate stress using

stress = stress_old + elasticity * strain_increment

because stress_old will already include initial stress. However this function SHOULD be used if your code uses

stress = elasticity * (elastic_strain_old + strain_increment) or stress = elasticity * elastic_strain

since in these cases the elastic_strain and elastic_strain_old will not include any contribution from initial stress.

Definition at line 112 of file ComputeStressBase.C.

Referenced by ComputeLinearElasticStress::computeQpStress(), ComputeCosseratLinearElasticStress::computeQpStress(), ComputeFiniteStrainElasticStress::computeQpStress(), computeQpStress(), ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration(), ComputeStressBase::initQpStatefulProperties(), ComputeMultipleInelasticStress::updateQpState(), and ComputeMultipleInelasticStress::updateQpStateSingleModel().

113 {
115  _stress[_qp] += (*_initial_stress)[_qp];
116 }
MaterialProperty< RankTwoTensor > & _stress
const bool _initial_stress_provided
Whether initial stress was provided. InitialStress Deprecation: remove this.
void ComputeSmearedCrackingStress::applyCracksToTensor ( RankTwoTensor &  tensor,
const RealVectorValue &  sigma 
)
protected

Definition at line 588 of file ComputeSmearedCrackingStress.C.

Referenced by crackingStressRotation().

590 {
591  // Get transformation matrix
592  const RankTwoTensor & R = _crack_rotation[_qp];
593  // Rotate to crack frame
594  tensor.rotate(R.transpose());
595 
596  // Reset stress if cracked
597  for (unsigned int i = 0; i < 3; ++i)
598  if (_crack_flags[_qp](i) < 1)
599  {
600  const Real stress_correction_ratio = (tensor(i, i) - sigma(i)) / tensor(i, i);
601  if (stress_correction_ratio > _max_stress_correction)
602  tensor(i, i) *= (1.0 - _max_stress_correction);
603  else if (stress_correction_ratio < -_max_stress_correction)
604  tensor(i, i) *= (1.0 + _max_stress_correction);
605  else
606  tensor(i, i) = sigma(i);
607  }
608 
609  // Rotate back to global frame
610  tensor.rotate(R);
611 }
MaterialProperty< RankTwoTensor > & _crack_rotation
MaterialProperty< RealVectorValue > & _crack_flags
void ComputeMultipleInelasticStress::computeAdmissibleState ( unsigned  model_number,
RankTwoTensor &  elastic_strain_increment,
RankTwoTensor &  inelastic_strain_increment,
RankFourTensor &  consistent_tangent_operator 
)
protectedvirtualinherited

Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_number model produce an admissible stress (gets placed back in _stress[_qp]), and decompose the strain increment into an elastic part (gets placed back into elastic_strain_increment) and an inelastic part (inelastic_strain_increment), as well as computing the consistent_tangent_operator.

Parameters
model_numberThe inelastic model to use
elastic_strain_incrementUpon input, this is the strain increment. Upon output, it is the elastic part of the strain increment
inelastic_strain_incrementThe inelastic strain increment corresponding to the supplied strain increment
consistent_tangent_operatorThe consistent tangent operator

Reimplemented in ComputeMultipleInelasticCosseratStress.

Definition at line 364 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeMultipleInelasticCosseratStress::computeAdmissibleState(), ComputeMultipleInelasticStress::updateQpState(), and ComputeMultipleInelasticStress::updateQpStateSingleModel().

368 {
369  _models[model_number]->updateState(elastic_strain_increment,
370  inelastic_strain_increment,
371  _rotation_increment[_qp],
372  _stress[_qp],
373  _stress_old[_qp],
374  _elasticity_tensor[_qp],
375  _elastic_strain_old[_qp],
377  consistent_tangent_operator);
378 }
const MaterialProperty< RankTwoTensor > & _rotation_increment
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type
const MaterialProperty< RankTwoTensor > & _stress_old
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
Real ComputeSmearedCrackingStress::computeCrackFactor ( int  i,
Real &  sigma,
Real &  flag_value,
const Real  cracking_stress,
const Real  cracking_alpha,
const Real  youngs_modulus 
)
protectedvirtual

Definition at line 522 of file ComputeSmearedCrackingStress.C.

Referenced by crackingStressRotation().

528 {
530  {
531  if (_crack_max_strain[_qp](i) < _crack_strain[_qp](i))
532  {
533  mooseError("Max strain less than crack strain: ",
534  i,
535  " ",
536  sigma,
537  ", ",
538  _crack_max_strain[_qp](i),
539  ", ",
540  _crack_strain[_qp](i),
541  ", ",
542  _elastic_strain[_qp](0, 0),
543  ", ",
544  _elastic_strain[_qp](1, 1),
545  ", ",
546  _elastic_strain[_qp](2, 2),
547  ", ",
548  _elastic_strain[_qp](0, 1),
549  ", ",
550  _elastic_strain[_qp](0, 2),
551  ", ",
552  _elastic_strain[_qp](1, 2));
553  }
554  const Real crackMaxStrain = _crack_max_strain[_qp](i);
555  // Compute stress that follows exponental curve
556  sigma = cracking_stress * (_cracking_residual_stress +
557  (1.0 - _cracking_residual_stress) *
558  std::exp(cracking_alpha * _cracking_beta / cracking_stress *
559  (crackMaxStrain - _crack_strain[_qp](i))));
560  // Compute ratio of current stiffness to original stiffness
561  flag_value = sigma * _crack_strain[_qp](i) / (crackMaxStrain * cracking_stress);
562  }
563  else
564  {
565  if (_cracking_residual_stress == 0)
566  {
567  const Real tiny = 1e-16;
568  flag_value = tiny;
569  sigma = tiny * _crack_strain[_qp](i) * youngs_modulus;
570  }
571  else
572  {
573  sigma = _cracking_residual_stress * cracking_stress;
574  flag_value = sigma / (_crack_max_strain[_qp](i) * youngs_modulus);
575  }
576  }
577  if (flag_value < 0)
578  {
579  std::stringstream err;
580  err << "Negative crack flag found: " << i << " " << flag_value << ", "
581  << _crack_max_strain[_qp](i) << ", " << _crack_strain[_qp](i) << ", " << std::endl;
582  mooseError(err.str());
583  }
584  return flag_value;
585 }
MaterialProperty< RealVectorValue > & _crack_max_strain
MaterialProperty< RealVectorValue > & _crack_strain
const CRACKING_RELEASE _cracking_release
Input parameters for smeared crack models.
MaterialProperty< RankTwoTensor > & _elastic_strain
void ComputeSmearedCrackingStress::computeCrackStrainAndOrientation ( RealVectorValue &  principal_strain)
protected

Definition at line 416 of file ComputeSmearedCrackingStress.C.

Referenced by crackingStressRotation().

417 {
418  // The rotation tensor is ordered such that known dirs appear last in the list of
419  // columns. So, if one dir is known, it corresponds with the last column in the
420  // rotation tensor.
421  //
422  // This convention is based on the eigen routine returning eigen values in
423  // ascending order.
424  const unsigned int numKnownDirs = getNumKnownCrackDirs();
425 
426  if (numKnownDirs == 0)
427  {
428  std::vector<Real> eigval(3, 0.0);
429  RankTwoTensor eigvec;
430 
431  _elastic_strain[_qp].symmetricEigenvaluesEigenvectors(eigval, eigvec);
432 
433  // If the elastic strain is beyond the cracking strain, save the eigen vectors as
434  // the rotation tensor.
435  _crack_rotation[_qp] = eigvec;
436 
437  principal_strain(0) = eigval[0];
438  principal_strain(1) = eigval[1];
439  principal_strain(2) = eigval[2];
440  }
441  else if (numKnownDirs == 1)
442  {
443  // This is easily the most complicated case.
444  // 1. Rotate the elastic strain to the orientation associated with the known
445  // crack.
446  // 2. Extract the upper 2x2 diagonal block into a separate tensor.
447  // 3. Run the eigen solver on the result.
448  // 4. Update the rotation tensor to reflect the effect of the 2 eigenvectors.
449 
450  // 1.
451  const RankTwoTensor & R = _crack_rotation[_qp];
452  RankTwoTensor ePrime(_elastic_strain[_qp]);
453  ePrime.rotate(R.transpose()); // elastic strain in principal coordinates
454 
455  // 2.
456  ColumnMajorMatrix e2x2(2, 2);
457  e2x2(0, 0) = ePrime(0, 0);
458  e2x2(1, 0) = ePrime(1, 0);
459  e2x2(0, 1) = ePrime(0, 1);
460  e2x2(1, 1) = ePrime(1, 1);
461 
462  // 3.
463  ColumnMajorMatrix e_val2x1(2, 1);
464  ColumnMajorMatrix e_vec2x2(2, 2);
465  e2x2.eigen(e_val2x1, e_vec2x2);
466 
467  // 4.
468  ColumnMajorMatrix e_vec(3, 3);
469  e_vec(0, 0) = e_vec2x2(0, 0);
470  e_vec(1, 0) = e_vec2x2(1, 0);
471  e_vec(2, 0) = 0;
472  e_vec(0, 1) = e_vec2x2(0, 1);
473  e_vec(1, 1) = e_vec2x2(1, 1);
474  e_vec(2, 1) = 0;
475  e_vec(2, 0) = 0;
476  e_vec(2, 1) = 0;
477  e_vec(2, 2) = 1;
478 
479  RankTwoTensor eigvec(e_vec(0, 0),
480  e_vec(1, 0),
481  e_vec(2, 0),
482  e_vec(0, 1),
483  e_vec(1, 1),
484  e_vec(2, 1),
485  e_vec(0, 2),
486  e_vec(1, 2),
487  e_vec(2, 2));
488 
489  _crack_rotation[_qp] = _crack_rotation_old[_qp] * eigvec; // Roe implementation
490 
491  principal_strain(0) = e_val2x1(0, 0);
492  principal_strain(1) = e_val2x1(1, 0);
493  principal_strain(2) = ePrime(2, 2);
494  }
495  else if (numKnownDirs == 2 || numKnownDirs == 3)
496  {
497  // Rotate to cracked orientation and pick off the strains in the rotated
498  // coordinate directions.
499  const RankTwoTensor & R = _crack_rotation[_qp];
500  RankTwoTensor ePrime(_elastic_strain[_qp]);
501  ePrime.rotate(R.transpose()); // elastic strain in principal coordinates
502 
503  principal_strain(0) = ePrime(0, 0);
504  principal_strain(1) = ePrime(1, 1);
505  principal_strain(2) = ePrime(2, 2);
506  }
507  else
508  mooseError("Invalid number of known crack directions");
509 }
const MaterialProperty< RankTwoTensor > & _crack_rotation_old
MaterialProperty< RankTwoTensor > & _crack_rotation
virtual unsigned int getNumKnownCrackDirs() const
MaterialProperty< RankTwoTensor > & _elastic_strain
void ComputeMultipleInelasticStress::computeQpJacobianMult ( )
protectedvirtualinherited

Using _elasticity_tensor[_qp] and the consistent tangent operators, _comsistent_tangent_operator[...] computed by the inelastic models, compute _Jacobian_mult[_qp].

Reimplemented in ComputeMultipleInelasticCosseratStress.

Definition at line 312 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeMultipleInelasticStress::updateQpState().

313 {
316  else
317  {
318  const RankFourTensor E_inv = _elasticity_tensor[_qp].invSymm();
320  for (unsigned i_rmm = 1; i_rmm < _num_models; ++i_rmm)
321  _Jacobian_mult[_qp] = _consistent_tangent_operator[i_rmm] * E_inv * _Jacobian_mult[_qp];
322  }
323 }
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
std::vector< RankFourTensor > _consistent_tangent_operator
the consistent tangent operators computed by each plastic model
const unsigned _num_models
number of plastic models
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type
void ComputeStressBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Reimplemented in ComputeBirchMurnaghanEquationOfStress, and ComputeStressEosBase.

Definition at line 99 of file ComputeStressBase.C.

100 {
101  // InitialStress Deprecation: remove the following 2 lines
103  (*_initial_stress)[_qp] = (*_initial_stress_old)[_qp];
104 
105  computeQpStress();
106 
107  // Add in extra stress
108  _stress[_qp] += _extra_stress[_qp];
109 }
virtual void computeQpStress()=0
MaterialProperty< RankTwoTensor > & _stress
const bool _initial_stress_provided
Whether initial stress was provided. InitialStress Deprecation: remove this.
const MaterialProperty< RankTwoTensor > & _extra_stress
Extra stress tensor.
void ComputeSmearedCrackingStress::computeQpStress ( )
protectedvirtual

Reimplemented from ComputeMultipleInelasticStress.

Definition at line 155 of file ComputeSmearedCrackingStress.C.

156 {
157  bool force_elasticity_rotation = false;
158 
159  if (!previouslyCracked())
161  else
162  {
164 
165  // Propagate behavior from the (now inactive) inelastic models
167  for (auto model : _models)
168  {
169  model->setQp(_qp);
170  model->propagateQpStatefulProperties();
171  }
172 
173  // Since the other inelastic models are inactive, they will not limit the time step
174  _matl_timestep_limit[_qp] = std::numeric_limits<Real>::max();
175 
176  // update elasticity tensor with old cracking status: crack_flags_old and crack_orientation_old
178 
179  // Calculate stress in intermediate configuration
181  // InitialStress Deprecation: remove these lines
185 
187  force_elasticity_rotation = true;
188  }
189 
190  // compute crack status and adjust stress
192 
194  {
195  finiteStrainRotation(force_elasticity_rotation);
196  _crack_rotation[_qp] =
197  _rotation_increment[_qp] * _crack_rotation[_qp] * _rotation_increment[_qp].transpose();
198  }
199 }
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
const MaterialProperty< RankTwoTensor > & _rotation_increment
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
MaterialProperty< Real > & _matl_timestep_limit
const MaterialProperty< RankTwoTensor > & _strain_increment
MaterialProperty< RankTwoTensor > & _crack_rotation
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
old value of inelastic strain
virtual void computeQpStressIntermediateConfiguration()
Compute the stress for the current QP, but do not rotate tensors from the intermediate configuration ...
void addQpInitialStress()
InitialStress Deprecation: remove this method.
virtual void finiteStrainRotation(const bool force_elasticity_rotation=false)
Rotate _elastic_strain, _stress, _inelastic_strain, and _Jacobian_mult to the new configuration...
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
MaterialProperty< RankTwoTensor > & _elastic_strain
virtual void rotateQpInitialStress()
InitialStress Deprecation: remove this method.
MaterialProperty< RankTwoTensor > & _inelastic_strain
The sum of the inelastic strains that come from the plastic models.
void ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration ( )
protectedvirtualinherited

Compute the stress for the current QP, but do not rotate tensors from the intermediate configuration to the new configuration.

Definition at line 138 of file ComputeMultipleInelasticStress.C.

Referenced by computeQpStress(), and ComputeMultipleInelasticStress::computeQpStress().

139 {
140  RankTwoTensor elastic_strain_increment;
141  RankTwoTensor combined_inelastic_strain_increment;
142 
143  if (_num_models == 0)
144  {
146 
147  // If the elasticity tensor values have changed and the tensor is isotropic,
148  // use the old strain to calculate the old stress
150  {
151  _stress[_qp] = _elasticity_tensor[_qp] * (_elastic_strain_old[_qp] + _strain_increment[_qp]);
152  // InitialStress Deprecation: remove these lines
156  }
157  else
158  _stress[_qp] = _stress_old[_qp] + _elasticity_tensor[_qp] * _strain_increment[_qp];
159 
160  if (_fe_problem.currentlyComputingJacobian())
162  }
163  else
164  {
165  if (_num_models == 1 || _cycle_models)
166  updateQpStateSingleModel((_t_step - 1) % _num_models,
167  elastic_strain_increment,
168  combined_inelastic_strain_increment);
169  else
170  updateQpState(elastic_strain_increment, combined_inelastic_strain_increment);
171 
172  _elastic_strain[_qp] = _elastic_strain_old[_qp] + elastic_strain_increment;
173  _inelastic_strain[_qp] = _inelastic_strain_old[_qp] + combined_inelastic_strain_increment;
174  }
175 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
const MaterialProperty< RankTwoTensor > & _strain_increment
virtual void updateQpState(RankTwoTensor &elastic_strain_increment, RankTwoTensor &combined_inelastic_strain_increment)
Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order...
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
old value of inelastic strain
virtual void updateQpStateSingleModel(unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &combined_inelastic_strain_increment)
An optimised version of updateQpState that gets used when the number of plastic models is unity...
const bool _cycle_models
whether to cycle through the models, using only one model per timestep
const unsigned _num_models
number of plastic models
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
void addQpInitialStress()
InitialStress Deprecation: remove this method.
const MaterialProperty< RankTwoTensor > & _stress_old
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
MaterialProperty< RankTwoTensor > & _elastic_strain
virtual void rotateQpInitialStress()
InitialStress Deprecation: remove this method.
MaterialProperty< RankTwoTensor > & _inelastic_strain
The sum of the inelastic strains that come from the plastic models.
void ComputeSmearedCrackingStress::crackingStressRotation ( )
protectedvirtual

Definition at line 288 of file ComputeSmearedCrackingStress.C.

Referenced by computeQpStress().

289 {
290  const Real youngs_modulus =
292  const Real cracking_alpha = -youngs_modulus;
293 
294  Real cracking_stress = _cracking_stress[_qp];
295 
296  if (cracking_stress > 0)
297  {
298  // Initializing crack states
300 
301  for (unsigned i = 0; i < 3; ++i)
302  {
303  _crack_max_strain[_qp](i) = _crack_max_strain_old[_qp](i);
304  _crack_strain[_qp](i) = _crack_strain_old[_qp](i);
305  _crack_flags[_qp](i) = _crack_flags_old[_qp](i);
306  }
307 
308  // Compute crack orientations: updated _crack_rotation[_qp] based on current strain
309  RealVectorValue principal_strain;
310  computeCrackStrainAndOrientation(principal_strain);
311 
312  for (unsigned i = 0; i < 3; ++i)
313  {
314  if (principal_strain(i) > _crack_max_strain[_qp](i))
315  _crack_max_strain[_qp](i) = principal_strain(i);
316  }
317 
318  // Check for new cracks.
319  // Rotate stress to cracked orientation.
320  const RankTwoTensor & R = _crack_rotation[_qp];
321  RankTwoTensor sigmaPrime(_stress[_qp]);
322  sigmaPrime.rotate(R.transpose()); // stress in crack coordinates
323 
324  unsigned int num_cracks = 0;
325  for (unsigned int i = 0; i < 3; ++i)
326  {
327  if (_crack_flags_old[_qp](i) < 1)
328  ++num_cracks;
329  }
330 
331  bool cracked(false);
332  RealVectorValue sigma;
333  for (unsigned int i = 0; i < 3; ++i)
334  {
335  sigma(i) = sigmaPrime(i, i);
336 
337  Real crackFactor(1);
338 
340  (*_crack_count)[_qp](i) = (*_crack_count_old)[_qp](i);
341 
342  if ((_cracking_release == CR_POWER && sigma(i) > cracking_stress &&
343  _active_crack_planes[i] == 1))
344  {
345  cracked = true;
346  ++((*_crack_count)[_qp](i));
347 
348  // Assume Poisson's ratio drops to zero for this direction. Stiffness is then Young's
349  // modulus.
350  if ((*_crack_count_old)[_qp](i) == 0)
351  {
352  ++num_cracks;
353  _crack_strain[_qp](i) = cracking_stress / youngs_modulus;
354  }
355  // Compute stress, factor....
356  _crack_flags[_qp](i) *= 1. / 3.;
357 
358  if (_crack_max_strain[_qp](i) < _crack_strain[_qp](i))
359  _crack_max_strain[_qp](i) = _crack_strain[_qp](i);
360 
361  sigma(i) = _crack_flags[_qp](i) * youngs_modulus * principal_strain(i);
362  }
363  else if (_cracking_release != CR_POWER && _crack_flags_old[_qp](i) == 1 &&
364  sigma(i) > cracking_stress && num_cracks < _max_cracks &&
365  _active_crack_planes[i] == 1)
366  {
367  // A new crack
368  cracked = true;
369  ++num_cracks;
370 
371  // Assume Poisson's ratio drops to zero for this direction. Stiffness is then Young's
372  // modulus.
373  _crack_strain[_qp](i) = cracking_stress / youngs_modulus;
374 
375  if (_crack_max_strain[_qp](i) < _crack_strain[_qp](i))
376  _crack_max_strain[_qp](i) = _crack_strain[_qp](i);
377 
378  crackFactor = computeCrackFactor(
379  i, sigma(i), _crack_flags[_qp](i), cracking_stress, cracking_alpha, youngs_modulus);
380 
381  _crack_flags[_qp](i) = crackFactor;
382  }
383 
384  else if (_cracking_release != CR_POWER && _crack_flags_old[_qp](i) < 1 &&
385  std::abs(principal_strain(i) - _crack_max_strain[_qp](i)) < 1e-10)
386  {
387  // Previously cracked,
388  // Crack opening
389  cracked = true;
390  crackFactor = computeCrackFactor(
391  i, sigma(i), _crack_flags[_qp](i), cracking_stress, cracking_alpha, youngs_modulus);
392  _crack_flags[_qp](i) = crackFactor;
393  }
394 
395  else if (_cracking_neg_fraction > 0 &&
396  _crack_strain[_qp](i) * _cracking_neg_fraction > principal_strain(i) &&
397  -_crack_strain[_qp](i) * _cracking_neg_fraction < principal_strain(i))
398  {
399  cracked = true;
400  const Real etr = _cracking_neg_fraction * _crack_strain[_qp](i);
401  const Real Eo = cracking_stress / _crack_strain[_qp](i);
402  const Real Ec = Eo * _crack_flags_old[_qp](i);
403  const Real a = (Ec - Eo) / (4 * etr);
404  const Real b = (Ec + Eo) / 2;
405  const Real c = (Ec - Eo) * etr / 4;
406  sigma(i) = (a * principal_strain(i) + b) * principal_strain(i) + c;
407  }
408  }
409 
410  if (cracked)
411  applyCracksToTensor(_stress[_qp], sigma);
412  }
413 }
MaterialProperty< RealVectorValue > & _crack_max_strain
std::vector< unsigned int > _active_crack_planes
const MaterialProperty< RankTwoTensor > & _crack_rotation_old
const MaterialProperty< RealVectorValue > & _crack_flags_old
MaterialProperty< RealVectorValue > & _crack_strain
const MaterialProperty< RealVectorValue > & _crack_max_strain_old
MaterialProperty< RankTwoTensor > & _crack_rotation
virtual Real computeCrackFactor(int i, Real &sigma, Real &flag_value, const Real cracking_stress, const Real cracking_alpha, const Real youngs_modulus)
const MaterialProperty< RealVectorValue > & _crack_strain_old
void applyCracksToTensor(RankTwoTensor &tensor, const RealVectorValue &sigma)
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RealVectorValue > * _crack_count_old
MaterialProperty< RealVectorValue > & _crack_flags
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
void computeCrackStrainAndOrientation(RealVectorValue &principal_strain)
Real getIsotropicYoungsModulus(const RankFourTensor &elasticity_tensor)
Get the Young&#39;s modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must b...
const CRACKING_RELEASE _cracking_release
Input parameters for smeared crack models.
void ComputeMultipleInelasticStress::finiteStrainRotation ( const bool  force_elasticity_rotation = false)
protectedvirtualinherited

Rotate _elastic_strain, _stress, _inelastic_strain, and _Jacobian_mult to the new configuration.

Parameters
force_elasticity_rotationForce the elasticity tensor to be rotated, even if it is not deemed necessary.

Definition at line 178 of file ComputeMultipleInelasticStress.C.

Referenced by computeQpStress(), and ComputeMultipleInelasticStress::computeQpStress().

179 {
180  _elastic_strain[_qp] =
181  _rotation_increment[_qp] * _elastic_strain[_qp] * _rotation_increment[_qp].transpose();
182  _stress[_qp] = _rotation_increment[_qp] * _stress[_qp] * _rotation_increment[_qp].transpose();
183  _inelastic_strain[_qp] =
184  _rotation_increment[_qp] * _inelastic_strain[_qp] * _rotation_increment[_qp].transpose();
185  if (force_elasticity_rotation ||
188  _Jacobian_mult[_qp].rotate(_rotation_increment[_qp]);
189 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
const MaterialProperty< RankTwoTensor > & _rotation_increment
MaterialProperty< RankTwoTensor > & _stress
const unsigned _num_models
number of plastic models
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type
MaterialProperty< RankTwoTensor > & _elastic_strain
MaterialProperty< RankTwoTensor > & _inelastic_strain
The sum of the inelastic strains that come from the plastic models.
unsigned int ComputeSmearedCrackingStress::getNumKnownCrackDirs ( ) const
protectedvirtual

Definition at line 512 of file ComputeSmearedCrackingStress.C.

Referenced by computeCrackStrainAndOrientation().

513 {
514  const unsigned fromElement = 0;
515  unsigned int retVal = 0;
516  for (unsigned int i = 0; i < 3 - fromElement; ++i)
517  retVal += (_crack_flags_old[_qp](i) < 1);
518  return retVal + fromElement;
519 }
const MaterialProperty< RealVectorValue > & _crack_flags_old
bool GuaranteeConsumer::hasGuaranteedMaterialProperty ( const MaterialPropertyName &  prop,
Guarantee  guarantee 
)
protectedinherited

Definition at line 26 of file GuaranteeConsumer.C.

Referenced by ComputeFiniteStrainElasticStress::initialSetup(), ComputeFiniteStrainElasticStressBirchMurnaghan::initialSetup(), initialSetup(), and ComputeMultipleInelasticStress::initialSetup().

28 {
29  if (!_gc_feproblem->startedInitialSetup())
30  mooseError("hasGuaranteedMaterialProperty() needs to be called in initialSetup()");
31 
32  // Reference to MaterialWarehouse for testing and retrieving block ids
33  const auto & warehouse = _gc_feproblem->getMaterialWarehouse();
34 
35  // Complete set of ids that this object is active
36  const auto & ids = (_gc_block_restrict && _gc_block_restrict->blockRestricted())
37  ? _gc_block_restrict->blockIDs()
38  : _gc_feproblem->mesh().meshSubdomains();
39 
40  // Loop over each id for this object
41  for (const auto & id : ids)
42  {
43  // If block materials exist, look if any issue the required guarantee
44  if (warehouse.hasActiveBlockObjects(id))
45  {
46  const std::vector<std::shared_ptr<Material>> & mats = warehouse.getActiveBlockObjects(id);
47  for (const auto & mat : mats)
48  {
49  const auto & mat_props = mat->getSuppliedItems();
50  if (mat_props.count(prop_name))
51  {
52  auto guarantee_mat = dynamic_cast<GuaranteeProvider *>(mat.get());
53  if (guarantee_mat && !guarantee_mat->hasGuarantee(prop_name, guarantee))
54  {
55  // we found at least one material on the set of block we operate on
56  // that does _not_ provide the requested guarantee
57  return false;
58  }
59  }
60  }
61  }
62  }
63 
64  return true;
65 }
Add-on class that provides the functionality to issue guarantees for declared material properties...
BlockRestrictable *const _gc_block_restrict
Access block restrictions of the object with this interface.
FEProblemBase *const _gc_feproblem
Reference to the FEProblemBase class.
void ComputeSmearedCrackingStress::initialSetup ( )
virtual

Reimplemented from ComputeMultipleInelasticStress.

Definition at line 144 of file ComputeSmearedCrackingStress.C.

145 {
147  _is_finite_strain = hasBlockMaterialProperty<RankTwoTensor>(_base_name + "strain_increment");
148 
150  mooseError("ComputeSmearedCrackingStress requires that the elasticity tensor be "
151  "guaranteed isotropic");
152 }
const std::string _elasticity_tensor_name
const std::string _base_name
bool hasGuaranteedMaterialProperty(const MaterialPropertyName &prop, Guarantee guarantee)
void ComputeSmearedCrackingStress::initQpStatefulProperties ( )
protectedvirtual

Reimplemented from ComputeMultipleInelasticStress.

Definition at line 129 of file ComputeSmearedCrackingStress.C.

130 {
132 
133  _crack_flags[_qp](0) = _crack_flags[_qp](1) = _crack_flags[_qp](2) = 1;
134 
135  if (_crack_count)
136  (*_crack_count)[_qp] = 0;
137 
138  _crack_strain[_qp] = 0;
139  _crack_max_strain[_qp](0) = 0;
140  _crack_rotation[_qp].Identity();
141 }
MaterialProperty< RealVectorValue > & _crack_max_strain
MaterialProperty< RealVectorValue > & _crack_strain
MaterialProperty< RankTwoTensor > & _crack_rotation
MaterialProperty< RealVectorValue > * _crack_count
MaterialProperty< RealVectorValue > & _crack_flags
bool ComputeSmearedCrackingStress::previouslyCracked ( )
protected

Definition at line 614 of file ComputeSmearedCrackingStress.C.

Referenced by computeQpStress().

615 {
616  for (unsigned int i = 0; i < 3; ++i)
617  if (_crack_flags_old[_qp](i) < 1.0)
618  return true;
619  return false;
620 }
const MaterialProperty< RealVectorValue > & _crack_flags_old
void ComputeFiniteStrainElasticStress::rotateQpInitialStress ( )
protectedvirtualinherited

InitialStress Deprecation: remove this method.

Rotates initial_stress via rotation_increment. In large-strain scenarios this must be used before addQpInitialStress

Definition at line 69 of file ComputeFiniteStrainElasticStress.C.

Referenced by ComputeFiniteStrainElasticStress::computeQpStress(), computeQpStress(), ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration(), ComputeMultipleInelasticStress::updateQpState(), and ComputeMultipleInelasticStress::updateQpStateSingleModel().

70 {
72  (*_initial_stress)[_qp] = _rotation_increment[_qp] * (*_initial_stress_old)[_qp] *
73  _rotation_increment[_qp].transpose();
74 }
const MaterialProperty< RankTwoTensor > & _rotation_increment
const bool _initial_stress_provided
Whether initial stress was provided. InitialStress Deprecation: remove this.
void ComputeSmearedCrackingStress::updateElasticityTensor ( )
protected

Definition at line 202 of file ComputeSmearedCrackingStress.C.

Referenced by computeQpStress().

203 {
204  const Real youngs_modulus =
206 
207  bool cracking_locally_active = false;
208 
209  const Real cracking_stress = _cracking_stress[_qp];
210 
211  if (cracking_stress > 0)
212  {
213  RealVectorValue crack_flags_local(1.0, 1.0, 1.0);
214  const RankTwoTensor & R = _crack_rotation_old[_qp];
215  RankTwoTensor ePrime(_elastic_strain_old[_qp]);
216  ePrime.rotate(R.transpose());
217 
218  for (unsigned int i = 0; i < 3; ++i)
219  {
220  // Update elasticity tensor based on crack status of the end of last time step
221  if (_crack_flags_old[_qp](i) < 1.0)
222  {
223  if (_cracking_neg_fraction == 0 && MooseUtils::absoluteFuzzyLessThan(ePrime(i, i), 0.0))
224  crack_flags_local(i) = 1.0;
225  else if (_cracking_neg_fraction > 0 &&
226  ePrime(i, i) < _crack_strain_old[_qp](i) * _cracking_neg_fraction &&
227  ePrime(i, i) > -_crack_strain_old[_qp](i) * _cracking_neg_fraction)
228  {
229  const Real etr = _cracking_neg_fraction * _crack_strain_old[_qp](i);
230  const Real Eo = cracking_stress / _crack_strain_old[_qp](i);
231  const Real Ec = Eo * _crack_flags_old[_qp](i);
232  const Real a = (Ec - Eo) / (4 * etr);
233  const Real b = (Ec + Eo) / 2;
234  // Compute the ratio of the current transition stiffness to the original stiffness
235  crack_flags_local(i) = (2.0 * a * etr + b) / Eo;
236  cracking_locally_active = true;
237  }
238  else
239  {
240  crack_flags_local(i) = _crack_flags_old[_qp](i);
241  cracking_locally_active = true;
242  }
243  }
244  }
245 
246  if (cracking_locally_active)
247  {
248  // Update the elasticity tensor in the crack coordinate system
249  const RealVectorValue & c = crack_flags_local;
250 
251  const bool c0_coupled = MooseUtils::absoluteFuzzyEqual(c(0), 1.0);
252  const bool c1_coupled = MooseUtils::absoluteFuzzyEqual(c(1), 1.0);
253  const bool c2_coupled = MooseUtils::absoluteFuzzyEqual(c(2), 1.0);
254 
255  const Real c01 = (c0_coupled && c1_coupled ? 1.0 : 0.0);
256  const Real c02 = (c0_coupled && c2_coupled ? 1.0 : 0.0);
257  const Real c12 = (c1_coupled && c2_coupled ? 1.0 : 0.0);
258 
259  const Real c01_shear_retention = (c0_coupled && c1_coupled ? 1.0 : _shear_retention_factor);
260  const Real c02_shear_retention = (c0_coupled && c2_coupled ? 1.0 : _shear_retention_factor);
261  const Real c12_shear_retention = (c1_coupled && c2_coupled ? 1.0 : _shear_retention_factor);
262 
263  // Filling with 9 components is sufficient because these are the only nonzero entries
264  // for isotropic or orthotropic materials.
265  std::vector<Real> local_elastic(9);
266 
267  local_elastic[0] = (c0_coupled ? _elasticity_tensor[_qp](0, 0, 0, 0) : c(0) * youngs_modulus);
268  local_elastic[1] = _elasticity_tensor[_qp](0, 0, 1, 1) * c01;
269  local_elastic[2] = _elasticity_tensor[_qp](0, 0, 2, 2) * c02;
270  local_elastic[3] = (c1_coupled ? _elasticity_tensor[_qp](1, 1, 1, 1) : c(1) * youngs_modulus);
271  local_elastic[4] = _elasticity_tensor[_qp](1, 1, 2, 2) * c12;
272  local_elastic[5] = (c2_coupled ? _elasticity_tensor[_qp](2, 2, 2, 2) : c(2) * youngs_modulus);
273  local_elastic[6] = _elasticity_tensor[_qp](1, 2, 1, 2) * c12_shear_retention;
274  local_elastic[7] = _elasticity_tensor[_qp](0, 2, 0, 2) * c02_shear_retention;
275  local_elastic[8] = _elasticity_tensor[_qp](0, 1, 0, 1) * c01_shear_retention;
276 
277  _local_elasticity_tensor.fillFromInputVector(local_elastic, RankFourTensor::symmetric9);
278 
279  // Rotate the modified elasticity tensor back into global coordinates
280  _local_elasticity_tensor.rotate(R);
281  }
282  }
283  if (!cracking_locally_active)
284  _local_elasticity_tensor = _elasticity_tensor[_qp];
285 }
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
const MaterialProperty< RankTwoTensor > & _crack_rotation_old
const MaterialProperty< RealVectorValue > & _crack_flags_old
const MaterialProperty< RealVectorValue > & _crack_strain_old
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
Real getIsotropicYoungsModulus(const RankFourTensor &elasticity_tensor)
Get the Young&#39;s modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must b...
void ComputeMultipleInelasticStress::updateQpState ( RankTwoTensor &  elastic_strain_increment,
RankTwoTensor &  combined_inelastic_strain_increment 
)
protectedvirtualinherited

Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order to find an admissible stress (which is placed into _stress[_qp]) and set of inelastic strains, as well as the tangent operator (which is placed into _Jacobian_mult[_qp]).

Parameters
elastic_strain_incrementThe elastic part of _strain_increment[_qp] after the iterative process has converged
combined_inelastic_strain_incrementThe inelastic part of _strain_increment[_qp] after the iterative process has converged. This is a weighted sum of all the inelastic strains computed by all the plastic models during the Picard iterative scheme. The weights are dictated by the user using _inelastic_weights

Definition at line 192 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration().

194 {
195  if (_output_iteration_info == true)
196  {
197  _console << std::endl
198  << "iteration output for ComputeMultipleInelasticStress solve:"
199  << " time=" << _t << " int_pt=" << _qp << std::endl;
200  }
201  Real l2norm_delta_stress, first_l2norm_delta_stress;
202  unsigned int counter = 0;
203 
204  std::vector<RankTwoTensor> inelastic_strain_increment;
205  inelastic_strain_increment.resize(_num_models);
206 
207  for (unsigned i_rmm = 0; i_rmm < _models.size(); ++i_rmm)
208  inelastic_strain_increment[i_rmm].zero();
209 
210  RankTwoTensor stress_max, stress_min;
211 
212  do
213  {
214  for (unsigned i_rmm = 0; i_rmm < _num_models; ++i_rmm)
215  {
216  _models[i_rmm]->setQp(_qp);
217 
218  // initially assume the strain is completely elastic
219  elastic_strain_increment = _strain_increment[_qp];
220  // and subtract off all inelastic strain increments calculated so far
221  // except the one that we're about to calculate
222  for (unsigned j_rmm = 0; j_rmm < _num_models; ++j_rmm)
223  if (i_rmm != j_rmm)
224  elastic_strain_increment -= inelastic_strain_increment[j_rmm];
225 
226  // form the trial stress, with the check for changed elasticity constants
228  {
229  _stress[_qp] =
230  _elasticity_tensor[_qp] * (_elastic_strain_old[_qp] + elastic_strain_increment);
231  // InitialStress Deprecation: remove these lines
235  }
236  else
237  _stress[_qp] = _stress_old[_qp] + _elasticity_tensor[_qp] * elastic_strain_increment;
238 
239  // given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment)
240  // let the i^th model produce an admissible stress (as _stress[_qp]), and decompose
241  // the strain increment into an elastic part (elastic_strain_increment) and an
242  // inelastic part (inelastic_strain_increment[i_rmm])
244  elastic_strain_increment,
245  inelastic_strain_increment[i_rmm],
247 
248  if (i_rmm == 0)
249  {
250  stress_max = _stress[_qp];
251  stress_min = _stress[_qp];
252  }
253  else
254  {
255  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
256  {
257  for (unsigned int j = 0; j < LIBMESH_DIM; ++j)
258  {
259  if (_stress[_qp](i, j) > stress_max(i, j))
260  stress_max(i, j) = _stress[_qp](i, j);
261  else if (stress_min(i, j) > _stress[_qp](i, j))
262  stress_min(i, j) = _stress[_qp](i, j);
263  }
264  }
265  }
266  }
267 
268  // now check convergence in the stress:
269  // once the change in stress is within tolerance after each recompute material
270  // consider the stress to be converged
271  RankTwoTensor delta_stress(stress_max - stress_min);
272  l2norm_delta_stress = delta_stress.L2norm();
273  if (counter == 0)
274  first_l2norm_delta_stress = l2norm_delta_stress;
275 
276  if (_output_iteration_info == true)
277  {
278  _console << "stress iteration number = " << counter << "\n"
279  << " relative l2 norm delta stress = "
280  << (0 == first_l2norm_delta_stress ? 0
281  : l2norm_delta_stress / first_l2norm_delta_stress)
282  << "\n"
283  << " stress convergence relative tolerance = " << _relative_tolerance << "\n"
284  << " absolute l2 norm delta stress = " << l2norm_delta_stress << "\n"
285  << " stress convergence absolute tolerance = " << _absolute_tolerance << std::endl;
286  }
287  ++counter;
288  } while (counter < _max_iterations && l2norm_delta_stress > _absolute_tolerance &&
289  (l2norm_delta_stress / first_l2norm_delta_stress) > _relative_tolerance &&
290  _num_models != 1);
291 
292  if (counter == _max_iterations && l2norm_delta_stress > _absolute_tolerance &&
293  (l2norm_delta_stress / first_l2norm_delta_stress) > _relative_tolerance)
294  throw MooseException("Max stress iteration hit during ComputeMultipleInelasticStress solve!");
295 
296  combined_inelastic_strain_increment.zero();
297  for (unsigned i_rmm = 0; i_rmm < _num_models; ++i_rmm)
298  combined_inelastic_strain_increment +=
299  _inelastic_weights[i_rmm] * inelastic_strain_increment[i_rmm];
300 
301  if (_fe_problem.currentlyComputingJacobian())
303 
304  _matl_timestep_limit[_qp] = 0.0;
305  for (unsigned i_rmm = 0; i_rmm < _num_models; ++i_rmm)
306  _matl_timestep_limit[_qp] += 1.0 / _models[i_rmm]->computeTimeStepLimit();
307 
308  _matl_timestep_limit[_qp] = 1.0 / _matl_timestep_limit[_qp];
309 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
std::vector< RankFourTensor > _consistent_tangent_operator
the consistent tangent operators computed by each plastic model
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
MaterialProperty< Real > & _matl_timestep_limit
const MaterialProperty< RankTwoTensor > & _strain_increment
const std::vector< Real > _inelastic_weights
_inelastic_strain = sum_i (_inelastic_weights_i * inelastic_strain_from_model_i)
MaterialProperty< RankTwoTensor > & _stress
const unsigned _num_models
number of plastic models
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
void addQpInitialStress()
InitialStress Deprecation: remove this method.
virtual void computeAdmissibleState(unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &inelastic_strain_increment, RankFourTensor &consistent_tangent_operator)
Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_n...
const MaterialProperty< RankTwoTensor > & _stress_old
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
virtual void rotateQpInitialStress()
InitialStress Deprecation: remove this method.
virtual void computeQpJacobianMult()
Using _elasticity_tensor[_qp] and the consistent tangent operators, _comsistent_tangent_operator[...] computed by the inelastic models, compute _Jacobian_mult[_qp].
static unsigned int counter
const unsigned int _max_iterations
Input parameters associated with the recompute iteration to return the stress state to the yield surf...
void ComputeMultipleInelasticStress::updateQpStateSingleModel ( unsigned  model_number,
RankTwoTensor &  elastic_strain_increment,
RankTwoTensor &  combined_inelastic_strain_increment 
)
protectedvirtualinherited

An optimised version of updateQpState that gets used when the number of plastic models is unity, or when we're cycling through models Given the _strain_increment[_qp], find an admissible stress (which is put into _stress[_qp]) and inelastic strain, as well as the tangent operator (which is placed into _Jacobian_mult[_qp])

Parameters
model_numberUse this model number
elastic_strain_incrementThe elastic part of _strain_increment[_qp]
combined_inelastic_strain_incrementThe inelastic part of _strain_increment[_qp]

Definition at line 326 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration().

330 {
331  for (auto model : _models)
332  model->setQp(_qp);
333 
334  elastic_strain_increment = _strain_increment[_qp];
335 
336  // If the elasticity tensor values have changed and the tensor is isotropic,
337  // use the old strain to calculate the old stress
339  {
340  _stress[_qp] = _elasticity_tensor[_qp] * (_elastic_strain_old[_qp] + elastic_strain_increment);
341  // InitialStress Deprecation: remove these lines
345  }
346  else
347  _stress[_qp] = _stress_old[_qp] + _elasticity_tensor[_qp] * elastic_strain_increment;
348 
349  computeAdmissibleState(model_number,
350  elastic_strain_increment,
351  combined_inelastic_strain_increment,
352  _Jacobian_mult[_qp]);
353 
354  _matl_timestep_limit[_qp] = _models[0]->computeTimeStepLimit();
355 
356  /* propagate internal variables, etc, to this timestep for those inelastic models where
357  * "updateState" is not called */
358  for (unsigned i_rmm = 0; i_rmm < _num_models; ++i_rmm)
359  if (i_rmm != model_number)
360  _models[i_rmm]->propagateQpStatefulProperties();
361 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
MaterialProperty< Real > & _matl_timestep_limit
const MaterialProperty< RankTwoTensor > & _strain_increment
MaterialProperty< RankTwoTensor > & _stress
const unsigned _num_models
number of plastic models
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
void addQpInitialStress()
InitialStress Deprecation: remove this method.
virtual void computeAdmissibleState(unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &inelastic_strain_increment, RankFourTensor &consistent_tangent_operator)
Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_n...
const MaterialProperty< RankTwoTensor > & _stress_old
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
virtual void rotateQpInitialStress()
InitialStress Deprecation: remove this method.

Member Data Documentation

const Real ComputeMultipleInelasticStress::_absolute_tolerance
protectedinherited
std::vector<unsigned int> ComputeSmearedCrackingStress::_active_crack_planes
protected
const std::string ComputeStressBase::_base_name
protectedinherited
std::vector<RankFourTensor> ComputeMultipleInelasticStress::_consistent_tangent_operator
protectedinherited
MaterialProperty<RealVectorValue>* ComputeSmearedCrackingStress::_crack_count
protected
const MaterialProperty<RealVectorValue>* ComputeSmearedCrackingStress::_crack_count_old
protected
MaterialProperty<RealVectorValue>& ComputeSmearedCrackingStress::_crack_flags
protected
const MaterialProperty<RealVectorValue>& ComputeSmearedCrackingStress::_crack_flags_old
protected
MaterialProperty<RealVectorValue>& ComputeSmearedCrackingStress::_crack_max_strain
protected
const MaterialProperty<RealVectorValue>& ComputeSmearedCrackingStress::_crack_max_strain_old
protected

Definition at line 80 of file ComputeSmearedCrackingStress.h.

Referenced by crackingStressRotation().

MaterialProperty<RankTwoTensor>& ComputeSmearedCrackingStress::_crack_rotation
protected
const MaterialProperty<RankTwoTensor>& ComputeSmearedCrackingStress::_crack_rotation_old
protected
MaterialProperty<RealVectorValue>& ComputeSmearedCrackingStress::_crack_strain
protected
const MaterialProperty<RealVectorValue>& ComputeSmearedCrackingStress::_crack_strain_old
protected
const Real ComputeSmearedCrackingStress::_cracking_beta
protected

Definition at line 65 of file ComputeSmearedCrackingStress.h.

Referenced by computeCrackFactor().

const Real ComputeSmearedCrackingStress::_cracking_neg_fraction
protected
const CRACKING_RELEASE ComputeSmearedCrackingStress::_cracking_release
protected

Input parameters for smeared crack models.

Definition at line 57 of file ComputeSmearedCrackingStress.h.

Referenced by computeCrackFactor(), ComputeSmearedCrackingStress(), and crackingStressRotation().

const Real ComputeSmearedCrackingStress::_cracking_residual_stress
protected

Definition at line 58 of file ComputeSmearedCrackingStress.h.

Referenced by computeCrackFactor().

const VariableValue& ComputeSmearedCrackingStress::_cracking_stress
protected
const bool ComputeMultipleInelasticStress::_cycle_models
protectedinherited

whether to cycle through the models, using only one model per timestep

Definition at line 146 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration().

MaterialProperty<RankTwoTensor>& ComputeStressBase::_elastic_strain
protectedinherited
const MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticStress::_elastic_strain_old
protectedinherited
const MaterialProperty<RankFourTensor>& ComputeMultipleInelasticStress::_elasticity_tensor
protectedinherited
const std::string ComputeStressBase::_elasticity_tensor_name
protectedinherited
const MaterialProperty<RankTwoTensor>& ComputeStressBase::_extra_stress
protectedinherited
MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticStress::_inelastic_strain
protectedinherited
const MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticStress::_inelastic_strain_old
protectedinherited
const std::vector<Real> ComputeMultipleInelasticStress::_inelastic_weights
protectedinherited

_inelastic_strain = sum_i (_inelastic_weights_i * inelastic_strain_from_model_i)

Definition at line 140 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::ComputeMultipleInelasticStress(), and ComputeMultipleInelasticStress::updateQpState().

MaterialProperty<RankTwoTensor>* ComputeStressBase::_initial_stress
protectedinherited

Initial stress, if provided. InitialStress Deprecation: remove this.

Definition at line 74 of file ComputeStressBase.h.

Referenced by ComputeStressBase::initQpStatefulProperties().

std::vector<Function *> ComputeStressBase::_initial_stress_fcn
protectedinherited

initial stress components

Definition at line 62 of file ComputeStressBase.h.

Referenced by ComputeStressBase::ComputeStressBase(), and ComputeStressBase::initQpStatefulProperties().

const MaterialProperty<RankTwoTensor>* ComputeStressBase::_initial_stress_old
protectedinherited

Old value of initial stress, which is needed to correctly implement finite-strain rotations. InitialStress Deprecation: remove this.

Definition at line 77 of file ComputeStressBase.h.

const bool ComputeStressBase::_initial_stress_provided
protectedinherited
bool ComputeMultipleInelasticStress::_is_elasticity_tensor_guaranteed_isotropic
protectedinherited
bool ComputeSmearedCrackingStress::_is_finite_strain
protected

Definition at line 54 of file ComputeSmearedCrackingStress.h.

Referenced by initialSetup().

MaterialProperty<RankFourTensor>& ComputeStressBase::_Jacobian_mult
protectedinherited
RankFourTensor ComputeSmearedCrackingStress::_local_elasticity_tensor
protected

Definition at line 84 of file ComputeSmearedCrackingStress.h.

Referenced by computeQpStress(), and updateElasticityTensor().

MaterialProperty<Real>& ComputeMultipleInelasticStress::_matl_timestep_limit
protectedinherited
const unsigned int ComputeSmearedCrackingStress::_max_cracks
protected

Definition at line 62 of file ComputeSmearedCrackingStress.h.

Referenced by crackingStressRotation().

const unsigned int ComputeMultipleInelasticStress::_max_iterations
protectedinherited

Input parameters associated with the recompute iteration to return the stress state to the yield surface.

Definition at line 112 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::updateQpState().

const Real ComputeSmearedCrackingStress::_max_stress_correction
protected

Definition at line 67 of file ComputeSmearedCrackingStress.h.

Referenced by applyCracksToTensor().

const MaterialProperty<RankTwoTensor>& ComputeStressBase::_mechanical_strain
protectedinherited
std::vector<StressUpdateBase *> ComputeMultipleInelasticStress::_models
protectedinherited

The user supplied list of inelastic models to use in the simulation.

Users should take care to list creep models first and plasticity models last to allow for the case when a creep model relaxes the stress state inside of the yield surface in an iteration.

Definition at line 157 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::computeAdmissibleState(), computeQpStress(), ComputeMultipleInelasticStress::initialSetup(), ComputeMultipleInelasticStress::updateQpState(), and ComputeMultipleInelasticStress::updateQpStateSingleModel().

const unsigned ComputeMultipleInelasticStress::_num_models
protectedinherited
const bool ComputeMultipleInelasticStress::_output_iteration_info
protectedinherited
const bool ComputeMultipleInelasticStress::_perform_finite_strain_rotations
protectedinherited
const Real ComputeMultipleInelasticStress::_relative_tolerance
protectedinherited
const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_rotation_increment
protectedinherited
const Real ComputeSmearedCrackingStress::_shear_retention_factor
protected

Definition at line 66 of file ComputeSmearedCrackingStress.h.

Referenced by updateElasticityTensor().

const bool ComputeStressBase::_store_stress_old
protectedinherited

Parameter which decides whether to store old stress. This is required for HHT time integration and Rayleigh damping.

Definition at line 68 of file ComputeStressBase.h.

const MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticStress::_strain_increment
protectedinherited
MaterialProperty<RankTwoTensor>& ComputeStressBase::_stress
protectedinherited

Definition at line 53 of file ComputeStressBase.h.

Referenced by ComputeStressBase::addQpInitialStress(), ComputeMultipleInelasticCosseratStress::computeAdmissibleState(), ComputeMultipleInelasticStress::computeAdmissibleState(), ComputeStressBase::computeQpProperties(), ComputeStressEosBase::computeQpProperties(), ComputeBirchMurnaghanEquationOfStress::computeQpProperties(), ComputeLinearElasticStress::computeQpStress(), ComputeStrainIncrementBasedStress::computeQpStress(), ComputeLinearElasticPFFractureStress::computeQpStress(), ComputeCosseratLinearElasticStress::computeQpStress(), ComputeFiniteStrainElasticStress::computeQpStress(), ComputeIsotropicLinearElasticPFFractureStress::computeQpStress(), ComputeFiniteStrainElasticStressBirchMurnaghan::computeQpStress(), FiniteStrainPlasticMaterial::computeQpStress(), ComputeMultiPlasticityStress::computeQpStress(), computeQpStress(), ComputeLinearViscoelasticStress::computeQpStress(), ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration(), crackingStressRotation(), ComputeMultipleInelasticStress::finiteStrainRotation(), ComputeStressBase::initQpStatefulProperties(), FiniteStrainCrystalPlasticity::initQpStatefulProperties(), FiniteStrainUObasedCP::initQpStatefulProperties(), FiniteStrainHyperElasticViscoPlastic::initQpStatefulProperties(), ComputeMultiPlasticityStress::postReturnMap(), FiniteStrainUObasedCP::postSolveQp(), FiniteStrainHyperElasticViscoPlastic::postSolveQp(), FiniteStrainCrystalPlasticity::postSolveQp(), ComputeMultipleInelasticStress::updateQpState(), ComputeMultipleInelasticStress::updateQpStateSingleModel(), and LinearIsoElasticPFDamage::updateVar().

const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_stress_old
protectedinherited
enum ComputeMultipleInelasticStress::TangentOperatorEnum ComputeMultipleInelasticStress::_tangent_operator_type
protectedinherited

The documentation for this class was generated from the following files: