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 computeQpProperties () override
 
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...
 

Detailed Description

ComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains.

Definition at line 25 of file ComputeFiniteStrainElasticStress.h.

Constructor & Destructor Documentation

◆ ComputeFiniteStrainElasticStress()

ComputeFiniteStrainElasticStress::ComputeFiniteStrainElasticStress ( const InputParameters &  parameters)

Definition at line 23 of file ComputeFiniteStrainElasticStress.C.

25  : ComputeStressBase(parameters),
26  GuaranteeConsumer(this),
27  _strain_increment(getMaterialPropertyByName<RankTwoTensor>(_base_name + "strain_increment")),
29  getMaterialPropertyByName<RankTwoTensor>(_base_name + "rotation_increment")),
30  _stress_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "stress")),
31  _elastic_strain_old(getMaterialPropertyOldByName<RankTwoTensor>(_base_name + "elastic_strain"))
32 {
33 }
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

◆ computeQpProperties()

void ComputeStressBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 51 of file ComputeStressBase.C.

52 {
54 
55  // Add in extra stress
56  _stress[_qp] += _extra_stress[_qp];
57 }
virtual void computeQpStress()=0
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankTwoTensor > & _extra_stress
Extra stress tensor.

◆ computeQpStress()

void ComputeFiniteStrainElasticStress::computeQpStress ( )
overrideprotectedvirtual

Implements ComputeStressBase.

Reimplemented in ComputeMultipleInelasticStress, ComputeMultipleInelasticCosseratStress, ComputeSmearedCrackingStress, and ComputeDamageStress.

Definition at line 50 of file ComputeFiniteStrainElasticStress.C.

Referenced by ComputeDamageStress::computeQpStress().

51 {
52  // Calculate the stress in the intermediate configuration
53  RankTwoTensor intermediate_stress;
54 
55  intermediate_stress =
57 
58  // Rotate the stress state to the current configuration
59  _stress[_qp] =
60  _rotation_increment[_qp] * intermediate_stress * _rotation_increment[_qp].transpose();
61 
62  // Assign value for elastic strain, which is equal to the mechanical strain
64 
65  // Compute dstress_dstrain
66  _Jacobian_mult[_qp] = _elasticity_tensor[_qp]; // This is NOT the exact jacobian
67 }
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
const MaterialProperty< RankFourTensor > & _elasticity_tensor
MaterialProperty< RankTwoTensor > & _elastic_strain

◆ hasGuaranteedMaterialProperty()

bool GuaranteeConsumer::hasGuaranteedMaterialProperty ( const MaterialPropertyName &  prop,
Guarantee  guarantee 
)
protectedinherited

Definition at line 28 of file GuaranteeConsumer.C.

Referenced by initialSetup(), ComputeSmearedCrackingStress::initialSetup(), and ComputeMultipleInelasticStress::initialSetup().

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

◆ initialSetup()

void ComputeFiniteStrainElasticStress::initialSetup ( )
override

Definition at line 36 of file ComputeFiniteStrainElasticStress.C.

37 {
39  mooseError("ComputeFiniteStrainElasticStress can only be used with elasticity tensor materials "
40  "that guarantee isotropic tensors.");
41 }
const std::string _elasticity_tensor_name
bool hasGuaranteedMaterialProperty(const MaterialPropertyName &prop, Guarantee guarantee)

◆ initQpStatefulProperties()

void ComputeFiniteStrainElasticStress::initQpStatefulProperties ( )
overrideprotectedvirtual

Member Data Documentation

◆ _base_name

const std::string ComputeStressBase::_base_name
protectedinherited

◆ _elastic_strain

MaterialProperty<RankTwoTensor>& ComputeStressBase::_elastic_strain
protectedinherited

◆ _elastic_strain_old

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().

◆ _elasticity_tensor

const MaterialProperty<RankFourTensor>& ComputeStressBase::_elasticity_tensor
protectedinherited

◆ _elasticity_tensor_name

const std::string ComputeStressBase::_elasticity_tensor_name
protectedinherited

◆ _extra_stress

const MaterialProperty<RankTwoTensor>& ComputeStressBase::_extra_stress
protectedinherited

Extra stress tensor.

Definition at line 47 of file ComputeStressBase.h.

Referenced by ComputeStressBase::computeQpProperties().

◆ _initial_stress_fcn

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

initial stress components

Definition at line 50 of file ComputeStressBase.h.

◆ _Jacobian_mult

MaterialProperty<RankFourTensor>& ComputeStressBase::_Jacobian_mult
protectedinherited

◆ _mechanical_strain

const MaterialProperty<RankTwoTensor>& ComputeStressBase::_mechanical_strain
protectedinherited

◆ _rotation_increment

const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_rotation_increment
protected

◆ _strain_increment

const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_strain_increment
protected

Definition at line 36 of file ComputeFiniteStrainElasticStress.h.

Referenced by computeQpStress().

◆ _stress

MaterialProperty<RankTwoTensor>& ComputeStressBase::_stress
protectedinherited

◆ _stress_old

const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_stress_old
protected

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