crank-arm (and crank-mirror, kept as the same model under the name of its mirror workflow) now cut the crank on its symmetry plane and the half into seven cells: across the arm at x = 30, 60, 110 and 148, and on two diagonals radial to the pocket's corner fillets. Every cell's cross-section maps (four-sided blocks, the half O-grids round the bores, triangle primitives at the pocket's corners); exact edge seeds give each cut the same divisions on both sides, so mesh.cells merges all six cuts and mesh.mirror reflects the half: 7 710 hex20, scaled Jacobian min 0.37 (was 0.17, and 0.009 for the swept mirrored half), edge ratio at most 7.0. Root σxx ±62.43 MPa against M/Z 62.6 MPa, the spindle carries the 1500 N. The test asserts the quality floor. Gallery images regenerated. Fixes #247 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
11 KiB
Examples
Every example is a built-in sample: open it from File ▸ Samples (or the start screen), with
fieldcraft --sample NAME, or with the file.sample command ({"name": "drop-test"}), then
press Solve (solve.run). Each opens fully defined — geometry, mesh, materials, boundary
conditions, loads and steps — in mm, t, s, N and MPa, and opens and solves within half a minute. The geometry is our
own: SolidCraft scripts run when the sample opens (a recipe from tests/corpus
or one written in crates/engine/src/sample.rs). Each sample has a test in
crates/engine/src/sample.rs that opens it, checks it clean, solves it and holds its result to
the check given below.
Drop test (drop-test)
An aluminium L-bracket (60 × 40 mm foot, 50 mm upright, 8 mm thick, R6 fillet) falls 2 m onto a rigid floor tilted 15°, so the end of its foot strikes first. Explicit dynamics for 1 ms with gravity: 1 911 swept hex8 elements (one-point, stiffness hourglass control), bilinear plasticity (yield 240 MPa), the floor a rigid wall. About 8 400 increments, a few seconds.
Look at: the frames from the strike (Results ▸ Frame): the compression wave leaves the struck corner and the upright's inertia bends the fillet, where von Mises peaks near 120 MPa — below yield, so the drop leaves no permanent set. The energies plot shows the kinetic energy turning into vibration with a balance under 0.01 %.
Check: the mass equals ρ V of the bracket (0.5 %); it meets the floor at √(2 g h) = 6.26 m/s, with ½ m v² = 1 748 mJ of kinetic energy (1 %); energy is conserved (balance < 1 %); by 1 ms the floor has taken about half its downward momentum.
Rubber seal (rubber-seal)
A rubber gasket ring (20 mm inside radius, 30 mm outside, 10 mm high) squeezed 2.5 mm (25 %) between two plates bonded to it. Generic rubber, E = 6 MPa, ν = 0.49, Mooney–Rivlin with C01 = 0.2 MPa; 1 000 hybrid (u–p) hex8 elements in four mapped quarter blocks. Nonlinear static with large deformation: Newton–Raphson in nine increments, under a second.
Look at: the deformed shape at scale 1 — the free inner and outer walls bulge out, and von Mises peaks (about 7 MPa) where the bulge meets the bonded plates. Results ▸ Increment steps through the converged increments.
Check: the same ring between frictionless plates compresses evenly, and its force matches the closed form for an incompressible Mooney–Rivlin solid in uniaxial compression, P = 2 (λ − λ⁻²)(C10 + C01/λ) per original area: 3 430 N against 3 466 N (within 3 %). Bonded, the bulge makes it stiffer (shape factor 0.5): 6 518 N, held between 1.05 and 2.5 times the frictionless force. The groove and the plates are prescribed displacements today; with implicit contact (#161) the ring will be pressed by contact against a groove.
Flow past a bracket (flow-past)
Air (ρ = 1.2 kg/m³, μ = 1.8 × 10⁻⁵ Pa s) at 25 mm/s past the same L-bracket standing on the floor, the upright's back to the wind. A 240 × 120 × 100 mm box of 2.5 mm cells (184 320), uniform inlet, outlet at zero pressure, a no-slip floor and slip walls at the sides and top; D3Q19 lattice Boltzmann (TRT) for 16 s, about 6.7 flow-throughs, ten frames. Reynolds number 83 on the upright's 50 mm height: laminar, a steady wake. About 10 s.
Look at: the step's report (solve.fluid, or Results after Solve): the force on every
named face of the bracket and on each side of the box, final and time-averaged, and the mass
history; solve.probe with points gives the velocity and pressure in any cell, and with
forces each face's force history.
Check: the drag on the bracket, as a coefficient on the upright's frontal area (40 × 50 mm), is 2.3 — a bluff plate standing on a wall at low Reynolds number in a box it blocks by 17 %, held between 1 and 3.5 (a flat plate broadside to the flow is about 1.2 at high Reynolds number and rises as it falls); the lattice's mass changes by less than 1 %.
There is no picture yet: the viewport does not draw flow results (velocity slices and streamlines are planned in M12), so this example is numbers only for now.
Heated bracket (heated-bracket)
The corpus filleted bracket (tests/corpus/filleted-bracket: an 8 mm L-bracket, R6 fillet, a
hole through each leg) in steel, both hole bores clamped. The end of the upright is held at
120 °C by a heater; the rest of its outside loses heat to still air at 20 °C
(h = 10 W/(m² K)); steel conducts with k = 50 W/(m K), expands with α = 12 × 10⁻⁶/K and is
stress free at 20 °C. One coupled temperature–displacement step (steady) on 23 641 tet10
elements: about 8 s to open (meshing) and 13 s to solve.
Look at: Contours ▸ Temperature: the upright stays within a few degrees of the heater and the foot falls to 95 °C, a steady balance between conduction and the air. Contours ▸ Von Mises shows the stress of the growth the clamps hold back: tens of MPa through the legs, peaking at the edges of the clamped bores, where a rigid clamp is a stress singularity (about 1 GPa there, a figure that grows as the mesh is refined: read the stress a little away from the bore).
Check: the temperatures lie between the air's and the heater's and fall away from the heater. For the expansion, the test puts the air at the heater's temperature, so the bracket warms evenly by ΔT = 100 K, and clamps the foot's hole alone: the bracket then grows freely about it, and a point moves α ΔT times its distance from the hole's axis. The upright's top moves −0.0432 mm along x (within 2 %); the foot's end, 16 mm from the clamped bore, which cannot grow, moves 0.0228 mm against 0.024 mm (within 6 %).
Hex-meshed bracket (bracket-hex)
The same filleted bracket split into 30 cells in SolidCraft
(tests/corpus/filleted-bracket-blocks: planar cuts through the legs and diagonal cuts round
the holes and the fillet, each cell a six-sided block), meshed by mesh.hex.blocks as one
conforming all-hex mesh: 5 778 hex20 elements of 3 mm, O-grids round the holes, graded through
the fillet, every shared face meshed once. Steel; the upright's end clamped, 1 kN down on the
foot's end. Linear static: about 2 s to open (the cells are rebuilt from the script) and 3 s to
solve.
Look at: the mesh (Prepare ▸ Mesh) — mapped blocks meeting face to face with no pyramids or tets — and the von Mises contours (tick Deformed for the deformed shape): the stress runs round the fillet and peaks at 295 MPa at the upright's hole.
Check: the tip of the foot moves 0.509 mm down, within 1 % of a 48 016-element tet10
solution of the unpartitioned part (0.5093 mm, crates/testkit/tests/bracket_blocks.rs), and the
clamp carries the whole 1 kN.
Mirrored crank arm (crank-mirror)
The model of crank-arm under the name of its mirror workflow (the sample kept so scripts and
links made with it still open): seen from below, where the pocket is. How the half is cut,
meshed and mirrored is told under crank-arm.
Look at: the pocket from below: straight mapped rows along its sides and floor, and at each end its corner fillets cut off by the diagonal partitions into three-sided triangle primitives; the two halves, mirror images across the arm's middle.
Check: as crank-arm.
Bicycle crank arm (crank-arm)
A 170 mm aluminium crank built in SolidCraft (crates/engine/samples/crank-arm.json): a 16 mm
arm tapering from 38 to 24 mm, root arcs into a Ø46 × 22 spindle boss with a 12.7 mm square bore
(R1.5 corners) and a Ø30 × 20 pedal boss with a Ø14 hole, and an 82 × 14 × 8 pocket in its back
(R5 corners). It is a stack of extrusions along z, so it sweeps all-hex. To keep it sweepable the
hex variant leaves out the pocket's floor fillet and the bosses' 1.5 mm chamfers, and its root
arcs meet the bosses about 20° off tangent (a tangent meeting leaves a zero-angle cusp on the
arm's top face, where any hex is degenerate). 6061-T6 (E = 68 900 MPa, ν = 0.33); the square
bore's faces fixed, 1500 N on the pedal hole in the crank's plane, across the arm (−y). Linear
static: about 5 s to open and 7 s to solve.
The mesh is built as an analyst builds a structured one. A datum plane on the symmetry plane
(Sym, y = 0) partitions the crank (Half); the half CrankArm/a is cut into seven cells:
across the arm at x = 30 (the root, beyond the spindle boss), 60 and 110 (the pocket's straight
middle) and 148 (before the pedal boss), and on two diagonals (D1, D2) through the centres
of the pocket's corner fillets, radial to them so they meet the pocket wall square. Every
cell's cross-section then splits into regions that map: the half ring round each bore (an
O-grid), four-sided blocks (transfinite), and the pocket's four corners, three-sided, as
triangle primitives. Exact edge seeds (mesh.seed.edge) give every cut the same divisions on
its two sides, so mesh.cells sweeps each cell (extrude, hex20 of 3 mm) and merges all six
cuts node for node, and mesh.mirror reflects the half onto CrankArm/b: 7 710 hex20
elements, 37 938 nodes, all valid, scaled Jacobian min 0.37, mean 0.92, edge ratio at most 7.0
(the swept crank before: min 0.17, its free-paved middle at the pocket the worst).
Look at: the mesh (Prepare ▸ Mesh): rows running straight along the arm, the O-grids round the bores, eight layers through the arm, and the von Mises contours: the bending stress grows along the arm toward the root; the peak, 145 MPa, sits at a square-bore corner where the rigid clamp meets the free face, a support singularity.
Check: σxx on the arm's sides at x = 29 mm is −62.43 and +62.43 MPa, equal and opposite as the mirror-image halves are, against the beam formula M/Z = 1500 · 141 / (16 · 35.6² / 6) = 62.6 MPa (0.3 %); a 41 815-element tet10 solution of the full part gives 62.3 MPa. The pedal bore moves 0.75 mm down (tet10: 0.70–0.75 mm; Euler–Bernoulli with a rigid clamp: 0.58 mm, without shear or the boss's compliance), and the spindle carries the whole 1500 N and 255 N·m.





