www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CappedMohrCoulombStressUpdate Class Reference

CappedMohrCoulombStressUpdate implements rate-independent nonassociative Mohr-Coulomb plus tensile plus compressive plasticity with hardening/softening. More...

#include <CappedMohrCoulombStressUpdate.h>

Inheritance diagram for CappedMohrCoulombStressUpdate:
[legend]

Public Types

using GR2 = GenericRankTwoTensor< is_ad >
 
using GSR2 = Moose::GenericType< R2, is_ad >
 
using GR4 = GenericRankFourTensor< is_ad >
 
using GSR4 = Moose::GenericType< R4, is_ad >
 
enum  ConstantTypeEnum { ConstantTypeEnum::NONE, ConstantTypeEnum::ELEMENT, ConstantTypeEnum::SUBDOMAIN }
 
enum  TEST_TYPE
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 CappedMohrCoulombStressUpdate (const InputParameters &parameters)
 
bool requiresIsotropicTensor () override
 Does the model require the elasticity tensor to be isotropic? More...
 
bool isIsotropic () override
 Is the implmented model isotropic? The safe default is 'false'. More...
 
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 return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment. More...
 
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. More...
 
void setQp (unsigned int qp)
 Sets the value of the global variable _qp for inheriting classes. More...
 
virtual Real computeTimeStepLimit ()
 
virtual bool substeppingCapabilityEnabled ()
 Does the model include the infrastructure for substep decomposition of the elastic strain initially used to calculate the trial stress guess Inheriting classes which wish to use the substepping capability should overwrite this method and set it to return true. More...
 
virtual bool substeppingCapabilityRequested ()
 Has the user requested usage of (possibly) implemented substepping capability for inelastic models. More...
 
virtual int calculateNumberSubsteps (const GR2 &)
 Given the elastic strain increment compute the number of substeps required to bring a substepped trial stress guess distance from the yield surface into the tolerance specified in the individual child class. More...
 
virtual void storeIncrementalMaterialProperties (const unsigned int)
 Properly set up the incremental calculation storage of the stateful material properties in the inheriting classes. More...
 
virtual void resetIncrementalMaterialProperties ()
 Reset material properties. More...
 
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. More...
 
virtual const dof_id_typegetElementID (const std::string &id_parameter_name, unsigned int comp=0) const override
 
dof_id_type getElementID (const Elem *elem, unsigned int elem_id_index) const
 
virtual const dof_id_typegetElementIDNeighbor (const std::string &id_parameter_name, unsigned int comp=0) const override
 
virtual const dof_id_typegetElementIDByName (const std::string &id_parameter_name) const override
 
virtual const dof_id_typegetElementIDNeighborByName (const std::string &id_parameter_name) const override
 
virtual void computeProperties () override
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false, bool no_dep=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
virtual bool isBoundaryMaterial () const override
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const override
 
virtual void subdomainSetup () override
 
bool ghostable () const override final
 
virtual void resolveOptionalProperties () override
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
virtual void initStatefulProperties (unsigned int n_points)
 
virtual bool isInterfaceMaterial ()
 
virtual void computePropertiesAtQp (unsigned int qp)
 
const MaterialProperty< T > & getZeroMaterialPropertyByName (Ts... args)
 
virtual const std::set< std::string > & getRequestedItems () override
 
virtual const std::set< std::string > & getSuppliedItems () override
 
const std::set< unsigned int > & getSuppliedPropIDs ()
 
void checkStatefulSanity () const
 
std::set< OutputName > getOutputs ()
 
bool hasStatefulProperties () const
 
void setFaceInfo (const FaceInfo &fi)
 
void setActiveProperties (const std::unordered_set< unsigned int > &needed_props)
 
bool forceStatefulInit () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &name, const std::string *param=nullptr) const
 
const std::vector< SubdomainName > & blocks () const
 
unsigned int numBlocks () const
 
virtual const std::set< SubdomainID > & blockIDs () const
 
unsigned int blocksMaxDimension () const
 
bool hasBlocks (const SubdomainName &name) const
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 
bool hasBlocks (SubdomainID id) const
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 
bool hasBlockMaterialProperty (const std::string &prop_name)
 
const std::set< SubdomainID > & meshBlockIDs () const
 
virtual bool blockRestricted () const
 
virtual void checkVariable (const MooseVariableFieldBase &variable) const
 
virtual const std::set< BoundaryID > & boundaryIDs () const
 
const std::vector< BoundaryName > & boundaryNames () const
 
unsigned int numBoundaryIDs () const
 
bool hasBoundary (const BoundaryName &name) const
 
bool hasBoundary (const std::vector< BoundaryName > &names) const
 
bool hasBoundary (const BoundaryID &id) const
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool isBoundarySubset (const std::set< BoundaryID > &ids) const
 
bool isBoundarySubset (const std::vector< BoundaryID > &ids) const
 
bool hasBoundaryMaterialProperty (const std::string &prop_name) const
 
virtual bool boundaryRestricted () const
 
const std::set< BoundaryID > & meshBoundaryIDs () const
 
virtual bool checkVariableBoundaryIntegrity () const
 
virtual void initialSetup ()
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
const std::set< MooseVariableFieldBase *> & getMooseVariableDependencies () const
 
std::set< MooseVariableFieldBase *> checkAllVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_omit={})
 
std::set< MooseVariableFieldBase *> checkVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_check)
 
const std::vector< MooseVariableScalar *> & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const T & getUserObject (const std::string &param_name, bool is_dependency=true) const
 
const T & getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
bool isImplicit ()
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
virtual void meshChanged ()
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 
void setRandomResetFrequency (ExecFlagType exec_flag)
 
unsigned long getRandomLong () const
 
Real getRandomReal () const
 
unsigned int getSeed (std::size_t id)
 
unsigned int getMasterSeed () const
 
bool isNodal () const
 
ExecFlagType getResetOnTime () const
 
void setRandomDataPointer (RandomData *random_data)
 
virtual unsigned int getElementIDIndex (const std::string &id_parameter_name, unsigned int comp=0) const
 
virtual unsigned int getElementIDIndexByName (const std::string &id_name) const
 
bool hasElementID (const std::string &id_name) const
 
dof_id_type maxElementID (unsigned int elem_id_index) const
 
dof_id_type minElementID (unsigned int elem_id_index) const
 
bool areElemIDsIdentical (const std::string &id_name1, const std::string &id_name2) const
 
std::unordered_map< dof_id_type, std::set< dof_id_type > > getElemIDMapping (const std::string &id_name1, const std::string &id_name2) const
 
std::set< dof_id_typegetAllElemIDs (unsigned int elem_id_index) const
 
std::set< dof_id_typegetElemIDsOnBlocks (unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
 
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase *> > & getCoupledVars () const
 
const std::vector< MooseVariableFieldBase *> & getCoupledMooseVars () const
 
const std::vector< MooseVariable *> & getCoupledStandardMooseVars () const
 
const std::vector< VectorMooseVariable *> & getCoupledVectorMooseVars () const
 
const std::vector< ArrayMooseVariable *> & getCoupledArrayMooseVars () const
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
const std::set< TagID > & getFEVariableCoupleableVectorTags () const
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
const std::set< TagID > & getFEVariableCoupleableMatrixTags () const
 
auto & getWritableCoupledVariables () const
 
bool hasWritableCoupledVariables () const
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 
const ADVectorVariableValuegetADDefaultVectorValue (const std::string &var_name) const
 
const ADVariableGradientgetADDefaultGradient () const
 
const ADVectorVariableGradientgetADDefaultVectorGradient () const
 
const ADVariableSecondgetADDefaultSecond () const
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const std::string &prop_name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const std::string &prop_name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const std::string &prop_name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const std::string &prop_name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const std::string &prop_name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const std::string &prop_name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const std::string &prop_name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const std::string &prop_name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase *> > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
bool getMaterialPropertyCalled () const
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialProperty< T > & declarePropertyByName (const std::string &prop_name)
 
MaterialProperty< T > & declarePropertyByName (const std::string &prop_name)
 
MaterialProperty< T > & declareProperty (const std::string &name)
 
MaterialProperty< T > & declareProperty (const std::string &name)
 
ADMaterialProperty< T > & declareADPropertyByName (const std::string &prop_name)
 
ADMaterialProperty< T > & declareADPropertyByName (const std::string &prop_name)
 
ADMaterialProperty< T > & declareADProperty (const std::string &name)
 
ADMaterialProperty< T > & declareADProperty (const std::string &name)
 
auto & declareGenericProperty (const std::string &prop_name)
 
auto & declareGenericProperty (const std::string &prop_name)
 
GenericMaterialProperty< T, is_ad > & declareGenericPropertyByName (const std::string &prop_name)
 
GenericMaterialProperty< T, is_ad > & declareGenericPropertyByName (const std::string &prop_name)
 
const DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
PenetrationLocatorgetPenetrationLocator (const BoundaryName &primary, const BoundaryName &secondary, Order order)
 
PenetrationLocatorgetQuadraturePenetrationLocator (const BoundaryName &primary, const BoundaryName &secondary, Order order)
 
NearestNodeLocatorgetNearestNodeLocator (const BoundaryName &primary, const BoundaryName &secondary)
 
NearestNodeLocatorgetQuadratureNearestNodeLocator (const BoundaryName &primary, const BoundaryName &secondary)
 
bool requiresGeometricSearch () const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
void resetQpProperties () final
 Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten. More...
 
void resetProperties () final
 

Static Public Member Functions

static InputParameters validParams ()
 
static std::deque< MaterialBase *> buildRequiredMaterials (const Consumers &mat_consumers, const std::vector< std::shared_ptr< MaterialBase >> &mats, const bool allow_stateful)
 
static bool restricted (const std::set< BoundaryID > &ids)
 
static void sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 
static std::string deduceFunctorName (const std::string &name, const InputParameters &params)
 

Public Attributes

const Elem *const & _current_elem
 
Real_dt
 
const MooseArray< Point > & _q_point
 
unsigned int _qp
 
 ALL
 
 ANY
 
const ConsoleStream _console
 

Static Public Attributes

static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 

Protected Types

enum  QP_Data_Type
 

Protected Member Functions

void computeStressParams (const RankTwoTensor &stress, std::vector< Real > &stress_params) const override
 Computes stress_params, given stress. More...
 
std::vector< RankTwoTensordstress_param_dstress (const RankTwoTensor &stress) const override
 d(stress_param[i])/d(stress) at given stress More...
 
std::vector< RankFourTensord2stress_param_dstress (const RankTwoTensor &stress) const override
 d2(stress_param[i])/d(stress)/d(stress) at given stress More...
 
virtual void setStressAfterReturnV (const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const override
 Sets stress from the admissible parameters. More...
 
virtual void preReturnMapV (const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl) override
 Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm. More...
 
void setEffectiveElasticity (const RankFourTensor &Eijkl) override
 Sets _Eij and _En and _Cij. More...
 
void yieldFunctionValuesV (const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const override
 Computes the values of the yield functions, given stress_params and intnl parameters. More...
 
void computeAllQV (const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const override
 Completely fills all_q with correct values. More...
 
void initializeVarsV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &stress_params, Real &gaE, std::vector< Real > &intnl) const override
 Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm. More...
 
void setIntnlValuesV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const override
 Sets the internal parameters based on the trial values of stress_params, their current values, and the old values of the internal parameters. More...
 
void setIntnlDerivativesV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const override
 Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters. More...
 
virtual void consistentTangentOperatorV (const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto) override
 Calculates the consistent tangent operator. More...
 
virtual void initQpStatefulProperties () override
 
virtual void updateState (RankTwoTensor &strain_increment, RankTwoTensor &inelastic_strain_increment, const RankTwoTensor &rotation_increment, RankTwoTensor &stress_new, const RankTwoTensor &stress_old, const RankFourTensor &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator, RankFourTensor &tangent_operator) override
 
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 return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment. More...
 
virtual void propagateQpStatefulProperties () override
 If updateState is not called during a timestep, this will be. More...
 
virtual TangentCalculationMethod getTangentCalculationMethod () override
 
Real yieldF (const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
 Computes the smoothed yield function. More...
 
Real yieldF (const std::vector< Real > &yfs) const
 Computes the smoothed yield function. More...
 
Real ismoother (Real f_diff) const
 Smooths yield functions. More...
 
Real smoother (Real f_diff) const
 Derivative of ismoother. More...
 
Real dsmoother (Real f_diff) const
 Derivative of smoother. More...
 
yieldAndFlow smoothAllQuantities (const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
 Calculates all yield functions and derivatives, and then performs the smoothing scheme. More...
 
int lineSearch (Real &res2, std::vector< Real > &stress_params, Real &gaE, const std::vector< Real > &trial_stress_params, yieldAndFlow &smoothed_q, const std::vector< Real > &intnl_ok, std::vector< Real > &intnl, std::vector< Real > &rhs, Real &linesearch_needed) const
 Performs a line-search to find stress_params and gaE Upon entry: More...
 
int nrStep (const yieldAndFlow &smoothed_q, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, const std::vector< Real > &intnl, Real gaE, std::vector< Real > &rhs) const
 Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution. More...
 
Real calculateRes2 (const std::vector< Real > &rhs) const
 Calculates the residual-squared for the Newton-Raphson + line-search. More...
 
void calculateRHS (const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
 Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, j] * dg/dS[j] ... More...
 
void dnRHSdVar (const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
 Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving the linear system using LAPACK gsev. More...
 
virtual void errorHandler (const std::string &message) const
 Performs any necessary cleaning-up, then throw MooseException(message) More...
 
virtual void initializeReturnProcess ()
 Derived classes may use this to perform calculations before any return-map process is performed, for instance, to initialize variables. More...
 
virtual void finalizeReturnProcess (const RankTwoTensor &rotation_increment)
 Derived classes may use this to perform calculations after the return-map process has completed successfully in stress_param space but before the returned stress tensor has been calculcated. More...
 
virtual void setInelasticStrainIncrementAfterReturn (const RankTwoTensor &stress_trial, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &elasticity_tensor, const RankTwoTensor &returned_stress, RankTwoTensor &inelastic_strain_increment) const
 Sets inelastic strain increment from the returned configuration This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called. More...
 
void dVardTrial (bool elastic_only, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, Real step_size, bool compute_full_tangent_operator, std::vector< std::vector< Real >> &dvar_dtrial) const
 Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_params for the (sub)strain increment. More...
 
bool precisionLoss (const std::vector< Real > &solution, const std::vector< Real > &stress_params, Real gaE) const
 Check whether precision loss has occurred. More...
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state) override
 
virtual const MaterialDatamaterialData () const override
 
virtual MaterialDatamaterialData () override
 
virtual const QBase & qRule () const override
 
virtual void computeQpProperties ()
 
virtual const FEProblemBasemiProblem () const
 
virtual FEProblemBasemiProblem ()
 
bool isPropertyActive (const unsigned int prop_id) const
 
void registerPropName (const std::string &prop_name, bool is_get, const unsigned int state)
 
void checkExecutionStage ()
 
void checkExecutionStage ()
 
virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 
bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 
void addMooseVariableDependency (MooseVariableFieldBase *var)
 
void addMooseVariableDependency (const std::vector< MooseVariableFieldBase * > &vars)
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void addUserObjectDependencyHelper (const UserObject &) const
 
Moose::StateArg determineState () const
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &) const
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
std::string deduceFunctorName (const std::string &name) const
 
const Moose::Functor< T > & getFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctor (const std::string &name, THREAD_ID tid)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
bool isFunctor (const std::string &name) const
 
bool isFunctor (const std::string &name, const SubProblem &subproblem) const
 
Moose::ElemArg makeElemArg (const Elem *elem, bool correct_skewnewss=false) const
 
void checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration)
 
void flagInvalidSolutionInternal (InvalidSolutionID _invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message) const
 
virtual void coupledCallback (const std::string &, bool) const
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0) const
 
virtual bool isCoupledConstant (const std::string &var_name) const
 
unsigned int coupledComponents (const std::string &var_name) const
 
VariableName coupledName (const std::string &var_name, unsigned int comp=0) const
 
std::vector< VariableName > coupledNames (const std::string &var_name) const
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0) const
 
std::vector< unsigned intcoupledIndices (const std::string &var_name) const
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValues (const std::string &var_name) const
 
std::vector< const VectorVariableValue *> coupledVectorValues (const std::string &var_name) const
 
const GenericVariableValue< is_ad > & coupledGenericValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
std::vector< const GenericVariableValue< is_ad > *> coupledGenericValues (const std::string &var_name) const
 
std::vector< const GenericVariableValue< false > *> coupledGenericValues (const std::string &var_name) const
 
std::vector< const GenericVariableValue< true > *> coupledGenericValues (const std::string &var_name) const
 
const GenericVariableValue< is_ad > & coupledGenericDofValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
virtual const VariableValuecoupledValueLower (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableValue *> adCoupledValues (const std::string &var_name) const
 
const ADVariableValueadCoupledLowerValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableValueadCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVectorVariableValue *> adCoupledVectorValues (const std::string &var_name) const
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue *> coupledVectorTagValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledVectorTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableValue *> coupledVectorTagArrayValues (const std::string &var_names, TagID tag) const
 
std::vector< const ArrayVariableValue *> coupledVectorTagArrayValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableGradient *> coupledVectorTagGradients (const std::string &var_names, TagID tag) const
 
std::vector< const VariableGradient *> coupledVectorTagGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableGradient *> coupledVectorTagArrayGradients (const std::string &var_names, TagID tag) const
 
std::vector< const ArrayVariableGradient *> coupledVectorTagArrayGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_name, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
const ArrayVariableValuecoupledVectorTagArrayDofValue (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledVectorTagDofValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledVectorTagDofValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue *> coupledMatrixTagValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledMatrixTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VectorVariableValuecoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ArrayVariableValue *> coupledArrayValues (const std::string &var_name) const
 
MooseWritableVariablewritableVariable (const std::string &var_name, unsigned int comp=0)
 
virtual VariableValuewritableCoupledValue (const std::string &var_name, unsigned int comp=0)
 
void checkWritableVar (MooseWritableVariable *var)
 
virtual const VariableValuecoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValuesOld (const std::string &var_name) const
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValuesOlder (const std::string &var_name) const
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableGradient *> coupledGradients (const std::string &var_name) const
 
const ADVariableGradientadCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableGradientadCoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableGradient *> adCoupledGradients (const std::string &var_name) const
 
const GenericVariableGradient< is_ad > & coupledGenericGradient (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableGradient< false > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
const GenericVariableGradient< true > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
std::vector< const GenericVariableGradient< is_ad > *> coupledGenericGradients (const std::string &var_name) const
 
std::vector< const GenericVariableGradient< false > *> coupledGenericGradients (const std::string &var_name) const
 
std::vector< const GenericVariableGradient< true > *> coupledGenericGradients (const std::string &var_name) const
 
const ADVectorVariableGradientadCoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableSecondadCoupledSecond (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableSecondadCoupledVectorSecond (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableGradient *> coupledGradientsOld (const std::string &var_name) const
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurlOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurlOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDiv (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDivOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDivOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledDots (const std::string &var_name) const
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableValue *> adCoupledDots (const std::string &var_name) const
 
const ADVariableValueadCoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableValueadCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledVectorDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledVectorDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledArrayDotDu (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
const Moose::ADType< T >::typeadCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 
const T & coupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValues (const std::string &var_name) const
 
virtual const VariableValuecoupledDofValuesOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValuesOld (const std::string &var_name) const
 
virtual const VariableValuecoupledDofValuesOlder (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValuesOlder (const std::string &var_name) const
 
virtual const ArrayVariableValuecoupledArrayDofValues (const std::string &var_name, unsigned int comp=0) const
 
virtual const ADVariableValueadCoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadZeroValue () const
 
const ADVariableGradientadZeroGradient () const
 
const ADVariableSecondadZeroSecond () const
 
const GenericVariableValue< is_ad > & genericZeroValue ()
 
const GenericVariableValue< false > & genericZeroValue ()
 
const GenericVariableValue< true > & genericZeroValue ()
 
const GenericVariableGradient< is_ad > & genericZeroGradient ()
 
const GenericVariableGradient< false > & genericZeroGradient ()
 
const GenericVariableGradient< true > & genericZeroGradient ()
 
const GenericVariableSecond< is_ad > & genericZeroSecond ()
 
const GenericVariableSecond< false > & genericZeroSecond ()
 
const GenericVariableSecond< true > & genericZeroSecond ()
 
bool checkVar (const std::string &var_name, unsigned int comp=0, unsigned int comp_bound=0) const
 
const MooseVariableFieldBasegetFEVar (const std::string &var_name, unsigned int comp) const
 
const MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp) const
 
MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp)
 
const T * getVarHelper (const std::string &var_name, unsigned int comp) const
 
T * getVarHelper (const std::string &var_name, unsigned int comp)
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 
const MooseVariablegetVar (const std::string &var_name, unsigned int comp) const
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 
const VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp) const
 
ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp)
 
const ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
std::vector< T > coupledVectorHelper (const std::string &var_name, const Func &func) const
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 

Protected Attributes

const SolidMechanicsHardeningModel_tensile_strength
 Hardening model for tensile strength. More...
 
const SolidMechanicsHardeningModel_compressive_strength
 Hardening model for compressive strength. More...
 
const SolidMechanicsHardeningModel_cohesion
 Hardening model for cohesion. More...
 
const SolidMechanicsHardeningModel_phi
 Hardening model for friction angle. More...
 
const SolidMechanicsHardeningModel_psi
 Hardening model for dilation angle. More...
 
const bool _perfect_guess
 Whether to provide an estimate of the returned stress, based on perfect plasticity. More...
 
Real _poissons_ratio
 Poisson's ratio. More...
 
const Real _shifter
 When equal-eigenvalues are predicted from the stress initialization routine, shift them by this amount. More...
 
RankTwoTensor _eigvecs
 Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to stress space. More...
 
const unsigned _num_sp
 Number of stress parameters. More...
 
const std::vector< Real_definitely_ok_sp
 An admissible value of stress_params at the initial time. More...
 
std::vector< std::vector< Real > > _Eij
 E[i, j] in the system of equations to be solved. More...
 
Real _En
 normalising factor More...
 
std::vector< std::vector< Real > > _Cij
 _Cij[i, j] * _Eij[j, k] = 1 iff j == k More...
 
const unsigned _num_yf
 Number of yield functions. More...
 
const unsigned _num_intnl
 Number of internal parameters. More...
 
const unsigned _max_nr_its
 Maximum number of Newton-Raphson iterations allowed in the return-map process. More...
 
const bool _perform_finite_strain_rotations
 Whether to perform finite-strain rotations. More...
 
const Real _smoothing_tol
 Smoothing tolerance: edges of the yield surface get smoothed by this amount. More...
 
const Real _smoothing_tol2
 Square of the smoothing tolerance. More...
 
const Real _f_tol
 The yield-function tolerance. More...
 
const Real _f_tol2
 Square of the yield-function tolerance. More...
 
const Real _min_step_size
 In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-increments of size greater than this value. More...
 
bool _step_one
 handles case of initial_stress that is inadmissible being supplied More...
 
const bool _warn_about_precision_loss
 Output a warning message if precision loss is encountered during the return-map process. More...
 
MaterialProperty< RankTwoTensor > & _plastic_strain
 plastic strain More...
 
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
 Old value of plastic strain. More...
 
MaterialProperty< std::vector< Real > > & _intnl
 internal parameters More...
 
const MaterialProperty< std::vector< Real > > & _intnl_old
 old values of internal parameters More...
 
MaterialProperty< std::vector< Real > > & _yf
 yield functions More...
 
MaterialProperty< Real > & _iter
 Number of Newton-Raphson iterations used in the return-map. More...
 
MaterialProperty< Real > & _max_iter_used
 Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation. More...
 
const MaterialProperty< Real > & _max_iter_used_old
 Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation. More...
 
MaterialProperty< Real > & _linesearch_needed
 Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise) More...
 
const std::string _base_name
 Name used as a prefix for all material properties related to the stress update model. More...
 
 CURR
 
 PREV
 
bool _bnd
 
bool _neighbor
 
const QBase *const & _qrule
 
const MooseArray< Real > & _JxW
 
const SubdomainID_current_subdomain_id
 
const unsigned int_current_side
 
const ConstantTypeEnum _constant_option
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
THREAD_ID _tid
 
Assembly_assembly
 
const MooseArray< Real > & _coord
 
const MooseArray< Point > & _normals
 
MooseMesh_mesh
 
const Moose::CoordinateSystemType_coord_sys
 
std::set< std::string > _requested_props
 
std::set< std::string > _supplied_props
 
std::set< unsigned int_supplied_prop_ids
 
std::unordered_set< unsigned int_active_prop_ids
 
const bool _compute
 
std::unordered_map< unsigned int, unsigned int_props_to_min_states
 
std::vector< unsigned int_displacements
 
bool _has_stateful_property
 
bool _overrides_init_stateful_props
 
const FaceInfo_face_info
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
const MaterialData_blk_material_data
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real_real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real_t
 
int_t_step
 
Real_dt_old
 
bool _is_transient
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
GeometricSearchData_geometric_search_data
 
bool _requires_geometric_search
 
const InputParameters_c_parameters
 
const std::string & _c_name
 
const std::string & _c_type
 
FEProblemBase_c_fe_problem
 
const SystemBase *const _c_sys
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase *> > _coupled_vars
 
std::vector< MooseVariableFieldBase *> _coupled_moose_vars
 
std::vector< MooseVariable *> _coupled_standard_moose_vars
 
std::vector< VectorMooseVariable *> _coupled_vector_moose_vars
 
std::vector< ArrayMooseVariable *> _coupled_array_moose_vars
 
std::vector< MooseVariableFV< Real > *> _coupled_standard_fv_moose_vars
 
std::vector< MooseLinearVariableFV< Real > *> _coupled_standard_linear_fv_moose_vars
 
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
 
bool _c_nodal
 
bool _c_is_implicit
 
const bool _c_allow_element_to_nodal_coupling
 
THREAD_ID _c_tid
 
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< DualReal > > > _ad_default_value
 
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
 
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADRealVectorValue > > > _ad_default_vector_value
 
VariableValue _default_value_zero
 
VariableGradient _default_gradient
 
MooseArray< ADRealVectorValue_ad_default_gradient
 
MooseArray< ADRealTensorValue_ad_default_vector_gradient
 
VariableSecond _default_second
 
MooseArray< ADRealTensorValue_ad_default_second
 
const VariableValue_zero
 
const VariablePhiValue_phi_zero
 
const MooseArray< DualReal > & _ad_zero
 
const VariableGradient_grad_zero
 
const MooseArray< ADRealVectorValue > & _ad_grad_zero
 
const VariablePhiGradient_grad_phi_zero
 
const VariableSecond_second_zero
 
const MooseArray< ADRealTensorValue > & _ad_second_zero
 
const VariablePhiSecond_second_phi_zero
 
const VectorVariableValue_vector_zero
 
const VectorVariableCurl_vector_curl_zero
 
VectorVariableValue _default_vector_value_zero
 
VectorVariableGradient _default_vector_gradient
 
VectorVariableCurl _default_vector_curl
 
VectorVariableDivergence _default_div
 
ArrayVariableValue _default_array_value_zero
 
ArrayVariableGradient _default_array_gradient
 
bool _coupleable_neighbor
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
const Parallel::Communicator & _communicator
 

Static Protected Attributes

static constexpr unsigned _tensor_dimensionality = 3
 Internal dimensionality of tensors (currently this is 3 throughout tensor_mechanics) More...
 
static RankFourTensor _identityTensor
 
static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Detailed Description

CappedMohrCoulombStressUpdate implements rate-independent nonassociative Mohr-Coulomb plus tensile plus compressive plasticity with hardening/softening.

Definition at line 19 of file CappedMohrCoulombStressUpdate.h.

Member Typedef Documentation

◆ GR2

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
using StressUpdateBaseTempl< is_ad, R2, R4 >::GR2 = GenericRankTwoTensor<is_ad>
inherited

Definition at line 57 of file StressUpdateBase.h.

◆ GR4

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
using StressUpdateBaseTempl< is_ad, R2, R4 >::GR4 = GenericRankFourTensor<is_ad>
inherited

Definition at line 59 of file StressUpdateBase.h.

◆ GSR2

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
using StressUpdateBaseTempl< is_ad, R2, R4 >::GSR2 = Moose::GenericType<R2, is_ad>
inherited

Definition at line 58 of file StressUpdateBase.h.

◆ GSR4

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
using StressUpdateBaseTempl< is_ad, R2, R4 >::GSR4 = Moose::GenericType<R4, is_ad>
inherited

Definition at line 60 of file StressUpdateBase.h.

Constructor & Destructor Documentation

◆ CappedMohrCoulombStressUpdate()

CappedMohrCoulombStressUpdate::CappedMohrCoulombStressUpdate ( const InputParameters parameters)

Definition at line 51 of file CappedMohrCoulombStressUpdate.C.

53  _tensile_strength(getUserObject<SolidMechanicsHardeningModel>("tensile_strength")),
54  _compressive_strength(getUserObject<SolidMechanicsHardeningModel>("compressive_strength")),
55  _cohesion(getUserObject<SolidMechanicsHardeningModel>("cohesion")),
56  _phi(getUserObject<SolidMechanicsHardeningModel>("friction_angle")),
57  _psi(getUserObject<SolidMechanicsHardeningModel>("dilation_angle")),
58  _perfect_guess(getParam<bool>("perfect_guess")),
59  _poissons_ratio(0.0),
62 {
63  if (_psi.value(0.0) <= 0.0 || _psi.value(0.0) > _phi.value(0.0))
64  mooseWarning("Usually the Mohr-Coulomb dilation angle is positive and not greater than the "
65  "friction angle");
66 }
const SolidMechanicsHardeningModel & _phi
Hardening model for friction angle.
MultiParameterPlasticityStressUpdate(const InputParameters &parameters, unsigned num_sp, unsigned num_yf, unsigned num_intnl)
const bool _perfect_guess
Whether to provide an estimate of the returned stress, based on perfect plasticity.
const SolidMechanicsHardeningModel & _tensile_strength
Hardening model for tensile strength.
virtual Real value(Real intnl) const
void mooseWarning(Args &&... args) const
const Real _f_tol
The yield-function tolerance.
const Real _shifter
When equal-eigenvalues are predicted from the stress initialization routine, shift them by this amoun...
const SolidMechanicsHardeningModel & _compressive_strength
Hardening model for compressive strength.
const SolidMechanicsHardeningModel & _cohesion
Hardening model for cohesion.
const SolidMechanicsHardeningModel & _psi
Hardening model for dilation angle.
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...
const InputParameters & parameters() const

Member Function Documentation

◆ calculateNumberSubsteps()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual int StressUpdateBaseTempl< is_ad, R2, R4 >::calculateNumberSubsteps ( const GR2 )
inlinevirtualinherited

Given the elastic strain increment compute the number of substeps required to bring a substepped trial stress guess distance from the yield surface into the tolerance specified in the individual child class.

Definition at line 160 of file StressUpdateBase.h.

160 { return 1; }

◆ calculateRes2()

Real MultiParameterPlasticityStressUpdate::calculateRes2 ( const std::vector< Real > &  rhs) const
protectedinherited

Calculates the residual-squared for the Newton-Raphson + line-search.

Parameters
rhs[in]The RHS vector
Returns
sum_i (rhs[i] * rhs[i])

Definition at line 800 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

801 {
802  Real res2 = 0.0;
803  for (const auto & r : rhs)
804  res2 += r * r;
805  return res2;
806 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ calculateRHS()

void MultiParameterPlasticityStressUpdate::calculateRHS ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
Real  gaE,
const yieldAndFlow smoothed_q,
std::vector< Real > &  rhs 
) const
protectedinherited

Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, j] * dg/dS[j] ...

0 = rhs[N-1] = S[N-1] - S[N-1]^trial + ga * E[N-1, j] * dg/dS[j] 0 = rhs[N] = f(S, intnl) where N = _num_sp

Parameters
trial_stress_params[in]The trial stress parameters for this (sub)strain increment, S[:]^trial
stress_params[in]The current stress parameters, S[:]
gaE[in]ga*_En (the normalisation with _En is so that gaE is of similar magnitude to S)
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the current stress parameters and the current internal parameters
rhs[out]The result

Definition at line 809 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

814 {
815  const Real ga = gaE / _En;
816  for (unsigned i = 0; i < _num_sp; ++i)
817  {
818  rhs[i] = stress_params[i] - trial_stress_params[i];
819  for (unsigned j = 0; j < _num_sp; ++j)
820  rhs[i] += ga * _Eij[i][j] * smoothed_q.dg[j];
821  }
822  rhs[_num_sp] = smoothed_q.f;
823 }
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const unsigned _num_sp
Number of stress parameters.

◆ computeAllQV()

void CappedMohrCoulombStressUpdate::computeAllQV ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
std::vector< yieldAndFlow > &  all_q 
) const
overrideprotectedvirtual

Completely fills all_q with correct values.

These values are: (1) the yield function values, yf[i] (2) d(yf[i])/d(stress_params[j]) (3) d(yf[i])/d(intnl[j]) (4) d(flowPotential[i])/d(stress_params[j]) (5) d2(flowPotential[i])/d(stress_params[j])/d(stress_params[k]) (6) d2(flowPotential[i])/d(stress_params[j])/d(intnl[k])

Parameters
stress_params[in]The stress parameters
intnl[in]The internal parameters
[out]all_qAll the desired quantities

Implements MultiParameterPlasticityStressUpdate.

Definition at line 148 of file CappedMohrCoulombStressUpdate.C.

151 {
152  const Real ts = _tensile_strength.value(intnl[1]);
153  const Real dts = _tensile_strength.derivative(intnl[1]);
154  const Real cs = _compressive_strength.value(intnl[1]);
155  const Real dcs = _compressive_strength.derivative(intnl[1]);
156  const Real sinphi = std::sin(_phi.value(intnl[0]));
157  const Real dsinphi = std::cos(_phi.value(intnl[0])) * _phi.derivative(intnl[0]);
158  const Real sinpsi = std::sin(_psi.value(intnl[0]));
159  const Real dsinpsi = std::cos(_psi.value(intnl[0])) * _psi.derivative(intnl[0]);
160  const Real cohcos = _cohesion.value(intnl[0]) * std::cos(_phi.value(intnl[0]));
161  const Real dcohcos =
162  _cohesion.derivative(intnl[0]) * std::cos(_phi.value(intnl[0])) -
163  _cohesion.value(intnl[0]) * std::sin(_phi.value(intnl[0])) * _phi.derivative(intnl[0]);
164  const Real smax = stress_params[2]; // largest eigenvalue
165  const Real smid = stress_params[1];
166  const Real smin = stress_params[0]; // smallest eigenvalue
167 
168  // yield functions. See comment in yieldFunctionValuesV
169  all_q[0].f = smax - ts;
170  all_q[1].f = smid - ts;
171  all_q[2].f = smin - ts;
172  all_q[3].f = -smin - cs;
173  all_q[4].f = -smid - cs;
174  all_q[5].f = -smax - cs;
175  all_q[6].f = 0.5 * (smax - smin) + 0.5 * (smax + smin) * sinphi - cohcos;
176  all_q[7].f = 0.5 * (smid - smin) + 0.5 * (smid + smin) * sinphi - cohcos;
177  all_q[8].f = 0.5 * (smax - smid) + 0.5 * (smax + smid) * sinphi - cohcos;
178  all_q[9].f = 0.5 * (smid - smax) + 0.5 * (smid + smax) * sinphi - cohcos;
179  all_q[10].f = 0.5 * (smin - smid) + 0.5 * (smin + smid) * sinphi - cohcos;
180  all_q[11].f = 0.5 * (smin - smax) + 0.5 * (smin + smax) * sinphi - cohcos;
181 
182  // d(yield function)/d(stress_params)
183  for (unsigned yf = 0; yf < _num_yf; ++yf)
184  for (unsigned a = 0; a < _num_sp; ++a)
185  all_q[yf].df[a] = 0.0;
186  all_q[0].df[2] = 1.0;
187  all_q[1].df[1] = 1.0;
188  all_q[2].df[0] = 1.0;
189  all_q[3].df[0] = -1.0;
190  all_q[4].df[1] = -1.0;
191  all_q[5].df[2] = -1.0;
192  all_q[6].df[2] = 0.5 * (1.0 + sinphi);
193  all_q[6].df[0] = 0.5 * (-1.0 + sinphi);
194  all_q[7].df[1] = 0.5 * (1.0 + sinphi);
195  all_q[7].df[0] = 0.5 * (-1.0 + sinphi);
196  all_q[8].df[2] = 0.5 * (1.0 + sinphi);
197  all_q[8].df[1] = 0.5 * (-1.0 + sinphi);
198  all_q[9].df[1] = 0.5 * (1.0 + sinphi);
199  all_q[9].df[2] = 0.5 * (-1.0 + sinphi);
200  all_q[10].df[0] = 0.5 * (1.0 + sinphi);
201  all_q[10].df[1] = 0.5 * (-1.0 + sinphi);
202  all_q[11].df[0] = 0.5 * (1.0 + sinphi);
203  all_q[11].df[2] = 0.5 * (-1.0 + sinphi);
204 
205  // d(yield function)/d(intnl)
206  for (unsigned i = 0; i < 6; ++i)
207  all_q[i].df_di[0] = 0.0;
208  all_q[0].df_di[1] = all_q[1].df_di[1] = all_q[2].df_di[1] = -dts;
209  all_q[3].df_di[1] = all_q[4].df_di[1] = all_q[5].df_di[1] = -dcs;
210  for (unsigned i = 6; i < 12; ++i)
211  all_q[i].df_di[1] = 0.0;
212  all_q[6].df_di[0] = 0.5 * (smax + smin) * dsinphi - dcohcos;
213  all_q[7].df_di[0] = 0.5 * (smid + smin) * dsinphi - dcohcos;
214  all_q[8].df_di[0] = 0.5 * (smax + smid) * dsinphi - dcohcos;
215  all_q[9].df_di[0] = 0.5 * (smid + smax) * dsinphi - dcohcos;
216  all_q[10].df_di[0] = 0.5 * (smin + smid) * dsinphi - dcohcos;
217  all_q[11].df_di[0] = 0.5 * (smin + smax) * dsinphi - dcohcos;
218 
219  // the flow potential is just the yield function with phi->psi
220  // d(flow potential)/d(stress_params)
221  for (unsigned yf = 0; yf < 6; ++yf)
222  for (unsigned a = 0; a < _num_sp; ++a)
223  all_q[yf].dg[a] = all_q[yf].df[a];
224  all_q[6].dg[2] = all_q[7].dg[1] = all_q[8].dg[2] = all_q[9].dg[1] = all_q[10].dg[0] =
225  all_q[11].dg[0] = 0.5 * (1.0 + sinpsi);
226  all_q[6].dg[0] = all_q[7].dg[0] = all_q[8].dg[1] = all_q[9].dg[2] = all_q[10].dg[1] =
227  all_q[11].dg[2] = 0.5 * (-1.0 + sinpsi);
228 
229  // d(flow potential)/d(stress_params)/d(intnl)
230  for (unsigned yf = 0; yf < _num_yf; ++yf)
231  for (unsigned a = 0; a < _num_sp; ++a)
232  for (unsigned i = 0; i < _num_intnl; ++i)
233  all_q[yf].d2g_di[a][i] = 0.0;
234  all_q[6].d2g_di[2][0] = all_q[7].d2g_di[1][0] = all_q[8].d2g_di[2][0] = all_q[9].d2g_di[1][0] =
235  all_q[10].d2g_di[0][0] = all_q[11].d2g_di[0][0] = 0.5 * dsinpsi;
236  all_q[6].d2g_di[0][0] = all_q[7].d2g_di[0][0] = all_q[8].d2g_di[1][0] = all_q[9].d2g_di[2][0] =
237  all_q[10].d2g_di[1][0] = all_q[11].d2g_di[2][0] = 0.5 * dsinpsi;
238 
239  // d(flow potential)/d(stress_params)/d(stress_params)
240  for (unsigned yf = 0; yf < _num_yf; ++yf)
241  for (unsigned a = 0; a < _num_sp; ++a)
242  for (unsigned b = 0; b < _num_sp; ++b)
243  all_q[yf].d2g[a][b] = 0.0;
244 }
const SolidMechanicsHardeningModel & _phi
Hardening model for friction angle.
const unsigned _num_intnl
Number of internal parameters.
const SolidMechanicsHardeningModel & _tensile_strength
Hardening model for tensile strength.
virtual Real value(Real intnl) const
const unsigned _num_yf
Number of yield functions.
const SolidMechanicsHardeningModel & _compressive_strength
Hardening model for compressive strength.
virtual Real derivative(Real intnl) const
const SolidMechanicsHardeningModel & _cohesion
Hardening model for cohesion.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const SolidMechanicsHardeningModel & _psi
Hardening model for dilation angle.
const unsigned _num_sp
Number of stress parameters.

◆ computeStrainEnergyRateDensity()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual Real StressUpdateBaseTempl< is_ad, R2, R4 >::computeStrainEnergyRateDensity ( const GenericMaterialProperty< RankTwoTensor, is_ad > &  ,
const GenericMaterialProperty< RankTwoTensor, is_ad > &   
)
inlinevirtualinherited

Compute the strain energy rate density for this inelastic model for the current step.

Parameters
stressThe stress tensor at the end of the step
strain_rateThe strain rate at the end of the step
Returns
The computed strain energy rate density

Reimplemented in PowerLawCreepStressUpdateTempl< is_ad >.

Definition at line 180 of file StressUpdateBase.h.

183  {
184  mooseError(
185  "The computation of strain energy rate density needs to be implemented by a child class");
186  return 0.0;
187  }
void mooseError(Args &&... args) const

◆ computeStressParams()

void CappedMohrCoulombStressUpdate::computeStressParams ( const RankTwoTensor stress,
std::vector< Real > &  stress_params 
) const
overrideprotectedvirtual

Computes stress_params, given stress.

Derived classes must override this

Parameters
stress[in]Stress tensor
stress_params[out]The compute stress_params

Implements MultiParameterPlasticityStressUpdate.

Definition at line 69 of file CappedMohrCoulombStressUpdate.C.

71 {
72  // stress_params[0] = smallest eigenvalue, stress_params[2] = largest eigenvalue
73  stress.symmetricEigenvalues(stress_params);
74 }
void symmetricEigenvalues(std::vector< Real > &eigvals) const

◆ computeTimeStepLimit()

template<bool is_ad, typename R2 , typename R4 >
Real StressUpdateBaseTempl< is_ad, R2, R4 >::computeTimeStepLimit ( )
virtualinherited

◆ consistentTangentOperatorV()

void CappedMohrCoulombStressUpdate::consistentTangentOperatorV ( const RankTwoTensor stress_trial,
const std::vector< Real > &  trial_stress_params,
const RankTwoTensor stress,
const std::vector< Real > &  stress_params,
Real  gaE,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
bool  compute_full_tangent_operator,
const std::vector< std::vector< Real >> &  dvar_dtrial,
RankFourTensor cto 
)
overrideprotectedvirtual

Calculates the consistent tangent operator.

Derived classes may choose to override this for computational efficiency. The implementation in this class is quite expensive, even though it looks compact and clean, because of all the manipulations of RankFourTensors involved.

Parameters
stress_trial[in]the trial value of the stress tensor for this strain increment
trial_stress_params[in]the trial values of the stress_params for this strain increment
stress[in]the returned value of the stress tensor for this strain increment
stress_params[in]the returned value of the stress_params for this strain increment
gaE[in]the total value of that came from this strain increment
smoothed_q[in]contains the yield function and derivatives evaluated at (p, q)
Eijkl[in]The elasticity tensor
compute_full_tangent_operator[in]true if the full consistent tangent operator is needed, otherwise false
dvar_dtrial[in]dvar_dtrial[i][j] = d({stress_param[i],gaE})/d(trial_stress_param[j]) for this strain increment
[out]ctoThe consistent tangent operator

Reimplemented from MultiParameterPlasticityStressUpdate.

Reimplemented in CappedMohrCoulombCosseratStressUpdate.

Definition at line 796 of file CappedMohrCoulombStressUpdate.C.

Referenced by CappedMohrCoulombCosseratStressUpdate::consistentTangentOperatorV().

807 {
808  cto = elasticity_tensor;
809  if (!compute_full_tangent_operator)
810  return;
811 
812  // dvar_dtrial has been computed already, so
813  // d(stress)/d(trial_stress) = d(eigvecs * stress_params * eigvecs.transpose())/d(trial_stress)
814  // eigvecs is a rotation matrix, rot(i, j) = e_j(i) = i^th component of j^th eigenvector
815  // d(rot_ij)/d(stress_kl) = d(e_j(i))/d(stress_kl)
816  // = sum_a 0.5 * e_a(i) * (e_a(k)e_j(l) + e_a(l)e_j(k)) / (la_j - la_a)
817  // = sum_a 0.5 * rot(i,a) * (rot(k,a)rot(l,j) + rot(l,a)*rot(k,j)) / (la_j - la_a)
818  RankFourTensor drot_dstress;
819  for (unsigned i = 0; i < _tensor_dimensionality; ++i)
820  for (unsigned j = 0; j < _tensor_dimensionality; ++j)
821  for (unsigned k = 0; k < _tensor_dimensionality; ++k)
822  for (unsigned l = 0; l < _tensor_dimensionality; ++l)
823  for (unsigned a = 0; a < _num_sp; ++a)
824  {
825  if (trial_stress_params[a] == trial_stress_params[j])
826  continue;
827  drot_dstress(i, j, k, l) +=
828  0.5 * _eigvecs(i, a) *
829  (_eigvecs(k, a) * _eigvecs(l, j) + _eigvecs(l, a) * _eigvecs(k, j)) /
830  (trial_stress_params[j] - trial_stress_params[a]);
831  }
832 
833  const RankTwoTensor eT = _eigvecs.transpose();
834 
835  RankFourTensor dstress_dtrial;
836  for (unsigned i = 0; i < _tensor_dimensionality; ++i)
837  for (unsigned j = 0; j < _tensor_dimensionality; ++j)
838  for (unsigned k = 0; k < _tensor_dimensionality; ++k)
839  for (unsigned l = 0; l < _tensor_dimensionality; ++l)
840  for (unsigned a = 0; a < _num_sp; ++a)
841  dstress_dtrial(i, j, k, l) +=
842  drot_dstress(i, a, k, l) * stress_params[a] * eT(a, j) +
843  _eigvecs(i, a) * stress_params[a] * drot_dstress(j, a, k, l);
844 
845  const std::vector<RankTwoTensor> dsp_trial = dstress_param_dstress(stress_trial);
846  for (unsigned i = 0; i < _tensor_dimensionality; ++i)
847  for (unsigned j = 0; j < _tensor_dimensionality; ++j)
848  for (unsigned k = 0; k < _tensor_dimensionality; ++k)
849  for (unsigned l = 0; l < _tensor_dimensionality; ++l)
850  for (unsigned a = 0; a < _num_sp; ++a)
851  for (unsigned b = 0; b < _num_sp; ++b)
852  dstress_dtrial(i, j, k, l) +=
853  _eigvecs(i, a) * dvar_dtrial[a][b] * dsp_trial[b](k, l) * eT(a, j);
854 
855  cto = dstress_dtrial * elasticity_tensor;
856 }
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
std::vector< RankTwoTensor > dstress_param_dstress(const RankTwoTensor &stress) const override
d(stress_param[i])/d(stress) at given stress
RankTwoTensorTempl< Real > transpose() const
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
static constexpr unsigned _tensor_dimensionality
Internal dimensionality of tensors (currently this is 3 throughout tensor_mechanics) ...
static const std::string k
Definition: NS.h:124
const unsigned _num_sp
Number of stress parameters.

◆ d2stress_param_dstress()

std::vector< RankFourTensor > CappedMohrCoulombStressUpdate::d2stress_param_dstress ( const RankTwoTensor stress) const
overrideprotectedvirtual

d2(stress_param[i])/d(stress)/d(stress) at given stress

Parameters
stressstress tensor
Returns
d2(stress_param[:])/d(stress)/d(stress)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 86 of file CappedMohrCoulombStressUpdate.C.

87 {
88  std::vector<RankFourTensor> d2;
89  stress.d2symmetricEigenvalues(d2);
90  return d2;
91 }
void d2symmetricEigenvalues(std::vector< RankFourTensorTempl< Real >> &deriv) const

◆ dnRHSdVar()

void MultiParameterPlasticityStressUpdate::dnRHSdVar ( const yieldAndFlow smoothed_q,
const std::vector< std::vector< Real >> &  dintnl,
const std::vector< Real > &  stress_params,
Real  gaE,
std::vector< double > &  jac 
) const
protectedinherited

Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving the linear system using LAPACK gsev.

Parameters
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the current values of the stress_params and the internal parameters
dintnl[in]The derivatives of the internal parameters wrt the stress_params
stress_params[in]The current value of the stress_params during the Newton-Raphson process
gaE[in]The current value of gaE
jac[out]The outputted derivatives

Definition at line 826 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::dVardTrial(), and MultiParameterPlasticityStressUpdate::nrStep().

831 {
832  for (auto & jac_entry : jac)
833  jac_entry = 0.0;
834 
835  const Real ga = gaE / _En;
836 
837  unsigned ind = 0;
838  for (unsigned var = 0; var < _num_sp; ++var)
839  {
840  for (unsigned rhs = 0; rhs < _num_sp; ++rhs)
841  {
842  if (var == rhs)
843  jac[ind] -= 1.0;
844  for (unsigned j = 0; j < _num_sp; ++j)
845  {
846  jac[ind] -= ga * _Eij[rhs][j] * smoothed_q.d2g[j][var];
847  for (unsigned k = 0; k < _num_intnl; ++k)
848  jac[ind] -= ga * _Eij[rhs][j] * smoothed_q.d2g_di[j][k] * dintnl[k][var];
849  }
850  ind++;
851  }
852  // now rhs = _num_sp (that is, the yield function)
853  jac[ind] -= smoothed_q.df[var];
854  for (unsigned k = 0; k < _num_intnl; ++k)
855  jac[ind] -= smoothed_q.df_di[k] * dintnl[k][var];
856  ind++;
857  }
858 
859  // now var = _num_sp (that is, gaE)
860  for (unsigned rhs = 0; rhs < _num_sp; ++rhs)
861  {
862  for (unsigned j = 0; j < _num_sp; ++j)
863  jac[ind] -= (1.0 / _En) * _Eij[rhs][j] * smoothed_q.dg[j];
864  ind++;
865  }
866  // now rhs = _num_sp (that is, the yield function)
867  jac[ind] = 0.0;
868 }
const unsigned _num_intnl
Number of internal parameters.
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
static const std::string k
Definition: NS.h:124
const unsigned _num_sp
Number of stress parameters.

◆ dsmoother()

Real MultiParameterPlasticityStressUpdate::dsmoother ( Real  f_diff) const
protectedinherited

Derivative of smoother.

Definition at line 531 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities().

532 {
533  if (std::abs(f_diff) >= _smoothing_tol)
534  return 0.0;
535  switch (_smoother_function_type)
536  {
538  return 0.25 * M_PI / _smoothing_tol * std::cos(f_diff * M_PI * 0.5 / _smoothing_tol);
540  return 0.75 / _smoothing_tol * (1.0 - Utility::pow<2>(f_diff / _smoothing_tol));
542  return 0.625 / _smoothing_tol * (1.0 - Utility::pow<4>(f_diff / _smoothing_tol));
544  return (7.0 / 12.0 / _smoothing_tol) * (1.0 - Utility::pow<6>(f_diff / _smoothing_tol));
545  default:
546  return 0.0;
547  }
548 }
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.

◆ dstress_param_dstress()

std::vector< RankTwoTensor > CappedMohrCoulombStressUpdate::dstress_param_dstress ( const RankTwoTensor stress) const
overrideprotectedvirtual

d(stress_param[i])/d(stress) at given stress

Parameters
stressstress tensor
Returns
d(stress_param[:])/d(stress)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 77 of file CappedMohrCoulombStressUpdate.C.

Referenced by consistentTangentOperatorV().

78 {
79  std::vector<Real> sp;
80  std::vector<RankTwoTensor> dsp;
81  stress.dsymmetricEigenvalues(sp, dsp);
82  return dsp;
83 }
void dsymmetricEigenvalues(std::vector< Real > &eigvals, std::vector< RankTwoTensorTempl< Real >> &deigvals) const

◆ dVardTrial()

void MultiParameterPlasticityStressUpdate::dVardTrial ( bool  elastic_only,
const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
Real  gaE,
const std::vector< Real > &  intnl,
const yieldAndFlow smoothed_q,
Real  step_size,
bool  compute_full_tangent_operator,
std::vector< std::vector< Real >> &  dvar_dtrial 
) const
protectedinherited

Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_params for the (sub)strain increment.

After the strain increment has been fully applied, dvar_dtrial will contain the result appropriate to the full strain increment. Before that time (if applying in sub-strain increments) it will contain the result appropriate to the amount of strain increment applied successfully.

Parameters
elastic_only[in]whether this was an elastic step: if so then the updates to dvar_dtrial are fairly trivial
trial_stress_params[in]Trial values of stress_params for this (sub)strain increment
stress_params[in]Returned values of stress_params for this (sub)strain increment
gaE[in]the value of gaE that came from this (sub)strain increment
intnl[in]the value of the internal parameters at the returned position
smoothed_q[in]contains the yield function and derivatives evaluated at (stress_params, intnl)
step_size[in]size of this (sub)strain increment
compute_full_tangent_operator[in]true if the full consistent tangent operator is needed, otherwise false
dvar_dtrial[out]dvar_dtrial[i][j] = d({stress_param[i],gaE})/d(trial_stress_param[j])

Definition at line 871 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

880 {
882  return;
883 
884  if (!compute_full_tangent_operator)
885  return;
886 
887  if (elastic_only)
888  {
889  // no change to gaE, and all off-diag stuff remains unchanged from previous step
890  for (unsigned v = 0; v < _num_sp; ++v)
891  dvar_dtrial[v][v] += step_size;
892  return;
893  }
894 
895  const Real ga = gaE / _En;
896 
897  std::vector<std::vector<Real>> dintnl(_num_intnl, std::vector<Real>(_num_sp));
898  setIntnlDerivativesV(trial_stress_params, stress_params, intnl, dintnl);
899 
900  // rhs is described elsewhere, the following are changes in rhs wrt the trial_stress_param
901  // values
902  // In the following we use d(intnl)/d(trial variable) = - d(intnl)/d(variable)
903  std::vector<Real> rhs_cto((_num_sp + 1) * _num_sp);
904 
905  unsigned ind = 0;
906  for (unsigned a = 0; a < _num_sp; ++a)
907  {
908  // change in RHS[b] wrt changes in stress_param_trial[a]
909  for (unsigned b = 0; b < _num_sp; ++b)
910  {
911  if (a == b)
912  rhs_cto[ind] -= 1.0;
913  for (unsigned j = 0; j < _num_sp; ++j)
914  for (unsigned k = 0; k < _num_intnl; ++k)
915  rhs_cto[ind] -= ga * _Eij[b][j] * smoothed_q.d2g_di[j][k] * dintnl[k][a];
916  ind++;
917  }
918  // now b = _num_sp (that is, the yield function)
919  for (unsigned k = 0; k < _num_intnl; ++k)
920  rhs_cto[ind] -= smoothed_q.df_di[k] * dintnl[k][a];
921  ind++;
922  }
923 
924  // jac = d(-rhs)/d(var)
925  std::vector<double> jac((_num_sp + 1) * (_num_sp + 1));
926  dnRHSdVar(smoothed_q, dintnl, stress_params, gaE, jac);
927 
928  std::vector<PetscBLASInt> ipiv(_num_sp + 1);
929  PetscBLASInt info;
930  const PetscBLASInt gesv_num_rhs = _num_sp + 1;
931  const PetscBLASInt gesv_num_pq = _num_sp;
932  LAPACKgesv_(&gesv_num_rhs,
933  &gesv_num_pq,
934  &jac[0],
935  &gesv_num_rhs,
936  &ipiv[0],
937  &rhs_cto[0],
938  &gesv_num_rhs,
939  &info);
940  if (info != 0)
941  errorHandler("MultiParameterPlasticityStressUpdate: PETSC LAPACK gsev routine returned with "
942  "error code " +
944 
945  ind = 0;
946  std::vector<std::vector<Real>> dvarn_dtrialn(_num_sp + 1, std::vector<Real>(_num_sp, 0.0));
947  for (unsigned spt = 0; spt < _num_sp; ++spt) // loop over trial stress-param variables
948  {
949  for (unsigned v = 0; v < _num_sp; ++v) // loop over variables in NR procedure
950  {
951  dvarn_dtrialn[v][spt] = rhs_cto[ind];
952  ind++;
953  }
954  // the final NR variable is gaE
955  dvarn_dtrialn[_num_sp][spt] = rhs_cto[ind];
956  ind++;
957  }
958 
959  const std::vector<std::vector<Real>> dvar_dtrial_old = dvar_dtrial;
960 
961  for (unsigned v = 0; v < _num_sp; ++v) // loop over variables in NR procedure
962  {
963  for (unsigned spt = 0; spt < _num_sp; ++spt) // loop over trial stress-param variables
964  {
965  dvar_dtrial[v][spt] = step_size * dvarn_dtrialn[v][spt];
966  for (unsigned a = 0; a < _num_sp; ++a)
967  dvar_dtrial[v][spt] += dvarn_dtrialn[v][a] * dvar_dtrial_old[a][spt];
968  }
969  }
970  // for gaE the formulae are a little different
971  const unsigned v = _num_sp;
972  for (unsigned spt = 0; spt < _num_sp; ++spt)
973  {
974  dvar_dtrial[v][spt] += step_size * dvarn_dtrialn[v][spt]; // note +=
975  for (unsigned a = 0; a < _num_sp; ++a)
976  dvar_dtrial[v][spt] += dvarn_dtrialn[v][a] * dvar_dtrial_old[a][spt];
977  }
978 }
FEProblemBase & _fe_problem
void dnRHSdVar(const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving ...
MPI_Info info
virtual void errorHandler(const std::string &message) const
Performs any necessary cleaning-up, then throw MooseException(message)
const unsigned _num_intnl
Number of internal parameters.
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
virtual void setIntnlDerivativesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.
std::string stringify(const T &t)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
Definition: NS.h:82
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const bool & currentlyComputingJacobian() const
static const std::string k
Definition: NS.h:124
const unsigned _num_sp
Number of stress parameters.

◆ errorHandler()

void MultiParameterPlasticityStressUpdate::errorHandler ( const std::string &  message) const
protectedvirtualinherited

Performs any necessary cleaning-up, then throw MooseException(message)

Parameters
messageThe message to using in MooseException

Definition at line 659 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::dVardTrial(), and MultiParameterPlasticityStressUpdate::updateState().

660 {
661  throw MooseException(message);
662 }
static const std::string message

◆ finalizeReturnProcess()

void MultiParameterPlasticityStressUpdate::finalizeReturnProcess ( const RankTwoTensor rotation_increment)
protectedvirtualinherited

Derived classes may use this to perform calculations after the return-map process has completed successfully in stress_param space but before the returned stress tensor has been calculcated.

Parameters
rotation_increment[in]The large-strain rotation increment

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Definition at line 670 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

672 {
673 }

◆ getTangentCalculationMethod()

virtual TangentCalculationMethod MultiParameterPlasticityStressUpdate::getTangentCalculationMethod ( )
inlineoverrideprotectedvirtualinherited

◆ initializeReturnProcess()

void MultiParameterPlasticityStressUpdate::initializeReturnProcess ( )
protectedvirtualinherited

Derived classes may use this to perform calculations before any return-map process is performed, for instance, to initialize variables.

This is called at the very start of updateState, even before any checking for admissible stresses, etc, is performed

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Definition at line 665 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

666 {
667 }

◆ initializeVarsV()

void CappedMohrCoulombStressUpdate::initializeVarsV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  intnl_old,
std::vector< Real > &  stress_params,
Real gaE,
std::vector< Real > &  intnl 
) const
overrideprotectedvirtual

Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm.

The purpose of these "good guesses" is to speed up the Newton-Raphson process by providing it with a good initial guess. Derived classes may choose to override this if their plastic models are easy enough to solve approximately. The default values, provided by this class, are simply gaE = 0, stress_params = trial_stress_params, that is, the "good guess" is just the trial point for this (sub)strain increment.

Parameters
trial_stress_params[in]The stress_params at the trial point
intnl_old[in]The internal parameters before applying the (sub)strain increment
stress_params[out]The "good guess" value of the stress_params
gaE[out]The "good guess" value of gaE
intnl[out]The "good guess" value of the internal parameters

For CappedMohrCoulomb there are a number of possibilities for the returned stress configuration:

  • return to the Tensile yield surface to its plane
  • return to the Tensile yield surface to its max=mid edge
  • return to the Tensile yield surface to its tip
  • return to the Compressive yield surface to its plane
  • return to the Compressive yield surface to its max=mid edge
  • return to the Compressive yield surface to its tip
  • return to the Mohr-Coulomb yield surface to its plane
  • return to the Mohr-Coulomb yield surface to its max=mid edge
  • return to the Mohr-Coulomb yield surface to its mid=min edge
  • return to the Mohr-Coulomb yield surface to its tip
  • return to the edge between Tensile and Mohr-Coulomb
  • return to the edge between Tensile and Mohr-Coulomb, at max=mid point
  • return to the edge between Tensile and Mohr-Coulomb, at mid=min point
  • return to the edge between Compressive and Mohr-Coulomb
  • return to the edge between Compressive and Mohr-Coulomb, at max=mid point
  • return to the edge between Compressive and Mohr-Coulomb, at mid=min point Which of these is more prelevant depends on the parameters tensile strength, compressive strength, cohesion, etc. I simply check each possibility until i find one that works. _shifter is used to avoid equal eigenvalues

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 265 of file CappedMohrCoulombStressUpdate.C.

270 {
271  if (!_perfect_guess)
272  {
273  for (unsigned i = 0; i < _num_sp; ++i)
274  stress_params[i] = trial_stress_params[i];
275  gaE = 0.0;
276  }
277  else
278  {
279  const Real ts = _tensile_strength.value(intnl_old[1]);
280  const Real cs = _compressive_strength.value(intnl_old[1]);
281  const Real sinphi = std::sin(_phi.value(intnl_old[0]));
282  const Real cohcos = _cohesion.value(intnl_old[0]) * std::cos(_phi.value(intnl_old[0]));
283 
284  const Real trial_tensile_yf = trial_stress_params[2] - ts;
285  const Real trial_compressive_yf = -trial_stress_params[0] - cs;
286  const Real trial_mc_yf = 0.5 * (trial_stress_params[2] - trial_stress_params[0]) +
287  0.5 * (trial_stress_params[2] + trial_stress_params[0]) * sinphi -
288  cohcos;
289 
315  bool found_solution = false;
316 
317  if (trial_tensile_yf <= _f_tol && trial_compressive_yf <= _f_tol && trial_mc_yf <= _f_tol)
318  {
319  // this is needed because although we know the smoothed yield function is
320  // positive, the individual yield functions may not be
321  for (unsigned i = 0; i < _num_sp; ++i)
322  stress_params[i] = trial_stress_params[i];
323  gaE = 0.0;
324  found_solution = true;
325  }
326 
327  const bool tensile_possible = (ts < cohcos / sinphi); // tensile chops MC tip
328  const bool mc_tip_possible = (cohcos / sinphi < ts); // MC tip pokes through tensile
329  const bool mc_impossible = (0.5 * (ts + cs) + 0.5 * (ts - cs) * sinphi - cohcos <
330  _f_tol); // MC outside tensile and compressive
331 
332  const Real sinpsi = std::sin(_psi.value(intnl_old[0]));
333  const Real halfplus = 0.5 + 0.5 * sinpsi;
334  const Real neghalfplus = -0.5 + 0.5 * sinpsi;
335 
336  if (!found_solution && tensile_possible && trial_tensile_yf > _f_tol &&
337  (trial_compressive_yf <= _f_tol || (trial_compressive_yf > _f_tol && mc_impossible)))
338  {
339  // try pure tensile failure, return to the plane
340  // This involves solving yf[0] = 0 and the three flow-direction equations
341  // Don't try this if there is compressive failure, since returning to
342  // the tensile yield surface will only make compressive failure worse
343  const Real ga = (trial_stress_params[2] - ts) / _Eij[2][2];
344  stress_params[2] = ts; // largest eigenvalue
345  stress_params[1] = trial_stress_params[1] - ga * _Eij[1][2];
346  stress_params[0] = trial_stress_params[0] - ga * _Eij[0][2];
347 
348  // if we have to return to the edge, or tip, do that
349  Real dist_mod = 1.0;
350  const Real to_subtract1 = stress_params[1] - (ts - 0.5 * _shifter);
351  if (to_subtract1 > 0.0)
352  {
353  dist_mod += Utility::pow<2>(to_subtract1 / (trial_stress_params[2] - ts));
354  stress_params[1] -= to_subtract1;
355  }
356  const Real to_subtract0 = stress_params[0] - (ts - _shifter);
357  if (to_subtract0 > 0.0)
358  {
359  dist_mod += Utility::pow<2>(to_subtract0 / (trial_stress_params[2] - ts));
360  stress_params[0] -= to_subtract0;
361  }
362  if (mc_impossible) // might have to shift up to the compressive yield surface
363  {
364  const Real to_add0 = -stress_params[0] - cs;
365  if (to_add0 > 0.0)
366  {
367  dist_mod += Utility::pow<2>(to_add0 / (trial_stress_params[2] - ts));
368  stress_params[0] += to_add0;
369  }
370  const Real to_add1 = -cs + 0.5 * _shifter - stress_params[1];
371  if (to_add1 > 0.0)
372  {
373  dist_mod += Utility::pow<2>(to_add1 / (trial_stress_params[2] - ts));
374  stress_params[1] += to_add1;
375  }
376  }
377 
378  const Real new_compressive_yf = -stress_params[0] - cs;
379  const Real new_mc_yf = 0.5 * (stress_params[2] - stress_params[0]) +
380  0.5 * (stress_params[2] + stress_params[0]) * sinphi - cohcos;
381  if (new_mc_yf <= _f_tol && new_compressive_yf <= _f_tol)
382  {
383  gaE = std::sqrt(dist_mod) * (trial_stress_params[2] - stress_params[2]);
384  found_solution = true;
385  }
386  }
387  if (!found_solution && trial_compressive_yf > _f_tol &&
388  (trial_tensile_yf <= _f_tol || (trial_tensile_yf > _f_tol && mc_impossible)))
389  {
390  // try pure compressive failure
391  // Don't try this if there is tensile failure, since returning to
392  // the compressive yield surface will only make tensile failure worse
393  const Real ga = (trial_stress_params[0] + cs) / _Eij[0][0]; // this is negative
394  stress_params[0] = -cs;
395  stress_params[1] = trial_stress_params[1] - ga * _Eij[1][0];
396  stress_params[2] = trial_stress_params[2] - ga * _Eij[2][0];
397 
398  // if we have to return to the edge, or tip, do that
399  Real dist_mod = 1.0;
400  const Real to_add1 = -cs + 0.5 * _shifter - stress_params[1];
401  if (to_add1 > 0.0)
402  {
403  dist_mod += Utility::pow<2>(to_add1 / (trial_stress_params[0] + cs));
404  stress_params[1] += to_add1;
405  }
406  const Real to_add2 = -cs + _shifter - stress_params[2];
407  if (to_add2 > 0.0)
408  {
409  dist_mod += Utility::pow<2>(to_add2 / (trial_stress_params[0] + cs));
410  stress_params[2] += to_add2;
411  }
412  if (mc_impossible) // might have to shift down to the tensile yield surface
413  {
414  const Real to_subtract2 = stress_params[2] - ts;
415  if (to_subtract2 > 0.0)
416  {
417  dist_mod += Utility::pow<2>(to_subtract2 / (trial_stress_params[0] + cs));
418  stress_params[2] -= to_subtract2;
419  }
420  const Real to_subtract1 = stress_params[1] - (ts - 0.5 * _shifter);
421  if (to_subtract1 > 0.0)
422  {
423  dist_mod += Utility::pow<2>(to_subtract1 / (trial_stress_params[0] + cs));
424  stress_params[1] -= to_subtract1;
425  }
426  }
427 
428  const Real new_tensile_yf = stress_params[2] - ts;
429  const Real new_mc_yf = 0.5 * (stress_params[2] - stress_params[0]) +
430  0.5 * (stress_params[2] + stress_params[0]) * sinphi - cohcos;
431  if (new_mc_yf <= _f_tol && new_tensile_yf <= _f_tol)
432  {
433  gaE = std::sqrt(dist_mod) * (-trial_stress_params[0] + stress_params[0]);
434  found_solution = true;
435  }
436  }
437  if (!found_solution && !mc_impossible && trial_mc_yf > _f_tol)
438  {
439  // try pure shear failure, return to the plane
440  // This involves solving yf[6]=0 and the three flow-direction equations
441  const Real ga = ((trial_stress_params[2] - trial_stress_params[0]) +
442  (trial_stress_params[2] + trial_stress_params[0]) * sinphi - 2.0 * cohcos) /
443  (_Eij[2][2] - _Eij[0][2] + (_Eij[2][2] + _Eij[0][2]) * sinpsi * sinphi);
444  stress_params[2] =
445  trial_stress_params[2] - ga * (_Eij[2][2] * halfplus + _Eij[2][0] * neghalfplus);
446  stress_params[1] = trial_stress_params[1] - ga * _Eij[1][0] * sinpsi;
447  stress_params[0] =
448  trial_stress_params[0] - ga * (_Eij[0][0] * neghalfplus + _Eij[0][2] * halfplus);
449  const Real f7 = 0.5 * (stress_params[1] - stress_params[0]) +
450  0.5 * (stress_params[1] + stress_params[0]) * sinphi - cohcos;
451  const Real f8 = 0.5 * (stress_params[2] - stress_params[1]) +
452  0.5 * (stress_params[2] + stress_params[1]) * sinphi - cohcos;
453  const Real new_tensile_yf = stress_params[2] - ts;
454  const Real new_compressive_yf = -stress_params[0] - cs;
455 
456  if (f7 <= _f_tol && f8 <= _f_tol && new_tensile_yf <= _f_tol && new_compressive_yf <= _f_tol)
457  {
458  gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
459  (stress_params[2] - stress_params[0])) /
460  (_Eij[2][2] - _Eij[0][2]) * _Eij[2][2];
461  found_solution = true;
462  }
463  }
464  if (!found_solution && !mc_impossible && trial_mc_yf > _f_tol)
465  {
466  // Try return to the max=mid MC line.
467  // To return to the max=mid line, we need to solve f6 = 0 = f7 and
468  // the three flow-direction equations. In the flow-direction equations
469  // there are two plasticity multipliers, which i call ga6 and ga7,
470  // corresponding to the amounts of strain normal to the f6 and f7
471  // directions, respectively.
472  // So:
473  // Smax = Smax^trial - ga6 Emax,a dg6/dSa - ga7 Emax,a dg7/dSa
474  // = Smax^trial - ga6 cmax6 - ga7 cmax7 (with cmax6 and cmax7 evaluated below)
475  // Smid = Smid^trial - ga6 Emid,a dg6/dSa - ga7 Emid,a dg7/dSa
476  // = Smid^trial - ga6 cmid6 - ga7 cmid7
477  // Smin = Smin^trial - ga6 Emin,a dg6/dSa - ga7 Emin,a dg7/dSa
478  // = Smin^trial - ga6 cmin6 - ga7 cmin7
479  const Real cmax6 = _Eij[2][2] * halfplus + _Eij[2][0] * neghalfplus;
480  const Real cmax7 = _Eij[2][1] * halfplus + _Eij[2][0] * neghalfplus;
481  // const Real cmid6 = _Eij[1][2] * halfplus + _Eij[1][0] * neghalfplus;
482  // const Real cmid7 = _Eij[1][1] * halfplus + _Eij[1][0] * neghalfplus;
483  const Real cmin6 = _Eij[0][2] * halfplus + _Eij[0][0] * neghalfplus;
484  const Real cmin7 = _Eij[0][1] * halfplus + _Eij[0][0] * neghalfplus;
485  // Substituting these into f6 = 0 yields
486  // 0 = f6_trial - ga6 (0.5(cmax6 - cmin6) + 0.5(cmax6 + cmin6)sinphi) - ga7 (0.5(cmax6 -
487  // cmin6) + 0.5(cmax6 + cmin6)sinphi) = f6_trial - ga6 c6 - ga7 c7, where
488  const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
489  const Real c7 = 0.5 * (cmax7 - cmin7) + 0.5 * (cmax7 + cmin7) * sinphi;
490  // It isn't too hard to check that the other equation is
491  // 0 = f7_trial - ga6 c7 - ga7 c6
492  // These equations may be inverted to yield
493  if (c6 != c7)
494  {
495  const Real f6_trial = trial_mc_yf;
496  const Real f7_trial = 0.5 * (trial_stress_params[1] - trial_stress_params[0]) +
497  0.5 * (trial_stress_params[1] + trial_stress_params[0]) * sinphi -
498  cohcos;
499  const Real descr = Utility::pow<2>(c6) - Utility::pow<2>(c7);
500  Real ga6 = (c6 * f6_trial - c7 * f7_trial) / descr;
501  Real ga7 = (-c7 * f6_trial + c6 * f7_trial) / descr;
502  // and finally
503  stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga7 * cmax7;
504  stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga7 * cmin7;
505  stress_params[1] = stress_params[2] - 0.5 * _shifter;
506 
507  Real f8 = 0.5 * (stress_params[2] - stress_params[1]) +
508  0.5 * (stress_params[2] + stress_params[1]) * sinphi - cohcos;
509 
510  if (mc_tip_possible && f8 > _f_tol)
511  {
512  stress_params[2] = cohcos / sinphi;
513  stress_params[1] = stress_params[2] - 0.5 * _shifter;
514  stress_params[0] = stress_params[2] - _shifter;
515  f8 = 0.0;
516  ga6 = 1.0;
517  ga7 = 1.0;
518  }
519 
520  const Real new_tensile_yf = stress_params[2] - ts;
521  const Real new_compressive_yf = -stress_params[0] - cs;
522 
523  if (f8 <= _f_tol && new_tensile_yf <= _f_tol && new_compressive_yf <= _f_tol &&
524  ga6 >= 0.0 && ga7 >= 0.0)
525  {
526  gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
527  (stress_params[2] - stress_params[0])) /
528  (_Eij[2][2] - _Eij[0][2]) * _Eij[2][2];
529  found_solution = true;
530  }
531  }
532  }
533  if (!found_solution && !mc_impossible && trial_mc_yf > _f_tol)
534  {
535  // Try return to the mid=min line.
536  // To return to the mid=min line, we need to solve f6 = 0 = f8 and
537  // the three flow-direction equations. In the flow-direction equations
538  // there are two plasticity multipliers, which i call ga6 and ga8,
539  // corresponding to the amounts of strain normal to the f6 and f8
540  // directions, respectively.
541  // So:
542  // Smax = Smax^trial - ga6 Emax,a dg6/dSa - ga8 Emax,a dg8/dSa
543  // = Smax^trial - ga6 cmax6 - ga8 cmax8 (with cmax6 and cmax8 evaluated below)
544  // Smid = Smid^trial - ga6 Emid,a dg6/dSa - ga8 Emid,a dg8/dSa
545  // = Smid^trial - ga6 cmid6 - ga8 cmid8
546  // Smin = Smin^trial - ga6 Emin,a dg6/dSa - ga8 Emin,a dg8/dSa
547  // = Smin^trial - ga6 cmin6 - ga8 cmin8
548  const Real cmax6 = _Eij[2][2] * halfplus + _Eij[2][0] * neghalfplus;
549  const Real cmax8 = _Eij[2][2] * halfplus + _Eij[2][1] * neghalfplus;
550  // const Real cmid6 = _Eij[1][2] * halfplus + _Eij[1][0] * neghalfplus;
551  // const Real cmid8 = _Eij[1][2] * halfplus + _Eij[1][1] * neghalfplus;
552  const Real cmin6 = _Eij[0][2] * halfplus + _Eij[0][0] * neghalfplus;
553  const Real cmin8 = _Eij[0][2] * halfplus + _Eij[0][1] * neghalfplus;
554  // Substituting these into f6 = 0 yields
555  // 0 = f6_trial - ga6 (0.5(cmax6 - cmin6) + 0.5(cmax6 + cmin6)sinphi) - ga8 (0.5(cmax6 -
556  // cmin6) + 0.5(cmax6 + cmin6)sinphi) = f6_trial - ga6 c6 - ga8 c8, where
557  const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
558  const Real c8 = 0.5 * (cmax8 - cmin8) + 0.5 * (cmax8 + cmin8) * sinphi;
559  // It isn't too hard to check that the other equation is
560  // 0 = f8_trial - ga6 c8 - ga8 c6
561  // These equations may be inverted to yield
562  if (c6 != c8)
563  {
564  const Real f6_trial = trial_mc_yf;
565  const Real f8_trial = 0.5 * (trial_stress_params[2] - trial_stress_params[1]) +
566  0.5 * (trial_stress_params[2] + trial_stress_params[1]) * sinphi -
567  cohcos;
568  const Real descr = Utility::pow<2>(c6) - Utility::pow<2>(c8);
569  Real ga6 = (c6 * f6_trial - c8 * f8_trial) / descr;
570  Real ga8 = (-c8 * f6_trial + c6 * f8_trial) / descr;
571  // and finally
572  stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga8 * cmax8;
573  stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga8 * cmin8;
574  stress_params[1] = stress_params[0] + 0.5 * _shifter;
575 
576  Real f7 = 0.5 * (stress_params[1] - stress_params[0]) +
577  0.5 * (stress_params[1] + stress_params[0]) * sinphi - cohcos;
578 
579  if (mc_tip_possible && f7 > _f_tol)
580  {
581  stress_params[2] = cohcos / sinphi;
582  stress_params[1] = stress_params[2] - 0.5 * _shifter;
583  stress_params[0] = stress_params[2] - _shifter;
584  f7 = 0.0;
585  ga6 = 1.0;
586  ga8 = 1.0;
587  }
588 
589  const Real new_tensile_yf = stress_params[2] - ts;
590  const Real new_compressive_yf = -stress_params[0] - cs;
591 
592  if (f7 <= _f_tol && new_tensile_yf <= _f_tol && new_compressive_yf <= _f_tol &&
593  ga6 >= 0.0 && ga8 >= 0.0)
594  {
595  gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
596  (stress_params[2] - stress_params[0])) /
597  (_Eij[2][2] - _Eij[0][2]) * _Eij[2][2];
598  found_solution = true;
599  }
600  }
601  }
602  if (!found_solution && !mc_impossible && tensile_possible && trial_tensile_yf > _f_tol)
603  {
604  // Return to the line where yf[0] = 0 = yf[6].
605  // To return to this line, we need to solve f0 = 0 = f6 and
606  // the three flow-direction equations. In the flow-direction equations
607  // there are two plasticity multipliers, which i call ga0 and ga6
608  // corresponding to the amounts of strain normal to the f0 and f6
609  // directions, respectively.
610  // So:
611  // Smax = Smax^trial - ga6 Emax,a dg6/dSa - ga0 Emax,a dg0/dSa
612  // = Smax^trial - ga6 cmax6 - ga0 cmax0 (with cmax6 and cmax0 evaluated below)
613  // Smid = Smid^trial - ga6 Emid,a dg6/dSa - ga0 Emid,a dg0/dSa
614  // = Smid^trial - ga6 cmid6 - ga0 cmid0
615  // Smin = Smin^trial - ga6 Emin,a dg6/dSa - ga0 Emin,a dg0/dSa
616  // = Smin^trial - ga6 cmin6 - ga0 cmin0
617  const Real cmax6 = _Eij[2][2] * halfplus + _Eij[2][0] * neghalfplus;
618  const Real cmax0 = _Eij[2][2];
619  const Real cmid6 = _Eij[1][2] * halfplus + _Eij[1][0] * neghalfplus;
620  const Real cmid0 = _Eij[1][2];
621  const Real cmin6 = _Eij[0][2] * halfplus + _Eij[0][0] * neghalfplus;
622  const Real cmin0 = _Eij[0][2];
623  // Substituting these into f6 = 0 yields
624  // 0 = f6_trial - ga6 (0.5(cmax6 - cmin6) + 0.5(cmax6 + cmin6)sinphi) - ga0 (0.5(cmax0 -
625  // cmin0) + 0.5(cmax0 + cmin0)sinphi) = f6_trial - ga6 c6 - ga0 c0, where
626  const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
627  const Real c0 = 0.5 * (cmax0 - cmin0) + 0.5 * (cmax0 + cmin0) * sinphi;
628  // Substituting these into f0 = 0 yields
629  // 0 = f0_trial - ga6 cmax6 - ga0 cmax0
630  // These equations may be inverted to yield the following
631  const Real descr = c0 * cmax6 - c6 * cmax0;
632  if (descr != 0.0)
633  {
634  const Real ga0 = (-c6 * trial_tensile_yf + cmax6 * trial_mc_yf) / descr;
635  const Real ga6 = (c0 * trial_tensile_yf - cmax0 * trial_mc_yf) / descr;
636  stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga0 * cmax0;
637  stress_params[1] = trial_stress_params[1] - ga6 * cmid6 - ga0 * cmid0;
638  stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga0 * cmin0;
639 
640  // enforce physicality (go to corners if necessary)
641  stress_params[0] =
642  std::min(stress_params[0],
643  stress_params[2] - _shifter); // account for poor choice from user
644  // if goto_corner then the max(min()) in the subsequent line will force the solution to lie
645  // at the corner where max = mid = tensile. This means the signs of ga0 and ga6 become
646  // irrelevant in the check below
647  const bool goto_corner = (stress_params[1] >= stress_params[2] - 0.5 * _shifter);
648  stress_params[1] = std::max(std::min(stress_params[1], stress_params[2] - 0.5 * _shifter),
649  stress_params[0] + 0.5 * _shifter);
650 
651  const Real new_compressive_yf = -stress_params[0] - cs;
652  if (new_compressive_yf <= _f_tol &&
653  (goto_corner || (ga0 >= 0.0 && ga6 >= 0.0))) // enforce ga>=0 unless going to a corner
654  {
655  gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
656  (stress_params[2] - stress_params[0])) /
657  (_Eij[2][2] - _Eij[0][2]) * _Eij[2][2] +
658  (trial_stress_params[2] - stress_params[2]);
659  found_solution = true;
660  }
661  }
662  }
663  if (!found_solution && !mc_impossible)
664  {
665  // Return to the line where yf[3] = 0 = yf[6].
666  // To return to this line, we need to solve f3 = 0 = f6 and
667  // the three flow-direction equations. In the flow-direction equations
668  // there are two plasticity multipliers, which i call ga3 and ga6
669  // corresponding to the amounts of strain normal to the f3 and f6
670  // directions, respectively.
671  // So:
672  // Smax = Smax^trial - ga6 Emax,a dg6/dSa - ga3 Emax,a dg3/dSa
673  // = Smax^trial - ga6 cmax6 - ga3 cmax3 (with cmax6 and cmax3 evaluated below)
674  // Smid = Smid^trial - ga6 Emid,a dg6/dSa - ga3 Emid,a dg3/dSa
675  // = Smid^trial - ga6 cmid6 - ga3 cmid3
676  // Smin = Smin^trial - ga6 Emin,a dg6/dSa - ga3 Emin,a dg3/dSa
677  // = Smin^trial - ga6 cmin6 - ga3 cmin3
678  const Real cmax6 = _Eij[2][2] * halfplus + _Eij[2][0] * neghalfplus;
679  const Real cmax3 = -_Eij[2][0];
680  const Real cmid6 = _Eij[1][2] * halfplus + _Eij[1][0] * neghalfplus;
681  const Real cmid3 = -_Eij[1][0];
682  const Real cmin6 = _Eij[0][2] * halfplus + _Eij[0][0] * neghalfplus;
683  const Real cmin3 = -_Eij[0][0];
684  // Substituting these into f6 = 0 yields
685  // 0 = f6_trial - ga6 (0.5(cmax6 - cmin6) + 0.5(cmax6 + cmin6)sinphi) - ga3 (0.5(cmax3 -
686  // cmin3) + 0.5(cmax3 + cmin3)sinphi) = f6_trial - ga6 c6 - ga3 c3, where
687  const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
688  const Real c3 = 0.5 * (cmax3 - cmin3) + 0.5 * (cmax3 + cmin3) * sinphi;
689  // Substituting these into f3 = 0 yields
690  // 0 = - f3_trial - ga6 cmin6 - ga3 cmin3
691  // These equations may be inverted to yield the following
692  const Real descr = c3 * cmin6 - c6 * cmin3;
693  if (descr != 0.0)
694  {
695  const Real ga3 = (c6 * trial_compressive_yf + cmin6 * trial_mc_yf) / descr;
696  const Real ga6 = (-c3 * trial_compressive_yf - cmin3 * trial_mc_yf) / descr;
697  stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga3 * cmax3;
698  stress_params[1] = trial_stress_params[1] - ga6 * cmid6 - ga3 * cmid3;
699  stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga3 * cmin3;
700 
701  const Real new_tensile_yf = stress_params[2] - ts;
702  stress_params[2] =
703  std::max(stress_params[2],
704  stress_params[0] + _shifter); // account for poor choice from user
705  stress_params[1] = std::max(std::min(stress_params[1], stress_params[2] - 0.5 * _shifter),
706  stress_params[0] + 0.5 * _shifter);
707 
708  if (new_tensile_yf <= _f_tol && ga6 >= 0.0)
709  {
710  gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
711  (stress_params[2] - stress_params[0])) /
712  (_Eij[2][2] - _Eij[0][2]) * _Eij[2][2] +
713  (-trial_stress_params[0] - stress_params[0]);
714 
715  found_solution = true;
716  }
717  }
718  }
719  if (!found_solution)
720  {
721  // Cannot find an acceptable initialisation
722  for (unsigned i = 0; i < _num_sp; ++i)
723  stress_params[i] = trial_stress_params[i];
724  gaE = 0.0;
725  mooseWarning("CappedMohrCoulombStressUpdate cannot initialize from max = ",
726  stress_params[2],
727  " mid = ",
728  stress_params[1],
729  " min = ",
730  stress_params[0]);
731  }
732  }
733  setIntnlValuesV(trial_stress_params, stress_params, intnl_old, intnl);
734 }
const SolidMechanicsHardeningModel & _phi
Hardening model for friction angle.
const bool _perfect_guess
Whether to provide an estimate of the returned stress, based on perfect plasticity.
const SolidMechanicsHardeningModel & _tensile_strength
Hardening model for tensile strength.
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
virtual Real value(Real intnl) const
void mooseWarning(Args &&... args) const
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
const Real _f_tol
The yield-function tolerance.
void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const override
Sets the internal parameters based on the trial values of stress_params, their current values...
const Real _shifter
When equal-eigenvalues are predicted from the stress initialization routine, shift them by this amoun...
const SolidMechanicsHardeningModel & _compressive_strength
Hardening model for compressive strength.
const SolidMechanicsHardeningModel & _cohesion
Hardening model for cohesion.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const SolidMechanicsHardeningModel & _psi
Hardening model for dilation angle.
const unsigned _num_sp
Number of stress parameters.

◆ initQpStatefulProperties()

void MultiParameterPlasticityStressUpdate::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented from Material.

Reimplemented in CappedWeakInclinedPlaneStressUpdate.

Definition at line 139 of file MultiParameterPlasticityStressUpdate.C.

Referenced by CappedWeakInclinedPlaneStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

140 {
141  _plastic_strain[_qp].zero();
142  _intnl[_qp].assign(_num_intnl, 0);
143  _yf[_qp].assign(_num_yf, 0);
144  _iter[_qp] = 0.0;
145  _max_iter_used[_qp] = 0.0;
146  _linesearch_needed[_qp] = 0.0;
147 }
MaterialProperty< std::vector< Real > > & _yf
yield functions
const unsigned _num_intnl
Number of internal parameters.
MaterialProperty< std::vector< Real > > & _intnl
internal parameters
unsigned int _qp
const unsigned _num_yf
Number of yield functions.
MaterialProperty< Real > & _iter
Number of Newton-Raphson iterations used in the return-map.
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
MaterialProperty< Real > & _linesearch_needed
Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise) ...
MaterialProperty< Real > & _max_iter_used
Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire si...

◆ isIsotropic()

bool CappedMohrCoulombStressUpdate::isIsotropic ( )
inlineoverridevirtual

Is the implmented model isotropic? The safe default is 'false'.

Reimplemented from StressUpdateBaseTempl< is_ad, R2, R4 >.

Definition at line 31 of file CappedMohrCoulombStressUpdate.h.

31 { return true; };

◆ ismoother()

Real MultiParameterPlasticityStressUpdate::ismoother ( Real  f_diff) const
protectedinherited

Smooths yield functions.

The returned value must be zero if abs(f_diff) >= _smoothing_tol and otherwise must satisfy, over -_smoothing_tol <= f_diff <= _smoothing_tol: (1) C2 (2) zero at f_diff = +/- _smoothing_tol (3) derivative is +/-0.5 at f_diff = +/- _smoothing_tol (4) derivative must be in [-0.5, 0.5] (5) second derivative is zero at f_diff = +/- _smoothing_tol (6) second derivative must be non-negative in order to ensure C2 differentiability and convexity of the smoothed yield surface.

Definition at line 482 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities(), and MultiParameterPlasticityStressUpdate::yieldF().

483 {
484  if (std::abs(f_diff) >= _smoothing_tol)
485  return 0.0;
486  switch (_smoother_function_type)
487  {
489  return -_smoothing_tol / M_PI * std::cos(0.5 * M_PI * f_diff / _smoothing_tol);
491  return 0.75 / _smoothing_tol *
492  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
493  (_smoothing_tol2 / 12.0) * (Utility::pow<4>(f_diff / _smoothing_tol) - 1.0));
495  return 0.625 / _smoothing_tol *
496  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
497  (_smoothing_tol2 / 30.0) * (Utility::pow<6>(f_diff / _smoothing_tol) - 1.0));
499  return (7.0 / 12.0 / _smoothing_tol) *
500  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
501  (_smoothing_tol2 / 56.0) * (Utility::pow<8>(f_diff / _smoothing_tol) - 1.0));
502  default:
503  return 0.0;
504  }
505 }
const Real _smoothing_tol2
Square of the smoothing tolerance.
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.

◆ lineSearch()

int MultiParameterPlasticityStressUpdate::lineSearch ( Real res2,
std::vector< Real > &  stress_params,
Real gaE,
const std::vector< Real > &  trial_stress_params,
yieldAndFlow smoothed_q,
const std::vector< Real > &  intnl_ok,
std::vector< Real > &  intnl,
std::vector< Real > &  rhs,
Real linesearch_needed 
) const
protectedinherited

Performs a line-search to find stress_params and gaE Upon entry:

  • rhs contains the solution to the Newton-Raphson (ie nrStep should have been called). If a full Newton step is used then stress_params[:] += rhs[0:_num_sp-1] and gaE += rhs[_num_sp]
  • res2 contains the residual-squared before applying any of solution
  • stress_params contains the stress_params before applying any of the solution
  • gaE contains gaE before applying any of the solution (that is contained in rhs) Upon exit:
  • stress_params will be the stress_params after applying the solution
  • gaE will be the stress_params after applying the solution
  • rhs will contain the updated rhs values (after applying the solution) ready for the next Newton-Raphson step,
  • res2 will be the residual-squared after applying the solution
  • intnl will contain the internal variables corresponding to the return from trial_stress_params to stress_params (and starting from intnl_ok)
  • linesearch_needed will be 1.0 if a linesearch was needed
  • smoothed_q will contain the value of the yield function and its derivatives, etc, at (stress_params, intnl)
    Parameters
    res2[in,out]the residual-squared, both as an input and output
    stress_params[in,out]Upon input the value of the stress_params before the current Newton-Raphson process was initiated. Upon exit this will hold the values coming from the line search.
    trial_stress_params[in]Trial value for the stress_params for this (sub)strain increment
    gaE[in,out]Upon input the value of gaE before the current Newton-Raphson iteration was initiated. Upon exit this will hold the value coming from the line-search
    smoothed_q[in,out]Upon input, the value of the smoothed yield function and derivatives at the prior-to-Newton configuration. Upon exit this is evaluated at the new (stress_params, intnl)
    intnl_ok[in]The value of the internal parameters from the start of this (sub)strain increment
    intnl[in,out]The value of the internal parameters after the line-search has converged
    rhs[in,out]Upon entry this contains the solution to the Newton-Raphson. Upon exit this contains the updated rhs values
    Returns
    0 if successful, 1 otherwise

Definition at line 551 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

560 {
561  const Real res2_old = res2;
562  const std::vector<Real> sp_params_old = stress_params;
563  const Real gaE_old = gaE;
564  const std::vector<Real> delta_nr_params = rhs;
565 
566  Real lam = 1.0; // line-search parameter
567  const Real lam_min = 1E-10; // minimum value of lam allowed
568  const Real slope = -2.0 * res2_old; // "Numerical Recipes" uses -b*A*x, in order to check for
569  // roundoff, but i hope the nrStep would warn if there were
570  // problems
571  Real tmp_lam; // cached value of lam used in quadratic & cubic line search
572  Real f2 = res2_old; // cached value of f = residual2 used in the cubic in the line search
573  Real lam2 = lam; // cached value of lam used in the cubic in the line search
574 
575  while (true)
576  {
577  // update variables using the current line-search parameter
578  for (unsigned i = 0; i < _num_sp; ++i)
579  stress_params[i] = sp_params_old[i] + lam * delta_nr_params[i];
580  gaE = gaE_old + lam * delta_nr_params[_num_sp];
581 
582  // and internal parameters
583  setIntnlValuesV(trial_stress_params, stress_params, intnl_ok, intnl);
584 
585  smoothed_q = smoothAllQuantities(stress_params, intnl);
586 
587  // update rhs for next-time through
588  calculateRHS(trial_stress_params, stress_params, gaE, smoothed_q, rhs);
589  res2 = calculateRes2(rhs);
590 
591  // do the line-search
592  if (res2 < res2_old + 1E-4 * lam * slope)
593  break;
594  else if (lam < lam_min)
595  return 1;
596  else if (lam == 1.0)
597  {
598  // model as a quadratic
599  tmp_lam = -0.5 * slope / (res2 - res2_old - slope);
600  }
601  else
602  {
603  // model as a cubic
604  const Real rhs1 = res2 - res2_old - lam * slope;
605  const Real rhs2 = f2 - res2_old - lam2 * slope;
606  const Real a = (rhs1 / Utility::pow<2>(lam) - rhs2 / Utility::pow<2>(lam2)) / (lam - lam2);
607  const Real b =
608  (-lam2 * rhs1 / Utility::pow<2>(lam) + lam * rhs2 / Utility::pow<2>(lam2)) / (lam - lam2);
609  if (a == 0.0)
610  tmp_lam = -slope / (2.0 * b);
611  else
612  {
613  const Real disc = Utility::pow<2>(b) - 3.0 * a * slope;
614  if (disc < 0)
615  tmp_lam = 0.5 * lam;
616  else if (b <= 0)
617  tmp_lam = (-b + std::sqrt(disc)) / (3.0 * a);
618  else
619  tmp_lam = -slope / (b + std::sqrt(disc));
620  }
621  if (tmp_lam > 0.5 * lam)
622  tmp_lam = 0.5 * lam;
623  }
624  lam2 = lam;
625  f2 = res2;
626  lam = std::max(tmp_lam, 0.1 * lam);
627  }
628 
629  if (lam < 1.0)
630  linesearch_needed = 1.0;
631  return 0;
632 }
virtual void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of stress_params, their current values...
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
void calculateRHS(const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[...
yieldAndFlow smoothAllQuantities(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Calculates all yield functions and derivatives, and then performs the smoothing scheme.
Real calculateRes2(const std::vector< Real > &rhs) const
Calculates the residual-squared for the Newton-Raphson + line-search.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned _num_sp
Number of stress parameters.

◆ nrStep()

int MultiParameterPlasticityStressUpdate::nrStep ( const yieldAndFlow smoothed_q,
const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
Real  gaE,
std::vector< Real > &  rhs 
) const
protectedinherited

Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution.

Parameters
smoothed_q[in]The value of the smoothed yield function and derivatives prior to this Newton-Raphson step
trial_stress_params[in]Trial value for the stress_params for this (sub)strain increment
stress_params[in]The current value of the stress_params
intnl[in]The current value of the internal parameters
gaE[in]The current value of gaE
rhs[in,out]Upon entry, the rhs to zero using Newton-Raphson. Upon exit, the solution to the Newton-Raphson problem
Returns
0 if successful, 1 otherwise

Definition at line 635 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

641 {
642  std::vector<std::vector<Real>> dintnl(_num_intnl, std::vector<Real>(_num_sp));
643  setIntnlDerivativesV(trial_stress_params, stress_params, intnl, dintnl);
644 
645  std::vector<double> jac((_num_sp + 1) * (_num_sp + 1));
646  dnRHSdVar(smoothed_q, dintnl, stress_params, gaE, jac);
647 
648  // use LAPACK to solve the linear system
649  const PetscBLASInt nrhs = 1;
650  std::vector<PetscBLASInt> ipiv(_num_sp + 1);
651  PetscBLASInt info;
652  const PetscBLASInt gesv_num_rhs = _num_sp + 1;
653  LAPACKgesv_(
654  &gesv_num_rhs, &nrhs, &jac[0], &gesv_num_rhs, &ipiv[0], &rhs[0], &gesv_num_rhs, &info);
655  return info;
656 }
void dnRHSdVar(const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving ...
MPI_Info info
const unsigned _num_intnl
Number of internal parameters.
virtual void setIntnlDerivativesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.
const unsigned _num_sp
Number of stress parameters.

◆ precisionLoss()

bool MultiParameterPlasticityStressUpdate::precisionLoss ( const std::vector< Real > &  solution,
const std::vector< Real > &  stress_params,
Real  gaE 
) const
protectedinherited

Check whether precision loss has occurred.

Parameters
[in]solutionThe solution to the Newton-Raphson system
[in]stress_paramsThe currect values of the stress_params for this (sub)strain increment
[in]gaEThe currenct value of gaE for this (sub)strain increment
Returns
true if precision loss has occurred

Definition at line 981 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

984 {
985  if (std::abs(solution[_num_sp]) > 1E-13 * std::abs(gaE))
986  return false;
987  for (unsigned i = 0; i < _num_sp; ++i)
988  if (std::abs(solution[i]) > 1E-13 * std::abs(stress_params[i]))
989  return false;
990  return true;
991 }
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
const unsigned _num_sp
Number of stress parameters.

◆ preReturnMapV()

void CappedMohrCoulombStressUpdate::preReturnMapV ( const std::vector< Real > &  trial_stress_params,
const RankTwoTensor stress_trial,
const std::vector< Real > &  intnl_old,
const std::vector< Real > &  yf,
const RankFourTensor Eijkl 
)
overrideprotectedvirtual

Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm.

We know that (trial_stress_params, intnl_old) is inadmissible when this is called

Parameters
trial_stress_params[in]The trial values of the stress parameters
stress_trial[in]Trial stress tensor
intnl_old[in]Old value of the internal parameters.
yf[in]The yield functions at (p_trial, q_trial, intnl_old)
Eijkl[in]The elasticity tensor

Reimplemented from MultiParameterPlasticityStressUpdate.

Reimplemented in CappedMohrCoulombCosseratStressUpdate.

Definition at line 94 of file CappedMohrCoulombStressUpdate.C.

99 {
100  std::vector<Real> eigvals;
101  stress_trial.symmetricEigenvaluesEigenvectors(eigvals, _eigvecs);
103 }
T getIsotropicPoissonsRatio(const RankFourTensorTempl< T > &elasticity_tensor)
Get the Poisson&#39;s modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must...
void symmetricEigenvaluesEigenvectors(std::vector< Real > &eigvals, RankTwoTensorTempl< Real > &eigvecs) const
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...

◆ propagateQpStatefulProperties()

void MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties ( )
overrideprotectedvirtualinherited

If updateState is not called during a timestep, this will be.

This method allows derived classes to set internal parameters from their Old values, for instance

Reimplemented from StressUpdateBaseTempl< is_ad, R2, R4 >.

Definition at line 150 of file MultiParameterPlasticityStressUpdate.C.

151 {
153  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _intnl[_qp].begin());
155 }
MaterialProperty< std::vector< Real > > & _intnl
internal parameters
unsigned int _qp
const MaterialProperty< std::vector< Real > > & _intnl_old
old values of internal parameters
const MaterialProperty< Real > & _max_iter_used_old
Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of ...
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
MaterialProperty< Real > & _max_iter_used
Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire si...
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
Old value of plastic strain.

◆ requiresIsotropicTensor()

bool CappedMohrCoulombStressUpdate::requiresIsotropicTensor ( )
inlineoverridevirtual

Does the model require the elasticity tensor to be isotropic?

Implements StressUpdateBaseTempl< is_ad, R2, R4 >.

Definition at line 29 of file CappedMohrCoulombStressUpdate.h.

29 { return true; }

◆ resetIncrementalMaterialProperties()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual void StressUpdateBaseTempl< is_ad, R2, R4 >::resetIncrementalMaterialProperties ( )
inlinevirtualinherited

Reset material properties.

Useful for substepping with inelastic models.

Reimplemented in PowerLawCreepStressUpdateTempl< is_ad >, and LAROMANCEStressUpdateBaseTempl< is_ad >.

Definition at line 172 of file StressUpdateBase.h.

172 {};

◆ resetProperties()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
void StressUpdateBaseTempl< is_ad, R2, R4 >::resetProperties ( )
inlinefinalvirtualinherited

Reimplemented from Material.

Definition at line 138 of file StressUpdateBase.h.

138 {}

◆ resetQpProperties()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
void StressUpdateBaseTempl< is_ad, R2, R4 >::resetQpProperties ( )
inlinefinalvirtualinherited

Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten.

Reimplemented from Material.

Definition at line 137 of file StressUpdateBase.h.

137 {}

◆ setEffectiveElasticity()

void CappedMohrCoulombStressUpdate::setEffectiveElasticity ( const RankFourTensor Eijkl)
overrideprotectedvirtual

Sets _Eij and _En and _Cij.

Implements MultiParameterPlasticityStressUpdate.

Definition at line 247 of file CappedMohrCoulombStressUpdate.C.

248 {
249  // Eijkl is required to be isotropic, so we can use the
250  // frame where stress is diagonal
251  for (unsigned a = 0; a < _num_sp; ++a)
252  for (unsigned b = 0; b < _num_sp; ++b)
253  _Eij[a][b] = Eijkl(a, a, b, b);
254  _En = _Eij[2][2];
255  const Real denom = _Eij[0][0] * (_Eij[0][0] + _Eij[0][1]) - 2 * Utility::pow<2>(_Eij[0][1]);
256  for (unsigned a = 0; a < _num_sp; ++a)
257  {
258  _Cij[a][a] = (_Eij[0][0] + _Eij[0][1]) / denom;
259  for (unsigned b = 0; b < a; ++b)
260  _Cij[a][b] = _Cij[b][a] = -_Eij[0][1] / denom;
261  }
262 }
std::vector< std::vector< Real > > _Cij
_Cij[i, j] * _Eij[j, k] = 1 iff j == k
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned _num_sp
Number of stress parameters.

◆ setInelasticStrainIncrementAfterReturn()

void MultiParameterPlasticityStressUpdate::setInelasticStrainIncrementAfterReturn ( const RankTwoTensor stress_trial,
Real  gaE,
const yieldAndFlow smoothed_q,
const RankFourTensor elasticity_tensor,
const RankTwoTensor returned_stress,
RankTwoTensor inelastic_strain_increment 
) const
protectedvirtualinherited

Sets inelastic strain increment from the returned configuration This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called.

Derived classes may override this function

Parameters
stress_trial[in]The trial value of stress
gaE[in]The value of gaE after the return-map process has completed successfully
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the returned configuration
elasticity_tensor[in]The elasticity tensor
returned_stress[in]The stress after the return-map process
inelastic_strain_increment[out]The inelastic strain increment resulting from this return-map

Reimplemented in TwoParameterPlasticityStressUpdate.

Definition at line 784 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

791 {
792  const std::vector<RankTwoTensor> dsp_dstress = dstress_param_dstress(returned_stress);
793  inelastic_strain_increment = RankTwoTensor();
794  for (unsigned i = 0; i < _num_sp; ++i)
795  inelastic_strain_increment += smoothed_q.dg[i] * dsp_dstress[i];
796  inelastic_strain_increment *= gaE / _En;
797 }
virtual std::vector< RankTwoTensor > dstress_param_dstress(const RankTwoTensor &stress) const =0
d(stress_param[i])/d(stress) at given stress
const unsigned _num_sp
Number of stress parameters.

◆ setIntnlDerivativesV()

void CappedMohrCoulombStressUpdate::setIntnlDerivativesV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  current_stress_params,
const std::vector< Real > &  intnl,
std::vector< std::vector< Real >> &  dintnl 
) const
overrideprotectedvirtual

Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.

Derived classes must override this.

Parameters
trial_stress_params[in]The trial stress parameters
current_stress_params[in]The current stress parameters
intnl[in]The current value of the internal parameters
dintnl[out]The derivatives dintnl[i][j] = d(intnl[i])/d(stress_param j)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 759 of file CappedMohrCoulombStressUpdate.C.

763 {
764  // intnl[0] = shear, intnl[1] = tensile
765  const Real smax = current_stress_params[2]; // largest eigenvalue
766  const Real smin = current_stress_params[0]; // smallest eigenvalue
767  const Real trial_smax = trial_stress_params[2]; // largest eigenvalue
768  const Real trial_smin = trial_stress_params[0]; // smallest eigenvalue
769  const Real ga_shear = ((trial_smax - trial_smin) - (smax - smin)) / (_Eij[2][2] - _Eij[0][2]);
770  const std::vector<Real> dga_shear = {
771  1.0 / (_Eij[2][2] - _Eij[0][2]), 0.0, -1.0 / (_Eij[2][2] - _Eij[0][2])};
772  // intnl[0] = intnl_old[0] + ga_shear;
773  for (std::size_t i = 0; i < _num_sp; ++i)
774  dintnl[0][i] = dga_shear[i];
775 
776  const Real sinpsi = std::sin(_psi.value(intnl[0]));
777  const Real dsinpsi_di0 = _psi.derivative(intnl[0]) * std::cos(_psi.value(intnl[0]));
778 
779  const Real prefactor = (_Eij[2][2] + _Eij[0][2]) * sinpsi;
780  const Real dprefactor_di0 = (_Eij[2][2] + _Eij[0][2]) * dsinpsi_di0;
781  // const Real shear_correction = prefactor * ga_shear;
782  std::vector<Real> dshear_correction(_num_sp);
783  for (std::size_t i = 0; i < _num_sp; ++i)
784  dshear_correction[i] = prefactor * dga_shear[i] + dprefactor_di0 * dintnl[0][i] * ga_shear;
785  // const Real ga_tensile = (1 - _poissons_ratio) * ((trial_smax + trial_smin) - (smax + smin) -
786  // shear_correction) /
787  // _Eij[2][2];
788  // intnl[1] = intnl_old[1] + ga_tensile;
789  for (std::size_t i = 0; i < _num_sp; ++i)
790  dintnl[1][i] = -(1.0 - _poissons_ratio) * dshear_correction[i] / _Eij[2][2];
791  dintnl[1][2] += -(1.0 - _poissons_ratio) / _Eij[2][2];
792  dintnl[1][0] += -(1.0 - _poissons_ratio) / _Eij[2][2];
793 }
virtual Real value(Real intnl) const
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
virtual Real derivative(Real intnl) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const SolidMechanicsHardeningModel & _psi
Hardening model for dilation angle.
const unsigned _num_sp
Number of stress parameters.

◆ setIntnlValuesV()

void CappedMohrCoulombStressUpdate::setIntnlValuesV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  current_stress_params,
const std::vector< Real > &  intnl_old,
std::vector< Real > &  intnl 
) const
overrideprotectedvirtual

Sets the internal parameters based on the trial values of stress_params, their current values, and the old values of the internal parameters.

Derived classes must override this.

Parameters
trial_stress_params[in]The trial stress parameters (eg trial_p and trial_q)
current_stress_params[in]The current stress parameters (eg p and q)
intnl_old[out]Old value of internal parameters
intnl[out]The value of internal parameters to be set

Implements MultiParameterPlasticityStressUpdate.

Definition at line 737 of file CappedMohrCoulombStressUpdate.C.

Referenced by initializeVarsV().

741 {
742  // intnl[0] = shear, intnl[1] = tensile
743  const Real smax = current_stress_params[2]; // largest eigenvalue
744  const Real smin = current_stress_params[0]; // smallest eigenvalue
745  const Real trial_smax = trial_stress_params[2]; // largest eigenvalue
746  const Real trial_smin = trial_stress_params[0]; // smallest eigenvalue
747  const Real ga_shear = ((trial_smax - trial_smin) - (smax - smin)) / (_Eij[2][2] - _Eij[0][2]);
748  intnl[0] = intnl_old[0] + ga_shear;
749  const Real sinpsi = std::sin(_psi.value(intnl[0]));
750  const Real prefactor = (_Eij[2][2] + _Eij[0][2]) * sinpsi;
751  const Real shear_correction = prefactor * ga_shear;
752  const Real ga_tensile = (1.0 - _poissons_ratio) *
753  ((trial_smax + trial_smin) - (smax + smin) - shear_correction) /
754  _Eij[2][2];
755  intnl[1] = intnl_old[1] + ga_tensile;
756 }
virtual Real value(Real intnl) const
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const SolidMechanicsHardeningModel & _psi
Hardening model for dilation angle.

◆ setQp()

template<bool is_ad, typename R2 , typename R4 >
void StressUpdateBaseTempl< is_ad, R2, R4 >::setQp ( unsigned int  qp)
inherited

Sets the value of the global variable _qp for inheriting classes.

Definition at line 46 of file StressUpdateBase.C.

Referenced by ComputeCreepPlasticityStress::updateQpState().

47 {
48  _qp = qp;
49 }
unsigned int _qp

◆ setStressAfterReturnV()

void CappedMohrCoulombStressUpdate::setStressAfterReturnV ( const RankTwoTensor stress_trial,
const std::vector< Real > &  stress_params,
Real  gaE,
const std::vector< Real > &  intnl,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
RankTwoTensor stress 
) const
overrideprotectedvirtual

Sets stress from the admissible parameters.

This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called. Derived classes must override this function

Parameters
stress_trial[in]The trial value of stress
stress_params[in]The value of the stress_params after the return-map process has completed successfully
gaE[in]The value of gaE after the return-map process has completed successfully
intnl[in]The value of the internal parameters after the return-map process has completed successfully
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the returned state
Eijkl[in]The elasticity tensor
stress[out]The returned value of the stress tensor

Implements MultiParameterPlasticityStressUpdate.

Reimplemented in CappedMohrCoulombCosseratStressUpdate.

Definition at line 106 of file CappedMohrCoulombStressUpdate.C.

113 {
114  // form the diagonal stress
115  stress = RankTwoTensor(stress_params[0], stress_params[1], stress_params[2], 0.0, 0.0, 0.0);
116  // rotate to the original frame
117  stress = _eigvecs * stress * (_eigvecs.transpose());
118 }
RankTwoTensorTempl< Real > transpose() const
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...

◆ smoothAllQuantities()

MultiParameterPlasticityStressUpdate::yieldAndFlow MultiParameterPlasticityStressUpdate::smoothAllQuantities ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl 
) const
protectedinherited

Calculates all yield functions and derivatives, and then performs the smoothing scheme.

Parameters
stress_params[in]The stress parameters (eg stress_params[0] = stress_zz and stress_params[1] = sqrt(stress_zx^2 + stress_zy^2))
intnl[in]Internal parameters
Returns
The smoothed yield function and derivatives

Definition at line 398 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

400 {
401  std::vector<yieldAndFlow> all_q(_num_yf, yieldAndFlow(_num_sp, _num_intnl));
402  computeAllQV(stress_params, intnl, all_q);
403 
404  /* This routine holds the key to my smoothing strategy. It
405  * may be proved that this smoothing strategy produces a
406  * yield surface that is both C2 differentiable and convex,
407  * assuming the individual yield functions are C2 and
408  * convex too.
409  * Of course all the derivatives must also be smoothed.
410  * Also, I assume that d(flow potential)/dstress gets smoothed
411  * by the Yield Function (which produces a C2 flow potential).
412  * See the line identified in the loop below.
413  * Only time will tell whether this is a good strategy, but it
414  * works well in all tests so far. Convexity is irrelevant
415  * for the non-associated case, but at least the return-map
416  * problem should always have a unique solution.
417  * For two yield functions+flows, labelled 1 and 2, we
418  * should have
419  * d(g1 - g2) . d(f1 - f2) >= 0
420  * If not then the return-map problem for even the
421  * multi-surface plasticity with no smoothing won't have a
422  * unique solution. If the multi-surface plasticity has
423  * a unique solution then the smoothed version defined
424  * below will too.
425  */
426 
427  // res_f is the index that contains the smoothed yieldAndFlow
428  std::size_t res_f = 0;
429 
430  for (std::size_t a = 1; a < all_q.size(); ++a)
431  {
432  if (all_q[res_f].f >= all_q[a].f + _smoothing_tol)
433  // no smoothing is needed: res_f is already indexes the largest yield function
434  continue;
435  else if (all_q[a].f >= all_q[res_f].f + _smoothing_tol)
436  {
437  // no smoothing is needed, and res_f needs to index to all_q[a]
438  res_f = a;
439  continue;
440  }
441  else
442  {
443  // smoothing is required
444  const Real f_diff = all_q[res_f].f - all_q[a].f;
445  const Real ism = ismoother(f_diff);
446  const Real sm = smoother(f_diff);
447  const Real dsm = dsmoother(f_diff);
448  // we want: all_q[res_f].f = 0.5 * all_q[res_f].f + all_q[a].f + _smoothing_tol) + ism,
449  // but we have to do the derivatives first
450  for (unsigned i = 0; i < _num_sp; ++i)
451  {
452  for (unsigned j = 0; j < _num_sp; ++j)
453  all_q[res_f].d2g[i][j] =
454  0.5 * (all_q[res_f].d2g[i][j] + all_q[a].d2g[i][j]) +
455  dsm * (all_q[res_f].df[j] - all_q[a].df[j]) * (all_q[res_f].dg[i] - all_q[a].dg[i]) +
456  sm * (all_q[res_f].d2g[i][j] - all_q[a].d2g[i][j]);
457  for (unsigned j = 0; j < _num_intnl; ++j)
458  all_q[res_f].d2g_di[i][j] = 0.5 * (all_q[res_f].d2g_di[i][j] + all_q[a].d2g_di[i][j]) +
459  dsm * (all_q[res_f].df_di[j] - all_q[a].df_di[j]) *
460  (all_q[res_f].dg[i] - all_q[a].dg[i]) +
461  sm * (all_q[res_f].d2g_di[i][j] - all_q[a].d2g_di[i][j]);
462  }
463  for (unsigned i = 0; i < _num_sp; ++i)
464  {
465  all_q[res_f].df[i] = 0.5 * (all_q[res_f].df[i] + all_q[a].df[i]) +
466  sm * (all_q[res_f].df[i] - all_q[a].df[i]);
467  // whether the following (smoothing g with f's smoother) is a good strategy remains to be
468  // seen...
469  all_q[res_f].dg[i] = 0.5 * (all_q[res_f].dg[i] + all_q[a].dg[i]) +
470  sm * (all_q[res_f].dg[i] - all_q[a].dg[i]);
471  }
472  for (unsigned i = 0; i < _num_intnl; ++i)
473  all_q[res_f].df_di[i] = 0.5 * (all_q[res_f].df_di[i] + all_q[a].df_di[i]) +
474  sm * (all_q[res_f].df_di[i] - all_q[a].df_di[i]);
475  all_q[res_f].f = 0.5 * (all_q[res_f].f + all_q[a].f + _smoothing_tol) + ism;
476  }
477  }
478  return all_q[res_f];
479 }
const unsigned _num_intnl
Number of internal parameters.
Real smoother(Real f_diff) const
Derivative of ismoother.
const unsigned _num_yf
Number of yield functions.
virtual void computeAllQV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
Completely fills all_q with correct values.
Real f(Real x)
Test function for Brents method.
Real dsmoother(Real f_diff) const
Derivative of smoother.
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const unsigned _num_sp
Number of stress parameters.
Real ismoother(Real f_diff) const
Smooths yield functions.

◆ smoother()

Real MultiParameterPlasticityStressUpdate::smoother ( Real  f_diff) const
protectedinherited

Derivative of ismoother.

Definition at line 508 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities().

509 {
510  if (std::abs(f_diff) >= _smoothing_tol)
511  return 0.0;
512  switch (_smoother_function_type)
513  {
515  return 0.5 * std::sin(f_diff * M_PI * 0.5 / _smoothing_tol);
517  return 0.75 / _smoothing_tol *
518  (f_diff - (_smoothing_tol / 3.0) * Utility::pow<3>(f_diff / _smoothing_tol));
520  return 0.625 / _smoothing_tol *
521  (f_diff - (_smoothing_tol / 5.0) * Utility::pow<5>(f_diff / _smoothing_tol));
523  return (7.0 / 12.0 / _smoothing_tol) *
524  (f_diff - (_smoothing_tol / 7.0) * Utility::pow<7>(f_diff / _smoothing_tol));
525  default:
526  return 0.0;
527  }
528 }
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.

◆ storeIncrementalMaterialProperties()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual void StressUpdateBaseTempl< is_ad, R2, R4 >::storeIncrementalMaterialProperties ( const unsigned  int)
inlinevirtualinherited

Properly set up the incremental calculation storage of the stateful material properties in the inheriting classes.

Reimplemented in LAROMANCEStressUpdateBaseTempl< is_ad >.

Definition at line 167 of file StressUpdateBase.h.

167 {};

◆ substeppingCapabilityEnabled()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual bool StressUpdateBaseTempl< is_ad, R2, R4 >::substeppingCapabilityEnabled ( )
inlinevirtualinherited

Does the model include the infrastructure for substep decomposition of the elastic strain initially used to calculate the trial stress guess Inheriting classes which wish to use the substepping capability should overwrite this method and set it to return true.

Reimplemented in ADMultiplePowerLawCreepStressUpdate, PowerLawCreepStressUpdateTempl< is_ad >, and LAROMANCEStressUpdateBaseTempl< is_ad >.

Definition at line 147 of file StressUpdateBase.h.

147 { return false; }

◆ substeppingCapabilityRequested()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual bool StressUpdateBaseTempl< is_ad, R2, R4 >::substeppingCapabilityRequested ( )
inlinevirtualinherited

Has the user requested usage of (possibly) implemented substepping capability for inelastic models.

Reimplemented in RadialReturnStressUpdateTempl< is_ad >.

Definition at line 153 of file StressUpdateBase.h.

153 { return false; }

◆ updateState() [1/3]

template<bool is_ad, typename R2 , typename R4 >
void StressUpdateBaseTempl< is_ad, R2, R4 >::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 
)
virtualinherited

Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment.

If _fe_problem.currentlyComputingJacobian() = true, then updateState also computes d(stress)/d(strain) (or some approximation to it).

This method is called by ComputeMultipleInelasticStress. This method is pure virutal: all inheriting classes must overwrite this method.

Parameters
strain_incrementUpon input: the strain increment. Upon output: the elastic strain increment
inelastic_strain_incrementThe inelastic_strain resulting from the interative procedure
rotation_incrementThe finite-strain rotation increment
stress_newUpon input: the trial stress that results from applying strain_increment as an elastic strain. Upon output: the admissible stress
stress_oldThe old value of stress
elasticity_tensorThe elasticity tensor
compute_full_tangent_operatorThe calling routine would like the full consistent tangent operator to be placed in tangent_operator, if possible. This is irrelevant if _fe_problem.currentlyComputingJacobian() = false
tangent_operatord(stress)/d(strain), or some approximation to it If compute_full_tangent_operator=false, then tangent_operator=elasticity_tensor is an appropriate choice. tangent_operator is only computed if _fe_problem.currentlyComputingJacobian() = true

Definition at line 68 of file StressUpdateBase.C.

78 {
79  mooseError("updateState called: it needs to be implemented by your inelastic model");
80 }
void mooseError(Args &&... args) const

◆ updateState() [2/3]

void StressUpdateBaseTempl< is_ad, R2, R4 >::updateState
protectedinherited

Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment.

If _fe_problem.currentlyComputingJacobian() = true, then updateState also computes d(stress)/d(strain) (or some approximation to it).

This method is called by ComputeMultipleInelasticStress. This method is pure virutal: all inheriting classes must overwrite this method.

Parameters
strain_incrementUpon input: the strain increment. Upon output: the elastic strain increment
inelastic_strain_incrementThe inelastic_strain resulting from the interative procedure
rotation_incrementThe finite-strain rotation increment
stress_newUpon input: the trial stress that results from applying strain_increment as an elastic strain. Upon output: the admissible stress
stress_oldThe old value of stress
elasticity_tensorThe elasticity tensor
compute_full_tangent_operatorThe calling routine would like the full consistent tangent operator to be placed in tangent_operator, if possible. This is irrelevant if _fe_problem.currentlyComputingJacobian() = false
tangent_operatord(stress)/d(strain), or some approximation to it If compute_full_tangent_operator=false, then tangent_operator=elasticity_tensor is an appropriate choice. tangent_operator is only computed if _fe_problem.currentlyComputingJacobian() = true

Definition at line 68 of file StressUpdateBase.C.

78 {
79  mooseError("updateState called: it needs to be implemented by your inelastic model");
80 }
void mooseError(Args &&... args) const

◆ updateState() [3/3]

void MultiParameterPlasticityStressUpdate::updateState ( RankTwoTensor strain_increment,
RankTwoTensor inelastic_strain_increment,
const RankTwoTensor rotation_increment,
RankTwoTensor stress_new,
const RankTwoTensor stress_old,
const RankFourTensor elasticity_tensor,
const RankTwoTensor elastic_strain_old,
bool  compute_full_tangent_operator,
RankFourTensor tangent_operator 
)
overrideprotectedvirtualinherited

Definition at line 158 of file MultiParameterPlasticityStressUpdate.C.

167 {
168  // Size _yf[_qp] appropriately
169  _yf[_qp].assign(_num_yf, 0);
170  // _plastic_strain and _intnl are usually sized appropriately because they are stateful, but this
171  // Material may be used from a DiracKernel where stateful materials are not allowed. The best we
172  // can do is:
173  if (_intnl[_qp].size() != _num_intnl)
175 
177 
178  if (_t_step >= 2)
179  _step_one = false;
180 
181  // initially assume an elastic deformation
182  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _intnl[_qp].begin());
183 
184  _iter[_qp] = 0.0;
186  _linesearch_needed[_qp] = 0.0;
187 
188  computeStressParams(stress_new, _trial_sp);
190 
191  if (yieldF(_yf[_qp]) <= _f_tol)
192  {
194  inelastic_strain_increment.zero();
196  tangent_operator = elasticity_tensor;
197  return;
198  }
199 
200  _stress_trial = stress_new;
201  /* The trial stress must be inadmissible
202  * so we need to return to the yield surface. The following
203  * equations must be satisfied.
204  *
205  * 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i]
206  * 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, i] * dg/dS[i]
207  * ...
208  * 0 = rhs[N-1] = S[N-1] - S[N-1]^trial + ga * E[N-1, i] * dg/dS[i]
209  * 0 = rhs[N] = f(S, intnl)
210  *
211  * as well as equations defining intnl parameters as functions of
212  * stress_params, trial_stress_params and intnl_old
213  *
214  * The unknowns are S[0], ..., S[N-1], gaE, and the intnl parameters.
215  * Here gaE = ga * _En (the _En serves to make gaE similar magnitude to S)
216  * I find it convenient to solve the first N+1 equations for p, q and gaE,
217  * while substituting the "intnl parameters" equations into these during the solve process
218  */
219 
220  for (auto & deriv : _dvar_dtrial)
221  deriv.assign(_num_sp, 0.0);
222 
223  preReturnMapV(_trial_sp, stress_new, _intnl_old[_qp], _yf[_qp], elasticity_tensor);
224 
225  setEffectiveElasticity(elasticity_tensor);
226 
227  if (_step_one)
228  std::copy(_definitely_ok_sp.begin(), _definitely_ok_sp.end(), _ok_sp.begin());
229  else
230  computeStressParams(stress_old, _ok_sp);
231  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _ok_intnl.begin());
232 
233  // Return-map problem: must apply the following changes in stress_params,
234  // and find the returned stress_params and gaE
235  for (unsigned i = 0; i < _num_sp; ++i)
236  _del_stress_params[i] = _trial_sp[i] - _ok_sp[i];
237 
238  Real step_taken = 0.0; // amount of del_stress_params that we've applied and the return-map
239  // problem has succeeded
240  Real step_size = 1.0; // potentially can apply del_stress_params in substeps
241  Real gaE_total = 0.0;
242 
243  // current values of the yield function, derivatives, etc
244  yieldAndFlow smoothed_q;
245 
246  // In the following sub-stepping procedure it is possible that
247  // the last step is an elastic step, and therefore smoothed_q won't
248  // be computed on the last step, so we have to compute it.
249  bool smoothed_q_calculated = false;
250 
251  while (step_taken < 1.0 && step_size >= _min_step_size)
252  {
253  if (1.0 - step_taken < step_size)
254  // prevent over-shoots of substepping
255  step_size = 1.0 - step_taken;
256 
257  // trial variables in terms of admissible variables
258  for (unsigned i = 0; i < _num_sp; ++i)
259  _trial_sp[i] = _ok_sp[i] + step_size * _del_stress_params[i];
260 
261  // initialize variables that are to be found via Newton-Raphson
263  Real gaE = 0.0;
264 
265  // flags indicating failure of Newton-Raphson and line-search
266  int nr_failure = 0;
267  int ls_failure = 0;
268 
269  // NR iterations taken in this substep
270  unsigned step_iter = 0;
271 
272  // The residual-squared for the line-search
273  Real res2 = 0.0;
274 
275  if (step_size < 1.0 && yieldF(_trial_sp, _ok_intnl) <= _f_tol)
276  // This is an elastic step
277  // The "step_size < 1.0" in above condition is for efficiency: we definitely
278  // know that this is a plastic step if step_size = 1.0
279  smoothed_q_calculated = false;
280  else
281  {
282  // this is a plastic step
283 
284  // initialize current_sp, gaE and current_intnl based on the non-smoothed situation
286  // and find the smoothed yield function, flow potential and derivatives
288  smoothed_q_calculated = true;
289  calculateRHS(_trial_sp, _current_sp, gaE, smoothed_q, _rhs);
290  res2 = calculateRes2(_rhs);
291 
292  // Perform a Newton-Raphson with linesearch to get current_sp, gaE, and also smoothed_q
293  while (res2 > _f_tol2 && step_iter < _max_nr_its && nr_failure == 0 && ls_failure == 0)
294  {
295  // solve the linear system and store the answer (the "updates") in rhs
296  nr_failure = nrStep(smoothed_q, _trial_sp, _current_sp, _current_intnl, gaE, _rhs);
297  if (nr_failure != 0)
298  break;
299 
300  // handle precision loss
301  if (precisionLoss(_rhs, _current_sp, gaE))
302  {
304  {
305  Moose::err << "MultiParameterPlasticityStressUpdate: precision-loss in element "
306  << _current_elem->id() << " quadpoint=" << _qp << ". Stress_params =";
307  for (unsigned i = 0; i < _num_sp; ++i)
308  Moose::err << " " << _current_sp[i];
309  Moose::err << " gaE = " << gaE << "\n";
310  }
311  res2 = 0.0;
312  break;
313  }
314 
315  // apply (parts of) the updates, re-calculate smoothed_q, and res2
316  ls_failure = lineSearch(res2,
317  _current_sp,
318  gaE,
319  _trial_sp,
320  smoothed_q,
321  _ok_intnl,
323  _rhs,
325  step_iter++;
326  }
327  }
328  if (res2 <= _f_tol2 && step_iter < _max_nr_its && nr_failure == 0 && ls_failure == 0 &&
329  gaE >= 0.0)
330  {
331  // this Newton-Raphson worked fine, or this was an elastic step
332  std::copy(_current_sp.begin(), _current_sp.end(), _ok_sp.begin());
333  gaE_total += gaE;
334  step_taken += step_size;
336  std::copy(_intnl[_qp].begin(), _intnl[_qp].end(), _ok_intnl.begin());
337  // calculate dp/dp_trial, dp/dq_trial, etc, for Jacobian
338  dVardTrial(!smoothed_q_calculated,
339  _trial_sp,
340  _ok_sp,
341  gaE,
342  _ok_intnl,
343  smoothed_q,
344  step_size,
345  compute_full_tangent_operator,
346  _dvar_dtrial);
347  if (static_cast<Real>(step_iter) > _iter[_qp])
348  _iter[_qp] = static_cast<Real>(step_iter);
349  if (static_cast<Real>(step_iter) > _max_iter_used[_qp])
350  _max_iter_used[_qp] = static_cast<Real>(step_iter);
351  step_size *= 1.1;
352  }
353  else
354  {
355  // Newton-Raphson + line-search process failed
356  step_size *= 0.5;
357  }
358  }
359 
360  if (step_size < _min_step_size)
361  errorHandler("MultiParameterPlasticityStressUpdate: Minimum step-size violated");
362 
363  // success!
364  finalizeReturnProcess(rotation_increment);
366 
367  if (!smoothed_q_calculated)
368  smoothed_q = smoothAllQuantities(_ok_sp, _intnl[_qp]);
369 
371  _stress_trial, _ok_sp, gaE_total, _intnl[_qp], smoothed_q, elasticity_tensor, stress_new);
372 
374  gaE_total,
375  smoothed_q,
376  elasticity_tensor,
377  stress_new,
378  inelastic_strain_increment);
379 
380  strain_increment = strain_increment - inelastic_strain_increment;
381  _plastic_strain[_qp] = _plastic_strain_old[_qp] + inelastic_strain_increment;
382 
384  // for efficiency, do not compute the tangent operator if not currently computing Jacobian
386  _trial_sp,
387  stress_new,
388  _ok_sp,
389  gaE_total,
390  smoothed_q,
391  elasticity_tensor,
392  compute_full_tangent_operator,
393  _dvar_dtrial,
394  tangent_operator);
395 }
FEProblemBase & _fe_problem
MaterialProperty< std::vector< Real > > & _yf
yield functions
std::vector< Real > _trial_sp
"Trial" value of stress_params that initializes the return-map process This is derived from stress = ...
virtual void setEffectiveElasticity(const RankFourTensor &Eijkl)=0
Sets _Eij and _En and _Cij.
const bool _warn_about_precision_loss
Output a warning message if precision loss is encountered during the return-map process.
virtual void errorHandler(const std::string &message) const
Performs any necessary cleaning-up, then throw MooseException(message)
virtual void initializeVarsV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &stress_params, Real &gaE, std::vector< Real > &intnl) const
Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm.
int lineSearch(Real &res2, std::vector< Real > &stress_params, Real &gaE, const std::vector< Real > &trial_stress_params, yieldAndFlow &smoothed_q, const std::vector< Real > &intnl_ok, std::vector< Real > &intnl, std::vector< Real > &rhs, Real &linesearch_needed) const
Performs a line-search to find stress_params and gaE Upon entry:
const unsigned _num_intnl
Number of internal parameters.
virtual void consistentTangentOperatorV(const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto)
Calculates the consistent tangent operator.
virtual void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of stress_params, their current values...
std::vector< Real > _ok_intnl
The state (ok_sp, ok_intnl) is known to be admissible.
const Real _f_tol2
Square of the yield-function tolerance.
const Real _min_step_size
In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-inc...
int nrStep(const yieldAndFlow &smoothed_q, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, const std::vector< Real > &intnl, Real gaE, std::vector< Real > &rhs) const
Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution...
void calculateRHS(const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[...
MaterialProperty< std::vector< Real > > & _intnl
internal parameters
yieldAndFlow smoothAllQuantities(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Calculates all yield functions and derivatives, and then performs the smoothing scheme.
unsigned int _qp
const Real _f_tol
The yield-function tolerance.
const unsigned _num_yf
Number of yield functions.
int & _t_step
virtual void setInelasticStrainIncrementAfterReturn(const RankTwoTensor &stress_trial, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &elasticity_tensor, const RankTwoTensor &returned_stress, RankTwoTensor &inelastic_strain_increment) const
Sets inelastic strain increment from the returned configuration This is called after the return-map p...
const std::vector< Real > _definitely_ok_sp
An admissible value of stress_params at the initial time.
const MaterialProperty< std::vector< Real > > & _intnl_old
old values of internal parameters
RankTwoTensor _stress_trial
"Trial" value of stress that is set at the beginning of the return-map process.
Real deriv(unsigned n, unsigned alpha, unsigned beta, Real x)
virtual void computeStressParams(const RankTwoTensor &stress, std::vector< Real > &stress_params) const =0
Computes stress_params, given stress.
const MaterialProperty< Real > & _max_iter_used_old
Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of ...
Real calculateRes2(const std::vector< Real > &rhs) const
Calculates the residual-squared for the Newton-Raphson + line-search.
virtual void yieldFunctionValuesV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given stress_params and intnl parameters.
MaterialProperty< Real > & _iter
Number of Newton-Raphson iterations used in the return-map.
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
std::vector< Real > _current_intnl
The current values of the internal params during the Newton-Raphson.
virtual void finalizeReturnProcess(const RankTwoTensor &rotation_increment)
Derived classes may use this to perform calculations after the return-map process has completed succe...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialProperty< Real > & _linesearch_needed
Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise) ...
std::vector< std::vector< Real > > _dvar_dtrial
d({stress_param[i], gaE})/d(trial_stress_param[j])
std::vector< Real > _current_sp
The current values of the stress params during the Newton-Raphson.
bool _step_one
handles case of initial_stress that is inadmissible being supplied
void dVardTrial(bool elastic_only, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, Real step_size, bool compute_full_tangent_operator, std::vector< std::vector< Real >> &dvar_dtrial) const
Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_par...
virtual void setStressAfterReturnV(const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
Sets stress from the admissible parameters.
virtual void preReturnMapV(const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
Derived classes may employ this function to record stuff or do other computations prior to the return...
MaterialProperty< Real > & _max_iter_used
Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire si...
bool precisionLoss(const std::vector< Real > &solution, const std::vector< Real > &stress_params, Real gaE) const
Check whether precision loss has occurred.
const bool & currentlyComputingJacobian() const
std::vector< Real > _del_stress_params
_del_stress_params = trial_stress_params - ok_sp This is fixed at the beginning of the return-map pro...
const unsigned _max_nr_its
Maximum number of Newton-Raphson iterations allowed in the return-map process.
virtual void initializeReturnProcess()
Derived classes may use this to perform calculations before any return-map process is performed...
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
Old value of plastic strain.
Real yieldF(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Computes the smoothed yield function.
std::vector< Real > _rhs
0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1...
const Elem *const & _current_elem
std::vector< Real > _ok_sp
The state (ok_sp, ok_intnl) is known to be admissible, so ok_sp are stress_params that are "OK"...
const unsigned _num_sp
Number of stress parameters.

◆ updateStateSubstep()

template<bool is_ad, typename R2 , typename R4 >
void StressUpdateBaseTempl< is_ad, R2, R4 >::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 
)
virtualinherited

Similar to the updateState function, this method updates the strain and stress for one substep.

Definition at line 84 of file StressUpdateBase.C.

94 {
95  this->template paramError(
96  "use_substep",
97  "updateStateSubstep called: it needs to be implemented by your inelastic model");
98 }
void paramError(const std::string &param, Args... args) const

◆ validParams()

InputParameters CappedMohrCoulombStressUpdate::validParams ( )
static

Definition at line 17 of file CappedMohrCoulombStressUpdate.C.

Referenced by CappedMohrCoulombCosseratStressUpdate::validParams().

18 {
20  params.addRequiredParam<UserObjectName>(
21  "tensile_strength",
22  "A SolidMechanicsHardening UserObject that defines hardening of the "
23  "tensile strength. In physical situations this is positive (and always "
24  "must be greater than negative compressive-strength.");
25  params.addRequiredParam<UserObjectName>(
26  "compressive_strength",
27  "A SolidMechanicsHardening UserObject that defines hardening of the "
28  "compressive strength. In physical situations this is positive.");
29  params.addRequiredParam<UserObjectName>(
30  "cohesion", "A SolidMechanicsHardening UserObject that defines hardening of the cohesion");
31  params.addRequiredParam<UserObjectName>("friction_angle",
32  "A SolidMechanicsHardening UserObject "
33  "that defines hardening of the "
34  "friction angle (in radians)");
35  params.addRequiredParam<UserObjectName>(
36  "dilation_angle",
37  "A SolidMechanicsHardening UserObject that defines hardening of the "
38  "dilation angle (in radians). Unless you are quite confident, this should "
39  "be set positive and not greater than the friction angle.");
40  params.addParam<bool>("perfect_guess",
41  true,
42  "Provide a guess to the Newton-Raphson procedure "
43  "that is the result from perfect plasticity. With "
44  "severe hardening/softening this may be "
45  "suboptimal.");
46  params.addClassDescription("Nonassociative, smoothed, Mohr-Coulomb plasticity capped with "
47  "tensile (Rankine) and compressive caps, with hardening/softening");
48  return params;
49 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

◆ yieldF() [1/2]

Real MultiParameterPlasticityStressUpdate::yieldF ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl 
) const
protectedinherited

Computes the smoothed yield function.

Parameters
stress_paramsThe stress parameters (eg stress_params[0] = stress_zz and stress_params[1] = sqrt(stress_zx^2 + stress_zy^2))
intnlThe internal parameters (eg intnl[0] is shear, intnl[1] is tensile)
Returns
The smoothed yield function value

Definition at line 686 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

688 {
689  std::vector<Real> yfs(_num_yf);
690  yieldFunctionValuesV(stress_params, intnl, yfs);
691  return yieldF(yfs);
692 }
const unsigned _num_yf
Number of yield functions.
virtual void yieldFunctionValuesV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given stress_params and intnl parameters.
Real yieldF(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Computes the smoothed yield function.

◆ yieldF() [2/2]

Real MultiParameterPlasticityStressUpdate::yieldF ( const std::vector< Real > &  yfs) const
protectedinherited

Computes the smoothed yield function.

Parameters
yfsThe values of the individual yield functions
Returns
The smoothed yield function value

Definition at line 695 of file MultiParameterPlasticityStressUpdate.C.

696 {
697  Real yf = yfs[0];
698  for (std::size_t i = 1; i < yfs.size(); ++i)
699  if (yf >= yfs[i] + _smoothing_tol)
700  // no smoothing is needed, and yf is the biggest yield function
701  continue;
702  else if (yfs[i] >= yf + _smoothing_tol)
703  // no smoothing is needed, and yfs[i] is the biggest yield function
704  yf = yfs[i];
705  else
706  yf = 0.5 * (yf + yfs[i] + _smoothing_tol) + ismoother(yf - yfs[i]);
707  return yf;
708 }
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real ismoother(Real f_diff) const
Smooths yield functions.

◆ yieldFunctionValuesV()

void CappedMohrCoulombStressUpdate::yieldFunctionValuesV ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
std::vector< Real > &  yf 
) const
overrideprotectedvirtual

Computes the values of the yield functions, given stress_params and intnl parameters.

Derived classes must override this, to provide the values of the yield functions in yf.

Parameters
stress_params[in]The stress parameters
intnl[in]The internal parameters
[out]yfThe yield function values

Implements MultiParameterPlasticityStressUpdate.

Definition at line 121 of file CappedMohrCoulombStressUpdate.C.

124 {
125  // intnl[0] = shear, intnl[1] = tensile
126  const Real ts = _tensile_strength.value(intnl[1]);
127  const Real cs = _compressive_strength.value(intnl[1]);
128  const Real sinphi = std::sin(_phi.value(intnl[0]));
129  const Real cohcos = _cohesion.value(intnl[0]) * std::cos(_phi.value(intnl[0]));
130  const Real smax = stress_params[2]; // largest eigenvalue
131  const Real smid = stress_params[1];
132  const Real smin = stress_params[0]; // smallest eigenvalue
133  yf[0] = smax - ts;
134  yf[1] = smid - ts;
135  yf[2] = smin - ts;
136  yf[3] = -smin - cs;
137  yf[4] = -smid - cs;
138  yf[5] = -smax - cs;
139  yf[6] = 0.5 * (smax - smin) + 0.5 * (smax + smin) * sinphi - cohcos;
140  yf[7] = 0.5 * (smid - smin) + 0.5 * (smid + smin) * sinphi - cohcos;
141  yf[8] = 0.5 * (smax - smid) + 0.5 * (smax + smid) * sinphi - cohcos;
142  yf[9] = 0.5 * (smid - smax) + 0.5 * (smid + smax) * sinphi - cohcos;
143  yf[10] = 0.5 * (smin - smid) + 0.5 * (smin + smid) * sinphi - cohcos;
144  yf[11] = 0.5 * (smin - smax) + 0.5 * (smin + smax) * sinphi - cohcos;
145 }
const SolidMechanicsHardeningModel & _phi
Hardening model for friction angle.
const SolidMechanicsHardeningModel & _tensile_strength
Hardening model for tensile strength.
virtual Real value(Real intnl) const
const SolidMechanicsHardeningModel & _compressive_strength
Hardening model for compressive strength.
const SolidMechanicsHardeningModel & _cohesion
Hardening model for cohesion.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Data Documentation

◆ _base_name

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
const std::string StressUpdateBaseTempl< is_ad, R2, R4 >::_base_name
protectedinherited

Name used as a prefix for all material properties related to the stress update model.

Definition at line 191 of file StressUpdateBase.h.

◆ _Cij

std::vector<std::vector<Real> > MultiParameterPlasticityStressUpdate::_Cij
protectedinherited

◆ _cohesion

const SolidMechanicsHardeningModel& CappedMohrCoulombStressUpdate::_cohesion
protected

Hardening model for cohesion.

Definition at line 41 of file CappedMohrCoulombStressUpdate.h.

Referenced by computeAllQV(), initializeVarsV(), and yieldFunctionValuesV().

◆ _compressive_strength

const SolidMechanicsHardeningModel& CappedMohrCoulombStressUpdate::_compressive_strength
protected

Hardening model for compressive strength.

Definition at line 38 of file CappedMohrCoulombStressUpdate.h.

Referenced by computeAllQV(), initializeVarsV(), and yieldFunctionValuesV().

◆ _current_elem

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
const Elem *const & Material::_current_elem
inherited

◆ _definitely_ok_sp

const std::vector<Real> MultiParameterPlasticityStressUpdate::_definitely_ok_sp
protectedinherited

◆ _dt

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
Real & Material::_dt
inherited

◆ _eigvecs

RankTwoTensor CappedMohrCoulombStressUpdate::_eigvecs
protected

Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to stress space.

Definition at line 63 of file CappedMohrCoulombStressUpdate.h.

Referenced by consistentTangentOperatorV(), CappedMohrCoulombCosseratStressUpdate::preReturnMapV(), preReturnMapV(), CappedMohrCoulombCosseratStressUpdate::setStressAfterReturnV(), and setStressAfterReturnV().

◆ _Eij

std::vector<std::vector<Real> > MultiParameterPlasticityStressUpdate::_Eij
protectedinherited

◆ _En

Real MultiParameterPlasticityStressUpdate::_En
protectedinherited

◆ _f_tol

const Real MultiParameterPlasticityStressUpdate::_f_tol
protectedinherited

The yield-function tolerance.

Definition at line 161 of file MultiParameterPlasticityStressUpdate.h.

Referenced by initializeVarsV(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _f_tol2

const Real MultiParameterPlasticityStressUpdate::_f_tol2
protectedinherited

Square of the yield-function tolerance.

Definition at line 164 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _identityTensor

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
RankFourTensor StressUpdateBaseTempl< is_ad, R2, R4 >::_identityTensor
staticprotectedinherited
Initial value:

Definition at line 193 of file StressUpdateBase.h.

◆ _intnl

MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_intnl
protectedinherited

◆ _intnl_old

const MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_intnl_old
protectedinherited

◆ _iter

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_iter
protectedinherited

Number of Newton-Raphson iterations used in the return-map.

Definition at line 195 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _linesearch_needed

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_linesearch_needed
protectedinherited

Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise)

Definition at line 204 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_iter_used

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_max_iter_used
protectedinherited

Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation.

Definition at line 198 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_iter_used_old

const MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_max_iter_used_old
protectedinherited

Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation.

Definition at line 201 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_nr_its

const unsigned MultiParameterPlasticityStressUpdate::_max_nr_its
protectedinherited

Maximum number of Newton-Raphson iterations allowed in the return-map process.

Definition at line 149 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _min_step_size

const Real MultiParameterPlasticityStressUpdate::_min_step_size
protectedinherited

In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-increments of size greater than this value.

Definition at line 171 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _num_intnl

const unsigned MultiParameterPlasticityStressUpdate::_num_intnl
protectedinherited

◆ _num_sp

const unsigned MultiParameterPlasticityStressUpdate::_num_sp
protectedinherited

◆ _num_yf

const unsigned MultiParameterPlasticityStressUpdate::_num_yf
protectedinherited

◆ _perfect_guess

const bool CappedMohrCoulombStressUpdate::_perfect_guess
protected

Whether to provide an estimate of the returned stress, based on perfect plasticity.

Definition at line 50 of file CappedMohrCoulombStressUpdate.h.

Referenced by initializeVarsV().

◆ _perform_finite_strain_rotations

const bool MultiParameterPlasticityStressUpdate::_perform_finite_strain_rotations
protectedinherited

◆ _phi

const SolidMechanicsHardeningModel& CappedMohrCoulombStressUpdate::_phi
protected

Hardening model for friction angle.

Definition at line 44 of file CappedMohrCoulombStressUpdate.h.

Referenced by CappedMohrCoulombStressUpdate(), computeAllQV(), initializeVarsV(), and yieldFunctionValuesV().

◆ _plastic_strain

MaterialProperty<RankTwoTensor>& MultiParameterPlasticityStressUpdate::_plastic_strain
protectedinherited

◆ _plastic_strain_old

const MaterialProperty<RankTwoTensor>& MultiParameterPlasticityStressUpdate::_plastic_strain_old
protectedinherited

◆ _poissons_ratio

Real CappedMohrCoulombStressUpdate::_poissons_ratio
protected

◆ _psi

const SolidMechanicsHardeningModel& CappedMohrCoulombStressUpdate::_psi
protected

Hardening model for dilation angle.

Definition at line 47 of file CappedMohrCoulombStressUpdate.h.

Referenced by CappedMohrCoulombStressUpdate(), computeAllQV(), initializeVarsV(), setIntnlDerivativesV(), and setIntnlValuesV().

◆ _q_point

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
const MooseArray< Point > & Material::_q_point
inherited

◆ _qp

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
unsigned int Material::_qp
inherited

◆ _shifter

const Real CappedMohrCoulombStressUpdate::_shifter
protected

When equal-eigenvalues are predicted from the stress initialization routine, shift them by this amount.

This avoids equal-eigenvalue problems, but also accounts for the smoothing of the yield surface

Definition at line 60 of file CappedMohrCoulombStressUpdate.h.

Referenced by initializeVarsV().

◆ _smoothing_tol

const Real MultiParameterPlasticityStressUpdate::_smoothing_tol
protectedinherited

◆ _smoothing_tol2

const Real MultiParameterPlasticityStressUpdate::_smoothing_tol2
protectedinherited

Square of the smoothing tolerance.

Definition at line 158 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::ismoother().

◆ _step_one

bool MultiParameterPlasticityStressUpdate::_step_one
protectedinherited

handles case of initial_stress that is inadmissible being supplied

Definition at line 174 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _tensile_strength

const SolidMechanicsHardeningModel& CappedMohrCoulombStressUpdate::_tensile_strength
protected

Hardening model for tensile strength.

Definition at line 31 of file CappedMohrCoulombStressUpdate.h.

Referenced by computeAllQV(), initializeVarsV(), and yieldFunctionValuesV().

◆ _tensor_dimensionality

constexpr unsigned MultiParameterPlasticityStressUpdate::_tensor_dimensionality = 3
staticprotectedinherited

◆ _warn_about_precision_loss

const bool MultiParameterPlasticityStressUpdate::_warn_about_precision_loss
protectedinherited

Output a warning message if precision loss is encountered during the return-map process.

Definition at line 177 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _yf

MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_yf
protectedinherited

The documentation for this class was generated from the following files: