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

Average the microscopic contact force to the macroscopic stress. More...

#include <average.hpp>

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

Public Member Functions

Eigen::Matrix< T, 6, 1 > averageStress (const Eigen::Matrix< T, Eigen::Dynamic, 3 > force, const StateVariable< T > &sv0, StateVariable< T > &sv) override
 Average the micro contact force to macro stress.
Public Member Functions inherited from micromechanical::core::MicromechanicalBase< T >
 MicromechanicalBase (const std::variant< ContactLawType, std::string, ContactLawBase< T > * > &contact, const std::unordered_map< std::string, T > &props={}, T npv=1e9, T radius=0.65e-3)
 constructor
 MicromechanicalBase ()=default
 default constructor
void setContactLaw (const std::variant< ContactLawType, std::string, ContactLawBase< T > * > &contact, const std::unordered_map< std::string, T > &props={})
 Set the contact law if it is not set in the constructor.
virtual Eigen::Matrix< T, 6, 6 > stiffness1 (const StateVariable< T > &sv0, StateVariable< T > &sv, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &kn=std::nullopt, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &ks=std::nullopt, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &kt=std::nullopt)=0
 Compute the stiffness matrix.
virtual Eigen::Matrix< T, Eigen::Dynamic, 3 > localizeStress (const Eigen::Matrix< T, 6, 1 > &sig, const StateVariable< T > &sv0, StateVariable< T > &sv)
 localize the macro stress to micro contact force
virtual Eigen::Matrix< T, Eigen::Dynamic, 3 > localizeStress2 (const Eigen::Matrix< T, 6, 1 > &sig, const StateVariable< T > &sv0, StateVariable< T > &sv, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &kn=std::nullopt, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &ks=std::nullopt, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &kt=std::nullopt)
 localize the macro stress to micro contact force with the kinematic hypothesis, estimated from the strain and contact displacement.
virtual Eigen::Matrix< T, Eigen::Dynamic, 3 > localizeStrain (const Eigen::Matrix< T, 6, 1 > &eps, const StateVariable< T > &sv0, StateVariable< T > &sv)
 localize the macro strain to micro contact displacement
virtual Eigen::Matrix< T, Eigen::Dynamic, 3 > localizeStrain2 (const Eigen::Matrix< T, 6, 1 > &eps, const StateVariable< T > &sv0, StateVariable< T > &sv, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &kn=std::nullopt, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &ks=std::nullopt, const std::optional< Eigen::Matrix< T, Eigen::Dynamic, 1 > > &kt=std::nullopt)
 localize the macro strain to micro contact displacement with the static hypothesis, estimated from the stress and contact force.
virtual Eigen::Matrix< T, 6, 1 > averageStrain (const Eigen::Matrix< T, Eigen::Dynamic, 3 > disp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Average the micro contact displacement to macro strain.
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.

Additional Inherited Members

Public Attributes inherited from micromechanical::core::MicromechanicalBase< T >
std::shared_ptr< ContactLawBase< T > > contact
 contact law
std::shared_ptr< Integration< T > > integration
 gauss integration points
int _integration = 0
 number of integration steps
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 Member Functions inherited from micromechanical::core::MicromechanicalBase< T >
int nstatev () const
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 postProcess (StateVariable< T > &sv) override
 Post-process the state variables.
void preStressStrainIntegrate (const StateVariable< T > &sv0, StateVariable< T > &sv) override
 Pre-processing before the stress-strain integration.
void postIncrement (const StateVariable< T > &sv0, StateVariable< T > &sv) override
 Post-processing after the increment.
void contactIntegrates (const Eigen::Matrix< T, Eigen::Dynamic, 3 > &dforce, const Eigen::Matrix< T, Eigen::Dynamic, 3 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv)
 Integrate all the contact laws with cache.
virtual Eigen::Matrix< T, 3, 3 > contactIntegrate (const int idx, const Eigen::Matrix< T, 3, 1 > &dforce, const Eigen::Matrix< T, 3, 1 > &ddisp, const StateVariable< T > &sv0, StateVariable< T > &sv) const =0
 Integrate the contact law.
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.
virtual bool converged (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Whether the current stress state can be accepted as converged, used for elastoplastic substepping.
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 postStressStrainIntegrate (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Post-processing after the stress-strain integration.
virtual void preIncrement (const StateVariable< T > &sv0, StateVariable< T > &sv)
 Pre-processing before the increment.
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
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 micromechanical::core::LoveWeberAveraging< T >

Average the microscopic contact force to the macroscopic stress.

Member Function Documentation

◆ averageStress()

template<typename T>
Eigen::Matrix< T, 6, 1 > micromechanical::core::LoveWeberAveraging< T >::averageStress ( const Eigen::Matrix< T, Eigen::Dynamic, 3 > force,
const StateVariable< T > & sv0,
StateVariable< T > & sv )
inlineoverridevirtual

Average the micro contact force to macro stress.

Parameters
forcemicro contact force
sv0initial state variable
svstate variable
Returns
macro stress

Reimplemented from micromechanical::core::MicromechanicalBase< T >.

References micromechanical::core::MicromechanicalBase< T >::integration, and constitutive::mat2vec().

Referenced by micromechanical::ChangHicher< T >::stressStrainIntegrate1().

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

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