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

Base class for elastoplastic contact laws. More...

#include <contactlaw.hpp>

Inheritance diagram for micromechanical::core::ElastoplasticContactLaw< T >:
Collaboration diagram for micromechanical::core::ElastoplasticContactLaw< T >:

Public Member Functions

void setPlasticMethod (const std::string &method)
 set the plastic method
Public Member Functions inherited from micromechanical::core::ContactLawBase< T >
 ContactLawBase (const std::unordered_map< std::string, T > &props={})
 constructor
virtual ~ContactLawBase ()=default
 destructor
virtual std::vector< std::string > symmetricContactScalars () const
 Symmetric contact scalar variables.
virtual std::vector< std::string > symmetricContactVectors () const
 Symmetric contact vector variables.
virtual void initialize (StateVariable< T > &sv)
 initialize the contact law
T frictionCoefficient (const int idx, const StateVariable< T > &sv0, StateVariable< T > &sv) const
 calculate the friction coefficient combined with different criteria
Eigen::Matrix< T, 3, 3 > forceDisplacement (const int idx, Eigen::Matrix< T, 3, 1 > &ddisp, Eigen::Matrix< T, 3, 3 > &Ke, const StateVariable< T > &sv0, StateVariable< T > &sv)
 integrate the force-displacement relation
virtual Eigen::Matrix< T, 3, 3 > elasticStiffness (const int idx, T fn, const StateVariable< T > &sv0, StateVariable< T > &sv)=0
 Calculate the elastic stiffness matrix.
virtual T CSL (const int idx, const StateVariable< T > &sv0, StateVariable< T > &sv) const
 calculate the critical state line
virtual T yieldFunction (const int idx, const T fn, const T fr, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Yield function for elastoplastic contact laws.
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > yieldFunctions (const int idx, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &fn, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &fr, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Calculate yield function for multiple times.
Eigen::Matrix< T, 3, 1 > dfdforce0 (const int idx, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the force.
virtual Eigen::Matrix< T, 3, 1 > dfdforce (const int idx, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the force.
virtual T potentialFunction (const int idx, const T fn, const T fr, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Potential function for elastoplastic contact laws.
Eigen::Matrix< T, 3, 1 > dgdforce0 (const int idx, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the potential function with respect to the force.
virtual Eigen::Matrix< T, 3, 1 > dgdforce (const int idx, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the potential function with respect to the force.
virtual Eigen::Matrix< T, 3, 1 > plasticModulus0 (const int idx, const Eigen::Matrix< T, 3, 1 > &dgdforce, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Plastic modulus for elastoplastic contact laws.
virtual T plasticModulus (const int idx, const Eigen::Matrix< T, 3, 1 > &dgdforce, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Plastic modulus for elastoplastic contact laws, including dgdforce.
T plasticModulus1 (const int idx, const Eigen::Matrix< T, 3, 1 > &dgdforce, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Plastic modulus for elastoplastic contact laws, including dgdforce.
virtual void updateHardeningVariables (const int idx, const T dlambda, const Eigen::Matrix< T, 3, 1 > &ddispp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Update the hardening variables.
virtual void yieldFunctionCorrection (const int idx, const Eigen::Matrix< T, 3, 3 > &Ke, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Yield surface correction to keep the force state on the yield surface.
virtual void maintainYieldSurface (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const Eigen::Matrix< T, 3, 1 > &dforce, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Revert state variables from elastic state to maintain the force state on the yield surface.

Public Attributes

std::string plasticMethod = "CPA"
 Plastic method.
Public Attributes inherited from micromechanical::core::ContactLawBase< T >
std::string name = "Undefined"
 Name of the contact law.
std::shared_ptr< Material< T > > material
 Material properties.
int nstatev_custom = 0
 Number of custom state variables.
bool plastic_displacement = false
 Flag to save the plastic displacement in the state variables.
std::shared_ptr< Options< T > > options = std::make_shared<Options<T>>()
 options for the micromechanical model
std::shared_ptr< DebugVariable< T > > debugVariable = std::make_shared<DebugVariable<T>>()
 debug variable
int _phase = 0
 index of the phase
int _step = 0
 current step
int _mixedLoad = 0
 number of mixed load steps
int _integration = 0
 number of integration steps
int _increment = 0
 number of contact increments
int _plasticCorrection = 0
 number of contact plastic corrections

Protected Member Functions

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
Eigen::Matrix< T, 3, 3 > stiffness (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv) override
 calculate the elastoplastic stiffness matrix
Eigen::Matrix< T, 3, 3 > ExplicitCPA (const int idx, const Eigen::Matrix< T, 3, 3 > &Ke, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Explicit method for elastoplastic contact laws.
Eigen::Matrix< T, 3, 3 > CPPM (const int idx, const Eigen::Matrix< T, 3, 3 > &Ke, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 CPPM method for elastoplastic contact laws.
Protected Member Functions inherited from micromechanical::core::ContactLawBase< T >
virtual Eigen::Matrix< T, 3, 3 > integrate (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const Eigen::Matrix< T, 3, 3 > &Ke, const StateVariable< T > &sv0, StateVariable< T > &sv)
 integrate the force-displacement contact law, with a number of increments.
Eigen::Matrix< T, 3, 3 > increment (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const Eigen::Matrix< T, 3, 3 > &Ke, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Calculate one increment.
virtual void check (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 check the convergence of the contact law
virtual void preIntegration (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 pre-processing before the integration
virtual void postIntegration (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 post-processing after the integration
virtual void preIncrement (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 pre-processing before the increment
virtual void postIncrement (const int idx, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 post-processing after the increment
Eigen::Matrix< T, 3, 1 > dfdforce1 (const int idx, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the yield function with respect to the force.
Eigen::Matrix< T, 3, 1 > dgdforce1 (const int idx, const Eigen::Matrix< T, 3, 1 > &dfdforce, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Derivative of the potential function with respect to the force.

Detailed Description

template<typename T>
struct micromechanical::core::ElastoplasticContactLaw< T >

Base class for elastoplastic contact laws.

Member Function Documentation

◆ CPPM()

template<typename T>
Eigen::Matrix< T, 3, 3 > micromechanical::core::ElastoplasticContactLaw< T >::CPPM ( const int idx,
const Eigen::Matrix< T, 3, 3 > & Ke,
const Eigen::Matrix< T, 3, 1 > & ddisp,
const StateVariable< T > & sv0,
StateVariable< T > & sv )
inlineprotected

CPPM method for elastoplastic contact laws.

Parameters
idxindex of the integration point
Kestiffness matrix
ddispdisplacement increment
sv0initial state variable
svstate variable
Returns
the elastoplastic stiffness matrix
Todo
the CPPM method is not implemented yet, fall back to the CPA method

References ExplicitCPA().

Referenced by stiffness().

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

◆ ExplicitCPA()

template<typename T>
Eigen::Matrix< T, 3, 3 > micromechanical::core::ElastoplasticContactLaw< T >::ExplicitCPA ( const int idx,
const Eigen::Matrix< T, 3, 3 > & Ke,
const Eigen::Matrix< T, 3, 1 > & ddisp,
const StateVariable< T > & sv0,
StateVariable< T > & sv )
inlineprotected

Explicit method for elastoplastic contact laws.

Parameters
idxindex of the integration point
Kestiffness matrix
ddispdisplacement increment
sv0initial state variable
svstate variable
Returns
the elastoplastic stiffness matrix

References micromechanical::core::ContactLawBase< T >::_increment, micromechanical::core::ContactLawBase< T >::_integration, micromechanical::core::ContactLawBase< T >::_mixedLoad, micromechanical::core::ContactLawBase< T >::_phase, micromechanical::core::ContactLawBase< T >::_plasticCorrection, micromechanical::core::ContactLawBase< T >::_step, constitutive::StateVariable< T >::cscalars, micromechanical::core::ContactLawBase< T >::debugVariable, micromechanical::core::ContactLawBase< T >::dfdforce(), micromechanical::core::ContactLawBase< T >::dfdforce1(), micromechanical::core::ContactLawBase< T >::dgdforce(), micromechanical::core::ContactLawBase< T >::dgdforce1(), constitutive::StateVariable< T >::disp, constitutive::StateVariable< T >::dispp, constitutive::StateVariable< T >::fn(), constitutive::StateVariable< T >::fnc(), constitutive::StateVariable< T >::force, constitutive::StateVariable< T >::fr(), isExplicit(), micromechanical::core::ContactLawBase< T >::maintainYieldSurface(), micromechanical::core::ContactLawBase< T >::options, micromechanical::core::ContactLawBase< T >::plasticModulus1(), constitutive::StateVariable< T >::scalars, micromechanical::core::ContactLawBase< T >::updateHardeningVariables(), constitutive::StateVariable< T >::vectors, constitutive::StateVariable< T >::w, micromechanical::core::ContactLawBase< T >::yieldFunction(), and micromechanical::core::ContactLawBase< T >::yieldFunctionCorrection().

Referenced by CPPM(), and stiffness().

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

◆ isCPA()

template<typename T>
bool micromechanical::core::ElastoplasticContactLaw< T >::isCPA ( ) const
inlineprotected

check if the plastic method is CPA

Returns
true if the plastic method is CPA, false otherwise

Referenced by stiffness().

Here is the caller graph for this function:

◆ isCPPM()

template<typename T>
bool micromechanical::core::ElastoplasticContactLaw< T >::isCPPM ( ) const
inlineprotected

check if the plastic method is CPPM

Returns
true if the plastic method is CPPM, false otherwise

Referenced by stiffness().

Here is the caller graph for this function:

◆ isExplicit()

template<typename T>
bool micromechanical::core::ElastoplasticContactLaw< T >::isExplicit ( ) const
inlineprotected

check if the plastic method is explicit

Returns
true if the plastic method is explicit, false otherwise

Referenced by ExplicitCPA(), and stiffness().

Here is the caller graph for this function:

◆ setPlasticMethod()

template<typename T>
void micromechanical::core::ElastoplasticContactLaw< T >::setPlasticMethod ( const std::string & method)
inline

set the plastic method

Parameters
methodplastic method, "Explicit", "CPA", or "CPPM"

◆ stiffness()

template<typename T>
Eigen::Matrix< T, 3, 3 > micromechanical::core::ElastoplasticContactLaw< T >::stiffness ( const int idx,
const Eigen::Matrix< T, 3, 1 > & ddisp,
const StateVariable< T > & sv0,
StateVariable< T > & sv )
inlineoverrideprotectedvirtual

calculate the elastoplastic stiffness matrix

Parameters
idxindex of the integration point
ddispdisplacement increment
sv0initial state variable
svstate variable
Returns
the elastoplastic stiffness matrix

Implements micromechanical::core::ContactLawBase< T >.

References CPPM(), constitutive::StateVariable< T >::elasticStiffnessMatrix(), ExplicitCPA(), constitutive::StateVariable< T >::force, isCPA(), isCPPM(), isExplicit(), and constitutive::StateVariable< T >::vectors.

Here is the call graph for this function:

Member Data Documentation

◆ plasticMethod

template<typename T>
std::string micromechanical::core::ElastoplasticContactLaw< T >::plasticMethod = "CPA"

Plastic method.


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