LCOV - code coverage report
Current view: top level - include/materials - PowerLawCreepStressUpdate.h (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 4 4 100.0 %
Date: 2025-07-25 05:00:39 Functions: 3 4 75.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 "RadialReturnCreepStressUpdateBase.h"
      13             : 
      14             : /**
      15             :  * This class uses the stress update material in a radial return isotropic creep
      16             :  * model.  This class is one of the basic radial return constitutive models; more complex
      17             :  * constitutive models combine creep and plasticity.
      18             :  *
      19             :  * This class inherits from RadialReturnCreepStressUpdateBase and must be used
      20             :  * in conjunction with ComputeMultipleInelasticStress.  This class calculates
      21             :  * creep based on stress, temperature, and time effects.  This class also
      22             :  * computes the creep strain as a stateful material property.
      23             :  */
      24             : template <bool is_ad>
      25             : class PowerLawCreepStressUpdateTempl : public RadialReturnCreepStressUpdateBaseTempl<is_ad>
      26             : {
      27             : public:
      28             :   static InputParameters validParams();
      29             : 
      30             :   PowerLawCreepStressUpdateTempl(const InputParameters & parameters);
      31             : 
      32             :   virtual Real computeStrainEnergyRateDensity(
      33             :       const GenericMaterialProperty<RankTwoTensor, is_ad> & stress,
      34             :       const GenericMaterialProperty<RankTwoTensor, is_ad> & strain_rate) override;
      35             : 
      36             :   virtual bool substeppingCapabilityEnabled() override;
      37             : 
      38             :   virtual void resetIncrementalMaterialProperties() override;
      39             : 
      40             :   virtual void
      41             :   computeStressInitialize(const GenericReal<is_ad> & effective_trial_stress,
      42             :                           const GenericRankFourTensor<is_ad> & elasticity_tensor) override;
      43   218111520 :   virtual GenericReal<is_ad> computeResidual(const GenericReal<is_ad> & effective_trial_stress,
      44             :                                              const GenericReal<is_ad> & scalar) override
      45             :   {
      46   218122272 :     return computeResidualInternal<GenericReal<is_ad>>(effective_trial_stress, scalar);
      47             :   }
      48             :   virtual GenericReal<is_ad> computeDerivative(const GenericReal<is_ad> & effective_trial_stress,
      49             :                                                const GenericReal<is_ad> & scalar) override;
      50             :   virtual void
      51             :   computeStressFinalize(const GenericRankTwoTensor<is_ad> & plastic_strain_increment) override;
      52             : 
      53             : protected:
      54             :   virtual GenericChainedReal<is_ad>
      55     6460456 :   computeResidualAndDerivative(const GenericReal<is_ad> & effective_trial_stress,
      56             :                                const GenericChainedReal<is_ad> & scalar) override
      57             :   {
      58     6460456 :     return computeResidualInternal<GenericChainedReal<is_ad>>(effective_trial_stress, scalar);
      59             :   }
      60             : 
      61             :   /// Temperature variable value
      62             :   const GenericVariableValue<is_ad> * const _temperature;
      63             : 
      64             :   /// Leading coefficient
      65             :   const Real _coefficient;
      66             : 
      67             :   /// Exponent on the effective stress
      68             :   const Real _n_exponent;
      69             : 
      70             :   /// Exponent on time
      71             :   const Real _m_exponent;
      72             : 
      73             :   /// Activation energy for exp term
      74             :   const Real _activation_energy;
      75             : 
      76             :   /// Gas constant for exp term
      77             :   const Real _gas_constant;
      78             : 
      79             :   /// Simulation start time
      80             :   const Real _start_time;
      81             : 
      82             :   /// Exponential calculated from activiaction, gas constant, and temperature
      83             :   GenericReal<is_ad> _exponential;
      84             : 
      85             :   /// Exponential calculated from current time
      86             :   Real _exp_time;
      87             : 
      88             :   usingTransientInterfaceMembers;
      89             :   using RadialReturnCreepStressUpdateBaseTempl<is_ad>::_qp;
      90             :   using RadialReturnCreepStressUpdateBaseTempl<is_ad>::_three_shear_modulus;
      91             :   using RadialReturnCreepStressUpdateBaseTempl<is_ad>::_creep_strain;
      92             :   using RadialReturnCreepStressUpdateBaseTempl<is_ad>::_creep_strain_old;
      93             : 
      94             : private:
      95             :   template <typename ScalarType>
      96             :   ScalarType computeResidualInternal(const GenericReal<is_ad> & effective_trial_stress,
      97             :                                      const ScalarType & scalar);
      98             : };
      99             : 
     100             : typedef PowerLawCreepStressUpdateTempl<false> PowerLawCreepStressUpdate;
     101             : typedef PowerLawCreepStressUpdateTempl<true> ADPowerLawCreepStressUpdate;

Generated by: LCOV version 1.14