LCOV - code coverage report
Current view: top level - include/materials - TensileStressUpdate.h (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 1 1 100.0 %
Date: 2025-07-25 05:00:39 Functions: 1 1 100.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 "MultiParameterPlasticityStressUpdate.h"
      13             : #include "SolidMechanicsHardeningModel.h"
      14             : 
      15             : /**
      16             :  * TensileStressUpdate implements rate-independent associative tensile failure
      17             :  * ("Rankine" plasticity) with hardening/softening.
      18             :  */
      19             : class TensileStressUpdate : public MultiParameterPlasticityStressUpdate
      20             : {
      21             : public:
      22             :   static InputParameters validParams();
      23             : 
      24             :   TensileStressUpdate(const InputParameters & parameters);
      25             : 
      26             :   /**
      27             :    * Does the model require the elasticity tensor to be isotropic?
      28             :    */
      29         288 :   bool requiresIsotropicTensor() override { return true; }
      30             : 
      31             : protected:
      32             :   /// Hardening model for tensile strength
      33             :   const SolidMechanicsHardeningModel & _strength;
      34             : 
      35             :   /// Whether to provide an estimate of the returned stress, based on perfect plasticity
      36             :   const bool _perfect_guess;
      37             : 
      38             :   /// Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to stress space
      39             :   RankTwoTensor _eigvecs;
      40             : 
      41             :   /// tensile strength as a function of residual value, rate, and internal_param
      42             :   virtual Real tensile_strength(const Real internal_param) const;
      43             : 
      44             :   /// d(tensile strength)/d(internal_param) as a function of residual value, rate, and internal_param
      45             :   virtual Real dtensile_strength(const Real internal_param) const;
      46             : 
      47             :   void computeStressParams(const RankTwoTensor & stress,
      48             :                            std::vector<Real> & stress_params) const override;
      49             : 
      50             :   std::vector<RankTwoTensor> dstress_param_dstress(const RankTwoTensor & stress) const override;
      51             : 
      52             :   std::vector<RankFourTensor> d2stress_param_dstress(const RankTwoTensor & stress) const override;
      53             : 
      54             :   virtual void setStressAfterReturnV(const RankTwoTensor & stress_trial,
      55             :                                      const std::vector<Real> & stress_params,
      56             :                                      Real gaE,
      57             :                                      const std::vector<Real> & intnl,
      58             :                                      const yieldAndFlow & smoothed_q,
      59             :                                      const RankFourTensor & Eijkl,
      60             :                                      RankTwoTensor & stress) const override;
      61             : 
      62             :   virtual void preReturnMapV(const std::vector<Real> & trial_stress_params,
      63             :                              const RankTwoTensor & stress_trial,
      64             :                              const std::vector<Real> & intnl_old,
      65             :                              const std::vector<Real> & yf,
      66             :                              const RankFourTensor & Eijkl) override;
      67             : 
      68             :   void setEffectiveElasticity(const RankFourTensor & Eijkl) override;
      69             : 
      70             :   void yieldFunctionValuesV(const std::vector<Real> & stress_params,
      71             :                             const std::vector<Real> & intnl,
      72             :                             std::vector<Real> & yf) const override;
      73             : 
      74             :   void computeAllQV(const std::vector<Real> & stress_params,
      75             :                     const std::vector<Real> & intnl,
      76             :                     std::vector<yieldAndFlow> & all_q) const override;
      77             : 
      78             :   void initializeVarsV(const std::vector<Real> & trial_stress_params,
      79             :                        const std::vector<Real> & intnl_old,
      80             :                        std::vector<Real> & stress_params,
      81             :                        Real & gaE,
      82             :                        std::vector<Real> & intnl) const override;
      83             : 
      84             :   void setIntnlValuesV(const std::vector<Real> & trial_stress_params,
      85             :                        const std::vector<Real> & current_stress_params,
      86             :                        const std::vector<Real> & intnl_old,
      87             :                        std::vector<Real> & intnl) const override;
      88             : 
      89             :   void setIntnlDerivativesV(const std::vector<Real> & trial_stress_params,
      90             :                             const std::vector<Real> & current_stress_params,
      91             :                             const std::vector<Real> & intnl,
      92             :                             std::vector<std::vector<Real>> & dintnl) const override;
      93             : 
      94             :   virtual void consistentTangentOperatorV(const RankTwoTensor & stress_trial,
      95             :                                           const std::vector<Real> & trial_stress_params,
      96             :                                           const RankTwoTensor & stress,
      97             :                                           const std::vector<Real> & stress_params,
      98             :                                           Real gaE,
      99             :                                           const yieldAndFlow & smoothed_q,
     100             :                                           const RankFourTensor & Eijkl,
     101             :                                           bool compute_full_tangent_operator,
     102             :                                           const std::vector<std::vector<Real>> & dvar_dtrial,
     103             :                                           RankFourTensor & cto) override;
     104             : };

Generated by: LCOV version 1.14