Skip to content

mkit.physics.energy.elastic

Material dataclass

cell_data instance-attribute

cell_data: dict[str, float]

energy_fn instance-attribute

energy_fn: CellEnergy

id instance-attribute

id: str

name instance-attribute

name: str

__init__

__init__(
    id: str,
    name: str,
    energy_fn: CellEnergy,
    cell_data: dict[str, float],
) -> None

corotated

corotated(
    disp: ArrayLike,
    points: ArrayLike,
    point_data: Mapping[str, ArrayLike],
    cell_data: Mapping[str, ArrayLike],
    field_data: Mapping[str, ArrayLike],
) -> Array

Corotated (Stomakhin 2012).

Reference
  1. Chen, Yizhou, et al. "Position-Based Nonlinear Gauss-Seidel for Quasistatic Hyperelasticity." arXiv preprint arXiv:2306.09021 (2023).
  2. Stomakhin, Alexey, et al. "Energetically Consistent Invertible Elasticity." Symposium on Computer Animation. Vol. 1. No. 2. 2012.

get_preset

get_preset(_id: str) -> Material

linear

linear(
    disp: ArrayLike,
    points: ArrayLike,
    point_data: Mapping[str, ArrayLike],
    cell_data: Mapping[str, ArrayLike],
    field_data: Mapping[str, ArrayLike],
) -> Array

neo_hookean

neo_hookean(
    disp: ArrayLike,
    points: ArrayLike,
    point_data: Mapping[str, ArrayLike],
    cell_data: Mapping[str, ArrayLike],
    field_data: Mapping[str, ArrayLike],
) -> Array

Neo-Hookean (Macklin 2021).

Reference
  1. Chen, Yizhou, et al. "Position-Based Nonlinear Gauss-Seidel for Quasistatic Hyperelasticity." arXiv preprint arXiv:2306.09021 (2023).
  2. Macklin, Miles, and Matthias Muller. "A constraint-based formulation of stable neo-hookean materials." Proceedings of the 14th ACM SIGGRAPH conference on motion, interaction and games. 2021.

presets

presets() -> dict[str, Material]

saint_venant_kirchhoff

saint_venant_kirchhoff(
    disp: ArrayLike,
    points: ArrayLike,
    point_data: Mapping[str, ArrayLike],
    cell_data: Mapping[str, ArrayLike],
    field_data: Mapping[str, ArrayLike],
) -> Array

stable_neo_hookean

stable_neo_hookean(
    disp: ArrayLike,
    points: ArrayLike,
    point_data: Mapping[str, ArrayLike],
    cell_data: Mapping[str, ArrayLike],
    field_data: Mapping[str, ArrayLike],
) -> Array

Stable Neo-Hookean (Smith 2018).

Reference
  1. Chen, Yizhou, et al. "Position-Based Nonlinear Gauss-Seidel for Quasistatic Hyperelasticity." arXiv preprint arXiv:2306.09021 (2023).
  2. Smith, Breannan, Fernando De Goes, and Theodore Kim. "Stable neo-hookean flesh simulation." ACM Transactions on Graphics (TOG) 37.2 (2018): 1-15.