Skip to content

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:

\[ S_{ijkl}=\frac{1}{V}\sum_{c=1}^N\sum_{m=1}^3\sum_{n=1}^3{(K_{jl}^c)^{-1} l_m^c l_n^c A_{mi} A_{nk}} \]

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:

\[\mathrm{d}f_i^{(k),c} = \mathrm{d}\sigma_{ij}^{(k)} A_{jk} l_k^c\]

Calculate the contact displacement increment from the contact force increment based on the elastic trial:

\[\mathrm{d}u_j^{(k+1),c} = (K_{ij}^{e,c})^{-1} \mathrm{d}f_i^{(k),c}\]

Update the contact force increment based on the contact law:

\[f_i^{(k+1),c} = f_i^{(k),c} + K_{ij}^{ep,c} \mathrm{d}u_j^{(k+1),c}\]

Update the stress increment based on the Love-Weber formula:

\[\sigma_{ij}^{(k+1)} = \frac{1}{V}\sum_{c=1}^N{f_i^{(k+1),c} l_j^c}\]

Update contact force from the stress increment based on the static hypothesis:

\[f_i^{(k+1),c} = \sigma_{ij}^{(k+1)} A_{jk} l_k^c\]

Calculate the unbalanced force:

\[\mathrm{d}f_i^{unb,c} = f_i^{(k+1),c} - f_i^{(k),c}\]

Set the force increment to the unbalanced force and repeat the steps from the second step until the unbalanced force is small enough.

\[\mathrm{d}f_i^{(k+1),c} = -\mathrm{d}f_i^{unb,c}\]

idx instance-attribute

idx: int

Index of the failed contact

contactIntegrate

contactIntegrate(
    idx: int,
    dforce: ndarray,
    ddisp: ndarray,
    sv0: StateVariable,
    sv: StateVariable,
) -> ndarray

dfdepsp

dfdepsp(sv0: StateVariable, sv: StateVariable) -> ndarray

dfdsig

dfdsig(sv0: StateVariable, sv: StateVariable) -> ndarray

dgdsig

dgdsig(sv0: StateVariable, sv: StateVariable) -> ndarray

maxYieldFunction

maxYieldFunction(sv0: StateVariable, sv: StateVariable)

Determine the maximum yield function value

setup

setup()

stiffness

stiffness(sv0: StateVariable, sv: StateVariable) -> ndarray

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
)

yieldFunction

yieldFunction(sv0: StateVariable, sv: StateVariable) -> float

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

debugVariable instance-attribute

debugVariable: DebugVariable

Debug information

load instance-attribute

load: Load

The load.

name instance-attribute

name: str

The name of the model.

options instance-attribute

options: Options

The options

stateVars instance-attribute

stateVars: List[StateVariable]

The state variables

abstractSetup

abstractSetup()

Setup abstract classes.

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: ndarray

check_positive_definite

Whether to check the positive definiteness of the stiffness matrix.

TYPE: bool DEFAULT: None

check_non_singularity

Whether to check the non-singularity of the stiffness matrix.

TYPE: bool DEFAULT: None

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: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variable.

TYPE: StateVariable

check_elastic_state

Whether to check if the current stress state is elastic.

TYPE: bool DEFAULT: True

check_positive_definite

Whether to check the positive definiteness of the elastoplastic stiffness matrix.

TYPE: bool DEFAULT: None

check_non_singularity

Whether to check the non-singularity of the elastoplastic stiffness matrix.

TYPE: bool DEFAULT: None

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: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variable.

TYPE: StateVariable

check_elastic_state

Whether to check if the current stress state is elastic.

TYPE: bool DEFAULT: True

check_positive_definite

Whether to check the positive definiteness of the elastoplastic stiffness matrix.

TYPE: bool DEFAULT: None

check_non_singularity

Whether to check the non-singularity of the elastoplastic stiffness matrix.

TYPE: bool DEFAULT: None

RETURNS DESCRIPTION
ndarray

The continuum elastoplastic stiffness matrix.

createStateVariable

createStateVariable() -> StateVariable

Create a new state variable object.

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: ndarray

deps

The strain increment.

TYPE: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variable.

TYPE: StateVariable

check_elastic_state

Whether to check if the current stress state is elastic.

TYPE: bool DEFAULT: True

check_positive_definite

Whether to check the positive definiteness of the elastoplastic stiffness matrix.

TYPE: bool DEFAULT: None

check_non_singularity

Whether to check the non-singularity of the elastoplastic stiffness matrix.

TYPE: bool DEFAULT: None

RETURNS DESCRIPTION
ndarray

The elastoplastic stiffness matrix.

increment

increment(
    dx: ndarray,
    x: ndarray,
    S: ndarray,
    E: ndarray,
    G: ndarray,
    sv0: StateVariable,
    sv: StateVariable,
) -> ndarray

initialization

initialization()

Initialization the base class.

initialize

initialize(sv: StateVariable)

Initialize the state variables.

PARAMETER DESCRIPTION
sv

A StateVariable object to be initialized.

TYPE: StateVariable

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: ndarray

dx

The mixed unbalanced load increment.

TYPE: ndarray

S

The stress control matrix.

TYPE: ndarray

E

The strain control matrix.

TYPE: ndarray

G

The ignored control matrix.

TYPE: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

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: StateVariable

sv

The current state variables.

TYPE: StateVariable

postIncrement

postIncrement(sv0: StateVariable, sv: StateVariable)

Post-processing after the increment

PARAMETER DESCRIPTION
sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

postInitialize

postInitialize(sv: StateVariable) -> None

Post-initialize the state variables.

PARAMETER DESCRIPTION
sv

The state variables.

TYPE: StateVariable

postProcess

postProcess(sv: StateVariable) -> None

Post-process the state variables.

PARAMETER DESCRIPTION
sv

The state variables.

TYPE: StateVariable

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: StateVariable

sv

The state variables.

TYPE: StateVariable

preIncrement

preIncrement(sv0: StateVariable, sv: StateVariable)

Pre-processing before the increment

PARAMETER DESCRIPTION
sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

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: StateVariable

sv

The state variables.

TYPE: StateVariable

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: StateVariable

sv

The current state variables.

TYPE: StateVariable

run

run() -> List[StateVariable]

Run the model.

RETURNS DESCRIPTION
List[StateVariable]

The state variables.

saveElasticStiffnessMatrix

saveElasticStiffnessMatrix(sv0: StateVariable, sv: StateVariable)

Save elastic stiffness matrix.

setup

setup()

Post initialization.

stiffness

stiffness(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate the stiffness matrix.

PARAMETER DESCRIPTION
sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variable.

TYPE: StateVariable

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: ndarray

dsig

The stress increment.

TYPE: ndarray

deps

The strain increment.

TYPE: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

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: ndarray

deps

The strain increment.

TYPE: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variable.

TYPE: StateVariable

check_elastic_state

Whether to check if the current stress state is elastic.

TYPE: bool DEFAULT: True

check_positive_definite

Whether to check the positive definiteness of the elastoplastic stiffness matrix.

TYPE: bool DEFAULT: None

check_non_singularity

Whether to check the non-singularity of the elastoplastic stiffness matrix.

TYPE: bool DEFAULT: None

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

debugVariable instance-attribute

debugVariable: DebugVariable = DebugVariable()

Debug information

material instance-attribute

material: Material = Material(props)

The material.

name instance-attribute

name: str

The name of the contact law

options instance-attribute

options: Options = Options()

The options

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: int

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
ec

Critical void ratio

TYPE: float

__init__

__init__(props: dict[str, float] = None)

Constructor for the base class of all contact laws.

abstractSetup

abstractSetup()

Post-initialization for the contact law.

check

check(idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable)

Check the increment is reasonable

PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

ddisp

The displacement increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

dfdforce

dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the force:

\[ \frac{\partial F}{\partial \boldsymbol{f}} \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdforce

Derivative of yield function with respect to the force

TYPE: ndarray

dfdforce0

dfdforce0(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the force:

\[ \frac{\partial F}{\partial \boldsymbol{f}} \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdforce

Derivative of yield function with respect to the force

TYPE: ndarray

dfdforce1

dfdforce1(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the force:

\[ \frac{\partial F}{\partial \boldsymbol{f}} \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdforce

Derivative of yield function with respect to the force

TYPE: ndarray

dgdforce

dgdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of potential function with respect to the force:

\[ \frac{\partial G}{\partial \boldsymbol{f}} \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dgdforce

Derivative of potential function with respect to the force

TYPE: ndarray

dgdforce0

dgdforce0(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of potential function with respect to the force:

\[ \frac{\partial G}{\partial \boldsymbol{f}} \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dgdforce

Derivative of potential function with respect to the force

TYPE: ndarray

dgdforce1

dgdforce1(
    idx: int, dfdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

Calculate derivative of potential function with respect to the force:

\[ \frac{\partial G}{\partial \boldsymbol{f}} \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

dfdforce

Derivative of yield function with respect to the force

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dgdforce

Derivative of potential function with respect to the force

TYPE: ndarray

elasticStiffness

elasticStiffness(
    idx: int, fn: float, sv0: StateVariable, sv: StateVariable
) -> ndarray

Calculate the elastic stiffness matrix, a 3x3 matrix in the following form:

\[ \mathbf{K}_e = \begin{bmatrix} k_n & 0 & 0 \\ 0 & k_t & 0 \\ 0 & 0 & k_t \end{bmatrix} \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

fn

Normal force

TYPE: float

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
Ke

Elastic stiffness matrix

TYPE: ndarray

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 integration
  • integrate: integrate the force-displacement contact law to update the contact force
  • postIntegration: called after the integration
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

ddisp

The displacement increment

TYPE: ndarray

Ke

Elastic stiffness matrix

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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 displacement
  • K = stiffness: calculate the stiffness matrix
  • force += K @ ddisp: update the force
  • check: check the convergence
  • postIncrement: called after the increment
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

ddisp

The displacement increment

TYPE: ndarray

Ke

Elastic stiffness matrix

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: StateVariable

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: int

ddisp

The displacement increment calculated from the elastic trial from the force increment

TYPE: ndarray

Ke

Elastic stiffness matrix

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: int

ddisp

Displacement increment

TYPE: ndarray

dforce

Force increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

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:

\[ \sum\frac{\partial F}{\partial\kappa}\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p} \frac{\partial G}{\partial\boldsymbol{f}} \]

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: int

dgdforce

Derivative of potential function with respect to the force

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
Kp

Plastic modulus in the equation of plastic multiplier

TYPE: float

plasticModulus0

plasticModulus0(
    idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

Plastic modulus in the equation of plastic multiplier, coefficient of plastic multiplier:

\[ \sum\frac{\partial F}{\partial\kappa}\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p} \]

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: int

dgdforce

Derivative of potential function with respect to the force

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
Kp

Plastic modulus in the equation of plastic multiplier

TYPE: ndarray

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:

\[ \sum\frac{\partial F}{\partial\kappa}\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p} \frac{\partial G}{\partial\boldsymbol{f}} \]

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: int

dgdforce

Derivative of potential function with respect to the force

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
Kp

Plastic modulus in the equation of plastic multiplier

TYPE: float

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: int

ddisp

The displacement increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: int

ddisp

The displacement increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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:

\[ G = G(\boldsymbol{f}, \kappa) \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

fn

Normal force

TYPE: float

fr

Shear force

TYPE: float

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: int

ddisp

The displacement increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: int

ddisp

The displacement increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

setup

setup()

Set up specific contact law.

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:

\[ \begin{bmatrix} \mathrm{d}f_n \\ \mathrm{d}f_s \\ \mathrm{d}f_t \end{bmatrix} = \begin{bmatrix} K_{nn} & K_{ns} & K_{nt} \\ K_{sn} & K_{ss} & K_{st} \\ K_{tn} & K_{ts} & K_{tt} \end{bmatrix} \begin{bmatrix} \mathrm{d}\delta_n \\ \mathrm{d}\delta_s \\ \mathrm{d}\delta_t \end{bmatrix} \]

symmetricContactScalars

symmetricContactScalars() -> List[str]

Symmetric contact scalar variables.

symmetricContactVectors

symmetricContactVectors() -> List[str]

Symmetric contact vector variables.

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:

\[ \mathrm{d}\kappa = \frac{\partial\kappa}{\partial\boldsymbol{\delta}^p}\mathrm{d}\boldsymbol{\delta}^p \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

dlambda

Plastic multiplier

TYPE: float

ddispp

Plastic displacement increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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:

\[ F = F(\boldsymbol{f}, \kappa) \]
PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

fn

Normal force

TYPE: float

fr

Shear force

TYPE: float

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: int

Ke

The stiffness matrix

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: int

fn

Normal force

TYPE: ndarray

fr

Shear force

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
ndarray

Values of the yield function

ContactLawRegistry

__init__

__init__() -> None

contact_law_name staticmethod

contact_law_name(type: ContactLawType) -> str

Get the name of a contact law enum value

contact law type

C++: micromechanical::contacts::ContactLawRegistry::contact_law_name(const enum micromechanical::contacts::ContactLawType) --> std::string

contact_law_type staticmethod

contact_law_type(name: str) -> ContactLawType

Get the contact law type from a string

contact law name

C++: micromechanical::contacts::ContactLawRegistry::contact_law_type(const std::string &) --> enum micromechanical::contacts::ContactLawType

CoulombContactLaw

Bases: ElastoplasticContactLaw, ConstantStiffness

Coulomb contact law.

dfdforce

dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

setup

setup()

yieldFunction

yieldFunction(
    idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float

DebugVariable

debug instance-attribute

debug: bool = False

enables instance-attribute

enables: Dict[str, bool] = numba.typed.Dict.empty(
    numba.types.string, numba.types.boolean
)

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

__init__

__init__()

appendScalar

appendScalar(field: str, index: dict, value: float)

Append scalar debug information.

appendVector

appendVector(field: str, index: dict, value: VectorXf)

Append vector debug information.

clear

clear()

Clear the debug information.

initialize

initialize(sv: StateVariable)

Initialize the debug information.

setEnables

setEnables(enables: Dict[str, bool])

Elastic

Bases: HookeLaw

Elastic model

setup

setup()

ElasticContactLaw

Bases: NonlinearElasticContactLaw, ConstantStiffness

setup

setup()

stiffness

stiffness(
    idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

ElastoplasticContactLaw

Bases: ContactLawBase

Base class for elastoplastic contact laws.

plasticMethod instance-attribute

plasticMethod: str

The plastic method

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: int

Ke

The stiffness matrix

TYPE: ndarray

ddisp

Displacement increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

RETURNS DESCRIPTION
Kep

Elasto-plastic stiffness matrix

TYPE: ndarray

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: int

Ke

The stiffness matrix

TYPE: ndarray

ddisp

Displacement increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

RETURNS DESCRIPTION
Kep

Elasto-plastic stiffness matrix

TYPE: ndarray

abstractSetup

abstractSetup()

isCPA

isCPA() -> bool

Whether tha plastic method is CPA.

isCPPM

isCPPM() -> bool

Whether tha plastic method is CPPM.

isExplicit

isExplicit() -> bool

Whether tha plastic method is explicit.

setPlasticMethod

setPlasticMethod(method: str)

Set the plastic method

PARAMETER DESCRIPTION
method

The plastic method

TYPE: str

stiffness

stiffness(
    idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

ElastoplasticMaterial

Bases: MaterialBase

Elastoplastic model material properties.

Ad instance-attribute

Ad: float = props.pop('Ad', 0.6)

a dilation parameter

E instance-attribute

E: float = props.pop('E', -1.0)

Young's modulus

G instance-attribute

G: float = props.pop('G', -1.0)

Shear modulus

K instance-attribute

K: float = props.pop('K', -1.0)

Bulk modulus

Lambda instance-attribute

Lambda: float = props.pop('Lambda', 0.06)

slope of the critical state line

M instance-attribute

M: float = props.pop('M', -1.0)

Constraint modulus

c instance-attribute

c: float = props.pop('c', 0.1)

Cohesion

e0 instance-attribute

e0: float = props.pop('e0', 0.6)

Void ratio

ea instance-attribute

ea: float = props.pop('ea', 0.0)

A parameter in the anisotropic state parameter

epsilon instance-attribute

epsilon: float = props.pop('epsilon', 0.1)

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)

epsr instance-attribute

epsr: float = props.pop('epsr', 0.06)

Reference shear strain

eref instance-attribute

eref: float = props.pop('eref', 0.81)

reference void ratio

kp instance-attribute

kp: float = props.pop('kp', 0.001)

a parameter in the yield surface of SIMSAND model

lame instance-attribute

lame: float = props.pop('lame', -1.0)

Lame coefficient

me instance-attribute

me: float = props.pop('me', -1.0)

Critical stress ratio for triaxial extension

nd instance-attribute

nd: float = props.pop('nd', 1.0)

exponent for the phase-transformation angle

ne instance-attribute

ne: float = props.pop('ne', 0.6)

exponent in the elastic stiffness

np instance-attribute

np: float = props.pop('np', 1.0)

exponent for the peak friction angle

nu instance-attribute

nu: float = props.pop('nu', -1.0)

Poisson's ratio

phi instance-attribute

phi: float = props.pop('phi', 33.0)

Critical friction angle

phid instance-attribute

phid: float = props.pop('phid', -1.0)

Friction angle for stress-dilatancy relationship

pref instance-attribute

pref: float = props.pop('pref', 101.325)

reference pressure

psi instance-attribute

psi: float = props.pop('psi', 0.0)

Dilation angle

thetat instance-attribute

thetat: float = props.pop('thetat', 30.0)

Transition angle

xi instance-attribute

xi: float = props.pop('xi', 0.5)

exponent in the critical state line

__contains__

__contains__(key: str) -> bool

__getitem__

__getitem__(key: str) -> float

__init__

__init__(props: dict[str, float] = None)

__setitem__

__setitem__(key: str, value: float)

ElastoplasticModel

Bases: ElastoplasticModelBase

fabric instance-attribute

fabric: FabricTensor = FabricTensor('chang1990-ext', 'li2012', None)

Fabric tensor

material instance-attribute

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__

__init__(props: Dict[str, float] | None = None)

Constructor for the elastoplastic models.

PARAMETER DESCRIPTION
props

The material properties, by default None

TYPE: Dict[str, float] DEFAULT: None

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: StateVariable

sv

Current state variables

TYPE: StateVariable

createStateVariable

createStateVariable() -> StateVariable

dCSRdsig

dCSRdsig(sv0: StateVariable, sv: StateVariable) -> ndarray

Derivative of critical stress ratio with respect to stress

dMpde

dMpde(sv0: StateVariable, sv: StateVariable) -> float

dMpdec

dMpdec(sv0: StateVariable, sv: StateVariable) -> float

dMpdsig

dMpdsig(sv0: StateVariable, sv: StateVariable) -> ndarray

Derivative of peak stress ratio with respect to stress

dMptde

dMptde(sv0: StateVariable, sv: StateVariable) -> float

dMptdec

dMptdec(sv0: StateVariable, sv: StateVariable) -> float

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

initialize

initialize(sv: StateVariable)

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.

postIncrement

postIncrement(sv0: StateVariable, sv: StateVariable)

postProcess

postProcess(sv: StateVariable) -> None

preIncrement

preIncrement(sv0: StateVariable, sv: StateVariable)

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.

cached_ instance-attribute

cached_: bool

dpadsiga instance-attribute

dpadsiga: VectorXf

dqadtaua instance-attribute

dqadtaua: VectorXf

dtauadsiga instance-attribute

dtauadsiga: MatrixXf

plasticMethod instance-attribute

plasticMethod: str

The plastic method

state instance-attribute

state: str

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: ndarray

deps

Strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

CSL

CSL(sv0: StateVariable, sv: StateVariable) -> float

Calculate the critical state line

PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: ndarray

deps

Strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

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: int

K

The stiffness matrix.

TYPE: ndarray

deps

Strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

revert

Whether to revert the state variables after the increment for estimation

TYPE: bool DEFAULT: False

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: ndarray

deps

Strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

order

Order of the Runge-Kutta method, by default None

TYPE: int DEFAULT: None

abstractSetup

abstractSetup()

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: StateVariable

sv

Current state variables

TYPE: StateVariable

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: StateVariable

sv

Current state variables

TYPE: StateVariable

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: StateVariable

sv

Current state variables

TYPE: StateVariable

d2gdsig2

d2gdsig2(dfdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate second-order derivative of potential function with respect to the stress:

\[ \frac{\partial^2 G}{\partial \boldsymbol{\sigma}^2} \]
PARAMETER DESCRIPTION
dfdsig

Derivative of yield function with respect to the stress

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
d2gdsig2

Derivative of potential function with respect to the stress

TYPE: ndarray

d2gdsig20

d2gdsig20(dfdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate second-order derivative of potential function with respect to the stress:

\[ \frac{\partial^2 G}{\partial \boldsymbol{\sigma}^2} \]
PARAMETER DESCRIPTION
dfdsig

Derivative of yield function with respect to the stress

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
d2gdsig2

Derivative of potential function with respect to the stress

TYPE: ndarray

d2gdsig21

d2gdsig21(dfdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate second-order derivative of potential function with respect to the stress:

\[ \frac{\partial^2 G}{\partial \boldsymbol{\sigma}^2} \]
PARAMETER DESCRIPTION
dfdsig

Derivative of yield function with respect to the stress

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
d2gdsig2

Derivative of potential function with respect to the stress

TYPE: ndarray

dfdeps

dfdeps(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the strain:

\[ \frac{\partial F}{\partial \boldsymbol{\varepsilon}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdeps

Derivative of yield function with respect to the strain

TYPE: ndarray

dfdeps0

dfdeps0(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the strain:

\[ \frac{\partial F}{\partial \boldsymbol{\varepsilon}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdeps

Derivative of yield function with respect to the strain

TYPE: ndarray

dfdeps1

dfdeps1(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the strain:

\[ \frac{\partial F}{\partial \boldsymbol{\varepsilon}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdeps

Derivative of yield function with respect to the strain

TYPE: ndarray

dfdepsp

dfdepsp(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the plastic strain:

\[ \frac{\partial F}{\partial \boldsymbol{\varepsilon}^p} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdepsp

Derivative of yield function with respect to the plastic strain

TYPE: ndarray

dfdepsp0

dfdepsp0(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the plastic strain:

\[ \frac{\partial F}{\partial \boldsymbol{\varepsilon}^p} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdepsp

Derivative of yield function with respect to the plastic strain

TYPE: ndarray

dfdepsp1

dfdepsp1(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the plastic strain:

\[ \frac{\partial F}{\partial \boldsymbol{\varepsilon}^p} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdepsp

Derivative of yield function with respect to the plastic strain

TYPE: ndarray

dfdsig

dfdsig(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the stress:

\[ \frac{\partial F}{\partial \boldsymbol{\sigma}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdsig

Derivative of yield function with respect to the stress

TYPE: ndarray

dfdsig0

dfdsig0(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the stress:

\[ \frac{\partial F}{\partial \boldsymbol{\sigma}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdsig

Derivative of yield function with respect to the stress

TYPE: ndarray

dfdsig1

dfdsig1(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of yield function with respect to the stress:

\[ \frac{\partial F}{\partial \boldsymbol{\sigma}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dfdsig

Derivative of yield function with respect to the stress

TYPE: ndarray

dgdsig

dgdsig(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of potential function with respect to the stress:

\[ \frac{\partial G}{\partial \boldsymbol{\sigma}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dgdsig

Derivative of potential function with respect to the stress

TYPE: ndarray

dgdsig0

dgdsig0(sv0: StateVariable, sv: StateVariable) -> ndarray

Calculate derivative of potential function with respect to the stress:

\[ \frac{\partial G}{\partial \boldsymbol{\sigma}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
dgdsig

Derivative of potential function with respect to the stress

TYPE: ndarray

dgdsig1

dgdsig1(
    dfdsig: ndarray,
    sv0: StateVariable,
    sv: StateVariable,
    associated: bool = None,
) -> ndarray

Calculate derivative of potential function with respect to the stress:

\[ \frac{\partial G}{\partial \boldsymbol{\sigma}} \]
PARAMETER DESCRIPTION
dfdsig

Derivative of yield function with respect to the stress

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

associated

Whether to override the option to use associated flow rule

TYPE: bool DEFAULT: None

RETURNS DESCRIPTION
dgdsig

Derivative of potential function with respect to the stress

TYPE: ndarray

dsigadsig

dsigadsig(sv0: StateVariable, sv: StateVariable) -> ndarray

Derivative of the modified stress with respect to the stress:

\[ \frac{\partial \boldsymbol{\sigma}^\prime}{\partial \boldsymbol{\sigma}} \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

elasticTrial

elasticTrial(
    K: ndarray, deps: ndarray, sv0: StateVariable, sv: StateVariable
) -> float

Perform the elastic trial.

PARAMETER DESCRIPTION
K

The stiffness matrix.

TYPE: ndarray

deps

Strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

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: StateVariable

sv

Current state variables

TYPE: StateVariable

endConstantStressStateScope1

endConstantStressStateScope1(sv0: StateVariable, sv: StateVariable)

End the scope of a constant stress state.

PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

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: ndarray

deps

Strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

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

isCPA

isCPA() -> bool

Whether tha plastic method is CPA.

isCPPM

isCPPM() -> bool

Whether tha plastic method is CPPM.

isExplicit

isExplicit() -> bool

Whether tha plastic method is explicit.

isRungeKutta

isRungeKutta() -> bool

Whether tha plastic method is RungeKutta.

nonCoaxialDirection

nonCoaxialDirection(F: ndarray, n: ndarray, m: ndarray) -> ndarray

Non-coaxial direction

orthogonalDirection

orthogonalDirection(F: ndarray, n: ndarray) -> ndarray

Orthogonal direction

plasticModulus

plasticModulus(dgdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> float

Plastic modulus in the equation of plastic multiplier including dgdsig, coefficient of plastic multiplier:

\[ \sum\frac{\partial F}{\partial\kappa}\frac{\partial\kappa}{\partial\boldsymbol{\varepsilon}^p} \frac{\partial G}{\partial\sigma} \]
PARAMETER DESCRIPTION
dgdsig

Derivative of potential function with respect to the stress

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
Kp

Plastic modulus in the equation of plastic multiplier

TYPE: float

plasticModulus1

plasticModulus1(
    dgdsig: ndarray, sv0: StateVariable, sv: StateVariable
) -> float

Plastic modulus in the equation of plastic multiplier including dgdsig, coefficient of plastic multiplier:

\[ \sum\frac{\partial F}{\partial\kappa}\frac{\partial\kappa}{\partial\boldsymbol{\varepsilon}^p} \frac{\partial G}{\partial\sigma} \]
PARAMETER DESCRIPTION
dgdsig

Derivative of potential function with respect to the stress

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
Kp

Plastic modulus in the equation of plastic multiplier

TYPE: float

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: StateVariable

sv

State variables

TYPE: StateVariable

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: ndarray

deps

Strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

setPlasticMethod

setPlasticMethod(method: str)

Set the plastic method

PARAMETER DESCRIPTION
method

The plastic method

TYPE: str

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:

\[ \mathrm{d}\kappa = \frac{\partial\kappa}{\partial\boldsymbol{\varepsilon}^p}\mathrm{d}\boldsymbol{\varepsilon}^p \]
PARAMETER DESCRIPTION
ddlambda

Plastic multiplier

TYPE: float

ddepsp

Plastic strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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:

\[ F = F(\boldsymbol{\sigma}, \kappa) \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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:

\[ F = F(\boldsymbol{\sigma}, \kappa) \]
PARAMETER DESCRIPTION
sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

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: ndarray

deps

Strain increment

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

ExponentialContactLaw

Bases: NonlinearElasticContactLaw, ChangStiffness, ExponentialBreakageCSL

Exponential contact law.

initialize

initialize(sv: StateVariable)

setup

setup()

stiffness

stiffness(
    idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

FabricTensor

Base class for fabric tensors.

changed instance-attribute

fabric tensor changed flags

coefs instance-attribute

coefs: Dict[str, float] = numba.typed.Dict.empty(
    numba.types.string, numba.types.float64
)

Fabric tensor coefficients

evolution instance-attribute

evolution: str = evolution

evolution type

rotated instance-attribute

rotated: bool = False

whether the fabric is rotated

tensor instance-attribute

tensor: MatrixXf = np.eye(3)

fabric tensor

type instance-attribute

type: str = type

Fabric tensor type

Fij

Fij() -> ndarray

The deviatoric fabric tensor.

__init__

__init__(
    type: AvailableFabricTypes = "chang1990-ext",
    evolution: AvailableFabricEvolutionTypes = "li2012",
    coefs: Dict[str, float] = None,
)

Initialize the fabric tensor.

density

density(beta: ndarray, gamma: ndarray) -> ndarray

Directional density function.

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: ndarray

CSR

Critical stress ratio

TYPE: float

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables at the end of the increment.

TYPE: StateVariable

use_plastic_strain

Whether to use the plastic strain for fabric evolution

TYPE: bool DEFAULT: True

nonproportionality_orthogonal

Weight of the orthogonal component of the non-proportionality in the fabric anisotropy variable.

TYPE: float DEFAULT: 0.0

nonproportionality_noncoaxial

Weight of the non-coaxial component of the non-proportionality in the fabric anisotropy variable.

TYPE: float DEFAULT: 0.0

initialize

initialize()

Initialize the fabric tensor.

requiresEvolution

requiresEvolution() -> bool

Check if the fabric tensor requires evolution.

requiresUpdate

requiresUpdate() -> bool

Check if the fabric tensor requires update.

rotate

rotate(rotate: bool = True)

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.

setupDefaultParameters

setupDefaultParameters()

Set the default fabric tensor parameters.

HyperbolicContactLaw

Bases: NonlinearElasticContactLaw, ChangStiffness, ExponentialBreakageCSL

Hyperbolic contact law.

initialize

initialize(sv: StateVariable)

setup

setup()

stiffness

stiffness(
    idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

HypoplasticContactLaw

Bases: NonlinearElasticContactLaw, ExponentialBreakageCSL

Hypoplastic contact law.

rcs instance-attribute

rcs: VectorXf

Relative coefficients, to speed up the calculation

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

initialize

initialize(sv: StateVariable)

preIntegration

preIntegration(
    idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> None

setup

setup()

stiffness

stiffness(
    idx: int, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

Integration

changed instance-attribute

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

n instance-attribute

n: MatrixXf = np.zeros((0, 3))

azimuthal angles of the integration points

npv instance-attribute

npv: float = npv

number of contacts per unit volume

radius instance-attribute

radius: float = radius

particle radius

type instance-attribute

type: str = 'BazantOh37'

integration type

Aij

Aij() -> ndarray

The fabric tensor Aij, an array of shape (3, 3).

\[ A_{ij} = \left[(2r)^2 \frac{N}{V} \left(\frac{2}{15}F_{ij} + \frac{1}{3} I\right) \right]^{-1} \]
RETURNS DESCRIPTION
ndarray

The fabric tensor.

Aij_

Aij_() -> ndarray

Calculate the fabric tensor Aij from the definition, an array of shape (3, 3).

\[ A_{ij} = \frac{1}{V} \sum_{c=1}^{N}{l_i^c l_j^c} \]

__init__

__init__(npv: float = 1000000000.0, radius=0.00065)

Constructor for the Gauss integration class.

PARAMETER DESCRIPTION
npv

number of contacts per unit volume

TYPE: float DEFAULT: 1000000000.0

radius

particle radius

TYPE: float DEFAULT: 0.00065

beta

beta() -> ndarray

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.

bi

bi(idx: int) -> ndarray

gamma

gamma() -> ndarray

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.

gi

gi(idx: int) -> ndarray

indexOf

indexOf(
    beta: float = -1.0, gamma: float = -1.0, tol: float = 1e-06
) -> Tuple[ndarray, ndarray]

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: float DEFAULT: -1.0

gamma

The angle between the azimuth and the X axis

TYPE: float DEFAULT: -1.0

tol

The tolerance for the comparison of the angles, by default 1e-6

TYPE: float DEFAULT: 1e-06

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

initialize

initialize(sv: StateVariable) -> None

Initialize the integration points.

l

l() -> ndarray

The contact vectors of the integration points, an array of shape (n, 3).

RETURNS DESCRIPTION
ndarray

The integration points in the x-y plane.

li

li(idx: int) -> ndarray

loadIntegrationPoints

loadIntegrationPoints(data: ndarray, full: bool = False)

Load integration points.

p

p(idx: int) -> ndarray

The transformation matrix, an array of shape (3, 3).

RETURNS DESCRIPTION
ndarray

The transformation matrix.

reset

reset() -> None

Reset temporary variables.

rho

rho() -> float

Normalized packing density.

rotate

rotate(F: ndarray, idx: int) -> ndarray

Rotate the fabric tensor.

rotates

rotates(F: ndarray) -> List[ndarray]

Rotate the fabric tensors.

s

s() -> ndarray

The first shear direction, an array of shape (n, 3).

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: str DEFAULT: 'chang1990-ext'

evolution

The evolution type of the anisotropic parameter.

TYPE: str DEFAULT: 'li2012'

coefs

The coefficients of the anisotropic parameter.

TYPE: Dict[str, float] DEFAULT: None

setBazantOh37

setBazantOh37(full: bool = False)

Set the BazantOh37 integration points.

PARAMETER DESCRIPTION
full

Full 37*2 integration points.

TYPE: bool DEFAULT: False

setBazantOh61

setBazantOh61(full: bool = False)

Set the BazantOh61 integration points.

PARAMETER DESCRIPTION
full

Full 61*2 integration points.

TYPE: bool DEFAULT: False

setNPVFromNormalizedPackingDensity

setNPVFromNormalizedPackingDensity(rho: float)

Set the number of contacts per unit volume from the normalized packing density with the following equation:

\[ \rho=\frac{Nl^3}{V}=\frac{8Nr^3}{V} \Longrightarrow \frac{N}{V}=\frac{\rho}{8r^3} \]
PARAMETER DESCRIPTION
rho

normalized packing density

TYPE: float

setNPVFromVoidRatio

setNPVFromVoidRatio(e: float)

Set the number of contacts per unit volume from the void ratio with the following equation:

\[ \frac{N}{V}=\frac{3(13.28-8e)}{4\pi r^3(1+e)} \]
PARAMETER DESCRIPTION
e

void ratio

TYPE: float

setParameters

setParameters(npv: float, radius: float) -> None

Set the parameters.

PARAMETER DESCRIPTION
npv

number of contacts per unit volume

TYPE: float

radius

particle radius

TYPE: float

si

si(idx: int) -> ndarray

size

size() -> int

The number of integration points.

RETURNS DESCRIPTION
int

The number of integration points.

t

t() -> ndarray

The second shear direction, an array of shape (n, 3).

ti

ti(idx: int) -> ndarray

weight

weight() -> ndarray

The weights of the integration points, an array of shape (n,).

RETURNS DESCRIPTION
ndarray

The weights of the integration points.

wi

wi(idx: int) -> ndarray

J2Yang

Bases: Homogenization, CriticalStateLine, StressDilatancy, AnisotropicStrength

J2Yang model

D_ instance-attribute

D_: float

M_ instance-attribute

M_: float

epsd_ instance-attribute

epsd_: float

kp_ instance-attribute

kp_: float

beginConstantStressStateScope

beginConstantStressStateScope(sv0: StateVariable, sv: StateVariable)

dfdeps

dfdeps(sv0: StateVariable, sv: StateVariable) -> ndarray

dfdsig

dfdsig(sv0: StateVariable, sv: StateVariable) -> ndarray

kp

kp(sv0: StateVariable, sv: StateVariable) -> float

plasticModulus

plasticModulus(dgdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> float

setup

setup()

yieldFunction

yieldFunction(sv0: StateVariable, sv: StateVariable) -> float

KinematicHomogenization

Bases: Homogenization

Kinematic homogenization for elastic materials

setup

setup()

Load

load phases manager.

phases instance-attribute

phases: List[LoadPhase] = numba.typed.List([p for _ in (range(0))])

load phases

__init__

__init__()

Constructor for the load class.

addConfinementPhase

addConfinementPhase(eps1: float, steps: int) -> LoadPhase

Add a confinement load phase.

PARAMETER DESCRIPTION
steps

Number of steps.

TYPE: int

eps1

Maximum strain.

TYPE: float

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: int

sig3_min

Minimum value of minimum principal stress.

TYPE: float

sig3_max

Maximum value of minimum principal stress.

TYPE: float

eta

Constant stress ratio.

TYPE: float

axis

Loading axis, by default 1

TYPE: int DEFAULT: 1

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: int

sigc

Confined stress.

TYPE: float

eps1

Maximum strain.

TYPE: float

axis

Loading axis, by default 1

TYPE: int DEFAULT: 1

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: int

sigc

Confined stress.

TYPE: float

RETURNS DESCRIPTION
LoadPhase

The load phase.

addLoadPhase

addLoadPhase(phase: LoadPhase) -> LoadPhase

Add a load phase.

PARAMETER DESCRIPTION
phase

The load phase.

TYPE: LoadPhase

RETURNS DESCRIPTION
LoadPhase

The load phase.

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: float

b

Intermediate stress ratio.

TYPE: float

eps1

Maximum strain.

TYPE: float

steps

Number of steps.

TYPE: int

axis1

Major axis, by default 1

TYPE: int DEFAULT: 1

axis2

Intermediate axis, by default 2

TYPE: int DEFAULT: 2

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: float

b

Intermediate stress ratio.

TYPE: float

steps

Number of steps.

TYPE: int

axis1

Major axis, by default 1

TYPE: int DEFAULT: 1

axis2

Intermediate axis, by default 2

TYPE: int DEFAULT: 2

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: int

eps1

Maximum strain.

TYPE: float

axis

Loading axis, by default 1

TYPE: int DEFAULT: 1

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: bool DEFAULT: False

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: int

eps1

Maximum strain.

TYPE: float

axis

Loading axis, by default 1

TYPE: int DEFAULT: 1

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: bool DEFAULT: False

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: int

eps1

Maximum strain.

TYPE: float

b

Intermediate stress ratio.

TYPE: float

axis1

Major axis, by default 1

TYPE: int DEFAULT: 1

axis2

Intermediate axis, by default 2

TYPE: int DEFAULT: 2

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: bool DEFAULT: True

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: int

epsa

Axial strain.

TYPE: float

b

Intermediate stress ratio.

TYPE: float

axis1

Major axis, by default 1

TYPE: int DEFAULT: 1

axis2

Intermediate axis, by default 2

TYPE: int DEFAULT: 2

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: bool DEFAULT: True

RETURNS DESCRIPTION
LoadPhase

The load phase.

axisIndex staticmethod

axisIndex(axis: int = 1)

Get the index of the axis.

PARAMETER DESCRIPTION
axis

Loading axis, by default 1

TYPE: int DEFAULT: 1

RETURNS DESCRIPTION
int

The index of the axis.

clear

clear()

Clear the load phases.

initialize

initialize(sv: StateVariable)

Initialize the load.

PARAMETER DESCRIPTION
sv

The state variables.

TYPE: StateVariable

LoadPhase

A class for a single load phase.

b instance-attribute

b: float = b

Intermediate stress ratio

control instance-attribute

control: VectorXf = control

Control type of the load, 0 for stress control, 1 for strain control, -1 for ignored

final instance-attribute

final: VectorXf = final

Final mixed stress/strain

initial instance-attribute

initial: VectorXf = initial

Initial mixed stress/strain

steps instance-attribute

steps: int = steps

Number of steps

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

true_triaxial_control_type: str = 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

true_triaxial_intermediate_axis instance-attribute

true_triaxial_intermediate_axis: int = true_triaxial_intermediate_axis

Intermediate axis for true triaxial loading, 1 for axis 1, 2 for axis 2, 3 for axis 3

true_triaxial_major_axis instance-attribute

true_triaxial_major_axis: int = true_triaxial_major_axis

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: ndarray DEFAULT: zeros(6)

final

Final mixed stress/strain.

TYPE: ndarray DEFAULT: zeros(6)

control

The control type of the load increment, 0 for stress control, 1 for strain control, -1 for ignored.

TYPE: ndarray DEFAULT: zeros(6)

total

Control whether the load is incremental or total, 0 for incremental, 1 for total.

TYPE: ndarray DEFAULT: zeros(6)

steps

Number of steps.

TYPE: int DEFAULT: 100

b

Intermediate stress ratio.

TYPE: float DEFAULT: -1.0

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: str DEFAULT: 'none'

true_triaxial_major_axis

Major axis for true triaxial loading, 1 for axis 1, 2 for axis 2, 3 for axis 3.

TYPE: int DEFAULT: 1

true_triaxial_intermediate_axis

Intermediate axis for true triaxial loading, 1 for axis 1, 2 for axis 2, 3 for axis 3.

TYPE: int DEFAULT: 2

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: StateVariable

isCompatibleWith

isCompatibleWith(previous: 'LoadPhase') -> bool

Check if the load phase is compatible with the previous load phase.

PARAMETER DESCRIPTION
previous

Previous load phase.

TYPE: LoadPhase

RETURNS DESCRIPTION
bool

True if compatible, False otherwise.

isIsotropic

isIsotropic(tol: float = 1e-06) -> bool

Check if the load phase is isotropic.

makeCompatibleWith

makeCompatibleWith(previous: 'LoadPhase')

Make the load phase compatible with the previous load phase.

PARAMETER DESCRIPTION
previous

Previous load phase.

TYPE: LoadPhase

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: int

sv

State variables

TYPE: StateVariable

dfdforce

dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

dgdforce

dgdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

initialize

initialize(sv: StateVariable)

plasticModulus0

plasticModulus0(
    idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

setup

setup()

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.

Ad instance-attribute

Ad: float = props.pop('Ad', 0.6)

a dilation parameter

Lambda instance-attribute

Lambda: float = props.pop('Lambda', 0.06)

compression -> slope of CSL line (lambda)

R instance-attribute

R: float = props.pop('R', 0.0)

:math:R, A material constant, :math:k_n=k_t\times R

V instance-attribute

V: float = props.pop('V', 0.0)

A large positive parameter

X instance-attribute

X: float = props.pop('X', 0.0)

A positive model parameter

b instance-attribute

b: float = props.pop('b', 1e-07)

:math:b, Control the evolution rate of the grain breakage

c instance-attribute

c: float = props.pop('c', 0.0)

Usual ratio of extension to compression quantities

ch instance-attribute

ch: float = props.pop('ch', 0.0)

Stress-ratio-related hardening parameters

chi0 instance-attribute

chi0: float = props.pop('chi0', 0.0)

:math:\chi_0, Initial bounding ratio

cohesion instance-attribute

cohesion: float = props.pop('cohesion', 0.0)

adhesive stress

e0 instance-attribute

e0: float = props.pop('e0', 0.6)

initial void ratio

ec0 instance-attribute

ec0: float = props.pop('ec0', 0.7)

initial critical void ratio

emax instance-attribute

emax: float = props.pop('emax', 1000.0)

:math:e_{\max}, Maximal void ratio

emin instance-attribute

emin: float = props.pop('emin', -1.0)

:math:e_{\min}, Minimal void ratio

eref instance-attribute

eref: float = props.pop('eref', 0.81)

void ratio at the critical state

eref0 instance-attribute

eref0: float = props.pop('eref0', 0.81)

initial critical void ratio

erefu instance-attribute

erefu: float = props.pop('erefu', 0.8)

: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

fb0: float = props.pop('fb0', 0.0)

:math:\sigma_{b0}, Initial adhesive normal stress

fc0 instance-attribute

fc0: float = props.pop('fc0', 100.0)

:math:\sigma_{c0}, Initial pre-consolidated stress

fnr instance-attribute

fnr: float = props.pop('fnr', 0.0)

Mean effective stress when log(e) = 1 in the LCC line (log(e) - log(p) space)

fref instance-attribute

fref: float = props.pop('fref', 0.0001)

reference force

h0 instance-attribute

h0: float = props.pop('h0', 0.0)

Stress-ratio-related hardening parameters

hp instance-attribute

hp: float = props.pop('hp', 5000.0)

:math:h_p, Related to plastic modulus of bounding surface effect

integration instance-attribute

integration: Integration = Integration(1000000000.0, 0.00065)

Integration

kappa instance-attribute

kappa: float = props.pop('kappa', 0.01)

slope of swelling line

kn0 instance-attribute

kn0: float = props.pop('kn0', 80.0)

initial normal force

kp instance-attribute

kp: float = props.pop('kp', 0.0)

:math:k_p, A parameter in the SimSand yield formula

kpr instance-attribute

kpr: float = props.pop('kpr', 1.0)

a ratio of normal stiffness (k_n) to peak stiffness (k_p)

krr instance-attribute

krr: float = props.pop('krr', 0.4)

a ratio of normal stiffness (k_n) to tangential stiffness (k_r)

kt0 instance-attribute

kt0: float = props.pop('kt0', 0.0)

:math:K_{t0}, Reference shear modulus

m instance-attribute

m: float = props.pop('m', 0.0)

:math:m, Control the distance between NCL and CSL

n instance-attribute

n: float = props.pop('n', 1.0)

:math:n, Control the shape of yield surface

nd instance-attribute

nd: float = props.pop('nd', 0.5)

the exponential in the phase-transformation angle

ne instance-attribute

ne: float = props.pop('ne', 0.0)

an exponent in the normal stiffness

ng instance-attribute

ng: float = props.pop('ng', 0.0)

:math:n_g, An exponent in the formula of nonlinear shear modulus

np instance-attribute

np: float = props.pop('np', 1.0)

the exponential in the dynamic friction angle

nw instance-attribute

nw: float = props.pop('nw', 1.0)

:math:n_w, Control the effect of plastic work to the grain breakage

phi instance-attribute

phi: float = props.pop('phi', 33.0)

inter-particle friction angle

pref instance-attribute

pref: float = props.pop('pref', 101.325)

reference load at critical state

rho instance-attribute

rho: float = props.pop('rho', 0.0)

:math:\rho, Control the decreasing rate of CSL due to grain breakage

rhoc instance-attribute

rhoc: float = props.pop('rhoc', 0.0)

Slope of the LCC line in the log(e) - log(p) space

theta instance-attribute

theta: float = props.pop('theta', 0.0)

A constant exponent in the hardening behavior of p0

vf instance-attribute

vf: float = props.pop('vf', 0.0)

:math:\nu_f, Final poisson ratio

vi instance-attribute

vi: float = props.pop('vi', 0.5)

:math:\nu_i, Initial poisson ratio

xi instance-attribute

xi: float = props.pop('xi', 0.5)

:math:\xi, Control the nonlinearity of CSL line

xib instance-attribute

xib: float = props.pop('xib', 0.0)

:math:\xi_b, A soil constant controls hardening rule of :math:\xi_b

xic instance-attribute

xic: float = props.pop('xic', 0.0)

:math:\xi_c, A soil constant controls hardening rule of :math:\xi_c

Ad_

Ad_(idx: int) -> float

Lambda_

Lambda_(idx: int) -> float

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.

R_

R_(idx: int) -> float

V_

V_(idx: int) -> float

X_

X_(idx: int) -> float

__contains__

__contains__(key: str) -> bool

Check if the parameter exists.

__getitem__

__getitem__(key: str) -> float

Get the value of a parameter. This method is might be slower than direct getting the attribute.

__init__

__init__(props: dict[str, float] = None) -> None

Initialize the material parameters.

__setitem__

__setitem__(key: str, value: float)

Set the value of a parameter. This method is might be slower than direct setting the attribute.

anisotropicFactor

anisotropicFactor(key: str, idx: int) -> float

Return the anisotropic factor.

PARAMETER DESCRIPTION
key

The key of the anisotropic parameter.

TYPE: str

idx

The index of the integration point.

TYPE: int

b_

b_(idx: int) -> float

c_

c_(idx: int) -> float

ch_

ch_(idx: int) -> float

chi0_

chi0_(idx: int) -> float

cohesion_

cohesion_(idx: int) -> float

e0_

e0_(idx: int) -> float

ec0_

ec0_(idx: int) -> float

emax_

emax_(idx: int) -> float

emin_

emin_(idx: int) -> float

eref0_

eref0_(idx: int) -> float

eref_

eref_(idx: int) -> float

erefu_

erefu_(idx: int) -> float

fb0_

fb0_(idx: int) -> float

fc0_

fc0_(idx: int) -> float

fnr_

fnr_(idx: int) -> float

fref_

fref_(idx: int) -> float

get_

get_(key: str, idx: int, default_: float = 0.0) -> float

Get a parameter value with anisotropic factor.

PARAMETER DESCRIPTION
key

The key of the parameter.

TYPE: str

idx

The index of the integration point.

TYPE: int

default_

The default value of the parameter.

TYPE: float DEFAULT: 0.0

h0_

h0_(idx: int) -> float

hp_

hp_(idx: int) -> float

initialize

initialize(sv: StateVariable)

Initialize the material parameters.

kappa_

kappa_(idx: int) -> float

kn0_

kn0_(idx: int) -> float

kp_

kp_(idx: int) -> float

kpr_

kpr_(idx: int) -> float

krr_

krr_(idx: int) -> float

kt0_

kt0_(idx: int) -> float

m_

m_(idx: int) -> float

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

n_

n_(idx: int) -> float

nd_

nd_(idx: int) -> float

ne_

ne_(idx: int) -> float

ng_

ng_(idx: int) -> float

np_

np_(idx: int) -> float

nw_

nw_(idx: int) -> 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

pref_

pref_(idx: int) -> float

prop_

prop_(key: str, idx: int) -> float

rho_

rho_(idx: int) -> float

rhoc_

rhoc_(idx: int) -> 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: str

type

The type of the anisotropic parameter.

TYPE: str DEFAULT: 'chang1990-ext'

evolution

The evolution type of the anisotropic parameter.

TYPE: str DEFAULT: 'li2012'

coefs

The coefficients of the anisotropic parameter.

TYPE: Dict[str, float] DEFAULT: None

theta_

theta_(idx: int) -> float

vf_

vf_(idx: int) -> float

vi_

vi_(idx: int) -> float

xi_

xi_(idx: int) -> float

xib_

xib_(idx: int) -> float

xic_

xic_(idx: int) -> float

MaterialBase

Material parameters.

phi instance-attribute

phi: float

Critical friction angle

props instance-attribute

props: Dict[str, float]

Material properties

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.

__contains__

__contains__(key: str) -> bool

Check if the parameter exists.

__getitem__

__getitem__(key: str) -> float

Get a parameter value.

__setitem__

__setitem__(key: str, value: float)

Set a parameter value.

get

get(key: str, default_: float = 0.0) -> float

Get a parameter value.

initialization

initialization(props: dict[str, float] = None)

Initialize the base class.

initialize

initialize(sv: StateVariable)

Initialize the material parameters.

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

set

set(key: str, value: float)

Set a parameter value.

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

sin_phi_mises(ba: float = 0.0, Ra: float = 1.0) -> float

Friction angle sine of Von Mises failure criteria

sin_phi_smp

sin_phi_smp(ba: float = 0.0, Ra: float = 1.0) -> float

Friction angle sine of SMP failure criteria

sin_phi_tresca

sin_phi_tresca(ba: float = 0.0, Ra: float = 1.0) -> float

Friction angle sine of Tresca failure criteria

MicromechanicalBase

Bases: ElastoplasticModelBase

Base class for all micromechanical models.

contact instance-attribute

contact: ContactLawBase = self.createContactLaw(props)

The contact law.

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: Dict[str, float] DEFAULT: None

npv

The number of particles per volume, by default 1e9

TYPE: float DEFAULT: 1000000000.0

radius

The particle radius, by default 0.65e-3

TYPE: float DEFAULT: 0.00065

averageStrain

averageStrain(disp: ndarray, sv0: StateVariable, sv: StateVariable) -> ndarray

Average the contact displacement into the strain tensor.

PARAMETER DESCRIPTION
disp

The contact displacement.

TYPE: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

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: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

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: ndarray

ddisp

The contact displacement increment.

TYPE: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

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: ndarray

ddisp

The contact displacement increment.

TYPE: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

createContactLaw

createContactLaw(props: dict[str, float] = None) -> ContactLawBase

The default contact law.

PARAMETER DESCRIPTION
props

The material properties, by default None

TYPE: dict[str, float] DEFAULT: None

RETURNS DESCRIPTION
ContactLawBase

The default contact law.

createStateVariable

createStateVariable() -> StateVariable

Create a new state variable object.

initialize

initialize(sv: StateVariable)

Initialize the state variables.

PARAMETER DESCRIPTION
sv

A StateVariable object to be initialized.

TYPE: StateVariable

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: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

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: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

kn

The contact normal stiffness, by default None

TYPE: ndarray DEFAULT: None

ks

The contact shear stiffness at the first direction, by default None

TYPE: ndarray DEFAULT: None

kt

The contact shear stiffness at the second direction, by default None

TYPE: ndarray DEFAULT: None

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: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

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: ndarray

sv0

The state variables at the beginning of the increment.

TYPE: StateVariable

sv

The state variables.

TYPE: StateVariable

kn

The contact normal stiffness, by default None

TYPE: ndarray DEFAULT: None

ks

The contact shear stiffness at the first direction, by default None

TYPE: ndarray DEFAULT: None

kt

The contact shear stiffness at the second direction, by default None

TYPE: ndarray DEFAULT: None

RETURNS DESCRIPTION
ndarray

The force or force increment.

postIncrement

postIncrement(sv0: StateVariable, sv: StateVariable)

postProcess

postProcess(sv: StateVariable) -> None

preStressStrainIntegrate

preStressStrainIntegrate(sv0: StateVariable, sv: StateVariable)

setContactLaw

setContactLaw(contact)

Set the contact law.

PARAMETER DESCRIPTION
contact

The contact law.

TYPE: ContactLawBase

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: StateVariable

sv

The state variable.

TYPE: StateVariable

kn

The contact normal stiffness, by default None

TYPE: ndarray DEFAULT: None

ks

The contact shear stiffness at the first direction, by default None

TYPE: ndarray DEFAULT: None

kt

The contact shear stiffness at the second direction, by default None

TYPE: ndarray DEFAULT: None

RETURNS DESCRIPTION
ndarray

The elastic stiffness matrix.

MicromechanicalRegistry

__init__

__init__() -> None

model_name staticmethod

model_name(model: MicromechanicalType) -> str

Get the model name from a model type

Micromechanical model type

Micromechanical model name

C++: micromechanical::MicromechanicalRegistry::model_name(const enum micromechanical::MicromechanicalType) --> std::string

model_type staticmethod

model_type(model: str) -> MicromechanicalType

Get the model type from a string

Micromechanical model type

Micromechanical model type

C++: micromechanical::MicromechanicalRegistry::model_type(const std::string &) --> enum micromechanical::MicromechanicalType

MohrCoulomb

Bases: Homogenization

MohrCoulomb model

potentialFunction

potentialFunction(sv0: StateVariable, sv: StateVariable) -> float

setup

setup()

yieldFunction

yieldFunction(sv0: StateVariable, sv: StateVariable) -> float

NonlinearElasticContactLaw

Bases: ContactLawBase

Nonlinear elastic contact law

dfdforce

dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

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.

dfdforce

dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

dgdforce

dgdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

initialize

initialize(sv: StateVariable)

plasticModulus0

plasticModulus0(
    idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

setup

setup()

yieldFunction

yieldFunction(
    idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float

Options

Constitutive options.

best_fit_strain_averaging instance-attribute

best_fit_strain_averaging: bool = False

cache instance-attribute

cache: bool = True

cache_precision instance-attribute

cache_precision: int = 15

check_stiffness_matrix_symmetry instance-attribute

check_stiffness_matrix_symmetry: bool = False

contact_associated_flow_rule instance-attribute

contact_associated_flow_rule: bool = False

contact_check_convergence instance-attribute

contact_check_convergence: bool = True

contact_check_plastic_multiplier instance-attribute

contact_check_plastic_multiplier: bool = True

contact_default_potential_function_derivative instance-attribute

contact_default_potential_function_derivative: bool = False

contact_default_yield_function_derivative instance-attribute

contact_default_yield_function_derivative: bool = False

contact_ensure_force_state_on_yield_surface instance-attribute

contact_ensure_force_state_on_yield_surface: bool = False

contact_max_iterations instance-attribute

contact_max_iterations: int = 100

contact_min_normal_force instance-attribute

contact_min_normal_force: float = 1e-10

contact_plastic_method_multiplier instance-attribute

contact_plastic_method_multiplier: float = 1.0

contact_sanisand_constant_hardening_parameter instance-attribute

contact_sanisand_constant_hardening_parameter: bool = True

contact_sanisand_maintain_yield_surface instance-attribute

contact_sanisand_maintain_yield_surface: bool = False

contact_save_stiffness instance-attribute

contact_save_stiffness: bool = False

contact_simsand_hardening_use_plastic_displacement instance-attribute

contact_simsand_hardening_use_plastic_displacement: bool = True

contact_simsand_use_plastic_displacement instance-attribute

contact_simsand_use_plastic_displacement: bool = True

contact_substepping instance-attribute

contact_substepping: bool = False

contact_substepping_max_increment instance-attribute

contact_substepping_max_increment: float = -1.0

contact_substepping_separate_normal_shear_displacements instance-attribute

contact_substepping_separate_normal_shear_displacements: bool = True

contact_tensile_stiffness_ratio instance-attribute

contact_tensile_stiffness_ratio: float = 1.0

contact_tolerance instance-attribute

contact_tolerance: float = 1e-10

debug instance-attribute

debug: bool = False

disp_steps instance-attribute

disp_steps: int = -1

elastic_fabric_anisotropy_scale instance-attribute

elastic_fabric_anisotropy_scale: float = 1.0

elastic_stiffness_stress_dependence instance-attribute

elastic_stiffness_stress_dependence: bool = True

elastic_stiffness_stress_dependence_min_mean_stress_ratio instance-attribute

elastic_stiffness_stress_dependence_min_mean_stress_ratio: float = 0.0

elastic_stiffness_stress_dependence_use_anisotropic_mean_stress instance-attribute

elastic_stiffness_stress_dependence_use_anisotropic_mean_stress: bool = False

elastic_stiffness_void_ratio_dependence instance-attribute

elastic_stiffness_void_ratio_dependence: bool = True

elastic_stiffness_void_ratio_dependence_initial instance-attribute

elastic_stiffness_void_ratio_dependence_initial: bool = False

elastoplastic_associated_flow_rule instance-attribute

elastoplastic_associated_flow_rule: bool = False

elastoplastic_cache_state_variables instance-attribute

elastoplastic_cache_state_variables: bool = True

elastoplastic_check_convergence instance-attribute

elastoplastic_check_convergence: bool = True

elastoplastic_check_stiffness_matrix_non_singularity instance-attribute

elastoplastic_check_stiffness_matrix_non_singularity: bool = False

elastoplastic_check_stiffness_matrix_positive_definite instance-attribute

elastoplastic_check_stiffness_matrix_positive_definite: bool = False

elastoplastic_combined_stress_tensor_dilatancy_type instance-attribute

elastoplastic_combined_stress_tensor_dilatancy_type: str = 'anisotropic'

elastoplastic_combined_stress_tensor_evolution_ratio instance-attribute

elastoplastic_combined_stress_tensor_evolution_ratio: float = 1.0

elastoplastic_combined_stress_tensor_fav_ratio instance-attribute

elastoplastic_combined_stress_tensor_fav_ratio: float = 1.0

elastoplastic_combined_stress_tensor_scale instance-attribute

elastoplastic_combined_stress_tensor_scale: float = 1.0

elastoplastic_combined_stress_tensor_type instance-attribute

elastoplastic_combined_stress_tensor_type: str = 'anisotropic'

elastoplastic_critical_state_line_shape instance-attribute

elastoplastic_critical_state_line_shape: str = 'logarithmic'

elastoplastic_critical_state_line_use_anisotropic_mean_stress instance-attribute

elastoplastic_critical_state_line_use_anisotropic_mean_stress: bool = False

elastoplastic_critical_state_line_use_initial_stress_state instance-attribute

elastoplastic_critical_state_line_use_initial_stress_state: bool = False

elastoplastic_critical_stress_ratio_type instance-attribute

elastoplastic_critical_stress_ratio_type: str = 'mohr-coulomb'

elastoplastic_critical_stress_ratio_use_anisotropic_stress instance-attribute

elastoplastic_critical_stress_ratio_use_anisotropic_stress: bool = True

elastoplastic_critical_stress_ratio_use_initial_stress_state instance-attribute

elastoplastic_critical_stress_ratio_use_initial_stress_state: bool = False

elastoplastic_default_potential_function_derivative instance-attribute

elastoplastic_default_potential_function_derivative: bool = False

elastoplastic_default_yield_function_derivative instance-attribute

elastoplastic_default_yield_function_derivative: bool = False

elastoplastic_density_effect_on_strength_dilatancy_type instance-attribute

elastoplastic_density_effect_on_strength_dilatancy_type: str = 'powerlaw'

elastoplastic_dilatancy_exponent instance-attribute

elastoplastic_dilatancy_exponent: float = 1.0

elastoplastic_dilatancy_scale_at_low_mean_stress instance-attribute

elastoplastic_dilatancy_scale_at_low_mean_stress: float = 0.0

elastoplastic_dilatancy_separate_friction_angle instance-attribute

elastoplastic_dilatancy_separate_friction_angle: bool = False

elastoplastic_ensure_stress_on_yield_surface instance-attribute

elastoplastic_ensure_stress_on_yield_surface: bool = False

elastoplastic_fabric_anisotropy_variable_nonproportionality_noncoaxial instance-attribute

elastoplastic_fabric_anisotropy_variable_nonproportionality_noncoaxial: (
    float
) = 0.0

elastoplastic_fabric_anisotropy_variable_nonproportionality_orthogonal instance-attribute

elastoplastic_fabric_anisotropy_variable_nonproportionality_orthogonal: (
    float
) = 0.0

elastoplastic_finite_difference_central instance-attribute

elastoplastic_finite_difference_central: bool = False

elastoplastic_finite_difference_increment instance-attribute

elastoplastic_finite_difference_increment: float = 0.0001

elastoplastic_flow_rule_tolerance instance-attribute

elastoplastic_flow_rule_tolerance: float = 1e-07

elastoplastic_max_iterations instance-attribute

elastoplastic_max_iterations: int = 100

elastoplastic_min_principal_stress instance-attribute

elastoplastic_min_principal_stress: float = -1.0

elastoplastic_potential_function_half_shear_derivatives instance-attribute

elastoplastic_potential_function_half_shear_derivatives: bool = False

elastoplastic_runge_kutta_correction_substep instance-attribute

elastoplastic_runge_kutta_correction_substep: bool = False

elastoplastic_runge_kutta_diverged_steps_raise instance-attribute

elastoplastic_runge_kutta_diverged_steps_raise: bool = True

elastoplastic_runge_kutta_fourth_order_type instance-attribute

elastoplastic_runge_kutta_fourth_order_type: str = 'classic'

elastoplastic_runge_kutta_integrate_stress_on_yield_surface_max_iterations instance-attribute

elastoplastic_runge_kutta_integrate_stress_on_yield_surface_max_iterations: (
    int
) = 100

elastoplastic_runge_kutta_integrate_stress_on_yield_surface_method instance-attribute

elastoplastic_runge_kutta_integrate_stress_on_yield_surface_method: str = (
    "bisection"
)

elastoplastic_runge_kutta_integrate_stress_on_yield_surface_tolerance instance-attribute

elastoplastic_runge_kutta_integrate_stress_on_yield_surface_tolerance: float = (
    1e-10
)

elastoplastic_runge_kutta_max_const_steps instance-attribute

elastoplastic_runge_kutta_max_const_steps: int = -1

elastoplastic_runge_kutta_order instance-attribute

elastoplastic_runge_kutta_order: int = 2

elastoplastic_runge_kutta_second_order_alpha instance-attribute

elastoplastic_runge_kutta_second_order_alpha: float = 2 / 3

elastoplastic_runge_kutta_stiffness_type instance-attribute

elastoplastic_runge_kutta_stiffness_type: str = 'weighted'

elastoplastic_runge_kutta_substepping_adaptive_max_ratio instance-attribute

elastoplastic_runge_kutta_substepping_adaptive_max_ratio: float = 1.5

elastoplastic_runge_kutta_substepping_adaptive_min_ratio instance-attribute

elastoplastic_runge_kutta_substepping_adaptive_min_ratio: float = 0.25

elastoplastic_runge_kutta_substepping_adaptive_ratio instance-attribute

elastoplastic_runge_kutta_substepping_adaptive_ratio: float = 0.9

elastoplastic_runge_kutta_substepping_check_min_step_size instance-attribute

elastoplastic_runge_kutta_substepping_check_min_step_size: bool = True

elastoplastic_runge_kutta_substepping_initial_step_size instance-attribute

elastoplastic_runge_kutta_substepping_initial_step_size: float = 1.0

elastoplastic_runge_kutta_substepping_max_iterations instance-attribute

elastoplastic_runge_kutta_substepping_max_iterations: int = 100000

elastoplastic_runge_kutta_substepping_max_step_size instance-attribute

elastoplastic_runge_kutta_substepping_max_step_size: float = 1.0

elastoplastic_runge_kutta_substepping_min_step_size instance-attribute

elastoplastic_runge_kutta_substepping_min_step_size: float = 1e-05

elastoplastic_runge_kutta_substepping_tolerance instance-attribute

elastoplastic_runge_kutta_substepping_tolerance: float = -1.0

elastoplastic_runge_kutta_third_order_alpha instance-attribute

elastoplastic_runge_kutta_third_order_alpha: float = 0.5

elastoplastic_runge_kutta_third_order_beta instance-attribute

elastoplastic_runge_kutta_third_order_beta: float = 0.75

elastoplastic_substepping_check_min_step_size instance-attribute

elastoplastic_substepping_check_min_step_size: bool = True

elastoplastic_substepping_initial_step_size instance-attribute

elastoplastic_substepping_initial_step_size: float = 1.0

elastoplastic_substepping_max_iterations instance-attribute

elastoplastic_substepping_max_iterations: int = 100000

elastoplastic_substepping_max_plastic_strain instance-attribute

elastoplastic_substepping_max_plastic_strain: float = -1.0

elastoplastic_substepping_max_step_size instance-attribute

elastoplastic_substepping_max_step_size: float = 1.0

elastoplastic_substepping_min_step_size instance-attribute

elastoplastic_substepping_min_step_size: float = 1e-05

elastoplastic_substepping_step_size_decrease_ratio instance-attribute

elastoplastic_substepping_step_size_decrease_ratio: float = 0.5

elastoplastic_substepping_step_size_increase_ratio instance-attribute

elastoplastic_substepping_step_size_increase_ratio: float = 2.0

elastoplastic_tolerance instance-attribute

elastoplastic_tolerance: float = 1e-07

elastoplastic_update_critical_void_ratio_when_required instance-attribute

elastoplastic_update_critical_void_ratio_when_required: bool = False

elastoplastic_use_anisotropic_state_parameter instance-attribute

elastoplastic_use_anisotropic_state_parameter: bool = False

elastoplastic_yield_function_anisotropic_cohesion instance-attribute

elastoplastic_yield_function_anisotropic_cohesion: bool = False

elastoplastic_yield_function_correction_adaptive_ratio instance-attribute

elastoplastic_yield_function_correction_adaptive_ratio: float = -1.0

elastoplastic_yield_function_correction_direction instance-attribute

elastoplastic_yield_function_correction_direction: str = 'plastic_flow'

elastoplastic_yield_function_correction_diverged_steps_raise instance-attribute

elastoplastic_yield_function_correction_diverged_steps_raise: bool = True

elastoplastic_yield_function_correction_max_const_steps instance-attribute

elastoplastic_yield_function_correction_max_const_steps: int = -1

elastoplastic_yield_function_derivative_strain instance-attribute

elastoplastic_yield_function_derivative_strain: bool = True

elastoplastic_yield_function_fabric_anisotropy instance-attribute

elastoplastic_yield_function_fabric_anisotropy: bool = True

elastoplastic_yield_function_min_critical_stress_ratio instance-attribute

elastoplastic_yield_function_min_critical_stress_ratio: float = -1.0

elastoplastic_yield_function_stress_dependent_kp_scale instance-attribute

elastoplastic_yield_function_stress_dependent_kp_scale: float = -1.0

friction_angle_weight_mises instance-attribute

friction_angle_weight_mises: float = 0.0

friction_angle_weight_mohr_coulomb instance-attribute

friction_angle_weight_mohr_coulomb: float = 1.0

friction_angle_weight_smp instance-attribute

friction_angle_weight_smp: float = 0.0

friction_angle_weight_tresca instance-attribute

friction_angle_weight_tresca: float = 0.0

ignore_distractions instance-attribute

ignore_distractions: bool = True

ignore_fabric_anisotropy_for_isotropic_loading instance-attribute

ignore_fabric_anisotropy_for_isotropic_loading: bool = False

ignore_fabric_evolution_for_isotropic_loading instance-attribute

ignore_fabric_evolution_for_isotropic_loading: bool = False

increment_plastic_displacement instance-attribute

increment_plastic_displacement: bool = False

integration_absolute_tolerance instance-attribute

integration_absolute_tolerance: float = 1e-10

integration_at_least_once instance-attribute

integration_at_least_once: bool = False

integration_check_absolute_convergence instance-attribute

integration_check_absolute_convergence: bool = True

integration_check_convergence instance-attribute

integration_check_convergence: bool = True

integration_loading_ratio instance-attribute

integration_loading_ratio: float = 1.0

integration_max_iterations instance-attribute

integration_max_iterations: int = 100

integration_relative_tolerance instance-attribute

integration_relative_tolerance: float = 0.001

integration_substepping_max_ratio instance-attribute

integration_substepping_max_ratio: float = -1.0

integration_substepping_min_ratio instance-attribute

integration_substepping_min_ratio: float = -1.0

integration_substepping_relative_to_increment instance-attribute

integration_substepping_relative_to_increment: bool = False

integration_tolerance_relative_stress instance-attribute

integration_tolerance_relative_stress: bool = False

j2yang_yield_function_epsr_relative_to_kp instance-attribute

j2yang_yield_function_epsr_relative_to_kp: bool = False

j2yang_yield_function_softening_alpha instance-attribute

j2yang_yield_function_softening_alpha: float = 1.0

j2yang_yield_function_softening_beta instance-attribute

j2yang_yield_function_softening_beta: float = 1.0

j2yang_yield_function_softening_relative_to_CSR instance-attribute

j2yang_yield_function_softening_relative_to_CSR: bool = False

j2yang_yield_function_softening_type instance-attribute

j2yang_yield_function_softening_type: str = 'exponential'

kinematic_hypothesis instance-attribute

kinematic_hypothesis: bool = False

loading_direction_scale instance-attribute

loading_direction_scale: float = 1.0

loading_direction_type instance-attribute

loading_direction_type: str = 'depsd'

mixed_load_absolute_tolerance instance-attribute

mixed_load_absolute_tolerance: float = 1e-05

mixed_load_check_absolute_convergence instance-attribute

mixed_load_check_absolute_convergence: bool = True

mixed_load_check_convergence instance-attribute

mixed_load_check_convergence: bool = True

mixed_load_check_strain_convergence instance-attribute

mixed_load_check_strain_convergence: bool = False

mixed_load_check_stress_convergence instance-attribute

mixed_load_check_stress_convergence: bool = True

mixed_load_constant_elastic_stiffness instance-attribute

mixed_load_constant_elastic_stiffness: bool = True

mixed_load_max_iterations instance-attribute

mixed_load_max_iterations: int = 100

mixed_load_max_larger_steps instance-attribute

mixed_load_max_larger_steps: int = -1

mixed_load_relative_tolerance instance-attribute

mixed_load_relative_tolerance: float = 0.001

mixed_load_stress_as_anisotropic_stress instance-attribute

mixed_load_stress_as_anisotropic_stress: bool = False

mixed_load_update_void_ratio_in instance-attribute

mixed_load_update_void_ratio_in: str = 'after_convergence'

multi_scale_return_mapping instance-attribute

multi_scale_return_mapping: bool = False

run_contact_integration_steps instance-attribute

run_contact_integration_steps: int = -1

run_mixed_load_steps instance-attribute

run_mixed_load_steps: int = -1

run_steps instance-attribute

run_steps: int = -1

save_elastic_stiffness_matrix instance-attribute

save_elastic_stiffness_matrix: bool = False

simsand_yield_function_additional_shear_strain instance-attribute

simsand_yield_function_additional_shear_strain: float = 0.0

simsand_yield_function_shear_strain_scale instance-attribute

simsand_yield_function_shear_strain_scale: float = 1.0

simsand_yield_function_use_plastic_strain instance-attribute

simsand_yield_function_use_plastic_strain: bool = True

update_fabric_coefs instance-attribute

update_fabric_coefs: bool = False

update_npv instance-attribute

update_npv: bool = False

update_void_ratio_from_after_isotropic_loading_to_before instance-attribute

update_void_ratio_from_after_isotropic_loading_to_before: bool = False

use_isotropic_fabric_tensor_in_strain_averaging instance-attribute

use_isotropic_fabric_tensor_in_strain_averaging: bool = False

use_isotropic_fabric_tensor_in_stress_localization instance-attribute

use_isotropic_fabric_tensor_in_stress_localization: bool = False

use_plastic_strain_in_fabric_evolution instance-attribute

use_plastic_strain_in_fabric_evolution: bool = False

verbose instance-attribute

verbose: bool = False

__init__

__init__()

checkSubsteppingOptions

checkSubsteppingOptions()

Check the substepping options for plastic correction.

isFrictionAngleLodeDependent

isFrictionAngleLodeDependent() -> bool

Whether the friction angle is lode angle dependent.

setMises

setMises()

Use Mises criterion.

setMisesSMP

setMisesSMP(weight_mises: float = 0.5, weight_smp: float = 0.5)

Use Mises-SMP criterion.

setMohrCoulomb

setMohrCoulomb()

Use Mohr-Coulomb criterion.

setSMP

setSMP()

Use SMP criterion.

setTresca

setTresca()

Use Tresca criterion.

setTrescaMohrCoulomb

setTrescaMohrCoulomb(
    weight_tresca: float = 0.5, weight_mohr_coulomb: float = 0.5
)

Use Tresca-Mohr-Coulomb criterion.

setupModifiedModel

setupModifiedModel()

Set the model to the modified model.

setupOriginalModel

setupOriginalModel()

Set the model to the original model.

SANISANDContactLaw

Bases: ElastoplasticContactLaw, ChangStiffness, ExponentialBreakageCSL

SANISAND contact law.

dfdforce

dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

dgdforce

dgdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

initialize

initialize(sv: StateVariable)

maintainYieldSurface

maintainYieldSurface(
    idx: int,
    ddisp: ndarray,
    dforce: ndarray,
    sv0: StateVariable,
    sv: StateVariable,
)

plasticModulus

plasticModulus(
    idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> float

setup

setup()

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

Mp_ instance-attribute

Mp_: float

epsd_ instance-attribute

epsd_: float

kp_ instance-attribute

kp_: float

beginConstantStressStateScope

beginConstantStressStateScope(sv0: StateVariable, sv: StateVariable)

dfdeps

dfdeps(sv0: StateVariable, sv: StateVariable) -> ndarray

dfdsig

dfdsig(sv0: StateVariable, sv: StateVariable) -> ndarray

epsd

epsd(
    sv0: StateVariable,
    sv: StateVariable,
    use_plastic_strain: bool | None = None,
) -> float

kp

kp(sv0: StateVariable, sv: StateVariable) -> float

plasticModulus

plasticModulus(dgdsig: ndarray, sv0: StateVariable, sv: StateVariable) -> float

setup

setup()

yieldFunction

yieldFunction(sv0: StateVariable, sv: StateVariable) -> float

SIMSANDContactLaw

Bases: ElastoplasticContactLaw, ChangStiffness, ExponentialBreakageCSL

SIMSAND contact law.

dfdforce

dfdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

dgdforce

dgdforce(idx: int, sv0: StateVariable, sv: StateVariable) -> ndarray

initialize

initialize(sv: StateVariable)

plasticModulus0

plasticModulus0(
    idx: int, dgdforce: ndarray, sv0: StateVariable, sv: StateVariable
) -> ndarray

setup

setup()

yieldFunction

yieldFunction(
    idx: int, fn: float, fr: float, sv0: StateVariable, sv: StateVariable
) -> float

Scalar

Bases: IndexedValue

value instance-attribute

value: float

StateVariable

F instance-attribute

fabric tensor F

cached_num instance-attribute

cached_num: int = 0

cached number of integration points

contact_min_normal_force instance-attribute

contact_min_normal_force: float

minimum normal force

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

disp instance-attribute

disp: MatrixXf

displacement

dispp instance-attribute

dispp: MatrixXf

plastic displacement

e instance-attribute

e: float = 0.0

void ratio

e0 instance-attribute

e0: float = 0.0

initial void ratio

ec instance-attribute

ec: float = 0.0

critical void ratio

eps instance-attribute

eps: VectorXf

strain

epsp instance-attribute

epsp: VectorXf

plastic strain

force instance-attribute

force: MatrixXf

force

matrices instance-attribute

matrices: Dict[str, MatrixXf]

custom matrix fields

phase instance-attribute

phase: int = 0

load phase index

scalars instance-attribute

scalars: Dict[str, float]

custom scalar fields

sig instance-attribute

sig: VectorXf

stress

size instance-attribute

size: int = size

Size of the integration points

vectors instance-attribute

vectors: Dict[str, VectorXf]

custom vector fields

w instance-attribute

:math:w, Plastic work

A11

A11() -> float

Fabric tensor component A11

A12

A12() -> float

Fabric tensor component A12

A13

A13() -> float

Fabric tensor component A13

A22

A22() -> float

Fabric tensor component A22

A23

A23() -> float

Fabric tensor component A23

A33

A33() -> float

Fabric tensor component A33

Aij

Aij() -> ndarray

Fabric tensor, shape (3, 3)

F11

F11() -> float

Fabric tensor component F11

F12

F12() -> float

Fabric tensor component F12

F13

F13() -> float

Fabric tensor component F13

F22

F22() -> float

Fabric tensor component F22

F23

F23() -> float

Fabric tensor component F23

F33

F33() -> float

Fabric tensor component F33

FAV

FAV(n: ndarray | None = None) -> float

Fabric anisotropy variable

FN11

FN11() -> float

Fabric tensor of contact normal force component FN11

FN12

FN12() -> float

Fabric tensor of contact normal force component FN12

FN13

FN13() -> float

Fabric tensor of contact normal force component FN13

FN22

FN22() -> float

Fabric tensor of contact normal force component FN22

FN23

FN23() -> float

Fabric tensor of contact normal force component FN23

FN33

FN33() -> float

Fabric tensor of contact normal force component FN33

FNij

FNij() -> ndarray

Fabric tensor of contact normal force, shape (3, 3)

FT11

FT11() -> float

Fabric tensor of contact shear force component FR11

FT12

FT12() -> float

Fabric tensor of contact shear force component FR12

FT13

FT13() -> float

Fabric tensor of contact shear force component FR13

FT22

FT22() -> float

Fabric tensor of contact shear force component FR22

FT23

FT23() -> float

Fabric tensor of contact shear force component FR23

FT33

FT33() -> float

Fabric tensor of contact shear force component FR33

FTij

FTij() -> ndarray

Fabric tensor of contact shear force, shape (3, 3)

Fij

Fij() -> ndarray

Fabric tensor, shape (3, 3)

Fnorm

Fnorm() -> float

Norm of the fabric tensor

I1

I1() -> float

First invariant of stress

I2

I2() -> float

Second invariant of stress

I3

I3() -> float

Third invariant of stress

Ia1

Ia1() -> float

First invariant of anisotropic stress

Ia2

Ia2() -> float

Second invariant of anisotropic stress

Ia3

Ia3() -> float

Third invariant of anisotropic stress

J2

J2() -> float

Second invariant of deviatoric stress

J3

J3() -> float

Third invariant of deviatoric stress

Ja2

Ja2() -> float

Second invariant of anisotropicdeviatoric stress

Ja3

Ja3() -> float

Third invariant of anisotropic deviatoric stress

R

R() -> float

Major stress ratio sig1/sig3

Ra

Ra() -> float

Major stress ratio siga1/siga3

__init__

__init__(size: int = 37, initialize_arrays: bool = True)

Constructor of the state variable

PARAMETER DESCRIPTION
size

Size of the integration points

TYPE: int DEFAULT: 37

initialize_arrays

Whether to initialize numpy arrays, by default True, if False, the numpy arrays are empty

TYPE: bool DEFAULT: True

addStrain

addStrain(deps: ndarray, update_void_ratio: bool = True)

Add strain increment and update void ratio

PARAMETER DESCRIPTION
deps

Strain increment, shape (6,)

TYPE: ndarray

update_void_ratio

Whether to update void ratio, by default True

TYPE: bool DEFAULT: True

an

an() -> float

Degree of fabric anisotropy for the contact normal force

ar

ar() -> float

Degree of fabric anisotropy

at

at() -> float

Degree of fabric anisotropy for the contact shear force

b

b() -> float

Lode parameter

ba

ba() -> float

Lode parameter with anisotropy

copy

copy() -> 'StateVariable'

A copy of the state variable

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: int

to_idx

Index of the integration point to copy to

TYPE: int

symmetric

Whether to revert the symmetric contact state variables, by default False

TYPE: bool DEFAULT: False

cscalars

Custom scalar fields to be multiplied by -1, by default None

TYPE: List[str] DEFAULT: None

cvectors

Custom vector fields to be multiplied by -1, by default None

TYPE: List[str] DEFAULT: None

copyFrom

copyFrom(sv: StateVariable)

Copy state variables from another

PARAMETER DESCRIPTION
sv

State variable to copy from

TYPE: StateVariable

copyTo

copyTo(sv: StateVariable)

Copy state variables to another

eeq

eeq() -> float

Equivalent strain

elastic

elastic() -> bool

Whether the current state is elastic

elasticStiffnessMatrix

elasticStiffnessMatrix() -> ndarray

Elastic stiffness matrix, shape (3, 3)

RETURNS DESCRIPTION
ndarray

Elastic stiffness matrix

epsa

epsa() -> float

Axial strain

epsd

epsd() -> float

General shear strain

epsij

epsij() -> ndarray

Deviatoric strain tensor

epsij_normalized

epsij_normalized() -> ndarray

Normalized deviatoric strain tensor

epskk

epskk() -> ndarray

Mean strain tensor

epsm

epsm() -> ndarray

Strain in a matrix form

epspa

epspa() -> float

Axial plastic strain

epspd

epspd() -> float

General plastic shear strain

epspij

epspij() -> ndarray

Deviatoric plastic strain tensor

epspij_normalized

epspij_normalized() -> ndarray

Normalized deviatoric plastic strain tensor

epspkk

epspkk() -> ndarray

Mean plastic strain tensor

epspm

epspm() -> ndarray

Plastic strain in a matrix form

epspv

epspv() -> float

Volumetric plastic strain

epsv

epsv() -> float

Volumetric strain

eta

eta() -> float

Stress ratio

etaa

etaa() -> float

Anisotropic Stress ratio

feta

feta() -> ndarray

Shear force ratio for every integration point, shape (size,)

fetai

fetai(idx: int) -> float

Shear force ratio at the integration point with index idx

fn

fn() -> ndarray

Normal force for every integration point, shape (size,)

fnci

fnci(idx: int, cohesion: float = 0.0) -> float

Normal force with minimum cohesion at the integration point with index idx

fni

fni(idx: int) -> float

Normal force at the integration point with index idx

fr

fr() -> ndarray

Shear force for every integration point, shape (size,)

fri

fri(idx: int) -> float

Shear force at the integration point with index idx

fs

fs() -> ndarray

Shear force at the first direction for every integration point, shape (size,)

fsi

fsi(idx: int) -> float

Shear force at the first direction at the integration point with index idx

fst

fst() -> ndarray

Shear force for every integration point, shape (size, 2)

fsti

fsti(idx: int) -> ndarray

Shear force at the integration point with index idx, shape (2,)

ft

ft() -> ndarray

Shear force at the second direction for every integration point, shape (size,)

fti

fti(idx: int) -> float

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: ndarray

dui

Contact displacement increment

TYPE: ndarray

idx

Index of the integration point

TYPE: int

precision

Precision of the hash value, by default 15

TYPE: int DEFAULT: 15

symmetric

Whether to revert the symmetric contact state variables, by default False

TYPE: bool DEFAULT: False

cscalars

Custom scalar fields to be multiplied by -1, by default None

TYPE: List[str] DEFAULT: None

cvectors

Custom vector fields to be multiplied by -1, by default None

TYPE: List[str] DEFAULT: None

RETURNS DESCRIPTION
int

Hash value

lode

lode() -> float

Lode angle (-pi/6, pi/6)

lodea

lodea() -> float

Lode angle (-pi/6, pi/6) with anisotropy

n

n() -> ndarray

Loading direction

negp

negp() -> float

Negative mean stress, usually used in Geotechnical Engineering

negpa

negpa() -> float

Negative anisotropic mean stress, usually used in Geotechnical Engineering

nsi

nsi(idx: int) -> float

Direction of the shear force in the first direction with index idx

nsti

nsti(idx: int) -> ndarray

Direction of the shear force in two dimensions with index idx, shape (2,)

nti

nti(idx: int) -> float

Direction of the shear force in the second direction with index idx

p

p() -> float

Mean stress

pa

pa() -> float

Anisotropic Mean stress

peeq

peeq() -> float

Equivalent plastic strain

plastic

plastic() -> bool

Whether the current state is plastic

q

q() -> float

Deviatoric stress

qa

qa() -> float

Anisotropic deviatoric stress

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: int

cscalars

Custom scalar fields to be multiplied by -1, by default None

TYPE: List[str] DEFAULT: None

cvectors

Custom vector fields to be multiplied by -1, by default None

TYPE: List[str] DEFAULT: None

setStrain

setStrain(eps: ndarray, update_void_ratio: bool = True)

Set strain and update void ratio

PARAMETER DESCRIPTION
eps

Strain, shape (6,)

TYPE: ndarray

update_void_ratio

Whether to update void ratio, by default True

TYPE: bool DEFAULT: True

sig11

sig11() -> float

First principal stress

sig123

sig123()

Principal stresses

sig22

sig22() -> float

Second principal stress

sig33

sig33() -> float

Third principal stress

siga11

siga11() -> float

First principal stress with anisotropy

siga123

siga123()

Principal stresses with anisotropy

siga22

siga22() -> float

Second principal stress with anisotropy

siga33

siga33() -> float

Third principal stress with anisotropy

sigakk

sigakk() -> ndarray

Anisotropic mean stress tensor

sigam

sigam() -> ndarray

Anisotropic stress tensor (symmetric part of sigm @ Aij), shape (3, 3)

sigkk

sigkk() -> ndarray

Mean stress tensor

sigm

sigm() -> ndarray

Stress in a matrix form

strain

strain() -> Tensor2

Strain tensor

strainp

strainp() -> Tensor2

Plastic strain tensor

stress

stress() -> Tensor2

Stress tensor

stressa

stressa() -> Tensor2

Anisotropic stress tensor

tauaij

tauaij() -> ndarray

Anisotropic deviatoric stress tensor

tauaij_normalized

tauaij_normalized() -> ndarray

Normalized anisotropic deviatoric stress tensor

tauij

tauij() -> ndarray

Deviatoric stress tensor

tauij_normalized

tauij_normalized() -> ndarray

Normalized deviatoric stress tensor

theta

theta() -> float

Lode angle (0, pi/3)

thetaa

thetaa() -> float

Lode angle (0, pi/3) with anisotropy

un

un() -> ndarray

Normal displacement for every integration point, shape (size,)

uni

uni(idx: int) -> float

Normal displacement at the integration point with index idx

upn

upn() -> ndarray

Normal plastic displacement for every integration point, shape (size,)

upni

upni(idx: int) -> float

Normal plastic displacement at the integration point with index idx

upr

upr() -> ndarray

Shear plastic displacement for every integration point, shape (size,)

upri

upri(idx: int) -> float

Shear plastic displacement at the integration point with index idx

ups

ups() -> ndarray

Shear plastic displacement at the first direction for every integration point, shape (size,)

upsi

upsi(idx: int) -> float

Shear plastic displacement at the first direction at the integration point with index idx

upst

upst() -> ndarray

Shear plastic displacement for every integration point, shape (size, 2)

upsti

upsti(idx: int) -> ndarray

Shear plastic displacement at the integration point with index idx, shape (2,)

upt

upt() -> ndarray

Shear plastic displacement at the second direction for every integration point, shape (size,)

upti

upti(idx: int) -> float

Shear plastic displacement at the second direction at the integration point with index idx

ur

ur() -> ndarray

Shear displacement for every integration point, shape (size,)

uri

uri(idx: int) -> float

Shear displacement at the integration point with index idx

us

us() -> ndarray

Shear displacement at the first direction for every integration point, shape (size,)

usi

usi(idx: int) -> float

Shear displacement at the first direction at the integration point with index idx

ust

ust() -> ndarray

Shear displacement for every integration point, shape (size, 2)

usti

usti(idx: int) -> ndarray

Shear displacement at the integration point with index idx, shape (2,)

ut

ut() -> ndarray

Shear displacement at the second direction for every integration point, shape (size,)

uti

uti(idx: int) -> float

Shear displacement at the second direction at the integration point with index idx

StaticHomogenization

Bases: Homogenization

Static homogenization for elastic materials

setup

setup()

Vector

Bases: IndexedValue

value instance-attribute

value: VectorXf

mat2vec

mat2vec(matrix: ndarray) -> ndarray

Convert a matrix (3, 3) to a vector (6,)

vec2mat

vec2mat(vector: ndarray) -> ndarray

Convert a vector (6,) to a matrix (3, 3)