https://mooseframework.inl.gov
Loading...
Searching...
No Matches
StressUpdateBase.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 "Conversion.h"
13#include "InputParameters.h"
14#include "Material.h"
15
26{
27 ELASTIC,
28 FULL,
30};
31
44template <bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
46{
47public:
49
51
53 using Material::_dt;
55 using Material::_qp;
56
61
88 virtual void
89 updateState(GR2 & strain_increment,
90 GR2 & inelastic_strain_increment,
91 const GR2 & rotation_increment,
92 GR2 & stress_new,
93 const RankTwoTensor & stress_old,
94 const GR4 & elasticity_tensor,
95 const RankTwoTensor & elastic_strain_old,
96 bool compute_full_tangent_operator = false,
98
102 virtual void updateStateSubstep(
103 GR2 & /*strain_increment*/,
104 GR2 & /*inelastic_strain_increment*/,
105 const GR2 & /*rotation_increment*/,
106 GR2 & /*stress_new*/,
107 const RankTwoTensor & /*stress_old*/,
108 const GR4 & /*elasticity_tensor*/,
109 const RankTwoTensor & /*elastic_strain_old*/,
110 bool compute_full_tangent_operator = false,
112
114 void setQp(unsigned int qp);
115
120 virtual void propagateQpStatefulProperties();
121
125 virtual bool requiresIsotropicTensor() = 0;
126
130 virtual bool isIsotropic() { return false; };
131
132 virtual Real computeTimeStepLimit();
133
135
137 void resetQpProperties() final {}
138 void resetProperties() final {}
140
147 virtual bool substeppingCapabilityEnabled() { return false; }
148
153 virtual bool substeppingCapabilityRequested() { return false; }
154
160 virtual int calculateNumberSubsteps(const GR2 & /*strain_increment*/) { return 1; }
161
166 virtual void storeIncrementalMaterialProperties(const unsigned int /*total_number_of_substeps*/) {
167 };
168
173
182 const GenericMaterialProperty<RankTwoTensor, is_ad> & /*strain_rate*/)
183 {
185 "The computation of strain energy rate density needs to be implemented by a child class");
186 return 0.0;
187 }
188
189protected:
191 const std::string _base_name;
192
194};
197
198template <bool is_ad, typename R2, typename R4>
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
StressUpdateBaseTempl< true > ADStressUpdateBase
TangentCalculationMethod
TangentCalculationMethod is an enum that determines the calculation method for the tangent operator.
StressUpdateBaseTempl< false > StressUpdateBase
unsigned int _qp
const Elem *const & _current_elem
const MooseArray< Point > & _q_point
const InputParameters & parameters() const
void mooseError(Args &&... args) const
StressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in t...
static RankFourTensor _identityTensor
virtual void resetIncrementalMaterialProperties()
Reset material properties.
const std::string _base_name
Name used as a prefix for all material properties related to the stress update model.
GenericRankFourTensor< is_ad > GR4
static InputParameters validParams()
GenericRankTwoTensor< is_ad > GR2
virtual bool substeppingCapabilityRequested()
Has the user requested usage of (possibly) implemented substepping capability for inelastic models.
virtual bool requiresIsotropicTensor()=0
Does the model require the elasticity tensor to be isotropic?
void resetQpProperties() final
Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused i...
virtual int calculateNumberSubsteps(const GR2 &)
Given the elastic strain increment compute the number of substeps required to bring a substepped tria...
virtual void storeIncrementalMaterialProperties(const unsigned int)
Properly set up the incremental calculation storage of the stateful material properties in the inheri...
virtual Real computeTimeStepLimit()
void setQp(unsigned int qp)
Sets the value of the global variable _qp for inheriting classes.
virtual void propagateQpStatefulProperties()
If updateState is not called during a timestep, this will be.
virtual TangentCalculationMethod getTangentCalculationMethod()
virtual void updateStateSubstep(GR2 &, GR2 &, const GR2 &, GR2 &, const RankTwoTensor &, const GR4 &, const RankTwoTensor &, bool compute_full_tangent_operator=false, RankFourTensor &tangent_operator=StressUpdateBaseTempl< is_ad >::_identityTensor)
Similar to the updateState function, this method updates the strain and stress for one substep.
Moose::GenericType< R4, is_ad > GSR4
virtual void updateState(GR2 &strain_increment, GR2 &inelastic_strain_increment, const GR2 &rotation_increment, GR2 &stress_new, const RankTwoTensor &stress_old, const GR4 &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator=false, RankFourTensor &tangent_operator=StressUpdateBaseTempl< is_ad >::_identityTensor)
Given a strain increment that results in a trial stress, perform some procedure (such as an iterative...
virtual Real computeStrainEnergyRateDensity(const GenericMaterialProperty< RankTwoTensor, is_ad > &, const GenericMaterialProperty< RankTwoTensor, is_ad > &)
Compute the strain energy rate density for this inelastic model for the current step.
Moose::GenericType< R2, is_ad > GSR2
virtual bool substeppingCapabilityEnabled()
Does the model include the infrastructure for substep decomposition of the elastic strain initially u...
virtual bool isIsotropic()
Is the implmented model isotropic? The safe default is 'false'.
Real & _dt
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType