www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ADComputeFiniteStrainElasticStress< compute_stage > Class Template Reference

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

#include <ADComputeFiniteStrainElasticStress.h>

Inheritance diagram for ADComputeFiniteStrainElasticStress< compute_stage >:
[legend]

Public Member Functions

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

Protected Member Functions

virtual void computeQpStress () override
 
const ADMaterialProperty (RankTwoTensor) &_strain_increment
 
const ADMaterialProperty (RankTwoTensor) &_rotation_increment
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
const ADMaterialProperty (RankFourTensor) &_elasticity_tensor
 
bool hasGuaranteedMaterialProperty (const MaterialPropertyName &prop, Guarantee guarantee)
 

Protected Attributes

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...
 
 usingComputeStressBaseMembers
 
const std::string _base_name
 
const std::string _elasticity_tensor_name
 
std::vector< Function * > _initial_stress_fcn
 initial stress components More...
 
 usingMaterialMembers
 

Detailed Description

template<ComputeStage compute_stage>
class ADComputeFiniteStrainElasticStress< compute_stage >

ADComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains.

Definition at line 24 of file ADComputeFiniteStrainElasticStress.h.

Constructor & Destructor Documentation

◆ ADComputeFiniteStrainElasticStress()

template<ComputeStage compute_stage>
ADComputeFiniteStrainElasticStress< compute_stage >::ADComputeFiniteStrainElasticStress ( const InputParameters &  parameters)

Definition at line 20 of file ADComputeFiniteStrainElasticStress.C.

23  GuaranteeConsumer(this),
24  _strain_increment(
25  adGetADMaterialPropertyByName<RankTwoTensor>(_base_name + "strain_increment")),
26  _rotation_increment(
27  adGetADMaterialPropertyByName<RankTwoTensor>(_base_name + "rotation_increment")),
28  _stress_old(adGetMaterialPropertyOldByName<RankTwoTensor>(_base_name + "stress")),
30  adGetMaterialPropertyOldByName<RankTwoTensor>(_base_name + "elastic_strain"))
31 {
32 }
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
The old elastic strain is used to calculate the old stress in the case of variable elasticity tensors...
ADComputeStressBase is the base class for stress tensors.
GuaranteeConsumer(MooseObject *moose_object)
const std::string _base_name
const MaterialProperty< RankTwoTensor > & _stress_old

Member Function Documentation

◆ ADMaterialProperty() [1/3]

template<ComputeStage compute_stage>
const ADComputeFiniteStrainElasticStress< compute_stage >::ADMaterialProperty ( RankTwoTensor  ) &
protected

◆ ADMaterialProperty() [2/3]

template<ComputeStage compute_stage>
const ADComputeFiniteStrainElasticStress< compute_stage >::ADMaterialProperty ( RankTwoTensor  ) &
protected

◆ ADMaterialProperty() [3/3]

template<ComputeStage compute_stage>
const ADComputeStressBase< compute_stage >::ADMaterialProperty ( RankFourTensor  ) &
protectedinherited

◆ computeQpProperties()

template<ComputeStage compute_stage>
void ADComputeStressBase< compute_stage >::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 48 of file ADComputeStressBase.C.

49 {
51 
52  // TODO: Add in extra stress (using a list of extra_stress_names analogous to eigenstrain_names)
53 }
virtual void computeQpStress()=0

◆ computeQpStress()

template<ComputeStage compute_stage>
void ADComputeFiniteStrainElasticStress< compute_stage >::computeQpStress ( )
overrideprotectedvirtual

Implements ADComputeStressBase< compute_stage >.

Reimplemented in ADComputeMultipleInelasticStress< compute_stage >.

Definition at line 46 of file ADComputeFiniteStrainElasticStress.C.

47 {
48  // Calculate the stress in the intermediate configuration
49  ADRankTwoTensor intermediate_stress;
50 
51  intermediate_stress =
52  _elasticity_tensor[_qp] * (_strain_increment[_qp] + _elastic_strain_old[_qp]);
53 
54  // Rotate the stress state to the current configuration
55  _stress[_qp] =
56  _rotation_increment[_qp] * intermediate_stress * _rotation_increment[_qp].transpose();
57 
58  // Assign value for elastic strain, which is equal to the mechanical strain
59  _elastic_strain[_qp] = _mechanical_strain[_qp];
60 }
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
The old elastic strain is used to calculate the old stress in the case of variable elasticity tensors...

◆ hasGuaranteedMaterialProperty()

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

Definition at line 28 of file GuaranteeConsumer.C.

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

template<ComputeStage compute_stage>
void ADComputeFiniteStrainElasticStress< compute_stage >::initialSetup ( )
override

Definition at line 36 of file ADComputeFiniteStrainElasticStress.C.

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

◆ initQpStatefulProperties()

template<ComputeStage compute_stage>
void ADComputeStressBase< compute_stage >::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented in ADComputeMultipleInelasticStress< compute_stage >.

Definition at line 40 of file ADComputeStressBase.C.

Referenced by ADComputeMultipleInelasticStress< compute_stage >::initQpStatefulProperties().

41 {
42  _elastic_strain[_qp].zero();
43  _stress[_qp].zero();
44 }

Member Data Documentation

◆ _base_name

template<ComputeStage compute_stage>
const std::string ADComputeStressBase< compute_stage >::_base_name
protectedinherited

Definition at line 54 of file ADComputeStressBase.h.

◆ _elastic_strain_old

template<ComputeStage compute_stage>
const MaterialProperty<RankTwoTensor>& ADComputeFiniteStrainElasticStress< compute_stage >::_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 52 of file ADComputeFiniteStrainElasticStress.h.

◆ _elasticity_tensor_name

template<ComputeStage compute_stage>
const std::string ADComputeStressBase< compute_stage >::_elasticity_tensor_name
protectedinherited

Definition at line 55 of file ADComputeStressBase.h.

◆ _initial_stress_fcn

template<ComputeStage compute_stage>
std::vector<Function *> ADComputeStressBase< compute_stage >::_initial_stress_fcn
protectedinherited

initial stress components

Definition at line 64 of file ADComputeStressBase.h.

◆ _stress_old

template<ComputeStage compute_stage>
const MaterialProperty<RankTwoTensor>& ADComputeFiniteStrainElasticStress< compute_stage >::_stress_old
protected

Definition at line 46 of file ADComputeFiniteStrainElasticStress.h.

◆ usingComputeStressBaseMembers

template<ComputeStage compute_stage>
ADComputeFiniteStrainElasticStress< compute_stage >::usingComputeStressBaseMembers
protected

Definition at line 54 of file ADComputeFiniteStrainElasticStress.h.

◆ usingMaterialMembers

template<ComputeStage compute_stage>
ADComputeStressBase< compute_stage >::usingMaterialMembers
protectedinherited

Definition at line 66 of file ADComputeStressBase.h.


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