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

ComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains. More...

#include <ComputeFiniteStrainElasticStress.h>

Inheritance diagram for ComputeFiniteStrainElasticStress:
[legend]

Public Member Functions

 ComputeFiniteStrainElasticStress (const InputParameters &parameters)
 
void initialSetup () override
 

Protected Member Functions

virtual void initQpStatefulProperties () override
 
virtual void computeQpStress () override
 
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

const MaterialProperty< RankTwoTensor > & _strain_increment
 
const MaterialProperty< RankTwoTensor > & _rotation_increment
 
const MaterialProperty< RankTwoTensor > & _stress_old
 
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
 The old elastic strain is used to calculate the old stress in the case of variable elasticity tensors. More...
 
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< RankFourTensor > & _elasticity_tensor
 
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...
 

Detailed Description

ComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains.

Definition at line 17 of file ComputeFiniteStrainElasticStress.h.

Constructor & Destructor Documentation

ComputeFiniteStrainElasticStress::ComputeFiniteStrainElasticStress ( const InputParameters &  parameters)

Definition at line 18 of file ComputeFiniteStrainElasticStress.C.

20  : ComputeStressBase(parameters),
21  GuaranteeConsumer(this),
22  _strain_increment(getMaterialPropertyByName<RankTwoTensor>(_base_name + "strain_increment")),
24  getMaterialPropertyByName<RankTwoTensor>(_base_name + "rotation_increment")),
25  _stress_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "stress")),
26  _elastic_strain_old(getMaterialPropertyOldByName<RankTwoTensor>(_base_name + "elastic_strain"))
27 {
28 }
const MaterialProperty< RankTwoTensor > & _rotation_increment
const MaterialProperty< RankTwoTensor > & _strain_increment
GuaranteeConsumer(MooseObject *moose_object)
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
The old elastic strain is used to calculate the old stress in the case of variable elasticity tensors...
const std::string _base_name
ComputeStressBase(const InputParameters &parameters)
const MaterialProperty< RankTwoTensor > & _stress_old

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(), computeQpStress(), ComputeSmearedCrackingStress::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 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 ComputeFiniteStrainElasticStress::computeQpStress ( )
overrideprotectedvirtual

Implements ComputeStressBase.

Reimplemented in ComputeMultipleInelasticCosseratStress, ComputeMultipleInelasticStress, and ComputeSmearedCrackingStress.

Definition at line 45 of file ComputeFiniteStrainElasticStress.C.

46 {
47  // Calculate the stress in the intermediate configuration
48  RankTwoTensor intermediate_stress;
49 
50  intermediate_stress =
52 
53  // Rotate the stress state to the current configuration
54  _stress[_qp] =
55  _rotation_increment[_qp] * intermediate_stress * _rotation_increment[_qp].transpose();
56 
57  // InitialStress Deprecation: remove the following 2 lines
60 
61  // Assign value for elastic strain, which is equal to the mechanical strain
63 
64  // Compute dstress_dstrain
65  _Jacobian_mult[_qp] = _elasticity_tensor[_qp]; // This is NOT the exact jacobian
66 }
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
const MaterialProperty< RankTwoTensor > & _rotation_increment
const MaterialProperty< RankTwoTensor > & _strain_increment
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
The old elastic strain is used to calculate the old stress in the case of variable elasticity tensors...
const MaterialProperty< RankTwoTensor > & _mechanical_strain
void addQpInitialStress()
InitialStress Deprecation: remove this method.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
MaterialProperty< RankTwoTensor > & _elastic_strain
virtual void rotateQpInitialStress()
InitialStress Deprecation: remove this method.
bool GuaranteeConsumer::hasGuaranteedMaterialProperty ( const MaterialPropertyName &  prop,
Guarantee  guarantee 
)
protectedinherited

Definition at line 26 of file GuaranteeConsumer.C.

Referenced by initialSetup(), ComputeFiniteStrainElasticStressBirchMurnaghan::initialSetup(), ComputeSmearedCrackingStress::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 ComputeFiniteStrainElasticStress::initialSetup ( )
override

Definition at line 31 of file ComputeFiniteStrainElasticStress.C.

32 {
34  mooseError("ComputeFiniteStrainElasticStress can only be used with elasticity tensor materials "
35  "that guarantee isotropic tensors.");
36 }
const std::string _elasticity_tensor_name
bool hasGuaranteedMaterialProperty(const MaterialPropertyName &prop, Guarantee guarantee)
void ComputeFiniteStrainElasticStress::initQpStatefulProperties ( )
overrideprotectedvirtual
void ComputeFiniteStrainElasticStress::rotateQpInitialStress ( )
protectedvirtual

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 computeQpStress(), ComputeSmearedCrackingStress::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.

Member Data Documentation

const std::string ComputeStressBase::_base_name
protectedinherited
MaterialProperty<RankTwoTensor>& ComputeStressBase::_elastic_strain
protectedinherited
const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_elastic_strain_old
protected

The old elastic strain is used to calculate the old stress in the case of variable elasticity tensors.

Definition at line 44 of file ComputeFiniteStrainElasticStress.h.

Referenced by computeQpStress().

const MaterialProperty<RankFourTensor>& ComputeStressBase::_elasticity_tensor
protectedinherited
const std::string ComputeStressBase::_elasticity_tensor_name
protectedinherited
const MaterialProperty<RankTwoTensor>& ComputeStressBase::_extra_stress
protectedinherited
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

Whether initial stress was provided. InitialStress Deprecation: remove this.

Definition at line 71 of file ComputeStressBase.h.

Referenced by ComputeStressBase::addQpInitialStress(), ComputeStressBase::computeQpProperties(), ComputeStressBase::initQpStatefulProperties(), and rotateQpInitialStress().

MaterialProperty<RankFourTensor>& ComputeStressBase::_Jacobian_mult
protectedinherited
const MaterialProperty<RankTwoTensor>& ComputeStressBase::_mechanical_strain
protectedinherited
const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_rotation_increment
protected
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>& ComputeFiniteStrainElasticStress::_strain_increment
protected

Definition at line 36 of file ComputeFiniteStrainElasticStress.h.

Referenced by computeQpStress().

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(), computeQpStress(), ComputeIsotropicLinearElasticPFFractureStress::computeQpStress(), ComputeFiniteStrainElasticStressBirchMurnaghan::computeQpStress(), FiniteStrainPlasticMaterial::computeQpStress(), ComputeMultiPlasticityStress::computeQpStress(), ComputeSmearedCrackingStress::computeQpStress(), ComputeLinearViscoelasticStress::computeQpStress(), ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration(), ComputeSmearedCrackingStress::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
protected

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