www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private 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
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpStress () override
 
const ADMaterialProperty (RankFourTensor) &_elasticity_tensor
 Elasticity tensor material property. More...
 
const ADMaterialProperty (RankTwoTensor) &_strain_increment
 
const ADMaterialProperty (RankTwoTensor) &_rotation_increment
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
bool hasGuaranteedMaterialProperty (const MaterialPropertyName &prop, Guarantee guarantee)
 

Protected Attributes

const std::string _elasticity_tensor_name
 Name of the elasticity tensor material property. More...
 
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
 
std::vector< const MaterialProperty< RankTwoTensor > * > _extra_stresses
 Extra stress tensors. More...
 
std::vector< const Function * > _initial_stress_fcn
 initial stress components More...
 
 usingMaterialMembers
 

Private Attributes

const InputParameters & _gc_params
 Parameters of the object with this interface. More...
 
FEProblemBase *const _gc_feproblem
 Reference to the FEProblemBase class. More...
 
BlockRestrictable *const _gc_block_restrict
 Access block restrictions of the object with this interface. More...
 

Detailed Description

template<ComputeStage compute_stage>
class ADComputeFiniteStrainElasticStress< compute_stage >

ADComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains.

Definition at line 25 of file ADComputeFiniteStrainElasticStress.h.

Constructor & Destructor Documentation

◆ ADComputeFiniteStrainElasticStress()

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

Definition at line 26 of file ADComputeFiniteStrainElasticStress.C.

29  GuaranteeConsumer(this),
30  _elasticity_tensor_name(_base_name + "elasticity_tensor"),
31  _elasticity_tensor(getADMaterialProperty<RankFourTensor>(_elasticity_tensor_name)),
32  _strain_increment(getADMaterialPropertyByName<RankTwoTensor>(_base_name + "strain_increment")),
33  _rotation_increment(
34  getADMaterialPropertyByName<RankTwoTensor>(_base_name + "rotation_increment")),
35  _stress_old(getMaterialPropertyOldByName<RankTwoTensor>(_base_name + "stress")),
36  _elastic_strain_old(getMaterialPropertyOldByName<RankTwoTensor>(_base_name + "elastic_strain"))
37 {
38 }

Member Function Documentation

◆ ADMaterialProperty() [1/3]

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

Elasticity tensor material property.

◆ ADMaterialProperty() [2/3]

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

◆ ADMaterialProperty() [3/3]

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

◆ computeQpProperties()

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

Reimplemented in ADComputeMultiplePorousInelasticStress< compute_stage >.

Definition at line 61 of file ADComputeStressBase.C.

62 {
64 
65  // Add in extra stress
66  for (MooseIndex(_extra_stresses) i = 0; i < _extra_stresses.size(); ++i)
67  _stress[_qp] += (*_extra_stresses[i])[_qp];
68 }

Referenced by ADComputeMultiplePorousInelasticStress< compute_stage >::computeQpProperties().

◆ computeQpStress()

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

Implements ADComputeStressBase< compute_stage >.

Reimplemented in ADComputeMultipleInelasticStress< compute_stage >.

Definition at line 52 of file ADComputeFiniteStrainElasticStress.C.

53 {
54  // Calculate the stress in the intermediate configuration
55  ADRankTwoTensor intermediate_stress;
56 
57  intermediate_stress =
58  _elasticity_tensor[_qp] * (_strain_increment[_qp] + _elastic_strain_old[_qp]);
59 
60  // Rotate the stress state to the current configuration
61  _stress[_qp] =
62  _rotation_increment[_qp] * intermediate_stress * _rotation_increment[_qp].transpose();
63 
64  // Assign value for elastic strain, which is equal to the mechanical strain
65  _elastic_strain[_qp] = _mechanical_strain[_qp];
66 }

◆ hasGuaranteedMaterialProperty()

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

Definition at line 28 of file GuaranteeConsumer.C.

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<MaterialBase>> & 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 }

Referenced by ComputeFiniteStrainElasticStress::initialSetup(), ComputeSmearedCrackingStress::initialSetup(), ComputeLinearElasticPFFractureStress::initialSetup(), CriticalTimeStep::initialSetup(), and ComputeMultipleInelasticStress::initialSetup().

◆ initialSetup()

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

Definition at line 42 of file ADComputeFiniteStrainElasticStress.C.

43 {
45  mooseError(
46  "ADComputeFiniteStrainElasticStress can only be used with elasticity tensor materials "
47  "that guarantee isotropic tensors.");
48 }

◆ initQpStatefulProperties()

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

◆ validParams()

template<ComputeStage compute_stage>
InputParameters ADComputeFiniteStrainElasticStress< compute_stage >::validParams ( )
static

Definition at line 18 of file ADComputeFiniteStrainElasticStress.C.

19 {
20  InputParameters params = ADComputeStressBase<compute_stage>::validParams();
21  params.addClassDescription("Compute stress using elasticity for finite strains");
22  return params;
23 }

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

Member Data Documentation

◆ _base_name

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

Definition at line 53 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 59 of file ADComputeFiniteStrainElasticStress.h.

◆ _elasticity_tensor_name

template<ComputeStage compute_stage>
const std::string ADComputeFiniteStrainElasticStress< compute_stage >::_elasticity_tensor_name
protected

Name of the elasticity tensor material property.

Definition at line 48 of file ADComputeFiniteStrainElasticStress.h.

◆ _extra_stresses

template<ComputeStage compute_stage>
std::vector<const MaterialProperty<RankTwoTensor> *> ADComputeStressBase< compute_stage >::_extra_stresses
protectedinherited

Extra stress tensors.

Definition at line 60 of file ADComputeStressBase.h.

Referenced by ADComputeStressBase< compute_stage >::ADComputeStressBase().

◆ _gc_block_restrict

BlockRestrictable* const GuaranteeConsumer::_gc_block_restrict
privateinherited

Access block restrictions of the object with this interface.

Definition at line 41 of file GuaranteeConsumer.h.

Referenced by GuaranteeConsumer::hasGuaranteedMaterialProperty().

◆ _gc_feproblem

FEProblemBase* const GuaranteeConsumer::_gc_feproblem
privateinherited

Reference to the FEProblemBase class.

Definition at line 38 of file GuaranteeConsumer.h.

Referenced by GuaranteeConsumer::hasGuaranteedMaterialProperty().

◆ _gc_params

const InputParameters& GuaranteeConsumer::_gc_params
privateinherited

Parameters of the object with this interface.

Definition at line 35 of file GuaranteeConsumer.h.

◆ _initial_stress_fcn

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

initial stress components

Definition at line 63 of file ADComputeStressBase.h.

◆ _stress_old

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

Definition at line 53 of file ADComputeFiniteStrainElasticStress.h.

◆ usingComputeStressBaseMembers

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

Definition at line 61 of file ADComputeFiniteStrainElasticStress.h.

◆ usingMaterialMembers

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

Definition at line 65 of file ADComputeStressBase.h.


The documentation for this class was generated from the following files:
ADComputeFiniteStrainElasticStress::_stress_old
const MaterialProperty< RankTwoTensor > & _stress_old
Definition: ADComputeFiniteStrainElasticStress.h:53
ADComputeStressBase::_base_name
const std::string _base_name
Definition: ADComputeStressBase.h:53
GuaranteeConsumer::GuaranteeConsumer
GuaranteeConsumer(MooseObject *moose_object)
Definition: GuaranteeConsumer.C:20
GuaranteeConsumer::_gc_block_restrict
BlockRestrictable *const _gc_block_restrict
Access block restrictions of the object with this interface.
Definition: GuaranteeConsumer.h:41
GuaranteeConsumer::_gc_feproblem
FEProblemBase *const _gc_feproblem
Reference to the FEProblemBase class.
Definition: GuaranteeConsumer.h:38
ADComputeFiniteStrainElasticStress::_elasticity_tensor_name
const std::string _elasticity_tensor_name
Name of the elasticity tensor material property.
Definition: ADComputeFiniteStrainElasticStress.h:48
ADComputeFiniteStrainElasticStress::_elastic_strain_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...
Definition: ADComputeFiniteStrainElasticStress.h:59
ADComputeStressBase
ADComputeStressBase is the base class for stress tensors.
Definition: ADComputeStressBase.h:25
GuaranteeConsumer::hasGuaranteedMaterialProperty
bool hasGuaranteedMaterialProperty(const MaterialPropertyName &prop, Guarantee guarantee)
Definition: GuaranteeConsumer.C:28
ADComputeStressBase::_extra_stresses
std::vector< const MaterialProperty< RankTwoTensor > * > _extra_stresses
Extra stress tensors.
Definition: ADComputeStressBase.h:60
ADComputeStressBase::validParams
static InputParameters validParams()
Definition: ADComputeStressBase.C:18
ADComputeStressBase::computeQpStress
virtual void computeQpStress()=0
Guarantee::ISOTROPIC