Skip to content

backends

backends module-attribute

backends: Backends = Backends(python=PythonBackend(), cpp=CppBackend())

Backend

Bases: ABC

The backend class to manage micromechanical models and the corresponding contact laws.

elastoplasticModels property

elastoplasticModels: Registry

Return the elastoplastic model registry.

micromechanicalContacts property

micromechanicalContacts: Registry

Return the contact law registry.

micromechanicalModels property

micromechanicalModels: Registry

Return the model registry.

ContactLaw

ContactLaw(contact_type: str, **props: float) -> 'ContactLawBase'

Create a contact law object.

PARAMETER DESCRIPTION
contact_type

The contact law type.

TYPE: str

props

The material properties of the contact law.

TYPE: float DEFAULT: {}

DebugVariable

DebugVariable()

Create a debug variable object.

ElastoplasticMaterial

ElastoplasticMaterial(**kwargs)

Create an elastoplastic material object.

ElastoplasticModel

ElastoplasticModel(model_type: str, **props: float)

Create an elastoplastic model object.

PARAMETER DESCRIPTION
model_type

The model type.

TYPE: str

props

The material properties of the model.

TYPE: float DEFAULT: {}

FabricTensor

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

Create a fabric tensor object.

Integration

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

Create an integration object.

Load

Load()

Create a load object.

LoadPhase

LoadPhase(
    initial: Iterable[float] = zeros(6),
    final: Iterable[float] = zeros(6),
    control: Iterable[float] = zeros(6),
    total: Iterable[float] = 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,
)

Create a load phase object.

Material

Material(**kwargs)

Create a material object.

MicromechanicalModel

MicromechanicalModel(
    model_type: str,
    contact_type: str | None = None,
    *,
    npv: float = 1000000000.0,
    radius: float = 0.00065,
    **props: float
) -> "MicromechanicalBase"

Create a micromechanical model object.

PARAMETER DESCRIPTION
model_type

The model type.

TYPE: str

contact_type

The contact law type.

TYPE: str 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

props

The material properties of the model.

TYPE: float DEFAULT: {}

Options

Options()

Create an options object.

StateVariable

StateVariable(size: int = 37)

Create a state variable object.

Backends

Bases: Dict[str, Backend]

Backends registry.

cpp property

Return the cpp backend.

current property

current: Backend

Return the current backend.

python property

python: PythonBackend

Return the python backend.

CppBackend

Bases: Backend

Cpp backend.

ContactLaw

ContactLaw(contact_type: str, **props: float) -> 'ContactLawBase'

MicromechanicalModel

MicromechanicalModel(
    model_type: str | PathLike,
    contact_type: str | PathLike | None = None,
    *,
    npv: float = 1000000000.0,
    radius: float = 0.00065,
    **props: float
) -> "MicromechanicalBase"

PythonBackend

Bases: Backend

Python backend.

ElastoplasticMaterial

ElastoplasticMaterial(**kwargs)

FabricTensor

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

Material

Material(**kwargs)

StateVariable

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