Skip to content

constitutivemodelbase

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.