micromechanical (C++)
|
Base class for micromechanical models. More...
#include <micromechanical.hpp>
Public Member Functions | |
MicromechanicalBase (ContactLawBase< T > *contact, const std::map< std::string, T > &props={}, T npv=1e9, T radius=0.65e-3) | |
constructor | |
MicromechanicalBase (ContactLawType type, const std::map< std::string, T > &props={}, T npv=1e9, T radius=0.65e-3) | |
constructor | |
MicromechanicalBase (const std::string &path, const std::map< std::string, T > &props={}, T npv=1e9, T radius=0.65e-3) | |
constructor | |
MicromechanicalBase ()=default | |
default constructor | |
virtual | ~MicromechanicalBase ()=default |
destructor | |
void | setContactLaw (ContactLawType type, const std::map< std::string, T > &props={}) |
Set the contact law if it is not set in the constructor. | |
void | setContactLaw (const std::string &path, const std::map< std::string, T > &props={}) |
Set the contact law if it is not set in the constructor. | |
void | setContactLaw (ContactLawBase< T > *contact) |
Set the contact law if it is not set in the constructor. | |
std::vector< StateVariable< T > > | run () |
Run the micromechanical model. | |
void | umat (const T *dstran, T *stress, T *statev, T *ddsdde=nullptr, const bool initialize=false, const bool normalize_ddsdde=true) |
ABAQUS UMAT interface. | |
void | vumat (const int nBlock, const T *strainInc, const T *stressOld, T *stressNew, const T *stateOld, T *stateNew, const bool initialize=false) |
ABAQUS VUMAT interface. | |
Public Attributes | |
std::shared_ptr< ContactLawBase< T > > | contact |
contact law | |
std::shared_ptr< Integration< T > > | integration |
gauss integration points | |
std::shared_ptr< Load< T > > | load |
load | |
std::shared_ptr< DebugVariable< T > > | debugVariable = std::shared_ptr<DebugVariable<T>>(nullptr) |
debug variable | |
std::string | name = "Undefined" |
name of the model | |
std::vector< StateVariable< T > > | stateVars = {} |
state variables of the current run | |
std::shared_ptr< Options< T > > | options = std::shared_ptr<Options<T>>(nullptr) |
options for the micromechanical model | |
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 | |
Protected Member Functions | |
int | nstatev () const |
StateVariable< T > | initialize () |
Initialize the state variables. | |
virtual void | postInitialize (StateVariable< T > &sv) |
Post-initialize the state variables. | |
void | postProcess (StateVariable< T > &sv) |
Post-process the state variables. | |
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. | |
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)=0 |
Compute one increment. | |
void | fabricEvolution (const StateVariable< T > &sv0, StateVariable< T > &sv) |
Compute the fabric evolution. | |
virtual Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | stiffness (const StateVariable< T > &sv0, const StateVariable< T > &sv, const Eigen::Matrix< T, Eigen::Dynamic, 1 > kn=Eigen::Matrix< T, Eigen::Dynamic, 1 >::Zero(0, 1), const Eigen::Matrix< T, Eigen::Dynamic, 1 > ks=Eigen::Matrix< T, Eigen::Dynamic, 1 >::Zero(0, 1), bool original=false)=0 |
Compute the stiffness matrix. | |
virtual void | macroMicroIntegrate (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)=0 |
Integrate the macro-micro relation. | |
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 void | contactIntegrate (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. | |
virtual Eigen::Matrix< T, Eigen::Dynamic, 3 > | localizeStress (const Eigen::Matrix< T, 6, 1 > &sig, const StateVariable< T > &sv0, StateVariable< T > &sv) |
localize the marcro stress to micro contact force | |
virtual Eigen::Matrix< T, Eigen::Dynamic, 3 > | localizeStrain (const Eigen::Matrix< T, 6, 1 > &eps, const StateVariable< T > &sv0, StateVariable< T > &sv) |
localize the marcro strain to micro contact displacement | |
virtual Eigen::Matrix< T, 6, 1 > | averageStress (const Eigen::Matrix< T, Eigen::Dynamic, 3 > force, const StateVariable< T > &sv0, StateVariable< T > &sv) |
Average the micro contact force to macro stress. | |
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. | |
Base class for micromechanical models.
|
inlineexplicit |
constructor
contact | contact law |
props | material properties |
npv | number of integration points |
radius | radius of the particle |
|
inlineexplicit |
constructor
type | contact law type |
props | material properties |
npv | number of integration points |
radius | radius of the particle |
|
inlineexplicit |
constructor
path | path to the contact law plugin |
props | material properties |
npv | number of integration points |
radius | radius of the particle |
|
default |
default constructor
|
virtualdefault |
destructor
|
inlineprotectedvirtual |
Average the micro contact displacement to macro strain.
disp | micro contact displacement |
sv0 | initial state variable |
sv | state variable |
Reimplemented in micromechanical::core::BestFitAveraging< T >.
|
inlineprotectedvirtual |
Average the micro contact force to macro stress.
force | micro contact force |
sv0 | initial state variable |
sv | state variable |
Reimplemented in micromechanical::core::LoveWeberAveraging< T >.
|
protectedpure virtual |
Integrate the contact law.
idx | index of the integration point |
dforce | force increment |
ddisp | displacement increment |
sv0 | initial state variable |
sv | state variable |
Implemented in micromechanical::ChangHicher< T >.
|
inlineprotected |
Integrate all the contact laws with cache.
dforce | force increment |
ddisp | displacement increment |
sv0 | initial state variable |
sv | state variable |
Referenced by micromechanical::ChangHicher< T >::macroMicroIntegrate().
|
inlineprotected |
Compute the fabric evolution.
sv0 | state variables at the beginning of the increment |
sv | state variables at the end of the increment |
Referenced by micromechanical::core::MixedLoadControl< T >::increment().
|
protectedpure virtual |
Compute one increment.
dx | mixed stress/strain increment, pure strain in finite element analysis |
x | mixed stress/strain |
S | stress control matrix |
E | strain control matrix |
G | ignored control matrix |
sv0 | state variables at the beginning of the increment |
sv | state variables at the end of the increment |
Implemented in micromechanical::core::MixedLoadControl< T >.
|
inlineprotected |
Initialize the state variables.
|
inlineprotectedvirtual |
localize the marcro strain to micro contact displacement
eps | macro strain |
sv0 | initial state variable |
sv | state variable |
Reimplemented in micromechanical::core::KinematicHypothesisLocalization< T >.
|
inlineprotectedvirtual |
localize the marcro stress to micro contact force
sig | macro stress |
sv0 | initial state variable |
sv | state variable |
Reimplemented in micromechanical::core::StaticHypothesisLocalization< T >.
|
protectedpure virtual |
Integrate the macro-micro relation.
K | stiffness matrix |
dsig | stress increment |
deps | strain increment |
sv0 | initial state variable |
sv | state variable |
Implemented in micromechanical::ChangHicher< T >.
Referenced by micromechanical::core::MixedLoadControl< T >::increment().
|
inlineprotected |
|
inlineprotectedvirtual |
Post-initialize the state variables.
sv | state variables |
|
inlineprotected |
Post-process the state variables.
sv | state variables |
|
inlineprotected |
Reset the custom state variables to zeros existing in the current state variables but not in the initial state variables.
sv0 | initial state variables |
sv | current state variables |
|
inline |
Run the micromechanical model.
|
inline |
Set the contact law if it is not set in the constructor.
path | path to the contact law plugin |
props | material properties |
|
inline |
Set the contact law if it is not set in the constructor.
contact | contact law |
|
inline |
Set the contact law if it is not set in the constructor.
type | contact law type |
props | material properties |
|
protectedpure virtual |
Compute the stiffness matrix.
sv0 | initial state variable |
sv | state variable |
kn | contact normal stiffness |
ks | contact shear stiffness |
original | return the original 9x9 stiffness matrix |
Implemented in micromechanical::ChangHicher< T >.
Referenced by micromechanical::core::MixedLoadControl< T >::linearize().
|
inline |
ABAQUS UMAT interface.
dstran | strain increment |
stress | stress |
statev | state variables |
ddsdde | stiffness matrix |
initialize | whether to initialize the static variables |
normalize_ddsdde | whether to normalize the stiffness matrix, since the strain increment from ABAQUS is engineering strain which is twice of the tensorial shear strain |
ddsdde
can be nullptr for compatible with ABAQUS VUMAT interface
|
inline |
ABAQUS VUMAT interface.
nBlock | number of blocks |
strainInc | strain increment, read only |
stressOld | old stress, read only |
stressNew | new stress |
stateOld | old state variables, read only |
stateNew | new state variables |
initialize | whether to initialize the static variables |
int micromechanical::core::MicromechanicalBase< T >::_integration = 0 |
number of integration steps
Referenced by micromechanical::ChangHicher< T >::macroMicroIntegrate().
int micromechanical::core::MicromechanicalBase< T >::_mixedLoad = 0 |
number of mixed load steps
Referenced by micromechanical::core::MixedLoadControl< T >::increment(), and micromechanical::ChangHicher< T >::macroMicroIntegrate().
int micromechanical::core::MicromechanicalBase< T >::_phase = 0 |
index of the phase
Referenced by micromechanical::core::MixedLoadControl< T >::increment(), and micromechanical::ChangHicher< T >::macroMicroIntegrate().
int micromechanical::core::MicromechanicalBase< T >::_step = 0 |
current step
Referenced by micromechanical::core::MixedLoadControl< T >::increment(), and micromechanical::ChangHicher< T >::macroMicroIntegrate().
std::shared_ptr<ContactLawBase<T> > micromechanical::core::MicromechanicalBase< T >::contact |
std::shared_ptr<DebugVariable<T> > micromechanical::core::MicromechanicalBase< T >::debugVariable = std::shared_ptr<DebugVariable<T>>(nullptr) |
debug variable
Referenced by micromechanical::core::MixedLoadControl< T >::increment(), and micromechanical::ChangHicher< T >::macroMicroIntegrate().
std::shared_ptr<Integration<T> > micromechanical::core::MicromechanicalBase< T >::integration |
gauss integration points
Referenced by micromechanical::core::BestFitAveraging< T >::averageStrain(), micromechanical::core::LoveWeberAveraging< T >::averageStress(), micromechanical::core::KinematicHypothesisLocalization< T >::localizeStrain(), micromechanical::core::StaticHypothesisLocalization< T >::localizeStress(), micromechanical::ChangHicher< T >::macroMicroIntegrate(), and micromechanical::ChangHicher< T >::stiffness().
std::shared_ptr<Load<T> > micromechanical::core::MicromechanicalBase< T >::load |
std::string micromechanical::core::MicromechanicalBase< T >::name = "Undefined" |
name of the model
std::shared_ptr<Options<T> > micromechanical::core::MicromechanicalBase< T >::options = std::shared_ptr<Options<T>>(nullptr) |
options for the micromechanical model
Referenced by micromechanical::ChangHicher< T >::adaptiveIntegrationSubstepping(), micromechanical::core::BestFitAveraging< T >::averageStrain(), micromechanical::core::LoveWeberAveraging< T >::averageStress(), micromechanical::core::MixedLoadControl< T >::checkConvergence(), micromechanical::ChangHicher< T >::contactIntegrate(), micromechanical::core::MixedLoadControl< T >::increment(), micromechanical::core::KinematicHypothesisLocalization< T >::localizeStrain(), micromechanical::core::StaticHypothesisLocalization< T >::localizeStress(), micromechanical::ChangHicher< T >::macroMicroIntegrate(), and micromechanical::ChangHicher< T >::stiffness().
std::vector<StateVariable<T> > micromechanical::core::MicromechanicalBase< T >::stateVars = {} |
state variables of the current run