Skip to content

elastoplasticmodelbase

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

butcherTableau

butcherTableau(
    n: int, alpha: float, beta: float, fourth_order_type: str = "classic"
) -> tuple[ndarray, ndarray, ndarray]

Construct Butcher tableau for the Runge-Kutta method, a[i, j] = 0 for j >= i, c[0] = 0

PARAMETER DESCRIPTION
n

Order of the Runge-Kutta method, only 1, 2, 3, and 4 are supported.

TYPE: int

alpha

Parameter for 2nd- and 3rd-order Runge-Kutta methods

TYPE: float

beta

Parameter for 2nd- and 3rd-order Runge-Kutta methods

TYPE: float

fourth_order_type

Type of fourth-order Runge-Kutta method, only 'classic', '3/8-rule', and 'ralston' are supported.

TYPE: str DEFAULT: 'classic'

RETURNS DESCRIPTION
Butcher tableau (a, b, c)