musica (C++)
Loading...
Searching...
No Matches
elastoplastic::core::StiffnessBase< T > Struct Template Reference

Base class for stiffness. More...

#include <stiffness.hpp>

Inheritance diagram for elastoplastic::core::StiffnessBase< T >:
Collaboration diagram for elastoplastic::core::StiffnessBase< T >:

Public Member Functions

std::pair< T, T > processStiffness ()
T E (const StateVariable< T > &sv0, const StateVariable< T > &sv) const
T nu (const StateVariable< T > &sv0, const StateVariable< T > &sv) const
T G (const StateVariable< T > &sv0, const StateVariable< T > &sv) const
T K (const StateVariable< T > &sv0, const StateVariable< T > &sv) const
T M (const StateVariable< T > &sv0, const StateVariable< T > &sv) const
T lame (const StateVariable< T > &sv0, const StateVariable< T > &sv) const
Public Member Functions inherited from elastoplastic::core::ElastoplasticModel< T >
 ElastoplasticModel (const std::unordered_map< std::string, T > &props)
 constructor
 ElastoplasticModel ()=default
 default constructor
T phi (const StateVariable< T > &sv0, const StateVariable< T > &sv, bool dilatancy=false) const
 Lode angle dependent friction angle.
T phir (const StateVariable< T > &sv0, const StateVariable< T > &sv, bool dilatancy=false) const
 Lode angle dependent friction angle in radians.
T CSR (T phir, const StateVariable< T > &sv0, const StateVariable< T > &sv)
 Critical stress ratio considering fabric anisotropy.
Public Member Functions inherited from constitutive::ElastoplasticModelBase< T >
void setPlasticMethod (const std::string &method)
 set the plastic method
Eigen::Matrix< T, 6, 6 > continuumElastoplasticStiffness (const Eigen::Matrix< T, 6, 6 > &K, const StateVariable< T > &sv0, StateVariable< T > &sv, bool check_elastic_state=true, std::optional< bool > check_positive_definite=std::nullopt, std::optional< bool > check_non_singularity=std::nullopt) override
Eigen::Matrix< T, 6, 6 > symmetricContinuumElastoplasticStiffness (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv, bool check_elastic_state=true, std::optional< bool > check_positive_definite=std::nullopt, std::optional< bool > check_non_singularity=std::nullopt) override
Eigen::Matrix< T, 6, 6 > consistentElastoplasticStiffness (const Eigen::Matrix< T, 6, 6 > &K, const StateVariable< T > &sv0, StateVariable< T > &sv, bool check_elastic_state=true, std::optional< bool > check_positive_definite=std::nullopt, std::optional< bool > check_non_singularity=std::nullopt) override
virtual T yieldFunction (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Yield function for elastoplastic model.
Eigen::Matrix< T, 6, 1 > dfdsig0 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the stress.
virtual Eigen::Matrix< T, 6, 1 > dfdsig (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the stress.
Eigen::Matrix< T, 6, 1 > dfdsig1 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the stress.
Eigen::Matrix< T, 6, 1 > dfdeps0 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the strain.
virtual Eigen::Matrix< T, 6, 1 > dfdeps (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the strain.
Eigen::Matrix< T, 6, 1 > dfdeps1 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the strain.
Eigen::Matrix< T, 6, 1 > dfdepsp0 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the plastic strain.
virtual Eigen::Matrix< T, 6, 1 > dfdepsp (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the plastic strain.
Eigen::Matrix< T, 6, 1 > dfdepsp1 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the plastic strain.
Public Member Functions inherited from constitutive::ConstitutiveModelBase< T >
 ConstitutiveModelBase ()=default
 default constructor
virtual ~ConstitutiveModelBase ()=default
 destructor
virtual std::vector< StateVariable< T > > run ()
 Run the model.
virtual Eigen::Matrix< T, 6, 1 > increment (const Eigen::Matrix< T, 6, 1 > &dx, Eigen::Matrix< T, 6, 1 > x, const Eigen::Matrix< T, 6, 6 > &S, const Eigen::Matrix< T, 6, 6 > &E, const Eigen::Matrix< T, 6, 6 > &G, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Compute one increment.
void setElementType (const std::string &element_type)
 Set ABAQUS element type.
void setStressStrainComponents (const int ndi, const int nshr)
 Set number of stress/strain components.
std::tuple< StateVariable< T >, StateVariable< T > > umat (const T *dload, T *stress, T *statev, T *ddsdde=nullptr, T *sse=nullptr, T *spd=nullptr, T *scd=nullptr)
 ABAQUS UMAT interface.
void vumat (const int nBlock, const T *loadInc, const T *stressOld, T *stressNew, const T *stateOld, T *stateNew, const int nStatev)
 ABAQUS VUMAT interface.
virtual Eigen::Matrix< T, 6, 6 > stiffness (const StateVariable< T > &sv0, StateVariable< T > &sv)=0
 Compute the stiffness matrix.
Eigen::Matrix< T, 6, 6 > elastoplasticStiffness (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > deps, const StateVariable< T > &sv0, StateVariable< T > &sv, bool check_elastic_state=true, std::optional< bool > check_positive_definite=std::nullopt, std::optional< bool > check_non_singularity=std::nullopt)
 Compute the elastoplastic stiffness matrix.

Protected Member Functions

T voidRatioFunction (const StateVariable< T > &sv0, const StateVariable< T > &sv) const
T stressFunction (const StateVariable< T > &sv0, const StateVariable< T > &sv) const
virtual Eigen::Matrix< T, 6, 6 > compliance (const StateVariable< T > &sv0, StateVariable< T > &sv)
Protected Member Functions inherited from elastoplastic::core::ElastoplasticModel< T >
void fromAbaqus (StateVariable< T > &sv0, T *statev) override
 Sync the state variables sv0 from abaqus statev.
void toAbaqus (const StateVariable< T > &sv0, StateVariable< T > &sv, T *statev) override
 Sync the state variables sv to abaqus statev.
StateVariable< T > createStateVariable () override
 Create a new state variable object.
void initialize (StateVariable< T > &sv) override
 Initialize the state variables.
void preIncrement (const StateVariable< T > &sv0, StateVariable< T > &sv) override
 Pre-processing before the increment.
void postIncrement (const StateVariable< T > &sv0, StateVariable< T > &sv) override
 Post-processing after the increment.
void postProcess (StateVariable< T > &sv) override
 Post-process the state variables.
bool converged (const StateVariable< T > &sv0, StateVariable< T > &sv) override
 Whether the current stress state can be accepted as converged, used for elastoplastic substepping.
virtual T stateParameter (const StateVariable< T > &sv0, StateVariable< T > &sv, std::optional< T > e=std::nullopt, std::optional< T > ec=std::nullopt) const
 State parameter.
virtual T densityEffectOnStrength (const StateVariable< T > &sv0, StateVariable< T > &sv, std::optional< T > e=std::nullopt, std::optional< T > ec=std::nullopt) const
 Density effect on strength.
virtual T densityEffectOnDilatancy (const StateVariable< T > &sv0, StateVariable< T > &sv, std::optional< T > e=std::nullopt, std::optional< T > ec=std::nullopt) const
 Density effect on dilatancy.
virtual T Mp (const StateVariable< T > &sv0, StateVariable< T > &sv, std::optional< T > e=std::nullopt, std::optional< T > ec=std::nullopt)
T dMpde (const StateVariable< T > &sv0, StateVariable< T > &sv)
T dMpdec (const StateVariable< T > &sv0, StateVariable< T > &sv)
virtual T Mpt (const StateVariable< T > &sv0, StateVariable< T > &sv, std::optional< T > e=std::nullopt, std::optional< T > ec=std::nullopt)
T dMptde (const StateVariable< T > &sv0, StateVariable< T > &sv)
T dMptdec (const StateVariable< T > &sv0, StateVariable< T > &sv)
virtual Eigen::Matrix< T, 6, 1 > dCSRdsig (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the critical stress ratio with respect to the stress.
virtual Eigen::Matrix< T, 6, 1 > dMpdsig (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the peak stress ratio with respect to the stress.
Protected Member Functions inherited from constitutive::ElastoplasticModelBase< T >
bool isExplicit () const
 check if the plastic method is explicit
bool isCPA () const
 check if the plastic method is CPA
bool isCPPM () const
 check if the plastic method is CPPM
bool isRungeKutta () const
 check if the plastic method is RungeKutta
void stressStrainIntegrate (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &dsig, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv) override
 Stress-strain integration.
void returnMapping (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &dsig, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv)
 return mapping algorithm to solve plastic problem (plastic strain and stress)
T elasticTrial (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Perform the elastic trial.
void revertElasticTrial (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Revert the elastic trial.
virtual void beginConstantStressStateScope (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Begin the scope of a constant stress state which can be used to cache intermediate variables for the plastic correction, such as derivatives of the yield and plastic potential functions, and hardening law.
void beginConstantStressStateScope1 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Begin the scope of a constant stress state which can be used to cache intermediate variables for the plastic correction, such as derivatives of the yield and plastic potential functions, and hardening law.
virtual void endConstantStressStateScope (const StateVariable< T > &sv0, StateVariable< T > &sv)
 End the scope of a constant stress state.
void endConstantStressStateScope1 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 End the scope of a constant stress state.
void ExplicitCPA (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Explicit/CPA methods for elastoplastic model.
void CPPM (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv)
 CPPM method for elastoplastic model.
std::tuple< bool, T > integrateToYieldSurface (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Integrate stress state to the yield surface elastically, solve f(sig0 + alpha * K * deps) = 0.
std::tuple< Eigen::Matrix< T, 6, 6 >, Eigen::Matrix< T, 6, 1 >, Eigen::Matrix< T, 6, 1 >, Eigen::Matrix< T, Eigen::Dynamic, 1 >, Eigen::Matrix< T, Eigen::Dynamic, 6 > > RKn (int n, const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv, const bool revert=false)
 Perform a Runge-Kutta increment.
void RungeKutta (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv, std::optional< int > order=std::nullopt)
 Runge-Kutta method for elastoplastic model.
virtual T CSL (const StateVariable< T > &sv0, StateVariable< T > &sv) const
 calculate the critical state line
T yieldFunction1 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Yield function for elastoplastic model.
Eigen::Matrix< T, 6, 6 > dsigadsig (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the modified stress with respect to the stress.
virtual T potentialFunction (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Potential function for elastoplastic model.
Eigen::Matrix< T, 6, 1 > dgdsig0 (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the potential function with respect to the stress.
virtual Eigen::Matrix< T, 6, 1 > dgdsig (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the potential function with respect to the stress.
Eigen::Matrix< T, 6, 1 > dgdsig1 (const Eigen::Matrix< T, 6, 1 > &dfdsig, const StateVariable< T > &sv0, StateVariable< T > &sv, std::optional< bool > associated=std::nullopt)
 Derivative of the potential function with respect to the stress.
Eigen::Matrix< T, 6, 6 > d2gdsig20 (const Eigen::Matrix< T, 6, 1 > &dfdsig, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Second-order derivative of the potential function with respect to the stress.
virtual Eigen::Matrix< T, 6, 6 > d2gdsig2 (const Eigen::Matrix< T, 6, 1 > &dfdsig, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Second-order derivative of the potential function with respect to the stress.
Eigen::Matrix< T, 6, 6 > d2gdsig21 (const Eigen::Matrix< T, 6, 1 > &dfdsig, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Second-order derivative of the potential function with respect to the stress.
virtual T plasticModulus (const Eigen::Matrix< T, 6, 1 > &dgdsig, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Plastic modulus for elastoplastic model, including dgdsig.
T plasticModulus1 (const Eigen::Matrix< T, 6, 1 > &dgdsig, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Plastic modulus for elastoplastic model, including dgdsig.
virtual void updateHardeningVariables (const T ddlambda, const Eigen::Matrix< T, 6, 1 > &ddepsp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Update the hardening variables.
virtual void yieldFunctionCorrection (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &deps, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Yield surface correction to keep the force state on the yield surface.
Eigen::Matrix< T, 3, 3 > orthogonalDirection (const Eigen::Matrix< T, 3, 3 > &F, const Eigen::Matrix< T, 3, 3 > &n) const
 Orthogonal direction.
Eigen::Matrix< T, 3, 3 > nonCoaxialDirection (const Eigen::Matrix< T, 3, 3 > &F, const Eigen::Matrix< T, 3, 3 > &n, const Eigen::Matrix< T, 3, 3 > &m) const
 Non-coaxial direction.
void interpolateFabricTensor (const StateVariable< T > &sv0, StateVariable< T > &sv, const bool clear_caches=true, std::optional< std::string > combined_stress_tensor_type=std::nullopt)
 Interpolate fabric tensor towards critical state.
Protected Member Functions inherited from constitutive::ConstitutiveModelBase< T >
bool checkStiffnessMatrix (const Eigen::Matrix< T, 6, 6 > &K, std::optional< bool > check_positive_definite=std::nullopt, std::optional< bool > check_non_singularity=std::nullopt)
 Check whether the stiffness matrix is valid.
T updateVoidRatio (T e0, StateVariable< T > &sv)
 Update the void ratio after the isotropic loading to the void ratio before the isotropic loading.
virtual void postInitialize (StateVariable< T > &sv)
 Post-initialize the state variables.
void saveElasticStiffnessMatrix (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Save elastic stiffness matrix.
virtual void preStressStrainIntegrate (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Pre-processing before the stress-strain integration.
virtual void postStressStrainIntegrate (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Post-processing after the stress-strain integration.
std::tuple< Eigen::Matrix< T, 6, 1 >, Eigen::Matrix< T, 6, 1 > > linearize (const Eigen::Matrix< T, 6, 6 > &K, const Eigen::Matrix< T, 6, 1 > &dx, const Eigen::Matrix< T, 6, 6 > &S, const Eigen::Matrix< T, 6, 6 > &E, const Eigen::Matrix< T, 6, 6 > &G, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Linearize the stress and strain increment.
void resetCustomStateVariables (StateVariable< T > &sv0, StateVariable< T > &sv)
 Reset the custom state variables to zeros existing in the current state variables but not in the initial state variables.
Eigen::Matrix< T, 3, 3 > loadingDirection (const StateVariable< T > &sv0, StateVariable< T > &sv) const
 loading direction

Additional Inherited Members

Public Attributes inherited from elastoplastic::core::ElastoplasticModel< T >
std::shared_ptr< FabricTensor< T > > fabric = std::make_shared<FabricTensor<T>>("chang1990-ext", "li2012")
std::shared_ptr< ElastoplasticMaterial< T > > material
Public Attributes inherited from constitutive::ElastoplasticModelBase< T >
std::string plasticMethod = "CPA"
 Plastic method.
Public Attributes inherited from constitutive::ConstitutiveModelBase< T >
std::string name = "Undefined"
 name of the model
std::shared_ptr< Load< T > > load = std::make_shared<Load<T>>()
 load
std::shared_ptr< Options< T > > options = std::make_shared<Options<T>>()
 options for the constitutive model
std::shared_ptr< DebugVariable< T > > debugVariable = std::make_shared<DebugVariable<T>>()
 debug variable
std::vector< StateVariable< T > > stateVars = {}
 state variables of the current run
Eigen::Matrix< T, 3, 3 > custom_loading_direction = Eigen::Matrix<T, 3, 3>::Zero()
 custom loading direction
bool abaqus_initialize = false
 Options for abaqus UMAT/VUMAT interfaces.
bool abaqus_normalize_ddsdde = true
 whether to normalize stiffness matrix
bool abaqus_strain_control = true
 the load is controlled by strain (true) or stress (false)
bool abaqus_disable_unused_components = false
 whether to disable unused components in the flow rule
int abaqus_ndi = 3
 number of direct stress/strain components
int abaqus_nshr = 3
 number of shear stress/strain components
std::string abaqus_stiffness_type = "elastic"
T abaqus_elastoplastic_stiffness_strain_increment_multiplier = 1.0
 multiplier for strain increment when computing elastoplastic stiffness matrix
bool abaqus_check_stiffness_matrix_positive_definite = true
 whether to check the positive definiteness of the stiffness matrix
bool abaqus_check_stiffness_matrix_non_singularity = true
 whether to check the non-singularity of the stiffness matrix
int _phase = 0
 index of the phase
int _step = 0
 current step
int _mixedLoad = 0
 number of mixed load steps
Protected Attributes inherited from constitutive::ElastoplasticModelBase< T >
std::string state = "none"
bool cached_ = false
 whether the state variables have been cached
Eigen::Matrix< T, 1, 6 > dpadsiga = {-1.0 / 3.0, -1.0 / 3.0, -1.0 / 3.0, 0.0, 0.0, 0.0}
Eigen::Matrix< T, 1, 6 > dqadtaua = Eigen::Matrix<T, 1, 6>::Zero()
Eigen::Matrix< T, 6, 6 > dtauadsiga
Protected Attributes inherited from constitutive::ConstitutiveModelBase< T >
T _e0 = 0.0
 original void ratio

Detailed Description

template<typename T>
struct elastoplastic::core::StiffnessBase< T >

Base class for stiffness.

Member Function Documentation

◆ compliance()

template<typename T>
virtual Eigen::Matrix< T, 6, 6 > elastoplastic::core::StiffnessBase< T >::compliance ( const StateVariable< T > & sv0,
StateVariable< T > & sv )
inlineprotectedvirtual

Reimplemented in elastoplastic::core::HookeLaw< T >.

References constitutive::ConstitutiveModelBase< T >::stiffness().

Here is the call graph for this function:

◆ E()

◆ G()

◆ K()

template<typename T>
T elastoplastic::core::StiffnessBase< T >::K ( const StateVariable< T > & sv0,
const StateVariable< T > & sv ) const
inline

References E(), and nu().

Referenced by processStiffness(), elastoplastic::core::HookeLaw< T >::stiffness(), and elastoplastic::core::Homogenization< T >::stiffness_kinematic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lame()

template<typename T>
T elastoplastic::core::StiffnessBase< T >::lame ( const StateVariable< T > & sv0,
const StateVariable< T > & sv ) const
inline

References E(), and nu().

Referenced by processStiffness(), elastoplastic::core::HookeLaw< T >::stiffness(), and elastoplastic::core::Homogenization< T >::stiffness_kinematic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ M()

template<typename T>
T elastoplastic::core::StiffnessBase< T >::M ( const StateVariable< T > & sv0,
const StateVariable< T > & sv ) const
inline

◆ nu()

◆ processStiffness()

template<typename T>
std::pair< T, T > elastoplastic::core::StiffnessBase< T >::processStiffness ( )
inline

References E(), G(), K(), lame(), M(), elastoplastic::core::ElastoplasticModel< T >::material, and nu().

Here is the call graph for this function:

◆ stressFunction()

◆ voidRatioFunction()

template<typename T>
T elastoplastic::core::StiffnessBase< T >::voidRatioFunction ( const StateVariable< T > & sv0,
const StateVariable< T > & sv ) const
inlineprotected

The documentation for this struct was generated from the following file: