https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeDamageStressTempl< is_ad > Class Template Reference

ComputeDamageStress computes the stress for a damaged elasticity material. More...

#include <ComputeDamageStress.h>

Inheritance diagram for ComputeDamageStressTempl< is_ad >:
[legend]

Public Member Functions

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

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpStress () override
 
template<>
void computeQpStress ()
 
template<>
void computeQpStress ()
 

Protected Attributes

MaterialProperty< Real > & _material_timestep_limit
 Property that stores the time step limit. More...
 
DamageBaseTempl< is_ad > * _damage_model
 Pointer to the damage model. More...
 
unsigned int _qp
 

Detailed Description

template<bool is_ad>
class ComputeDamageStressTempl< is_ad >

ComputeDamageStress computes the stress for a damaged elasticity material.

This model must be used in conjunction with a damage model (derived from DamageBase)

Definition at line 26 of file ComputeDamageStress.h.

Constructor & Destructor Documentation

◆ ComputeDamageStressTempl()

template<bool is_ad>
ComputeDamageStressTempl< is_ad >::ComputeDamageStressTempl ( const InputParameters parameters)

Definition at line 28 of file ComputeDamageStress.C.

30  _material_timestep_limit(this->template declareProperty<Real>("material_timestep_limit")),
31  _damage_model(nullptr)
32 {
33 }
MaterialProperty< Real > & _material_timestep_limit
Property that stores the time step limit.
typename std::conditional< is_ad, ADComputeFiniteStrainElasticStress, ComputeFiniteStrainElasticStress >::type ComputeFiniteStrainElasticStressTempl
DamageBaseTempl< is_ad > * _damage_model
Pointer to the damage model.

Member Function Documentation

◆ computeQpStress() [1/3]

template<bool is_ad>
virtual void ComputeDamageStressTempl< is_ad >::computeQpStress ( )
overrideprotectedvirtual

◆ computeQpStress() [2/3]

template<>
void ComputeDamageStressTempl< false >::computeQpStress ( )
protected

Definition at line 52 of file ComputeDamageStress.C.

53 {
55 
56  _damage_model->setQp(_qp);
57  _damage_model->updateDamage();
58  _damage_model->updateStressForDamage(this->_stress[_qp]);
59  _damage_model->finiteStrainRotation(this->_rotation_increment[_qp]);
60  _damage_model->updateJacobianMultForDamage(_Jacobian_mult[_qp]);
61 
62  _material_timestep_limit[_qp] = _damage_model->computeTimeStepLimit();
63 }
MaterialProperty< Real > & _material_timestep_limit
Property that stores the time step limit.
typename std::conditional< is_ad, ADComputeFiniteStrainElasticStress, ComputeFiniteStrainElasticStress >::type ComputeFiniteStrainElasticStressTempl
DamageBaseTempl< is_ad > * _damage_model
Pointer to the damage model.

◆ computeQpStress() [3/3]

template<>
void ComputeDamageStressTempl< true >::computeQpStress ( )
protected

Definition at line 67 of file ComputeDamageStress.C.

68 {
70 
71  _damage_model->setQp(_qp);
72  _damage_model->updateDamage();
73  _damage_model->updateStressForDamage(this->_stress[_qp]);
74  _damage_model->finiteStrainRotation(this->_rotation_increment[_qp]);
75 
76  _material_timestep_limit[_qp] = _damage_model->computeTimeStepLimit();
77 }
MaterialProperty< Real > & _material_timestep_limit
Property that stores the time step limit.
typename std::conditional< is_ad, ADComputeFiniteStrainElasticStress, ComputeFiniteStrainElasticStress >::type ComputeFiniteStrainElasticStressTempl
DamageBaseTempl< is_ad > * _damage_model
Pointer to the damage model.

◆ initialSetup()

template<bool is_ad>
void ComputeDamageStressTempl< is_ad >::initialSetup ( )
override

Definition at line 37 of file ComputeDamageStress.C.

38 {
39  MaterialName damage_model_name = this->template getParam<MaterialName>("damage_model");
41  dynamic_cast<DamageBaseTempl<is_ad> *>(&this->getMaterialByName(damage_model_name));
42  if (dmb)
43  _damage_model = dmb;
44  else
45  this->paramError("damage_model",
46  "Damage Model " + damage_model_name +
47  " is not compatible with ComputeDamageStress");
48 }
DamageBaseTempl< is_ad > * _damage_model
Pointer to the damage model.
DamageBase is a base class for damage models, which modify the stress tensor computed by another mode...
Definition: DamageBase.h:25

◆ validParams()

template<bool is_ad>
InputParameters ComputeDamageStressTempl< is_ad >::validParams ( )
static

Definition at line 18 of file ComputeDamageStress.C.

19 {
21  params.addClassDescription(
22  "Compute stress for damaged elastic materials in conjunction with a damage model.");
23  params.addRequiredParam<MaterialName>("damage_model", "Name of the damage model");
24  return params;
25 }
void addRequiredParam(const std::string &name, const std::string &doc_string)
InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _damage_model

template<bool is_ad>
DamageBaseTempl<is_ad>* ComputeDamageStressTempl< is_ad >::_damage_model
protected

Pointer to the damage model.

Definition at line 42 of file ComputeDamageStress.h.

◆ _material_timestep_limit

template<bool is_ad>
MaterialProperty<Real>& ComputeDamageStressTempl< is_ad >::_material_timestep_limit
protected

Property that stores the time step limit.

Definition at line 39 of file ComputeDamageStress.h.

◆ _qp

template<bool is_ad>
unsigned int MaterialBase::_qp
protected

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