Skip to content

Index

__all__ module-attribute

__all__ = [
    "ChangHicherAbstractModel",
    "ElastoplasticContactLaw",
    "micromechanical_registry",
    "NonlinearElasticContactLaw",
]

micromechanical_registry module-attribute

micromechanical_registry: Registry[str, Type[MicromechanicalBase]] = Registry()

ChangHicherAbstractModel

Bases: MixedLoadControl, 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}\]

adaptiveIntegrationSubstepping

adaptiveIntegrationSubstepping(
    dforce: ndarray, ddisp: ndarray, sv0: StateVariable, sv: StateVariable
) -> float

Adaptive substepping for macro-micro integration.

PARAMETER DESCRIPTION
dforce

The force increment.

TYPE: ndarray

ddisp

The displacement increment.

TYPE: ndarray

sv0

The initial state variable.

TYPE: StateVariable

sv

The current state variable.

TYPE: StateVariable

RETURNS DESCRIPTION
float

A ratio to reduce the force/displacement increment.

contactIntegrate

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

macroMicroIntegrate

macroMicroIntegrate(
    K: ndarray,
    dsig: ndarray,
    deps: ndarray,
    sv0: StateVariable,
    sv: StateVariable,
) -> None

setup

setup()

stiffness

stiffness(
    sv0: StateVariable,
    sv: StateVariable,
    kn: ndarray = None,
    ks: ndarray = None,
    original: bool = False,
) -> ndarray

ElastoplasticContactLaw

Bases: ContactLawBase

Base class for elastoplastic contact laws.

plasticMethod instance-attribute

plasticMethod: str

The plastic method

CPPM

CPPM(
    idx: int, 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

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, 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

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()

dfdforce

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

Calculate derivative of yield function f 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
dfdsig

Derivative of yield function f with respect to the force

TYPE: ndarray

dgdforce

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

Calculate derivative of potential function g 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
dgdsig

Derivative of potential function g with respect to the stress

TYPE: ndarray

hardening

hardening(
    idx: int, dgdsig: ndarray, sv0: StateVariable, sv: StateVariable
) -> float

Hardening items in the equation of plastic multiplier, 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 strain dkappa_ddispp (:math:\frac{\partial\kappa}{\partial\boldsymbol{\delta}^p}) attribute in this class since it will be used in the :meth:.updateHardeningVariables method to update hardening variables.

PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

dgdsig

Derivative of potential function g with respect to the force

TYPE: ndarray

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

RETURNS DESCRIPTION
hardening

Hardening items in the equation of plastic multiplier

TYPE: float

integrate

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

isCPA

isCPA() -> bool

Whether tha plastic method is CPA.

isCPPM

isCPPM() -> bool

Whether tha plastic method is CPPM.

isConverged

isConverged(
    idx: int, f: float, trial: bool, sv0: StateVariable, sv: StateVariable
) -> bool

Determine whether the contact force state is converged to the yield surface or the force state is in the elastic region.

PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

f

Yield function value

TYPE: float

trial

Whether it is for elastic trial

TYPE: bool

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

RETURNS DESCRIPTION
bool

Whether the contact force state is converged to the yield surface or the force state is in the elastic region

isExplicit

isExplicit() -> bool

Whether tha plastic method is explicit.

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,
    Ke: ndarray,
    dfdforce: ndarray,
    dgdforce: ndarray,
    hardening: float,
    sv0: StateVariable,
    sv: StateVariable,
) -> float

Calculate the plastic modulus

PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

Ke

Elastic stiffness matrix

TYPE: ndarray

dfdforce

Derivative of the yield function with respect to the force

TYPE: ndarray

dgdforce

Derivative of the hardening variable with respect to the force

TYPE: ndarray

hardening

Hardening item

TYPE: float

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

RETURNS DESCRIPTION
float

Plastic modulus

plasticMultiplier

plasticMultiplier(
    idx: int,
    f: float,
    Ke: ndarray,
    ddisp: ndarray,
    dfdforce: ndarray,
    Kp: float,
    sv0: StateVariable,
    sv: StateVariable,
) -> float

Calculate the plastic multiplier

PARAMETER DESCRIPTION
idx

Index of the integration point

TYPE: int

f

Yield function value

TYPE: float

Ke

Elastic stiffness matrix

TYPE: ndarray

ddisp

Displacement increment

TYPE: ndarray

dfdforce

Derivative of the yield function with respect to the force

TYPE: ndarray

Kp

Plastic modulus

TYPE: float

sv0

Initial state variables

TYPE: StateVariable

sv

Current state variables

TYPE: StateVariable

RETURNS DESCRIPTION
float

Plastic multiplier

revertHardeningVariables

revertHardeningVariables(
    idx: int,
    dlambda: float,
    ddispp: ndarray,
    sv0: StateVariable,
    sv: StateVariable,
)

Revert hardening variables.

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

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

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

yieldSurface

yieldSurface(
    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

yieldSurfaceCorrection

yieldSurfaceCorrection(idx: int, 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

sv0

Initial state variables

TYPE: StateVariable

sv

State variables

TYPE: StateVariable

yieldSurfaces

yieldSurfaces(
    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

NonlinearElasticContactLaw

Bases: ContactLawBase

Nonlinear elastic contact law

abstractSetup

abstractSetup()

integrate

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

postIncrement

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