www.mooseframework.org
StressUpdateBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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,
29  PARTIAL
30 };
31 
44 template <bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
46 {
47 public:
49 
51 
53  using Material::_dt;
54  using Material::_q_point;
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
167  storeIncrementalMaterialProperties(const unsigned int /*total_number_of_substeps*/){};
168 
173 
182  const GenericMaterialProperty<RankTwoTensor, is_ad> & /*strain_rate*/)
183  {
184  mooseError(
185  "The computation of strain energy rate density needs to be implemented by a child class");
186  return 0.0;
187  }
188 
189 protected:
191  const std::string _base_name;
192 
194 };
197 
198 template <bool is_ad, typename R2, typename R4>
const MooseArray< Point > & _q_point
typename Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
virtual bool requiresIsotropicTensor()=0
Does the model require the elasticity tensor to be isotropic?
StressUpdateBaseTempl< false > StressUpdateBase
virtual int calculateNumberSubsteps(const GR2 &)
Given the elastic strain increment compute the number of substeps required to bring a substepped tria...
const std::string _base_name
Name used as a prefix for all material properties related to the stress update model.
virtual Real computeTimeStepLimit()
virtual void propagateQpStatefulProperties()
If updateState is not called during a timestep, this will be.
virtual bool substeppingCapabilityEnabled()
Does the model include the infrastructure for substep decomposition of the elastic strain initially u...
static InputParameters validParams()
Real & _dt
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...
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType
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...
GenericRankFourTensor< is_ad > GR4
static RankFourTensor _identityTensor
unsigned int _qp
StressUpdateBaseTempl(const InputParameters &parameters)
virtual TangentCalculationMethod getTangentCalculationMethod()
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< RankTwoTensor, is_ad > GSR2
virtual bool isIsotropic()
Is the implmented model isotropic? The safe default is &#39;false&#39;.
virtual bool substeppingCapabilityRequested()
Has the user requested usage of (possibly) implemented substepping capability for inelastic models...
StressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in t...
Moose::GenericType< RankFourTensor, is_ad > GSR4
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
GenericRankTwoTensor< is_ad > GR2
void resetProperties() final
void setQp(unsigned int qp)
Sets the value of the global variable _qp for inheriting classes.
virtual void storeIncrementalMaterialProperties(const unsigned int)
Properly set up the incremental calculation storage of the stateful material properties in the inheri...
void mooseError(Args &&... args) const
typename Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
const InputParameters & parameters() const
virtual void resetIncrementalMaterialProperties()
Reset material properties.
StressUpdateBaseTempl< true > ADStressUpdateBase
void resetQpProperties() final
Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused i...
TangentCalculationMethod
TangentCalculationMethod is an enum that determines the calculation method for the tangent operator...
const Elem *const & _current_elem