types
__all__
module-attribute
__all__ = [
"ChangHicher",
"ConstitutiveModelBase",
"ContactLawBase",
"ContactLawRegistry",
"CoulombContactLaw",
"DebugVariable",
"Elastic",
"ElasticContactLaw",
"ElastoplasticContactLaw",
"ElastoplasticMaterial",
"ElastoplasticModel",
"ElastoplasticModelBase",
"ExponentialContactLaw",
"FabricTensor",
"HyperbolicContactLaw",
"HypoplasticContactLaw",
"Integration",
"J2Yang",
"KinematicHomogenization",
"LoadPhase",
"Load",
"Material",
"MaterialBase",
"MCCContactLaw",
"MicromechanicalBase",
"MicromechanicalRegistry",
"MohrCoulomb",
"NonlinearElasticContactLaw",
"Options",
"OSIMSANDContactLaw",
"SANISANDContactLaw",
"Scalar",
"SIMSAND",
"SIMSANDContactLaw",
"StateVariable",
"StaticHomogenization",
"Vector",
"contact_registry",
"elastoplastic_registry",
"mat2vec",
"micromechanical_registry",
"vec2mat",
]
contact_registry
module-attribute
contact_registry: Registry[str, Type[ContactLawBase]] = Registry()
elastoplastic_registry
module-attribute
elastoplastic_registry: Registry[str, Type[ElastoplasticModel]] = Registry()
micromechanical_registry
module-attribute
micromechanical_registry: Registry[str, Type[MicromechanicalBase]] = Registry()
ChangHicher
Bases: LoveWeberAveraging, BestFitAveraging, StaticHypothesisLocalization, KinematicHypothesisLocalization
Abstract class for the Chang-Hicher model, define the createContactLaw method and contact property
annotation.
The Stress-strain relation of the Chang-Hicher model is given by:
where \(K_{jl}^c\) is the elastic stiffness matrix of the contact law, \(l_i^c\) is the unit vector pointing from the center of the contact area to the contact point, \(A\) is the fabric tensor, and \(V\) is the volume of the representative volume element.
The macro-micro integration algorithm is given by:
Calculated the contact force increment from the stress increment based on the static hypothesis:
Calculate the contact displacement increment from the contact force increment based on the elastic trial:
Update the contact force increment based on the contact law:
Update the stress increment based on the Love-Weber formula:
Update contact force from the stress increment based on the static hypothesis:
Calculate the unbalanced force:
Set the force increment to the unbalanced force and repeat the steps from the second step until the unbalanced force is small enough.
contactIntegrate
contactIntegrate(
idx: int,
dforce: ndarray,
ddisp: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> ndarray
maxYieldFunction
maxYieldFunction(sv0: StateVariable, sv: StateVariable)
Determine the maximum yield function value
stiffness1
stiffness1(
sv0: StateVariable,
sv: StateVariable,
kn: ndarray = None,
ks: ndarray = None,
kt: ndarray = None,
) -> ndarray
stress2force
stress2force(idx: int, sv0: StateVariable, sv: StateVariable)
Transformation matrix converting from stress increment to force increment
stressStrainIntegrate
stressStrainIntegrate(
K: ndarray,
dsig: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> None
stressStrainIntegrate1
stressStrainIntegrate1(
K: ndarray,
dsig: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> None
updateHardeningVariables
updateHardeningVariables(
ddlambda: float, ddepsp: ndarray, sv0: StateVariable, sv: StateVariable
)
yieldFunctionCorrection
yieldFunctionCorrection(
K: ndarray, deps: ndarray, sv0: StateVariable, sv: StateVariable
)
ConstitutiveModelBase
Base class for all constitutive models.
custom_loading_direction
instance-attribute
custom_loading_direction: MatrixXf
Custom loading direction
checkStiffnessMatrix
checkStiffnessMatrix(
K: ndarray,
check_positive_definite: bool = None,
check_non_singularity: bool = None,
) -> bool
Check whether the stiffness matrix is valid.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
check_positive_definite
|
Whether to check the positive definiteness of the stiffness matrix.
TYPE:
|
check_non_singularity
|
Whether to check the non-singularity of the stiffness matrix.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the stiffness matrix is valid. |
consistentElastoplasticStiffness
consistentElastoplasticStiffness(
K: ndarray,
sv0: StateVariable,
sv: StateVariable,
check_elastic_state: bool = True,
check_positive_definite: bool = None,
check_non_singularity: bool = None,
) -> ndarray
Calculate the consistent elastoplastic stiffness matrix.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variable.
TYPE:
|
check_elastic_state
|
Whether to check if the current stress state is elastic.
TYPE:
|
check_positive_definite
|
Whether to check the positive definiteness of the elastoplastic stiffness matrix.
TYPE:
|
check_non_singularity
|
Whether to check the non-singularity of the elastoplastic stiffness matrix.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The consistent elastoplastic stiffness matrix. |
continuumElastoplasticStiffness
continuumElastoplasticStiffness(
K: ndarray,
sv0: StateVariable,
sv: StateVariable,
check_elastic_state: bool = True,
check_positive_definite: bool = None,
check_non_singularity: bool = None,
) -> ndarray
Calculate the continuum elastoplastic stiffness matrix.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variable.
TYPE:
|
check_elastic_state
|
Whether to check if the current stress state is elastic.
TYPE:
|
check_positive_definite
|
Whether to check the positive definiteness of the elastoplastic stiffness matrix.
TYPE:
|
check_non_singularity
|
Whether to check the non-singularity of the elastoplastic stiffness matrix.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The continuum elastoplastic stiffness matrix. |
elastoplasticStiffness
elastoplasticStiffness(
K: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
check_elastic_state: bool = True,
check_positive_definite: bool = None,
check_non_singularity: bool = None,
) -> ndarray
Calculate the elastoplastic stiffness matrix.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
The strain increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variable.
TYPE:
|
check_elastic_state
|
Whether to check if the current stress state is elastic.
TYPE:
|
check_positive_definite
|
Whether to check the positive definiteness of the elastoplastic stiffness matrix.
TYPE:
|
check_non_singularity
|
Whether to check the non-singularity of the elastoplastic stiffness matrix.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The elastoplastic stiffness matrix. |
increment
increment(
dx: ndarray,
x: ndarray,
S: ndarray,
E: ndarray,
G: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> ndarray
initialize
initialize(sv: StateVariable)
Initialize the state variables.
| PARAMETER | DESCRIPTION |
|---|---|
sv
|
A StateVariable object to be initialized.
TYPE:
|
linearize
linearize(
K: ndarray,
dx: ndarray,
S: ndarray,
E: ndarray,
G: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> Tuple[ndarray, ndarray]
Calculate the incremental stress/strain tensor based on mixed load control.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The elastic stiffness matrix.
TYPE:
|
dx
|
The mixed unbalanced load increment.
TYPE:
|
S
|
The stress control matrix.
TYPE:
|
E
|
The strain control matrix.
TYPE:
|
G
|
The ignored control matrix.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The stress increment. |
ndarray
|
The strain increment. |
loadingDirection
loadingDirection(sv0: StateVariable, sv: StateVariable) -> ndarray
Loading direction
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
The initial state variables.
TYPE:
|
sv
|
The current state variables.
TYPE:
|
postIncrement
postIncrement(sv0: StateVariable, sv: StateVariable)
Post-processing after the increment
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
postInitialize
postInitialize(sv: StateVariable) -> None
Post-initialize the state variables.
| PARAMETER | DESCRIPTION |
|---|---|
sv
|
The state variables.
TYPE:
|
postProcess
postProcess(sv: StateVariable) -> None
Post-process the state variables.
| PARAMETER | DESCRIPTION |
|---|---|
sv
|
The state variables.
TYPE:
|
postStressStrainIntegrate
postStressStrainIntegrate(sv0: StateVariable, sv: StateVariable)
Post-processing after the stress-strain integration
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
preIncrement
preIncrement(sv0: StateVariable, sv: StateVariable)
Pre-processing before the increment
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
preStressStrainIntegrate
preStressStrainIntegrate(sv0: StateVariable, sv: StateVariable)
Pre-processing before the stress-strain integration
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
resetCustomStateVariables
resetCustomStateVariables(sv0: StateVariable, sv: StateVariable)
Reset the custom state variables to zeros existing in the current state variables but not in the initial state variables.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
The initial state variables.
TYPE:
|
sv
|
The current state variables.
TYPE:
|
run
run() -> List[StateVariable]
Run the model.
| RETURNS | DESCRIPTION |
|---|---|
List[StateVariable]
|
The state variables. |
saveElasticStiffnessMatrix
saveElasticStiffnessMatrix(sv0: StateVariable, sv: StateVariable)
Save elastic stiffness matrix.
stiffness
stiffness(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate the stiffness matrix.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variable.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The elastic stiffness matrix. |
stressStrainIntegrate
stressStrainIntegrate(
K: ndarray,
dsig: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> None
Stress-strain integration.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
dsig
|
The stress increment.
TYPE:
|
deps
|
The strain increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
symmetricContinuumElastoplasticStiffness
symmetricContinuumElastoplasticStiffness(
K: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
check_elastic_state: bool = True,
check_positive_definite: bool = None,
check_non_singularity: bool = None,
) -> ndarray
Calculate the symmetric continuum elastoplastic stiffness matrix.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
The strain increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variable.
TYPE:
|
check_elastic_state
|
Whether to check if the current stress state is elastic.
TYPE:
|
check_positive_definite
|
Whether to check the positive definiteness of the elastoplastic stiffness matrix.
TYPE:
|
check_non_singularity
|
Whether to check the non-singularity of the elastoplastic stiffness matrix.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The symmetric continuum elastoplastic stiffness matrix. |
updateVoidRatio
updateVoidRatio(e0: float, sv: StateVariable) -> float
Update the void ratio after the isotropic loading to the void ratio before the isotropic loading.
ContactLawBase
Base class for contact laws. Define the relationship between the force and displacement increment
CSL
CSL(idx: int, sv0: StateVariable, sv: StateVariable) -> float
Calculate critical void ratio. You must define the critical void ratio in the elastoplastic contact law, but it is not necessary for the nonlinear elastic contact law, though you can still define it to use in the nonlinear integration method.
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ec
|
Critical void ratio
TYPE:
|
__init__
Constructor for the base class of all contact laws.
check
check(idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable)
Check the increment is reasonable
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
dfdforce
dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the force:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdforce
|
Derivative of yield function with respect to the force
TYPE:
|
dfdforce0
dfdforce0(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the force:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdforce
|
Derivative of yield function with respect to the force
TYPE:
|
dfdforce1
dfdforce1(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the force:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdforce
|
Derivative of yield function with respect to the force
TYPE:
|
dgdforce
dgdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of potential function with respect to the force:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dgdforce
|
Derivative of potential function with respect to the force
TYPE:
|
dgdforce0
dgdforce0(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of potential function with respect to the force:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dgdforce
|
Derivative of potential function with respect to the force
TYPE:
|
dgdforce1
dgdforce1(
idx: int, dfdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Calculate derivative of potential function with respect to the force:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
dfdforce
|
Derivative of yield function with respect to the force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dgdforce
|
Derivative of potential function with respect to the force
TYPE:
|
elasticStiffness
elasticStiffness(
idx: int, fn: float, sv0: StateVariable, sv: StateVariable
) -> ndarray
Calculate the elastic stiffness matrix, a 3x3 matrix in the following form:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
fn
|
Normal force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Ke
|
Elastic stiffness matrix
TYPE:
|
forceDisplacement
forceDisplacement(
idx: int, ddisp: ndarray, Ke: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Integrate the force-displacement contact law, update the following variables:
sv.force: force
The following steps are performed:
- Go to the last step if the displacement increment is zero
preIntegration: called before the integrationintegrate: integrate the force-displacement contact law to update the contact forcepostIntegration: called after the integration
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
Ke
|
Elastic stiffness matrix
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The stiffness matrix |
frictionCoefficient
frictionCoefficient(idx: int, sv0: StateVariable, sv: StateVariable) -> float
Calculate the friction coefficient combined with different criteria.
increment
increment(
idx: int, ddisp: ndarray, Ke: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Increment the displacement and calculate the force. The following steps are performed:
preIncrement: called before the increment- Return the stiffness matrix if the displacement increment is zero
disp += ddisp: update the displacementK = stiffness: calculate the stiffness matrixforce += K @ ddisp: update the forcecheck: check the convergencepostIncrement: called after the increment
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
Ke
|
Elastic stiffness matrix
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The stiffness matrix |
initialize
initialize(sv: StateVariable)
Initialize the state variables for the contact law
| RETURNS | DESCRIPTION |
|---|---|
sv
|
Initial state variables
TYPE:
|
integrate
integrate(
idx: int, ddisp: ndarray, Ke: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Integrate the force-displacement contact law, with a number of increments.
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment calculated from the elastic trial from the force increment
TYPE:
|
Ke
|
Elastic stiffness matrix
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The stiffness matrix at the end of the increment |
maintainYieldSurface
maintainYieldSurface(
idx: int,
ddisp: ndarray,
dforce: ndarray,
sv0: StateVariable,
sv: StateVariable,
)
Revert state variables from elastic state to maintain the force state on the yield surface
Notes
This method should be overridden when the force state is already plastic, but the mixed load iteration converges to the elastic state. This is similar to the yield surface correction method, but the force state is in the elastic region initially caused by the mixed load iteration. However, previous mixed load iteration indicates that the force state is already in the plastic region. This method is used to update the state variables to keep the force state on the yield surface.
If you override this method, make sure to initialize the sv.cscalars["plastic"] state variable to an array
of zeros with the same size as the number of integration points in the initialize method of the contact law.
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
Displacement increment
TYPE:
|
dforce
|
Force increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
plasticModulus
plasticModulus(
idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> float
Plastic modulus in the equation of plastic multiplier including dgdforce, coefficient of plastic multiplier:
make sure to define the derivative of plastic multiplier with respect to plastic displacement dkappa_ddispp
(\(\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p}\)) attribute in this class since it will be used in
the updateHardeningVariables method to update hardening variables.
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
dgdforce
|
Derivative of potential function with respect to the force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Kp
|
Plastic modulus in the equation of plastic multiplier
TYPE:
|
plasticModulus0
plasticModulus0(
idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Plastic modulus in the equation of plastic multiplier, coefficient of plastic multiplier:
make sure to define the derivative of plastic multiplier with respect to plastic displacement dkappa_ddispp
(\(\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p}\)) attribute in this class since it will be used in
the updateHardeningVariables method to update hardening variables.
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
dgdforce
|
Derivative of potential function with respect to the force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Kp
|
Plastic modulus in the equation of plastic multiplier
TYPE:
|
plasticModulus1
plasticModulus1(
idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> float
Plastic modulus in the equation of plastic multiplier including dgdforce, coefficient of plastic multiplier:
make sure to define the derivative of plastic multiplier with respect to plastic displacement dkappa_ddispp
(\(\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p}\)) attribute in this class since it will be used in
the updateHardeningVariables method to update hardening variables.
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
dgdforce
|
Derivative of potential function with respect to the force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Kp
|
Plastic modulus in the equation of plastic multiplier
TYPE:
|
postIncrement
postIncrement(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Post-processing after each increment for the contact law
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
postIntegration
postIntegration(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Post-processing after the contact integration
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
potentialFunction
potentialFunction(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
Calculate potential function. You are required to define the potential function of the contact force and the state variables:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
fn
|
Normal force
TYPE:
|
fr
|
Shear force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Value of the potential function |
preIncrement
preIncrement(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Pre-processing before each increment for the contact law
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
preIntegration
preIntegration(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Pre-processing before the contact integration
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
ddisp
|
The displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
stiffness
stiffness(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Stiffness matrix for the contact law. You are required to define the nonlinear relationship between the force and displacement increment:
updateHardeningVariables
updateHardeningVariables(
idx: int,
dlambda: float,
ddispp: ndarray,
sv0: StateVariable,
sv: StateVariable,
)
Update hardening variables, the derivative of plastic multiplier with respect to plastic strain is available
in the dkappa_ddispp (:math:\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p}) attribute:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
dlambda
|
Plastic multiplier
TYPE:
|
ddispp
|
Plastic displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
yieldFunction
yieldFunction(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
Calculate yield function. You are required to define the yield function of the contact force and the state variables:
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
fn
|
Normal force
TYPE:
|
fr
|
Shear force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Value of the yield function |
yieldFunctionCorrection
yieldFunctionCorrection(
idx: int, Ke: ndarray, sv0: StateVariable, sv: StateVariable
)
Update state variables after every plastic increment to keep the force state on the yield surface
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
Ke
|
The stiffness matrix
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
yieldFunctions
yieldFunctions(
idx: int, fn: ndarray, fr: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Calculate yield function for multiple times
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
fn
|
Normal force
TYPE:
|
fr
|
Shear force
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Values of the yield function |
ContactLawRegistry
contact_law_name
staticmethod
Get the name of a contact law enum value
contact law type
C++: micromechanical::contacts::ContactLawRegistry
CoulombContactLaw
Bases: ElastoplasticContactLaw, ConstantStiffness
Coulomb contact law.
yieldFunction
yieldFunction(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
DebugVariable
enables
instance-attribute
Whether to enable debug information for specific fields
scalars
instance-attribute
scalars: Dict[str, List[Scalar]] = numba.typed.Dict.empty(
numba.types.string, ScalarListType
)
Scalar debug information
vectors
instance-attribute
vectors: Dict[str, List[Vector]] = numba.typed.Dict.empty(
numba.types.string, ScalarListType
)
Vector debug information
appendVector
appendVector(field: str, index: dict, value: VectorXf)
Append vector debug information.
Elastic
ElasticContactLaw
ElastoplasticContactLaw
Bases: ContactLawBase
Base class for elastoplastic contact laws.
CPPM
CPPM(
idx: int, Ke: ndarray, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Solve plastic problem (plastic strain) with the closest point projection method (CPPM)
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
Ke
|
The stiffness matrix
TYPE:
|
ddisp
|
Displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Kep
|
Elasto-plastic stiffness matrix
TYPE:
|
ExplicitCPA
ExplicitCPA(
idx: int, Ke: ndarray, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
Solve plastic problem (plastic strain) with the explicit or cutting plane algorithm (CPA)
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
Ke
|
The stiffness matrix
TYPE:
|
ddisp
|
Displacement increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Kep
|
Elasto-plastic stiffness matrix
TYPE:
|
setPlasticMethod
Set the plastic method
| PARAMETER | DESCRIPTION |
|---|---|
method
|
The plastic method
TYPE:
|
ElastoplasticMaterial
Bases: MaterialBase
Elastoplastic model material properties.
Lambda
instance-attribute
slope of the critical state line
ea
instance-attribute
A parameter in the anisotropic state parameter
epsilon
instance-attribute
Meridional eccentricity, that defines the rate at which the hyperbolic function approaches the asymptote (the flow potential tends to a straight line in the meridional stress plane as the meridional eccentricity tends to zero)
kp
instance-attribute
a parameter in the yield surface of SIMSAND model
me
instance-attribute
Critical stress ratio for triaxial extension
phid
instance-attribute
Friction angle for stress-dilatancy relationship
ElastoplasticModel
Bases: ElastoplasticModelBase
fabric
instance-attribute
fabric: FabricTensor = FabricTensor('chang1990-ext', 'li2012', None)
Fabric tensor
material
instance-attribute
material: ElastoplasticMaterial = ElastoplasticMaterial(props)
Material properties
CSR
CSR(phir: float, sv0: StateVariable, sv: StateVariable) -> float
Critical stress ratio considering fabric anisotropy
Mp
Mp(
sv0: StateVariable,
sv: StateVariable,
e: float | None = None,
ec: float | None = None,
) -> float
Mpt
Mpt(
sv0: StateVariable,
sv: StateVariable,
e: float | None = None,
ec: float | None = None,
) -> float
__init__
Constructor for the elastoplastic models.
| PARAMETER | DESCRIPTION |
|---|---|
props
|
The material properties, by default None
TYPE:
|
converged
converged(sv0: StateVariable, sv: StateVariable) -> bool
Whether the current stress state can be accepted as converged, used for elastoplastic substepping.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
dCSRdsig
dCSRdsig(sv0: StateVariable, sv: StateVariable) -> ndarray
Derivative of critical stress ratio with respect to stress
dMpdsig
dMpdsig(sv0: StateVariable, sv: StateVariable) -> ndarray
Derivative of peak stress ratio with respect to stress
densityEffectOnDilatancy
densityEffectOnDilatancy(
sv0: StateVariable,
sv: StateVariable,
e: float | None = None,
ec: float | None = None,
) -> float
Density effect on dilatancy
densityEffectOnStrength
densityEffectOnStrength(
sv0: StateVariable,
sv: StateVariable,
e: float | None = None,
ec: float | None = None,
) -> float
Density effect on strength
phi
phi(sv0: StateVariable, sv: StateVariable, dilatancy: bool = False) -> float
Lode angle dependent friction angle.
phir
phir(sv0: StateVariable, sv: StateVariable, dilatancy: bool = False) -> float
Lode angle dependent friction angle in radians.
stateParameter
stateParameter(
sv0: StateVariable,
sv: StateVariable,
e: float | None = None,
ec: float | None = None,
) -> float
State parameter
ElastoplasticModelBase
Bases: ConstitutiveModelBase
Base class for elastoplastic contact laws.
state
instance-attribute
State of the elastoplastic stress integration, "none", "elastic_trial", "elastic_to_yield", "elastoplastic", or "plastic_correction"
CPPM
CPPM(K: ndarray, deps: ndarray, sv0: StateVariable, sv: StateVariable)
Solve plastic problem (plastic strain) with the closest point projection method (CPPM)
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
Strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
CSL
CSL(sv0: StateVariable, sv: StateVariable) -> float
Calculate the critical state line
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Critical void ratio |
ExplicitCPA
ExplicitCPA(K: ndarray, deps: ndarray, sv0: StateVariable, sv: StateVariable)
Solve plastic problem (plastic strain) with the explicit or cutting plane algorithm (CPA)
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
Strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
RKn
RKn(
n: int,
K: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
revert: bool = False,
) -> tuple[ndarray, ndarray, ndarray, ndarray, ndarray]
Perform a Runge-Kutta increment
| PARAMETER | DESCRIPTION |
|---|---|
n
|
Order of the Runge-Kutta method
TYPE:
|
K
|
The stiffness matrix.
TYPE:
|
deps
|
Strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
revert
|
Whether to revert the state variables after the increment for estimation
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Elastoplastic stiffness matrix, stress, stress increment, plastic multiplier, and plastic strain increment
|
|
RungeKutta
RungeKutta(
K: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
order: int = None,
)
Solve plastic problem (plastic strain) with the Runge-Kutta method
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
Strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
order
|
Order of the Runge-Kutta method, by default None
TYPE:
|
beginConstantStressStateScope
beginConstantStressStateScope(sv0: StateVariable, sv: StateVariable)
Begin the scope of a constant stress state which can be used to cache intermediate variables for the plastic correction, such as the derivatives of the yield and plastic potential functions, and hardening law.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
beginConstantStressStateScope1
beginConstantStressStateScope1(sv0: StateVariable, sv: StateVariable)
Begin the scope of a constant stress state which can be used to cache intermediate variables for the plastic correction, such as the derivatives of the yield and plastic potential functions, and hardening law.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
consistentElastoplasticStiffness
consistentElastoplasticStiffness(
K: ndarray,
sv0: StateVariable,
sv: StateVariable,
check_elastic_state: bool = True,
check_positive_definite: bool = None,
check_non_singularity: bool = None,
) -> ndarray
continuumElastoplasticStiffness
continuumElastoplasticStiffness(
K: ndarray,
sv0: StateVariable,
sv: StateVariable,
check_elastic_state: bool = True,
check_positive_definite: bool = None,
check_non_singularity: bool = None,
) -> ndarray
converged
converged(sv0: StateVariable, sv: StateVariable) -> bool
Whether the current stress state can be accepted as converged, used for elastoplastic substepping.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
d2gdsig2
d2gdsig2(dfdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate second-order derivative of potential function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
dfdsig
|
Derivative of yield function with respect to the stress
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
d2gdsig2
|
Derivative of potential function with respect to the stress
TYPE:
|
d2gdsig20
d2gdsig20(dfdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate second-order derivative of potential function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
dfdsig
|
Derivative of yield function with respect to the stress
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
d2gdsig2
|
Derivative of potential function with respect to the stress
TYPE:
|
d2gdsig21
d2gdsig21(dfdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate second-order derivative of potential function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
dfdsig
|
Derivative of yield function with respect to the stress
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
d2gdsig2
|
Derivative of potential function with respect to the stress
TYPE:
|
dfdeps
dfdeps(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the strain:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdeps
|
Derivative of yield function with respect to the strain
TYPE:
|
dfdeps0
dfdeps0(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the strain:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdeps
|
Derivative of yield function with respect to the strain
TYPE:
|
dfdeps1
dfdeps1(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the strain:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdeps
|
Derivative of yield function with respect to the strain
TYPE:
|
dfdepsp
dfdepsp(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the plastic strain:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdepsp
|
Derivative of yield function with respect to the plastic strain
TYPE:
|
dfdepsp0
dfdepsp0(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the plastic strain:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdepsp
|
Derivative of yield function with respect to the plastic strain
TYPE:
|
dfdepsp1
dfdepsp1(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the plastic strain:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdepsp
|
Derivative of yield function with respect to the plastic strain
TYPE:
|
dfdsig
dfdsig(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdsig
|
Derivative of yield function with respect to the stress
TYPE:
|
dfdsig0
dfdsig0(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdsig
|
Derivative of yield function with respect to the stress
TYPE:
|
dfdsig1
dfdsig1(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of yield function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dfdsig
|
Derivative of yield function with respect to the stress
TYPE:
|
dgdsig
dgdsig(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of potential function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dgdsig
|
Derivative of potential function with respect to the stress
TYPE:
|
dgdsig0
dgdsig0(sv0: StateVariable, sv: StateVariable) -> ndarray
Calculate derivative of potential function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dgdsig
|
Derivative of potential function with respect to the stress
TYPE:
|
dgdsig1
dgdsig1(
dfdsig: ndarray,
sv0: StateVariable,
sv: StateVariable,
associated: bool = None,
) -> ndarray
Calculate derivative of potential function with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
dfdsig
|
Derivative of yield function with respect to the stress
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
associated
|
Whether to override the option to use associated flow rule
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dgdsig
|
Derivative of potential function with respect to the stress
TYPE:
|
dsigadsig
dsigadsig(sv0: StateVariable, sv: StateVariable) -> ndarray
Derivative of the modified stress with respect to the stress:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
elasticTrial
elasticTrial(
K: ndarray, deps: ndarray, sv0: StateVariable, sv: StateVariable
) -> float
Perform the elastic trial.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
Strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Yield function value after the elastic trial |
endConstantStressStateScope
endConstantStressStateScope(sv0: StateVariable, sv: StateVariable)
End the scope of a constant stress state.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
endConstantStressStateScope1
endConstantStressStateScope1(sv0: StateVariable, sv: StateVariable)
End the scope of a constant stress state.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
integrateToYieldSurface
integrateToYieldSurface(
K: ndarray, deps: ndarray, sv0: StateVariable, sv: StateVariable
) -> tuple[bool, float]
Integrate stress state to the yield surface elastically, solve f(sig0 + alpha * K * deps) = 0
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
Strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Whether the stress state is plastic, and the alpha parameter
|
|
interpolateFabricTensor
interpolateFabricTensor(
sv0: StateVariable,
sv: StateVariable,
combined_stress_tensor_type: str | None = None,
)
Interpolate fabric tensor towards critical state
nonCoaxialDirection
Non-coaxial direction
plasticModulus
plasticModulus(dgdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> float
Plastic modulus in the equation of plastic multiplier including dgdsig, coefficient of plastic multiplier:
| PARAMETER | DESCRIPTION |
|---|---|
dgdsig
|
Derivative of potential function with respect to the stress
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Kp
|
Plastic modulus in the equation of plastic multiplier
TYPE:
|
plasticModulus1
plasticModulus1(
dgdsig: ndarray, sv0: StateVariable, sv: StateVariable
) -> float
Plastic modulus in the equation of plastic multiplier including dgdsig, coefficient of plastic multiplier:
| PARAMETER | DESCRIPTION |
|---|---|
dgdsig
|
Derivative of potential function with respect to the stress
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Kp
|
Plastic modulus in the equation of plastic multiplier
TYPE:
|
potentialFunction
potentialFunction(sv0: StateVariable, sv: StateVariable) -> float
Potential function g. By default, the potential function is the same as the yield function.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Value of the potential function |
returnMapping
returnMapping(
K: ndarray,
dsig: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> None
Return mapping algorithm to solve plastic problem (plastic strain and stress).
revertElasticTrial
revertElasticTrial(
K: ndarray, deps: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Revert the elastic trial.
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
Strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
Current state variables
TYPE:
|
setPlasticMethod
Set the plastic method
| PARAMETER | DESCRIPTION |
|---|---|
method
|
The plastic method
TYPE:
|
stressStrainIntegrate
stressStrainIntegrate(
K: ndarray,
dsig: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> None
symmetricContinuumElastoplasticStiffness
symmetricContinuumElastoplasticStiffness(
K: ndarray,
deps: ndarray,
sv0: StateVariable,
sv: StateVariable,
check_elastic_state: bool = True,
check_positive_definite: bool = None,
check_non_singularity: bool = None,
) -> ndarray
updateHardeningVariables
updateHardeningVariables(
ddlambda: float, ddepsp: ndarray, sv0: StateVariable, sv: StateVariable
)
Update hardening variables:
| PARAMETER | DESCRIPTION |
|---|---|
ddlambda
|
Plastic multiplier
TYPE:
|
ddepsp
|
Plastic strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
yieldFunction
yieldFunction(sv0: StateVariable, sv: StateVariable) -> float
Calculate yield function. You are required to define the yield function of the contact force and the state variables:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Value of the yield function |
yieldFunction1
yieldFunction1(sv0: StateVariable, sv: StateVariable) -> float
Calculate yield function. You are required to define the yield function of the contact force and the state variables:
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Value of the yield function |
yieldFunctionCorrection
yieldFunctionCorrection(
K: ndarray, deps: ndarray, sv0: StateVariable, sv: StateVariable
)
Update state variables after every plastic increment to keep the stress state on the yield surface
| PARAMETER | DESCRIPTION |
|---|---|
K
|
The stiffness matrix.
TYPE:
|
deps
|
Strain increment
TYPE:
|
sv0
|
Initial state variables
TYPE:
|
sv
|
State variables
TYPE:
|
ExponentialContactLaw
FabricTensor
Base class for fabric tensors.
changed
instance-attribute
changed: FabricTensorChanged = FabricTensorChanged()
fabric tensor changed flags
coefs
instance-attribute
Fabric tensor coefficients
__init__
__init__(
type: AvailableFabricTypes = "chang1990-ext",
evolution: AvailableFabricEvolutionTypes = "li2012",
coefs: Dict[str, float] = None,
)
Initialize the fabric tensor.
evolve
evolve(
n: ndarray,
CSR: float,
sv0: StateVariable,
sv: StateVariable,
use_plastic_strain: bool = True,
nonproportionality_orthogonal: float = 0.0,
nonproportionality_noncoaxial: float = 0.0,
)
Update the fabric tensor.
| PARAMETER | DESCRIPTION |
|---|---|
n
|
Loading direction
TYPE:
|
CSR
|
Critical stress ratio
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables at the end of the increment.
TYPE:
|
use_plastic_strain
|
Whether to use the plastic strain for fabric evolution
TYPE:
|
nonproportionality_orthogonal
|
Weight of the orthogonal component of the non-proportionality in the fabric anisotropy variable.
TYPE:
|
nonproportionality_noncoaxial
|
Weight of the non-coaxial component of the non-proportionality in the fabric anisotropy variable.
TYPE:
|
rotate
Rotate the fabric tensor, set rotate to False to revert the rotation.
setParameters
setParameters(
type: AvailableFabricTypes = "chang1990-ext",
evolution: AvailableFabricEvolutionTypes = "li2012",
coefs: Dict[str, float] = None,
)
Set the fabric tensor parameters.
HyperbolicContactLaw
HypoplasticContactLaw
Bases: NonlinearElasticContactLaw, ExponentialBreakageCSL
Hypoplastic contact law.
coefficients
coefficients(kt: float, idx: int, sv0: StateVariable, sv: StateVariable)
Relative coefficients. multiplied by fn.
elasticStiffness
elasticStiffness(
idx: int, fn: float, sv0: StateVariable, sv: StateVariable
) -> ndarray
preIntegration
preIntegration(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
Integration
fabric
instance-attribute
fabric: FabricTensor = FabricTensor('chang1990-ext', 'li2012', None)
fabric tensor
gauss_weight
instance-attribute
gauss_weight: VectorXf = np.zeros(0)
weights of the integration points
Aij
The fabric tensor Aij, an array of shape (3, 3).
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The fabric tensor. |
Aij_
Calculate the fabric tensor Aij from the definition, an array of shape (3, 3).
__init__
Constructor for the Gauss integration class.
| PARAMETER | DESCRIPTION |
|---|---|
npv
|
number of contacts per unit volume
TYPE:
|
radius
|
particle radius
TYPE:
|
beta
The azimuthal angles of the integration points in the y-z plane, an array of shape (n,).
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The azimuthal angles of the integration points in the y-z plane. |
gamma
The azimuthal angles of the integration points x-axis, an array of shape (n,).
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The azimuthal angles of the integration points x-axis. |
indexOf
Return the indices of the integration points with the given beta and gamma angles and the corresponding
angles. Specify one (and only one) of beta or gamma.
| PARAMETER | DESCRIPTION |
|---|---|
beta
|
The angle between the projection of the azimuth on the YZ plane and the Y axis
TYPE:
|
gamma
|
The angle between the azimuth and the X axis
TYPE:
|
tol
|
The tolerance for the comparison of the angles, by default 1e-6
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The indices of the integration points |
ndarray
|
The corresponding angles, depending on the given angles, gamma when beta is given and vice versa |
l
The contact vectors of the integration points, an array of shape (n, 3).
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The integration points in the x-y plane. |
loadIntegrationPoints
Load integration points.
p
The transformation matrix, an array of shape (3, 3).
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The transformation matrix. |
setAnisotropicParameters
setAnisotropicParameters(
type: AvailableFabricTypes = "chang1990-ext",
evolution: AvailableFabricEvolutionTypes = "li2012",
coefs: Dict[str, float] = None,
)
Set the anisotropic parameters.
| PARAMETER | DESCRIPTION |
|---|---|
type
|
The type of the anisotropic parameter.
TYPE:
|
evolution
|
The evolution type of the anisotropic parameter.
TYPE:
|
coefs
|
The coefficients of the anisotropic parameter.
TYPE:
|
setBazantOh37
Set the BazantOh37 integration points.
| PARAMETER | DESCRIPTION |
|---|---|
full
|
Full 37*2 integration points.
TYPE:
|
setBazantOh61
Set the BazantOh61 integration points.
| PARAMETER | DESCRIPTION |
|---|---|
full
|
Full 61*2 integration points.
TYPE:
|
setNPVFromNormalizedPackingDensity
Set the number of contacts per unit volume from the normalized packing density with the following equation:
| PARAMETER | DESCRIPTION |
|---|---|
rho
|
normalized packing density
TYPE:
|
setNPVFromVoidRatio
Set the number of contacts per unit volume from the void ratio with the following equation:
| PARAMETER | DESCRIPTION |
|---|---|
e
|
void ratio
TYPE:
|
setParameters
Set the parameters.
| PARAMETER | DESCRIPTION |
|---|---|
npv
|
number of contacts per unit volume
TYPE:
|
radius
|
particle radius
TYPE:
|
size
The number of integration points.
| RETURNS | DESCRIPTION |
|---|---|
int
|
The number of integration points. |
weight
The weights of the integration points, an array of shape (n,).
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The weights of the integration points. |
J2Yang
KinematicHomogenization
Load
load phases manager.
phases
instance-attribute
phases: List[LoadPhase] = numba.typed.List([p for _ in (range(0))])
load phases
addConfinementPhase
addConfinementPhase(eps1: float, steps: int) -> LoadPhase
Add a confinement load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addConstantStressRatioPhase
addConstantStressRatioPhase(
sig3_min: float, sig3_max: float, eta: float, steps: int, axis: int = 1
) -> LoadPhase
Add a constant stress ratio load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sig3_min
|
Minimum value of minimum principal stress.
TYPE:
|
sig3_max
|
Maximum value of minimum principal stress.
TYPE:
|
eta
|
Constant stress ratio.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addDrainedTriaxialPhase
addDrainedTriaxialPhase(
sigc: float, eps1: float, steps: int, axis: int = 1
) -> LoadPhase
Add a drained triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sigc
|
Confined stress.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addIsotropicPhase
addIsotropicPhase(sigc: float, steps: int) -> LoadPhase
Add an isotropic load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sigc
|
Confined stress.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addLoadPhase
addTrueTriaxialPhase
addTrueTriaxialPhase(
sig3: float,
b: float,
eps1: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
) -> LoadPhase
Add a true triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
sig3
|
Minimum principal stress.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
steps
|
Number of steps.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addTrueTriaxialWithConstantShearPhase
addTrueTriaxialWithConstantShearPhase(
p: float, b: float, steps: int, axis1: int = 1, axis2: int = 2
) -> LoadPhase
Add a true triaxial load phase with constant shear stress.
| PARAMETER | DESCRIPTION |
|---|---|
p
|
Mean stress.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
steps
|
Number of steps.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTriaxialPhase
addUndrainedTriaxialPhase(
eps1: float, steps: int, axis: int = 1, no_epsv: bool = False
) -> LoadPhase
Add an undrained triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default False
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTriaxialWithoutShearPhase
addUndrainedTriaxialWithoutShearPhase(
eps1: float, steps: int, axis: int = 1, no_epsv: bool = False
) -> LoadPhase
Add an undrained triaxial load phase without controlling the shear strain.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default False
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTrueTriaxialPhase
addUndrainedTrueTriaxialPhase(
eps1: float,
b: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
no_epsv: bool = True,
) -> LoadPhase
Add an undrained true triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default True
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTrueTriaxialWithAxialStrainPhase
addUndrainedTrueTriaxialWithAxialStrainPhase(
epsa: float,
b: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
no_epsv: bool = True,
) -> LoadPhase
Add an undrained true triaxial load phase with axial strain control.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
epsa
|
Axial strain.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default True
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
axisIndex
staticmethod
Get the index of the axis.
| PARAMETER | DESCRIPTION |
|---|---|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
The index of the axis. |
initialize
initialize(sv: StateVariable)
Initialize the load.
| PARAMETER | DESCRIPTION |
|---|---|
sv
|
The state variables.
TYPE:
|
LoadPhase
A class for a single load phase.
control
instance-attribute
control: VectorXf = control
Control type of the load, 0 for stress control, 1 for strain control, -1 for ignored
total
instance-attribute
total: VectorXf = total
Control whether the load is incremental or total, 0 for incremental, 1 for total
true_triaxial_control_type
instance-attribute
Control type for true triaxial loading, "none" for no control, "sig1", "sig2", or sig3" for controlling the principal stresses, "no_epsv" for controlling the intermediate principal stress without generating volumetric strain
true_triaxial_intermediate_axis
instance-attribute
Intermediate axis for true triaxial loading, 1 for axis 1, 2 for axis 2, 3 for axis 3
true_triaxial_major_axis
instance-attribute
Major axis for true triaxial loading, 1 for axis 1, 2 for axis 2, 3 for axis 3
__init__
__init__(
initial: ndarray = zeros(6),
final: ndarray = zeros(6),
control: ndarray = zeros(6),
total: ndarray = zeros(6),
steps: int = 100,
b: float = -1.0,
true_triaxial_control_type: str = "none",
true_triaxial_major_axis: int = 1,
true_triaxial_intermediate_axis: int = 2,
)
Constructor for the load phase class.
| PARAMETER | DESCRIPTION |
|---|---|
initial
|
Initial mixed stress/strain.
TYPE:
|
final
|
Final mixed stress/strain.
TYPE:
|
control
|
The control type of the load increment, 0 for stress control, 1 for strain control, -1 for ignored.
TYPE:
|
total
|
Control whether the load is incremental or total, 0 for incremental, 1 for total.
TYPE:
|
steps
|
Number of steps.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
true_triaxial_control_type
|
Control type for true triaxial loading, "none" for no control, "sig1", "sig2", or sig3" for controlling the principal stresses, "no_epsv" for controlling the intermediate principal stress without generating volumetric strain
TYPE:
|
true_triaxial_major_axis
|
Major axis for true triaxial loading, 1 for axis 1, 2 for axis 2, 3 for axis 3.
TYPE:
|
true_triaxial_intermediate_axis
|
Intermediate axis for true triaxial loading, 1 for axis 1, 2 for axis 2, 3 for axis 3.
TYPE:
|
finalize
finalize(
K: ndarray, S: ndarray, E: ndarray, sv0: StateVariable, sv: StateVariable
) -> Tuple[ndarray, ndarray]
Finalize the load phase to ensure the intermediate stress ratio is satisfied.
initialize
initialize(sv: StateVariable)
Initialize the load phase.
| PARAMETER | DESCRIPTION |
|---|---|
sv
|
The state variables.
TYPE:
|
isCompatibleWith
Check if the load phase is compatible with the previous load phase.
| PARAMETER | DESCRIPTION |
|---|---|
previous
|
Previous load phase.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if compatible, False otherwise. |
makeCompatibleWith
Make the load phase compatible with the previous load phase.
| PARAMETER | DESCRIPTION |
|---|---|
previous
|
Previous load phase.
TYPE:
|
MCCContactLaw
Bases: ElastoplasticContactLaw, ChangStiffness, MCCCSL
Extended Modified Cam-Clay (MCC) contact law.
checkConvergence
checkConvergence(idx: int, sv0: StateVariable, sv: StateVariable)
Check convergence of the iteration
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
sv
|
State variables
TYPE:
|
plasticModulus0
plasticModulus0(
idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
updateHardeningVariables
updateHardeningVariables(
idx: int,
dlambda: float,
ddispp: ndarray,
sv0: StateVariable,
sv: StateVariable,
)
yieldFunction
yieldFunction(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
Material
Bases: MaterialBase
Material parameters.
Note
Not using a numba TypedDict because it is slower.
Properties ending with underscores are anisotropic parameters.
Lambda
instance-attribute
compression -> slope of CSL line (lambda)
R
instance-attribute
:math:R, A material constant, :math:k_n=k_t\times R
b
instance-attribute
:math:b, Control the evolution rate of the grain breakage
c
instance-attribute
Usual ratio of extension to compression quantities
erefu
instance-attribute
:math:e_{refu}, Ultimate reference void ratio
fabrics
instance-attribute
fabrics: Dict[str, FabricTensor] = numba.typed.Dict.empty(
numba.types.string, FabricTensorType
)
Anisotropic fabric tensors
fb0
instance-attribute
:math:\sigma_{b0}, Initial adhesive normal stress
fc0
instance-attribute
:math:\sigma_{c0}, Initial pre-consolidated stress
fnr
instance-attribute
Mean effective stress when log(e) = 1 in the LCC line (log(e) - log(p) space)
hp
instance-attribute
:math:h_p, Related to plastic modulus of bounding surface effect
integration
instance-attribute
integration: Integration = Integration(1000000000.0, 0.00065)
Integration
kp
instance-attribute
:math:k_p, A parameter in the SimSand yield formula
kpr
instance-attribute
a ratio of normal stiffness (k_n) to peak stiffness (k_p)
krr
instance-attribute
a ratio of normal stiffness (k_n) to tangential stiffness (k_r)
m
instance-attribute
:math:m, Control the distance between NCL and CSL
nd
instance-attribute
the exponential in the phase-transformation angle
ng
instance-attribute
:math:n_g, An exponent in the formula of nonlinear shear modulus
np
instance-attribute
the exponential in the dynamic friction angle
nw
instance-attribute
:math:n_w, Control the effect of plastic work to the grain breakage
rho
instance-attribute
:math:\rho, Control the decreasing rate of CSL due to grain breakage
rhoc
instance-attribute
Slope of the LCC line in the log(e) - log(p) space
theta
instance-attribute
A constant exponent in the hardening behavior of p0
xi
instance-attribute
:math:\xi, Control the nonlinearity of CSL line
xib
instance-attribute
:math:\xi_b, A soil constant controls hardening rule of :math:\xi_b
xic
instance-attribute
:math:\xi_c, A soil constant controls hardening rule of :math:\xi_c
Mc_
Mc_(
idx: int,
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
Return the critical state slope for compression.
Me_
Me_(
idx: int,
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
Return the critical state slope for extension.
__getitem__
Get the value of a parameter. This method is might be slower than direct getting the attribute.
__setitem__
Set the value of a parameter. This method is might be slower than direct setting the attribute.
anisotropicFactor
Return the anisotropic factor.
| PARAMETER | DESCRIPTION |
|---|---|
key
|
The key of the anisotropic parameter.
TYPE:
|
idx
|
The index of the integration point.
TYPE:
|
get_
Get a parameter value with anisotropic factor.
| PARAMETER | DESCRIPTION |
|---|---|
key
|
The key of the parameter.
TYPE:
|
idx
|
The index of the integration point.
TYPE:
|
default_
|
The default value of the parameter.
TYPE:
|
mu_
mu_(
idx: int,
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
phi_
phi_(
idx: int,
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
setAnisotropicParameters
setAnisotropicParameters(
key: str,
type: AvailableFabricTypes = "chang1990-ext",
evolution: AvailableFabricEvolutionTypes = "li2012",
coefs: Dict[str, float] = None,
)
Set anisotropic parameters.
| PARAMETER | DESCRIPTION |
|---|---|
key
|
The key of the anisotropic parameter.
TYPE:
|
type
|
The type of the anisotropic parameter.
TYPE:
|
evolution
|
The evolution type of the anisotropic parameter.
TYPE:
|
coefs
|
The coefficients of the anisotropic parameter.
TYPE:
|
MaterialBase
Material parameters.
Mc
Mc(
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
Return the critical state slope for compression.
Me
Me(
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
Return the critical state slope for extension.
mu
mu(
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
Return the friction coefficient.
phi_combined
phi_combined(
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
Friction angle considering combined failure criteria
sin_phi_combined
sin_phi_combined(
ba: float = 0.0,
Ra: float = 1.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
) -> float
Sine of friction angle considering combined failure criteria
sin_phi_mises
Friction angle sine of Von Mises failure criteria
sin_phi_smp
Friction angle sine of SMP failure criteria
MicromechanicalBase
Bases: ElastoplasticModelBase
Base class for all micromechanical models.
integration
instance-attribute
integration: Integration = Integration(npv, radius)
The integration points.
__init__
__init__(
props: Dict[str, float] | None = None,
npv: float = 1000000000.0,
radius: float = 0.00065,
)
Constructor for the base class of all micromechanical models.
| PARAMETER | DESCRIPTION |
|---|---|
props
|
The material properties, by default None
TYPE:
|
npv
|
The number of particles per volume, by default 1e9
TYPE:
|
radius
|
The particle radius, by default 0.65e-3
TYPE:
|
averageStrain
averageStrain(disp: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray
Average the contact displacement into the strain tensor.
| PARAMETER | DESCRIPTION |
|---|---|
disp
|
The contact displacement.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The averaged strain tensor, shape (6,). |
averageStress
averageStress(force: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray
Average the contact force into the stress tensor.
| PARAMETER | DESCRIPTION |
|---|---|
force
|
The contact force.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The averaged stress tensor, shape (6,). |
contactIntegrate
contactIntegrate(
idx: int,
dforce: ndarray,
ddisp: ndarray,
sv0: StateVariable,
sv: StateVariable,
) -> ndarray
Integrate the contact law.
| PARAMETER | DESCRIPTION |
|---|---|
dforce
|
The contact force increment.
TYPE:
|
ddisp
|
The contact displacement increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The stiffness matrix |
contactIntegrates
contactIntegrates(
dforce: ndarray, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
)
Integrate all the contact laws with cache.
| PARAMETER | DESCRIPTION |
|---|---|
dforce
|
The contact force increment.
TYPE:
|
ddisp
|
The contact displacement increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
createContactLaw
createContactLaw(props: dict[str, float] = None) -> ContactLawBase
The default contact law.
| PARAMETER | DESCRIPTION |
|---|---|
props
|
The material properties, by default None
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ContactLawBase
|
The default contact law. |
initialize
initialize(sv: StateVariable)
Initialize the state variables.
| PARAMETER | DESCRIPTION |
|---|---|
sv
|
A StateVariable object to be initialized.
TYPE:
|
localizeStrain
localizeStrain(eps: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray
Localize the strain to the contact displacement.
| PARAMETER | DESCRIPTION |
|---|---|
eps
|
The strain or strain increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The displacement or displacement increment. |
localizeStrain2
localizeStrain2(
eps: ndarray,
sv0: StateVariable,
sv: StateVariable,
kn: ndarray = None,
ks: ndarray = None,
kt: ndarray = None,
) -> ndarray
Localize the strain to the contact displacement with the static hypothesis, estimated from the stress and contact force.
| PARAMETER | DESCRIPTION |
|---|---|
eps
|
The strain or strain increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
kn
|
The contact normal stiffness, by default None
TYPE:
|
ks
|
The contact shear stiffness at the first direction, by default None
TYPE:
|
kt
|
The contact shear stiffness at the second direction, by default None
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The displacement or displacement increment. |
localizeStress
localizeStress(sig: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray
Localize the stress to the contact force.
| PARAMETER | DESCRIPTION |
|---|---|
sig
|
The stress or stress increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The force or force increment. |
localizeStress2
localizeStress2(
sig: ndarray,
sv0: StateVariable,
sv: StateVariable,
kn: ndarray = None,
ks: ndarray = None,
kt: ndarray = None,
) -> ndarray
Localize the stress to the contact force with the kinematic hypothesis, estimated from the strain and contact displacement.
| PARAMETER | DESCRIPTION |
|---|---|
sig
|
The stress or stress increment.
TYPE:
|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variables.
TYPE:
|
kn
|
The contact normal stiffness, by default None
TYPE:
|
ks
|
The contact shear stiffness at the first direction, by default None
TYPE:
|
kt
|
The contact shear stiffness at the second direction, by default None
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The force or force increment. |
setContactLaw
Set the contact law.
| PARAMETER | DESCRIPTION |
|---|---|
contact
|
The contact law.
TYPE:
|
stiffness1
stiffness1(
sv0: StateVariable,
sv: StateVariable,
kn: ndarray = None,
ks: ndarray = None,
kt: ndarray = None,
) -> ndarray
Calculate the stiffness matrix.
| PARAMETER | DESCRIPTION |
|---|---|
sv0
|
The state variables at the beginning of the increment.
TYPE:
|
sv
|
The state variable.
TYPE:
|
kn
|
The contact normal stiffness, by default None
TYPE:
|
ks
|
The contact shear stiffness at the first direction, by default None
TYPE:
|
kt
|
The contact shear stiffness at the second direction, by default None
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The elastic stiffness matrix. |
MicromechanicalRegistry
model_name
staticmethod
Get the model name from a model type
Micromechanical model type
Micromechanical model name
C++: micromechanical::MicromechanicalRegistry
MohrCoulomb
NonlinearElasticContactLaw
Bases: ContactLawBase
Nonlinear elastic contact law
postIncrement
postIncrement(
idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None
yieldFunction
yieldFunction(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
OSIMSANDContactLaw
Bases: ElastoplasticContactLaw, ChangStiffness, LogarithmicCSL
Original SimSand contact law.
plasticModulus0
plasticModulus0(
idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
yieldFunction
yieldFunction(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
Options
Constitutive options.
contact_default_potential_function_derivative
instance-attribute
contact_default_yield_function_derivative
instance-attribute
contact_ensure_force_state_on_yield_surface
instance-attribute
contact_sanisand_constant_hardening_parameter
instance-attribute
contact_sanisand_maintain_yield_surface
instance-attribute
contact_simsand_hardening_use_plastic_displacement
instance-attribute
contact_simsand_use_plastic_displacement
instance-attribute
contact_substepping_max_increment
instance-attribute
contact_substepping_separate_normal_shear_displacements
instance-attribute
elastic_stiffness_stress_dependence
instance-attribute
elastic_stiffness_stress_dependence_min_mean_stress_ratio
instance-attribute
elastic_stiffness_stress_dependence_use_anisotropic_mean_stress
instance-attribute
elastic_stiffness_void_ratio_dependence
instance-attribute
elastic_stiffness_void_ratio_dependence_initial
instance-attribute
elastoplastic_associated_flow_rule
instance-attribute
elastoplastic_cache_state_variables
instance-attribute
elastoplastic_check_stiffness_matrix_non_singularity
instance-attribute
elastoplastic_check_stiffness_matrix_positive_definite
instance-attribute
elastoplastic_combined_stress_tensor_dilatancy_type
instance-attribute
elastoplastic_combined_stress_tensor_evolution_ratio
instance-attribute
elastoplastic_combined_stress_tensor_fav_ratio
instance-attribute
elastoplastic_combined_stress_tensor_scale
instance-attribute
elastoplastic_combined_stress_tensor_type
instance-attribute
elastoplastic_critical_state_line_shape
instance-attribute
elastoplastic_critical_state_line_use_anisotropic_mean_stress
instance-attribute
elastoplastic_critical_state_line_use_initial_stress_state
instance-attribute
elastoplastic_critical_stress_ratio_type
instance-attribute
elastoplastic_critical_stress_ratio_use_anisotropic_stress
instance-attribute
elastoplastic_critical_stress_ratio_use_initial_stress_state
instance-attribute
elastoplastic_default_potential_function_derivative
instance-attribute
elastoplastic_default_yield_function_derivative
instance-attribute
elastoplastic_density_effect_on_strength_dilatancy_type
instance-attribute
elastoplastic_dilatancy_scale_at_low_mean_stress
instance-attribute
elastoplastic_dilatancy_separate_friction_angle
instance-attribute
elastoplastic_ensure_stress_on_yield_surface
instance-attribute
elastoplastic_fabric_anisotropy_variable_nonproportionality_noncoaxial
instance-attribute
elastoplastic_fabric_anisotropy_variable_nonproportionality_orthogonal
instance-attribute
elastoplastic_finite_difference_central
instance-attribute
elastoplastic_finite_difference_increment
instance-attribute
elastoplastic_flow_rule_tolerance
instance-attribute
elastoplastic_min_principal_stress
instance-attribute
elastoplastic_potential_function_half_shear_derivatives
instance-attribute
elastoplastic_runge_kutta_correction_substep
instance-attribute
elastoplastic_runge_kutta_diverged_steps_raise
instance-attribute
elastoplastic_runge_kutta_fourth_order_type
instance-attribute
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_max_iterations
instance-attribute
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_method
instance-attribute
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_tolerance
instance-attribute
elastoplastic_runge_kutta_max_const_steps
instance-attribute
elastoplastic_runge_kutta_second_order_alpha
instance-attribute
elastoplastic_runge_kutta_stiffness_type
instance-attribute
elastoplastic_runge_kutta_substepping_adaptive_max_ratio
instance-attribute
elastoplastic_runge_kutta_substepping_adaptive_min_ratio
instance-attribute
elastoplastic_runge_kutta_substepping_adaptive_ratio
instance-attribute
elastoplastic_runge_kutta_substepping_check_min_step_size
instance-attribute
elastoplastic_runge_kutta_substepping_initial_step_size
instance-attribute
elastoplastic_runge_kutta_substepping_max_iterations
instance-attribute
elastoplastic_runge_kutta_substepping_max_step_size
instance-attribute
elastoplastic_runge_kutta_substepping_min_step_size
instance-attribute
elastoplastic_runge_kutta_substepping_tolerance
instance-attribute
elastoplastic_runge_kutta_third_order_alpha
instance-attribute
elastoplastic_runge_kutta_third_order_beta
instance-attribute
elastoplastic_substepping_check_min_step_size
instance-attribute
elastoplastic_substepping_initial_step_size
instance-attribute
elastoplastic_substepping_max_iterations
instance-attribute
elastoplastic_substepping_max_plastic_strain
instance-attribute
elastoplastic_substepping_max_step_size
instance-attribute
elastoplastic_substepping_min_step_size
instance-attribute
elastoplastic_substepping_step_size_decrease_ratio
instance-attribute
elastoplastic_substepping_step_size_increase_ratio
instance-attribute
elastoplastic_update_critical_void_ratio_when_required
instance-attribute
elastoplastic_use_anisotropic_state_parameter
instance-attribute
elastoplastic_yield_function_anisotropic_cohesion
instance-attribute
elastoplastic_yield_function_correction_adaptive_ratio
instance-attribute
elastoplastic_yield_function_correction_direction
instance-attribute
elastoplastic_yield_function_correction_diverged_steps_raise
instance-attribute
elastoplastic_yield_function_correction_max_const_steps
instance-attribute
elastoplastic_yield_function_derivative_strain
instance-attribute
elastoplastic_yield_function_fabric_anisotropy
instance-attribute
elastoplastic_yield_function_min_critical_stress_ratio
instance-attribute
elastoplastic_yield_function_stress_dependent_kp_scale
instance-attribute
friction_angle_weight_mohr_coulomb
instance-attribute
ignore_fabric_anisotropy_for_isotropic_loading
instance-attribute
ignore_fabric_evolution_for_isotropic_loading
instance-attribute
integration_check_absolute_convergence
instance-attribute
integration_substepping_max_ratio
instance-attribute
integration_substepping_min_ratio
instance-attribute
integration_substepping_relative_to_increment
instance-attribute
integration_tolerance_relative_stress
instance-attribute
j2yang_yield_function_epsr_relative_to_kp
instance-attribute
j2yang_yield_function_softening_alpha
instance-attribute
j2yang_yield_function_softening_beta
instance-attribute
j2yang_yield_function_softening_relative_to_CSR
instance-attribute
j2yang_yield_function_softening_type
instance-attribute
mixed_load_check_absolute_convergence
instance-attribute
mixed_load_check_strain_convergence
instance-attribute
mixed_load_check_stress_convergence
instance-attribute
mixed_load_constant_elastic_stiffness
instance-attribute
mixed_load_stress_as_anisotropic_stress
instance-attribute
mixed_load_update_void_ratio_in
instance-attribute
simsand_yield_function_additional_shear_strain
instance-attribute
simsand_yield_function_shear_strain_scale
instance-attribute
simsand_yield_function_use_plastic_strain
instance-attribute
update_void_ratio_from_after_isotropic_loading_to_before
instance-attribute
use_isotropic_fabric_tensor_in_strain_averaging
instance-attribute
use_isotropic_fabric_tensor_in_stress_localization
instance-attribute
use_plastic_strain_in_fabric_evolution
instance-attribute
checkSubsteppingOptions
Check the substepping options for plastic correction.
isFrictionAngleLodeDependent
Whether the friction angle is lode angle dependent.
setMisesSMP
Use Mises-SMP criterion.
setTrescaMohrCoulomb
Use Tresca-Mohr-Coulomb criterion.
SANISANDContactLaw
Bases: ElastoplasticContactLaw, ChangStiffness, ExponentialBreakageCSL
SANISAND contact law.
maintainYieldSurface
maintainYieldSurface(
idx: int,
ddisp: ndarray,
dforce: ndarray,
sv0: StateVariable,
sv: StateVariable,
)
plasticModulus
plasticModulus(
idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> float
updateHardeningVariables
updateHardeningVariables(
idx: int,
dlambda: float,
ddispp: ndarray,
sv0: StateVariable,
sv: StateVariable,
)
yieldFunction
yieldFunction(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
SIMSAND
Bases: Homogenization, CriticalStateLine, StressDilatancy, AnisotropicStrength
SIMSAND model
epsd
epsd(
sv0: StateVariable,
sv: StateVariable,
use_plastic_strain: bool | None = None,
) -> float
SIMSANDContactLaw
Bases: ElastoplasticContactLaw, ChangStiffness, ExponentialBreakageCSL
SIMSAND contact law.
plasticModulus0
plasticModulus0(
idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray
yieldFunction
yieldFunction(
idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float
Scalar
Bases: IndexedValue
StateVariable
cscalars
instance-attribute
cscalars: Dict[str, VectorXf]
custom scalar fields for contacts, a 1D numpy array of size (size,) is expected for each contact
cvectors
instance-attribute
cvectors: Dict[str, MatrixXf]
custom vector fields for contacts, a 2D numpy array of size (size, ...) is expected for each contact
__init__
Constructor of the state variable
| PARAMETER | DESCRIPTION |
|---|---|
size
|
Size of the integration points
TYPE:
|
initialize_arrays
|
Whether to initialize numpy arrays, by default True, if False, the numpy arrays are empty
TYPE:
|
addStrain
Add strain increment and update void ratio
| PARAMETER | DESCRIPTION |
|---|---|
deps
|
Strain increment, shape (6,)
TYPE:
|
update_void_ratio
|
Whether to update void ratio, by default True
TYPE:
|
copyContactStateVariables
copyContactStateVariables(
from_idx: int,
to_idx: int,
symmetric: bool = False,
cscalars: List[str] = None,
cvectors: List[str] = None,
)
Copy the contact state variables from one integration point to another
| PARAMETER | DESCRIPTION |
|---|---|
from_idx
|
Index of the integration point to copy from
TYPE:
|
to_idx
|
Index of the integration point to copy to
TYPE:
|
symmetric
|
Whether to revert the symmetric contact state variables, by default False
TYPE:
|
cscalars
|
Custom scalar fields to be multiplied by -1, by default None
TYPE:
|
cvectors
|
Custom vector fields to be multiplied by -1, by default None
TYPE:
|
copyFrom
copyFrom(sv: StateVariable)
Copy state variables from another
| PARAMETER | DESCRIPTION |
|---|---|
sv
|
State variable to copy from
TYPE:
|
elasticStiffnessMatrix
Elastic stiffness matrix, shape (3, 3)
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Elastic stiffness matrix |
fnci
Normal force with minimum cohesion at the integration point with index idx
fsi
Shear force at the first direction at the integration point with index idx
fti
Shear force at the second direction at the integration point with index idx
hash
hash(
dfi: ndarray,
dui: ndarray,
idx: int,
precision: int = 15,
symmetric: bool = False,
cscalars: List[str] = None,
cvectors: List[str] = None,
) -> int
Hash the contact state variables at the integration point with index idx
| PARAMETER | DESCRIPTION |
|---|---|
dfi
|
Contact force increment
TYPE:
|
dui
|
Contact displacement increment
TYPE:
|
idx
|
Index of the integration point
TYPE:
|
precision
|
Precision of the hash value, by default 15
TYPE:
|
symmetric
|
Whether to revert the symmetric contact state variables, by default False
TYPE:
|
cscalars
|
Custom scalar fields to be multiplied by -1, by default None
TYPE:
|
cvectors
|
Custom vector fields to be multiplied by -1, by default None
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
Hash value |
nsti
Direction of the shear force in two dimensions with index idx, shape (2,)
revertSymmetricContactStateVariables
revertSymmetricContactStateVariables(
idx: int, cscalars: List[str] = None, cvectors: List[str] = None
)
Revert contact force, displacement and specified custom variables by multiplying them with -1
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
cscalars
|
Custom scalar fields to be multiplied by -1, by default None
TYPE:
|
cvectors
|
Custom vector fields to be multiplied by -1, by default None
TYPE:
|
setStrain
Set strain and update void ratio
| PARAMETER | DESCRIPTION |
|---|---|
eps
|
Strain, shape (6,)
TYPE:
|
update_void_ratio
|
Whether to update void ratio, by default True
TYPE:
|
ups
Shear plastic displacement at the first direction for every integration point, shape (size,)
upsi
Shear plastic displacement at the first direction at the integration point with index idx
upsti
Shear plastic displacement at the integration point with index idx, shape (2,)
upt
Shear plastic displacement at the second direction for every integration point, shape (size,)
upti
Shear plastic displacement at the second direction at the integration point with index idx
us
Shear displacement at the first direction for every integration point, shape (size,)
usi
Shear displacement at the first direction at the integration point with index idx
usti
Shear displacement at the integration point with index idx, shape (2,)
ut
Shear displacement at the second direction for every integration point, shape (size,)
StaticHomogenization
Vector
Bases: IndexedValue