Skip to content

trusty.loads

Loads: traction loads, point loads and pressure cavities.

set_tractions

set_tractions(
    world: World,
    load: int,
    tractions: ndarray[float64, (N, 3)],
) -> None

Replace the load's whole field: num_faces x 3, row k the traction on the k-th face of the load. Takes effect on the next step.

tractions

tractions(
    world: World, load: int
) -> ndarray[float64, (N, 3)]

The load's current per-face tractions, num_faces x 3 (Pa, world frame).

num_loaded_faces

num_loaded_faces(world: World, load: int) -> int

Faces the load's traction field spans (rows of tractions).

add_traction_load

add_traction_load(
    world: World,
    body: int,
    faces: Sequence[int],
    tractions: ndarray[float64, (N, 3)],
) -> int

Add a traction load to body: prescribe per-face tractions (#faces x 3, Pa, world frame; row k the traction on faces[k]) over faces, distinct boundary-triangle ids (rows of F in V, F = trusty.surface.mesh(world, body)). Use np.tile(t, (n_faces, 1)) for a load that is the same on every face. Dead load: world-frame traction over the rest area, discretization-agnostic and contact-free. Call before the first step. Returns the load entity, a child of body; a body may carry several, each retargeted with loads.set_tractions(world, load, ...).

add_point_load

add_point_load(
    world: World,
    body: int,
    vertices: Sequence[int],
    forces: ndarray[float64, (N, 3)],
) -> int

Add a point load to body: a force on each of vertices (#vertices x 3, N, world frame; row k the force on vertices[k]). vertices are distinct rows of the body's surface vertices, each on a boundary triangle or edge: a node of a solid's boundary, a shell or rod vertex. Dead load: the force keeps its world-frame direction and size, and adds no stiffness. Call before the first step. Returns the load entity, a child of body; retarget it with loads.set_point_forces(world, load, ...).

set_point_forces

set_point_forces(
    world: World,
    load: int,
    forces: ndarray[float64, (N, 3)],
) -> None

Replace the point load's forces, #vertices x 3 (N, world frame). Takes effect on the next step.

point_forces

point_forces(
    world: World, load: int
) -> ndarray[float64, (N, 3)]

The point load's current forces, #vertices x 3 (N, world frame).

add_pressure_cavity

add_pressure_cavity(
    world: World,
    body: int,
    faces: Sequence[int],
    pressure: float = 0.0,
) -> int

Drive the volume enclosed by faces (distinct boundary-triangle ids, e.g. one component of trusty.triangle_components) with a gauge pressure (Pa): the conservative potential -pressure * V(x), a follower pressure on the cavity walls. The faces must close; an internal void of a solid and a closed shell both work, whichever way they are wound. Returns the cavity entity.

set_cavity_pressure

set_cavity_pressure(
    world: World, cavity: int, pressure: float
) -> None

Set a cavity's gauge pressure (Pa). Takes effect on the next step.

cavity_volume

cavity_volume(world: World, cavity: int) -> float

Volume (m^3) the cavity encloses at the last accepted step; its rest volume before the first.