https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ScalarDamageBase.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "DamageBase.h"
13
14// Forward declaration
15
19template <bool is_ad>
21{
22public:
24
26
27 virtual void initQpStatefulProperties() override;
28
29 virtual void updateDamage() override;
30
31 virtual void updateStressForDamage(GenericRankTwoTensor<is_ad> & stress_new) override;
32
33 virtual void updateJacobianMultForDamage(RankFourTensor & jacobian_mult) override;
34
35 virtual void computeUndamagedOldStress(RankTwoTensor & stress_old) override;
36
37 virtual Real computeTimeStepLimit() override;
38
42 const GenericReal<is_ad> & getQpDamageIndex(unsigned int qp);
43
47 const std::string getDamageIndexName() const { return _damage_index_name; }
48
49protected:
51 const MaterialPropertyName _damage_index_name;
52
54 virtual void updateQpDamageIndex() = 0;
55
61
63 const bool _use_old_damage;
64
67
70
72 const Real & _maximum_damage;
73
74 using DamageBaseTempl<is_ad>::_qp;
75 using DamageBaseTempl<is_ad>::_base_name;
76 using DamageBaseTempl<is_ad>::setQp;
77 using DamageBaseTempl<is_ad>::_dt;
78};
79
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< Real, is_ad > GenericReal
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
ScalarDamageBaseTempl< true > ADScalarDamageBase
ScalarDamageBaseTempl< false > ScalarDamageBase
DamageBase is a base class for damage models, which modify the stress tensor computed by another mode...
Definition DamageBase.h:26
const std::string _base_name
Base name optionally used as prefix to material tensor names.
Definition DamageBase.h:74
void setQp(unsigned int qp)
Sets the value of the member variable _qp for use in inheriting classes.
Definition DamageBase.C:41
unsigned int _qp
const InputParameters & parameters() const
Base class for scalar damage models.
const std::string getDamageIndexName() const
Get the name of the material property containing the damage index.
virtual Real computeTimeStepLimit() override
Compute the limiting value of the time step for this material.
virtual void computeUndamagedOldStress(RankTwoTensor &stress_old) override
const bool _use_old_damage
If true, use the damage index from the old state (rather than the current state)
const MaterialPropertyName _damage_index_name
Name of the material property where the damage index is stored.
GenericMaterialProperty< Real, is_ad > & _damage_index
Material property that provides the damage index.
virtual void updateDamage() override
Update the internal variable(s) that evolve the damage.
virtual void updateJacobianMultForDamage(RankFourTensor &jacobian_mult) override
Update the material constitutive matrix.
virtual void updateQpDamageIndex()=0
Update the damage index at the current qpoint.
const Real & _maximum_damage_increment
Maximum damage increment allowed for the time step.
const MaterialProperty< Real > & _damage_index_older
const GenericReal< is_ad > & getQpDamageIndex(unsigned int qp)
Get the value of the damage index for the current quadrature point.
virtual void updateStressForDamage(GenericRankTwoTensor< is_ad > &stress_new) override
Update the current stress tensor for effects of damage.
virtual void initQpStatefulProperties() override
const Real & _residual_stiffness_fraction
Residual fraction of stiffness used for material that is fully damaged.
const Real & _maximum_damage
Maximum allowed value for the damage index.
static InputParameters validParams()
const MaterialProperty< Real > & _damage_index_old
Real & _dt