Skip to content

Index

__all__ module-attribute

__all__ = [
    "ElasticityBase",
    "KinematicHypothesis",
    "MultiScale",
    "StaticHypothesis",
    "WaveVelocity",
]

ElasticityBase

Bases: HashableBaseModelIO, CalibrationABC

Base class for elastic material models.

C property

Stiffness matrix.

C11 class-attribute

C11: float

C12 class-attribute

C12: float

C13 class-attribute

C13: float

C14 class-attribute

C14: float

C15 class-attribute

C15: float

C16 class-attribute

C16: float

C21 class-attribute

C21: float

C22 class-attribute

C22: float

C23 class-attribute

C23: float

C24 class-attribute

C24: float

C25 class-attribute

C25: float

C26 class-attribute

C26: float

C31 class-attribute

C31: float

C32 class-attribute

C32: float

C33 class-attribute

C33: float

C34 class-attribute

C34: float

C35 class-attribute

C35: float

C36 class-attribute

C36: float

C41 class-attribute

C41: float

C42 class-attribute

C42: float

C43 class-attribute

C43: float

C44 class-attribute

C44: float

C45 class-attribute

C45: float

C46 class-attribute

C46: float

C51 class-attribute

C51: float

C52 class-attribute

C52: float

C53 class-attribute

C53: float

C54 class-attribute

C54: float

C55 class-attribute

C55: float

C56 class-attribute

C56: float

C61 class-attribute

C61: float

C62 class-attribute

C62: float

C63 class-attribute

C63: float

C64 class-attribute

C64: float

C65 class-attribute

C65: float

C66 class-attribute

C66: float

E abstractmethod property

E: float

Young's modulus.

E11 class-attribute

E11: float

E22 class-attribute

E22: float

E33 class-attribute

E33: float

Fitness property

Fitness: Type[FitnessBase]

G property

G: float

Shear modulus.

G12 class-attribute

G12: float

G13 class-attribute

G13: float

G21 class-attribute

G21: float

G23 class-attribute

G23: float

G31 class-attribute

G31: float

G32 class-attribute

G32: float

S property

Compliance matrix.

compliance abstractmethod property

compliance: ndarray

Compliance matrix.

io property

io: Self

lam property

lam: float

Lamé's first parameter.

mu property

mu: float

Lamé's second parameter.

nu abstractmethod property

nu: float

Poisson's ratio.

nu12 class-attribute

nu12: float

nu13 class-attribute

nu13: float

nu21 class-attribute

nu21: float

nu23 class-attribute

nu23: float

nu31 class-attribute

nu31: float

nu32 class-attribute

nu32: float

parameters property

parameters: List[str]

stiffness abstractmethod property

stiffness: ndarray

Stiffness matrix.

voigt_notation class-attribute instance-attribute

voigt_notation: bool = False

Whether to use Voigt's notation for the stiffness and compliance matrices.

__getattr__

__getattr__(key: str)

Get the attribute matching the key.

__getitem__

__getitem__(item: str)

Get value of an attribute, support expressions.

get

get(var: str, **kwargs: Iterable | float) -> ndarray | float

Get an array of values with the given parameters, or a float if no parameters are provided or the parameters are scalars.

PARAMETER DESCRIPTION
var

Variable name.

TYPE: str

kwargs

Keyword arguments for the parameters, key is the parameter name and value is the parameter values. Length of the values must be the same.

TYPE: Iterable | float DEFAULT: {}

setParameters

setParameters(
    params: Dict[str, Any] | None = None,
    *,
    force: bool = False,
    experiment: Experiment | None = None,
    experiments: (
        Experiment | Iterable[Experiment] | Dict[str, Experiment] | None
    ) = None,
    **kwargs
)

Set parameters.

PARAMETER DESCRIPTION
params

Dictionary of parameters to set.

TYPE: dict DEFAULT: None

force

Set parameters even if they are not in the model.

TYPE: bool DEFAULT: False

experiment

Current experiment, used for custom calibration key.

TYPE: Experiment DEFAULT: None

experiments

Experiments, used for custom calibration key.

TYPE: Experiment DEFAULT: None

strain

strain(stress: ndarray) -> ndarray

Calculate the strain given the stress.

stress

stress(strain: ndarray) -> ndarray

Calculate the stress given the strain.

KinematicHypothesis

Bases: MultiScale

E property

E: float

caches class-attribute

caches: Dict[str, LRUCache] = {
    "stiffness": LRUCache(maxsize=1024),
    "compliance": LRUCache(maxsize=1024),
}

compliance property

compliance: ndarray

model class-attribute

model: Model = Model('CH-OSIMSAND')

nu property

nu: float

stiffness property

stiffness: ndarray

sv class-attribute

sv: StateVariable = StateVariable()

modifiedShearStiffness

modifiedShearStiffness(
    kn: float | ndarray,
    kr: float | ndarray,
    fn: float | ndarray,
    F: ndarray | None = None,
) -> float | ndarray

setPoissonRatio

setPoissonRatio(nu: float)

MultiScale

Bases: ElasticityBase, Anisotropy, ContactNumber, HertzMindlin

Multi-scale material model.

anisotropic property

anisotropic: bool

bounds class-attribute

bounds: Dict[str, List[float]] = {
    "npv": [1, 1e20],
    "radius": [1e-06, 0.001],
    "kn": [1, 10000.0],
    "krr": [0, 10],
    "Gg": [1, 1e20],
    "nug": [0, 1],
    "n": [0, 1],
    "nr": [0, 1],
    "F1": [-10, 10],
    "F2": [-10, 10],
    "F12": [-10, 10],
    "F13": [-10, 10],
    "F23": [-10, 10],
    "cn": [-10, 10],
    "cr": [-10, 10],
    "cc": [-10, 10],
    "ncc": [0, 10],
}

force_numerical class-attribute instance-attribute

force_numerical: bool = False

Calculate the stiffness numerically by force.

isotropic property

isotropic: bool

keys class-attribute

keys: List[str] = [
    "npv",
    "radius",
    "kn",
    "krr",
    "F1",
    "F2",
    "F12",
    "F13",
    "F23",
]

rho property

rho: float

Normalized packing density

sig1 class-attribute instance-attribute

sig1: float | None = None

Stress in the first direction.

sig2 class-attribute instance-attribute

sig2: float | None = None

Stress in the second direction.

sig3 class-attribute instance-attribute

sig3: float | None = None

Stress in the third direction.

stds class-attribute

stds: Dict[str, float] = {
    "npv": 1000000000.0,
    "radius": 0.0001,
    "kn": 10.0,
    "krr": 0.1,
    "Gg": 100000000.0,
    "nug": 0.01,
    "n": 0.1,
    "nr": 0.1,
    "F1": 0.1,
    "F2": 0.1,
    "F12": 0.1,
    "F13": 0.1,
    "F23": 0.1,
    "cn": 0.01,
    "cr": 0.01,
    "cc": 0.01,
    "ncc": 0.1,
}

x0 class-attribute

x0: Dict[str, float] = {
    "npv": 1000000000.0,
    "radius": 0.001,
    "kn": 80.0,
    "krr": 0.4,
    "Gg": 2000000000.0,
    "nug": 0.2,
    "n": 1 / 3,
    "nr": 1 / 3,
    "F1": 0.0,
    "F2": 0.0,
    "F12": 0.0,
    "F13": 0.0,
    "F23": 0.0,
    "cn": 0.0,
    "cr": 0.0,
    "cc": 1.0,
    "ncc": 1.0,
}

model_post_init

model_post_init(__context: Any) -> None

Set default values when force_numerical is set to True.

modifiedNormalStiffness

modifiedNormalStiffness(
    kn: float | ndarray, fn: float | ndarray, F: ndarray | None = None
) -> float | ndarray

setPoissonRatio abstractmethod

setPoissonRatio(nu: float)

Set the Poisson's ratio.

StaticHypothesis

Bases: MultiScale

E property

E: float

caches class-attribute

caches: Dict[str, LRUCache] = {
    "stiffness": LRUCache(maxsize=1024),
    "compliance": LRUCache(maxsize=1024),
}

compliance property

compliance: ndarray

integration class-attribute

integration: Integration = integration

model class-attribute

model: Model = Model('CH-OSIMSAND')

nu property

nu: float

stiffness property

stiffness: ndarray

sv class-attribute

sv: StateVariable = StateVariable()

modifiedShearStiffness

modifiedShearStiffness(
    kn: float | ndarray,
    kr: float | ndarray,
    fn: float | ndarray,
    F: ndarray | None = None,
) -> float | ndarray

setPoissonRatio

setPoissonRatio(nu: float)

transformationMatrix classmethod

transformationMatrix(F: ndarray) -> ndarray

Return the transformation matrix transforming original stress to modified stress

WaveVelocity

Bases: ElasticityBase

Elasticity estimated from wave velocity.

E property

E: float

Vpx instance-attribute

Vpx: float

P-wave velocity in the x direction.

Vpxy instance-attribute

Vpxy: float

P-wave velocity in the xy plane.

Vpy instance-attribute

Vpy: float

P-wave velocity in the y direction.

Vpyz instance-attribute

Vpyz: float

P-wave velocity in the yz direction.

Vpz instance-attribute

Vpz: float

P-wave velocity in the z direction.

Vpzx instance-attribute

Vpzx: float

P-wave velocity in the zx direction.

Vsxy instance-attribute

Vsxy: float

S-wave velocity in the xy plane.

Vsyz instance-attribute

Vsyz: float

S-wave velocity in the yz plane.

Vszx instance-attribute

Vszx: float

S-wave velocity in the zx plane.

caches class-attribute

caches: Dict[str, LRUCache] = {
    "stiffness": LRUCache(maxsize=1024),
    "compliance": LRUCache(maxsize=1024),
}

compliance property

compliance: ndarray

nu property

nu: float

rho instance-attribute

rho: float

Material density in kg/m3.

stiffness property

stiffness: ndarray

thetaxy class-attribute instance-attribute

thetaxy: float = deg2rad(45)

Angle for the P-wave velocity Vsxy.

thetayz class-attribute instance-attribute

thetayz: float = deg2rad(45)

Angle for the P-wave velocity Vsyz.

thetazx class-attribute instance-attribute

thetazx: float = deg2rad(45)

Angle for the P-wave velocity Vpzx.

unit class-attribute instance-attribute

unit: Literal['rad', 'deg'] = 'rad'

Unit of the angle theta. Can be "rad" for radians or "deg" for degrees.

model_post_init

model_post_init(__context: Any) -> None