visualdynamics.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_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 |
Functions:¶
shell_mesh
¶
shell_mesh(geometry: Any, ids, 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 |
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). |
Source code in src/visualdynamics/core/shells.py
mesh_size
¶
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
|
|
Source code in src/visualdynamics/core/shells.py
flat_scratch
¶
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)
|
|
Source code in src/visualdynamics/core/shells.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |