Skip to content

hertzforge.core.shells

shells

Shells: solids meshed into plates (Mesh Solids, Shells).

A flat solid, a plate or a disk with any holes subtracted from it, is meshed on its own plane. A solid with a volume is meshed on its outer surface. Either way the elements are four-node plates or three-node triangles, in an element group named for the part, and their thickness is set on that group in the Element Groups table.

A flat part is meshed by the brick mesher, so its holes come out round as a brick mesh's do: the part is laid out in its own frame as a slab one element thick (a plate a block, a disk a cylinder), each solid cut from it run through the slab, and the bottom face of each brick, moved onto the plane, is a plate. An outer surface is the faces of the part's bricks, or of its tetrahedra for triangles, that no second element shares; the tetrahedra keep their slivers for it, so the surface has no dimple where one would have been removed.

Functions:

Name Description
shell_mesh

The parts as plates, ready to join to a geometry (mesh.join).

mesh_size

The element size the parts are meshed into shells at by default:

flat_scratch

The flat part laid out in its own frame as a slab thickness

Functions:

shell_mesh

shell_mesh(geometry: Any, ids: Sequence[int], size: float, triangles: bool = False, progress: Any = None) -> tuple[Any, dict]

The parts as plates, ready to join to a geometry (mesh.join).

A flat part (solids.is_flat) is meshed on its plane, and a part with a volume on its outer surface. Each part gets one element group, named for it. Parts that meet share their nodes where their meshes' nodes coincide.

Parameters:

Name Type Description Default
geometry Geometry

Whose solids.

required
ids sequence of int

The parts, by id; each a solid nothing else uses.

required
size float

The element size aimed at, as the geometry holds its coordinates.

required
triangles bool

Three-node triangles rather than four-node plates. A flat part's quads are each split on the shorter diagonal; a part with a volume takes the surface of a tetrahedral mesh.

False
progress callable

Told (done, total) as an outer surface's volume mesh goes.

None

Returns:

Type Description
(Geometry, dict)

The plates, and what was made: 'method' ('shells'), 'elements', 'nodes', 'flat' (how many parts were meshed on their plane) and 'surfaces' (how many on their outer surface).

mesh_size

mesh_size(geometry: Any, ids: Sequence[int]) -> float

The element size the parts are meshed into shells at by default: solids.mesh_size, with a flat part measured across its plane, its own lack of thickness left out.

Parameters:

Name Type Description Default
geometry Geometry

Whose solids.

required
ids sequence of int

The parts, by id.

required

Returns:

Type Description
float

flat_scratch

flat_scratch(geometry: Any, part: int, thickness: float) -> tuple[Any, ndarray, ndarray]

The flat part laid out in its own frame as a slab thickness through: a scratch geometry holding it, with the rotation (its axes as rows) and the origin that put it back.

The frame is the first plate's or disk's. Every plate becomes a block and every disk a cylinder, thickness along Z about Z = 0, and every solid cut from them runs through the slab, so that the brick mesher sees an extrusion one element thick. Refused: a plate or a disk off the first one's plane, and a solid cut from it that is a cone or a sphere, or that crosses the plane at an angle, since the cut is then not the same through the slab.

Parameters:

Name Type Description Default
geometry Geometry

Whose solids.

required
part int

The flat part, by id.

required
thickness float

How thick the slab is, as the geometry holds its coordinates.

required

Returns:

Type Description
(Geometry, ndarray, ndarray)