LCOV - code coverage report
Current view: top level - include/materials - CappedMohrCoulombStressUpdate.h (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 2 2 100.0 %
Date: 2025-07-25 05:00:39 Functions: 2 2 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             :  * CappedMohrCoulombStressUpdate implements rate-independent nonassociative
      17             :  * Mohr-Coulomb plus tensile plus compressive plasticity with hardening/softening.
      18             :  */
      19             : class CappedMohrCoulombStressUpdate : public MultiParameterPlasticityStressUpdate
      20             : {
      21             : public:
      22             :   static InputParameters validParams();
      23             : 
      24             :   CappedMohrCoulombStressUpdate(const InputParameters & parameters);
      25             : 
      26             :   /**
      27             :    * Does the model require the elasticity tensor to be isotropic?
      28             :    */
      29         900 :   bool requiresIsotropicTensor() override { return true; }
      30             : 
      31        1098 :   bool isIsotropic() override { return true; };
      32             : 
      33             : protected:
      34             :   /// Hardening model for tensile strength
      35             :   const SolidMechanicsHardeningModel & _tensile_strength;
      36             : 
      37             :   /// Hardening model for compressive strength
      38             :   const SolidMechanicsHardeningModel & _compressive_strength;
      39             : 
      40             :   /// Hardening model for cohesion
      41             :   const SolidMechanicsHardeningModel & _cohesion;
      42             : 
      43             :   /// Hardening model for friction angle
      44             :   const SolidMechanicsHardeningModel & _phi;
      45             : 
      46             :   /// Hardening model for dilation angle
      47             :   const SolidMechanicsHardeningModel & _psi;
      48             : 
      49             :   /// Whether to provide an estimate of the returned stress, based on perfect plasticity
      50             :   const bool _perfect_guess;
      51             : 
      52             :   /// Poisson's ratio
      53             :   Real _poissons_ratio;
      54             : 
      55             :   /**
      56             :    * When equal-eigenvalues are predicted from the stress initialization routine, shift them by this
      57             :    * amount.
      58             :    * This avoids equal-eigenvalue problems, but also accounts for the smoothing of the yield surface
      59             :    */
      60             :   const Real _shifter;
      61             : 
      62             :   /// Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to stress space
      63             :   RankTwoTensor _eigvecs;
      64             : 
      65             :   void computeStressParams(const RankTwoTensor & stress,
      66             :                            std::vector<Real> & stress_params) const override;
      67             : 
      68             :   std::vector<RankTwoTensor> dstress_param_dstress(const RankTwoTensor & stress) const override;
      69             : 
      70             :   std::vector<RankFourTensor> d2stress_param_dstress(const RankTwoTensor & stress) const override;
      71             : 
      72             :   virtual void setStressAfterReturnV(const RankTwoTensor & stress_trial,
      73             :                                      const std::vector<Real> & stress_params,
      74             :                                      Real gaE,
      75             :                                      const std::vector<Real> & intnl,
      76             :                                      const yieldAndFlow & smoothed_q,
      77             :                                      const RankFourTensor & Eijkl,
      78             :                                      RankTwoTensor & stress) const override;
      79             : 
      80             :   virtual void preReturnMapV(const std::vector<Real> & trial_stress_params,
      81             :                              const RankTwoTensor & stress_trial,
      82             :                              const std::vector<Real> & intnl_old,
      83             :                              const std::vector<Real> & yf,
      84             :                              const RankFourTensor & Eijkl) override;
      85             : 
      86             :   void setEffectiveElasticity(const RankFourTensor & Eijkl) override;
      87             : 
      88             :   void yieldFunctionValuesV(const std::vector<Real> & stress_params,
      89             :                             const std::vector<Real> & intnl,
      90             :                             std::vector<Real> & yf) const override;
      91             : 
      92             :   void computeAllQV(const std::vector<Real> & stress_params,
      93             :                     const std::vector<Real> & intnl,
      94             :                     std::vector<yieldAndFlow> & all_q) const override;
      95             : 
      96             :   void initializeVarsV(const std::vector<Real> & trial_stress_params,
      97             :                        const std::vector<Real> & intnl_old,
      98             :                        std::vector<Real> & stress_params,
      99             :                        Real & gaE,
     100             :                        std::vector<Real> & intnl) const override;
     101             : 
     102             :   void setIntnlValuesV(const std::vector<Real> & trial_stress_params,
     103             :                        const std::vector<Real> & current_stress_params,
     104             :                        const std::vector<Real> & intnl_old,
     105             :                        std::vector<Real> & intnl) const override;
     106             : 
     107             :   void setIntnlDerivativesV(const std::vector<Real> & trial_stress_params,
     108             :                             const std::vector<Real> & current_stress_params,
     109             :                             const std::vector<Real> & intnl,
     110             :                             std::vector<std::vector<Real>> & dintnl) const override;
     111             : 
     112             :   virtual void consistentTangentOperatorV(const RankTwoTensor & stress_trial,
     113             :                                           const std::vector<Real> & trial_stress_params,
     114             :                                           const RankTwoTensor & stress,
     115             :                                           const std::vector<Real> & stress_params,
     116             :                                           Real gaE,
     117             :                                           const yieldAndFlow & smoothed_q,
     118             :                                           const RankFourTensor & Eijkl,
     119             :                                           bool compute_full_tangent_operator,
     120             :                                           const std::vector<std::vector<Real>> & dvar_dtrial,
     121             :                                           RankFourTensor & cto) override;
     122             : };

Generated by: LCOV version 1.14