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.

contacts abstractmethod property

contacts: Registry

Return the contact law registry.

models abstractmethod property

models: Registry

Return the model registry.

ContactLaw abstractmethod

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 abstractmethod

DebugVariable() -> 'DebugVariable'

Create a debug variable object.

FabricTensor abstractmethod

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

Create a fabric tensor object.

Integration abstractmethod

Integration(npv: float = 1000000000.0, radius=0.00065) -> 'Integration'

Create an integration object.

Load abstractmethod

Load() -> 'Load'

Create a load object.

LoadPhase abstractmethod

LoadPhase(
    initial: Iterable[float] = zeros(6),
    final: Iterable[float] = zeros(6),
    control: Iterable[float] = zeros(6),
    total: Iterable[float] = zeros(6),
    steps: int = 100,
) -> "LoadPhase"

Create a load phase object.

Material abstractmethod

Material(**kwargs) -> 'Material'

Create a material object.

MicromechanicalModel abstractmethod

MicromechanicalModel(
    model_type: str,
    contact_type: str,
    *,
    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

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 abstractmethod

Options() -> 'Options'

Create an options object.

StateVariable abstractmethod

StateVariable(*args, **kwargs) -> 'StateVariable'

Create a state variable object.

contactName

contactName(contact: 'ContactLawBase') -> str

Return the contact law name.

fabricEvolutionTypes classmethod

fabricEvolutionTypes() -> List[str]

Return the available fabric evolution types.

fabricTypes classmethod

fabricTypes() -> List[str]

Return the available fabric tensor types.

modelName

modelName(model: 'MicromechanicalBase') -> str

Return the model name.

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.

contacts property

contacts: Registry[str, 'ContactLawBase']

models property

models: Registry[str, 'MicromechanicalBase']

ContactLaw

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

DebugVariable

DebugVariable() -> 'DebugVariable'

FabricTensor

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

Integration

Integration(npv: float = 1000000000.0, radius=0.00065) -> 'Integration'

Load

Load() -> 'Load'

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,
) -> "LoadPhase"

Material

Material(**kwargs) -> 'Material'

MicromechanicalModel

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

Options

Options() -> 'Options'

StateVariable

StateVariable(*args, **kwargs) -> 'StateVariable'

PythonBackend

Bases: Backend

Python backend.

contacts property

contacts: Registry

models property

models: Registry

ContactLaw

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

DebugVariable

DebugVariable() -> 'DebugVariable'

FabricTensor

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

Integration

Integration(npv: float = 1000000000.0, radius=0.00065) -> 'Integration'

Load

Load() -> 'Load'

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,
) -> "LoadPhase"

Material

Material(**kwargs) -> 'Material'

MicromechanicalModel

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

Options

Options() -> 'Options'

StateVariable

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