Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

FieldCraft

FieldCraft is an open-source CAE application in pure Rust. It takes a parametric SolidCraft part to a verified analysis: tetrahedral and hexahedral meshing, its own implicit, explicit, thermal and lattice Boltzmann solvers, and decks for Abaqus, Nastran and LS-DYNA.

It runs as:

  • a desktop app for macOS, Windows and Linux, from the releases;
  • a web app in the browser, try it here;
  • a command line, fieldcraft-cli, that runs, solves and exports models;
  • an MCP server that AI agents analyse with (AI agents).

Everything the user can do is a command with JSON parameters. The toolbar, the dialogs, the command line, the control channel and MCP all run the same commands (features).

Every capability is checked against closed forms and published benchmarks, with the results frozen so they cannot drift (verification and validation).

This book has five parts:

  • the user guide, for people running analyses;
  • the solver manual, the methods and their limits;
  • verification, the evidence for each solver;
  • the developer guide, for people working on FieldCraft;
  • the literature the solvers and meshers are built from.

The source is on GitHub.

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 electronics cooling studies at the end take minutes). 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 or its modules 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 130 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 1.7 passes through the 240 mm box, 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 %.

The picture shows the bracket as the sample opens. After Solve the viewport draws the flow: velocity magnitude on a slice through the middle of the box (results.slice; pressure with field: "pressure"), the bracket coloured by the flow beside it (results.surface) and streamlines seeded upstream of it, coloured by speed (results.streamlines).

Watch it start up: a fluid step animates its frames (Results ▸ Animate, or results.animate), playing the start-up transient from the uniform 25 mm/s initial field to the settled wake — the wake forming behind the upright and the drag settling over the 16 s run. A clip is at flow-past-transient.mp4, regenerated by tools/flow-clip.

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 about 23 000 tet10 elements (the count differs a little between platforms): about 5 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.5 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 as three-sided triangle primitives, cut off by the mesher’s own blocks; 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 needs one datum. A datum plane on the symmetry plane (Sym, y = 0) partitions the crank (Half); mesh.hex.generate extrudes the half CrankArm/a (hex20 of 3 mm) and cuts its cross-section into mappable blocks itself, inside the mesher (nothing is added to the model): the half ring round each bore as four-sided blocks, the pocket’s R5 corners as three-sided triangle primitives, and four-sided blocks along the arm, split where the pocket’s fillets meet it. Interval assignment gives every block’s sides matching counts, with no seeds. mesh.mirror reflects the half onto CrankArm/b: 8 664 hex20 elements, all valid, scaled Jacobian min 0.37 (at the corners where the root arcs meet the bosses 20° off tangent), mean 0.91. Before the mesher cut blocks itself the same crank took seven partitions and eleven exact seeds for 0.37 (and the swept half without them: min 0.009, its middle free-paved).

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, 117 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.44 and +62.44 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.25 %); 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.

Cantilever (cantilever)

A steel beam of 160 hex8 elements, clamped at one end with a load on the other: a static step and a frequency step. Look at: the bending stress, highest at the clamped root, and the Modes step’s mode shapes.

Bar impact (impact)

The same beam flying onto a rigid wall: an explicit dynamic step of ten frames. Look at: the stress wave running back along the bar (Results ▸ Frame) and the energy history in the Results panel.

Hex and tet parts (parts)

A hex8 block beside a tet4 cube: meshes to look at (element types, nodes, picking), nothing to solve.

I-beam cantilever (ibeam)

The 200 mm steel I-beam of the README video (tests/corpus/cantilever-i-beam), opened as SolidCraft geometry with persistent face names, swept all-hex (hex8 of 4 mm, incompatible modes), clamped at F2:start and loaded with 1000 N down through a kinematic coupling to F2:top. Look at: the bending stress in the flanges, highest at the clamp; the tip moves 0.18 mm down (beam theory with shear: 0.184 mm).

Heated flow past a bracket (heated-flow)

Air at 20 °C enters at 1 mm/s and passes the original upright bracket, whose faces are held at 80 °C. The 130 × 80 × 70 mm domain has 5 mm cells (5,824 cells), a pressure outlet, slip sides and top, and a no-slip floor. There are 180 steps and six saved output intervals, plus the initial frame. Open file.sample {"name":"heated-flow"} and solve on CPU or GPU. The slow prescribed flow keeps this coarse lattice away from its small-relaxation-time limit.

Look at: Results → Temperature, or results.slice {"field":"temperature"}, for the warming air. results.surface {"field":"wall_heat_flux"} shows heat received by each bracket face per area: the hot wall heating the air is negative. In this model’s mm–tonne–second units the wall flux is mW/mm². The initial frame has no recorded wall heat and stays uncoloured.

Check: the fluid warms above its inlet temperature while staying below the held wall temperature (with a small numerical tolerance); recorded hot walls give heat to the fluid. This coarse, short transient is a quick display demonstration, not a converged convection benchmark. It has neither buoyancy nor solid heat conduction. The sample is isolated in crates/engine/src/sample/heated_flow.rs and its gallery registration.

Electronics cooling studies

Three larger thermal lattice-Boltzmann studies, samples like the rest but slower to solve: the heat sink takes about four minutes on a CPU, the enclosure about twenty, and the AIO radiator (5 M cells) needs a GPU (solve.fluid with "backend": "gpu"). Their setup is crates/engine/src/sample/cooling.rs, their geometry SolidCraft recipes (the cooling-* parts of tests/corpus and crates/engine/samples/cooling-aio*.json); trunk tests solve the heat sink and the enclosure briefly, heavy tests the AIO’s start and the heat sink’s and the enclosure’s numbers below. tools/cooling/make.py (see its README) opens each sample headless, solves it, prints the numbers and renders the pictures. They show what the fluid solver can do for electronics cooling today, and where it stands in for what it cannot yet do:

  • No conjugate heat transfer into solids yet (#157): a high-conductivity heat sink or radiator is an isothermal surface, and a component a held-temperature face. Real junction temperatures need conduction through the solid, and a component given its power in W needs #609.
  • Fans are a uniform inlet velocity here. The solver now has fan curves and porous vents (#596); the studies keep a fixed face velocity because the two-relaxation-time collision is resolution-bound near its stability limit (#557), which caps them at a gentle 0.1 m/s, below where a fan curve’s operating point would sit. A fan zone in the AIO’s shroud is the natural next step.
  • No surface-to-surface radiation: the sealed enclosure is convection only (radiation carries a real share of the heat in a sealed box).
  • The colour legend under each picture is the temperature range it is clamped to.

Background for the planned electronics-cooling release is in discussion #584.

Heat sink in forced air (cooling-heat-sink)

A 40 × 40 mm aluminium heat sink with six 18 mm fins, held isothermal at 50 °C (a high-conductivity sink with fin efficiency near 1), in a closed 120 × 44 × 30 mm duct. Air at 25 °C enters at 100 mm/s (0.1 m/s, a gentle fan), the outlet at zero pressure. Buoyancy is on (Boussinesq, β = 3.4 × 10⁻³ K⁻¹, g along −z): at 0.1 m/s this is mixed convection (Re ≈ 270 on the fin length, Ri = Gr/Re² ≈ 3), and the 25 K rise keeps βΔT at 0.085, well inside Boussinesq. D3Q19 TRT with the D3Q7 thermal lattice on 158,400 cells of 1 mm, 12,000 steps of 0.25 ms to 3 s. The wake behind the sink keeps shedding, so the steady stop rule never fires; the heat holds within about 1 % from 2 s on (1.92–1.95 W out to 20 s).

Numbers: the sink sheds 1.93 W, a sink-to-inlet resistance of 13.0 K/W. The duct’s air could carry 3.98 W if it all left at the sink’s temperature; it carries 48 % of that (ε = 0.48), a bulk rise of 12 K at the outlet. So at this airflow the sink is airflow-limited: per area it does about as well as the bare chip below (h ≈ 7 W/m²K over its 110 cm² against the chip’s 7.9), and its lower resistance comes from its area. Buoyancy lifts the warm layer off the fins into a rising wake and adds about 4 % (1.85 W without it at 3 s).

Look at: the temperature slice between the middle fins and the streamlines coloured by temperature (results.slice / results.streamlines with field: "temperature"), the hot layer rising behind the sink. The heat each face gives the air is in the solve.fluid report (heat, negative into the fluid).

Caveat: the air’s minimum is 20.4 °C against the 25 °C inlet (4.6 K under), at the sharp fin corners: the D3Q7 anti-bounce-back wall at a convex edge, not a physical undershoot. The maximum overshoots the sink by 0.5 K at the same corners.

Regenerate: python3 tools/cooling/make.py heat-sink.

Sealed enclosure with a PCB (cooling-enclosure)

A small package held at 40 °C on a vertical PCB inside a sealed 60 × 40 × 60 mm air box whose walls are held at 25 °C, no fan. Buoyancy (Boussinesq, β = 3.4 × 10⁻³ K⁻¹, g along −z) drives a plume up off the chip, over the top of the board and down the cool walls. D3Q19 TRT with the D3Q7 thermal lattice and buoyancy on 144,000 cells of 1 mm at a fixed 0.2 ms step, run to steady state with the steady stop rule (#595: flow, temperature and the chip’s heat each changing by under 0.1 % per 2 s window): it stops at 18 s, after 90,000 steps, when the walls take back the chip’s heat to within 0.01 %.

Numbers: the chip sheds 62.7 mW by natural convection: over its 528 mm² of wetted faces at 15 K that is h ≈ 7.9 W/m²K, against 9.5 from the Churchill–Chu correlation for a vertical plate of the chip’s height, and a chip-to-wall resistance of 239 K/W. The air stays between the walls’ and the chip’s temperatures (24.9–39.5 °C). The plume’s 72 mm/s peak matches its scale √(gβΔT·L) ≈ 77 mm/s. Solved on 2 mm cells instead, the steady heat is 1.3 % lower.

Look at: the side section through the chip (results.slice with axis: "x" at 35): the plume rising off the chip, spilling over the board’s top edge, and the recirculation the streamlines draw down the walls.

Caveats: the buoyant start-up needs a small fixed time step: the solver’s automatic step over-accelerates the first instant and goes unstable (lattice speed 0.505 at step 38). This is convection only: a sealed enclosure also loses a real share of its heat by surface-to-surface radiation, which the solver does not model yet.

Regenerate: python3 tools/cooling/make.py enclosure.

AIO cooler radiator (cooling-aio)

A 240-class all-in-one liquid cooler, modelled in SolidCraft for this study (tools/cooling/aio_recipe.py writes the cooling-aio and cooling-aio-half recipes): a cold plate and a two-tier pump block, two Ø6.5 mm coolant tubes running as a parallel pair from barbs on the pump to ports on the radiator, and a 230 × 118 × 30 mm radiator whose fin pocket sits recessed behind a filleted, raised border, with 2.4 mm air channels cut through its whole depth.

Only the radiator’s air side is simulated. The water-cooling half of the cooler (coolant pumped through the cold plate, the tubes and the radiator’s core, and the heat conducted from the CPU into it) is still to do: the cold plate, the pump and the tubes are drawn for context, and the radiator stands in for the coolant by being held at an assumed coolant temperature.

The study: a fan shroud seals to the radiator’s frame, so air at 25 °C entering at 0.1 m/s across the face has to pass through the channels; the radiator is held at a 45 °C coolant temperature. The sample is the half of the cooler with the ports (cooling-aio-half), with a symmetry plane on the radiator’s middle, which is also what lets the picture look into the channels. D3Q19 TRT with the D3Q7 thermal lattice on 5.07 M cells of 0.6 mm (10.1 M for the whole radiator), 20,513 steps to 1.6 s, solved on the GPU (NVIDIA GB10, single precision) in about four minutes.

Numbers: 163 L/min of air (5.8 cfm) goes through the radiator, and the radiator gives it 61 W: an effectiveness of 0.93, of the 66 W the air could carry if it left at the coolant temperature. At this airflow the radiator is nearly saturated: the air leaves almost as warm as the coolant.

Checks: refining the cells from 0.6 to 0.5 mm moves the heat by 0.4 %. That shows the heat is converged, but says little about the channels’ heat transfer coefficient: at NTU ≈ 3 a 10 % change in h moves the heat by only about 1.6 %. The time step matters more, through the weakly compressible error of the fast channel flow: the heat falls from 69 to 64 to 61 W as the inlet lattice speed goes from 0.03 to 0.02 to 0.013 (a density swing of 9.3, 3.9 and 1.6 %), linearly in its square, and extrapolates to about 59 W (effectiveness 0.90) at zero time step. The study uses 0.013, within about 3 % of that. The air’s minimum is 20.8 °C against the 25 °C inlet, at the channels’ sharp corners (the same wall artefact as the heat sink’s).

Look at: the cutaway temperature slice (results.slice with axis: "x" on the cut): cool air in front, each channel heating its air between the fins, warm jets into the exhaust, and slow recirculation behind the frame’s top and bottom. The clip, recorded in the desktop app on a longer domain (130 mm of exhaust behind the radiator, 12.6 M cells to 2.4 s), shows the start-up: the warm front leaving the channels with a vortex curling at either end of the frame, then the settled exhaust.

Caveats: 0.1 m/s is the ceiling of today’s collision operator: the channel flow reaches about 470 mm/s, a cell Reynolds number of about 19 at 0.6 mm, where the heat-sink study found the two-relaxation-time collision going unstable (#557). A pair of 120 mm fans pushes 1–2 m/s through a real radiator, where it no longer saturates and the fin design decides the heat, so this study cannot rank radiator designs yet. The water loop is to do: the radiator is isothermal, with no coolant flow and no conduction inside it (#157 and a coupled coolant loop), so the coolant temperature is an input here rather than a result. The heavy tests do not hold the AIO’s numbers: its run is 10¹¹ cell updates, hours on a CPU; a heavy test solves a coarse start.

Regenerate: python3 tools/cooling/make.py aio --backend gpu (the CPU solver also runs it, far more slowly at 5 M cells).

FieldCraft and AI agents (MCP)

FieldCraft speaks the Model Context Protocol over stdio (JSON-RPC 2.0, one message per line; protocol revisions 2025-06-18, 2025-03-26 and 2024-11-05). An agent builds and solves models the way a person does: every tool runs engine commands, the same ones the UI, scripts, the command line and the control channel run, and never opens a dialog or a file picker. The server is crates/mcp (fieldcraft-mcp); fieldcraft-cli mcp runs it.

Start it

# Headless (the default): an in-process session, no window; screenshots are drawn offscreen
# with the viewport's GPU pipeline (hardware or software GPU), or on the CPU without one.
fieldcraft-cli mcp
fieldcraft-cli mcp --headless

# Bridged to the running app, so you can watch the agent work:
fieldcraft --control 7070 &
fieldcraft-cli mcp --connect 127.0.0.1:7070

With --connect, an app that cannot be reached when the server starts gives a headless session instead (a note goes to stderr). stdout carries only protocol messages; errors go to stderr. Bridged screenshots are written to a temporary file by the app and read back by the server, so both must run on the same computer.

Claude Code

Use the CLI from your installation:

PlatformCLI path
macOS, app installed in Applications/Applications/FieldCraft.app/Contents/MacOS/fieldcraft-cli
Linux, unpacked tar.gz<unpacked-folder>/bin/fieldcraft-cli
Linux, installed .deb or .rpm/usr/bin/fieldcraft-cli
Windows, unpacked zip<unpacked-folder>\fieldcraft-cli.exe
Built from source<repository>/target/release/fieldcraft-cli (fieldcraft-cli.exe on Windows)

The separate macOS CLI zip also contains fieldcraft-cli in its unpacked folder. Use an absolute path in your MCP configuration; quote it if it contains spaces. For the installed macOS app:

claude mcp add fieldcraft -- /Applications/FieldCraft.app/Contents/MacOS/fieldcraft-cli mcp
claude mcp add fieldcraft -- /path/to/fieldcraft-cli mcp
# bridged to a running app:
claude mcp add fieldcraft -- /path/to/fieldcraft-cli mcp --connect 127.0.0.1:7070
# kept to one project folder:
claude mcp add fieldcraft -- /path/to/fieldcraft-cli mcp --automation-read-root /work/bracket --automation-write-root /work/bracket/out

When building from source, run cargo build --release -p fieldcraft-cli first. The same setup as a project .mcp.json, or in another client’s configuration (Claude Desktop’s claude_desktop_config.json):

{
  "mcpServers": {
    "fieldcraft": { "command": "/path/to/fieldcraft-cli", "args": ["mcp"] }
  }
}

Confining file access

fieldcraft-cli mcp --automation-read-root /work/bracket --automation-write-root /work/bracket/out

The two flags keep the agent to the folders you give it:

  • Every file a command reads must lie inside the read root: open, file.open, geometry.open, geometry.import.mesh, the design and meshes a .fieldcraft file opens again, file.recovery.list and file.recover with a dir.
  • Every file a command writes must lie inside the write root: save, file.save and file.save_as (also a save to the model’s own file), write_deck and deck.write, screenshot {path}, file.recovery.discard with a dir.
  • Read and write access are separate. Give the same folder twice for both; a root left out grants none of its access (with only --automation-read-root, nothing can be written). Without either flag nothing is confined.
  • A path is made absolute against the server’s working folder, then its links are followed: a file (or folder) link that leads out of a root is outside it. For a file that does not exist yet, its nearest existing folder’s links are followed and the rest must be plain names, so .. below a folder that does not exist is refused, as is a link that leads nowhere (writing through it would create its target). The result is compared with the root by whole folder names: /work2/x is not inside /work. On Windows device names (CON, NUL, COM1…) are refused.
  • A refused path is an ordinary tool error the agent can read and correct, for example automation path rejected: outside the write root /work/bracket/out: /etc/x.inp or automation filesystem access is not granted: write authority is absent: /work/bracket/out/x.inp. A design or mesh a model refers to outside the read root is not opened; the model opens without it and says so in warnings.
  • The app’s own recovery folder (autosaves, file.recovery.* without dir) is not confined: no agent names a path there.
  • The roots must be existing folders; a missing one stops the server with an error. Each flag is given once (--flag <dir> or --flag=<dir>).

The flags confine the headless server and imply --headless; --connect with them is an error, since the server would otherwise drive an app that is not confined.

A path is checked, then opened: another program that swaps a link in between can still win that race, so the roots keep an agent to the files it was given rather than guarding against other software on the computer.

Bundled skill prompts

The server advertises prompts: {"listChanged": false}. A client can let the user choose fieldcraft-meshing or fieldcraft-modelling from prompts/list, then retrieve it with prompts/get. These names are stable and take no arguments. The complete small catalogue is returned in one page; omit cursor or send "cursor": null to request it. Non-null continuation cursors are refused.

{"jsonrpc":"2.0","id":1,"method":"prompts/list"}
{"jsonrpc":"2.0","id":2,"method":"prompts/get","params":{"name":"fieldcraft-modelling"}}

The first returned user message contains the exact corresponding skills/<name>/SKILL.md Markdown, including its frontmatter, embedded at compile time with include_str!. There is no separately maintained prompt copy. Retrieving a prompt does not run commands or change the model. Prompts are user-selected instructions, not automatic model actions.

The modelling prompt’s remaining messages are three embedded resources. Their URI suffixes map to its relative references/ links:

Relative referenceFixed MCP resource URI
references/checks.mdfieldcraft://skills/fieldcraft-modelling/references/checks.md
references/axial-rod.jsonfieldcraft://skills/fieldcraft-modelling/references/axial-rod.json
references/steady-conductor.jsonfieldcraft://skills/fieldcraft-modelling/references/steady-conductor.json

They also appear in resources/list and are readable with resources/read. These resources contain the exact bundled reference/recipe text; recipes are not executed on retrieval. Other repository documentation links still refer to the matching checkout. Both headless and connected-app servers return the same compiled skill/reference contents, even without a source checkout at runtime. Names and URIs are a fixed allowlist, with no arbitrary path lookup. Unknown prompt names, nonempty or malformed arguments, and continuation cursors return JSON-RPC invalid-params errors; unknown resource URIs retain resource-not-found errors. The existing model/command resources are unchanged.

The wire format follows the MCP prompt specification.

Tools

ToolArgumentsWhat it does
list_commandsfilter?Every command with its label, parameter documentation and schema (its parameters as JSON Schema: types, units as x-dimension, defaults, required fields, one-of variants) and requires (what the session must hold first: design, geometry, mesh, material, step, result, …); filter matches id and label.
executecommand, params?Run any command (list_commands). A failure leaves the model unchanged and names what to fix; a command whose requires are not met fails before doing anything, naming each missing piece and the command that provides it.
batchcommands: [{command, params}]Run steps in order, stop at the first error; the reply has every result and the failing step (failed.index, failed.command, failed.error). Steps before it stay applied (undo takes them back).
inspect_model—model.info (counts, units, definitions), model.activity (the step table) and geometry.bodies (bodies with measures, persistent face names, which sets name as {body, face}, and persistent edge names <face>|<face> with lengths, which sets name as {body, edge}).
check_model—model.check: errors and warnings, each naming its item, and progress: the setup checklist with the next stage and its command.
openpath, model?By extension, the kinds follow SolidCraft’s format table (fieldcraft_geometry::formats): .fieldcraft (file.open); a SolidCraft design, STEP and IGES, and FreeCAD and Rhino in native builds (geometry.open); a triangle mesh (3MF, STL, OBJ, PLY, glTF; geometry.import.mesh); and .msh (mesh.import.orphan). For a design, model is keep (default: the mesh and definitions stay, as a reopen after an edit wants) or new (a new model with the design); the reply’s related is false when the design has none of the bodies the model refers to, and stale lists the mesh bodies and sets that no longer resolve.
savepath?file.save: to path or the model’s own file.
write_deckformat (abaqus, nastran, lsdyna), path, steps?deck.write.
meshmethod, params?Runs the mesher (tet: mesh.tet.generate; hex, hex_sweep, hex_mapped, hex_blocks: the structured hex meshers; hex_extrude: mesh.hex.extrude, layers from a section up to a target surface; cells: mesh.cells, a partitioned part cell by cell; mirror: mesh.mirror, a meshed half reflected across a plane; block: mesh.block; planar: mesh.planar) and replies with its result, model.info and mesh.quality.
solveanalysis (static, nonlinear, frequency, buckle, explicit, fluid, heat), step?, options?solve.<analysis> with the step and the solver’s caps and settings.
show_resultsstep?, field?, bands?, range?, deformed?, scale?, mode?, frame?, time?The results.* commands its arguments ask for (deformed: false draws the undeformed mesh; scale is a factor, 0 for the undeformed shape so a sequence from 0 swings the deformation out, or "auto"; range: {min?, max?} clamps the legend, values above max drawn in the over colour); the reply has the contour range (smallest and largest value and their nodes: field: "displacement" gives the largest displacement), modes or frames.
probestep?, nodes?, at?, elements?, points?, forces?, mode?, frame?solve.probe: stored results at nodes, at the nodes nearest to points at (structural steps), elements (explicit) or points (fluid).
reactionsstep?, sets?, about?results.reactions: reaction force and moment per node set and in total.
screenshotview?, camera?, section?, source? (window, model), width?, height?, path?A PNG image content block and what it shows. Headless: an offscreen render with the viewport’s GPU pipeline (`FIELDCRAFT_GPU=auto
selectfilter?, box_mode?, mode?, clear?, geometry?, nodes?, elements?, faces?, at?, box?Bridged only: changes the app’s viewport selection (ui.select; control-protocol.md, Selection) and returns it. Headless it is an error: selection belongs to the window.
selection—Bridged only: the viewport selection (ui.selection), with params, the selection as a set’s members for model.set.create.
undo, redo—edit.undo, edit.redo.

Resources: fieldcraft://model (model.info) and fieldcraft://commands (the command catalog).

Errors: an unknown tool, or arguments that do not match the tool’s schema (a missing or unknown argument, a wrong type, a value outside an enum), are JSON-RPC -32602 errors; an engine failure is a tool result with isError: true and the engine’s message.

Partition, mesh half, mirror

The commands that cut a part into cells and build its mesh from a half, all through execute and mesh (each one’s parameters: list_commands):

  1. geometry.datum {name, by}: a datum plane — a principal plane moved along its normal ({"type": "offset", "plane": "zx", "offset": 0}), three points, or a point and a normal. geometry.datum.axis makes axes.
  2. geometry.partition {name, datum, bodies?}: cuts the open design’s bodies by the plane into cells <body>/a (negative side) and <body>/b. The two faces of the cut are partition:<name>:a and partition:<name>:b; every other face keeps the name of the face it is a piece of. The partition is part of the model: saving and opening it, or opening the design again after an edit, cuts the design again. inspect_model lists the cells.
  3. mesh with method hex on an extruded cell needs no further cuts: its cross-section is cut into mappable blocks inside the mesher (O-grids round holes, triangle primitives at fillets, four-sided blocks), so a symmetric part takes one datum. Or mesh with method hex, hex_sweep, hex_mapped or tet on one cell ({"body": "Part/b"}), or method cells for all cells with a method each ({"methods": {"Part/a": "tet"}, "default": "auto"}): cells whose faces match on a partition are merged, others are tied (the reply lists each interface).
  4. mesh with method mirror ({"plane": "<datum>", "bodies": ["Part/b"]}): the meshed half reflected across the plane, right-handed, joined on it, its elements and faces tagged as the other half’s, so sets by face name ({body, face} on either half) reach both.
  5. Or keep the half: model.boundary_condition.symmetry {name, datum} holds it on the plane (zero normal displacement), with half the load.

file.sample {"name": "crank-mirror"} opens the crank arm built this way: one datum (Sym), its partition, hex on the half and mirror (docs/examples.md).

Edge and face seeds

Seed an edge when its element count matters more than the global size: through a thin section’s thickness (at least 2–3 elements for bending), around a fillet or hole where the stress peaks (a count or a small size, biased toward the stress raiser), or to give the shared edges of partition cells matching counts. Seed a face to seed every edge around it at once.

  1. inspect_model lists each body’s edges by persistent name (<face>|<face>, ~k when several separate the same faces) with their lengths; the names follow the faces through edits and partitions.
  2. execute mesh.seed.edge {edges: [{body, edge}], count | size, bias?: {ratio, toward: start|end|both}, constraint?: exact|min|free}. exact keeps the count, min keeps at least it, free is a goal. The reply gives the count each edge gets.
  3. Mesh: the hex meshers (hex, hex_sweep, hex_mapped, hex_blocks, cells) keep exact counts through their interval assignment and refuse, naming the seeds, when two exact counts cannot both hold (opposite sides of a mapped face, the layers between two levels); the tet mesher divides the edge at the seed’s nodes and grades its size field from them (its reply’s seeds gives the mesh edges along each). A seed on an edge two partition cells share holds in both, so their meshes still conform. A biased seed’s spacing carries to the unseeded edges tied to it (the parallel edges of a mapped block or cell, the opposite side of a mapped face, the other side edges of a sweep), so one biased edge grades the whole layer stack.
  4. mesh.seed.face {faces: [{body, face}], count | size, bias?: {ratio, toward: both}, constraint?} seeds every edge bounding the faces: a count on each, or each edge’s length over the size. It is resolved by the face’s name whenever a mesher runs. An edge’s own seed wins over a face’s (also on an edge two partition cells share); of two seeded faces on one edge, the one giving it more divisions wins; the reply and mesh.seed.list mark an edge another seed decides with overridden_by. A size control on a face (mesh.size.set) is the other tool: a graded element size over the face, not counts on its edges.
  5. mesh.seed.list lists the seeds and the edges they reach (stale when the design has no such edge or face); mesh.seed.clear {edges?, faces?} removes them. Seeds are saved with the model.

Size controls

Ask for a local element size where the answer is decided (a fillet, a hole’s wall, a contact patch) instead of making the whole part fine.

  1. execute mesh.size.set {name, size, faces: [{body, face}] | bodies: [...] | box: {min, max} | sphere: {center, radius}} adds the control (or replaces the one of that name). Faces are named as inspect_model lists them.
  2. mesh.size.growth {rate} sets how fast the size grows away from a control (the largest change of element size per unit length; 0.3 by default, 0.05 to 2).
  3. Mesh: every mesher honours the controls. The size at a point is the smallest of the mesh command’s size and, over the controls, a control’s size plus the growth rate times the distance to it. The tet mesher refines to that field; the structured hex meshers, the block projection and mesh plans divide their edges by it (a structured mesh carries a count across its block, so the refinement spans the row or layer); the octree refines its cells to it (a size that needs more levels than max_depth is refused before meshing). A control on whole bodies is their size in place of the command’s.
  4. mesh.size.list lists the controls, what each covers in the open design (stale when the design no longer has a face it names) and the growth rate; mesh.size.clear {names?} removes them. Controls are saved with the model.

Meshing from the feature graph

A design opened from .solidcraft is rebuilt from its timeline, so how each body was made is known. execute geometry.features {"body"?} lists, per body, the features that built it in order: type, operation, evaluated values, placement and direction, the sketch profiles (lines, arcs, circles), pattern and mirror transforms, targets and tools, and the persistent faces and edges each one made. mesh.plan {"body"} turns that into a saved, editable hex-meshing plan (templates per feature, O-grid and butterfly rings round circles, the partition cuts their frames and imprints need, the copies a pattern or mirror made, and the features not mapped yet with why); mesh.plan.apply {"plan"} cuts and meshes the body (and its copies) with the structured meshers and reports all_hex, conforming, the smallest scaled Jacobian and what still needs the projection mesher (pending).

Relaxing a few bad elements

When mesh.quality shows a handful of spikes in an otherwise good mesh:

  1. execute mesh.node.relax {"around_element": <the scaled Jacobian's worst>} (or {"center": [x, y, z], "radius": r}, or nodes / elements / set; iterations, strength, falloff). Nodes there relax (smart Laplacian, then optimization of the worst element), each move kept only when the worst element around the node does not get worse and nothing inverts. Nodes on a B-rep face slide in its UV parameters and stay on it, nodes on a B-rep edge slide along it, vertex nodes stay; nodes on a partition cut face move freely (both cells share them). The reply gives the nodes moved, the largest displacement, and the region’s smallest scaled Jacobian, largest edge ratio and worst elements before and after. One undo step. For a whole region at once, mesh.node.relax {"mode": "strong", "bodies": ["Base"], "below": 0.7} morphs the mesh round every element below 0.7: their nodes move to better places and the nodes within reach (default three element lengths) follow by harmonic interpolation; edge and vertex nodes are held, face nodes stay on their faces, nothing outside the reach moves, and the smallest scaled Jacobian never drops. The reply lists each round’s bad elements, clusters and region size (rounds). It runs as a job (job.status, job.cancel).
  2. The relaxation is kept as a field of the model (field, default Relax1, …; saved with it). After a remesh, mesh.node.relax.apply {"field": "Relax1"} puts the relaxed shape on the new mesh (each node takes the displacement interpolated in the old cell it lies in, on its face, then one guarded smoothing sweep); with "reapply": true on the relaxation every remesh does it by itself (the mesher’s reply lists relaxations_applied).

Limits

The server treats its input as hostile. A message line may be at most 16 MiB (the control channel’s limit); a longer one is answered with request too large and skipped, and the server keeps serving. A JSON-RPC batch holds at most 100 messages, a batch call at most 10 000 commands; JSON nested deeper than 128 levels is a parse error. Picture sides are clamped to 16–4096 pixels. Every command keeps its own caps (element counts, solver degrees of freedom and factor size, iterations), and an engine failure or panic leaves the model as it was.

A typical session

→ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"me","version":"1"}}}
→ {"jsonrpc":"2.0","method":"notifications/initialized"}
→ {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"open","arguments":{"path":"/work/steps.solidcraft"}}}
→ {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"inspect_model","arguments":{}}}
← … "bodies": [{"name": "Steps", "faces": [{"name": "F1:-x"}, {"name": "F1:+x"}, …]}] …
→ {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"mesh","arguments":{"method":"tet","params":{"body":"Steps","tolerance":0.5}}}}
→ {"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"batch","arguments":{"commands":[
     {"command":"model.units","params":{"system":"mm-t-s-N-MPa"}},
     {"command":"model.set.create","params":{"name":"all","geometry":[{"body":"Steps"}]}},
     {"command":"model.set.create","params":{"name":"root","geometry":[{"body":"Steps","face":"F1:-x"}]}},
     {"command":"model.set.create","params":{"name":"tip","geometry":[{"body":"Steps","face":"F1:+x"}]}},
     {"command":"model.material.create","params":{"name":"Steel","elastic":{"type":"isotropic","young":210000,"poisson":0.3},"density":7.85e-9}},
     {"command":"model.section.create","params":{"name":"solid","set":"all","material":"Steel","kind":{"type":"solid"}}},
     {"command":"model.boundary_condition.create","params":{"name":"clamp","type":"fixed","target":{"set":"root"}}},
     {"command":"model.load.create","params":{"name":"push","type":"force","target":{"set":"tip"},"vector":[0,0,-1000]}},
     {"command":"model.step.create","params":{"name":"Load","procedure":{"type":"static"},"boundary_conditions":["clamp"],"loads":["push"]}}]}}}
→ {"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"solve","arguments":{"analysis":"static","step":"Load"}}}
→ {"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"show_results","arguments":{"step":"Load","field":"displacement"}}}
← … "contour": {"field": "displacement", "range": {"max": {"node": 25, "value": 0.00485}, …}} …
→ {"jsonrpc":"2.0","id":8,"method":"tools/call","params":{"name":"screenshot","arguments":{"view":"iso"}}}
← {"jsonrpc":"2.0","id":8,"result":{"content":[{"type":"image","mimeType":"image/png","data":"iVBORw0…"},{"type":"text","text":"{\"source\":\"model\",…}"}]}}

crates/mcp/tests/workflow.rs runs this session on a part of the meshing corpus (tests/corpus/stepped-block) and checks the results only through MCP; crates/mcp/src/tests.rs sends malformed messages, huge parameters, paths outside the roots and unknown tools.

Units

FieldCraft stores every quantity in SI and converts only where a number crosses into or out of the program, through one table: crates/model/src/units/ (#579).

The rule

Store SI, convert only at boundaries through crates/model/src/units. The model, the result types and every solver work in metres, kilograms, seconds, newtons, pascals, kelvin and radians. A conversion factor written anywhere else is a bug, and cargo xtask unit-factors (part of cargo xtask ci) refuses one; see the end of this page.

The display system

Numbers are shown and typed in a display system: a preset with optional per-quantity overrides (fieldcraft_model::DisplaySystem).

PresetLengthMassTimeForceStressTemperature
mm-t-s-N-MPa (default)mmtsNMPa°C
m-kg-s-N-Pa (SI)mkgsNPaK
mm-kg-ms-kN-GPammkgmskNGPa°C
mm-g-ms-N-MPammgmsNMPa°C
in-lbf-s-psiinlbf·s²/inslbfpsi°F

Every other quantity’s unit follows from the preset (Quantity lists them; energy in mJ for mm-t-s, J for SI, …). Angles are radians in every preset; an override such as {"preset": "mm-t-s-N-MPa", "overrides": {"angle": "deg", "energy": "J"}} changes one quantity.

Which system applies, in order:

  1. the model’s own (model.units {system, overrides}, saved in the model as display_units),
  2. the user’s setting (Settings › General, prefs.json; ui.settings {set: {units}}),
  3. mm-t-s-N-MPa with °C.

A model migrated from format 2 keeps the system its file declared (unspecified displays as mm-t-s-N-MPa), so it shows the numbers it showed before. The defaults are pending the owner’s confirmation.

Boundaries: where conversion happens

  • Command parameters (crates/engine/src/units.rs): a bare number is in the display unit of its field’s quantity (the form schema knows it, schema::Dim); "210 GPa" or {"value": 210, "unit": "GPa"} carries its own unit. The parameters are converted field by field into the system the command works in (Frame): SI for the model and the solvers, millimetres for the geometry commands and the meshers. A value of the wrong dimension or an unknown unit is refused, naming the field. Numbers inside a JSON-valued field (a polygon, a block grid, a mesh plan object) are described by the field’s numbers and converted alike. Only Dim::Degree fields have a fixed unit.
  • The geometry frame: the geometry commands and the meshers work in millimetres, the unit SolidCraft designs are in and the meshers’ absolute floors were tuned for; the frame is internal. Their parameters, their replies (units::REPLIES, with a units map) and their messages (units::shown; the meshers’ errors keep their lengths, areas, volumes and points as data, fieldcraft_mesh::message, and EngineError::shown renders them at the command’s boundary) are in the display system like every other command’s: a datum, a mesh size or a tolerance typed as 1 in an inch display is an inch. A journal of a model from before SI storage (its header has model_units) built on a design or 3MF meshes typed the numbers of its geometry and mesher commands in millimetres whatever its system, as its stored datums, plans, seeds and size controls migrate: replay reads them in millimetres (without a design, in the declared unit), and a command typed into such a journal now is recorded with its units (Session::journal_reads).
  • Replies: each command’s dimensional reply fields are listed in units::REPLIES and converted into the display system, with a units map naming the unit of each. A fluid step’s steady-state monitor history follows its monitors, so solve.fluid converts it per monitor (velocity, temperature change, mass flow, force, heat, mean temperature) and names each one’s unit in stop.units.
  • Forms, panels, legends, probes, XY plots: the UI reads the model and results in SI and shows them through the display system (describe.rs, results.rs, results_panel.rs); an edit form is filled with the definition converted to the display system, so OK without a change gives back the same model.
  • Viewport: the scene is drawn in metres; a click that places something (a relax sphere, a node drag) writes the display units into the form. ui.camera’s distance and target and ui.worldToScreen’s points are in the display units.
  • Exports: CSV headers name their unit (fx [N]); VTU files carry a <!-- units: … --> comment and their values are in the display units; an STL file (which has no unit of its own) is in the display length, and mesh.export.stl replies with it.
  • Solver decks: written in one consistent system (deck.write {units}, default the display preset), stated in the header; Nastran gets PARAM,WTMASS,1.0, LS-DYNA *CONTROL_UNITS. Written in a model’s old system, a deck is byte-identical to before apart from the unit lines.
  • Files: .fieldcraft format 3 stores SI (see below).
  • SolidCraft’s own text (a feature’s rebuild error, the kernel’s boolean diagnostics, a feature’s stored definition) is passed on as SolidCraft wrote it, in the design’s units, and marked as SolidCraft’s (SolidCraft: …).
  • Geometry: SolidCraft designs and imported surfaces are in millimetres; their tessellations become metres where they meet the model (units::geometry_point), and the meshers run in millimetres inside the geometry frame (above). 3MF files are read in their declared unit through the table.

Fluid solver summaries

solve.fluid.max_speed is the maximum across stored frames; final_max_speed is the last frame’s maximum. Both use the display velocity unit, for CPU and GPU solves. max_speed_time is physical time in the display time unit, including ms in the millisecond presets.

To compare the final value with the viewport, open the original flow-past sample, run solve.fluid {"step":"Flow","backend":"gpu"}, select results.frame {"step":"Flow","frame":10}, and set results.contour {"step":"Flow","field":"velocity","range":"auto"}. Save existing work before opening the sample. Its 184,320-cell laminar bracket flow stores eleven physical-time frames over 16 seconds. In its default mm-t-s-N-MPa display, both speeds are in mm/s and the last-frame contour maximum matches final_max_speed. The all-frame peak can differ from it. This checks result reporting; it does not establish steady convergence or exchanger accuracy.

Where conversion never happens

The model (fieldcraft-model), the solvers (fieldcraft-solver, -fem, -explicit, -lbm, -lbm-gpu) and the result types never convert. Solver tolerances are relative (to the model’s size, the load, the stiffness) so a model in metres converges as it did in millimetres; the camera’s clipping and minimum sizes are relative or in metres (render::MIN_SIZE).

Relative is not enough where two dimensions meet in one norm. A nonlinear step’s convergence test measures each kind of freedom against its own scale (docs/manual/structural/nonlinear-static.md, Algorithm): residual forces against the largest force, residual moments against the largest moment (at least the force scale times the model’s size L), translations of a correction against the increment’s translation, rotations in radians against the increment’s rotation (at least the translation over L). One norm over newtons and newton-metres, or metres and radians, would change with the unit system and the part’s size, since a moment scales as a force times a length and a rotation not at all. The arc length of an arc-length step weighs rotations by L² for the same reason.

Exactness

A typed value is scaled on its shortest decimal form (units/decimal.rs): 3.97 mm is stored as the double nearest 0.00397 m and shown again as 3.97, for any value of up to 15 significant digits. Longer values (computed coordinates, results) are scaled by one correctly rounded operation by an exact power of ten. Offsets (°C, °F) are added in decimal: 20 °C is 293.15 K exactly, and an absolute °F, (F + 459.67) × 5/9, is worked out in decimal where the result is a short decimal (68 °F is 293.15 K). Factors that are not powers of ten (inch, pound) are applied in binary.

A command on the geometry runs on the model expressed in millimetres: the millimetre image of the stored metres, a function of the stored model alone. So a session, its undo, a saved and reopened model, a journal replay and a crash replay all give a mesher the same input, and the same result. The meshers alone (tet, hex, cells, mesh.plan.apply) give what FieldCraft 0.7 gave, and a stored model is unchanged by the move to SI. But a mesher-computed coordinate does not always survive mm → m → mm: 6–18% of them come back one ulp off. A relaxation of such a mesh (guarded or strong) amplifies that, as a 1-ulp nudge does on 0.7 itself: on the samples, relaxed nodes land up to about 2 mm from where 0.7 put them (the crank: 1.87 mm guarded, 1.09 mm strong). Results after a relaxation are not those of 0.7, bit for bit or to the micrometre.

Temperatures

Absolute temperatures are kelvin; a temperature difference (a film coefficient’s per-degree, an expansion coefficient) has no offset. Left out, an initial or reference temperature is 0 °C (273.15 K), and a plane-strain thickness 1 mm: the defaults of the default display system. The lattice-Boltzmann thermal solver runs its temperature lattice relative to the zero of the temperature unit the model is shown in (its own display units, else °C): 0 °C for the millimetre systems, 0 K for SI, 0 °F for in-lbf-s-psi. Its walls are not invariant under a shift of the temperature scale, and before SI storage it ran on the numbers as typed, so every model gives the results it gave.

The file format and old files

Format 3 (fieldcraft/3, docs/formats/fieldcraft.md) stores SI: model.json in SI, mesh.bin as MCMESH02 with coordinates in metres. migrate::step 2 → 3 (crates/io/src/migrate/v2_to_v3.rs) reads the declared units of the file and scales every dimensional field with its own frozen field → quantity map and its own copy of the MCMESH01 codec, so a later change to the model types cannot change how an old file migrates; a number it does not know is refused. Datums, mesh plans, seeds and size controls migrate from millimetres in a file built on a design or 3MF meshes (the notes below). The journal’s numbers are not rewritten: the step gives it a header naming the system they were typed in, and replay reads them through it, so replaying the journal gives the migrated model (but for the last bits of coordinates a mesher computed on another mesher’s mesh, above). Where such a journal’s commands left out a field whose format 2 default meant a number in that system (a reference temperature of 0, a plane-strain thickness of 1, a Johnson–Cook reference strain rate of 1, an initial temperature of 0), replay writes that default in, from a table frozen with the step (migrate::format_2_defaults). In a model built on a design or 3MF meshes the geometry and mesher commands’ numbers are read as millimetres, as they were then; one that acted on a block typed in another unit (beside a mesh of the design) cannot be replayed exactly and is refused, naming the block.

Notes on migrating older files:

  • An m-kg-s-N-Pa file’s temperatures are read as kelvin, the system’s own unit (the release that wrote it labelled them “°C or K”; its solvers depended only on differences, and its fluid solver’s heat lattice keeps counting from 0 K, as it did, through the domain’s temperature_zero). An in-lbf-s-psi file’s are °F, the millimetre systems’ °C.
  • A model that declared metres or inches but holds a mesh made from a SolidCraft design or a 3MF file: format 2 never scaled such a mesh, so its numbers are millimetres and the part solved was 1000× (25.4×) the design. Each body is migrated by its origin, traced through the journal: a mesh of the geometry from millimetres (so it overlays the design again and agrees with the datums, mesh plans, seeds and size controls), a block (mesh.block, tagged elements, and what was mirrored or extruded from them) from the declared unit, and a relaxation field with the mesh it was made on (its corners, else its bodies, else where it lies). A body the journal does not explain is read as the geometry’s, and the note says so. Opening such a file says so (in the open reply, the status line and the document’s migrated-from note): results will differ from the old ones. The first save keeps the old file beside the new one.
  • A node shared by a mesh of the geometry and a block typed in metres or inches (a block joined onto a face of the design’s mesh) has no consistent scale: such a file is refused, naming the bodies, and is not changed; it still opens in FieldCraft 0.7.x.
  • Datums, mesh plans, seeds and size controls were typed against the geometry: millimetres in a file built on a design or 3MF meshes, the declared unit in one that was not.

Literal factors

cargo xtask unit-factors (xtask/src/unit_factors.rs, a gate of cargo xtask ci) fails on a float literal equal to a common conversion factor (1e-3, 1e6, 1e-9, 1e12, 273.15, 459.67, 25.4, 0.0254, 9.80665, 9.81, 9810) written outside crates/model/src/units/. It reads the sources as syntax trees: comments, strings (help texts, WGSL) and test code (#[cfg(test)] and #[test] items, and the module files a #[cfg(test)] mod declares) are not code that converts.

What a number that looks like a factor must be instead:

  • A conversion goes through the table: DisplaySystem::to_si/express, Quantity::parse, or units::Typed, a constant written with its unit (Typed::new(1.0, "mm")) and converted where it is used. The plane-strain default thickness is Typed 1 mm; the display tessellation’s range is 1 µm–1 mm expressed in the geometry frame.
  • A tolerance or a cap is a named constant whose line carries the marker // unit-factors: <what it is>: relative (relative to the model's size), dimensionless (the sine of an angle, a component of a unit vector), or an absolute amount in SI with its unit stated (render::MIN_SIZE, 1 µm in metres, the scene's unit (SI)). An absolute amount in another system is a Typed. Bytes and wall-clock times for messages are marked as not model quantities.
  • A sample’s physical constant is written with its unit: "young": STEEL_YOUNG (210 GPa), "density": "1100 kg/m^3", sample::GRAVITY (9.81 m/s²). A script that computes with one converts it once into the samples’ mm-t-s system (sample::sample_value): the drop test’s speed √(2 g h) from 9810 mm/s².

The marker is the only exemption a line gets; one without a reason, or on a line without a factor, fails the check. One file is named in the checker with its reason: crates/io/src/migrate/v2_to_v3.rs, the frozen 2 → 3 step: it keeps its own copy of the old factors so a later change to the table cannot change how an old file migrates. Only this file is exempt, not the io crate.

The geometry frame (the geometry and mesher crates and the engine’s geometry and mesh commands, which work in millimetres) is checked like everything else: its tolerances are relative or dimensionless, and an absolute amount of it is a Typed in millimetres, taken in the frame through fieldcraft_model::units::geometry_amount (with MIN_GEOMETRY_LENGTH, the floor against a zero size), which the geometry, mesh and engine crates share.

Read an Abaqus input deck

deck.read imports flat model data and the linear analysis history emitted by the writer:

{"command":"deck.read","params":{"format":"abaqus","path":"part.inp","units":"mm-t-s-N-MPa"}}

Choose the input’s consistent unit system. A deck has no intrinsic units; FieldCraft does not infer them from its numbers, title or comments. Without units, the command uses the current display preset, ignoring individual display overrides. The reply states that preset. Coordinates, elastic moduli, density and section dimensions are converted through the central quantity table and stored in SI. The pure library abaqus::read defaults explicitly to SI; abaqus::read_in takes a chosen preset, and abaqus::read_limited also takes the caller’s node, element and set-member caps. abaqus::read_analysis_limited additionally imports the writer’s static, frequency and buckling steps with boundary conditions and concentrated loads; other history keywords stay in the unread report.

The file is read and its new model constructed before the current session changes. A read, syntax or validation error keeps the existing model, results, path, undo and unsaved work. History mapping problems are handled consistently: an unsupported or malformed history block stays unread with a line-numbered warning, and that step and later steps are not imported. The flat model data still succeeds unchanged when the base reader can read it; only lexical errors that the base reader rejects fail the whole read. An empty, heading-only or unknown-only file cannot replace the current project. Success replaces its mesh/definitions, clears old geometry/results/history/path, and leaves an unsaved model. Save it as a new .fieldcraft project. The command reply reports the counts of nodes, elements by kind, sets, materials, sections, steps, boundary conditions and loads alongside the unit preset, unread keywords and warnings.

In the desktop app, open Read Abaqus Deck from the command search or File commands, choose the path and consistent units, then confirm. The reader runs as a cancellable background job. Replacing unsaved work asks Save / Don’t Save / Cancel; an untouched imported model also needs saving even though its old command history has been cleared. The reply panel lists the unread keywords and their lines. A programmatic command never opens a dialog.

Reproduce an original import and solve

The reusable beam recipe starts a new document, constructs an original 80 x 10 x 10 mm steel beam (81 nodes, 32 hex8 elements with incompatible modes), clamps its root and applies a total 100 N downward tip force. It solves that source model, writes its own Abaqus deck, imports the model and its static history with explicit mm-t-s-N-MPa units, then solves the imported step. Its final project includes the newly solved results.

Run the built CLI from an empty work directory of your choice, using the recipe’s absolute path:

fieldcraft-cli run /absolute/path/to/Fieldcraft/tools/abaqus-import/beam.json

Outputs abaqus-beam.inp and abaqus-imported.fieldcraft are relative to that work directory; change their path fields to choose other locations. Neither generated output is source data. The same command list can be replayed through the app’s normal command interface. For an interactive demonstration, pause before deck.read, submit its path/units in Read Abaqus Deck, review the unread-history report, then continue the remaining commands. The recipe replaces the current document; save existing work before running it in a session you are using.

What is imported

  • NODE, with optional node set; labels and coordinates.
  • ELEMENT, with type, connectivity and optional element set. Long connectivity may continue.
  • NSET and ELSET: label lists, other set names and bounded GENERATE ranges. A node set may also name an element set. References resolve without changing their labels.
  • SURFACE, TYPE=ELEMENT: solid faces, shell sides and planar element edges, using an element label or element set.
  • MATERIAL, constant ELASTIC (isotropic or engineering constants) and constant DENSITY.
  • SOLID SECTION, SHELL SECTION and the writer’s BEAM SECTION profiles: rectangle, circle, pipe, centred symmetric I, and equal-thickness box. Thickness, rod area, shell offset/points and beam orientation are retained where representable.
  • The writer’s linear history: STEP with STATIC, FREQUENCY or BUCKLE, plus BOUNDARY and CLOAD. Boundary targets may be node labels or node sets; supported fixed, symmetry, displacement and concentrated force/moment forms are converted to the corresponding model objects.

The reader inverts the writer’s supported solid, shell, planar, beam and truss element types: tet4/tet10/wedge6/pyramid5/hex8/hex20; tri3/quad4/quad8 shells; plane stress, plane strain and axisymmetric triangles/quadrilaterals; B31 and B33 beams, the planar B21 (Timoshenko) and two-/three-node trusses. Encoded reduced, incompatible-mode and hybrid formulations are assigned to sections. A section mixing full and reduced hex elements is refused by name instead of being guessed or split.

Names are matched case-insensitively and retain their original spelling. Definitions differing only in case are refused. An NSET, ELSET and element SURFACE with the same exact name combine into one FieldCraft set holding nodes, elements and faces, as in the writer. Quoted identifiers must still fit FieldCraft’s name rule: a letter followed by letters, digits, _ or -, up to 64 ASCII characters. Unsupported quoted spaces/characters and longer names are refused rather than silently renamed. Mesh labels must fit 1..=99_999_999.

Comments and headings are ignored. Abaqus sections do not carry a semantic section name; the importer generates Section1, Section2, and so on. It does not recover names from comments. Canonical roundtrip tests compare the supported keyword/data definitions, mesh, physical section data, and supported linear history, not comment text or unsupported history. Some writer encodings cannot recover extra metadata: a reduced tet4, for example, is written as C3D4 without a separate integration marker.

Automatically generated sets, boundary conditions and loads are named InpAnalysisN. Input step names remain the step names, so *STEP, NAME=Bend creates a step named Bend; step names are case-insensitive and a name differing only by case from an earlier imported step leaves that step and all following history unread. Unnamed steps receive ImportedStepN, with the number chosen to avoid every explicit step name in the input (including names in later steps). The generated object names do not replace the step name. A named node-set target remains its own boundary condition or load object: rows for that target merge by type and component, while different targets remain separate and their common-node loads add in the model. Rows addressed by node labels still group nodes with equal written values or force/moment vectors. A node-label group reuses an input-named node set when its resolved membership exactly matches, otherwise it reuses another matching set or creates one; the canonical target spelling is retained in the load identity, so a node-label load and a set-targeted load remain separate even when they use the same set and vector. The same node-label definition is reused across later steps. A history row naming a set uses the node members listed by that set, even when an element set with the same name contributes extra resolved nodes; a name with only element members is not a node target.

For history state, OP=NEW clears a family once and all blocks in that family must use the same mode; multiple OP=NEW blocks therefore accumulate. Concentrated-load OP=MOD replaces only the same target spelling and DOF, while different target spellings add. A node and DOF may be held through several targets when every prescribed value is zero; introducing a non-zero value through a second target is unread. Reusing one target modifies it. A type-format boundary (ENCASTRE, PINNED or a symmetry label) and a direct-format boundary on the same target and degree of freedom are different definitions and require OP=NEW to change between them; a type-format change to another type also requires OP=NEW. A direct row on a different target is still governed only by node-overlap and value rules, because that constraint is the same and is also emitted by the writer. Static state carries forward, frequency and buckling perturbations do not. Frequency boundary magnitudes remain on the imported frequency step, but are treated as zero only while checking target overlap; the preceding and following static state keeps its original values. A buckling step after any general step remains unread, even when that step carried no load. A BUCKLE block without EIGENSOLVER is read when its data line holds only the number of modes: the format’s default solver for buckling is not Lanczos, but with that single field the request is the same. An explicitly named solver other than Lanczos stays unread.

Unread data and refusals

The reply lists unread keywords with their original one-based physical lines. unknown holds the first 100 records; unknown_count counts all of them. Read the warnings and this list before creating an analysis. No unknown text is stored in the model or re-emitted on export.

Unsupported history, contact, coupling and other model extensions are not imported. Every unsupported keyword inside a step stays reported, even if that keyword is supported at model level. A semantic history problem (unsupported mapping, missing target, duplicate/conflicting entry, or non-finite value) leaves that step and later steps unread with a line-numbered warning. An unsupported model-level boundary leaves all history unread. Nested, unmatched or truncated step scopes remain lexical errors. Node-based surfaces are reported as unread; they are not converted into element surfaces.

INCLUDE, parts, assemblies and instances are refused. Global SYSTEM records are refused because later Cartesian nodes could otherwise be misread in local coordinates. NODE, SYSTEM=R is accepted; cylindrical/spherical node coordinates are refused. Alternate input files, coordinate-system transforms, unsupported physical parameters and temperature-/field-dependent property tables are not silently interpreted as their default variants. A bare valued parameter such as TYPE is an error; GENERATE is a flag and must not have a value.

A model-level *TRANSFORM stays in the unread report. Concentrated loads and boundary conditions at its nodes are given in the nodes’ local system, which the reader does not convert. A step with a *BOUNDARY or *CLOAD row on one of those nodes is therefore left unread, with the steps after it; a model-level *BOUNDARY on one of them leaves all history unread, and so does a *TRANSFORM whose NSET is missing or cannot be resolved. Each case gives a line-numbered warning.

A model-level *BOUNDARY is accepted only before the first *STEP. If it appears after a successful step, that block and all following steps remain unread and no boundary is added to the model.

Recognized material behaviors keep the current MATERIAL context even when they are unread. This includes HYPERELASTIC, PLASTIC, RATE DEPENDENT, SPECIFIC HEAT, INELASTIC HEAT FRACTION, CONDUCTIVITY, EXPANSION, CREEP, VISCOELASTIC, DAMPING, DAMAGE INITIATION, DAMAGE EVOLUTION, DEPVAR and USER MATERIAL. Constant elasticity and density before or after them are imported into that material; every unread option is still reported with its line number. For example, a writer-generated hyperelastic material retains its density, but its hyperelastic law is unread and its stiffness is absent. Review and supply the intended material behavior before solving. No plastic, hyperelastic or thermal law is inferred.

Another model option or an unrecognized keyword ends material context. A later ELASTIC or DENSITY then needs a new MATERIAL definition, preventing association across unknown scopes. The rule follows the “Material data definition” chapter of the public Abaqus 2025 Materials Guide.

Element family/formulation is stored on sections, not on mesh elements. Sectionless elements therefore produce an explicit warning: the mesh can be inspected, but those physical semantics are not retained until compatible sections are assigned. T2D-only trusses without a planar continuum cannot retain the model’s required planar context and are refused. Mixing T3D trusses with a planar continuum is refused rather than silently imposing different constraints. The same holds for beams: B21 without a planar continuum and B31 with one are refused.

Supported records must remain finite and consistent: missing referenced labels/sets/materials, overlapping section assignments, invalid connectivity/faces and unrepresentable section shapes are refused with line numbers. This reader does not promise that an arbitrary imported mesh is ready to solve. Add the history that was left unread through normal commands, then run Check Model.

Information not recoverable from the deck

The writer expands a model Total force into a value at each node when it writes the deck. The reader therefore groups nodes by their written per-node values and does not infer that they came from one total load. Small floating-point spelling differences can create separate objects: the beam example’s one written load can read back as six loads because values such as -6.249999999999999 and -6.249999999999998 are distinct. They produce the same solve, but the reader preserves the values instead of guessing a total-load intent.

Bounds and automation

Files are checked against the session’s read roots and capped at 64 MiB. Nodes, elements and set and surface memberships are capped by the session’s import limits, the same ones the orphan-mesh import uses, so a host or test with a smaller budget is refused at once. Physical lines are capped at 256 bytes; logical keyword continuation, total record count, property-value collection, set expansion/work and nesting are bounded separately. A short malicious range cannot allocate an enormous set. History entries use the same global set-member and expansion-work cap; if one step would exceed the model’s definition limit, that step and later steps remain unread. Input must be UTF-8 with ASCII keyword/data records. The parser has no filesystem access and builds for wasm; browser files still pass through the existing host file store.

The format implementation is independently written from Dassault’s public keyword documentation and FieldCraft’s original writer/model mappings. Tests use original handwritten decks and FieldCraft-generated decks, never a commercial CAE program’s output or a vendor example model.

Format references

The syntax and supported options follow Dassault Systemes’ public documentation, cited by title and version: the “Input syntax rules” chapter of the Abaqus 2017 Analysis User’s Guide, and the *NODE, *ELEMENT, *NSET, *SURFACE, *ELASTIC and *SOLID SECTION entries of the Abaqus 2017 Keywords Reference Guide and its *BEAM SECTION entry in the 2025 edition.

The analysis history follows the *STEP, *STATIC, *FREQUENCY, *BUCKLE, *BOUNDARY, *CLOAD and *TRANSFORM entries of the Abaqus 6.11 Keywords Reference Manual and these sections of the Abaqus 6.11 Analysis User’s Manual:

RuleSource
Model data ends at the first *STEP; a model-level *BOUNDARY after it is not model data1.3.1 “Defining a model in Abaqus”
Step names and other labels are case-insensitive1.2.1 “Input syntax rules”
OP=MOD (default) modifies or adds; OP=NEW releases every definition of its kind; one step uses one OP per kind*BOUNDARY and *CLOAD entries; 32.3.1, “Removing boundary conditions”; 32.4.1, “Modifying loads”
A general step starts from the last general step; a perturbation step’s conditions and loads do not affect later steps6.1.2 “General and linear perturbation procedures”; 32.3.1, “Boundary condition propagation”; 32.4.1
Loads on one target in one step add; a later step redefines a load only through the same target spelling; a node loaded through a set and by its label receives the sum32.4.1, “Modifying loads”
A boundary condition is modified only through the target it was given on32.3.1, “Modifying boundary conditions”
A type-format and a direct-format condition on one degree of freedom conflict in model data32.3.1, “Using the type format”
Loads and boundary conditions at a transformed node are in its local system2.1.5 “Transformed coordinate systems”
*BUCKLE defaults to EIGENSOLVER=SUBSPACE; its data line starts with the number of eigenvalues; its base state is the end of the last general step*BUCKLE entry; 6.1.2

These rules are FieldCraft’s own conservative choices, not statements of the documentation:

  • A degree of freedom held at zero through several targets is read, because the writer emits it for a clamp and a symmetry plane that share nodes; a non-zero value through a second target stays unread.
  • The type-format and direct-format conflict, and a change from one boundary type to another, apply to history data too: changing between them needs OP=NEW.
  • A frequency step’s boundary magnitudes count as zero when checking target overlap.
  • A buckling step after any general step stays unread, with or without loads, because a FieldCraft buckling step has no preloaded base state.
  • A *BUCKLE without EIGENSOLVER is read only when its data line holds just the number of modes, where the subspace and Lanczos requests coincide.
  • An unnamed step is named ImportedStepN, avoiding every step name in the input.

Contact loading and unloading

Run the original command recipe in a fresh model:

cargo run -p fieldcraft-cli -- run docs/recipes/contact-load-unload.json

The same array can be passed as commands to the desktop control channel’s engine.script. Coordinates are in mm, forces in N and pressure in MPa, set by the recipe’s model.units command. The model has two touching 10 mm cubes, each one hex8 element. The entire lower cube is fixed; the upper cube’s lateral translations are held. Its top has a prescribed vertical displacement of -0.1 mm. Frictionless mortar contact joins the touching faces; both cubes have isotropic elasticity with E = 1000 MPa and Poisson ratio zero.

The two nonlinear static steps start independently:

  • Press ramps the prescribed displacement from zero to its full value. The four secondary nodes close, with pressure about 10 MPa. The small remaining penetration follows the unchanged default augmented-contact convergence criterion.
  • Cycle follows load factors 0 → 0.5 → -0.05 at step fractions 0, 0.5 and 1. The final upper displacement and open contact gap are 0.005 mm, with zero pressure. solve.history returns the accepted frames’ load factors, mean top displacement and reaction sum. At the fully unloaded state, a relative reaction-balance warning can report tiny absolute roundoff against zero load.

These are static equilibria, not a physical transient. The recipe finishes with the Cycle contact gap contour and a deformation scale of 1000 so the small opening is visible. Use scale 1 for the actual geometry; change the view without changing the solution through results.deformed.

This is a working contact workflow, not a naturally chattering case. The deterministic solver regression a_committed_contact_increment_does_not_carry_its_chatter_band_into_the_next separately seeds the existing temporary band state, exercises a failed retry and contact augmentations, commits the accepted increment, then checks the next predictor/Newton solve and a near-open finite-difference tangent. No production state-injection command is provided.

Path plots

After solving a solid step, open Results > Path Plot. Add reference-coordinate points by typing their coordinates or enabling Pick surface points and clicking the visible mesh. The editor keeps SI coordinates internally: changing display units does not round a pick. Picking a deformed or curved face maps the actual displayed triangle back to the element’s reference geometry. It does not snap to a nearby node.

Choose a nodal field and the number of equally spaced arc-length stations, then Sample path. Sampling runs in a cancellable background job. The chart retains the sampled step, field and frame or mode independently of the current contour. Hovering it marks the station in the viewport. Its overlay follows the viewport’s reference or deformed configuration; coordinates and distances in the query remain reference coordinates. Export CSV samples the draft through the same command and writes the result. Cancellation or an error preserves the preceding successful plot.

Commands and units

results.path works headlessly, through MCP and in the desktop control channel. Programmatic calls never open a picker. For example, on the built-in solved cantilever:

{"step":"Load","field":"stress_xx","points":[["20 mm","5 mm","20 mm"],["80 mm","5 mm","20 mm"]],"samples":101,"frame":null,"mode":null,"path":"top-fibre.csv"}

The points define a polyline with 2–1000 vertices; repeated vertices are allowed, but its total length must be positive. samples is 2–10000, default 101. Bare point coordinates use the session’s display length unit. Explicit unit strings avoid dependence on that setting. The reply carries distance, xyz, values, containing elements, units, field_title, frame, mode and configuration: "reference". Values and coordinates are converted once at the display boundary. Modal displacement fields retain the existing dimensionless normalisation rather than being labelled as a physical length.

The optional CSV has exactly distance,x,y,z,value as its header and uses the same numeric values as the reply, CRLF line endings and empty values at gaps. Units are supplied by the reply and the chart, rather than extra CSV columns. Writes respect the session’s file roots.

Interpolation and limits

Sampling uses the containing solid’s shape functions: tet4, tet10, wedge6, pyramid5, hex8 and hex20, including curved quadratic geometry. Shell, beam, rod and 2D elements in the same model are left out: a point is located in the solids only. The lowest element label wins on shared faces. This interpolates the existing nodal field; it does not recompute stresses at integration points or make a discontinuous stress field continuous. Numerical contact fields are available where their contributing nodal values are defined. Categorical contact_status is refused because fractional status codes would be misleading.

Proven outside points and undefined nodal contributions give null and visible chart gaps; no nearest-node extrapolation or gap bridging is used. An inverse search that cannot establish containment or exclusion within its work limit returns an error, rather than calling the point outside. A straight segment between two picks on a concave surface can leave the solid. Positive local Jacobian checks do not certify that an entire element is globally injective.

Stale results are refused. Omitted/null frame selects the final state; stored frames start at zero. Nonlinear stored frames give displacements, and stress and contact fields where the step saved them (a frame that did not is refused, never given the final state’s); temperature requires the final state. Heat flux is final-only; stored heat frames provide temperatures. Frequency results use mode from one (default one) and reject frames. Other procedures reject non-null modes. Fluid cell fields are outside this command’s scope.

The index is cached for an exact result and model definition. Construction is bounded by 500000 mesh elements, 2000000 result nodes, 96 MiB index storage and 14000000 basis/enclosure work units. A query separately permits 4000000 basis/enclosure work units, 2000000 BVH visits and 4096 candidate elements per station. Index construction and sampling check cancellation and report progress. Higher-order element bounds use conservative Bernstein enclosures, including outward rounding; a nodal bounding box alone is insufficient for curved elements.

Stress linearisation

Pressure-equipment design checks classify the stress through a wall into membrane, bending and peak parts along a stress classification line, following the stress-integration method of ASME BPVC Section VIII, Division 2, Annex 5-A. results.linearize does this on a solved linear static step, headlessly, through MCP and in the desktop control channel:

{"command": "results.linearize", "params": {"step": "Pressure", "from": [10, 0, 0.5], "to": [20, 0, 0.5], "points": 41}}

from and to are the two ends of the line, on the two surfaces of the wall, in undeformed reference coordinates (display length units). The line is sampled at points equally spaced stations (odd, 5 to 1001, default 41): each station takes the containing solid element’s own nodal stresses, extrapolated from its integration points and interpolated with its shape functions, so a jump at a material or thickness change is kept rather than averaged away. The integrals are evaluated with Simpson’s rule, which is exact for a cubic variation; the result converges as points are added.

What the reply holds

Every tensor is in the line’s local frame (frame) and lists its six components in the order components gives: xx, yy, zz, xy, xz, yz. The local x axis runs along the line (the through-thickness direction); z is the global axis least aligned with the line, Z preferred, made orthogonal to it; y completes the right-handed frame. A radial line in a horizontal plane therefore reports the hoop stress as yy and the axial stress as zz.

  • membrane: the mean of each component through the wall, (1/t) ∫₀ᵗ σ dx.
  • bending, at from and at to: the linear part with zero mean, (6/t²) ∫₀ᵗ σ (t/2 − x) dx, positive at from and negative at to. Following the annex, only the two normal stresses in the section (yy, zz) and the shear between them (yz) carry a bending part; the normal stress along the line (xx) and the shears on its planes (xy, xz) are membrane and peak only.
  • peak, at both ends: the total there less the membrane and the bending at that end.
  • total, at both ends: the sampled stress at the surfaces.
  • equivalent: the von Mises stresses of the membrane tensor, of membrane plus bending at both ends and of the total at both ends.
  • length, samples (each station’s distance from from and its stress), elements.

Allowable stresses are not judged: whether Pm or Pm + Pb meets an allowable depends on the design code edition and the material, which is the engineer’s call.

Refusals

The command refuses, by name and without changing anything: a stale result; a frequency, nonlinear static, explicit, heat or fluid step; axisymmetric and other 2D models (linearisation of axisymmetric sections, with the annex’s radius-dependent weighting, is a follow-up); coincident ends or a line shorter than 10⁻⁹ of the model’s size; an end or station outside the solid elements or across a gap (the first such point is named); an even number of points.

Verification

The oracle case tests/oracle/lame-cylinder-linearisation linearises Lamé’s thick-walled cylinder (a = 10, b = 20, p = 100, plane strain) from the bore to the outside and compares the hoop membrane (100), the hoop bending at the bore (45.48), the hoop peaks (21.18 and 12.15), the radial membrane (−33.33), the axial membrane (20) and the membrane von Mises stress (116.24) with the closed-form integrals of Lamé’s solution.

FieldCraft in the browser

apps/fieldcraft-web runs the desktop app’s interface (fieldcraft_ui_egui::ModelApp) in a web page through eframe’s web runner, drawing with WebGPU where the browser has it and WebGL2 otherwise. The engine, the meshers and the solvers are the same code, compiled to wasm32-unknown-unknown.

Live: https://tangency-labs.github.io/fieldcraft/app/, deployed with the documentation site from each release (a push to main, .github/workflows/pages.yml).

Run it locally

rustup target add wasm32-unknown-unknown
cargo install --locked trunk          # or a release binary from github.com/trunk-rs/trunk
cd apps/fieldcraft-web
trunk serve                           # http://127.0.0.1:8790, rebuilt on every change
trunk serve --release                 # as deployed (optimised, wasm-opt)
trunk build --release                 # the site in dist/web, as Pages gets it

Trunk fetches the matching wasm-bindgen and wasm-opt itself.

Address flags: ?sample (or ?sample=cantilever, ?sample=impact) opens a sample; ?webgl draws with WebGL2 even where WebGPU is available.

CI keeps the crate compiling for the browser: cargo xtask wasm (part of cargo xtask ci) checks fieldcraft-web with the library crates, and pages.yml builds the whole site with Trunk on every merge to develop that touches code, without deploying it.

What works

Everything that runs on a model: opening samples, opening SolidCraft designs and CAD files and importing triangle meshes, every mesher, materials, sections, steps, loads and boundary conditions, the implicit, explicit and lattice Boltzmann solvers, the results display (contours, deformed shape, probe, reaction sums), undo and redo, the command search, and writing Abaqus, Nastran and LS-DYNA decks. The solvers run on one thread in the browser; fieldcraft-parallel gives the same numbers for any thread count (docs/adr/0001), so results are the desktop’s.

The browser has no file system the app can reach, so files live in the page (fieldcraft_io::fs keeps them in memory) and the host services move them in and out:

DesktopBrowser
File › Open, a native pickerThe browser’s file picker; pick a model together with the design and meshes it refers to
Drag and dropDrop files on the page; drop a model together with its geometry files
Save, Save AsThe .fieldcraft file is downloaded (each save downloads it again)
Write DeckThe deck is downloaded
Autosave to the recovery folder, File › Recover…Autosaves are kept in the browser’s local storage; a page closed or crashed with unsaved changes offers them at the next visit (File › Recover…)
Leaving with unsaved changes asks firstThe browser’s “leave site?” prompt
Recent filesThis visit’s files only
Help › Check for Updates installs a new release (docs/updates.md)A new deployment shows Reload to update in the status bar

A .fieldcraft model refers to its design and meshes by path. Paths in the model’s own folder are stored relative to it, so picking or dropping the model with those files opens them again; a model whose geometry is elsewhere opens without it and says so in a message in the view.

What doesn’t

  • Long jobs block the page while they run. The browser build has no worker threads: a mesher or a solve started from its form shows its progress first, then runs on the page’s thread, and the page stops responding until it finishes (seconds for the samples, longer for large parts). Cancel does nothing once it runs. Worker threads need SharedArrayBuffer, which needs cross-origin isolation headers that GitHub Pages cannot send.
  • No control channel or MCP bridge: a page cannot listen on a socket. Agents use the desktop app or fieldcraft-cli mcp.
  • Autosave space is small: local storage holds a few megabytes per site, so the autosave of a large mesh may not fit; a message in the view then says so, and saving (a download) keeps the work.
  • Two tabs share one store: a tab offers the autosave of another FieldCraft tab that is still open as recoverable (recovering it opens a copy).
  • A lost GPU is not recovered: if the browser takes the graphics device away, reload the page (unsaved work is in the autosave).
  • Download size: about 26 MB of WebAssembly (10 MB compressed), loaded once per release.

Requirements

A current Chrome, Edge, Firefox or Safari with WebGPU or WebGL2 and graphics acceleration turned on. Without either the page says so instead of starting.

Updates

FieldCraft checks for new releases, verifies them and installs them itself, with your consent at each step. The code is crates/update (fieldcraft-update); the window’s side is crates/ui-egui/src/updates.rs, the desktop app’s apps/fieldcraft/src/update.rs.

Checking

The app asks the GitHub Releases API for the latest published release (GET https://api.github.com/repos/tangency-labs/fieldcraft/releases/latest; drafts and pre-releases are never offered, and a pre-release in that answer is refused) and compares its version with the running one (Semantic Versioning order). A nightly build also asks for the published nightlies (Nightly builds).

  • At start-up, at most once a day, when Check for updates automatically is on (the default). It is shown with the first run’s question and in Help › Settings… › Updates. Off means no request at all. A failed automatic check is silent (it goes to the log). Runs driven by automation (--control) and CI never check automatically.
  • Help › Check for Updates asks now, and says when FieldCraft is up to date or why the check failed.
  • Agents and scripts: the app.update.check command (in the app, and through MCP connected to it) and fieldcraft-cli update --check reply with current, latest, newer, url (the release page), published, signed and asset (the file this install would download; null when it cannot update itself). They only report.

The request carries the FieldCraft version in its User-Agent; GitHub sees the request’s IP address, as with any download. Nothing else is sent (privacy.md).

A newer release shows a notice in the status bar: FieldCraft 0.5.9 is available — What’s new · Install · Skip. What’s new opens the release page; Skip stops offering that version (Settings can offer it again).

Nightly builds

Each night develop has moved and passed CI’s nightly run (03:23 UTC), a nightly pre-release FieldCraft v<version> (nightly) is published as soon as that run finishes, with version <MAJOR.MINOR.PATCH>-nightly.<YYYYMMDD>.<run>.<attempt>; a night develop is red or has not moved has none (releasing.md has the details). The newest 7 nightlies are kept and older ones deleted. Nightlies are signed and notarized like releases (releasing.md says what signing them from develop costs), so a nightly install verifies and installs its updates as a release install does.

  • Opting in: download a nightly from the nightly pre-releases and install it as you would a release. The install’s own version decides what it is offered; there is no setting.
  • A nightly install (its version carries -nightly.) asks for the latest stable release and the releases list (GET …/releases, the newest first) and is offered the newest of the nightlies and the latest stable release. A nightly counts as the MAJOR.MINOR.PATCH it is numbered from or later (it is built from develop once that version is set there), so the stable release of that number is not offered to it, and the next stable release is.
  • A release install (stable or candidate) is never offered a nightly.
  • Leaving the nightlies: install a stable release by hand from its page; from then on the install is offered releases only.

A build knows its version from FIELDCRAFT_VERSION, which release.yml sets when it builds the packages (fieldcraft_update::VERSION); any other build uses the crate version.

Verifying

Every release carries SHA256SUMS.txt and, signed with the FieldCraft release key, SHA256SUMS.txt.minisig (Ed25519 in minisign’s format; the public key is built into the app, fieldcraft_update::PUBLIC_KEY, and printed in releasing.md). Installing:

  1. downloads the list and its signature, and refuses unless the signature is the release key’s;
  2. downloads the asset for this install and refuses unless its SHA-256 is the one the list gives;
  3. on macOS, refuses an app that fails codesign --verify --deep --strict, is not FieldCraft (io.github.tangencylabs.fieldcraft, or io.github.jyviko.fieldcraft up to 0.7.x), or is rejected by Gatekeeper (spctl) when the installed app is accepted.

A release without a signature cannot be installed from the app: Install opens its page instead. A development build (run from target/) checks but never installs.

Installing

Install downloads and verifies in the background, unpacks the release beside the installed copy (.fieldcraft-update-<version>, so the swap is a rename on one file system), then asks to restart. Restart Now saves or asks about unsaved changes first, as opening another model does; the window closes, the autosave is closed, the swap is made and the new version starts. Later installs when you quit. A failed swap puts the previous version back; a staging folder left behind is removed at the next start.

Installed asAssetSwap
FieldCraft.app (macOS, Apple silicon)fieldcraft-<v>-macos-aarch64.dmgthe bundle is replaced, then opened
fieldcraft-cli (macOS, Apple silicon)fieldcraft-cli-<v>-macos-aarch64.zipthe binary is replaced
A Windows folderfieldcraft-<v>-windows-x64.zipeach file is replaced (a running .exe is renamed away, never overwritten); the app restarts
An AppImagefieldcraft-<v>-linux-x86_64.AppImagethe file is replaced and started
A tar.gz folderfieldcraft-<v>-linux-x86_64.tar.gzthe folder is replaced; when its parent is not writable the app says so and links the download
.deb / .rpmfieldcraft_<v>_amd64.deb / fieldcraft-<v>.x86_64.rpmnever replaced by the app: the verified package is downloaded to the app’s data folder (updates/), and the app offers Open with Installer and the sudo apt install … / sudo dnf install … command
Flatpaknonenever replaced by the app: flatpak update installs new releases from the Flatpak repository

Help › Reinstall FieldCraft… downloads and verifies the running version again and swaps it in the same way, to repair a damaged install.

fieldcraft-cli update --install does the same from the command line for the install the CLI belongs to (the tar.gz folder or Windows folder it is in, or the macOS CLI binary), without restarting anything; for .deb/.rpm it prints the package manager command.

The web app

The browser build has no downloads to install: every half hour the page fetches its own address past the browser’s cache, and when the deployed page loads another build than the running one (Trunk names each build’s files by their content hash), the status bar offers Reload to update. Reloading with unsaved changes asks first, as closing the page does.

Testing

FIELDCRAFT_UPDATE_HOST replaces https://api.github.com with another server, and allows plain http for it. It is for tests against a local server only (fieldcraft_update::mock::Server, behind the crate’s mock feature, plays the Releases API); with it set, the app also checks automatically in automation runs, so the notice can be looked at:

FIELDCRAFT_UPDATE_HOST=http://127.0.0.1:8899 fieldcraft-cli update --check

The tests cover version order (a nightly against its release, candidates and other nightlies), which release a stable, candidate or nightly install is offered, a pre-release refused where the latest stable release belongs, the daily schedule and no request when checks are off, asset selection and the swap plan for every install kind, a checksum mismatch and a missing or foreign signature refused (without downloading the asset), archives that try to write outside their folder, undoing a failed swap, and the CLI against a local server. They never replace a running program.

Crash reports, the log file and Report a Bug

Privacy

No crash report, log line or model is uploaded automatically. Crash reports and the log stay on this computer (anonymous usage, if you agreed to share it, never carries them: see privacy.md). The only way they leave it is Help › Report a Bug (or Report It… after a crash), which opens a GitHub issue form in your browser; you read it there and submit it, or not.

Help › Crash Reports… lists every saved report (when, what, how many times), each with Report…, Copy Path and Delete, and Delete All (diagnostics.crash_reports, diagnostics.crash_reports.delete).

What a bug report carries:

Always (you can edit it)Only with Share my sessionOnly with Include the model file as well
the version and OS, what happened (the last error by default), for a crash its message, place and backtrace top; your home folder is shown as ~the commands that built the model (fieldcraft-session.json, replayable with fieldcraft-cli run); they can name your filesthe model (model.fieldcraft), which you attach yourself

The form shows exactly what will be filled in before you click Open GitHub Issue. GitHub refuses long new-issue links, so a session that does not fit goes out as a file instead: it is saved to bug-reports/<time>/ in the data folder below and copied to the clipboard, and the issue text says to attach or paste it. The model is always a file you attach.

Where things are

The app’s data folder holds recovery/, crashes/, logs/ and bug-reports/:

SystemFolder
macOS~/Library/Application Support/FieldCraft
Linux~/.local/share/fieldcraft (or $XDG_DATA_HOME/fieldcraft)
Windows%LOCALAPPDATA%\FieldCraft

Runs driven by automation (--control, or CI set) use fieldcraft-automation/ in the temporary folder instead, so test runs never reach your folders. FIELDCRAFT_CRASH_DIR moves the crash folder, FIELDCRAFT_RECOVERY_DIR the recovery folder. The browser build keeps no crash folder and logs to the browser console.

Solver diagnostics

A solve that fails, or stops before the end of its step, leaves a small record in the crash folder (kind: "solver_error", format: "fieldcraft-diagnostic/1"): when it does not converge, its system is singular, it goes unstable or diverges, an element fails, or its device (GPU) fails; and when a steady flow reaches its time cap without settling or an explicit step stops at its increment cap. A refusal of the request leaves none: a work cap such as max_dofs or max_cells, a parameter that is wrong, a feature not supported yet. Neither does a cancelled solve, nor a transient that reaches its end time.

A record holds the command and its parameters (up to 16 KiB), the model’s size, the step and the progress reached, the backend asked for and the one that ran, and, for a GPU solve, what its setup saw: the adapter, backend, driver, the limits that matter (storage buffers per stage, buffer sizes) and the devices and instances the process has opened (the fluid solver’s own; the viewport’s and the driver’s are not counted). What was not observed stays null. Home folders are shown as ~. No model, replay, log or backtrace is copied, and a record never brings up the “FieldCraft closed unexpectedly” question.

The same failure again counts in its record; at most five new records are written per process. Records share the crash folder’s limits (20 reports, 100 MB, 90 days) and are the first to go when it is over them, before any crash report. Writing a record never changes the solve’s outcome: its error stays the same error, and a stopped result gains the record’s path as diagnostic_report.

Help › Crash Reports, diagnostics.crash_reports and fieldcraft-cli crashes list them; diagnostics.crash_report reads one. The app, fieldcraft-cli run and fieldcraft-cli mcp record into the crash folder; the CLI prints the path of the record on stderr and the MCP reply of a failed command ends with it. A Session embedded in another program records nothing unless its host names a folder (Session::solver_diagnostics).

Headless workers

In a container or on a cloud instance, the crash folder goes with the machine. Set FIELDCRAFT_CRASH_DIR to a persistent folder before starting the CLI or the MCP server, and keep that folder as a job artifact:

FIELDCRAFT_CRASH_DIR=/work/fieldcraft-reports fieldcraft-cli run model.json

With confined file access (--automation-write-root), the folder must be inside the write root, or nothing is recorded.

The log file

logs/fieldcraft.log: one line per record, time LEVEL [pid] target: message. Past 2 MB it becomes fieldcraft.log.1 and a new one starts. Warnings and errors also go to the standard error stream.

Crash reports

crashes/<YYYYMMDD-HHMMSS>-<signature>/:

  • report.json ("format": "fieldcraft-crash/1"): kind (command_panic: a command hit an internal error, caught, the model left unchanged; recovered_panic: one caught inside a command; panic: an internal error outside commands; unclean_exit: the app ended without a clean exit — an abort, a stack overflow, a crash in a graphics driver, the process being killed outright (SIGKILL) — found at the next start), message, location, thread, backtrace, app, system, command, recent_commands (up to 32), last_activity (the last control request, such as control ui.capture), startup_phase ({step, ms}: the step a run that never drew its first frame died in), native (Windows: what the exception filter caught), base, count, first_seen, last_seen, notes; system.environment names the renderer, GPU and driver
  • model.fieldcraft: the model the replay starts from
  • replay.json: {"commands": [{command, params}, …]}
  • log.txt: the crashed run’s lines of the log
  • minidump.dmp (Windows, a crash in native code): open it with WinDbg or Visual Studio

Startup steps and native crashes

While the app gets up, the journal keeps the step it is in: the app’s own (window, app setup, viewport pipelines (shader compile), first frame, and running once a frame was presented) and egui-wgpu’s in between (graphics instance, window surface, adapter request, adapter chosen, when the renderer is recorded, device creation, egui renderer (shader compile), surface configure, first frame (present)). A run that dies before running is reported “during startup (device creation, 1.2 s after launch)”, so a graphics driver crash names its step.

On Windows an unhandled-exception filter (apps/fieldcraft/src/native_crash.rs) catches a crash in native code (an access violation in a graphics driver, a stack overflow): before the process goes it writes the exception code, the faulting module and the offset into it, and a minidump, next to the journal. The next start puts them into the report: “crashed with EXCEPTION_ACCESS_VIOLATION (0xC0000005) in igvk64.dll+0x64EA72 during startup (device creation…)”, backtrace the code, the module and offset, and the thread, native the raw fields, and minidump.dmp. After a stack overflow there is no stack left for a minidump; the rest is still written.

The next start after a crash asks “FieldCraft closed unexpectedly”: Report It… opens Report a Bug for that report.

For agents

FromListOne reportReplay
Command (MCP execute, control channel, scripts)diagnostics.crash_reportsdiagnostics.crash_report {id}
CLIfieldcraft-cli crashes [--json]fieldcraft-cli crashes show <id>fieldcraft-cli crashes replay <id>

crashes replay opens the report’s model, runs its commands (files they write can only go to a scratch folder) and says whether the same internal error happens again. crashes dir prints the folder, crashes clear [<id>] deletes reports. diagnostics.bug_report returns the draft (link, fields, attachments) without opening anything; over the control channel ui.start diagnostics.bug_report opens the form, ui.prompt {"answer": "set", …} sets its fields, and ui.inspect shows the draft. Only a click opens the browser.

Check that reporting works: with FIELDCRAFT_CRASH_TEST=1, diagnostics.crash_test {mode} crashes on purpose: panic, recovered or abort (reported at the next start).

A request to terminate is no crash: on Linux and macOS, SIGTERM (kill PID) and SIGINT (Ctrl-C) close the window as Close does (unsaved work is autosaved for recovery, the journal ends, no report). A second signal ends the app at once.

How it stays cheap and small

The app keeps a journal of the window’s top-level commands (crashes/sessions/*.jsonl, at most 512 KB, two small writes per command that changes the model, none for commands that only read), restarted from each autosave and each model opened. A clean exit deletes it; it is locked while its app runs, so a journal nobody holds belongs to an app that died. A crash is identified by its place and message, numbers ignored: repeats only raise count. At most 5 new reports per run, 20 reports, 100 MB, 90 days; a model over 20 MB is not copied. Tests, the CLI and the browser build never install the hook.

Adapted from SolidCraft’s crash reports (MIT OR Apache-2.0, see ATTRIBUTION.md).

Privacy and anonymous usage

FieldCraft can share anonymous usage with its developers: which tools are used, where people get stuck and how far they get from a design to results. It is off until you agree. The first time the app starts it asks once:

Help improve FieldCraft by sharing anonymous usage: which tools you use, nothing from your models.

Share Anonymous Usage turns it on, Don’t Share (or closing the question) leaves it off. Change it any time in Help › Settings… › Privacy, which also has Include scripts and AI agents (MCP): commands run by scripts, the control channel and AI agents are counted apart from yours (from), and this leaves them out.

Checking for updates is separate from usage sharing: at start-up, at most once a day (and from Help › Check for Updates), the desktop app asks GitHub for the latest release, which sends the request itself (FieldCraft’s version in the User-Agent; GitHub sees the IP address) and nothing else. Turn it off in Help › Settings… › Updates (or with the first run’s question): then no request is made (updates.md).

Crash reports and the log never leave your computer on their own; Help › Report a Bug sends only what you submit yourself (crash-reports.md).

Never sent

File names or paths, geometry, meshes, model contents, parameter values (sizes, materials, loads…), names you give things, error messages, or anything else you typed. The events below are built from FieldCraft’s own lists (its command ids, sample names and requirement names) and durations, so they cannot carry any of it; a test runs a scripted session and fails if a payload holds anything else.

When nothing is sent

  • until you agree, and after you turn it off (what was waiting is dropped);
  • in builds without an analytics key: everything built from source, development and fork builds. Only the release builds have one;
  • with FIELDCRAFT_TELEMETRY=0 (or false, off, no) in the environment;
  • in runs driven by automation (--control) and in CI (CI set), unless FIELDCRAFT_TELEMETRY=1 asks for it;
  • fieldcraft-cli and the MCP server never send anything themselves; the app counts the commands they send it.

Where it goes

PostHog Cloud, EU region (https://eu.i.posthog.com), a batch of events every 30 seconds and when the window closes, on a background thread (the web build uses fetch). A batch that cannot be sent (offline, a slow network) is dropped; at most 1000 events wait. Each event goes with $process_person_profile: false (no person profile is built) and $geoip_disable: true (no location is derived from the connection’s IP address). FIELDCRAFT_TELEMETRY_HOST sends to another host instead (to check what is sent against a local listener).

What is sent

Every event has these properties:

PropertyValue
distinct_ida random id made for this install when you agree (a UUID), kept in the preferences; nothing about the computer or you
app_versionFieldCraft’s version, 0.5.8
platformdesktop or web
osmacos, linux, windows, or web
archaarch64, x86_64, or wasm32
$process_person_profilefalse
$geoip_disabletrue

The events:

EventPropertiesWhen
app_started—the app starts with sharing on, or you turn it on
app_closedduration_s: seconds since app_startedthe window closes (the page is closed or left)
command_runcommand: the command’s id (mesh.tet.generate); kind: model or session; duration_ms; ok: whether it succeeded; error (when it failed): the class of the error, one of unknown_command, params, model, geometry, mesh, file, deck, solver, explicit, fluid, unavailable, internal; from: ui (a click, a form, a menu), palette (the command search), script (a script or the control channel) or mcp (an AI agent)a command ends; a command run by another (a script’s steps inside it) is not counted on its own
milestonename: design_opened (a design, mesh or model opened), meshed (a mesher made elements), solved (a solve finished), results_viewed (results shown)the first time in a run
sample_openedname: the sample’s name (cantilever)a sample opens
form_cancelledcommand: the form’s command ida command’s form closes without running it
unavailable_clickedcommand: the command id; missing: what the model lacks, by requirement name (material, step, …)a command is clicked before the model has what it needs

A command_run as sent:

{"event": "command_run", "distinct_id": "5f0c…-…", "properties": {"command": "solve.run", "kind": "model", "duration_ms": 412, "ok": true, "from": "ui", "app_version": "0.5.8", "platform": "desktop", "os": "macos", "arch": "aarch64", "$process_person_profile": false, "$geoip_disable": true}}

For developers

The events and the policy are fieldcraft_engine::usage; the consent question and the settings are crates/ui-egui/src/privacy.rs; the desktop sender is apps/fieldcraft/src/usage.rs, the web one apps/fieldcraft-web/src/usage.rs. The PostHog project key is the build-time variable FIELDCRAFT_POSTHOG_KEY, which the release workflow and the Pages build of main set from the release environment secret POSTHOG_KEY; it is an ingest-only key. A new event or property is added here first.

Solver manual

This manual describes every analysis FieldCraft solves with its own solvers: what each one computes, the equations and algorithms behind it, its parameters and output, how it is verified and where its limits are. Each page follows the same order: synopsis, parameters, theory, algorithm, output, verification, limitations, implementation and references.

Analyses

A step’s procedure decides which solver runs it. solve.run solves every step in order; each solve.* command solves one.

ProcedureCommandSolverPrecisionPage
staticsolve.staticSparse direct, crates/solverf64, CPULinear static
coupled_temperature_displacementsolve.staticSparse direct, crates/solverf64, CPUHeat transfer
frequencysolve.frequencyEigenvalue solver, crates/solverf64, CPUNatural frequencies
bucklesolve.buckleEigenvalue solver, crates/solverf64, CPULinear buckling
heat_transfersolve.heatSparse direct, crates/solverf64, CPUHeat transfer
nonlinear_staticsolve.nonlinearNewton iterations, crates/solverf64, CPUNonlinear static
explicit_dynamicsolve.explicitCentral differences, crates/explicitf64, CPUExplicit dynamics
fluidsolve.fluidLattice Boltzmann, crates/lbm, crates/lbm-gpuf64 on the CPU, f32 on the GPULattice Boltzmann flow

The structural pages that apply to several procedures: elements, materials, contact, constraints and connectors and linear solvers. The fluid pages: collision operators, boundary conditions, turbulence, large-eddy simulation, heat transfer, fans and vents, free surface, steady state and averaging, the GPU backend and fluid results.

Conventions

  • Units. The model, the solvers and their results are in SI. Command parameters, replies, forms and decks convert through the model’s display units (Units).
  • Determinism. The same model gives the same result bit for bit on every platform for the CPU solvers, whatever the thread count. The GPU backend is deterministic on a given device and is checked against the CPU within a stated tolerance.
  • Bounded work. Every iterative algorithm has explicit caps on iterations, increments and size, and reports when it stops early. A solve that cannot proceed returns an error that names the cause and leaves the model unchanged.
  • Verification. Every capability is checked three ways: against theory (closed-form solutions and patch tests), against experiments, and against published benchmarks. Once a result matches its reference within the stated tolerance it is frozen as a fixture, so a later change that moves it fails CI (Verification and validation, Oracle results).
  • Sources. Every method is implemented from the published papers each page cites, collected in the solver literature.

Linear static analysis

solve.static computes the small-displacement equilibrium K u = f of a static step: the displacements and rotations, the reactions at the prescribed degrees of freedom and coupled reference points, and the stresses at the integration points and averaged at the nodes. It serves solids, 2D continua, shells, beams, trusses and discrete elements in one mesh. Constraints and prescribed values are eliminated by transformation, the reduced system is ordered by nested dissection and solved by a supernodal sparse Cholesky factorization, deterministic on any number of threads.

Commandssolve.static (and solve.run); solve.probe, results.contour, results.reactions, results.export.vtu, results.export.csv
Step procedure{"type": "static"}; {"type": "coupled_temperature_displacement"} is solved by the same command (Heat transfer)
Solvercrates/solver (CPU, f64)
Methodisoparametric displacement elements (Zienkiewicz, Taylor & Zhu 2013; Hughes 2000); master–slave elimination of constraints (Cook et al. 2002, §9.2); nested dissection (George 1973); supernodal Cholesky (Ng & Peyton 1993)
Verified bypatch tests, cantilever-*, lame-cylinder*, kirsch-plate*, rotating-*, NAFEMS LE1, LE2, LE3, LE5, LE6, LE7, LE10, scordelis-lo-roof-*, pinched-cylinder, tie-patch, tube-torsion-coupling, pure-bending-coupling; crates/solver/tests/{verification,plane,structural,one_d,couplings,inclined_symmetry}.rs

Synopsis

[
  {"command": "model.boundary_condition.create", "params": {"name": "clamp", "type": "fixed", "target": {"set": "root"}}},
  {"command": "model.load.create", "params": {"name": "push", "type": "pressure", "set": "top", "magnitude": 2}},
  {"command": "model.step.create", "params": {"name": "Load", "procedure": {"type": "static"},
    "boundary_conditions": ["clamp"], "loads": ["push"]}},
  {"command": "solve.static", "params": {"step": "Load"}},
  {"command": "solve.probe", "params": {"step": "Load", "set": "top"}}
]

Parameters

solve.static

FieldValueDefaultMeaning
stepstep namethe only static or coupled stepthe step to solve; with several such steps and none named: “name the step: the model has … steps …”
max_dofs1 to 6 000 0006 000 000cap on the model’s unknowns; may only be lowered
max_factor_entries1 to 2 000 000 000400 000 000cap on the factor’s entries (8 bytes each); may be raised for one solve (Linear solvers)
threads1 to 256the session’s (FIELDCRAFT_THREADS or the cores)changes the time, never the result

The step

FieldValueDefaultMeaning
procedure{"type": "static"}—
boundary_conditionsnamesnoneactive in this step; nothing carries over between steps
loadsnamesnoneactive in this step
outputdisplacement, reaction_force, stress, strainallwhat the step requests

Boundary conditions and loads that act

DefinitionFormActs as
fixedtargetevery degree of freedom of the target held at zero
displacementtarget, values [u1, u2, u3, ur1, ur2, ur3] (null free)prescribed values; rotations of solid nodes do not exist and are ignored
symmetrytarget, plane x, y, z or {"normal"}an axis plane holds global degrees of freedom; an inclined plane is the linear constraint n · u = 0 (and the rotations about its in-plane axes at nodes with rotations)
force, momenttarget, vector, distribution total (default) or per_nodetotal: split by the faces’ consistent nodal weights (area-weighted) over a set with faces, equally over a set of nodes; a reference point takes it whole. A moment needs rotations: shell or beam nodes, or a coupled reference point; in a 2D model a moment is [0, 0, M] on beam nodes
tractionset, vectorforce per area on the set’s faces, consistent nodal forces
pressureset, magnitudeuniform, positive pushing in, consistent nodal forces on the faces (2D models: on element edges)
gravityacceleration, set (optional)ρ a on the set’s elements (or the whole model, point masses included)
body_forceset, vectorforce per volume
pipe_pressureset, internal, externaluniform pressures inside and around the set’s pipes (beams with a pipe profile that has a bore): Lamé’s wall stresses, and the axial force pair (1 − 2ν) A A_w per element of the closed-end force and the wall’s Poisson strain (Element library)
centrifugalangular_velocity, point, axis, set (optional)ρ ω² r away from the axis; solid and 2D elements only
temperaturetarget, valuethermal strain α (T − T_ref) of the target’s nodes (Heat transfer)

In a 2D model loads lie in the XY plane: surface loads act on element edges, forces are totals over the thickness (or the circumference, axisymmetric), and a vector with a Z component is an error. Heat loads (surface_flux, convection, heat_source) have no effect in a static step.

Initial fields

A model can carry named initial fields: a temperature or a stress (xx, yy, zz, xy, xz, yz) per node label, usually mapped from another analysis (a moulding, casting or thermal simulation, or another mesh of the part) to solve the warpage and stress after ejection. Static and coupled temperature–displacement steps start from them; other procedures leave them out with a warning.

  • An initial temperature T₀ is where thermal strain is measured from, ε_th = α (T − T₀) (nodes without one start at the material’s reference temperature), so a part cooled to a uniform temperature warps by its own temperature field.
  • An initial stress σ₀ adds to the stress, σ = D (ε − ε_th) + σ₀, and loads the solid elements with −∫ Bᵀ σ₀ dV (Solid::initial_stress_load): whatever part of it the supports do not hold is released into deformation; a self-equilibrated σ₀ held by the supports moves nothing.

model.initial_field.map fills a field from a solved step (a heat transfer step’s frame or a coupled step’s temperatures, a static step’s stresses) of this model or of another .fieldcraft file on another mesh. fieldcraft_fem::transfer::Locator finds the source’s solid element holding each target node by a bucket grid and Newton’s method on the isoparametric map, and interpolates by that element’s shape functions (consistent interpolation; de Boer, van Zuijlen & Bijl 2007), which reproduces uniform and linear fields exactly on any two meshes. A node outside the source by at most the tolerance (a quarter of the source’s mean element size by default) takes the value at the closest point; nodes farther out get none and are counted in the reply. model.initial_field.delete removes a field.

Theory

The principle of virtual work with the isoparametric elements of the Element library gives K u = f, K = Σₑ ∫ Bᵀ D B dV assembled over the elements, f the consistent loads (∫ Nᵀ t dA for tractions and pressures, ∫ Nᵀ b dV for body forces and gravity, ∫ Bᵀ D ε_th dV for thermal strain).

Constraints. Every degree of freedom is free, prescribed (a boundary condition), dependent (a coupling, tie or inclined symmetry plane), or inactive (a reference point direction no coupling ties). The constraint rows are eliminated one at a time in a fixed order (boundary conditions, then couplings by name, nodes by label), each dependent unknown chosen as the row’s intended one or else the largest coefficient (Abel & Shephard 1979), until every unknown is a combination of the free ones q and the prescribed values u_p:

u = T_f q + T_p u_p
(T_fᵀ K T_f) q = T_fᵀ (f − K T_p u_p)
r = T_pᵀ (K u − f)

No penalty numbers and no Lagrange multipliers enter, so the reduced matrix stays symmetric positive definite; without couplings T_f is the identity on the free unknowns. A redundant row is dropped when the prescribed values satisfy it and refused as contradictory otherwise. The coupling, tie and spring formulations are in Constraints and connectors.

Stress recovery. Each element evaluates σ = D (ε − ε_th) at its integration points and extrapolates to its nodes with its linear corner functions fitted by least squares (mid-side nodes take the mean of their edge’s corners; Hinton & Campbell 1974). The nodal stress is the plain average over the elements sharing the node; a shell contributes its top surface (the side its normal points to). The von Mises stress is that of the averaged tensor.

Algorithm

  1. Select and check. The step named, or the only static or coupled step. A model with contact is refused: “contact (name) in linear static steps: a model’s contacts apply to all its steps, so solve its nonlinear static or explicit dynamic steps, or remove the contacts to solve this one”.
  2. Mesh (system::Mesh::new): sections to elements with their D and formulation, trusses, shells, beams, point masses, springs; refused section kinds and formulations are named. More than max_dofs unknowns: “the model has N degrees of freedom; the limit is M”.
  3. Temperatures. A coupled step solves its steady heat conduction first; a static step takes its temperature loads (nodes they do not reach stay at their material’s reference temperature).
  4. Pattern and order. The node graph of all elements; the nested dissection order of its nodes (Linear solvers); reference point equations follow the mesh nodes.
  5. Reduction. Symmetry, coupling and tie rows and the prescribed values build the transformation; its memory is checked against the factor budget before it is allocated. Every unknown prescribed: “every degree of freedom is prescribed; there is nothing to solve”.
  6. Loads and assembly. f from the step’s loads (and the thermal loads); K assembled in rounds of 4096 elements in parallel, added in label order.
  7. Factor and solve. K_ff = T_fᵀ K T_f is factored by Cholesky against max_factor_entries; a pivot at or below 10⁻¹⁰ of its diagonal is reported as “the stiffness is singular at node N in direction: the model can move without straining (missing or insufficient boundary conditions, a part not connected to the rest, or a reference point direction nothing holds)”. A non-finite solution is refused as ill-conditioned.
  8. Recover. Reactions, element stresses (in parallel, collected in label order), shell section forces and stresses, beam end forces with their body-force loads, nodal averages.
  9. Balance. The applied and reaction totals per direction (the forces of springs to the ground included); a difference above 10⁻⁶ of the largest load or reaction is a warning naming it.

Every step is bounded: the work is fixed by the model size, and the only caps are max_dofs and max_factor_entries.

Output

The reply (in the display units):

KeyMeaning
step, dofs, equations, factor_entriesthe step, its unknowns, the free ones solved for, the factor’s entries
max_displacement{node, value}: the largest displacement magnitude
max_von_mises{node, value}: the largest nodal von Mises stress
applied_total, reaction_totalforce sums along X, Y, Z (moments excluded); a component below 10⁻⁹ of the sum of the terms’ magnitudes is set to 0
reference_pointsper coupled reference point: name, label, displacement (3 translations, 3 rotations), reaction (forces, moments)
max_temperaturecoupled steps: {node, value}
warningswhat was ignored or left out (dashpots, plasticity, shells under temperature, balance)

The stored result has per node (label order) the displacement, rotation (zero at solid and truss nodes), reaction, reaction moment, averaged stress (xx, yy, zz, xy, xz, yz) and von Mises stress; per element the integration-point and nodal stresses; per shell section forces and surface stresses; per beam end forces. solve.probe reads them at nodes (nodes, set or the nearest nodes to points at) with the principal stresses, and with elements per element. results.contour draws displacement, displacement_x/y/z, von_mises, max/mid/min_principal and stress_xx … stress_yz; results.reactions sums reaction forces and moments over sets about a point; results.export.vtu writes displacement, rotation, reaction, stress and von Mises for ParaView.

Worked example

The bracket-hex sample: the filleted steel L-bracket meshed all-hex in 30 mapped blocks, clamped at the end of its upright and loaded with 1 kN at the end of its foot. It shows a linear static solve with its reply, a probe at the loaded end, the stress peak and the balance of loads and reactions.

Geometrytests/corpus/filleted-bracket-blocks: 8 mm thick L-bracket, foot 60 mm along x, upright 50 mm along y, 40 mm along z, R6 fillet, an 8 mm hole through each leg; 30 cells
Meshmesh.hex.blocks, hex20 of 3 mm: 5 778 elements, 27 708 nodes, all valid, scaled Jacobian min 0.705, mean 0.940 (mesh.quality)
Materialsteel: E = 210 GPa, ν = 0.3, ρ = 7 850 kg/m³
Boundary conditionsClamp: set top (the upright’s end face in every cell that has it) fixed
LoadPush: force [0, −1000, 0] N, total, on set tip (the foot’s end face)
StepLoad, static
Unitsmm, t, s, N, MPa
[
  {"command": "file.sample", "params": {"name": "bracket-hex"}},
  {"command": "solve.static", "params": {"step": "Load"}},
  {"command": "solve.probe", "params": {"step": "Load", "at": [[60, 4, 20]]}},
  {"command": "solve.probe", "params": {"step": "Load", "nodes": [428]}},
  {"command": "results.reactions", "params": {"step": "Load"}},
  {"command": "results.deformed", "params": {"step": "Load", "show": true, "scale": "auto"}},
  {"command": "results.contour", "params": {"step": "Load", "field": "von_mises"}}
]

Results from the solve.static reply, solve.probe and results.reactions. The solve took 6.1 to 11.3 s wall time on 14 threads in separate runs (Apple M4 Max, CPU, with other jobs running on the machine). The reference deflection is the 48 016-element tet10 solution of the unpartitioned part held by the_hex_bracket_bends_like_the_fine_tet_solution (crates/engine/src/sample.rs, from crates/testkit/tests/bracket_blocks.rs).

QuantityFieldCraftReferenceDifference
dofs, equations83 124, 82 065
factor_entries91 826 205
u_y at the foot’s end, node 27196 at (60, 4, 20)−0.5086 mm (u_x −0.1698 mm)−0.5093 mm−0.13 %
max_displacement0.5511 mm, node 27053
max_von_mises295.10 MPa, node 428 (σ_yy 290.7 MPa, σ₁ 296.1 MPa)
applied_total y−999.999999999999 N
reaction_total y999.999999981553 N1 000 N1.8 × 10⁻¹¹
Reaction moment about the origin, set top(−20 000.0, 0.0, 60 000.0) N·mm−(r × F) of the load at x = 60, z = 20: (−20 000, 0, 60 000) N·mm< 10⁻¹⁰

What to look at. The deformed shape (scale 15.9) bends both legs about the fillet. The stress runs round the fillet and peaks at the edge of the upright’s hole, 295 MPa, where the hole interrupts the upright’s bending stress; the peak is a nodal average of the elements’ stresses extrapolated from their integration points. The reactions at the clamp carry the whole 1 kN and its moment about the origin to rounding, the balance check of step 9 of the algorithm, and the probe at the foot’s end lies within 0.13 % of the fine tet10 solution.

Verification

CaseReferenceErrorToleranceTest
Patch test, every solid and 2D elementtheory< 10⁻¹² (3D), < 10⁻¹⁵ (2D)exactpatch-*, patch_test_every_element, patch_test_every_element_and_theory
Uniaxial tension by pressure, distorted block, every solidtheoryσxx = p, balance to 10⁻⁹exactuniaxial_tension_by_pressure
Gravity and body force totalstheory: ρ g V10⁻⁹exactgravity_and_body_force_totals
Cantilever, Timoshenko deflectiontheoryhex20 0.013 %, hex8 incompatible 0.16 %, tet10 0.018 %; reactions < 10⁻⁴ %0.5 %cantilever-hex20, cantilever-hex8-incompatible, cantilever-tet10
Cantilever convergence: hex8, tet4, wedge6theorymonotone, rate > 1.5; < 4 %, 12 %, 4 % at 40 × 8 × 8as statedcantilever_tip_deflection_and_convergence (heavy)
Lamé thick cylinder, plane strain (3D quarter, 2D plane strain, axisymmetric)theoryu_r ≤ 0.00042 %, σ_θ −0.18 % to −0.41 %, σ_z +0.42 %0.1 %, 1 %lame-cylinder, lame-cylinder-plane-strain, lame-cylinder-axisymmetric
Kirsch plate, K_t = 3 at the holetheory+0.40 % (3D), +0.096 % (plane stress)2 %kirsch-plate, kirsch-plate-plane-stress
Rotating disc (plane stress) and cylinder (axisymmetric)theory≤ 0.2 %1 %rotating-disc-plane-stress, rotating-cylinder-axisymmetric
NAFEMS LE1 elliptic membranebenchmark+0.18 % (hex20 layer), −0.056 % (plane stress)1 %nafems-le1, nafems-le1-plane-stress
NAFEMS LE10 thick platebenchmark+0.86 %2 %nafems-le10
NAFEMS LE5 Z-section cantileverbenchmark−1.35 %2 %nafems-le5
NAFEMS LE7 axisymmetric cylinder/spherebenchmark−2.23 % against the thin-shell target (known failure: no axisymmetric shell); +0.05 % against the converged solid1 %nafems-le7
NAFEMS LE2, LE3, LE6; Scordelis–Lo; pinched cylinder (shells)benchmarksee Element library
Scordelis–Lo roof with solidsbenchmark0.33 %2 %scordelis-lo-roof-solid
Tie patch test, non-matching meshestheory< 10⁻⁴ %10⁻⁹ rel.tie-patch
Tube torsion through a kinematic couplingtheoryrotation 0.0006 %, shear stress 0.29 %0.5 %, 1 %tube-torsion-coupling
Pure bending through a distributing couplingtheorystress < 10⁻⁴ %; rotation < 10⁻⁴ % (the coupling is the L2 fit over the end face’s element faces, Zienkiewicz, Taylor & Zhu 2013, §6.6)0.5 %, 1 %pure-bending-coupling
Uniform tension through a distributing coupling on the end facetheorydisplacement and stress < 10⁻⁴ %10⁻⁸ rel.tension-coupling
Inclined symmetry plane against the axis-aligned image and the whole parttheory (frame indifference)displacements < 10⁻⁹, stresses < 10⁻⁸; balance < 10⁻⁸as statedcrates/solver/tests/inclined_symmetry.rs
Filleted bracket, peak fillet stress (mesh-converged reference)theory (convergence study)within 3 % (fine), 5 % (coarse); reaction exact3 %, 5 %filleted-bracket-fillet-stress, -coarse
A buckling preload equals the static solution, 1 and 3 threadsdeterminismbit for bitexactbuckling_preloads_match_static_with_loads_motion_and_temperature
Field transfer of uniform and linear fields, tet4, tet10, wedge6, pyramid5, hex8, hex20theory< 10⁻¹²exactcrates/fem/src/transfer.rs tests
Initial stress held by the supports; linear residual stress and linear initial temperature released in a free beam (w″ = 2 s / (E H), w″ = α g)theory (Timoshenko & Goodier §150)< 10⁻⁸10⁻⁸crates/solver/tests/initial.rs, initial-temperature-beam, initial-stress-beam
Linear temperature and uniform stress mapped from hex20 onto tet10 of other divisions, then heldtheory10⁻⁹ K, 10⁻⁷ rel.; solved stress 10⁻⁶ rel.as statedcmd::initial::tests
Errors and capssingular model names a node; max_dofs, max_factor_entries refuse with the byte estimate——errors_name_the_problem

Limitations

  • Small displacements and linear elasticity: plasticity, damage and erosion are left out with a warning; hyperelastic materials take their small-strain linear limit. For large deformation, plasticity or contact use Nonlinear static.
  • Contact is refused; ties are linear constraints.
  • Shells and beams take no thermal strain (a warning says so); centrifugal loads on trusses, shells, beams and point masses are refused.
  • Dashpots are ignored with a warning.
  • A rotation boundary condition on a solid node has no effect (solid nodes have no rotations).
  • Couplings and shells are refused in 2D models.
  • Initial fields: mapped from static, heat transfer and coupled steps only, onto and from solid elements only (an initial stress in 2D or hybrid elements is refused, shells, beams and trusses leave it out with a warning); they are keyed by node label, so a remeshed part needs them mapped again. The deck writers refuse them by name.
  • tet10 integrates the initial-stress load −∫ Bᵀ σ₀ dV only approximately once σ₀ varies more than linearly across an element: its four-point rule is exact to degree 2, and the integrand is cubic for a quadratic σ₀. A self-equilibrated σ₀ then gives a spurious load. In crates/solver/tests/initial.rs, σ_xx = s (1 − 12 ζ²) through a beam held at its ends (the exact solution moves nothing) moves a tet10 mesh of 8 × 2 × 2 cells by 3·10⁻³ of s L / E and changes the stress by 0.7 % of s (the reactions still balance), where hex8 and hex20, whose product rules integrate this load exactly on undistorted elements, give zero to rounding. The error falls with the mesh size (16 × 4 × 4 cells: 2.3·10⁻⁴ and 0.18 %); where a residual stress varies sharply, use hex20 or a finer tet10 mesh.

Implementation

FileContents
crates/engine/src/cmd/solve.rsSTATIC spec, run_static, limits, FACTOR_ENTRY_CEILING, solve.probe
crates/solver/src/analysis.rssolve_static, static_on, assemble, pattern, reduction, factor_error, StaticResult
crates/solver/src/system.rsMesh::new, loads, prescribed, temperature_loads, add_thermal_loads, inelastic_warnings, BALANCE_TOLERANCE
crates/solver/src/constraints.rsReduction, coupling_rows, symmetry_rows
crates/solver/src/tie.rs, discrete.rstie rows; point masses, springs
crates/solver/src/sparse.rs, ordering.rs, cholesky.rsassembly, ordering, factorization (Linear solvers)
crates/fem/src/element.rs, face.rselement kernels, stress extrapolation, pressure loads

References

  • O. C. Zienkiewicz, R. L. Taylor, J. Z. Zhu. The Finite Element Method: Its Basis and Fundamentals, 7th ed. Butterworth-Heinemann, 2013.
  • T. J. R. Hughes. The Finite Element Method. Dover, 2000.
  • R. D. Cook, D. S. Malkus, M. E. Plesha, R. J. Witt. Concepts and Applications of Finite Element Analysis, 4th ed. Wiley, 2002.
  • J. F. Abel, M. S. Shephard. An algorithm for multipoint constraints in finite element analysis. IJNME 14(3):464–467, 1979.
  • E. Hinton, J. S. Campbell. Local and global smoothing of discontinuous finite element functions using a least squares method. IJNME 8(3):461–480, 1974.
  • A. George. Nested dissection of a regular finite element mesh. SIAM J. Numer. Anal. 10(2):345–363, 1973.
  • E. Ng, B. W. Peyton. Block sparse Cholesky algorithms on advanced uniprocessor computers. SIAM J. Sci. Comput. 14(5):1034–1056, 1993.
  • NAFEMS. The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990.
  • R. H. MacNeal, R. L. Harder. A proposed standard set of problems to test finite element accuracy. Finite Elements in Analysis and Design 1(1):3–20, 1985.
  • S. P. Timoshenko, J. N. Goodier. Theory of Elasticity, 3rd ed. McGraw-Hill, 1970.

Natural frequencies

solve.frequency computes the lowest natural frequencies and mode shapes of a structure, K φ = ω² M φ, with every boundary condition of the step held at zero, together with each mode’s participation factors and effective masses. The eigenproblem is solved by the shifted block Lanczos method on the spectral transformation (K − σM)⁻¹M, with full reorthogonalization, on the sparse Cholesky factor of the shifted stiffness. A structure that is free (or partly free) gets a small negative shift automatically, so its rigid-body modes come out at zero frequency.

Commandssolve.frequency (and solve.run); solve.probe (mode), results.modes, results.animate, results.export.vtu
Step procedure{"type": "frequency", "modes", "min_hz", "max_hz"}
Solvercrates/solver (CPU, f64)
Methodspectral transformation Lanczos (Ericsson & Ruhe 1980), shifted block Lanczos (Grimes, Lewis & Simon 1994), full reorthogonalization (Parlett 1998, ch. 13), dense tridiagonal QR (Golub & Van Loan 2013, §8.3)
Verified bycantilever-frequencies, free-beam-frequencies, nafems-fv32; cantilever_natural_frequencies, free_free_beam_has_six_rigid_body_modes, simply_supported_plate_deflection_and_frequency, cantilever_beam_frequencies, crates/solver/tests/one_d.rs, eigen::tests

Synopsis

[
  {"command": "model.step.create", "params": {"name": "Modes",
    "procedure": {"type": "frequency", "modes": 10, "max_hz": 500}, "boundary_conditions": ["clamp"]}},
  {"command": "solve.frequency", "params": {"step": "Modes", "mass": "consistent"}},
  {"command": "solve.probe", "params": {"step": "Modes", "mode": 1, "set": "tip"}}
]

Parameters

The step

FieldValueDefaultMeaning
modes1 to 100 000—the number of modes to extract (lowest first, within the range)
min_hz≥ 0nonelower bound of the range, cycles per time unit
max_hz≥ 0, above min_hznoneupper bound of the range
boundary_conditionsnamesnoneheld at zero in the eigenproblem; prescribed values are ignored
loadsnamesnoneno effect

solve.frequency

FieldValueDefaultMeaning
stepstep namethe only frequency step
massconsistent, lumpedconsistentthe mass matrix
shiftfinite, eigenvalue units (rad per time unit)²0 for a supported structure, −10⁻⁶ Σ K_ii / Σ M_ii for a free onethe spectral shift σ; it must lie below every eigenvalue of the free equations
max_dofs1 to 6 000 0006 000 000may only be lowered
max_factor_entries1 to 2 000 000 000400 000 000factor entries; also bounds the Lanczos basis (Linear solvers)
max_iterations1 to 30003000cap on the Lanczos vectors (iterations × block size); may only be lowered
threads1 to 256the session’schanges the time, never the result

Every element with mass needs a density in its material (“element N has no density” otherwise).

Theory

The undamped free vibration of the discretised structure is the generalized symmetric eigenproblem

K φ = λ M φ,   λ = ω²,   f = √λ / 2π

with K the stiffness of the element library and M its mass: consistent (M = ∫ ρ Nᵀ N dV on each element’s mass rule; shells and beams with their rotary inertia) or lumped (the diagonal scaling of Hinton, Rock & Zienkiewicz 1976: each element’s consistent diagonal scaled to its mass). Point masses and rotary inertia add the same terms to both. Springs add stiffness; dashpots are ignored with a warning.

Spectral transformation (Ericsson & Ruhe 1980). With a shift σ below the wanted eigenvalues, the operator

(K − σM)⁻¹ M,   θ = 1 / (λ − σ)

is symmetric in the M inner product, and the lowest λ become its largest, well separated θ. Block Lanczos (Grimes, Lewis & Simon 1994) builds an M-orthonormal basis Q block by block, W = (K − σM)⁻¹ M Q_j, A_j = Q_jᵀ M W, and projects the operator onto the block tridiagonal T with diagonal blocks A_j and off-diagonal blocks B_j. A block of six vectors finds eigenvalues repeated up to six times, such as the six rigid-body modes of a free body. Every new block is orthogonalised against all earlier ones and itself, twice, by classical Gram–Schmidt in the M inner product (full reorthogonalization; Parlett 1998, ch. 13), so no spurious copies appear. The eigenpairs (θ, s) of T come from Householder reduction to tridiagonal form and the implicit symmetric QR algorithm with Wilkinson shifts (Golub & Van Loan 2013, algorithms 8.3.1 and 8.3.3). A Ritz pair has converged when its residual bound ‖B_{j+1} s_last‖ ≤ 10⁻⁹ θ, s_last the last block of the Ritz vector.

Participation. For a mass-normalised mode (φᵀ M φ = 1) the participation factor along direction d is Γ_d = φᵀ M r_d, r_d the unit translation along d on the free equations (mesh and reference point translations), and the effective mass is Γ_d². The rigid translations of a free body carry the whole mass as effective mass.

Algorithm

  1. Select and check. The step named, or the only frequency step; a non-finite shift is refused; a model with contact is refused.
  2. Mesh and reduction. As for linear static, with every prescribed value held at zero. Every unknown held: “every degree of freedom is held; there is nothing to vibrate”. The reduction’s memory is budgeted for two matrices.
  3. Assemble K and M on the same node pattern; the total mass is the sum of the translation–translation mass entries divided by the number of translation directions (3, or 2 in a 2D model); rotary inertia and translation–rotation coupling are left out of it.
  4. Factor. With shift given, K − σM is factored by Cholesky. Without one, K is factored; if it is not positive definite, σ = −10⁻⁶ Σ diag K / Σ diag M is taken, K − σM factored, and the warning “the structure is not fully supported; rigid-body modes appear at (near) zero frequency” added.
  5. Lanczos. The basis may hold at most min(max_iterations, max_factor_entries / (2 n)) vectors (n the free equations), and at least min(6, n). The start block is pseudo-random from a fixed seed (xorshift64*), so results are reproducible. Each block’s six solves run in parallel. A vector that vanishes under orthogonalization is replaced by a fresh random direction (up to four attempts).
  6. Convergence check on a schedule, since the dense eigenproblem costs m³: first at max(modes + 6, 12) vectors, then every max(m/4, 6) more. Ritz values are taken in decreasing θ (increasing λ) until one has not converged; values below min_hz are skipped; the iteration stops when modes values have converged or one passes max_hz.
  7. Stop. When the basis reaches its cap before that: “found k of N modes after m Lanczos vectors (the cap); raise the iteration limit or ask for fewer modes”. When the basis spans every free equation, the converged modes are returned; fewer than modes without a max_hz gives the warning “found k of the N modes asked for”.
  8. Modes. Ritz vectors expanded to every node; frequency √max(λ, 0)/2π; participation and effective mass.

Output

KeyMeaning
step, dofs, equationsthe step, its unknowns, the free ones
lanczos_vectorsthe basis size used
total_massthe model’s mass
modesper mode: mode (from 1), frequency (cycles per display time unit; 0 for a rigid-body mode), eigenvalue λ = ω², effective_mass [x, y, z]
warningsfree structure, modes not found, ignored dashpots

The stored result has each mode’s mass-normalised shape per node (translations, and rotations at shell, beam and reference point nodes) and its participation factors. solve.probe with mode gives the shape at nodes; results.modes shows a mode and lists every frequency; results.animate swings it; results.export.vtu writes mode_shape with the mode, frequency and eigenvalue.

Worked example

A slender steel cantilever of square section, clamped at one end: its first eight modes against Euler–Bernoulli beam theory. The square section gives every bending frequency twice (bending in y and in z), and the block Lanczos iteration returns each pair together.

Geometry200 mm along x, 10 × 10 mm section; one block (mesh.block), face root at x = 0
Mesh80 hex20 (20 × 2 × 2), 621 nodes, 1 863 unknowns (1 800 free)
Materialsteel: E = 210 000 MPa, ν = 0.3, ρ = 7.85 × 10⁻⁹ t/mm³
Boundary conditionsroot fixed
Stepfrequency, modes 8; solve.frequency with the default consistent mass
Unitsmm, t, s, N, MPa
[
  {"command": "model.units", "params": {"system": "mm-t-s-N-MPa"}},
  {"command": "mesh.block", "params": {"body": "Beam", "kind": "hex20",
    "corners": [[0,0,0],[200,0,0],[200,10,0],[0,10,0],[0,0,10],[200,0,10],[200,10,10],[0,10,10]],
    "divisions": [20, 2, 2], "faces": {"6": "root", "4": "tip"}}},
  {"command": "model.set.create", "params": {"name": "all", "geometry": [{"body": "Beam"}]}},
  {"command": "model.set.create", "params": {"name": "root", "geometry": [{"body": "Beam", "face": "root"}]}},
  {"command": "model.material.create", "params": {"name": "Steel",
    "elastic": {"type": "isotropic", "young": 210000, "poisson": 0.3}, "density": 7.85e-9}},
  {"command": "model.section.create", "params": {"name": "Beam", "set": "all", "material": "Steel", "kind": {"type": "solid"}}},
  {"command": "model.boundary_condition.create", "params": {"name": "Clamp", "type": "fixed", "target": {"set": "root"}}},
  {"command": "model.step.create", "params": {"name": "Modes",
    "procedure": {"type": "frequency", "modes": 8}, "boundary_conditions": ["Clamp"]}},
  {"command": "solve.frequency", "params": {"step": "Modes"}},
  {"command": "results.modes", "params": {"step": "Modes", "mode": 1}},
  {"command": "results.contour", "params": {"step": "Modes", "field": "displacement"}},
  {"command": "results.deformed", "params": {"step": "Modes", "show": true, "scale": 0.4}}
]

Results from the solve.frequency reply (54 Lanczos vectors, 0.1 s, Apple M4 Max, CPU). The references: bending f = (βₙL)² / (2π L²) · √(E I / ρ A) with βₙL = 1.8751, 4.6941, 7.8548; torsion f = (1/4L) · √(G J / ρ I_p) with J = 0.1406 a⁴ for the square (Timoshenko & Goodier 1970, §109) and I_p = a⁴/6; axial f = (1/4L) · √(E/ρ).

ModeShapeFieldCraft (Hz)Reference (Hz)Difference
1, 2first bending, y and z209.515, 209.515208.879+0.30 %
3, 4second bending1 298.345, 1 298.3451 309.023−0.82 %
5, 6third bending3 572.927, 3 572.9273 665.303−2.52 %
7first torsion3 717.7343 682.701+0.95 %
8first axial6 480.3226 465.243+0.23 %
QuantityFieldCraftReferenceDifference
total_mass1.570 × 10⁻⁴ tρ A L = 1.570 × 10⁻⁴ t< 10⁻¹²
Effective mass, modes 1, 3, 5 (in their direction) / total mass0.611, 0.184, 0.0650.613, 0.188, 0.065 (Euler–Bernoulli mode shapes)−0.3 %, −2.4 %, −0.1 %
Effective mass, mode 8 (x) / total mass0.8098/π² = 0.811 (axial bar)−0.2 %

With ν = 0 the same mesh gives f₁ = 208.549 Hz (−0.16 %, the value of the cantilever-frequencies case): at ν = 0.3 the fixed root face also holds the section’s Poisson contraction, which stiffens the first mode by 0.46 %.

What to look at. The first two frequencies agree to nine digits, and their effective masses lie along y and z: one bending pair, as K and M have the section’s symmetry. The second bending mode has its node at 0.78 L, where the beam crosses its undeformed axis. The bending frequencies fall below Euler–Bernoulli as the mode number rises (−0.8 %, −2.5 %): at L/a = 20 shear deformation and rotary inertia, which the solid elements carry and the Euler–Bernoulli beam omits, lower the higher modes. The mode shapes are mass-normalised (φᵀ M φ = 1), so their amplitude has no physical size; the pictures use deformation scales of 0.4 and 0.15.

Verification

CaseReferenceErrorToleranceTest
Cantilever, first and second bending frequencies, hex20theory (Euler–Bernoulli, Timoshenko, Young & Weaver 1974, §5.3)−0.16 % (both first modes), −1.08 % (second)1 %, 2 %cantilever-frequencies
Free–free beam: six rigid-body modes and the first bending mode; total masstheoryrigid modes ≈ 0; −0.80 %; mass < 10⁻⁴ %1.5 %, 10⁻¹²free-beam-frequencies
NAFEMS FV32 tapered membrane, six modes (hex20 layer)benchmark≤ 0.0036 %1 %nafems-fv32
Cantilever, hex20 consistent and lumped, tet10theoryfirst pair < 1 %, second pair < 3 %; mass exactas statedcantilever_natural_frequencies
Free–free beamtheoryrigid modes < 10⁻³ f₁; bending < 1.5 %; effective mass of the rigid translations = total mass to 10⁻⁶as statedfree_free_beam_has_six_rigid_body_modes
Simply supported plate (MITC4, MITC3), first frequencytheory (Navier)< 1 % at 16 × 16 cells1 %simply_supported_plate_deflection_and_frequency
Slender pipe cantilever, beam elements, three modestheory (Euler–Bernoulli)< 5·10⁻⁴ consistent, < 5·10⁻³ lumped; mass to 10⁻¹²as statedcantilever_beam_frequencies
Spring–mass, skew springs, two-mass chain, bar with a tip mass, torsional pendulumtheory10⁻¹² to 10⁻⁸as statedcrates/solver/tests/one_d.rs
2D total mass (area × thickness, Pappus) and three in-plane rigid modestheory10⁻¹²exactmasses_and_rigid_modes
Repeated and zero eigenvalues; dense symmetric eigenproblemtheory——eigen::tests::lanczos_finds_repeated_and_zero_eigenvalues, dense_symmetric_eigen
Two runs of the same modeldeterminismidenticalexactresults_are_deterministic

Limitations

  • Undamped, real modes only; no damping, no complex eigenvalues, no prestressed (stress-stiffened) frequencies.
  • shift is factored by Cholesky: a shift above the lowest eigenvalue makes K − σM indefinite and the solve stops with the singular-matrix error naming a degree of freedom.
  • Contact is refused; dashpots are ignored.
  • Rotary inertia and translation–rotation mass coupling are not part of total_mass.

Implementation

FileContents
crates/engine/src/cmd/solve.rsFREQUENCY spec, run_frequency
crates/solver/src/analysis.rssolve_frequency, FrequencyOptions, MassKind, Mode, FrequencyResult, BLOCK, lanczos_basis, RIGID_SHIFT, TOLERANCE
crates/solver/src/eigen.rssymmetric_eigen, lanczos, Operator, Wanted, the xorshift64* generator
crates/fem/src/element.rs, shell.rs, beam.rs, truss.rsconsistent and lumped element masses
crates/solver/src/discrete.rspoint masses and rotary inertia

References

  • T. Ericsson, A. Ruhe. The spectral transformation Lanczos method for the numerical solution of large sparse generalized symmetric eigenvalue problems. Math. Comp. 35(152):1251–1268, 1980.
  • R. G. Grimes, J. G. Lewis, H. D. Simon. A shifted block Lanczos algorithm for solving sparse symmetric generalized eigenproblems. SIAM J. Matrix Anal. Appl. 15(1):228–272, 1994.
  • B. N. Parlett. The Symmetric Eigenvalue Problem. SIAM, 1998.
  • G. H. Golub, C. F. Van Loan. Matrix Computations, 4th ed. Johns Hopkins, 2013.
  • S. Vigna. An experimental exploration of Marsaglia’s xorshift generators, scrambled. ACM TOMS 42(4), 2016.
  • E. Hinton, T. Rock, O. C. Zienkiewicz. A note on mass lumping and related processes in the finite element method. Earthquake Eng. Struct. Dyn. 4(3):245–249, 1976.
  • S. Timoshenko, D. H. Young, W. Weaver. Vibration Problems in Engineering, 4th ed. Wiley, 1974.
  • S. P. Timoshenko, J. N. Goodier. Theory of Elasticity, 3rd ed. McGraw-Hill, 1970.
  • NAFEMS. The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990.

Linear buckling

solve.buckle computes the load factors λ at which the loads of a step, applied as a linear preload, make the structure lose stiffness, (K + λ K_σ) φ = 0, and the buckling mode shapes φ. The step is solved as a linear static step first; the preload’s stresses form the initial-stress stiffness K_σ of every solid and 2D element; the lowest positive load factors, or those above a given shift, come from the block Lanczos method in the buckling spectral transformations.

Commandssolve.buckle (and solve.run); solve.probe (mode), results.modes
Step procedure{"type": "buckle", "modes", "shift"}
Solvercrates/solver (CPU, f64): Cholesky without a shift, LDLᵀ with one
Methodlinearised buckling (Bathe 2014, §6.8.2); buckling transformations of the shifted block Lanczos method (Grimes, Lewis & Simon 1994, §3)
Verified bybuckle-euler-cantilever, buckle-euler-pinned, buckle-plate-square; crates/solver/tests/buckle.rs, analysis::tests

Synopsis

[
  {"command": "model.load.create", "params": {"name": "press", "type": "pressure", "set": "top", "magnitude": 1}},
  {"command": "model.step.create", "params": {"name": "Buckle", "procedure": {"type": "buckle", "modes": 4},
    "boundary_conditions": ["base"], "loads": ["press"]}},
  {"command": "solve.buckle", "params": {"step": "Buckle"}}
]

The first load_factor in the reply times the applied loads is the critical load.

Parameters

The step

FieldValueDefaultMeaning
modes1 to 100 000—the number of load factors and modes
shiftfinitenonewithout it, the lowest positive load factors; with it, those nearest above it (a negative shift sets no lower bound)
boundary_conditionsnamesnonetheir prescribed values act in the preload; held at zero in the eigenproblem
loadsnamesnonethe preload; temperature loads strain it thermally

solve.buckle

FieldValueDefaultMeaning
stepstep namethe only buckling step
max_dofs1 to 6 000 0006 000 000may only be lowered
max_factor_entries1 to 2 000 000 000400 000 000factor entries, also bounding the Lanczos basis (Linear solvers)
max_iterations1 to 30003000cap on the Lanczos vectors; may only be lowered
threads1 to 256the session’schanges the time, never the result

Theory

A preload state of stress σ⁰ from loads P stiffens or softens the structure through the initial-stress (geometric) stiffness; scaling the loads by λ scales it, and the structure buckles where the total tangent becomes singular (Bathe 2014, §6.8.2):

(K + λ K_σ) φ = 0,   K_σ = ∫ (∇N_a · σ⁰ ∇N_b) I dV

K_σ is formed from the preload’s stresses at each element’s stiffness integration points (Solid::geometric_stiffness, Plane::geometric_stiffness, with the axisymmetric hoop term). Pressures are dead loads: the load stiffness of a follower pressure is not part of K_σ.

K is positive definite for a supported structure, while K_σ is indefinite. The eigenproblem is solved in the K inner product (Grimes, Lewis & Simon 1994, §3):

  • Without a shift, the operator K⁻¹(−K_σ) has eigenvalues θ = 1/λ: the lowest positive load factors are its largest positive θ, well separated, and K is factored by Cholesky. Converged negative θ are the load factors of the reversed load, reported apart.
  • With a shift σ ≠ 0, the buckling spectral transformation (K + σ K_σ)⁻¹ K has θ = λ/(λ − σ), largest for the load factors nearest above σ. K + σ K_σ is indefinite once σ passes the first load factor and is factored by LDLᵀ, whose inertia (Sylvester’s law) counts the load factors between 0 and σ, so none is missed silently. Each solve with it is refined iteratively against K + σ K_σ (at most two steps; Higham 2002, §12.2).

Modes are scaled to a largest component of 1 (positive).

Algorithm

  1. Select and check. The step named, or the only buckling step; modes 1 to 100 000 and a finite shift are checked; a model with contact is refused. Trusses, shells and beams are refused by name (“their initial-stress stiffness is not implemented”).
  2. Preload. The step solved as a linear static step on the same mesh: its loads, prescribed motions and temperature loads (heat loads have no effect, with a warning); its warnings carry over.
  3. Matrices. K assembled as for static; K_σ assembled from the preload’s integration-point stresses, element by element in parallel, added in label order. Both reduced with every boundary condition held at zero. Every unknown held: “every degree of freedom is held; there is nothing to buckle”. A K_σ that is zero: “step name puts no stress into the model, so nothing can buckle (give it loads)”.
  4. Factor. Without a shift, K by Cholesky (an unsupported structure is the located singular-stiffness error). With a shift, K + σ K_σ by LDLᵀ; a singular one is “the shift σ is a buckling load factor (K + σ K_σ is singular); move it a little”; a nonzero count of negative pivots adds the warning “N buckling load factor(s) lie between 0 and the shift σ; the modes returned are those above it”.
  5. Lanczos as for natural frequencies: block size 6, full reorthogonalization, relative residual 10⁻⁹, the basis capped by max_iterations and by max_factor_entries / (2 n). Without a shift, positive θ give the load factors and the converged negative θ the reversed-load factors; with a positive shift the load factors returned are those above σ.
  6. Modes. Each scaled to a largest component of 1 and expanded to every node. Fewer than modes found: “found k of the N buckling modes asked for”. A negative load factor found: “the reversed load buckles too: negative load factor λ (and k more found)”.

Output

KeyMeaning
step, dofs, equations, lanczos_vectorsas for frequency steps
modesper mode: mode (from 1), load_factor λ
bucklingnegative: converged negative load factors, nearest to zero first (without a shift only); shift and below_shift (the count of load factors between 0 and the shift) with a shift
warningsthe preload’s warnings and those above

The result is a buckling result (BucklingResult): its modes’ eigenvalues are load factors (frequency and participation zero); solve.probe with mode gives the shape, and the modes display like frequency modes. results.export.vtu writes mode_shape with the mode and its load_factor, dimensionless (no unit conversion, no frequency or eigenvalue).

A buckling mode can seed a geometric imperfection of a nonlinear static step: "imperfection": {"step": "Buckle", "mode": 1, "scale": 0.01} solves this step first and adds the mode, scaled to a largest component of scale, to the node coordinates; the step is solved and reported on that geometry, with a warning naming the mode (Nonlinear static).

Decks. Abaqus writes a buckling step as *BUCKLE, EIGENSOLVER=LANCZOS, and refuses one after a general step (Abaqus would buckle from that step’s loaded state) and one with a shift; Nastran SOL 105 and LS-DYNA refuse it by name. Abaqus and LS-DYNA decks refuse an imperfection by name (their imperfection reads a results file).

Worked example

A steel column of square section, clamped at its base and free at its top, under an axial end force: Euler’s clamped–free column, whose critical load is π² E I / (4 L²). The square section buckles equally in its two planes, so each load factor comes as a pair.

Geometry200 mm along z, 10 × 10 mm section; one block (mesh.block), faces base (z = 0) and top (z = 200)
Mesh80 hex20 (2 × 2 × 20), 621 nodes, 1 863 unknowns (1 800 free)
Materialsteel: E = 210 000 MPa, ν = 0.3
Boundary conditionsbase fixed
Load1 000 N along −z on top (force, the total spread by area)
Stepbuckle, modes 4, no shift
Unitsmm, t, s, N, MPa
[
  {"command": "model.units", "params": {"system": "mm-t-s-N-MPa"}},
  {"command": "mesh.block", "params": {"body": "Column", "kind": "hex20",
    "corners": [[0,0,0],[10,0,0],[10,10,0],[0,10,0],[0,0,200],[10,0,200],[10,10,200],[0,10,200]],
    "divisions": [2, 2, 20], "faces": {"1": "base", "2": "top"}}},
  {"command": "model.set.create", "params": {"name": "all", "geometry": [{"body": "Column"}]}},
  {"command": "model.set.create", "params": {"name": "base", "geometry": [{"body": "Column", "face": "base"}]}},
  {"command": "model.set.create", "params": {"name": "top", "geometry": [{"body": "Column", "face": "top"}]}},
  {"command": "model.material.create", "params": {"name": "Steel", "elastic": {"type": "isotropic", "young": 210000, "poisson": 0.3}}},
  {"command": "model.section.create", "params": {"name": "Column", "set": "all", "material": "Steel", "kind": {"type": "solid"}}},
  {"command": "model.boundary_condition.create", "params": {"name": "Clamp", "type": "fixed", "target": {"set": "base"}}},
  {"command": "model.load.create", "params": {"name": "Press", "type": "force", "target": {"set": "top"}, "vector": [0, 0, -1000]}},
  {"command": "model.step.create", "params": {"name": "Buckle",
    "procedure": {"type": "buckle", "modes": 4}, "boundary_conditions": ["Clamp"], "loads": ["Press"]}},
  {"command": "solve.buckle", "params": {"step": "Buckle"}},
  {"command": "results.modes", "params": {"step": "Buckle", "mode": 1}},
  {"command": "results.contour", "params": {"step": "Buckle", "field": "displacement"}},
  {"command": "results.deformed", "params": {"step": "Buckle", "show": true, "scale": 40}}
]

Results from the solve.buckle reply (54 Lanczos vectors, under 0.05 s, Apple M4 Max, CPU); the critical load is the load factor times 1 000 N. P_e = π² E I / (4 L²) is Euler’s load, and P = P_e / (1 + P_e/(κ G A)) with κ = 5/6 adds Engesser’s shear correction (Timoshenko & Gere 1961, §2.1, §2.17); the second buckling load of the clamped–free column is 9 P_e.

QuantityFieldCraftReferenceDifference
Load factors 1, 210.8270043, 10.8270043—equal to 2 · 10⁻¹⁰
First critical load10 827.0 NP_e = 10 794.9 N; with shear 10 777.6 N+0.30 %; +0.46 %
Second critical load (load factors 3, 4: 95.9133, 95.9133)95 913.3 N9 P_e with shear: 95 771.5 N+0.15 %
buckling.negativenonenone (a compressive load)—
First critical load, ν = 0 (same mesh)10 776.7 Nwith shear: 10 781.6 N−0.05 %

What to look at. The first mode is the quarter sine wave of Euler’s column, zero slope at the clamp and the largest sway at the free top; the mode is scaled to a largest component of 1 and drawn 40 times. The two first load factors agree to ten digits: the square section has no preferred plane, and the block Lanczos iteration finds the repeated pair together. The critical load sits 0.46 % above the shear-corrected Euler load at ν = 0.3 and 0.05 % below it at ν = 0: the fixed base face also holds the section’s Poisson expansion under the preload, which stiffens the column slightly. The verification case buckle-euler-cantilever uses ν = 0.

Verification

CaseReferenceErrorToleranceTest
Clamped–free column, hex20 2 × 2 × 10, unit end pressuretheory: Euler with Engesser’s shear correction P = P_e/(1 + P_e/(κ G A)), κ = 5/6 (Timoshenko & Gere 1961, §2.1, §2.17), σ_cr = 2.046071−0.181 %0.5 %buckle-euler-cantilever
Pinned column (half, symmetry at midspan)theory, as above−0.179 %0.5 %buckle-euler-pinned
Simply supported square plate in uniaxial compression, quarter of 10 × 10 × 2 hex20, b/t = 100theory: Bryan, σ_cr = 4π²E/(12(1 − ν²)) (t/b)² = 0.361524 (Timoshenko & Gere 1961, §9.2)−0.386 %1 %buckle-plate-square
Euler columns; the square section’s two planes; mode scalingtheory< 0.5 %; second load factor equal to the first to 10⁻⁶; largest component 1 to 10⁻¹²as statedeuler_columns
Shift between the first and higher modesthe unshifted solutionbelow_shift = 2; the first mode above the shift equals the unshifted third to 10⁻⁷exact counteuler_columns
Imperfection from the first mode under half the buckling loadtheory: added deflection δ₀ α/(1 − α) (Timoshenko & Gere 1961, §1.12)2.8 %5 %an_imperfection_from_the_buckling_mode
Preload equals the static solution with loads, prescribed motion and temperature, on 1 and 3 threadsstatic solvebit for bitexactbuckling_preloads_match_static_with_loads_motion_and_temperature
Refusals: no load, unsupported model, invalid modes and shift; caps and cancellation—located errors—buckling_steps_refuse_what_they_cannot_do, buckling_preload_keeps_limits_and_cancellation

Limitations

  • Trusses, shells and beams are refused: they have no initial-stress stiffness yet.
  • Linearised buckling about the undeformed state: the preload is linear, pressures are dead loads (no load stiffness), and material nonlinearity is left out (plastic materials take their elastic constants, with a warning).
  • Contact is refused.
  • Negative load factors are reported, not returned as modes, and only without a shift.

Implementation

FileContents
crates/engine/src/cmd/solve.rsBUCKLE spec, run_buckle
crates/solver/src/buckle.rssolve_buckle, the Plain and Shifted operators, Buckling, BucklingResult
crates/solver/src/analysis.rsstatic_on (the preload), assemble, reduction, factor_symmetric, lanczos_basis
crates/solver/src/eigen.rslanczos with the operator’s operand and eigenvalue
crates/solver/src/ldlt.rsSymmetric, Kind, inertia, solve_refined
crates/fem/src/finite.rs, plane.rsgeometric_stiffness of solids and 2D elements

References

  • K.-J. Bathe. Finite Element Procedures, 2nd ed., 2014.
  • R. G. Grimes, J. G. Lewis, H. D. Simon. A shifted block Lanczos algorithm for solving sparse symmetric generalized eigenproblems. SIAM J. Matrix Anal. Appl. 15(1):228–272, 1994.
  • S. P. Timoshenko, J. M. Gere. Theory of Elastic Stability, 2nd ed. McGraw-Hill, 1961.
  • G. H. Bryan. Proc. London Math. Soc. 22:54–67, 1891.
  • N. J. Higham. Accuracy and Stability of Numerical Algorithms, 2nd ed. SIAM, 2002.

Heat transfer and thermal stress

solve.heat computes steady or transient heat conduction in solid elements: temperatures, heat flux and the heat flow at prescribed temperatures, under surface fluxes, convection, radiation to the surroundings and internal heat sources. A coupled temperature–displacement step solves the steady conduction and then the static equilibrium of the thermal strains it causes; a static step can also take temperatures directly as loads. Conduction uses the Galerkin form with the solid elements’ shape functions and the generalized trapezoidal method in time; thermal strain enters every solid, 2D and truss element as an equivalent load.

Commandssolve.heat (heat transfer steps), solve.static (coupled steps and temperature loads), solve.run; solve.probe, results.contour (temperature), results.frame, results.export.vtu
Step procedure{"type": "heat_transfer", "transient"}; {"type": "coupled_temperature_displacement"}; temperature loads in static, buckle, nonlinear_static and explicit_dynamic steps
Solvercrates/solver (CPU, f64), sparse Cholesky
MethodGalerkin conduction (Zienkiewicz, Taylor & Zhu 2013, §3.2 and ch. 7; Hughes 2000, ch. 1, §8.1); generalized trapezoidal integration (Hughes 2000, §8.2); radiation by Newton’s method (Incropera et al. 2011, §1.2.3 and §12.6 for the gray surface to large surroundings)
Verified bytie-heat-series, radiation-plate, radiation-lumped-cube, j2-heated-bar, nl-thermal-expansion; crates/solver/tests/thermal.rs, radiation.rs, plane.rs (thermal), hybrid.rs (thermal); nafems-le11 pending

Synopsis

[
  {"command": "model.material.create", "params": {"name": "Steel", "elastic": {"type": "isotropic", "young": 210000, "poisson": 0.3},
    "density": 7.85e-9, "thermal": {"conductivity": 45, "specific_heat": 4.6e8, "expansion": 1.2e-5, "reference_temperature": 20}}},
  {"command": "model.boundary_condition.create", "params": {"name": "hot", "type": "temperature", "target": {"set": "base"}, "value": 90}},
  {"command": "model.load.create", "params": {"name": "air", "type": "convection", "set": "fins", "film": 0.01, "sink": 20}},
  {"command": "model.step.create", "params": {"name": "Heat", "procedure": {"type": "heat_transfer",
    "transient": {"end_time": 600, "increment": 5, "theta": 1, "initial_temperature": 20}},
    "boundary_conditions": ["hot"], "loads": ["air"]}},
  {"command": "solve.heat", "params": {"step": "Heat"}}
]

Without transient the step is steady. For thermal stress, a coupled_temperature_displacement step lists the thermal and the mechanical conditions together and is solved by solve.static.

Parameters

solve.heat

FieldValueDefaultMeaning
stepstep namethe only heat transfer step
max_dofs1 to 6 000 0006 000 000cap on the temperatures; may only be lowered
max_factor_entries1 to 2 000 000 000400 000 000as for solve.static (Linear solvers)
threads1 to 256the session’schanges the time, never the result

Transient integration (procedure.transient)

FieldValueDefaultMeaning
end_time> 0—the step’s duration
increment> 0, at most 100 000 increments over the step—Δt; the step takes n = ⌈end_time / increment⌉ equal increments of end_time / n
theta0.5 to 11θ: 1 backward Euler, ½ Crank–Nicolson; unconditionally stable over the range
initial_temperaturefinite0 °Cthe uniform temperature at the start

Thermal conditions

DefinitionFormActs in
boundary condition temperaturetarget ({"set"}), valueheat transfer and coupled steps: a prescribed temperature
load surface_fluxset (faces), fluxheat per area into the faces (positive heats the body)
load convectionset (faces), film h, sink T∞heat flux h (T∞ − T) into the faces
load radiationset (faces), emissivity ε (above 0, at most 1), ambient T_amb (absolute, ≥ 0 K)heat flux ε σ (T⁴ − T_amb⁴) out of the faces, to the surroundings only
load heat_sourceset (elements), powerheat per volume
load temperaturetarget, valuestress steps: a temperature field that strains the material

Material properties: thermal.conductivity (k, or [kx, ky, kz] along the global axes), thermal.specific_heat with density (transient steps), thermal.expansion and thermal.reference_temperature (thermal strain) (Materials). temperature_dependent tables of the conductivity (isotropic), specific heat and density, [[kelvin, value], …] in SI, replace those constants (each table needs its constant beside it); the material library adds cited ones. Mechanical boundary conditions and loads are ignored by heat transfer steps.

Theory

Conduction

Transient conduction ρc Ṫ = ∇·(k∇T) + Q with flux and convection on the boundary gives, element by element with one temperature per node (heat::HEAT_DOFS, kind T):

K = ∫ ∇Nᵀ k ∇N dV  (+ h ∫ N Nᵀ dA on convection faces)
C = ∫ ρc N Nᵀ dV
f = ∫ N Q dV + ∫ N q dA + h T∞ ∫ N dA
C Ṫ + K T = f

k is the diagonal conductivity in the global axes. K uses the element’s full rule, C its mass rule (consistent). Faces (tri3, tri6, quad4, quad8) are integrated on their own geometry with the model’s face rule, the one pressures use, exact for N Nᵀ on flat faces (heat::face_weights, face_film). The heat flux −k∇T is computed at the integration points, extrapolated and averaged at the nodes like stresses.

Steady: K T = f. Transient, the generalized trapezoidal (θ) method with n equal increments from a uniform initial temperature, prescribed temperatures held from the first increment on:

(C + θΔt K) Tₙ₊₁ = (C − (1 − θ)Δt K) Tₙ + Δt f

The left-hand matrix is factored once for the step, or again after each reassembly when temperature tables make the properties follow the temperature.

Radiation to the surroundings. A radiation load makes a face lose, per node,

r(T) = ∫ N ε σ (T⁴ − T_amb⁴) dA,   J(T) = ∂r/∂T = ∫ N Nᵀ 4 ε σ T³ dA

with T = Σ N T_j at the face’s points (the consistent form of the film; a point below 0 K is taken as 0 K) and σ = 5.670374419 × 10⁻⁸ W/(m²·K⁴) (the model is SI, so it applies as it is). The temperatures are absolute: the model stores kelvin whatever the display shows. The surface is gray and sees only the surroundings, a large enclosure at T_amb: radiation between the model’s own surfaces (view factors) is not modelled. The term is nonlinear, so each solve is Newton’s method, K T + r(T) = f linearised about the last iterate Tᵏ:

(K + J(Tᵏ)) Tᵏ⁺¹ = f − r(Tᵏ) + J(Tᵏ) Tᵏ

refactored each iteration until the heat out of balance, f − K T − r(T) in every free equation, is at most 10⁻¹⁰ of the largest net heat flow at a node (|f| + |K T| + |r|) plus that equation’s round-off, 16 ε (|f| + |K| |T| + |r|) with ε the machine epsilon. The residual, unlike the change between two iterates, stays at round-off however badly the mesh conditions K, so a converged solution is never reported as not converging; the round-off allowance is per equation, so it is large only where large conductances meet, and the rest of the model is held to 10⁻¹⁰. Each solve takes at most 50 iterations (more is “did not converge”, naming the increment), and at most Limits::max_newton_iterations: every increment has its own count, so a transient’s work is bounded by its increments and a long one runs to its end. A steady solve starts from the lumped balance, the uniform T at which the radiating faces shed the heat supplied, (Σf / Σ εσA + mean T_amb⁴)^¼, or the highest prescribed temperature when that is higher: Newton then converges in a handful of iterations (q(T) is convex, so the iterates approach from above). When that start is 0 K (surroundings at 0 K, no heat supplied, no temperature held) every temperature would be 0 K, where radiation has no tangent: the solve is refused with that reason (“add heat, hold a temperature or raise the ambient”). A transient increment weights the radiation by θ as it does K, (C + θΔt K) Tₙ₊₁ + θΔt r(Tₙ₊₁) = (C − (1 − θ)Δt K) Tₙ − (1 − θ)Δt r(Tₙ) + Δt f, from Tₙ, so with constant properties Crank–Nicolson stays second order. (With temperature tables C and K are taken at the end of the increment, fully implicit in the properties, and θ = ½ is first order in them.) Without a radiation load or temperature tables the solve is the linear one above, unchanged.

Constraints and reactions. Prescribed temperatures and ties are eliminated by the transformation of the structural solver (constraints::Reduction), T = T_f q + T_p T̄. A tie makes each secondary node’s temperature the mortar-weighted average of the main nodes under it, T_A = Σ_J w_AJ T_J, with the displacement tie’s weights: the interface has no resistance and the heat leaving one side enters the other. The heat each prescribed node supplies is the reaction T_pᵀ (K T + C Ṫ − f), Ṫ over the last increment in a transient step.

Temperature-dependent properties. With property tables K = K(T) and C = C(T): the problem is nonlinear and solved by Picard iteration. Each element takes its conductivity and ρc at the mean of its nodal temperatures (linear between table points, the end value outside a table); the system is assembled, factored and solved again until no temperature moves by more than 10⁻¹⁰ of the largest, at most 100 solves for a steady step or for each increment (fully implicit: the properties at the end of the increment). The steady step starts from the constants, each increment from the previous one’s temperatures; a run that stops at the cap, or whose temperatures leave a table the step reads (a steady step reads the conductivity alone), says so in its warnings. With radiation as well, both nonlinearities share one loop: each Newton iteration first takes the properties at the last temperatures (reassembling K and C), then linearises the radiation there, and the solve ends when the heat balances (the radiation’s criterion above) and the properties have settled (the 10⁻¹⁰ above), within the radiation’s 50 iterations; radiation still out of balance then is “did not converge”, properties still moving a warning. With k linear in T across a slab held at T₀ and T₁, the Kirchhoff transform θ = ∫k dT is linear in x (Carslaw and Jaeger 1959, §1.7) and linear elements reproduce it exactly at the nodes: crates/solver/tests/temperature_dependent.rs checks this with the library’s EN 1993-1-2 steel curve (20 to 700 C, the profile sagging 45 K below the straight line of a constant conductivity).

Thermal strain and stress

ε_th = α (T − T_ref) along the material axes. A solid takes the load ∫ Bᵀ D ε_th dV and its stress is D (ε − ε_th); 2D elements take the same pair, plane stress leaving εzz free (σzz = 0), plane strain holding it (σzz = −D₃·ε_th), axisymmetric elements straining the hoop direction too; trusses take the axial part Σ αₖ tₖ² ΔT along their tangent. Hybrid elements split it: ∫ Bᵀ D_dev ε_th on the nodes and, through the pressure, K G M⁻¹ ∫ N_p tr ε_th, so a confined heated nearly incompressible solid carries its bulk stress −3KαΔT. A node that no temperature reaches stays at its material’s reference temperature.

Coupled temperature–displacement. The steady temperatures of the step’s thermal conditions are solved first, then the equilibrium with their thermal strains. The coupling is one way (temperature strains the solid; deformation does not heat it), which is the whole of linear quasi-static thermoelasticity without thermoelastic dissipation, so solving the two in turn is the monolithic solution.

Nonlinear static steps take temperature loads, or the steady conduction of their thermal conditions solved first, ramped with the load factor from each material’s reference temperature; with nonlinear geometry the deformation gradient splits as F = F_m F_θ, F_θ = diag(1 + αᵢ ΔT) (Lubarda 2004) (Nonlinear static).

Explicit dynamics takes a step’s temperature loads as a thermal strain rate per element, α ΔT / end time (the change reached linearly over the step), subtracted from each increment’s strain increment before the constitutive update, so it feeds J2 and Johnson–Cook plasticity alike; isotropic expansion only (Explicit dynamics).

Algorithm

solve.heat:

  1. Select. The step named, or the only heat transfer step.
  2. Mesh (HeatMesh::new): every section must be a solid section (“heat transfer in kind sections (section name); it has solid elements so far”); each material needs a conductivity (“material name has no conductivity”); the temperatures are numbered by node label; more than max_dofs: “the model has N temperatures; the limit is M”.
  3. Constraints. Tie rows (linear faces of tet4, wedge6 and hex8 only), prescribed temperatures (a node held at two values is refused, naming both), the nested dissection order, the reduction checked against the factor budget. Every temperature prescribed: “every temperature is prescribed; there is nothing to solve”.
  4. Assemble K (with films), C for a transient step (an element without density and specific heat is refused, naming it), f; in element label order.
  5. Factor the reduced K (steady) or C + θΔt K (transient) by Cholesky. A singular one is reported as “the temperature is undetermined at node N: no temperature boundary condition, convection or radiation reaches its part of the model”. With radiation, each Newton iteration factors K + J (steady) or C + θΔt (K + J) (transient) afresh.
  6. Solve. Steady: once (with temperature tables, until the Picard iteration settles; with radiation, until Newton’s does). Transient: n increments, each a right-hand side and a back substitution (with temperature tables, a new assembly and factorization per Picard solve); the progress counts increments and the run checks for cancellation between them. Frames: the initial one and, to keep at most 50 000 000 temperature values (frames × nodes), every k-th increment, the last always kept. A non-finite temperature is refused as ill-conditioned.
  7. Recover. Heat flux at the integration points and averaged at the nodes, at the end of the step; reactions; the heat each load carries in; for a steady step, a warning when the heat supplied and removed differ by more than 10⁻⁶ of the gross heat flows.

A coupled step runs steps 2–6 (steady) inside solve.static and then the linear static solve with the thermal loads.

Output

solve.heat reply (display units):

KeyMeaning
step, dofs, equations, factor_entries
frames, end_timethe stored frames and the last time (0 for a steady step)
min_temperature, max_temperature{node, value} at the end of the step
heat_suppliedfluxes, sources, convection and radiation at the end temperatures (Σ f − K T − r)
heat_removedthe total reaction heat flow; in a steady state it cancels heat_supplied
heat_flowsloads (per heat load: name, type, heat into the body, negative out), reactions, imbalance
warnings

The stored result has per frame the nodal temperatures and times, and at the end the nodal and integration-point heat flux and the nodal reactions. solve.probe gives temperature, heat_flux and reaction (heat per time) at nodes, at the end or at frame, with the frame’s time; results.contour draws temperature; results.export.vtu writes the temperature per frame and the heat flux on the last. A coupled step’s static result adds the nodal temperatures (max_temperature in the reply, temperature in probes).

Worked example

The heated-bracket sample: the filleted steel L-bracket with both hole bores clamped, the end of its upright held at 120 °C and the rest of its outside cooled by still air. One coupled temperature–displacement step solves the steady conduction and then the thermal stress of the growth the clamps hold back.

Geometrytests/corpus/filleted-bracket: 8 mm thick L-bracket, foot 60 mm along x, upright 50 mm along y, 40 mm along z, R6 fillet, an 8 mm hole through each leg
Meshmesh.tet.generate, tet10 of 4 mm: 20 899 elements, 35 468 nodes in this run (the count differs a little between platforms)
Materialsteel: E = 210 GPa, ν = 0.3, ρ = 7 850 kg/m³, k = 50 W/(m K), c = 460 J/(kg K), α = 12 × 10⁻⁶/K, T_ref = 20 °C
Boundary conditionsClamp: set holes (both bores) fixed; Heater: set hot (the upright’s end face) at 120 °C
LoadAir: convection on set skin (every other outside face), h = 10 W/(m² K), T∞ = 20 °C
StepHeat, coupled temperature–displacement (steady)
Unitsmm, t, s, N, MPa; °C
[
  {"command": "file.sample", "params": {"name": "heated-bracket"}},
  {"command": "solve.static", "params": {"step": "Heat"}},
  {"command": "results.contour", "params": {"step": "Heat", "field": "temperature"}},
  {"command": "results.reactions", "params": {"step": "Heat", "sets": ["holes"]}},
  {"command": "solve.probe", "params": {"step": "Heat", "at": [[60, 4, 20], [4, 50, 20], [30, 4, 20]]}},
  {"command": "results.deformed", "params": {"step": "Heat", "show": true, "scale": "auto"}},
  {"command": "results.contour", "params": {"step": "Heat", "field": "von_mises", "range": {"max": 100}}}
]

Results from the solve.static reply, results.contour, results.reactions and solve.probe. Opening the sample (meshing) took 8.7 to 14.0 s and the solve 7.8 to 14.1 s wall time in three runs (Apple M4 Max, CPU, 14 threads, with other jobs running on the machine). The step has no mechanical load, so the clamps’ reactions must sum to zero, and a steady temperature without heat sources lies between the air’s and the heater’s.

QuantityFieldCraftReferenceDifference
dofs, equations106 404, 99 537
factor_entries95 386 629
Temperature range (results.contour)94.76 °C (node 35) to 120.0 °C (node 29)within [20, 120] °C—
Foot’s end, node 339 at (60, 2.8, 19.5)94.90 °C; u = (0.0180, 0.0041, −0.0004) mm
Upright’s end, node 10517 at (2.8, 50, 19.4)120.0 °C; u = (0.0039, 0.0203, −0.0006) mm120 °C (held)0
Foot between the fillet and its hole, node 8211 at (29.5, 4.2, 19.6)97.78 °C; von Mises 69.5 MPa
max_displacement0.0506 mm, node 27
max_von_mises1 105 MPa, node 35419 (edge of a clamped bore)
Reaction force on holes(−6.4, −6.0, 7.7) × 10⁻¹⁰ N0

What to look at. The temperature falls from the heater along the upright, round the fillet and along the foot: conduction through the 8 mm section against convection from its faces, a 25 K drop over the part. The bracket grows by α (T − T_ref), 0.9 to 1.2 × 10⁻³ strain, and the two clamped bores hold it back: the clamps’ reactions balance each other to 10⁻⁹ N, as a self-equilibrated thermal load requires. Away from the bores the stress is tens of MPa (69.5 MPa between the fillet and the foot’s hole); at the bores a fully fixed face is a stress singularity and its 1 105 MPa peak grows with mesh refinement, so the second picture clamps the legend at 100 MPa (deformation scale 173).

Verification

CaseReferenceErrorToleranceTest
Steady conduction through a slab, every solid and formulationtheory: linear T, q = −k ΔT / LT < 10⁻⁹, flux < 10⁻⁸, heat balance < 10⁻⁸exactslab_steady_conduction_is_linear_with_the_fourier_flux
Slab with a uniform source and a convecting end (and with a surface flux), hex20 and tet10theory: quadratic T, exact at the nodes10⁻⁹ relative; heat balance 10⁻⁹exactslab_with_a_heat_source_and_convection
Hollow cylinder, radial conductiontheory: T = T₁(1 − ln r / ln 2) and the heat flowhex20 6 × 6: < 2·10⁻⁴ of ΔT; hex8 16 × 16: < 2·10⁻³; heat flow within 10 times thatas statedthick_cylinder_radial_conduction
Semi-infinite solid with a step temperature, 100 hex8theory: erfc(x / 2√(κt)) (Carslaw & Jaeger 1959, §2.4)< 5·10⁻³ for θ = ½ (200 increments) and θ = 1 (800)as statedtransient_conduction_into_a_semi_infinite_solid
Two blocks of k = 10 and 40, non-matching meshes tied, ends at 20 and 100theory: series resistances (Incropera & DeWitt, §3.1)interface 84, T and flux −640 to < 10⁻⁴ %10⁻⁹ rel.tie-heat-series
Steel slab, conductivity falling with T (EN 1993-1-2 curve), ends at 20 and 700 °C, 8 hex8theory: Kirchhoff transform θ = ∫k dT linear in z (Carslaw & Jaeger 1959, §1.7)T at z = 50, 100, 150 and the flux exact; hex20 within 1.7·10⁻³ of T (kelvin) at its midside nodes; the profile sags 45 K below a constant conductivity’s10⁻⁹ rel. (hex8)kirchhoff-slab-steel, a_conductivity_falling_with_the_temperature_bows_the_slab_profile_as_kirchhoff_says
Free thermal expansion, orthotropic α, every solidtheory: ΔL = α L ΔT, no stress10⁻¹²; stress < 10⁻⁶exactfree_thermal_expansion_is_stress_free
Bar held at both endstheory: σ = −E α ΔT for any ν10⁻⁸ relativeexactconstrained_bar_carries_minus_e_alpha_dt
Bimetal strip, hex20theory: κ = 3 Δα ΔT / (2h) (Timoshenko 1925)tip within 2 %2 %bimetal_strip_bends_as_timoshenko_says
Coupled step against a heat step then a static stepconsistencytemperatures identical; displacements to 10⁻¹²exactcoupled_step_matches_heat_then_static
Thermal expansion in plane stress, plane strain, axisymmetric; plate held on every edgetheory: σzz = −EαΔT in plane strain; σ = −EαΔT/(1 − ν) biaxial10⁻⁹ displacement; 10⁻⁸ stressexactthermal_expansion_in_every_theory, a_plate_held_on_every_edge_carries_the_biaxial_thermal_stress
Trusses heated along their axis (rod2, rod3)theory10⁻⁹exacttrusses_take_thermal_strain_along_their_axis
Confined heated hybrid blocktheory: σ = −3KαΔT10⁻⁶exactheated_confined_block_carries_the_bulk_thermal_stress
Bar held at its ends heated past yield (nonlinear)theory< 10⁻⁴ %10⁻⁸ rel.j2-heated-bar
Free expansion and held block at a thermal stretch of 1.2 (nonlinear)theory< 10⁻⁴ %10⁻⁸ rel.nl-thermal-expansion
Plate heated on one face, radiating from the other to 293.15 K and to 0 K, every solid and formulationtheory: q = ε σ (T_L⁴ − T_amb⁴), T linear acrossT < 10⁻⁹ relative; radiated heat and balance < 10⁻⁹exactplate_cooled_by_radiation_alone_balances_its_heat
The same plate cooled by convection (h 10, T∞ 295 K) and radiation (ε 0.9, 300 K) togetherhand calculation: h (T_L − T∞) + ε σ (T_L⁴ − T_amb⁴) = q, radiation ~45 % of qT < 10⁻⁹ relative; each load’s heat < 10⁻⁸exactplate_with_convection_and_radiation_matches_the_hand_calculation
Lumped cube (one hex8) cooling by radiation alone from 1000 K to 300 K surroundings, 600 stheory: t = (F(T₀) − F(T)) / b with F the integral of 1/(T⁴ − T_amb⁴); to 0 K, T₀ (1 + 3bT₀³t)^(−⅓)T(600 s) = 440.53 K; θ = ½ with 80, 160, 320 increments: 0.053, 0.013, 0.0033 K (order 2.0); θ = 1 with 160, 320: 1.28, 0.64 K (order 1.0); to 0 K: 425.8595 against 425.8632 K (9·10⁻⁶)10⁻⁴ of T₀; order 1.8–2.2 (θ = ½), 0.8–1.2 (θ = 1)lumped_body_cools_by_radiation_as_the_closed_form
The plate’s three cases in the oracle: to 293.15 K, to 0 K, with convectiontheory: as above (Incropera & DeWitt, §1.3.1)face temperatures and each load’s heat < 10⁻⁴ %10⁻⁹ rel. (10⁻⁸ for the radiation–convection split)radiation-plate
The lumped cube in the oracle, θ = ½ with 320 increments, to 300 K and to 0 Ktheory: the lumped closed forms (Incropera & DeWitt, §5.3)7.5·10⁻⁶ and 8.6·10⁻⁶ of T2·10⁻⁵ rel.radiation-lumped-cube
Radiation’s Newton iterationsa cap per solvemax_newton_iterations 1 stops with “did not converge”; an increment of 10⁸ s from 1 K under 10⁴ K surroundings stops after 50 iterations, naming increment 1—radiation_newton_iterations_are_bounded, a_radiation_solve_stops_after_its_most_newton_iterations
A cap of 5 iterations with 200 increments; an hour at Δt 0.05 s (72 000 increments, heavy)per-increment count; the lumped closed form200 increments finish within 10⁻⁴ of T₀; the hour finishes on the closed form10⁻⁶ of T₀every_increment_has_its_own_newton_iterations, a_long_radiating_transient_finishes
Steady, surroundings at 0 K, no heat and no held temperaturerefusal“… raise the ambient”, not a singular matrix—a_steady_solve_with_nothing_above_0_k_is_refused
Refusals and capsundetermined temperature, missing conductivity, missing specific heat, caps with the byte estimatelocated errors—heat_steps_refuse_what_they_cannot_solve, heat_factor_cap_reports_value_bytes_before_allocation
NAFEMS LE11, cylinder/taper/sphere under a temperature fieldbenchmark (target σ_zz = −105 MPa at A)pending: no recipe yet—nafems-le11

Limitations

  • Conduction in solid elements only: 2D, shell, beam and truss sections are refused in heat transfer and coupled steps.
  • Shells and beams take no thermal strain (a warning says so in static steps).
  • Coupled steps are steady and one way; transient coupled analysis is not implemented.
  • Radiation goes to the surroundings only: faces do not exchange radiation with each other (no view factors, no enclosures), surfaces are gray and the emissivity is constant.
  • Properties are constant in temperature unless the material has temperature_dependent tables (conductivity tables are isotropic); no contact conductance (ties are perfect conductors); conductivity along the global axes only.
  • Transient steps use fixed, equal increments (at most 100 000).
  • Ties in heat transfer take linear faces only (tet4, wedge6, hex8).
  • Explicit dynamics takes isotropic expansion only and no heat conduction; explicit trusses take no thermal strain (a warning says so).
  • The deck writers refuse heat transfer and coupled temperature–displacement steps by name.

Implementation

FileContents
crates/engine/src/cmd/solve.rsHEAT spec, run_heat; run_static for coupled steps
crates/solver/src/heat.rsHeatMesh, solve_heat, run (steady and θ-method), temperatures_at, fluxes, load_flows, MAX_TEMPERATURE_VALUES
crates/fem/src/heat.rsConduction (conductivity, capacity, source, flux), face_weights, face_film, HEAT_DOFS
crates/solver/src/analysis.rsstatic_on: the coupled step’s temperatures and thermal loads
crates/solver/src/system.rstemperature_loads, add_thermal_loads
crates/fem/src/element.rs, plane.rs, truss.rs, hybrid.rsthermal_load, stresses_with
crates/model/src/steps.rsTransient and its validation, MAX_HEAT_INCREMENTS
crates/engine/src/results.rsheat_flows

References

  • O. C. Zienkiewicz, R. L. Taylor, J. Z. Zhu. The Finite Element Method: Its Basis and Fundamentals, 7th ed. Butterworth-Heinemann, 2013.
  • T. J. R. Hughes. The Finite Element Method. Dover, 2000.
  • V. A. Lubarda. Constitutive theories based on the multiplicative decomposition of deformation gradient: thermoelasticity, elastoplasticity, and biomechanics. Appl. Mech. Rev. 57(2):95–108, 2004.
  • S. Timoshenko. Analysis of bi-metal thermostats. J. Opt. Soc. Am. 11(3):233–255, 1925.
  • F. P. Incropera, D. P. DeWitt, T. L. Bergman, A. S. Lavine. Fundamentals of Heat and Mass Transfer, 7th ed. Wiley, 2011.
  • H. S. Carslaw, J. C. Jaeger. Conduction of Heat in Solids, 2nd ed. Oxford, 1959.
  • NAFEMS. The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990.

Nonlinear static analysis

A nonlinear static step follows equilibrium under loads and prescribed displacements that grow with a load factor, through large displacements, rotations and strains, hyperelastic and plastic materials, follower pressures and contact. The solver advances in automatically sized load increments, each solved by Newton–Raphson iterations with the consistent tangent, and can switch to arc-length control to pass limit points. Hybrid (mixed u–p) elements keep nearly incompressible materials from locking.

Commandssolve.nonlinear (solve), model.step.create / model.step.edit (define), solve.history (frames), solve.probe (values)
Step procedure"nonlinear_static"
Solvercrates/solver (CPU, f64): fieldcraft_solver::nonlinear, fieldcraft_solver::contact; element and material kernels in crates/fem
MethodTotal Lagrangian finite strain, Newton–Raphson with the consistent tangent (Bathe 2014 §8.4; Crisfield 1991 ch. 9); J2 plasticity by Simo’s exponential return map (Simo 1992) or the Lagrangian logarithmic-strain return (Miehe, Apel & Lambrecht 2002); arc length after Riks (1979) and Crisfield (1981)
Verified bycrates/solver/tests/{nonlinear,plasticity,hybrid,nonlinear_thermal,arc_length}.rs; oracle cases nl-*, j2-bauschinger, j2-heated-bar, plastic-thick-cylinder, plastic-hinge-cantilever, arc-shallow-arch

Synopsis

[
  {"command": "model.step.create", "params": {
    "name": "Inflate",
    "procedure": {"type": "nonlinear_static", "nonlinear_geometry": true,
                  "initial_increment": 0.1, "min_increment": 1e-5, "max_increment": 1.0,
                  "max_increments": 100, "max_iterations": 16,
                  "tolerances": {"force": 1e-6, "displacement": 1e-5, "energy": 1e-10}},
    "boundary_conditions": ["ends"], "loads": ["bore pressure"]}},
  {"command": "solve.nonlinear", "params": {"step": "Inflate"}}
]

Parameters

Step procedure (model.step.create, "type": "nonlinear_static"). Increments are fractions of the step.

FieldValueDefaultMeaning
nonlinear_geometrybooltrueLarge displacements, rotations and strains (total Lagrangian elements, follower pressure). false keeps small-displacement kinematics; only the materials are nonlinear.
initial_increment(0, 1]0.1The first increment. With arc length, the first increment’s load factor change, which sets the arc.
min_increment(0, 1]1e-5The smallest increment a cutback may reach; below it the step fails.
max_increment(0, 1]1.0The largest increment. min_increment ≤ initial_increment ≤ max_increment is required.
max_increments1 to 100 000100Cap on the increments, cutbacks included.
max_iterations1 to 100016Cap on the Newton iterations of one increment.
tolerances.force(0, 1)1e-6Largest residual force over the force scale, and largest residual moment over the moment scale.
tolerances.displacement(0, 1)1e-5Largest translation of the correction over the increment’s, and largest rotation over the increment’s.
tolerances.energy(0, 1)1e-10Work of the correction against the residual over that of the first iteration.
line_searchboolfalseA line search along each Newton correction. Off by default: on large elastic rotations the full step converges in fewer iterations.
load_path[[fraction, factor], …], 2 to 1000 pointsnone (factor = fraction)Piecewise linear load factor against the step fraction, from [0, 0] to fraction 1, fractions increasing. Increments end at its points, and the extrapolated predictor scales with the change of the load factor, so it turns with the path.
arc_length{"constraint": "cylindrical" | "spherical", "max_load_factor": 1, "displacement_limit": {"node", "direction": 1–3, "displacement"}}none (load control)Arc-length control: the load factor becomes an unknown. max_load_factor > 0; a displacement limit is non-zero. Takes no load path.
imperfection{"step", "mode", "scale"}noneMode mode (from 1) of buckling step step, scaled so its largest component is scale (a length), added to the node coordinates before the step is solved.

Command solve.nonlinear:

FieldValueDefaultMeaning
stepnamethe only nonlinear static stepThe step to solve.
max_dofsinteger6 000 000Cap on degrees of freedom; may only be lowered.
max_factor_entriesinteger400 000 000Cap on factor entries; may be raised up to 2 000 000 000 (8 bytes per value).
max_newton_iterationsinteger100 000Cap on the Newton iterations of the whole step; may only be lowered.
threads1 to 256the session’sChanges the time, never the result.

Material options that act in nonlinear steps (model.material.create): "hyperelastic": {"type": "neo_hookean"}, {"type": "mooney_rivlin", "c01"}, {"type": "yeoh", "c20", "c30"} on an isotropic elastic material, and "plastic" (bilinear isotropic or kinematic, table, johnson_cook). Sections take "formulation": {"hybrid": true}. See materials and elements.

Theory

Load factor

The step’s load factor λ runs from 0 to 1. Dead loads (forces, tractions, gravity, body forces, and pressure without nonlinear geometry) are λ times their values, a pressure follows the deformed faces with λ times its magnitude, and every prescribed displacement is λ times its value: u = T_f q + λ T_p u_p, the constraint elimination of the linear solver. With a load_path the load factor is piecewise linear in the step fraction, so loads and prescribed displacements can come down or reverse within a step (cyclic loading).

Material point

Given the deformation gradient F and the history committed at the end of the last converged increment, a material returns the Kirchhoff stress τ = J σ and the spatial tangent c of its Lie derivative (L_v τ = c : d), in Voigt order with engineering-shear columns, so c = D at F = I. This is the push-forward of the second Piola–Kirchhoff stress and its tangent:

τ = F S Fᵀ,   c_ijkl = F_iI F_jJ F_kK F_lL C_IJKL

History variables (MaterialModel::history_len per integration point) are read from the committed slice and written to a separate one, which the solver commits when the increment converges, so a cut-back increment leaves no trace.

Material in a nonlinear stepModel
Elastic (isotropic or orthotropic), no optionSt Venant–Kirchhoff: S = D E, E = ½(FᵀF − I). Right for large rotations with small strains; it softens without bound in large compression.
Isotropic elastic with "hyperelastic": {"type": "neo_hookean"}Compressible neo-Hookean with the isochoric–volumetric split, W = μ/2 (Ī₁ − 3) + κ/2 (J − 1)², μ and κ from E and ν (C₁₀ = μ/2, D₁ = 2/κ). Its small-strain limit is the linear material, which linear steps use.
Isotropic elastic with {"type": "mooney_rivlin", "c01"} or {"type": "yeoh", "c20", "c30"}Decoupled polynomials W̄ = C₁₀ (Ī₁ − 3) + C₀₁ (Ī₂ − 3) + C₂₀ (Ī₁ − 3)² + C₃₀ (Ī₁ − 3)³ with the same volume term κ/2 (J − 1)²: Mooney–Rivlin with C₁₀ = μ/2 − C₀₁ (0 ≤ C₀₁ ≤ μ/2), Yeoh with C₁₀ = μ/2, so 2(C₁₀ + C₀₁) is the elastic μ and the small-strain material stays the elastic one. Stress and tangent from the fictitious τ̄ and c̄ (Holzapfel 2000, eqs. 6.168, 6.193).
Isotropic elastic with "plastic" (bilinear isotropic or kinematic, table, Johnson–Cook)J2 plasticity (fieldcraft_fem::elastoplastic). At finite strain, isotropic hardening uses Simo’s multiplicative model with a Hencky elastic energy, τ = K ln J I + 2G dev ½ ln bₑ, history Cₚ⁻¹ and the equivalent plastic strain, integrated by the exponential return map on the principal logarithmic strains. Linear kinematic hardening uses the Lagrangian logarithmic-strain model below. At small strain, both use the additive radial return with the back stress. All call J2::radial_return, the update explicit dynamics uses, and its consistent tangent J2::tangent.

“Isotropic elastic” means the same thing everywhere: the neo-Hookean model is chosen only by the explicit option.

Plasticity’s tangent. With Cₚ⁻¹ frozen over an iteration,

L_v τ = 𝔻ᵉᵖ : ½ (∂ ln b/∂b) : (d b + b d) − (d τ + τ d)

with 𝔻ᵉᵖ the algorithmic tangent of the return, K I⊗I + 2Gθ ℙ − 2Gθ̄ n⊗n (Simo & Hughes 1998, Box 3.2), and the derivative of the logarithm by the Daleckii–Krein divided differences θ_AB = artanh(r)/r, r = (λ²_A − λ²_B)/(λ²_A + λ²_B), in the principal frame of the trial bₑ. It is smooth through equal stretches, so uniaxial and undeformed states need no special case. The tangent is symmetric (isotropic hardening) and is checked against central differences of the stress and of every element’s forces from a plastic history. Hybrid elements take the deviatoric return and the volume term K/2 (ln J)². A hardening slope below −3G leaves the point without a tangent: the increment cuts back and the step stops at the minimum increment, naming the element.

Finite-strain kinematic hardening. The full tensor radial return acts on the Lagrangian logarithmic strain E = ½ log C, C = FᵀF (Miehe, Apel and Lambrecht, CMAME 191, 2002). Its conjugate stress T and tangent D are mapped by the logarithm’s first and second derivatives: S = L_log(C)[T] and C_mat[H] = L_log(C)[D[L_log(C)[H]]] + 2 D²log(C)[H,T], where H is a Green strain increment. Pushing S and C_mat forward gives the existing spatial interface. Divided differences include coincident eigenvalues, without differentiating eigenvectors. History slots 0–5 hold additive plastic logarithmic strain (engineering shears), 6–11 the reference-frame back stress, and 12 the accumulated plastic strain; isotropic hardening keeps its existing multiplicative history and update. The volume and hybrid split are unchanged. The uniaxial curve is expressed in logarithmic strain and Kirchhoff stress; reported Cauchy stress is τ/J. Simple-shear stress rises to a smooth peak and then decreases at large shear, as Hencky elasticity itself does; monotonicity to arbitrarily large shear is not implied.

Elements

Total Lagrangian over the reference element with its own quadrature (fieldcraft_fem::finite):

f_a  = ∫ Bₓ,aᵀ τ dV₀
K_ab = ∫ (Bₓ,aᵀ c Bₓ,b + ∇ₓN_a · τ ∇ₓN_b I) dV₀,   ∇ₓN = F⁻ᵀ ∇₀N

the material plus geometric stiffness with the current gradients, identical term by term to ∫ B₀ᵀ S dV₀ and its linearisation. Every element’s tangent is checked against central differences of its forces.

ElementNonlinear steps
tet4, tet10, wedge6, hex8, hex20 (full), hex20 (reduced)total Lagrangian
hybrid quad4, quad8, tri6 (plane strain, axisymmetric)mean dilatation: θ = ∫ J dV₀ / V₀ with the hoop stretch, p = U′(θ), stiffness U″ g gᵀ / V₀
hybrid hex8, hex20, tet10Simo–Taylor–Pister three-field form on the linear hybrid elements’ pressure fields (θ the projection of J, p the projection of U′(θ)); needs the neo-Hookean option (St Venant–Kirchhoff has no volumetric split)
plane strain, axisymmetric (tri3, tri6, quad4, quad8)total Lagrangian with F₃₃ = 1 or r/R (hoop column N/r, geometric term τ_θθ N_a N_b/r²)
hex8 and quad4 incompatible modes (plane strain, axisymmetric)enhanced assumed strain (Simo & Armero 1992): F = I + Σ u_a ⊗ ∇₀N_a + Σ α_k ⊗ G̃_k with the linear element’s mapped mode gradients; the modes α solved element by element at every evaluation (bounded local Newton iteration from the last converged α) and condensed into the consistent tangent; an hourglass check stops the step in large compression (see Limitations)
plane stressrefused
trusses, shells, beamsrefused

Without nonlinear geometry ("nonlinear_geometry": false) an elastic element is the linear one (K u), and an element of a plastic material runs the same loops with small strain (Kinematics::Small: ε = sym ∇u on the reference gradients, f = ∫ Bᵀσ dV, K = ∫ Bᵀ𝔻B dV with the consistent tangent, no geometric stiffness; hybrid elements project 1 + tr ε and K tr ε). An elastic model is then the linear solution reached by Newton.

Hybrid (mixed u–p) solids

A section with "formulation": {"hybrid": true} gives Formulation::Hybrid { pressures } (fieldcraft_fem::hybrid), in linear and nonlinear steps. The isotropic elasticity splits as D = D_dev + K m mᵀ (m = (1, 1, 1, 0, 0, 0)); the mean stress is an independent field, discontinuous between elements, enforced by the perturbed Lagrangian (Hughes 2000, §4.3–4.4):

K_dev = ∫ Bᵀ D_dev B dV,   G = ∫ Bᵀ m N_pᵀ dV,   M = ∫ N_p N_pᵀ dV
[K_dev  G; Gᵀ  −M/K] [u; p̂] = [f; 0]

The pressure is condensed element by element, p̂ = K M⁻¹ Gᵀ u, leaving the element stiffness K_dev + K G M⁻¹ Gᵀ: symmetric positive definite for any ν < ½. ElementDofs.internal.pressure counts the condensed unknowns; nothing global changes. Stresses are D_dev ε + p m with the element’s pressure field. With a constant pressure this is the B-bar / mean dilatation element (Nagtegaal, Parks & Rice 1974).

ElementPressure fieldStability (inf-sup)
hex201, x, y, z (Q2–P1disc)stable
tet10constant (P2–P0)stable; a single element has three more zero-energy modes that neighbouring elements restrain
hex8constant (Q1–P0)does not lock and passes the patch test; element pressures may show a checkerboard on some meshes
plane strain, axisymmetric quad4, quad8, tri6one constant pressure, the mean dilatation with the hoop strain in the divergence: K_dev + κ g gᵀ / V, g = ∫ Bᵀ m dV (fieldcraft_fem::plane)as above
tet4, wedge6, tri3, plane stressrefusedthe linear triangle locks even with one pressure; plane stress has no volume constraint

A thermal strain splits the same way: ∫ Bᵀ D_dev ε_th on the nodes and, through the pressure, K G M⁻¹ ∫ N_p tr ε_th, so a confined heated nearly incompressible solid takes its bulk stress −3KαΔT.

Follower pressure

On the current face (fieldcraft_fem::face::follower_pressure, follower_edge_pressure):

fᵢ = −p ∫ Nᵢ (x,ξ × x,η) dξ dη
K  =  p ∫ N_a (N_b,η [x,ξ]× − N_b,ξ [x,η]×)

The load stiffness is not symmetric. The solver keeps its symmetric part and leaves the skew part out, so the tangent stays symmetric. The residual is exact, so the converged answer does not change. Over a closed surface, or one whose boundary is held, the skew parts of neighbouring faces cancel (Schweizerhof & Ramm 1984) and nothing is lost; elsewhere Newton may converge linearly instead of quadratically, and the result reports the skew part’s size relative to the load stiffness when it exceeds 10⁻⁶. An LU factorization of the full tangent would double the factor’s memory and give up the symmetric solver for a gain only in the rate of convergence on open loaded surfaces. Without nonlinear geometry a pressure is a dead load.

Thermal strain

A step’s temperatures are its temperature loads, or the steady conduction of its temperature boundary conditions and heat loads solved first (one-way, as the linear coupled temperature–displacement step). They ramp with the load factor from each material’s reference temperature, ΔT(λ) = λ (T − T_ref). With nonlinear geometry the deformation gradient splits multiplicatively (Lubarda 2004):

F = F_m F_θ,   F_θ = diag(1 + αᵢ ΔT)

The material sees F_m, the loops run on the expanded volume J_θ dV₀ (mixed elements project det F_m), and the reported strain is the total logarithmic one. The linear stretch 1 + α ΔT keeps α the engineering coefficient, so a free body grows by exactly α ΔT. Without nonlinear geometry the split is additive, ε_m = ε − α ΔT, and elastic elements on their linear stiffness take the equivalent nodal forces as a dead load. A Johnson–Cook material softens at the point’s temperature. The expansion coefficient is constant in temperature.

Arc length

arc_length makes the load factor an unknown (Riks 1979, Crisfield 1981). Each increment keeps

‖Δq‖² + w Δλ² = Δl²

with w = 0 for the cylindrical arc and w the first tangent displacement’s ‖q_f‖² for the spherical arc. The norm weighs a rotation by L² (the model’s size squared), so the arc is a length² in any unit system and at any part size. The predictor follows the tangent with the sign of its angle to the last increment (Feng, Perić & Owen 1996); the corrector is δq = δq_r + δλ δq_g, δλ the root of the constraint’s quadratic whose increment turns least (Crisfield’s angle criterion). The first increment’s load factor change, initial_increment, sets the arc; arcs grow, shrink and cut back as increments do, within the minimum and maximum increments’ arcs. Prescribed motions scale with λ (∂r/∂λ includes −K T_p u_p) and follower pressures with their current faces.

Algorithm

  1. Set up. Resolve the model, apply an imperfection if one is given, build the constraint elimination (boundary conditions, couplings, inclined symmetry planes, ties) and the contact interfaces. Without a load_path the load factor equals the step fraction.

  2. Predict. An increment starts from the linear extrapolation of the last converged one (the free motion scaled by the ratio of their sizes), or from the last converged state when the extrapolation inverts an element. With path-dependent materials an increment without a previous one to extrapolate (the first, or after a turn of the path to zero change) starts from the tangent predictor: one solve with the converged state’s tangent for the change of the loads and prescribed displacements, so a prescribed motion spreads into the interior before the material sees it (started from the boundary’s jump alone, the elements next to it would flow plastically far beyond the solution). Its work is then the energy criterion’s reference. A first tangent that is not positive definite is a cutback when the undeformed model’s tangent is. The tangent predictor uses Cholesky and is skipped when the tangent is indefinite.

  3. Iterate. Newton–Raphson with the full consistent tangent refactored every iteration: K_T δq = r, r = T_fᵀ (λ f_ext(u) − f_int(u)). An indefinite tangent (a strained nearly incompressible mixed element, an unstable material, a state past a limit or bifurcation point) is factored by LDLᵀ (linear solvers) and Newton goes on; each iteration records the tangent’s negative eigenvalues. Hybrid elements near ν = ½ under prescribed displacement therefore converge without cutbacks (at ν = 0.4999 every increment used to be cut back to the cap before LDLᵀ). With line_search, s = 1 is taken when |G(1)| ≤ 0.8 |G(0)|, G(s) = δq · r(q + s δq); otherwise s moves to the root of the secant through (0, G(0)) and (s, G(s)), within [0.1, 1], at most five times (Crisfield 1991, §9.3).

  4. Converge. An increment has converged when all three checks hold, or when the force residual is a thousandth of its tolerance (round-off):

    CheckMeasuredAgainst
    forcelargest residual forcethe largest force seen (applied, internal, reaction), at least 10⁻⁸ of the mean diagonal stiffness times L
    momentlargest residual momentthe largest moment seen, at least the force scale times L
    translationlargest translation of the correctionthe increment’s largest translation (or prescribed one), at least 10⁻¹² L
    rotationlargest rotation of the correction, in radiansthe increment’s largest rotation (or prescribed one), at least the translation reference over L
    energywork of the correction against the residual, s δq · r (N·m for both kinds)that of the first iteration (Bathe & Cimento 1980)

    L is the diagonal of the model’s bounding box. Force and moment share the force tolerance, translation and rotation the displacement tolerance; each iteration records the larger measure of each pair. In the round-off floor of the force scale a rotation’s diagonal stiffness counts over L². Only coupled reference points carry rotations in a nonlinear step, so a model without them converges exactly as with one norm. With path-dependent materials an increment that starts within the force tolerance waives the energy criterion. With contact, the force scale is that of the converged states, the loads and the current state.

  5. Adapt. Two increments in a row that converge in at most four iterations let the next grow by half (up to max_increment); one that needs more than eight shrinks the next to three quarters. An increment is cut back to a quarter of its size when an element inverts, the residual is not finite, the residual grows in two successive iterations, the tangent is singular, the contact active set chatters, or it does not converge in max_iterations.

  6. Commit. A converged increment commits the material history, contact tractions and slip states, stores a displacement frame and, with contact, runs the augmentations (contact). With arc length, the tangent at the converged state is factored for the next predictor (LDLᵀ when indefinite), its negative eigenvalues are recorded (negative_pivots), and a change in their count is reported as a critical point: a limit point where the load factor turns, a bifurcation otherwise.

  7. Stop. The step ends at load factor 1 (arc length: at max_load_factor, at the displacement limit, or at the increment cap with a warning). It fails cleanly, naming the load factor and the last reason, when an increment falls below min_increment, when it has taken max_increments, or when the Newton iterations of the step reach max_newton_iterations. Only the first tangent of a model that can move freely is an error; the undeformed model’s Cholesky factor names where.

Element forces and tangents are computed in parallel and added in label order, so results are the same bit for bit on any number of threads.

Output

The reply of solve.nonlinear:

FieldContent
step, dofs, equations, factor_entriesThe step and the system’s size
incrementsEvery increment, converged or cut back: number, load_factor, size, iterations (each with force, displacement, energy relative to their scales, line_search, negative_pivots, augmentation), converged, cutback (the reason), negative_pivots, augmentations
iterationsNewton iterations over the step
frames, load_factorThe load factor of every frame (from 0) and the last one
critical_pointsArc length: kind (limit or bifurcation), increment, load_factor, negative_before, negative_after
contactsPer contact: normal_force, force, max_pressure, closed_nodes, slipping_nodes, penetration, augmentations
max_displacement, max_von_mises, max_plastic_strainThe largest values and where
applied_total, reaction_totalLoad and reaction resultants
reference_pointsEach coupled point’s six displacements and reactions
warningsIncluding an unstable equilibrium kept by a converged state (negative eigenvalues), the follower-pressure skew part, couplings as small-rotation constraints, and what acts in explicit dynamics only

Stored results: the final displacements and reactions, the Cauchy stress and the logarithmic strain (ln V, engineering shears; the small strain without nonlinear geometry) at the integration points and averaged at the nodes, the equivalent plastic strain at the integration points of plastic elements (solve.probe with elements), and a displacement frame per converged increment with its sparse reactions (results.frame, the slider in the results panel), kept while the frames hold at most 3 · 10⁷ values. solve.history returns, per frame, the load factor and per set the mean displacement of its nodes and the sum of their reactions (a force–travel curve).

Decks: Abaqus *STEP, NLGEOM=YES|NO, INC= with *STATIC (initial, period 1, minimum, maximum) and *CONTROLS, PARAMETERS=LINE SEARCH; the neo-Hookean option as *HYPERELASTIC, NEO HOOKE, Mooney–Rivlin and Yeoh as *HYPERELASTIC, MOONEY-RIVLIN / YEOH; plasticity as *PLASTIC; arc length as *STATIC, RIKS (cylindrical only). Abaqus refuses a load path (it would be an amplitude on every load and boundary condition) and a plastic deck of several general steps (Abaqus carries the plastic state from one to the next; every FieldCraft step starts undeformed). LS-DYNA writes the ramped implicit run with full Newton (ilimit 1, maxref) and *CONTROL_IMPLICIT_AUTO, a load path as the step’s curve; it refuses hyperelastic materials in nonlinear steps, steps without nonlinear geometry and arc-length steps. Nastran refuses nonlinear steps. Iteration caps and tolerances are left to each solver’s own controls.

Worked example

The rubber-seal sample: a rubber gasket ring squeezed 25 % between two plates bonded to it. Large strain of a nearly incompressible Mooney–Rivlin solid on hybrid (u–p) hex8 elements, Newton–Raphson in automatically sized increments, and the force–travel curve the frames keep.

Geometryring, inside radius 20 mm, outside 30 mm, 10 mm high (four mapped quarter blocks with arc edges)
Mesh1 000 hex8, hybrid ("formulation": {"hybrid": true}), 1 440 nodes
Materialrubber: E = 6 MPa, ν = 0.49, Mooney–Rivlin with C01 = 0.2 MPa (C10 = μ/2 − C01 = 0.807 MPa)
Boundary conditionsbottom fixed; top moved 2.5 mm down (−z) with its in-plane motion held
StepSqueeze: nonlinear static, nonlinear_geometry true (default), initial_increment 0.1, other controls at their defaults
Unitsmm, t, s, N, MPa
[
  {"command": "file.sample", "params": {"name": "rubber-seal"}},
  {"command": "solve.nonlinear", "params": {"step": "Squeeze"}},
  {"command": "results.reactions", "params": {"step": "Squeeze", "sets": ["top", "bottom"]}},
  {"command": "solve.history", "params": {"step": "Squeeze", "sets": ["top"]}},
  {"command": "results.contour", "params": {"step": "Squeeze", "field": "von_mises"}},
  {"command": "results.deformed", "params": {"step": "Squeeze", "show": true, "scale": 1}}
]

The increments, from the solve.nonlinear reply (2 880 equations, 0.6 s, Apple M4 Max, CPU). The first try at the initial increment, 0.1, inverts element 201 at an integration point (J = det F = −0.4375) and is cut back to 0.025; the size is kept once, then grows by a factor of 1.5 per increment, and the last is shortened to end the step at 1.

IncrementLoad factorSizeNewton iterationsForce residual at convergence
10.10.12, cut back (inverted element)—
20.0250.02535.3 × 10⁻¹⁰
30.050.02521.3 × 10⁻¹⁴
40.08750.037521.7 × 10⁻¹³
50.1440.056324.7 × 10⁻¹²
60.2280.084421.3 × 10⁻¹⁰
70.3550.12738.3 × 10⁻¹⁶
80.5450.19035.2 × 10⁻¹³
90.8290.28538.0 × 10⁻¹⁰
101.00.17131.8 × 10⁻¹⁰

The force–travel curve, from solve.history on top (mean travel of its nodes, sum of their reactions):

Load factor0.0250.050.08750.1440.2280.3550.5450.8291.0
Travel (mm)0.06250.1250.2190.3590.5700.8871.3612.0732.500
Force (N)104.0210.2373.6628.21 033.31 697.62 840.54 959.16 518.4
QuantityFieldCraftReferenceDifference
Newton iterations over the step (iterations)26——
Force on top (results.reactions)−6 518.4 N; bottom +6 518.4 N—balance to 10⁻¹⁵
Force against the frictionless closed form6 518.4 Nincompressible Mooney–Rivlin in uniaxial compression, P = 2 (λ − λ⁻²)(C10 + C01/λ) A at λ = 0.75: 3 465.8 Nratio 1.88
Largest von Mises stress (max_von_mises)6.94 MPa (node 1404)——
Largest displacement (max_displacement)2.595 mm (node 305)——

What to look at. The cut faces show the free inner and outer walls bulging outwards between the bonded plates, and the von Mises stress peaking at the corners where the bulge meets them. Bonding stops the faces from spreading, so the ring needs 1.88 times the force of the closed form for frictionless plates (the sample’s test holds the ratio against its own frictionless run between 1.05 and 2.5; Examples gives 3 430 N for that run). The curve stiffens as the rubber is squeezed, the secant stiffness rising from 1 665 N/mm to 2 607 N/mm. Each converged increment takes two or three iterations with the residual falling by orders of magnitude per iteration, the signature of Newton’s method with the consistent tangent.

Verification

Oracle cases (results):

CaseReferenceQuantityErrorTolerance
nl-neo-hookean-uniaxialtheory: closed form, stretch λ = 2axial Cauchy stress, lateral displacement< 10⁻⁶10⁻⁶ rel.
nl-mooney-rivlin-modestheory: Treloar’s uniaxial, equibiaxial, pure-shear modes, compressible closed formfive stresses and displacements< 10⁻⁶10⁻⁶ rel.
nl-yeoh-uniaxialtheory: closed form, λ = 2axial stress, lateral displacement< 10⁻⁶10⁻⁶ rel.
nl-hybrid-incompressibletheory: λ = 2, ν = 0.4999axial stress, lateral displacement< 10⁻⁶10⁻⁶ rel.
nl-patch-hex8theory: nonlinear patch test on a distorted meshdisplacements, Cauchy stresses at an inner node< 10⁻⁶10⁻⁸ / 10⁻⁷ rel.
nl-rigid-rotationtheory: rigid rotationdisplacements; von Mises 0< 10⁻⁷± 10⁻⁹
nl-patch-hex8-incompatibletheory: as nl-patch-hex8, incompatible-mode hex8displacements, Cauchy stresses at an inner node< 10⁻⁶10⁻⁸ / 10⁻⁷ rel.
nl-elastica-cantilevertheory: elastica (Bisshopp–Drucker), P L²/(E I) = 1, 2, 5, 10, hex20tip deflection; tip shortening0.18–0.44 %; 0.35–0.54 %1 %; 2 %
nl-elastica-cantilever-hex8-incompatibleas above, one incompatible-mode hex8 through the depth (40 × 1 × 1)tip deflection; tip shortening0.14–0.41 %; 0.30–0.51 %1 %; 2 %
nl-cylinder-inflationtheory: Rivlin’s thick neo-Hookean tube, follower pressurebore; outer wall0.079 %; 0.15 %0.5 %
nl-mooney-rivlin-tubetheory: Rivlin’s incompressible solution, λ_z = 1.5, ν = 0.4995bore; outer wall0.62 %; 0.028 abs.1 %; ± 0.04
nl-mooney-rivlin-tube-axisymmetricas above, axisymmetricbore; outer wall0.66 %; 0.029 abs.1 %; ± 0.04
nl-j2-uniaxialtheory: logarithmic strain 0.2axial Cauchy stress, plastic strain< 10⁻⁶10⁻⁶ rel.
nl-j2-simple-shearItskov 2005, eq. (60), Fig. 1, r = 0shear stress at γ = 1, 2, 4, 8< 0.0001 %0.005 %
nl-j2-bauschingertheory: logarithmic strain 0.2, unloading to zeroresidual stress, plastic strain< 10⁻⁶10⁻⁶ rel.
j2-bauschingertheory: load path back to zero strainstress, plastic strain< 10⁻⁶10⁻⁶ rel.
plastic-thick-cylindertheory: Hill’s thick cylinderbore displacement at plastic radius 1.5a; collapse force0.0089 %; < 10⁻⁶0.2 %; 0.1 %
plastic-hinge-cantilevertheory: beam theory’s plastic hingetip force at 4.5 times first-yield deflection−3.2 %5 %
nl-thermal-expansiontheory: free and fully held block, α ΔT = 0.2displacement; stresses< 10⁻⁶10⁻⁸ rel.
j2-heated-bartheory: bar held at its ends heated past yieldstress, plastic strain< 10⁻⁶10⁻⁸ / 10⁻⁷ rel.
arc-shallow-archtheory: one-mode closed form of a shallow sinusoidal arch (hex20)upper limit load factor; lower; inertia past the upper limit−0.82 %; 0.0079 abs.; exact2 %; ± 0.02; exact

Tests:

  • crates/solver/tests/nonlinear.rs and crates/fem/src/{constitutive,finite,face}.rs: consistent tangents of every material and element against central differences; uniaxial stretch to λ = 2 of a neo-Hookean block in every element kind, plane strain and axisymmetric; St Venant–Kirchhoff uniaxial stretch; the nonlinear patch test on a distorted mesh (hybrid elements and incompatible modes included); a 90° rigid rotation; Newton’s quadratic convergence; the linear limit (an incompatible-mode hex8 cantilever included); hybrids near ν = ½ under prescribed displacement; the failures (an element inverted by crushing stops at the minimum increment, naming it; the caps; what is refused); determinism; coupled reference points that converge the same in any units and at any size; a nearly incompressible incompatible-mode block homogeneous at a compressive stretch of 0.7 and stopped, naming the element, at 0.5.
  • crates/solver/tests/plasticity.rs, crates/fem/src/elastoplastic.rs: consistent tangents from a plastic history (material point and every element, finite and small strain, full and hybrid); uniaxial tension to a logarithmic strain of 0.2 in every element kind (Kirchhoff stress exact to 10⁻⁷, and 0.13 % from explicit dynamics’ hypoelastic Cauchy stress, the elastic volume change between the two laws); Newton’s order with the consistent tangent 1.9 (small strain) and 2.3 (finite strain) in a plastic cantilever; a cantilever’s collapse 3.1 % above the hinge load, converged under refinement; the refusals and the softening material that stops at the minimum increment.
  • crates/solver/tests/hybrid.rs: a block in uniaxial strain at ν = 0.4999 for hybrid hex8, hex20 and tet10 (displacements to 10⁻⁹, stresses to 10⁻⁶ of the closed form); Lamé’s thick cylinder in plane strain at ν = 0.4999, the bore displacement within 1 % (hex8 hybrid), 10⁻⁴ (hex20 hybrid) and 0.5 % (tet10 hybrid), while the displacement hex8 locks below 70 % of it; a confined heated block carries −3KαΔT; the refusals.
  • crates/solver/tests/nonlinear_thermal.rs: free and fully held expansion at a thermal stretch of 1.2 (full and hybrid), a bar held at its ends heated past yield, the linear limit against the linear and coupled solvers, tangents with a temperature field.
  • crates/solver/tests/arc_length.rs: the shallow arch’s snap-through (path within 1.9 % of the closed form, both limit points, inertia 0 → 1 → 0) and the refusals.

Pending: nl-cook-membrane (Cook’s membrane, nearly incompressible neo-Hookean, plane strain) waits for its reference value to be transcribed.

Limitations

  • Trusses, shells and beams are refused (large rotations of structural elements are not implemented).
  • Plane stress is refused (σ_zz = 0 needs a local iteration for the thickness).
  • Incompatible-mode hex8 and quad4 hourglass in large compression (Wriggers & Reese 1996), and no published stabilisation (Glaser & Armero 1997; Reese, Wriggers & Reddy 2000) is implemented. Instead, with nonlinear geometry and an elastic material, every tangent evaluation checks that the condensed element stiffness stays positive definite on the element’s hourglass modes (the parent patterns less their linear part in the current configuration, as in Flanagan & Belytschko 1981, so no constant-strain stiffness enters), so a step never returns a state that may have hourglassed. A failed check is an element error and cuts the increment back; the loss of stiffness belongs to the state, so smaller increments only approach it again, and the step stops at the minimum increment after its cutbacks, with an error naming the element. The check is an element-level criterion: it fires where the coarse element itself loses stiffness, not where the material does (a neo-Hookean material stays strongly elliptic in compression, so the homogeneous state is stable), and it also fires on displacement-based elements at large compression. A free neo-Hookean cube in uniaxial compression trips it at a stretch of about 0.58, the same stretch at which a fully integrated hex8 loses its own hourglass stiffness; a square quad4 at about 0.53 in plane strain and 0.52 axisymmetric (shear modulus 1, bulk modulus 10), where the fully integrated quad4 keeps its stiffness. With plasticity the check is left to the global tangent’s negative pivots. For large compression use hybrid or quadratic elements.
  • Hybrid tet4, wedge6 and tri3 are refused; nonlinear hybrid hex8, hex20 and tet10 need the neo-Hookean (or another hyperelastic) option. A continuous nodal pressure (Taylor–Hood) is not implemented.
  • Refused in nonlinear steps: the Johnson–Cook strain-rate term (C ≠ 0; a static step has no time), centrifugal loads. Damage, erosion and adiabatic heating act in explicit dynamics only (a warning says so).
  • Couplings stay the linear constraints of the linear solver (small rotations of the reference point), with a warning; ties are small-displacement constraints; springs act along their fixed directions; dashpots are ignored with a warning.
  • The follower-pressure tangent omits the skew part: convergence may be linear on open loaded surfaces.
  • Arc-length steps refuse a load path, temperatures and contact.
  • The thermal expansion coefficient is constant in temperature.

Implementation

  • crates/solver/src/nonlinear.rs: solve_nonlinear, the increment loop, convergence norms, automatic incrementation, line search, arc length, History, Increment, Iteration, CriticalPoint, Frame.
  • crates/fem/src/constitutive.rs: MaterialModel (St Venant–Kirchhoff, neo-Hookean, Mooney–Rivlin, Yeoh), Kirchhoff stress and spatial tangent.
  • crates/fem/src/elastoplastic.rs: finite- and small-strain J2 with consistent tangents; crates/fem/src/plasticity.rs: J2::radial_return, J2::tangent.
  • crates/fem/src/finite.rs: total Lagrangian element loops, Kinematics, Temperature.
  • crates/fem/src/hybrid.rs, crates/fem/src/plane.rs: hybrid pressure fields and mean dilatation.
  • crates/fem/src/face.rs: follower_pressure, follower_edge_pressure.
  • crates/solver/src/ldlt.rs: the indefinite factorization and inertia.
  • crates/model/src/steps.rs: NonlinearStatic, Tolerances, ArcLength, Imperfection, validation and load_factor.
  • crates/engine/src/cmd/solve.rs: solve.nonlinear (run_nonlinear), solve.history (nonlinear_history).

References

  • M. Itskov. On the applicability of generalized strain measures in large strain plasticity. Trends and Applications of Mathematics to Mechanics, pp. 101–113, 2005. doi:10.1007/88-470-0354-7_10, eq. (60), Fig. 1.
  • C. Miehe, N. Apel, M. Lambrecht. Anisotropic additive plasticity in the logarithmic strain space: modular kinematic formulation and implementation based on incremental minimization principles for standard materials. CMAME 191:5383–5425, 2002. doi:10.1016/S0045-7825(02)00438-3.
  • K.-J. Bathe. Finite Element Procedures, 2nd ed., 2014 (§8.4).
  • K.-J. Bathe, A. P. Cimento. Some practical procedures for the solution of nonlinear finite element equations. CMAME 22:59–85, 1980.
  • M. A. Crisfield. Non-linear Finite Element Analysis of Solids and Structures, vol. 1, Wiley 1991 (ch. 9).
  • M. A. Crisfield. A fast incremental/iterative solution procedure that handles “snap-through”. Comput. Struct. 13:55–62, 1981.
  • M. Feng, D. Perić, D. R. J. Owen. A new criterion for determination of initial loading parameter in arc-length methods. Comput. Struct. 58(3):479–485, 1996.
  • J. C. Simo. CMAME 99:61–112, 1992 (the exponential return map of finite-strain plasticity).
  • J. C. Simo, T. J. R. Hughes. Computational Inelasticity, Springer 1998 (Box 3.2).
  • J. C. Simo, F. Armero. Geometrically non-linear enhanced strain mixed methods and the method of incompatible modes. IJNME 33:1413–1449, 1992.
  • P. Wriggers, S. Reese. A note on enhanced strain methods for large deformations. CMAME 135:201–209, 1996.
  • S. Glaser, F. Armero. On the formulation of enhanced strain finite elements in finite deformations. Engineering Computations 14(7):759–791, 1997.
  • S. Reese, P. Wriggers, B. D. Reddy. A new locking-free brick element technique for large deformation problems in elasticity. Computers & Structures 75(3):291–304, 2000.
  • G. A. Holzapfel. Nonlinear Solid Mechanics, Wiley 2000 (eqs. 6.168, 6.193).
  • T. J. R. Hughes. The Finite Element Method, Dover 2000 (§4.3–4.5).
  • J. C. Nagtegaal, D. M. Parks, J. R. Rice. On numerically accurate finite element solutions in the fully plastic range. CMAME 4(2):153–177, 1974.
  • F. Brezzi, M. Fortin. Mixed and Hybrid Finite Element Methods, Springer 1991 (ch. VI).
  • K. Schweizerhof, E. Ramm. Displacement dependent pressure loads in nonlinear finite element analyses. Comput. Struct. 18(6):1099–1114, 1984.
  • V. A. Lubarda. Constitutive theories based on the multiplicative decomposition of deformation gradient: thermoelasticity, elastoplasticity, and biomechanics. Appl. Mech. Rev. 57(2):95–108, 2004.
  • M. Mooney. J. Appl. Phys. 11:582–592, 1940; R. S. Rivlin. Phil. Trans. R. Soc. A 241:379–397, 1948; O. H. Yeoh. Rubber Chem. Technol. 66(5):754–771, 1993.

Explicit dynamics

An explicit dynamic step computes the transient response of a solid model to impact, wave propagation, short-duration loads and large, fast deformation. It integrates the equations of motion with the central-difference scheme on a lumped mass matrix, so each time increment is one pass over the elements, and the increment is bounded by the elements’ highest frequencies. The elements are updated Lagrangian with an objective stress rate; materials are hypoelastic, J2 plastic with Johnson–Cook damage and element erosion, or hyperelastic.

Commandssolve.explicit (solve), model.step.create / model.step.edit (define), interaction.rigid_wall, solve.history (histories), solve.probe (frames)
Step procedure"explicit_dynamic"
Solvercrates/explicit (CPU, f64)
MethodCentral differences with variable increments (Belytschko, Liu, Moran & Elkhodary 2014, Box 6.1); Flanagan–Belytschko one-point hexahedron; Bonet–Burton average nodal pressure tetrahedron
Verified bycrates/explicit/tests/*.rs; oracle cases bar-pressure-wave, bar-rigid-wall-impact, j2-uniaxial-explicit, explicit-neo-hookean-implicit, explicit-* (contact)

Synopsis

[
  {"command": "model.step.create", "params": {
    "name": "Impact",
    "procedure": {"type": "explicit_dynamic", "end_time": 0.001, "dt_scale": 0.9,
                  "history_nodes": "front",
                  "initial_velocities": [{"set": "bar", "velocity": [-190, 0, 0]}],
                  "rigid_walls": [{"set": "front", "point": [0, 0, 0], "normal": [1, 0, 0]}]},
    "output": ["displacement", "stress"]}},
  {"command": "solve.explicit", "params": {"step": "Impact"}}
]

Parameters

Step procedure (model.step.create, "type": "explicit_dynamic"):

FieldValueDefaultMeaning
end_time> 0requiredDuration of the step.
dt_scale(0, 1]0.9Fraction of the stable time increment taken.
max_increments1 to 10⁹10⁷Cap on the time increments; the run stops early and says so.
output_interval> 0end_time/20Time between field frames; at most 10 000 frames over the step.
history_interval> 0end_time/1000Time between history samples; at most 10⁶ samples.
history_nodessetnoneNodes whose displacement and velocity are recorded as histories (at most 1000 nodes).
initial_velocities[{"set", "velocity": [vx, vy, vz]}]noneVelocities at the start; a node in several sets takes the last one listed.
rigid_walls[{"set", "point", "normal", "friction"}]noneFixed rigid planes the set’s nodes cannot pass; the normal points to the side the nodes stay on (contact).
hourglass{"type": "viscous" | "stiffness", "coefficient"}viscous, 0.1Hourglass control of one-point hexahedra; coefficient 0 to 0.25.
bulk_viscosity{"linear", "quadratic"}0.06, 1.5Artificial bulk viscosity coefficients, each 0 to 10.
nonlinear_geometrybooltrueUpdated Lagrangian kinematics; false keeps the gradients of the undeformed mesh.
stress_rate"jaumann" | "green_naghdi""jaumann"The objective stress rate of large deformation.
mass_scaling{"target_increment", "set"}noneOpt-in mass scaling to a target increment (> 0, at most end_time), over a set or every element.

The lists of initial velocities and of rigid walls hold at most 10 000 entries each. output defaults to ["displacement", "stress"]; "strain" adds the strain to the frames.

Command solve.explicit:

FieldValueDefaultMeaning
stepnamethe only explicit dynamic stepThe step to solve.
max_dofsinteger6 000 000Cap on degrees of freedom; may only be lowered.
max_incrementsinteger10⁹Cap on increments; the step’s own cap applies too. May only be lowered.
max_output_valuesinteger50 000 000Numbers kept in frames and histories together (8 bytes each); may only be lowered.
max_contact_facesinteger10 000 000Element faces of every contact surface together; may only be lowered.
threads1 to 256the session’sChanges the time, never the result.

Material options (model.material.create): a density is required; plastic (bilinear isotropic or kinematic, table, johnson_cook with a, b, n, c, m, reference_strain_rate, room_temperature, melt_temperature, specific_heat, taylor_quinney (default 0.9)); damage: {"type": "johnson_cook", "d1", "d2", "d3", "d4", "d5"}; erosion: {"plastic_strain"}; hyperelastic as in nonlinear static.

Theory

Central differences

With a diagonal (lumped, row-sum) mass M, Δtⁿ = ½(Δt^{n−½} + Δt^{n+½}):

aⁿ       = M⁻¹ (f_ext + cⁿ − f_int(uⁿ, v^{n−½}))
v^{n+½}  = v^{n−½} + Δtⁿ aⁿ
u^{n+1}  = uⁿ + Δt^{n+½} v^{n+½}

cⁿ are the contact forces. The run starts from u = 0 and the initial velocities with the half increment v^{½} = v⁰ + ½Δt^{½} a⁰. Loads act in full from the start of the step (forces, tractions, pressure on the undeformed faces with consistent nodal forces, gravity and body forces with the lumped weights, centrifugal loads); a displacement boundary condition with a value is reached at constant velocity over the step (value / end_time), a zero value holds the node.

Kinematics and stress update

With nonlinear geometry the elements are updated Lagrangian (Belytschko et al. 2014, ch. 4 and 6). The strain and spin increments come from the displacement increment and the gradients of the midpoint configuration x_{n−½} = X + uₙ − ½Δu,

ΔG = (1/V) Σ_I Δu_I ⊗ b_I(x_{n−½})

which makes the update incrementally objective (Hughes & Winget 1980); the nodal forces use the current configuration’s gradients, f_iI = σ_ij b_jI(xₙ). The material state (stress, back stress, accumulated strain, stiffness-form hourglass forces) is rotated with the increment’s rotation (the Cayley transform of the spin increment for the Jaumann rate, the increment of the polar rotation for the Green–Naghdi rate, Flanagan & Taylor 1987), then the constitutive increment is added: hypoelastic, or J2 radial return with Johnson–Cook damage. Orthotropic elasticity is updated in the polar frame whichever rate the step names. Without nonlinear geometry both gradients are those of the undeformed mesh: small-strain elasticity and plasticity.

Elements

ElementFormulation
hex8, reduced integrationOne-point uniform-strain hexahedron with Flanagan–Belytschko hourglass control (1981)
tet4, full integrationAverage nodal pressure tetrahedron (Bonet & Burton 1998), in rate form
rod2Elastic truss, lumped (HRZ) mass; corotational under nonlinear geometry: strain (l − L)/L, force along the current axis
rod3Elastic truss with small displacements (K u)

Hourglass control. With the hourglass shape vectors γ_α of the current configuration and the rates q̇_iα = Σ_I v_iI γ_αI, the generalized forces are Q_iα = C q̇_iα (viscous) or accumulate as Q_iα += k Σ_I Δu_iI γ_αI (stiffness, rotated with the element), giving f_iI = Σ_α Q_iα γ_αI. The γ_α are orthogonal to linear fields, so the forces do no work in a constant strain state. With the dimensionless coefficient κ, the element size h = V / √(2 λ_max(Σ b bᵀ)), density ρ and wave speed c:

C = κ ρ c h² / 16     (damps a cube's hourglass modes at κ of critical at 2c/h)
k = κ ρ c² h / 16     (puts their frequency at √κ · 2c/h)

These normalisations are FieldCraft’s; the paper leaves the scale to the user.

Average nodal pressure. Each node’s volumetric strain increment is the volume-weighted mean of its tetrahedra’s; each tetrahedron takes the mean of its nodes’ as its own, so its pressure increment is K times that mean while the deviator is its own. It does not lock when the material is nearly incompressible or flows plastically.

Bulk viscosity (von Neumann & Richtmyer 1950; Wilkins 1980). In compression (ε̇ᵥ < 0) the pressure

q = ρ L (C_q L ε̇ᵥ² − C_l c ε̇ᵥ)

spreads shocks over a few elements and damps ringing behind wave fronts.

Stable time increment

Each element’s stable length L = 2c/ω_max comes from the bound on its highest frequency in its current shape (fieldcraft_fem::uniform, with the element’s lumped masses, plus the hourglass stiffness when it is used), so without bulk viscosity its critical increment is 2/ω_max (Belytschko et al. 2014, §6.3). With bulk viscosity

Δt = L / (Q + √(Q² + c²)),   Q = C_l c + C_q L |ε̇ᵥ|

The elastic moduli bound the tangent moduli of plastic flow, so the bound holds for the inelastic materials. The increment taken is dt_scale times the smallest over the elements.

Springs and dashpots have their own bound per degree of freedom: with ω² ≤ Σⱼ |Kᵢⱼ| / √(mᵢ mⱼ) (Gershgorin, exact for one spring on one mass) and the same row sum D of the damping, central differences with lagged damping are stable for Δt ≤ (2/ω)(√(1 + ξ²) − ξ), ξ = D/(2ω), which is 2/D for a dashpot alone (Belytschko et al. 2014, §6.3). Penalty contact never shortens the increment (contact).

Materials

MaterialExplicit update
Isotropic elasticHypoelastic
Orthotropic elastic (engineering constants)Hypoelastic in the polar frame; hex8 only (nodal-pressure tet4 refused)
J2 plastic, bilinear isotropic or kinematic, tableRadial return (Simo & Hughes 1998, §3.3): linear hardening in closed form, a table segment by segment
Johnson–Cookσ_y = (A + B ε_pⁿ)(1 + C ln ε̇*)(1 − Tᵐ), ε̇ = ε̇_p/ε̇₀ taken as at least 1, T* = (T − T_room)/(T_melt − T_room) clamped to [0, 1]; scalar Newton with bisection, at most 100 iterations
Hyperelastic (neo-Hookean, Mooney–Rivlin, Yeoh)Total form on the shared finite-strain material point

Adiabatic heating. With a specific_heat, plastic work heats a Johnson–Cook material, ΔT = χ q Δε_p / (ρ c_p), χ the Taylor–Quinney fraction; the temperature used is that at the start of the increment. Mass scaling keeps the physical density for this.

Johnson–Cook damage (Johnson & Cook 1985). D ← D + Δε_p / ε_f with

ε_f = (D1 + D2 e^{D3 σ*})(1 + D4 ln ε̇*)(1 + D5 T*)

σ* the mean stress over the von Mises stress after the increment. A fracture strain below 10⁻⁶ counts as 10⁻⁶. The point has failed at D ≥ 1.

Erosion (Johnson & Stryk 1987; Belytschko & Lin 1987). An element whose material point fails (damage 1) or reaches its material’s erosion.plastic_strain is removed: it carries no stress from then on, its nodes keep their mass and momentum, its internal energy at that moment is reported, and its faces leave contact.

Hyperelastic materials use the shared finite-strain material point (fieldcraft_fem::constitutive) in total form, objective by construction (no stress rate). The one-point hexahedron takes F = I + ∂u/∂X, its mean over the undeformed element, and the Cauchy stress τ/J. The tetrahedron takes the isochoric stress of its own F and the average nodal pressure of a decoupled material (each node’s U′(J_a) from its tetrahedra’s volume ratio, the element’s the mean of its nodes’: Bonet & Burton 1998 at finite strain), which does not lock when the material is nearly incompressible. (Averaging J into an F-bar was unstable on the Kuhn mesh of the tests.) The stable increment follows the tangent: each element’s frequency bound is scaled by the ratio of its tangent’s largest normal stiffness, plus the stress, to the small-strain one. Logarithmic strain is the strain output.

Thermal strain. A step’s temperature loads strain the solid elements: each element’s mean nodal temperature change from its material’s reference is reached linearly over the step, so the thermal strain α ΔT grows at the rate α ΔT / end_time (no thermal shock at the start). Trusses take no thermal strain (a warning says so).

Mass scaling

Opt-in per step: every solid element (of the set, or of the model) whose stable increment times the step’s scale is below target_increment has its density raised by (target / increment)², which brings its increment to the target. Its lumped masses, frequency bound and hourglass and bulk-viscosity scales follow; adiabatic heating keeps the physical density. The kinetic energy of the added mass is reported (energy.added_kinetic, part of the kinetic energy, so the balance holds).

Energy account

The works of the internal, contact and external forces are integrated by the trapezoidal rule, W += ½ Δu · (f^{n−1} + fⁿ) (exactly the strain energy for a linear elastic material); the constraints’ work as Δtⁿ rⁿ · ½(v^{n−½} + v^{n+½}) (exactly the kinetic energy their impulses add or remove); the kinetic energy from vⁿ = v^{n−½} + ½Δt^{n−½} aⁿ. The balance

kinetic + internal + hourglass + viscous + contact − external − constraint − initial kinetic

is zero when energy is conserved; it is reported relative to the largest energy in the account.

Algorithm

  1. Build the system. Resolve the model; refuse what the solver cannot take (see Limitations). Contact interfaces first: nodes that start inside a surface are moved onto it before the elements are built (or the run is refused), as each contact’s initial_penetration says. Lump the masses (row sum) with point masses, apply mass scaling, set prescribed velocities, rigid walls, initial velocities and the constant load vector.
  2. Check the size. Find every element’s critical increment and the springs’ bound. Refuse the run when the estimated increments end_time / (scale · smallest) exceed the cap (naming the controlling element), or when the frames and histories would exceed max_output_values.
  3. Increment (Belytschko et al. 2014, Box 6.1):
    1. uⁿ = u^{n−1} + Δt^{n−½} v^{n−½}; tⁿ = t^{n−1} + Δt^{n−½};
    2. internal forces fⁿ from uⁿ (stresses, hourglass stiffness) and v^{n−½} (hourglass and bulk viscosity), and the next increment Δt^{n+½} = dt_scale · min_e Δt_e;
    3. contact forces cⁿ at uⁿ with the stable increment Δt^{n+½}; v^{n+½} = v^{n−½} + Δtⁿ M⁻¹(f_ext + cⁿ − fⁿ); then the constraints: rigid walls set the normal velocity of a node that would cross its wall so it lands on it (Hughes et al. 1976), with Coulomb friction as a tangential impulse at most μ times the normal one; prescribed degrees of freedom take their velocity; an inclined symmetry plane removes its nodes’ velocity along its normal (the mass-weighted projection onto the constraint). The change a constraint makes is the impulse of its reaction, rⁿ = M Δv / Δtⁿ;
    4. energies; erosion of failed elements; history samples and field frames when due.
  4. Stop at end_time, or at the increment cap with completed: false and a warning. A solution that stops being finite, or an element that turns inside out, is an error naming the time and increment or the element.
  5. Report. Warn when the energy balance is off by more than 1 % of the largest energy, when hourglass energy exceeds 10 % of the largest internal energy of the run, when elements eroded, when mass scaling added mass, and when a spring or dashpot limits the increment.

Elements are updated on threads, each owning its state, and their nodal forces are added in label order; contact forces are added face by face in a fixed order. The same model gives the same numbers bit for bit on any number of threads.

Output

The reply of solve.explicit:

FieldContent
step, dofs, elementsThe step and the system’s size
increments, time, completedIncrements taken, time reached, whether the step ended at end_time
initial_incrementThe first increment (the scale times the smallest critical increment)
controlling_elementsUp to ten elements with the smallest critical increments, at rest and before the scale
total_massModel mass (point masses with their mean over the three directions)
energykinetic, internal, hourglass, viscous, external, constraint, contact, added_kinetic, friction, plastic, eroded, balance
energy_balanceThe balance relative to the largest energy
frames, history_samplesCounts of field frames and history samples
erodedPer eroded element: label, time, failure (damage or plastic strain), internal_energy
contactsPer contact: nodes adjusted at the start, peak_force and peak_time, first_contact, last_contact, max_penetration, friction
mass_scalingtarget_increment, elements, added_mass, fraction of the model’s mass, added mass per section
warningsAs listed under Algorithm

Field frames (solve.probe with frame, results.frame): per node displacement and velocity; per element (one value each) the stress and, with "strain" output, the accumulated strain (small strain: the strain; large deformation: the integral of the rate of deformation, rotated with the material; hyperelastic: logarithmic); with plasticity the equivalent plastic strain, damage, temperature (NaN where the material has none) and whether the element has eroded.

Histories (solve.history): time, increment, the energy account, total momentum, the sum of the forces of the boundary conditions and rigid walls, the normal force across each contact, and the history nodes’ displacement and velocity.

Worked example

The drop-test sample: an aluminium L-bracket dropped 2 m onto a rigid floor tilted 15°, so the end of its foot strikes first. One-point hex8 elements with stiffness hourglass control, bilinear plasticity, a rigid wall, gravity, and the energy account that checks the integration.

GeometryL-bracket: 60 × 40 mm foot, 50 mm upright, 8 mm thick, R6 fillet (SolidCraft, volume 32 949.2 mm³)
Mesh2 405 hex8 swept at 3 mm (mesh.hex.generate, "method": "extrude"), reduced integration, 3 192 nodes
Materialaluminium: E = 70 GPa, ν = 0.33, ρ = 2 700 kg/m³; bilinear plasticity, yield 240 MPa, hardening modulus 700 MPa, isotropic
Initial conditionsevery node at √(2 g h) = 6 264.2 mm/s along −z (h = 2 000 mm, g = 9.81 m/s²)
Loads, contactgravity; rigid wall through (60, 0, −0.1) mm with normal (−sin 15°, 0, cos 15°)
StepDrop: explicit dynamic, end_time 1 ms, output_interval 50 µs, history_interval 5 µs, hourglass stiffness 0.05; dt_scale and bulk viscosity at their defaults (0.9; 0.06, 1.5)
Unitsmm, t, s, N, MPa
[
  {"command": "file.sample", "params": {"name": "drop-test"}},
  {"command": "solve.explicit", "params": {"step": "Drop"}},
  {"command": "results.frame", "params": {"step": "Drop", "frame": 2}},
  {"command": "results.contour", "params": {"step": "Drop", "field": "von_mises"}},
  {"command": "results.deformed", "params": {"step": "Drop", "show": true, "scale": 1}}
]

Results from the solve.explicit reply (7.7 s, Apple M4 Max, CPU) and results.frame:

QuantityFieldCraftReferenceDifference
increments to 1 ms10 119 (mean 9.88 × 10⁻⁸ s)——
Smallest critical increment at rest (controlling_elements, elements 1158, 1159, …)1.1646 × 10⁻⁷ s——
initial_increment9.8717 × 10⁻⁸ s0.9 × 1.1646 × 10⁻⁷ / (0.06 + √(1 + 0.06²)) = 9.871 × 10⁻⁸ s< 0.01 %
total_mass8.8975 × 10⁻⁵ tρ V = 8.8963 × 10⁻⁵ t+0.013 %
Kinetic energy at impact—½ m v² = 1 745.7 mJ—
energy at 1 ms: kinetic, internal, hourglass, viscous1 572.9, 152.0, 2.71, 15.2 mJ——
energy: external (gravity), constraint (wall), plastic3.07, −5.89, 0 mJ——
energy_balance1.4 × 10⁻⁵conserved—
Largest von Mises stress over the frames129.2 MPa at 0.1 ms (frame 2, node 1107)below the 240 MPa yield—

What to look at. At 0.1 ms the compression wave has left the struck end of the foot and the upright’s inertia bends the fillet, where the von Mises stress peaks. It stays below yield in every frame, so the plastic energy is zero and the drop leaves no permanent set. The time increment is set by the elements with the highest frequency (controlling_elements): the initial increment is 0.9 of their critical increment, reduced by the linear bulk viscosity term, and the mean increment over the run stays within 0.1 % of it. The energy account closes to 1.4 × 10⁻⁵ of the largest energy: most of the impact energy is still kinetic at 1 ms (the bracket pivots onto its foot), 152 mJ is elastic vibration, and the bulk viscosity and hourglass control take 15.2 and 2.7 mJ.

Verification

Oracle cases (results):

CaseReferenceQuantityErrorTolerance
bar-pressure-wavetheory: 1D wave, σ = ρ c vloaded-end displacement; particle velocity behind the front; energy balance0.034 %; 1.45 %; 1.5·10⁻³1 %; 2 %; ± 0.01
bar-rigid-wall-impacttheory: contact for 2L/c, rebound at v₀struck-end and far-end displacement; kinetic energy after the rebound−0.46 %, −0.51 %; −0.54 %3 %; 2 %
j2-uniaxial-explicittheory: logarithmic strain 0.2axial Cauchy stress; plastic strain0.00017 %; < 10⁻⁶1 %
explicit-neo-hookean-implicitthe implicit nonlinear solver, quasi-static pulllateral corner displacement; σ_xx−0.092 %; 0.026 %0.5 %

Contact cases (explicit-bars-collision, explicit-contact-patch, explicit-sliding-block-*) are on the contact page.

Tests in crates/explicit/tests/:

TestCheckTolerance
verification.rs::pressure_wave_in_a_hex_barfront at L − c t, σ = −p, σ = ρ c v; work of the loadfront within 2 elements; 1 %; 0.5 %
verification.rs::velocity_wave_in_a_tet_barnodal-pressure tet4: front at c t, σ = −ρ c v3 elements; 2 %
verification.rs::bar_rebounds_from_a_rigid_wallhex8 and tet4: contact for 2L/c, rebound at v₀, kinetic energy kept, wall force1 %; 1 %; > 0.99; 3 %
one_d.rs::spring_mass_oscillationperiod 2π/ω, second-order phase error, energy10⁻⁴; 2·10⁻³ of amplitude; 10⁻³
one_d.rs::damped_decay_ratedashpot decay rate ξω and period1 %; 10⁻³
one_d.rs::velocity_wave_in_a_truss_barrod2 at its own increment L/c: σ = −ρ c v1 %
one_d.rs::whirling_mass_on_a_corotational_rodcorotational rod keeps its length, carries m v²/L—
one_d.rs::mass_scaling_slows_the_waves_as_the_added_density_saysscaled to twice a bar’s increment: added mass 3×, increment 2×, added kinetic share ¾10⁻⁹
large_deformation.rs::dienes_simple_shear_with_both_ratesDienes’ closed forms to γ = 6, Jaumann and Green–Naghdi2·10⁻³
large_deformation.rs::rigid_rotation_turns_the_stress_with_the_bodystress turns exactly through 90°10⁻¹²
large_deformation.rs::j2_uniaxial_stress_strain_curve_and_unloading_at_large_strainσ = σ_y + H ε_p to ln λ = 0.3, elastic unloading10⁻⁶
large_deformation.rs::taylor_bar_recovers_its_yield_stressTaylor’s estimate from the computed shape; energy balance25 %; 1 %
large_deformation.rs::johnson_cook_impact_erodes_elementserosion reported, heating, balance, bit-identical runsbalance 2 %
large_deformation.rs::damage_fails_an_element_at_its_fracture_strainfailure at ε_p = D1, no stress after10⁻¹²
hyperelastic.rs::hyperelastic_uniaxial_strain_matches_the_material_pointthree laws, hex8 and tet4, λ = 1.51 %
thermal.rsfree bar expands without stress; clamped bar carries −EαΔT up to yield2 %
inclined_symmetry.rsturned symmetry planes move as the axis-aligned ones and the whole10⁻¹²
verification.rs::runs_are_bit_identical, caps_and_unsupported_models_are_errorsdeterminism; caps and refusalsexact

Pending: taylor-bar (copper, Wilkins & Guinan 1973) waits for the measured shapes to be transcribed.

Limitations

  • Elements: one-point hex8 (reduced integration), full-integration tet4, rod2 and rod3. Fully integrated or incompatible-mode hex8, reduced tet4, hybrid sections, quadratic solids, 2D elements, shells and beams are refused. rod3 is small-displacement only.
  • Orthotropic materials are refused on nodal-pressure tet4, and with plasticity, damage or erosion; orthotropic thermal expansion is refused.
  • Hyperelastic materials need nonlinear geometry and take no thermal strain (both refused by name).
  • Couplings, ties, boundary conditions and loads on reference points, moments, temperature boundary conditions and heat loads are refused. Rotary inertia and rotational springs need rotational degrees of freedom, which the solver does not have.
  • Pressure loads act on the undeformed faces with constant magnitude.
  • The faces exposed by eroded elements do not join contact.
  • Every material needs a density.

Implementation

  • crates/explicit/src/integrate.rs: solve_explicit, the time loop, constraints, energy account, output schedule, warnings.
  • crates/explicit/src/elements.rs: hexahedron and tetrahedron forces, stress update, hourglass, bulk viscosity, critical increments, erosion (Failure).
  • crates/explicit/src/system.rs: the explicit system from the model, materials, refusals, mass scaling, loads, temperatures, prescribed velocities.
  • crates/explicit/src/discrete.rs: trusses, point masses, springs and dashpots.
  • crates/explicit/src/contact.rs: penalty contact (contact).
  • crates/explicit/src/result.rs: ExplicitResult, Energies, Frame, History.
  • crates/fem/src/plasticity.rs: J2::radial_return, Johnson–Cook flow and damage.
  • crates/fem/src/rotation.rs, crates/fem/src/uniform.rs: objective rotations, frequency bounds.
  • crates/model/src/steps.rs: ExplicitDynamic, Hourglass, BulkViscosity, MassScaling, StressRate.

References

  • T. Belytschko, W. K. Liu, B. Moran, K. Elkhodary. Nonlinear Finite Elements for Continua and Structures, 2nd ed., Wiley 2014.
  • D. P. Flanagan, T. Belytschko. IJNME 17(5):679–706, 1981 (uniform strain hexahedron and hourglass control).
  • J. Bonet, A. J. Burton. A simple average nodal pressure tetrahedral element for incompressible and nearly incompressible dynamic explicit applications. Commun. Numer. Methods Eng. 14(5):437–449, 1998. doi:10.1002/(SICI)1099-0887(199805)14:5<437::AID-CNM162>3.0.CO;2-W
  • T. J. R. Hughes, J. Winget. IJNME 15(12):1862–1867, 1980 (incrementally objective integration).
  • D. P. Flanagan, L. M. Taylor. CMAME 62(3):305–320, 1987 (Green–Naghdi rate).
  • J. von Neumann, R. D. Richtmyer. J. Appl. Phys. 21(3):232–237, 1950.
  • M. L. Wilkins. J. Comput. Phys. 36(3):281–303, 1980.
  • T. J. R. Hughes, R. L. Taylor, J. L. Sackman, A. Curnier, W. Kanoknukulchai. A finite element method for a class of contact-impact problems. CMAME 8(3):249–276, 1976.
  • J. C. Simo, T. J. R. Hughes. Computational Inelasticity, Springer 1998.
  • G. R. Johnson, W. H. Cook. A constitutive model and data for metals subjected to large strains, high strain rates and high temperatures. Proc. 7th Int. Symp. on Ballistics, The Hague, 541–547, 1983.
  • G. R. Johnson, W. H. Cook. Fracture characteristics of three metals subjected to various strains, strain rates, temperatures and pressures. Eng. Fract. Mech. 21(1):31–48, 1985. doi:10.1016/0013-7944(85)90052-9
  • G. R. Johnson, R. A. Stryk. Eroding interface and improved tetrahedral element algorithms for high-velocity impact computations in three dimensions. Int. J. Impact Eng. 5:411–421, 1987. doi:10.1016/0734-743X(87)90057-1
  • T. Belytschko, J. I. Lin. A three-dimensional impact-penetration algorithm with erosion. Int. J. Impact Eng. 5:111–127, 1987. doi:10.1016/0734-743X(87)90033-9

Element library

The finite elements of crates/fem that the structural solvers assemble: continuum solids, 2D continua (plane stress, plane strain, axisymmetric), flat shells, Timoshenko beams, trusses and the discrete point masses, springs and dashpots. Every element is isoparametric over one shared shape-function library and declares its nodal and condensed unknowns through one degree-of-freedom layout, so solids, shells, beams and trusses share nodes in one mesh. A section assigns the element kind’s formulation (integration, incompatible modes, hybrid) to the elements of a set. The library’s scope is modelled on what a full CAE code offers (Abaqus’s element library is the reference for breadth); names, formulations and tests are FieldCraft’s own, written from the published literature, and the deck writers map each element to each solver’s name (crates/decks).

Commandsmodel.section.create, model.section.edit; model.mass.create, model.spring.create (discrete elements)
Step procedureevery structural procedure; which elements each accepts is in Availability by procedure
Solvercrates/fem kernels, assembled by crates/solver (implicit, CPU, f64) and crates/explicit
Methodisoparametric displacement elements (Zienkiewicz, Taylor & Zhu 2013; Hughes 2000), incompatible modes (Wilson et al. 1973; Taylor, Beresford & Wilson 1976), mixed u–p (Hughes 2000 §4.3–4.5), MITC shells (Dvorkin & Bathe 1984; Lee & Bathe 2004), interdependent Timoshenko beam (Friedman & Kosmatka 1993), pipes under pressure (Lamé in Timoshenko & Goodier 1970; Sparks 1984)
Verified bypatch tests of every element and formulation, patch-*, mh-solid-patch, cantilever-*, lame-cylinder*, kirsch-plate*, mh-thick-cylinder, NAFEMS LE1–LE7, scordelis-lo-roof-*, pinched-cylinder, pinched-hemisphere, pipe-closed-pressure, pipe-pressure-loop; crates/solver/tests/{verification,plane,structural,hybrid,one_d}.rs (including euler_bernoulli_cantilever_deflection_is_exact, euler_bernoulli_portal_frame_matches_the_slope_deflection_solution, euler_bernoulli_cantilever_frequencies), crates/fem/src/basis.rs tests

Synopsis

A solid section with incompatible-mode hexahedra, a hybrid section for rubber, a shell, a Timoshenko beam and an Euler–Bernoulli beam:

{"command": "model.section.create", "params": {"name": "body", "set": "all", "material": "Steel",
  "kind": {"type": "solid"}, "formulation": {"integration": "full", "incompatible_modes": true}}}
{"command": "model.section.create", "params": {"name": "seal", "set": "rubber", "material": "Rubber",
  "kind": {"type": "solid"}, "formulation": {"hybrid": true}}}
{"command": "model.section.create", "params": {"name": "skin", "set": "panel", "material": "Al",
  "kind": {"type": "shell", "thickness": 2, "offset": 0, "points": 5}}}
{"command": "model.section.create", "params": {"name": "frame", "set": "members", "material": "Steel",
  "kind": {"type": "beam", "profile": {"type": "i", "height": 100, "width": 50, "web": 5, "flange": 8},
           "orientation": [0, 0, 1]}}}
{"command": "model.section.create", "params": {"name": "post", "set": "posts", "material": "Steel",
  "kind": {"type": "beam", "profile": {"type": "rectangle", "width": 20, "height": 20},
           "orientation": [0, 1, 0]},
  "formulation": {"beam_theory": "euler_bernoulli"}}}

Parameters

Section kind (kind)

FieldValueDefaultMeaning
typesolid—continuum solid elements (tet4, tet10, wedge6, pyramid5, hex8, hex20)
typeplane_stress—2D continuum, σzz = 0; thickness required
typeplane_strain—2D continuum, εzz = 0; thickness 1 mm by default
typeaxisymmetric—2D continuum in the half plane x ≥ 0, revolved about Y; forces, reactions and masses are totals over 2π
twisttrue, falsefalseaxisymmetric sections: a third unknown per node, the hoop displacement u_θ (degree of freedom 3), for torsion
typeshell—flat MITC shells (tri3, quad4)
thickness> 0—shell or plane stress/strain thickness
offset−0.5 to 0.50shell reference surface offset from the mid-surface, as a fraction of the thickness (0.5: on the side the normal points to)
points1 to 155shell integration points through the thickness
typebeam—two-node beam (beam2): Timoshenko, or Euler–Bernoulli by the formulation
profilerectangle {width, height}, circle {radius}, pipe {radius, thickness}, i {height, width, web, flange}, box {width, height, thickness}, general {area, iy, iz, torsion, shear_y, shear_z}—the cross-section; width along local y, height along local z; a general profile gives the section properties directly in the principal local axes (iy = ∫ z² dA, iz = ∫ y² dA), refused when no section could have them: a shear area above the area, a torsion constant above iy + iz, or iy + iz below A²/2π (a disc’s)
orientation[x, y, z], nonzero, not along the beam—the profile’s local y direction, projected normal to each beam’s axis; in a 2D model along Z ([0, 0, 1]): the width out of the plane, the height in it
typerod—truss (rod2, rod3)
area> 0—truss cross-sectional area

A 2D model is 2D as a whole: its elements lie in the XY plane, and 2D and solid sections are not mixed in one model. Trusses and beams join a plane stress or plane strain model: a truss node carries Ux and Uy, a beam node Ux, Uy and Rz. A model of trusses or beams alone is a 3D model.

Formulation (formulation)

FieldValueDefaultMeaning
integrationfull, reducedfullreduced exists for hex20 (2 × 2 × 2) and quad8 (2 × 2), and for hex8 in explicit dynamics (one point with hourglass control); elsewhere it is refused
incompatible_modestrue, falsefalseenhanced bending modes: hex8 (solid sections) and quad4 (2D sections) only; needs full integration
hybridtrue, falsefalsemixed displacement–pressure: solid, plane strain and axisymmetric sections only; isotropic materials only
beam_theorytimoshenko, euler_bernoullitimoshenkobeam sections only; Euler–Bernoulli is the shear-rigid Hermite cubic element without rotary inertia in bending

Discrete elements

CommandFieldsMeaning
model.mass.createtarget ({"set"} or {"reference_point"}), mass (a number or [mx, my, mz]), inertia [I11, I22, I33, I12, I13, I23]a point mass at every node of the target, each with the full value; rotary inertia needs rotations (a reference point)
model.spring.createtype spring (stiffness) or dashpot (coefficient); first, second (optional); direction {"dof": 1..6}, {"vector": [x, y, z]} or "line"without second each node of first connects to the ground; dof 4–6 is torsional; "line" acts along the two ends (two-point only)

Theory

Degrees of freedom

Every unknown is a pair (node, DofKind):

DofKindMeaningModel / deck number
Ux, Uy, Uztranslations along X, Y, Z1, 2, 3
Rx, Ry, Rzrotations about X, Y, Z4, 5, 6
Ppressure (mixed u–p elements)8
Ttemperature11
E1, E2the field unknowns of an edge element’s edges and faces (fieldcraft_fem::nedelec)none

The enum order (Ux, Uy, Uz, Rx, Ry, Rz, T, P, E1, E2) is the numbering order within a slot. DofKind::from_number / number convert to the 1-based numbers boundary conditions use (number is None for E1 and E2); from_direction / direction to the structural directions 0–5.

An element declares its unknowns as ElementDofs { node: DofSet, internal: Internal }: the kinds every node of the element carries (DofSet::TRANSLATIONS for solids, PLANE for 2D elements, PLANE_FRAME (Ux, Uy, Rz) for the beams of a 2D model, STRUCTURAL for shells and beams, TEMPERATURE for heat conduction, translations plus PRESSURE for continuous-pressure mixed elements), and the internal unknowns it condenses out itself (incompatible_modes, discontinuous pressure), which never reach the global system. Element matrices are ordered node by node, the node’s kinds in DofKind order (a shell’s 24 × 24 stiffness: node 1 Ux Uy Uz Rx Ry Rz, node 2 …). Solid elements give theirs through Formulation::dofs() / Solid::dofs(); trusses declare fieldcraft_fem::truss::DOFS (translations on Basis::Line2 / Line3).

Numbering (DofLayout). DofLayout::builder() collects what every node needs (element(labels, dofs); node(label, kinds) for constraints and boundary conditions that need a kind no element gives; edge([a, b], kinds) and face([a, b, c], kinds) for the unknowns of mesh edges and faces, which edge elements declare; point(label, kinds) for reference points), then build(). A node, edge or face carries the union of what was asked for. Unknowns are numbered mesh nodes in label order, then the edges and the faces that carry unknowns, each in the order of their sorted labels, then the points in the order added; within a slot its kinds are in DofKind order and its unknowns are contiguous, so a node pair is one dense block in the assembled matrix, and the same model always gives the same numbering. Lookups: node(label) / slot(label) (mesh nodes 0..nodes()), edge([a, b]) and face([a, b, c]) (either order; None for one without unknowns or with a repeated node), point_slot(k), dof(slot, kind), range(slot), kinds(slot), locate(dof) -> (slot, kind), element_dofs(slots, kinds), describe(dof), stride() (uniform layouts).

The implicit system (fieldcraft_solver::system::Mesh::layout) numbers the mesh nodes, then six unknowns per coupled reference point. Assembly (sparse::add_block(k, layout, slots, kinds, data), add_scalar, add_diagonal) works for any mix of kinds per node, so a solid sharing nodes with a shell adds its translation block into the shell nodes’ six-unknown blocks. Boundary conditions and loads address (node, kind): a boundary condition holds the kinds a node carries, and a moment needs rotations. The explicit solver has solid and truss nodes only and checks that its layout is the uniform node-major one (NODE_DOFS = 3).

Shape functions

Basis is every family’s interpolation:

FamilyReference elementNodes
Line2, Line3ξ ∈ [−1, 1]ends −1, 1; line3 adds the middle
Tri3, Tri6ξ, η ≥ 0, ξ + η ≤ 1corners (0,0), (1,0), (0,1); mid-sides of 1-2, 2-3, 3-1
Quad4, Quad8, Quad9[−1, 1]²corners counter-clockwise from (−1,−1); mid-sides of 1-2, 2-3, 3-4, 4-1; centre
Tet4, Tet10unit tetrahedroncorners (0,0,0), (1,0,0), (0,1,0), (0,0,1); mid-sides of 1-2, 2-3, 3-1, 1-4, 2-4, 3-4
Wedge6, Wedge15triangle × ζ ∈ [−1, 1]bottom 1-3, top 4-6; mid-sides of the bottom edges, top edges, vertical edges
Pyramid5base [−1, 1]² at ζ = 0, apex (0, 0, 1)base corners as quad4, then the apex
Hex8, Hex20, Hex27[−1, 1]³corners 1-4 at ζ = −1, 5-8 above; hex20 mid-sides (bottom, top, vertical edges); hex27 face centres in ElementKind::Hex8.faces() order, then the centre

Node orders are the model’s (ElementKind::edges() / faces() are the single source): corners, mid-side nodes in edge order, face nodes, body nodes. tri6 corners are N = L(2L − 1) and its mid-sides N = 4 Lₐ L_b in area coordinates L₁ = 1 − ξ − η, L₂ = ξ, L₃ = η; quad8 and hex20 are serendipity, quad9 and hex27 Lagrange. The pyramid’s rational functions N = ¼[(1 − ζ) + ξξᵢ + ηηᵢ + ξᵢηᵢ ξη / (1 − ζ)], N₅ = ζ are linearly complete and conform with neighbouring tetrahedra and hexahedra (Bedrosian 1992); at the apex the rational term and its derivatives take their limit along the axis, zero, and quadrature points never lie there. quad9, hex27 and wedge15 exist as shape functions; no element uses them yet.

Basis::of(ElementKind) maps a model element; nodes() gives natural node coordinates; dim(), count(), corners(), degree() (the complete polynomial degree reproduced: 1 for the linear families including the rational pyramid, 2 for the quadratic ones). Evaluation at a natural point xi: [f64; 3] (unused coordinates zero):

  • eval(xi) -> Shape: values n and first derivatives dn[i] = ∂Nᵢ/∂(ξ, η, ζ). tet4, tet10, wedge6, hex8 and hex20 use the hand-written functions of shape.rs (the solid kernels’ path); the solid kernel’s pyramid5 uses the library’s.
  • eval2(xi) -> Shape2: adds d2n[i][a][b] = ∂²Nᵢ/∂ξₐ∂ξ_b, from second-order forward-mode automatic differentiation of the same formulas (jet::Jet), exact to round-off.
  • gradients(&shape, xyz) -> Gradients: physical dx[i] = ∇ₓNᵢ = J⁻¹ ∇_ξNᵢ and det J, with J_ab = ∂x_b/∂ξₐ; an inverted or collapsed element is Error::Degenerate.
  • hessians(&shape2, xyz) -> Hessians: physical d2x[i] = J⁻¹ (H_ξ − Σ_b (∂N/∂x_b) X_b″) J⁻ᵀ with X_b″ = Σᵢ x_{i,b} H_ξ(Nᵢ), the map’s second derivative (Hughes 2000, §3.9, §4.2), and laplacian(i). Without the X″ term a field linear in x would have a nonzero Hessian on a curved element.

A family of dimension d maps onto the first d physical coordinates (plane elements in x–y, lines along x). Elements embedded in a higher dimension (shells, beams, trusses in 3D) pass node coordinates in their own local frame.

Solid continuum elements

The isoparametric displacement formulation (Zienkiewicz, Taylor & Zhu 2013, ch. 6; Hughes 2000, ch. 3): K = ∫ Bᵀ D B dV and M = ∫ ρ Nᵀ N dV, integrated by Gauss quadrature on the reference element through the Jacobian of the map. Stress and strain are 6-vectors in the order xx, yy, zz, xy, xz, yz with engineering shear strains.

ElementNodesFull rule (stiffness)ReducedMass ruleIncompatible modesHybrid pressures
tet44centroid (1 point)—symmetric 4-point (degree 2)—refused
tet1010symmetric 4-point (degree 2)—conical product, 4 per direction (degree 5)—1 (constant)
wedge663 triangle points × 2 Gauss points—the same—refused
pyramid55collapsed (Duffy) product, 2 × 2 × 2—collapsed product, 3 × 3 × 3—refused
hex882 × 2 × 2explicit dynamics only (one point, hourglass control)2 × 2 × 29 condensed modes1 (constant)
hex20203 × 3 × 32 × 2 × 23 × 3 × 3—4 (1, x, y, z)
  • Full integration integrates the stiffness of an undistorted element exactly.
  • Reduced hex20 (2 × 2 × 2) avoids locking at the cost of one spurious mode that a mesh of more than one element restrains.
  • Incompatible modes (hex8): nine internal displacement modes (1 − ξ²), (1 − η²), (1 − ζ²) per direction, condensed out of the element (Wilson, Taylor, Doherty & Ghaboussi 1973). Their derivatives use the Jacobian at the element centre scaled by det J₀ / det J (Taylor, Beresford & Wilson 1976), so the element passes the patch test when distorted. It bends correctly with one element through the thickness.
  • Quadrature. Gauss–Legendre with 1 to 4 points (exact for degree 2n − 1) and its tensor products; on the tetrahedron the centroid rule, the symmetric four-point rule and Stroud’s conical product (the collapsed map ξ = u, η = v(1 − u), ζ = w(1 − u)(1 − v), Jacobian (1 − u)²(1 − v), exact for degree 2n − 3 with positive weights; Stroud 1971, §2.7); on the wedge the symmetric three-point triangle rule (area coordinates (⅔, ⅙, ⅙) and permutations, degree 2) times two-point Gauss in ζ; on the pyramid the collapsed product ξ = u(1 − w), η = v(1 − w), ζ = w with weight (1 − w)², which makes the rational functions polynomials.
  • Lumped mass is the diagonal scaling of Hinton, Rock & Zienkiewicz (1976): the consistent diagonal scaled to the element’s mass, positive for quadratic elements too.
  • Nodal stresses extrapolate the integration-point values with the element’s linear corner functions fitted by least squares (Hinton & Campbell 1974); mid-side nodes take the mean of their edge’s corners.

Hybrid (mixed u–p) solids (crate::hybrid). The isotropic elasticity splits as D = D_dev + K m mᵀ, m = (1, 1, 1, 0, 0, 0), K = mᵀ D m / 9. The mean stress p = N_p · p̂ is an independent field, discontinuous between elements, enforced weakly (the perturbed Lagrangian of Hughes 2000, §4.3–4.4):

K_dev = ∫ Bᵀ D_dev B dV,   G = ∫ Bᵀ m N_pᵀ dV,   M = ∫ N_p N_pᵀ dV
[K_dev  G; Gᵀ  −M/K] [u; p̂] = [f; 0]   ⇒   p̂ = K M⁻¹ Gᵀ u,   K_e = K_dev + K G M⁻¹ Gᵀ

The condensed stiffness is symmetric positive definite for any ν < ½ with a bounded volumetric stiffness per element however close ν is to ½, so nothing global changes and Cholesky still applies; ElementDofs.internal.pressure counts the condensed unknowns. Stresses are D_dev ε + p m with the element’s pressure field. With a constant pressure this is the B-bar / mean dilatation element (Hughes 2000, §4.5; Nagtegaal, Parks & Rice 1974). The pressure spaces follow the inf-sup analysis (Brezzi & Fortin 1991, ch. VI; Bathe 2014, §4.5): hex20 Q2–P1disc and tet10 P2–P0 are stable; a single tet10 has three more zero-energy modes that neighbouring elements restrain; hex8 Q1–P0 passes the patch test and does not lock; it is not inf-sup stable, so some meshes and constraints show checkerboard element pressures while the displacements stay good; tet4 and wedge6 lock even with one pressure per element and are refused. A thermal strain splits the same way: ∫ Bᵀ D_dev ε_th on the nodes and, through the pressure, K G M⁻¹ ∫ N_p tr ε_th, so a confined heated nearly incompressible solid carries its bulk stress −3KαΔT.

2D continuum elements

Plane stress, plane strain and axisymmetric elements (crate::plane) lie in the XY plane with two displacements per node, u along X and v along Y. The strain is (εxx, εyy, εzz, γxy), the third component out of plane:

  • plane strain: εzz = 0; σzz = D₃₁εxx + D₃₂εyy + D₃₄γxy is reported;
  • plane stress: σzz = 0, the elasticity condensed to D̃ᵢⱼ = Dᵢⱼ − Dᵢ₃D₃ⱼ/D₃₃, and εzz = −(D₃₁εxx + D₃₂εyy + D₃₄γxy)/D₃₃ is reported;
  • axisymmetric: x is the radius r, y the axial coordinate, εzz the hoop strain u/r; volumes are 2πr dA, so forces, reactions and masses are totals over the circumference.

D is the leading 4 × 4 block of the 3D elasticity, so orthotropic materials with axes along the global axes work as in solids. Results are reported as the solids’ 6-vectors with xz = yz = 0 (axisymmetric: rr, axial, hoop, r-axial). Plane elements integrate over their thickness t. Rules: tri3 one point, tri6 three points (degree 2), quad4 2 × 2, quad8 3 × 3 or 2 × 2 reduced; reduced quad4 needs hourglass control and is refused. On the axis (r = 0) the hoop strain is evaluated only at integration points, which lie inside the element for every element with a node off the axis; the solver holds the radial displacement of nodes on the axis at zero.

Quad4 incompatible modes (QM6): the internal modes (1 − ξ²) and (1 − η²) in u and v, mapped with the centre Jacobian and scaled by det J₀ / det J, condensed out. In an axisymmetric element the modes also strain the hoop direction, and their strain operator is shifted by its volume mean (Wilson & Ibrahimbegovic 1990), which leaves the plane case unchanged and makes the axisymmetric element pass the patch test.

Hybrid 2D (plane strain and axisymmetric quad4, quad8 and tri6): one constant pressure per element, the mean dilatation method (Nagtegaal, Parks & Rice 1974; Hughes 2000, §4.5 for the axisymmetric B-bar): K = ∫ Bᵀ D_dev B dV + κ g gᵀ / V with g = ∫ Bᵀ m dV, m = (1, 1, 1, 0), the hoop strain included in the volumetric part. The linear triangle locks and is refused; plane stress has no volume constraint and is refused.

Axisymmetric with twist (crate::twist): with "twist": true each node carries a third unknown, the hoop displacement u_θ on the model’s Z (degree of freedom 3). The element strains are γ_rθ = ∂u_θ/∂r − u_θ/r and γ_zθ = ∂u_θ/∂z, reported as the components xz and yz, and the twist stiffness is K_θ = ∫ Bᵀ C B 2πr dA at the element’s stiffness points, with C = (G₁₃, G₂₃). It is uncoupled from the meridian unknowns, whose formulations (reduced, incompatible modes, hybrid) are unchanged, and u_θ is held at zero on the axis. Loads: hoop forces and tractions may have a Z component; a moment [0, T, 0] on a set is a torque about the axis, spread over the element edges as Mᵢ = T qᵢ rᵢ / Σⱼ qⱼ rⱼ, with qᵢ = ∫ Nᵢ r 2πr ds (about rᵢ² ds: the weights of τ ∝ r, the forces a rigid rotation of the surface works against) so that Σ = T on any mesh. The sense is right-handed about +Y, as in 3D: the hoop direction is Z, a rotation about +Y carries +X toward −Z, so a torque T gives a z displacement of −κ r z (the hoop displacement of a right-handed twist about +Y) and hoop forces −Mᵢ/rᵢ. A torque on a node on the axis is refused. Results: u_θ is displacement[2]; the Z totals are sums of hoop forces, which balance as torques. Uniform torsion is reproduced exactly on rectangular quad4 and straight-sided quad8, and to the integration rule’s accuracy on tri6 and reduced quad8; tri3 is second order. Measured on the solid shaft (r ≤ 2, 2 × 4 → 4 × 8 cells, notes §4): quad4 and quad8 to 10⁻¹⁴ or better, quad8 reduced 1.1·10⁻³ → 2.7·10⁻⁴, tri6 2.0·10⁻⁴ → 5.1·10⁻⁵, tri3 1.6·10⁻¹ → 4.8·10⁻². Sources: Zienkiewicz, Taylor & Zhu, The Finite Element Method, 7th ed., 2013, §6.6; Timoshenko & Goodier 1970, ch. 10. Twist is for linear static and frequency steps; hoop body forces, nonlinear and buckling steps are refused.

Shells

Flat MITC4 quadrilaterals and MITC3 triangles (crate::shell) with six unknowns per node. Each element is built on its mean plane, where membrane, Reissner–Mindlin plate and drilling stiffness are superposed in local axes and rotated to the global ones (the facet approach; Zienkiewicz, Taylor & Fox 2014, ch. 9–10). Quadrilaterals on a cylinder whose edges follow the generators and the circumference are exactly flat.

  • Kinematics. With z along the element normal, u = u₀ + z θ_y, v = v₀ − z θ_x, w = w₀: membrane strains (u₀,x, v₀,y, u₀,y + v₀,x), curvatures (θ_y,x, −θ_x,y, θ_y,y − θ_x,x), transverse shear (w,x + θ_y, w,y − θ_x).
  • Section. Linear elastic and homogeneous through the thickness, integrated in closed form (any number of section points gives the same stiffness): with the mid-surface at z = e = −offset · t, N = A ε + B κ, M = B ε + D κ with A = Q t, B = Q t e, D = Q (t³/12 + t e²), Q the plane stress matrix, and Q_s = k G t γ with k = 5/6.
  • Transverse shear, MITC4. The covariant shear strains are sampled at the mid-sides (ẽ_rt at (0, ±1), ẽ_st at (±1, 0)) and interpolated linearly (Dvorkin & Bathe 1984; Bathe & Dvorkin 1985). Membrane and bending use the bilinear fields, all with 2 × 2 Gauss points.
  • Transverse shear, MITC3. Tied at the mid-sides (½, 0), (0, ½), (½, ½): ẽ_rt = e_rt⁽¹⁾ + c s, ẽ_st = e_st⁽²⁾ − c r, c = e_rt⁽³⁾ − e_rt⁽¹⁾ − e_st⁽³⁾ + e_st⁽²⁾, which keeps each edge’s tangential shear constant (Lee & Bathe 2004). The membrane is the constant-strain triangle.
  • Drilling rotation. Tied to the membrane’s in-plane rotation ω = ½ (v,x − u,y) by the penalty ∫ γ t (θ_z − ω)² dA (Hughes & Brezzi 1989) with γ = G/100. On the bilinear membrane the in-plane rotation of a parallelogram is linear, which θ_z interpolates exactly, so the penalty does not lock; scaled with G t, it ties each node’s normal rotation to the membrane as the mesh is refined. The Scordelis–Lo and pinched-cylinder results change by less than 0.5 % for γ from G/1000 to G. On twisted surfaces the penalty adds (t τ)² / (6 (1 − ν) γ/G) to the plate-bending compliance at any mesh (τ the twist rate), so a thick twisted shell is soft by that amount.
  • Warped quadrilaterals. The four nodes lie h, −h, h, −h off the mean plane; each corner of the flat element is rigidly tied to its node (u − h θ_y, v + h θ_x), so rigid motions strain nothing (MacNeal 1978; Belytschko, Wong & Chiang 1992). Elements warped by more than a tenth of their size are refused.
  • Mass. Consistent: ρ t on the translations, ρ (t³/12 + t e²) on the rotations, ρ t e coupling translations and bending rotations when the reference surface is offset; the drilling rotation takes the bending rotary inertia, which keeps the mass matrix positive definite. Lumped: the diagonal scaled to the element’s mass, the rotary inertia isotropic about the node.
  • Stresses. Section forces and the stresses at the bottom, middle and top of the section at the integration points, extrapolated bilinearly to the nodes (quadrilateral) or taken at the nodes (triangle). Transverse shear stress is reported at the mid-surface as 3/2 Q/t.

Beams

The two-node Timoshenko beam (crate::beam), six unknowns per node, built in local axes and rotated to the global ones (crate::frame, K_g = Tᵀ K_l T). Local x runs from node 1 to node 2; y is the section’s orientation vector made normal to x (the profile’s width direction); z = x × y (its height direction).

  • Axial and torsional stiffness are the exact EA/L and GJ/L. Each bending plane uses the interdependent interpolation (cubic deflection, quadratic rotation, coupled through Φ = 12 EI / (G A_s L²)), so the shear strain is constant and the element is exact for end loads at any number of elements (Przemieniecki 1968, §5.6; Friedman & Kosmatka 1993). Stiffness K = ∫ (EI θ′ᵀ θ′ + G A_s (w′ − θ)ᵀ (w′ − θ)) dx and consistent mass M = ∫ (ρA N_wᵀ N_w + ρI N_θᵀ N_θ) dx are integrated exactly with four Gauss points; Φ → 0 is the Euler–Bernoulli (Hermite) element. The rotation about y is −dw/dx in the x–z plane.
  • Euler–Bernoulli (beam_theory: euler_bernoulli): the shear-rigid limit Φ = 0 is evaluated exactly, with no penalty on the shear term, giving K = EI/L³ [[12, 6L, −12, 6L], [6L, 4L², −6L, 2L²], [−12, −6L, 12, −6L], [6L, 2L², −6L, 4L²]] per bending plane (Przemieniecki 1968, §5.6; Cook, Malkus, Plesha & Witt 2002, §2.3). The consistent mass is ρAL/420 times [[156, 22L, 54, −13L], [22L, 4L², 13L, −3L²], [54, 13L, 156, −22L], [−13L, −3L², −22L, 4L²]] (Przemieniecki 1968, §11; Cook et al. 2002, §11.3), with no bending rotary inertia ρI. The lumped mass keeps its rule, so the bending rotary diagonal at each node is ρAL³/78.
  • Lumped mass: half the mass on each node’s translations, half the polar inertia on the twist, the consistent bending rotary diagonal scaled like the translations.
  • End forces are K u minus the consistent loads of the element’s body force: N, V_y, V_z, T, M_y, M_z on the cut whose outward normal is +x.
  • Section properties: area, I_y = ∫ z² dA, I_z = ∫ y² dA, polar I_y + I_z, torsion constant J and shear areas. Rectangle: Saint-Venant’s series J = a b³/3 (1 − 192 b/(π⁵ a) Σ_{n odd} tanh(nπa/2b)/n⁵), a ≥ b (Timoshenko & Goodier 1970, §109), shear coefficient 10(1 + ν)/(12 + 11ν). Circle and pipe: J = I_y + I_z, shear coefficients 6(1 + ν)/(7 + 6ν) and, for radius ratio m, 6(1 + ν)(1 + m²)² / ((7 + 6ν)(1 + m²)² + (20 + 12ν) m²) (Cowper 1966). I and box (thin-walled): J = Σ b t³/3 (open I) and Bredt’s 4 A_m² t / p (closed box); shear areas the walls parallel to the shear (the web for shear along z, 5/6 of the flanges along y) (Pilkey 2002, ch. 6).
  • 2D models. A beam in the XY plane of a 2D model keeps the rows and columns Ux, Uy, Rz of these matrices: the plane frame element (Przemieniecki 1968, §5.6), axial EA/L and bending with I_y and the shear area along z, the profile’s height in the plane. The orientation is along Z, so Z is a principal axis of the profile and the block is uncoupled from Uz, Rx, Ry; any other orientation is refused. Its nodes may be nodes of 2D elements and trusses. The planar beam is a Timoshenko beam: an Euler–Bernoulli section and a pipe pressure in a 2D model are refused. A moment is about Z; end forces are N, V_z and M_y (V_y, T, M_z zero).

Pipes under pressure

A pipe is a beam2 whose profile is pipe with a bore: outer radius b, wall thickness t, inner radius a = b − t > 0 (BeamProfile::bore). A pipe_pressure load acts on a set of such beams:

{"command": "model.load.create", "params": {"name": "steam", "type": "pipe_pressure", "set": "run", "internal": 10}}

internal and external are the pressures inside and outside the wall, positive when pressing on it. Each is uniform along the set’s pipes. The load acts in linear static steps only (Availability by procedure).

The wall stresses are Lamé’s (Timoshenko & Goodier 1970, §28): σ_r = A − B/r² and σ_θ = A + B/r², with A = (p_i a² − p_o b²)/(b² − a²) and B = (p_i − p_o) a² b²/(b² − a²). For an internal pressure p alone the bore hoop stress is p (a² + b²)/(b² − a²). The thin-wall membrane formula p r_m/t, with mean radius r_m, is the limit of this value, with relative error (t/2r_m)².

Two axial effects act on a closed pipe. First, the wall’s Poisson strain: σ_r + σ_θ = 2A at every radius, so the pressure is a uniform axial strain ε₀ = −2νA/E, applied as an initial strain with the pair −2νA A_w, where A_w = π (b² − a²). Second, the closed-end force: each end of an element is pulled outwards by F = p_i A_i − p_o A_o = A A_w, with A_i = π a² and A_o = π b². Between elements in line these forces cancel; at a closed end the remaining one is the load on the cap; at a bend they add to the resultant of the pressure on the bend’s wall (Sparks 1984 gives the effective-force view). The element’s total axial load is therefore (1 − 2ν) A A_w.

The three cases that follow from this:

  • A closed pipe free to stretch stretches by (1 − 2ν) A L/E, with wall force A A_w.
  • A pipe held at both ends has no stretch, wall force 2νA A_w, and an effective force of −(1 − 2ν) A A_w, which the anchor reacts along the axis.
  • A free planar frame of closed pipes of one profile and one material stretches every member by the same strain: the frame is similar to its unpressurised self, with no bending. Anchors or mixed profiles make it bend (the pipe-pressure-loop case).

The beam’s end force N is the wall force, the force on the wall’s cut; the closed-end pair is an external load and is not part of N. The effective force is N − F. The pipe result of solve.probe gives the radial and hoop stresses at the bore and at the outside, and the axial stress N/A_w at the two ends (Output). Bending, shear and torsion are unchanged: the stiffening of a pressurised pipe against bending is second order and is not included. The Bourdon effect and the ovalisation of a bend belong to the elbow, which is not implemented.

Sources: S. P. Timoshenko, J. N. Goodier, Theory of Elasticity, 3rd ed., 1970, §28; C. P. Sparks, The influence of tension, pressure and weight on pipe and riser deformations and stresses, J. Energy Resources Technology 106(1):46–54, 1984.

Trusses

rod2 and rod3, straight or curved (crate::truss; Cook, Malkus, Plesha & Witt 2002, §3.6 and §6.2; Hughes 2000, §1.10). On ξ ∈ [−1, 1], N = ((1 − ξ)/2, (1 + ξ)/2) for rod2 and N = (ξ(ξ − 1)/2, ξ(ξ + 1)/2, 1 − ξ²) for rod3 (ends, then the middle). With ds = J dξ, J = |x′(ξ)| and the tangent t = x′/J, the axial strain is ε = Σᵢ (Nᵢ′/J) t · uᵢ: K = ∫ E A Bᵀ B ds, consistent mass ρ A ∫ Nᵢ Nⱼ ds per direction, HRZ lumped mass (ρAL/2 at each end of rod2, ρAL·(1/6, 1/6, 2/3) on a straight rod3), body force A ∫ Nᵢ b ds, and the stress σ = E ε reported in global axes as the uniaxial tensor σ t tᵀ, so the axial force is N = A tᵀ σ t. Rules: two Gauss points for rod2, three for rod3. The material is the Young’s modulus of an isotropic material; an orthotropic material is refused. In a 2D model a truss carries the two in-plane translations.

Discrete elements

Point masses, rotary inertia, springs and dashpots (fieldcraft_solver::discrete) are not mesh elements: the solver asks the layout for what each needs at its nodes (discrete::needs: translations for a mass or a translational spring, rotations for an inertia or a torsional spring; a reference point they use gets six) and finds its unknowns with discrete::dof_of.

  • A point mass adds m_x, m_y, m_z on the node’s translations and its inertia tensor (3 × 3, products included) on its rotations, the same in the consistent and the lumped mass matrix.
  • A spring of stiffness k and unit direction coefficients c on each end’s six unknowns adds k c cᵀ to each end and −k c cᵀ between them (Cook et al. 2002, §2.2): the elongation is cᵀ(u_second − u_first).
  • A dashpot has the same form on velocities; static, frequency and buckling steps ignore it with a warning, explicit dynamics uses it.

Thermal strain

ε_th = α (T − T_ref) along the material axes enters a solid as the load Solid::thermal_load(d, &ThermalStrain { alpha, delta }) = ∫ Bᵀ D ε_th dV and its stress as Solid::stresses_with(d, u, Some(&thermal)) = D (ε − ε_th), delta the nodal T − T_ref. 2D elements have the same pair (Plane::thermal_load, Plane::stresses_with): plane stress leaves εzz free (σzz = 0), plane strain holds it (σzz = −D₃·ε_th), axisymmetric elements strain the hoop direction too. Trusses take the axial part Σ αₖ tₖ² ΔT along their tangent (Truss::thermal_load, Truss::stresses_with). Springs, dashpots and point masses have no thermal strain. Shells and beams take none yet: a static step with temperatures and shells or beams warns that only solid, 2D and truss elements are strained (Heat transfer).

Availability by procedure

ElementLinear static, frequencyBucklingHeat transferNonlinear staticExplicit dynamics
tet4, tet10, wedge6, pyramid5, hex8 (full, incompatible), hex20 (full, reduced)yesyesyes (conduction on the element’s full rule; the formulation does not apply)yes (hex8 incompatible: enhanced assumed strain, stopped by an hourglass check in large compression)tet4 (nodal-pressure) and one-point hex8 only
hybrid hex8, hex20, tet10yesyesyes (as the displacement element)yes (needs the neo-Hookean option or another hyperelastic or plastic model with a volumetric split)refused
plane stress tri3, tri6, quad4, quad8yesyesrefusedrefusedrefused
plane strain, axisymmetric tri3, tri6, quad4, quad8 (and hybrid quad4, quad8, tri6)yesyesrefusedyesrefused
axisymmetric with twist tri3, tri6, quad4, quad8yesrefusedrefusedrefusedrefused
shell tri3, quad4yesrefusedrefusedrefusedrefused
beam2 (also in plane stress and plane strain models)yesrefusedrefusedrefusedrefused
rod2, rod3yesrefusedrefusedrefusedrod2; rod3 with nonlinear_geometry: false only; elastic only
point mass, spring, dashpotyes (dashpots ignored)yes (dashpots ignored)—springs, along their fixed directionstranslational ones; rotary inertia and torsional springs refused

A pipe pressure acts in linear static steps; frequency steps ignore loads, and explicit dynamics refuses it (it has no beams).

Explicit dynamics uses its own kernels for the one-point hexahedron (uniform strain with Flanagan–Belytschko hourglass control) and the nodal-pressure tetrahedron (Explicit dynamics). The finite-strain forms of the solids and 2D elements are described in Nonlinear static.

Decks

The deck writers (crates/decks) map each element and formulation to each format’s names. The mappings the element library records: point mass to Abaqus MASS, Nastran CONM1 and LS-DYNA ELEMENT_MASS (per-direction masses: Nastran only); rotary inertia to ROTARYI, CONM1 and ELEMENT_INERTIA; springs to SPRING1/2/A, CELAS2 and ELEMENT_DISCRETE (skew fixed directions: LS-DYNA only); dashpots to DASHPOT1/2/A, CDAMP2 and ELEMENT_DISCRETE; rod2 to T3D2 / T2D2, CROD and an LS-DYNA truss beam (3D models); rod3 to T3D3 / T2D3 (no Nastran or LS-DYNA counterpart); beam2 to B31 with the profile’s BEAM SECTION (B21 in a 2D model, its first section axis (0, 0, −1)), CBEAM with its PBEAML (in a 2D model the same cards, the beam grids holding 3, 4, 5), and an LS-DYNA Belytschko–Schwer resultant beam (ELEMENT_BEAM_ORIENTATION) given the profile’s area, second moments, torsion constant and shear area, the numbers this element uses (isotropic elastic materials only; I, box and general profiles whose shear areas differ by direction have no LS-DYNA counterpart, its resultant beams taking one shear area); beams in a 2D model have no LS-DYNA counterpart; a general profile (its section properties given directly) to B31 with a BEAM GENERAL SECTION and its TRANSVERSE SHEAR STIFFNESS (B21 in a 2D model, its first section axis (0, 0, −1)), CBEAM with a uniform PBEAM, and the same resultant beam (its stress and strain output in Abaqus are the section forces SF and section strains SE, a general section having no section points to give S and E at); pyramid5 to C3D5, CPYRAM and an LS-DYNA degenerate solid. The Euler–Bernoulli beam (beam_theory euler_bernoulli) has no shear flexibility: B33 with the same BEAM SECTION as B31 (with a general profile its BEAM GENERAL SECTION without TRANSVERSE SHEAR STIFFNESS); CBAR with a PBAR of A, I1, I2 and J and blank shear factors K1 and K2 (Nastran; PBEAML and PBARL compute shear factors from the shape, so neither can express it; a general profile’s PBAR takes its own properties); no LS-DYNA counterpart is written, its resultant beam always taking a shear area, so that deck is refused by name. Pipes under a pipe pressure go to Abaqus as PIPE31 with a THICK PIPE beam section and *DLOAD PI / PE lines (the pressure and the effective inner or outer diameter, closed ends); the Nastran and LS-DYNA decks refuse the load by name, since their beams as written here take no pressure. A planar beam is B21, a Timoshenko beam (the model check refuses an Euler–Bernoulli beam and a pipe pressure in a 2D model).

Algorithm

What a solver does with a section’s elements:

  1. Resolve. system::Mesh::new reads each section: a solid or 2D section gives its elements the material’s elasticity matrix D and the formulation from Formulation::from_section or plane::formulation, which refuses a formulation the element kind lacks (by name); a shell or beam section builds its ShellSection or BeamSection (isotropic constants only); a rod section takes the Young’s modulus.
  2. Number. The DofLayout collects every element’s declared kinds and the discrete elements’ needs; a model above max_dofs unknowns stops with “the model has N degrees of freedom; the limit is M”.
  3. Element matrices. Stiffness (and mass) are computed in parallel rounds of 4096 elements, 16 per task, and added in label order, so the sums are those of a sequential loop. Incompatible modes and hybrid pressures are condensed inside each element.
  4. Recover. After the solve, each element evaluates its stresses at its integration points; one extrapolation per element type and rule takes them to the nodes.

An element whose Jacobian is not admissible at an integration point is an error naming the element (fieldcraft_model::admissible_jacobian, the same criterion the meshers’ gate uses).

Output

Per element, at the integration points: position, strain and stress (PointStress); extrapolated to the element’s nodes (ElementStress::nodal); shells: section forces (N, M, Q per length in the element’s axes) and bottom, middle and top stresses; beams: end forces (N, V_y, V_z, T, M_y, M_z in the element’s axes) (a pipe under a pipe pressure also its wall stresses: radial and hoop at the bore and the outside, axial at the two ends); trusses: the uniaxial stress tensor. solve.probe with elements returns them; Linear static describes the nodal averages.

Worked example

Four steel cantilevers of the same size and mesh density, one per solid formulation, each clamped at its root and loaded with 1 kN at its tip: hex8 with full integration, hex8 with incompatible modes, hex20 with full and with reduced integration. Ten elements along a beam of L/h = 10 show the shear locking of the fully integrated hex8 in bending and how the other formulations remove it, against Timoshenko beam theory.

Geometryfour beams 200 mm along x, 20 × 20 mm section, 20 mm apart in y; one block each (mesh.block), faces root at x = 0 and tip at x = 200
Mesh10 × 2 × 2 elements per beam: Hex8 hex8 full, Hex8I hex8 incompatible modes, Hex20 hex20 full, Hex20R hex20 reduced (2 × 2 × 2)
MaterialE = 210 000 MPa, ν = 0, ρ = 7.85 × 10⁻⁹ t/mm³ (ν = 0 so the clamped root face does not hold a Poisson contraction that beam theory leaves out)
Boundary conditionseach beam’s root fixed
Loadforce [0, 0, −1000] N, total, on each beam’s tip face
StepBend, static, all four beams
Unitsmm, t, s, N, MPa
[
  {"command": "model.units", "params": {"system": "mm-t-s-N-MPa"}},
  {"command": "model.material.create", "params": {"name": "Steel", "elastic": {"type": "isotropic", "young": 210000, "poisson": 0.0}, "density": 7.85e-9}},
  {"command": "mesh.block", "params": {"body": "Hex8", "kind": "hex8", "corners": [[0, 0, 0], [200, 0, 0], [200, 20, 0], [0, 20, 0], [0, 0, 20], [200, 0, 20], [200, 20, 20], [0, 20, 20]], "divisions": [10, 2, 2], "faces": {"6": "root", "4": "tip"}}},
  {"command": "model.set.create", "params": {"name": "Hex8", "geometry": [{"body": "Hex8"}]}},
  {"command": "model.set.create", "params": {"name": "Hex8-root", "geometry": [{"body": "Hex8", "face": "root"}]}},
  {"command": "model.set.create", "params": {"name": "Hex8-tip", "geometry": [{"body": "Hex8", "face": "tip"}]}},
  {"command": "model.section.create", "params": {"name": "Hex8", "set": "Hex8", "material": "Steel", "kind": {"type": "solid"}}},
  {"command": "model.boundary_condition.create", "params": {"name": "Hex8-clamp", "type": "fixed", "target": {"set": "Hex8-root"}}},
  {"command": "model.load.create", "params": {"name": "Hex8-P", "type": "force", "target": {"set": "Hex8-tip"}, "vector": [0, 0, -1000]}},
  {"command": "mesh.block", "params": {"body": "Hex8I", "kind": "hex8", "corners": [[0, 40, 0], [200, 40, 0], [200, 60, 0], [0, 60, 0], [0, 40, 20], [200, 40, 20], [200, 60, 20], [0, 60, 20]], "divisions": [10, 2, 2], "faces": {"6": "root", "4": "tip"}}},
  {"command": "model.set.create", "params": {"name": "Hex8I", "geometry": [{"body": "Hex8I"}]}},
  {"command": "model.set.create", "params": {"name": "Hex8I-root", "geometry": [{"body": "Hex8I", "face": "root"}]}},
  {"command": "model.set.create", "params": {"name": "Hex8I-tip", "geometry": [{"body": "Hex8I", "face": "tip"}]}},
  {"command": "model.section.create", "params": {"name": "Hex8I", "set": "Hex8I", "material": "Steel", "kind": {"type": "solid"}, "formulation": {"incompatible_modes": true}}},
  {"command": "model.boundary_condition.create", "params": {"name": "Hex8I-clamp", "type": "fixed", "target": {"set": "Hex8I-root"}}},
  {"command": "model.load.create", "params": {"name": "Hex8I-P", "type": "force", "target": {"set": "Hex8I-tip"}, "vector": [0, 0, -1000]}},
  {"command": "mesh.block", "params": {"body": "Hex20", "kind": "hex20", "corners": [[0, 80, 0], [200, 80, 0], [200, 100, 0], [0, 100, 0], [0, 80, 20], [200, 80, 20], [200, 100, 20], [0, 100, 20]], "divisions": [10, 2, 2], "faces": {"6": "root", "4": "tip"}}},
  {"command": "model.set.create", "params": {"name": "Hex20", "geometry": [{"body": "Hex20"}]}},
  {"command": "model.set.create", "params": {"name": "Hex20-root", "geometry": [{"body": "Hex20", "face": "root"}]}},
  {"command": "model.set.create", "params": {"name": "Hex20-tip", "geometry": [{"body": "Hex20", "face": "tip"}]}},
  {"command": "model.section.create", "params": {"name": "Hex20", "set": "Hex20", "material": "Steel", "kind": {"type": "solid"}}},
  {"command": "model.boundary_condition.create", "params": {"name": "Hex20-clamp", "type": "fixed", "target": {"set": "Hex20-root"}}},
  {"command": "model.load.create", "params": {"name": "Hex20-P", "type": "force", "target": {"set": "Hex20-tip"}, "vector": [0, 0, -1000]}},
  {"command": "mesh.block", "params": {"body": "Hex20R", "kind": "hex20", "corners": [[0, 120, 0], [200, 120, 0], [200, 140, 0], [0, 140, 0], [0, 120, 20], [200, 120, 20], [200, 140, 20], [0, 140, 20]], "divisions": [10, 2, 2], "faces": {"6": "root", "4": "tip"}}},
  {"command": "model.set.create", "params": {"name": "Hex20R", "geometry": [{"body": "Hex20R"}]}},
  {"command": "model.set.create", "params": {"name": "Hex20R-root", "geometry": [{"body": "Hex20R", "face": "root"}]}},
  {"command": "model.set.create", "params": {"name": "Hex20R-tip", "geometry": [{"body": "Hex20R", "face": "tip"}]}},
  {"command": "model.section.create", "params": {"name": "Hex20R", "set": "Hex20R", "material": "Steel", "kind": {"type": "solid"}, "formulation": {"integration": "reduced"}}},
  {"command": "model.boundary_condition.create", "params": {"name": "Hex20R-clamp", "type": "fixed", "target": {"set": "Hex20R-root"}}},
  {"command": "model.load.create", "params": {"name": "Hex20R-P", "type": "force", "target": {"set": "Hex20R-tip"}, "vector": [0, 0, -1000]}},
  {"command": "model.step.create", "params": {"name": "Bend", "procedure": {"type": "static"}, "boundary_conditions": ["Hex8-clamp", "Hex8I-clamp", "Hex20-clamp", "Hex20R-clamp"], "loads": ["Hex8-P", "Hex8I-P", "Hex20-P", "Hex20R-P"]}},
  {"command": "solve.static", "params": {"step": "Bend"}},
  {"command": "solve.probe", "params": {"step": "Bend", "at": [[200, 10, 10], [200, 50, 10], [200, 90, 10], [200, 130, 10]]}},
  {"command": "results.reactions", "params": {"step": "Bend", "sets": ["Hex8-root", "Hex8I-root", "Hex20-root", "Hex20R-root"]}},
  {"command": "results.deformed", "params": {"step": "Bend", "show": true, "scale": "auto"}},
  {"command": "results.contour", "params": {"step": "Bend", "field": "displacement_z"}}
]

Results from solve.probe at the centre of each tip face and the solve.static reply (2 520 unknowns, 2 340 free, 218 448 factor entries; under 0.1 s, Apple M4 Max, CPU). The reference is Timoshenko’s deflection δ = F L³/(3 E I) + F L/(κ G A) with I = h⁴/12, G = E/2 (ν = 0), κ = 5/6: 0.952 381 + 0.005 714 = 0.958 095 mm.

FormulationTip u_z (mm)Reference (mm)Difference
hex8, full integration−0.638 095−0.958 095−33.4 %
hex8, incompatible modes−0.954 762−0.958 095−0.35 %
hex20, full integration−0.957 770−0.958 095−0.034 %
hex20, reduced integration−0.957 971−0.958 095−0.013 %
QuantityFieldCraftReferenceDifference
Reaction z, each root set (results.reactions)1 000.000 N1 000 N< 10⁻¹⁰
Reaction moment about y, each root set−200 000.000 N·mm−F L = −200 000 N·mm< 10⁻¹⁰
max_von_mises, all four beams150.17 MPaM/Z = 6 F L / h³ = 150 MPa at the root+0.12 %

With ν = 0.3 (G = E/2.6) the same mesh gives −0.661 877, −0.937 099, −0.945 299 and −0.948 947 mm against 0.959 810 mm (−31.0 %, −2.37 %, −1.51 %, −1.13 %): the fixed root face then also holds the section’s Poisson contraction, which the beam formula leaves out.

What to look at. The front beam, fully integrated hex8, deflects a third less than the others: its trilinear displacement field cannot represent pure bending, and the parasitic shear strain it carries instead stiffens it (shear locking). The incompatible modes add the internal (1 − ξ²) modes that let the element bend, and the quadratic hex20 represents the bending field with its mid-side nodes; with two elements through the depth both come within 0.35 % of beam theory, hex20 within 0.04 %. The reactions and the root moment are exact in all four: equilibrium does not depend on the formulation.

Verification

CaseReferenceResultToleranceTest
Patch test, every solid and formulation (tet4, tet10, wedge6, hex8, hex8 incompatible, hex20, hex20 reduced) on a distorted 2 × 2 × 2 patchtheory: linear field exactdisplacement error < 10⁻¹², stress < 10⁻¹⁰exactpatch_test_every_element; patch-hex8, patch-hex8-incompatible, patch-hex20, patch-hex20-reduced, patch-tet4, patch-tet10, patch-wedge6 (all quantities < 10⁻⁴ %)
hex8–pyramid5–tet4 transition patch and uniaxial tensiontheorydisplacement < 10⁻¹² (patch), < 10⁻¹¹ and stress < 10⁻⁹ (tension)exacthex_pyramid_tet_transition_passes_the_patch_test
MacNeal–Harder solid patch, hex8 incompatiblebenchmark (MacNeal & Harder 1985, Table 2(c))σ, τ, u at inner node 7: < 10⁻⁴ %10⁻⁹ rel.mh-solid-patch
2D patch test, every element and theorytheorydisplacement < 10⁻¹⁵, stress < 10⁻¹⁴exactpatch_test_every_element_and_theory
Cantilever tip deflection (Timoshenko, κ = 5/6)theoryhex20 0.013 %, hex8 incompatible 0.16 %, tet10 0.018 %0.5 %cantilever-hex20, cantilever-hex8-incompatible, cantilever-tet10
MacNeal–Harder straight cantilever, one hex8 incompatible through the depthbenchmarkextension −1.24 %; in-plane shear −2.18 %, out-of-plane shear −2.71 %, twist −10.8 % (known failures, MacNeal–Harder’s own HEXA(8): 0.981, 0.981, 0.910 of theory)2 %mh-straight-cantilever
MacNeal–Harder curved cantilever, hex8benchmark−12 % in-plane, −20.2 % out-of-plane (known failures, grades C and D)2 %mh-curved-cantilever
Nearly incompressible thick cylinder, plane strain, ν = 0.4999theory (Lamé)hybrid hex8 < 1 %, hybrid hex20 < 10⁻⁴, hybrid tet10 < 0.5 %; displacement hex8 below 0.7 of Lamé (locks)as statednearly_incompressible_thick_cylinder_does_not_lock
MacNeal–Harder thick cylinder, ν = 0.49, 0.499, 0.4999benchmark−1.38 %, −1.40 %, −1.41 %2 %mh-thick-cylinder
Hybrid block in uniaxial strain; confined heated blocktheoryexact (10⁻⁹ displacement, 10⁻⁶ stress); σ = −3KαΔT to 10⁻⁶exactblock_in_uniaxial_strain, heated_confined_block_carries_the_bulk_thermal_stress
Shell membrane and bending patch tests (MITC4, MITC3, irregular patch in a tilted plane)theory< 10⁻⁹ (moments < 10⁻⁸)exactshell_membrane_patch_test, shell_bending_patch_test
Simply supported square plate, deflection and first frequency (Navier)theory< 1 % at 16 × 16 cells, quad4 and tri31 %simply_supported_plate_deflection_and_frequency
NAFEMS LE2, LE3, LE6 (MITC4)benchmark−0.107 % / −0.161 %, −0.446 %, +2.21 % against the thin-plate target (known failure; −0.037 % against the converged thin-solid value)1–2 %nafems-le2, nafems-le3, nafems-le6
Scordelis–Lo roof, pinched cylinder, pinched hemisphere with an 18° hole (MITC4)benchmark1.12 %, 1.15 %, 1.86 %2 %scordelis-lo-roof-shell, pinched-cylinder, pinched-hemisphere
Timoshenko cantilever beam, deflection and end forcestheory< 10⁻⁹exactcantilever_beam_deflection_is_exact
Portal frame (slope-deflection with Timoshenko members)theorysway and base moment < 5·10⁻⁴, joint rotation < 3·10⁻³as statedportal_frame_matches_the_slope_deflection_solution
Euler–Bernoulli cantilever, deflection in both bending planes, 1 and 4 elementstheory< 6·10⁻¹⁴ (measured); the omitted shear term would be 14 %10⁻⁹euler_bernoulli_cantilever_deflection_is_exact
Euler–Bernoulli portal frame, sway, rotation, lift and base moment, 1 and 3 elements per member (columns’ axial flexibility in closed form)theory< 7·10⁻¹² (measured)10⁻⁹euler_bernoulli_portal_frame_matches_the_slope_deflection_solution
Euler–Bernoulli cantilever frequencies, consistent mass (4th order) and lumped mass (2nd order)theoryconsistent: 0 < error < 1.1 × (β_k L/n)⁴/1440 and order 3.9–4.1 (n = 10 → 20); lumped: order 1.9–2.1 (20 → 40),error< 5·10⁻³
Closed pipe under internal and external pressure, free and held (Lamé; closed-end force)theory< 10⁻⁹exacta_closed_pipe_under_pressure_follows_lame, pipe-closed-pressure
Pressurised pipe loop between two anchors (thrust, displacements, wall force)theory (Castigliano at the elastic centre, Timoshenko members)< 10⁻⁸exacta_pressurised_pipe_loop_between_two_anchors, pipe-pressure-loop
Planar beams in a 2D model: cantilever (tip shear, tension, moment), one and four elementstheory< 10⁻⁹; nothing out of planeexactplanar_cantilever_beam_is_exact
Planar portal frame on a held plate (slope-deflection); beams stiffening a plane stress platetheorysway 1.3·10⁻⁴, joint rotation 1.4·10⁻³, base moment 7·10⁻⁵; 10⁻¹²as the 3D frame; exactplanar_portal_frame_matches_the_slope_deflection_solution, plane_beams_stiffen_a_plane_stress_plate
NAFEMS FV2 pin-ended double cross, 16 in-plane frequencies, four elements per armbenchmark; mode 1 also theory (pinned–pinned Timoshenko beam)−0.51 % to +0.04 % (the targets leave out shear and rotary inertia); mode 1 +3·10⁻⁴ of theory1 %; 10⁻³pin_ended_double_cross_in_plane_frequencies, nafems-fv2
Trusses by the method of joints (Pratt, tripod), three-bar truss, rod3 patch, hanging bartheory< 10⁻¹⁰exactcrates/solver/tests/one_d.rs
Kirsch plate, Lamé cylinder, rotating disc and cylinder in 2Dtheorysee Linear staticcrates/solver/tests/plane.rs
Solid circular shaft in torsion, axisymmetric with twist (Saint-Venant), quad4 2 × 4theory (Timoshenko & Goodier 1970, ch. 10)u_θ and τ_zθ to the round-off of the solve (τ_rθ −1.4·10⁻¹³ at 80 MPa)round-offshaft-torsion-axisymmetric (oracle)
Hollow circular shaft in torsion, axisymmetric with twist, quad8 2 × 5theory (Timoshenko & Goodier 1970, ch. 10)u_θ and τ_zθ to round-offround-offshaft-torsion-hollow-axisymmetric (oracle)
Torsion of shafts (solid and hollow) and conical shaft, axisymmetric with twist, tri3 to quad8theorysolid shaft quad8 u 3.7·10⁻¹⁵; conical shaft quad8 u 6.6·10⁻⁵; tube under hoop traction quad8 2.3·10⁻⁵ → 1.7·10⁻⁶ (quad4 3.2·10⁻³)as statedcrates/solver/tests/plane.rs
Torsional frequency, axisymmetric with twist, quad8theory1.0·10⁻⁶ relativeas statedcrates/solver/tests/plane.rs
Shape functions, every familytheoryKronecker delta, partition of unity, monomial reproduction to degree() with gradients and Hessians, derivatives against central differences, physical Hessians on affine and curved mapsround-offbasis::tests, dof::tests, jet::tests

The migration of the solvers to DofLayout was checked bit for bit: every result of the solver, explicit, engine and io test suites hashed identically before and after.

Limitations

  • Shells: tri3 and quad4 only (tri6 and quad8 shells are refused); flat facets (warped quadrilaterals tied to their mean plane by rigid links; a twisted thick shell is soft by (t τ)² / (6 (1 − ν) γ/G), see Shells); isotropic, homogeneous sections; no initial-stress stiffness (refused in buckling), no large rotations (refused in nonlinear steps), no heat conduction, no thermal strain.
  • Beams: two-node only (Timoshenko or Euler–Bernoulli); isotropic material; no warping of open sections; refused in buckling, nonlinear and heat transfer steps; no thermal strain.
  • Pipes under pressure: uniform pressures per load, closed ends only (an open end takes an opposite nodal force); corners are rigid joints with no elbow flexibility or Bourdon effect; no stiffening of a pressurised pipe against bending (second order); the fluid’s mass is not added in frequency steps; Abaqus decks only.
  • Trusses: isotropic Young’s modulus only; refused in buckling and nonlinear steps.
  • Reduced integration exists for hex20 and quad8 only in implicit analyses; reduced hex8 and quad4 need hourglass control and are refused there.
  • Hybrid elements need isotropic elasticity; hybrid tet4, wedge6, pyramid5 and tri3 are refused; continuous nodal-pressure (Taylor–Hood) elements are not implemented.
  • quad9, hex27 and wedge15 have shape functions only; there are no wedge15 or pyramid13 elements.
  • Material axes are the global axes: there are no material orientations.
  • A 2D model takes no couplings and no shells; its beams have their orientation along Z; a frame of beams alone is a 3D model; a pipe pressure is not supported in a 2D model; an axisymmetric model takes no trusses, beams, point masses, springs or dashpots.
  • Axisymmetric twist: linear static and frequency steps only; hoop body forces are refused. Nastran and LS-DYNA decks do not take axisymmetric sections; the Abaqus deck writes CGAX elements and refuses a non-zero prescribed hoop displacement and incompatible modes.
  • Not implemented: three-node beams; elbow elements (ovalisation of pipe bends, von Kármán’s flexibility); open-section beams with warping; rebar and stringers; generalized plane strain and axisymmetric shells; quad8 and tri6 shells, continuum shells and composite ply layups; membranes and surface elements; a modified quadratic tet; cohesive, gasket, infinite, acoustic and rigid elements; heat conduction in 2D, shell and beam elements.

Implementation

FileContents
crates/fem/src/dof.rsDofKind, DofSet, ElementDofs, DofLayout
crates/fem/src/basis.rs, jet.rs, shape.rsBasis (every family), second derivatives by forward-mode AD, the hand-written solid functions
crates/fem/src/quadrature.rsRule: Gauss–Legendre, tetrahedron, triangle, wedge and pyramid rules
crates/fem/src/element.rsELEMENT_TYPES, Formulation::from_section, Solid (stiffness, mass, lumped mass, body forces, thermal_load, stresses_with, geometric_stiffness), extrapolation
crates/fem/src/hybrid.rspressures, the deviatoric–volumetric split and the condensation
crates/fem/src/plane.rsplane_type, formulation, Plane
crates/fem/src/shell.rsShellSection, Shell (MITC4, MITC3, drilling, mass, stresses)
crates/fem/src/beam.rs, frame.rsBeamSection, properties, the beam kernel and forces; local frames
crates/fem/src/pipe.rsPipePressure, PipeWall (Lamé), PipeStress; Beam::pressure_load, Beam::pipe_stress in beam.rs
crates/fem/src/truss.rsTruss, young_modulus, DOFS
crates/solver/src/system.rsMesh::new (sections to elements), Elem::kernel, Structural, structural_kinds, kind_block
crates/solver/src/discrete.rspoint masses, springs, dashpots: needs, dof_of

References

  • O. C. Zienkiewicz, R. L. Taylor, J. Z. Zhu. The Finite Element Method: Its Basis and Fundamentals, 7th ed. Butterworth-Heinemann, 2013.
  • O. C. Zienkiewicz, R. L. Taylor, D. Fox. The Finite Element Method for Solid and Structural Mechanics, 7th ed., 2014.
  • T. J. R. Hughes. The Finite Element Method: Linear Static and Dynamic Finite Element Analysis. Dover, 2000.
  • K.-J. Bathe. Finite Element Procedures, 2nd ed., 2014.
  • R. D. Cook, D. S. Malkus, M. E. Plesha, R. J. Witt. Concepts and Applications of Finite Element Analysis, 4th ed. Wiley, 2002.
  • E. L. Wilson, R. L. Taylor, W. P. Doherty, J. Ghaboussi. Incompatible displacement models. In Numerical and Computer Methods in Structural Mechanics, Academic Press, 43–57, 1973.
  • R. L. Taylor, P. J. Beresford, E. L. Wilson. A non-conforming element for stress analysis. IJNME 10(6):1211–1219, 1976.
  • E. L. Wilson, A. Ibrahimbegovic. Use of incompatible displacement modes for the calculation of element stiffnesses or stresses. Finite Elements in Analysis and Design 7(3):229–241, 1990.
  • J. C. Nagtegaal, D. M. Parks, J. R. Rice. On numerically accurate finite element solutions in the fully plastic range. CMAME 4(2):153–177, 1974.
  • F. Brezzi, M. Fortin. Mixed and Hybrid Finite Element Methods. Springer, 1991.
  • L. Bedrosian. Shape functions and integration formulas for three-dimensional finite element analysis. IJNME 35(1):95–108, 1992.
  • A. H. Stroud. Approximate Calculation of Multiple Integrals. Prentice-Hall, 1971.
  • E. Hinton, T. Rock, O. C. Zienkiewicz. A note on mass lumping and related processes in the finite element method. Earthquake Eng. Struct. Dyn. 4(3):245–249, 1976.
  • E. Hinton, J. S. Campbell. Local and global smoothing of discontinuous finite element functions using a least squares method. IJNME 8(3):461–480, 1974.
  • E. N. Dvorkin, K.-J. Bathe. A continuum mechanics based four-node shell element for general nonlinear analysis. Engineering Computations 1(1):77–88, 1984.
  • K.-J. Bathe, E. N. Dvorkin. A four-node plate bending element based on Mindlin/Reissner plate theory and a mixed interpolation. IJNME 21(2):367–383, 1985.
  • P.-S. Lee, K.-J. Bathe. Development of MITC isotropic triangular shell finite elements. Computers & Structures 82(11–13):945–962, 2004.
  • T. J. R. Hughes, F. Brezzi. On drilling degrees of freedom. CMAME 72(1):105–121, 1989.
  • J. S. Przemieniecki. Theory of Matrix Structural Analysis. McGraw-Hill, 1968.
  • Z. Friedman, J. B. Kosmatka. An improved two-node Timoshenko beam finite element. Computers & Structures 47(3):473–481, 1993.
  • G. R. Cowper. The shear coefficient in Timoshenko’s beam theory. J. Appl. Mech. 33(2):335–340, 1966.
  • S. P. Timoshenko, J. N. Goodier. Theory of Elasticity, 3rd ed. McGraw-Hill, 1970.
  • C. P. Sparks. The influence of tension, pressure and weight on pipe and riser deformations and stresses. J. Energy Resources Technology 106(1):46–54, 1984.
  • W. D. Pilkey. Analysis and Design of Elastic Beams. Wiley, 2002.
  • R. H. MacNeal, R. L. Harder. A proposed standard set of problems to test finite element accuracy. Finite Elements in Analysis and Design 1(1):3–20, 1985.
  • D. P. Flanagan, T. Belytschko. A uniform strain hexahedron and quadrilateral with orthogonal hourglass control. IJNME 17(5):679–706, 1981. doi:10.1002/nme.1620170504

Materials

The constitutive models a material can carry and the procedures each acts in: linear elasticity (isotropic, or orthotropic by engineering constants), mass density, thermal properties, von Mises (J2) plasticity with bilinear, tabulated or Johnson–Cook hardening, Johnson–Cook damage with element erosion, hyperelasticity (neo-Hookean, Mooney–Rivlin, Yeoh), and the specific volume of a polymer against temperature and pressure (two-domain Tait PVT). One material record serves every solver: each takes the parts it can use, warns about the parts it leaves out, and refuses by name what it cannot represent. The J2 return map is one implementation shared by the implicit and explicit solvers. Structural metals and dry air can be added from a small cited library of constant and temperature-dependent properties, each value with its source.

Commandsmodel.material.create, model.material.edit, model.material.plasticity, model.material.damage, model.material.pvt, model.material.specific_volume, model.material.delete; model.material.library.list and model.material.library.add for the cited material library
Step procedureall structural and heat transfer procedures; see Procedures
Solvercrates/fem material kernels, used by crates/solver (CPU, f64) and crates/explicit
Methodorthotropic compliance (Jones 1999); radial return (Simo & Hughes 1998, §3.3); multiplicative finite-strain plasticity (Simo 1992); Lagrangian logarithmic kinematic plasticity (Miehe, Apel & Lambrecht 2002); Johnson–Cook flow and fracture (Johnson & Cook 1983, 1985); decoupled hyperelasticity (Holzapfel 2000, §6.6); two-domain Tait PVT (Chang et al. 1996; Willerer et al. 2024, eqs. 1–9)
Verified bynl-j2-uniaxial, nl-j2-bauschinger, nl-j2-simple-shear, j2-uniaxial-explicit, j2-bauschinger, j2-heated-bar, plastic-thick-cylinder, plastic-hinge-cantilever, nl-neo-hookean-uniaxial, nl-mooney-rivlin-*, nl-yeoh-uniaxial, nl-hybrid-incompressible, explicit-neo-hookean-implicit; crates/fem/src/{material,plasticity,elastoplastic,constitutive}.rs tests; crates/model/src/pvt.rs tests

Synopsis

{"command": "model.material.create", "params": {"name": "Steel",
  "elastic": {"type": "isotropic", "young": 210000, "poisson": 0.3}, "density": 7.85e-9,
  "thermal": {"conductivity": 0.05, "specific_heat": 4.6e8, "expansion": 1.2e-5, "reference_temperature": 20}}}
{"command": "model.material.plasticity", "params": {"name": "Steel",
  "plastic": {"type": "bilinear", "yield_stress": 250, "hardening_modulus": 1000, "hardening": "isotropic"}}}
{"command": "model.material.damage", "params": {"name": "Steel",
  "damage": {"type": "johnson_cook", "d1": 0.05, "d2": 3.44, "d3": -2.12}, "erosion": {"plastic_strain": 1.0}}}
{"command": "model.material.create", "params": {"name": "Rubber",
  "elastic": {"type": "isotropic", "young": 6, "poisson": 0.4995}, "hyperelastic": {"type": "mooney_rivlin", "c01": 0.1}}}
{"command": "model.material.pvt", "params": {"name": "PP", "pvt": {"type": "tait",
  "melt": {"b1": "1.23e-3 m³/kg", "b2": 9.0e5, "b3": 80, "b4": 4.5e-3},
  "solid": {"b1": "1.14e-3 m³/kg", "b2": 4.0e5, "b3": 150, "b4": 3.5e-3},
  "b5": 126.85, "b6": 0.25, "b7": "5.0e-5 m³/kg", "b8": 0.1, "b9": 0.04}}}
{"command": "model.material.specific_volume", "params": {"name": "PP", "temperature": 200, "pressure": 50}}

Numbers are in the model’s display units (model.units; mm-t-s-N-MPa by default) or carry their own unit ("210 GPa"); the model stores SI (Units).

Parameters

A material needs at least one of elastic constants, a density, fluid behaviour or thermal properties.

Elasticity and density

FieldValueDefaultMeaning
elastic.typeisotropic—young E > 0, poisson −1 < ν < 0.5
elastic.typeengineering_constants—orthotropic: young [E1, E2, E3] > 0, poisson [ν12, ν13, ν23], shear [G12, G13, G23] > 0; ν_ij is the contraction in j under stress in i
density> 0nonemass per volume: needed by frequency steps, gravity, centrifugal loads, transient heat transfer and explicit dynamics
fluid{"type": "newtonian", "viscosity"}nonedynamic viscosity, for fluid domains (needs a density; Lattice Boltzmann flow)

Thermal properties (thermal)

FieldValueDefaultMeaning
conductivityk > 0, or [kx, ky, kz]noneq = −k ∇T
specific_heatc > 0nonewith the density, the capacity ρc of transient heat transfer
expansionα, or [αx, αy, αz]noneε_th = α (T − T_ref)
reference_temperaturefinite0 °Cthe temperature of zero thermal strain

At least one of conductivity, specific_heat, expansion is required.

Plasticity (plastic, set by model.material.plasticity; null removes it)

FieldValueDefaultMeaning
typebilinear—yield_stress σ_y > 0; hardening_modulus H ≥ 0 (0: perfectly plastic), the slope of uniaxial stress against plastic strain; hardening isotropic (the surface grows) or kinematic (it translates, Prager)
hardeningisotropic, kinematicisotropic
typetable—points [{strain, stress}]: 1 to 1000 points, the first at plastic strain 0, strains increasing, stresses > 0; linear between points, constant after the last; isotropic hardening
typejohnson_cook—σ_y = (A + B ε_pⁿ)(1 + C ln ε̇*)(1 − T*ᵐ): a > 0, b ≥ 0, n ≥ 0
c≥ 00strain-rate sensitivity
m> 01thermal softening exponent
reference_strain_rate> 01ε̇₀
room_temperature, melt_temperaturefinite, melt > room—the range of T*
specific_heat> 0nonewith it, plastic work heats the material adiabatically; without it the temperature stays at room temperature
taylor_quinney0 to 10.9the fraction χ of plastic work turned into heat

Plasticity needs isotropic elastic constants and cannot be combined with a hyperelastic option.

Damage and erosion (model.material.damage; each key optional, null removes it)

FieldValueDefaultMeaning
damage.typejohnson_cook—ε_f = (D1 + D2 e^{D3 σ*})(1 + D4 ln ε̇*)(1 + D5 T*); d1, d2, d3 finite
d4, d5finite0nonzero values need Johnson–Cook plasticity (its reference rate and temperatures)
erosion.plastic_strain> 0—the equivalent plastic strain at which an element erodes

Damage and erosion need plasticity.

Hyperelasticity (hyperelastic)

FieldValueDefaultMeaning
typeneo_hookean—W = μ/2 (Ī₁ − 3) + κ/2 (J − 1)²
typemooney_rivlin—c01 in [0, μ/2]; C₁₀ = μ/2 − C₀₁
typeyeoh—c20, c30 finite; C₁₀ = μ/2

μ = E/(2(1 + ν)) and κ = E/(3(1 − 2ν)) come from the isotropic elastic constants, which a hyperelastic material needs.

PVT behaviour (pvt, set by model.material.pvt; null removes it)

The specific volume v of a polymer, and so its density ρ = 1/v, as a function of temperature and pressure: the modified two-domain Tait equation (Theory). model.material.specific_volume {name, temperature, pressure} evaluates it and replies the specific volume, the density, the transition temperature at that pressure and the domain; a material without PVT behaviour replies its constant density.

FieldValueDefaultMeaning
typetait—the only model
melt, solid{b1, b2, b3, b4}—each domain’s zero-pressure volume v0 = b1 + b2 (T − b5) (b1 > 0 specific volume, b2 ≥ 0 per degree) and pressure sensitivity B = b3 exp(−b4 (T − b5)) (b3 > 0 pressure, b4 ≥ 0 per degree)
b5above 0 K—the transition temperature at zero pressure (glass transition or crystallisation); may be below 0 °C
b6≥ 0—its rise with pressure, T_t = b5 + b6 p (temperature per pressure)
b7≥ 00the solid’s extra volume at the transition (specific volume); 0 for an amorphous polymer
b8≥ 00the temperature rate of that term (per degree)
b9≥ 00its pressure rate (per pressure)

Specific volume shows in the display system’s volume per mass (mm³/t in mm-t-s-N-MPa); per degree and per pressure follow the system’s temperature step and pressure. Coefficients published in m³/kg, K and Pa can be typed with their unit ("1.23e-3 m³/kg").

Theory

Linear elasticity

Stress and strain are 6-vectors (xx, yy, zz, xy, xz, yz) with engineering shear strains, σ = D ε. The orthotropic stiffness is the inverse of the compliance written with engineering constants (Jones 1999, §2.4): S₁₁ = 1/E₁, S₁₂ = −ν₁₂/E₁, S₁₃ = −ν₁₃/E₁, S₂₃ = −ν₂₃/E₂ (ν_ji/E_j = ν_ij/E_i), 1/G on the shear diagonal, which holds G₁₂, G₁₃, G₂₃ in the order the model lists them. The constants are checked for a stable material: |ν_ij| < √(E_i/E_j) for each pair and 1 − ν₁₂ν₂₁ − ν₂₃ν₃₂ − ν₃₁ν₁₃ − 2ν₂₁ν₃₂ν₁₃ > 0. Material axes are the global X, Y, Z.

Von Mises plasticity: the radial return

The update of fieldcraft_fem::plasticity::J2 (Simo & Hughes 1998, §3.3, Boxes 3.1–3.2; Krieg & Krieg 1977 for its accuracy). With shear modulus G and bulk modulus K, the pressure takes the volumetric increment elastically, p ← p + K Δθ, and the deviator the elastic trial s* = s + 2G Δe. With the back stress α, ξ* = s* − α and q* = √(3/2)‖ξ*‖. If q* exceeds the current yield stress, Δε_p solves

q* − 3G Δε_p − H_k Δε_p = σ_y(ε_p + Δε_p, Δε_p/Δt, T)
s = s* − 2G √(3/2) Δε_p n,   α ← α + √(2/3) H_k Δε_p n,   n = ξ*/‖ξ*‖

(Prager’s linear kinematic rule; H_k the kinematic modulus, so the uniaxial stress rises by H_k Δε_p either way).

  • Bilinear: Δε_p = (q* − σ_y)/(3G + H) in closed form.
  • Table: piecewise linear, solved exactly segment by segment.
  • Johnson–Cook: a bracketed scalar Newton iteration with a bisection safeguard on [0, (q* − σ_y)/(3G)], at most 100 iterations. ε̇* = ε̇_p/ε̇₀ is taken as at least 1 (the logarithm stays ≥ 0), T* = (T − T_room)/(T_melt − T_room) is clamped to [0, 1], and the temperature is the one at the start of the increment. Adiabatic heating: ΔT = χ q Δε_p / (ρ c_p).

The strain increment the update takes is the mechanical one: thermal strain increments are subtracted first.

Plasticity in implicit analysis

fieldcraft_fem::elastoplastic wraps the same return with consistent tangents (Nonlinear static has the full treatment):

  • Finite strain, isotropic hardening (Simo 1992; Simo & Hughes 1998, ch. 9): F = Fₑ Fₚ, bₑ = F Cₚ⁻¹ Fᵀ, a Hencky energy τ = K ln J I + 2G dev εₑ with εₑ = ½ ln bₑ; the return of the infinitesimal theory on the principal logarithmic strains (the exponential map), which keeps det Cₚ = 1. History: Cₚ⁻¹ − I, the back stress and the equivalent plastic strain (13 values per integration point).
  • Finite strain, linear kinematic hardening: the full tensor return acts on the Lagrangian logarithmic strain E = ½ log(FᵀF) (Miehe, Apel and Lambrecht 2002). The logarithm’s first and second derivatives map the conjugate stress and consistent tangent to the spatial interface (Nonlinear static). History: additive plastic logarithmic strain (engineering shears), reference-frame back stress and equivalent plastic strain (13 values).
  • Small strain: ε = εₑ + εₚ, the trial εₑ = ε − εₚ,ₙ through the same return.
  • Tangent: 𝔻ᵉᵖ = K I⊗I + 2Gθ ℙ − 2Gθ̄ n⊗n (Simo & Hughes 1998, Box 3.2), with the Daleckii–Krein divided differences θ_AB = artanh(r)/r, r = (λ²_A − λ²_B)/(λ²_A + λ²_B), for the derivative of the logarithm at finite strain; symmetric for isotropic hardening.
  • Hybrid elements take the deviatoric return and the volume K/2 (ln J)² (finite strain) or K/2 (J − 1)² with J = 1 + tr ε (small strain); J2 flow is isochoric, so the split is exact.

Johnson–Cook damage and erosion

D ← D + Δε_p / ε_f with ε_f = (D1 + D2 e^{D3 σ*})(1 + D4 ln ε̇*)(1 + D5 T*), σ* the mean stress over the von Mises stress after the increment (Johnson & Cook 1985). A fracture strain below 10⁻⁶ counts as 10⁻⁶ (published sets can give negative values at high triaxiality, where the point fails at once). A point has failed at D ≥ 1. In explicit dynamics an element whose material point has failed, or whose equivalent plastic strain reaches the erosion criterion, is eroded: removed from the analysis, carrying no stress from then on, reported with its time, cause and internal energy (Explicit dynamics).

Hyperelasticity

fieldcraft_fem::constitutive returns the Kirchhoff stress τ = Jσ and the spatial tangent c of its Lie derivative from the deformation gradient. With the isochoric–volumetric split (Flory 1961), Ī₁ = J^(−2/3) tr b, b̄ = J^(−2/3) b and U(J) = κ/2 (J − 1)²:

  • Neo-Hookean: W = μ/2 (Ī₁ − 3) + U(J), τ = μ dev b̄ + J U′ I, with the tangent of Holzapfel (2000, eqs. 6.165–6.169, 6.193) in Kirchhoff form (C₁₀ = μ/2, D₁ = 2/κ).
  • Mooney–Rivlin and Yeoh: W̄ = C₁₀ (Ī₁ − 3) + C₀₁ (Ī₂ − 3) + C₂₀ (Ī₁ − 3)² + C₃₀ (Ī₁ − 3)³ with the same volume (Mooney 1940; Rivlin 1948; Yeoh 1993); stress and tangent from the fictitious τ̄ and c̄ (Holzapfel 2000, eqs. 6.168, 6.193). 2(C₁₀ + C₀₁) is the elastic μ.

Every hyperelastic law’s small-strain limit is the linear isotropic material, which the linear procedures use. Without a hyperelastic option an elastic material in a nonlinear step is St Venant–Kirchhoff, S = D E with E = ½(FᵀF − I), right for large rotations with small strains and softening without bound in large compression.

Hybrid formulations and the material

A hybrid (mixed u–p) section needs isotropic elasticity: the condensation splits D = D_dev + K m mᵀ, which an orthotropic material does not have. In nonlinear steps the hybrid solids take the material’s isochoric part and its volumetric energy separately, so they need a law with that split: a hyperelastic option or plasticity (St Venant–Kirchhoff is refused). The elements are described in Element library.

PVT: the two-domain Tait equation

v(T, p) = v0(T) · [1 − C ln(1 + p / B(T))] + vt(T, p),   C = 0.0894
v0(T)   = b1 + b2 (T − b5),   B(T) = b3 exp(−b4 (T − b5))
T_t(p)  = b5 + b6 p
vt      = b7 exp(b8 (T − b5) − b9 p)   in the solid (T ≤ T_t(p)), 0 in the melt

The melt coefficients apply above T_t(p), the solid ones at and below it. C is Tait’s universal constant for polymers. The form is Chang, Chen and Su’s (1996), written out with the role of each coefficient by Willerer, Brinkmann and Drechsler (2024, eqs. 1–9). Temperatures are absolute. A state where the equation gives no positive, finite volume (a pressure far beyond the fitted range, where the bracket turns negative) is refused, as are a negative pressure and a temperature at or below 0 K.

Procedures

Material partLinear static, frequency, bucklingHeat transferNonlinear staticExplicit dynamics
Isotropic elasticyes—St Venant–Kirchhoff (or the hyperelastic option)hypoelastic, objective stress rate
Orthotropic elasticsolids, 2D—St Venant–Kirchhoffone-point hex8; nodal-pressure tet4, trusses refused
Shells, beams, trussesisotropic only—refused (elements)trusses: isotropic, elastic
Densitymass, gravity, centrifugalcapacity (transient)gravityrequired
Conductivity, specific heat—yes (coupled steps: steady)steady conduction of the step’s thermal conditions—
Expansiontemperature loads, coupled steps; solids, 2D, trusses—yes (multiplicative at finite strain)isotropic only, as a strain rate
Plasticityelastic constants only, with a warning—J2 with consistent tangent; refused: the Johnson–Cook rate term (C ≠ 0)J2 radial return; trusses refused
Johnson–Cook adiabatic heating——warning, not appliedyes
Damage, erosionwarning, not applied—warning, not appliedyes
Hyperelasticthe small-strain linear material—yesyes, with nonlinear geometry and no thermal strain

The linear solvers’ warning reads: “material name: the linear solver uses its elastic constants only (its plasticity acts in nonlinear static steps and explicit dynamics, its damage and erosion in explicit dynamics)”. The solution of a plastic material in a linear step is the elastic one, bit for bit.

Algorithm

  1. Validate on entry. Material::validate runs at every create and edit; a bad constant is refused naming it (Poisson’s ratio range, orthotropic stability, a hardening table that does not start at 0 or does not increase, melt temperature not above room temperature, a Taylor–Quinney fraction outside [0, 1], damage without plasticity, plasticity or a hyperelastic option on an orthotropic material, plasticity with a hyperelastic option).
  2. Resolve per solver. Each solver builds its material from the record: fieldcraft_fem::elasticity gives D; J2::from_model the plastic model (refused for an orthotropic material); MaterialModel::from_model the finite-strain law.
  3. Update per integration point. Implicit: the committed history is read, the updated one written to a separate slice, committed when the increment converges. Explicit: the J2 update runs every increment on the hypoelastic stress.

Output

Stresses and strains as the elements report them (Element library); in nonlinear steps the equivalent plastic strain at the integration points of plastic elements (solve.probe with elements, the largest in the solve.nonlinear summary); in explicit dynamics each element’s equivalent plastic strain, damage, temperature and whether it has eroded.

Worked example

Von Mises plasticity with bilinear isotropic hardening, loaded past yield and unloaded to zero in one nonlinear static step. A bar under uniform tension (one-eighth model on three symmetry planes) has a closed-form answer at every load; a cantilever bent past its first yield in the same step shows the residual stress that plastic bending leaves behind.

GeometryBar: 100 mm along x, 10 × 10 mm; Beam: 100 mm along x, 10 × 10 mm, 20 mm beside it in y; one block each (mesh.block)
MeshBar: 4 hex8 (4 × 1 × 1, full integration); Beam: 160 hex20 (20 × 2 × 4)
Materialsteel: E = 200 000 MPa, ν = 0.3; plastic bilinear, σ_y = 250 MPa, H = 2 000 MPa, isotropic hardening
Boundary conditionsBar: symmetry on its x = 0, y = 0 and z = 0 faces; Beam: root fixed
Loadspull: 30 000 N along x on the bar’s end face (σ = 300 MPa); bend: 550 N along −z on the beam’s tip face (1.32 times the load of first yield, σ_y b h²/(6 L) = 416.7 N)
StepCycle, nonlinear static, nonlinear_geometry false (small strain), load path [[0, 0], [0.5, 1], [1, 0]], increments of at most 0.05 of the step
Unitsmm, t, s, N, MPa
[
  {"command": "model.units", "params": {"system": "mm-t-s-N-MPa"}},
  {"command": "mesh.block", "params": {"body": "Bar", "kind": "hex8", "corners": [[0, 0, 0], [100, 0, 0], [100, 10, 0], [0, 10, 0], [0, 0, 10], [100, 0, 10], [100, 10, 10], [0, 10, 10]], "divisions": [4, 1, 1], "faces": {"6": "x0", "3": "y0", "1": "z0", "4": "x1"}}},
  {"command": "mesh.block", "params": {"body": "Beam", "kind": "hex20", "corners": [[0, 30, 0], [100, 30, 0], [100, 40, 0], [0, 40, 0], [0, 30, 10], [100, 30, 10], [100, 40, 10], [0, 40, 10]], "divisions": [20, 2, 4], "faces": {"6": "root", "4": "tip"}}},
  {"command": "model.set.create", "params": {"name": "bar", "geometry": [{"body": "Bar"}]}},
  {"command": "model.set.create", "params": {"name": "x0", "geometry": [{"body": "Bar", "face": "x0"}]}},
  {"command": "model.set.create", "params": {"name": "y0", "geometry": [{"body": "Bar", "face": "y0"}]}},
  {"command": "model.set.create", "params": {"name": "z0", "geometry": [{"body": "Bar", "face": "z0"}]}},
  {"command": "model.set.create", "params": {"name": "x1", "geometry": [{"body": "Bar", "face": "x1"}]}},
  {"command": "model.set.create", "params": {"name": "beam", "geometry": [{"body": "Beam"}]}},
  {"command": "model.set.create", "params": {"name": "root", "geometry": [{"body": "Beam", "face": "root"}]}},
  {"command": "model.set.create", "params": {"name": "tip", "geometry": [{"body": "Beam", "face": "tip"}]}},
  {"command": "model.material.create", "params": {"name": "Steel", "elastic": {"type": "isotropic", "young": 200000, "poisson": 0.3}, "plastic": {"type": "bilinear", "yield_stress": 250, "hardening_modulus": 2000, "hardening": "isotropic"}}},
  {"command": "model.section.create", "params": {"name": "bar", "set": "bar", "material": "Steel", "kind": {"type": "solid"}}},
  {"command": "model.section.create", "params": {"name": "beam", "set": "beam", "material": "Steel", "kind": {"type": "solid"}}},
  {"command": "model.boundary_condition.create", "params": {"name": "sx", "type": "symmetry", "target": {"set": "x0"}, "plane": "x"}},
  {"command": "model.boundary_condition.create", "params": {"name": "sy", "type": "symmetry", "target": {"set": "y0"}, "plane": "y"}},
  {"command": "model.boundary_condition.create", "params": {"name": "sz", "type": "symmetry", "target": {"set": "z0"}, "plane": "z"}},
  {"command": "model.boundary_condition.create", "params": {"name": "clamp", "type": "fixed", "target": {"set": "root"}}},
  {"command": "model.load.create", "params": {"name": "pull", "type": "force", "target": {"set": "x1"}, "vector": [30000, 0, 0]}},
  {"command": "model.load.create", "params": {"name": "bend", "type": "force", "target": {"set": "tip"}, "vector": [0, 0, -550]}},
  {"command": "model.step.create", "params": {"name": "Cycle", "procedure": {"type": "nonlinear_static", "nonlinear_geometry": false, "initial_increment": 0.05, "max_increment": 0.05, "load_path": [[0, 0], [0.5, 1], [1, 0]]}, "boundary_conditions": ["sx", "sy", "sz", "clamp"], "loads": ["pull", "bend"]}},
  {"command": "solve.nonlinear", "params": {"step": "Cycle"}},
  {"command": "solve.history", "params": {"step": "Cycle", "sets": ["x1", "tip"], "node": 20}},
  {"command": "solve.probe", "params": {"step": "Cycle", "elements": [1]}},
  {"command": "results.deformed", "params": {"step": "Cycle", "show": true, "scale": 1}},
  {"command": "results.contour", "params": {"step": "Cycle", "field": "von_mises"}}
]

Results from the solve.nonlinear reply, solve.history (the frame histories: load factor, the mean displacement of each set and node 20 at the bar’s free corner (100, 10, 10)) and solve.probe with elements. The solve took 1.1 to 1.4 s (Apple M4 Max, CPU). The bar’s closed form, uniaxial stress σ = λ · 300 MPa: elastic ε = σ/E below σ_y; ε_p = (σ − σ_y)/H above it; unloading elastic, leaving ε = ε_p; lateral strain −ν σ/E − ½ ε_p (plastic flow is isochoric).

QuantityFieldCraftClosed formDifference
Bar elongation, λ = 0.8 (σ = 240 MPa, elastic)0.120 000 mm0.12 mm< 10⁻¹²
Bar elongation, λ = 0.9 (σ = 270 MPa)1.135 000 mm100 · (270/E + 20/H) = 1.135 mm< 10⁻¹²
Bar elongation, λ = 1 (σ = 300 MPa)2.650 000 mm100 · (300/E + 50/H) = 2.65 mm< 10⁻¹²
Bar corner, lateral displacement at λ = 1−0.129 500 mm10 · (−0.3 · 300/E − ½ · 0.025) = −0.1295 mm< 10⁻¹¹
Bar elongation after unloading2.500 000 mm100 · ε_p = 2.5 mm< 10⁻¹²
Bar corner, lateral displacement after unloading−0.125 000 mm−10 · ½ ε_p = −0.125 mm< 10⁻¹¹
Equivalent plastic strain, bar element 1, every integration point0.025 000(300 − 250)/2 000 = 0.025< 10⁻¹³
Bar stress after unloading, element 1< 1.2 × 10⁻⁸ MPa0
Beam tip deflection at λ = 1 (mean of tip)−1.1273 mmelastic Timoshenko: −1.1086 mm+1.7 %
Beam tip deflection after unloading−0.0295 mm
max_von_mises after unloading (residual stress in the beam’s root)56.3 MPa, node 85
max_plastic_strain0.025, node 3 (the bar)
applied_total, reaction_total after unloading0; 4.6 × 10⁻⁷ N0

The step took 28 increments. Up to λ = 0.8 every increment is elastic; increments 9 and 10 yield the bar (3 and 4 iterations). The first unloading increment from the peak failed to converge in 16 iterations and the next one stopped when its residual grew; after two cutbacks to a size of 0.003 125 the unloading continued elastically, the size growing back to 0.05.

What to look at. The bar follows the bilinear curve to round-off: elastic to 250 MPa, the slope E H/(E + H) above 250 MPa, and back along the elastic slope E to a permanent strain of 0.025 with no stress, its section contracting by half the plastic strain. The beam yields only in the outer fibres near its root, where the moment exceeds σ_y b h²/6; on unloading the elastic core springs back against the yielded fibres, so the beam keeps a set of 0.03 mm and a self-equilibrated residual stress up to 56 MPa at the root (the coloured patches at the top and bottom fibres next to the clamp), while the bar, yielded uniformly, unloads to zero stress.

Verification

CaseReferenceErrorToleranceTest
J2 uniaxial tension to a logarithmic strain of 0.2, implicittheory< 10⁻⁴ % (stress and plastic strain)10⁻⁶ rel.nl-j2-uniaxial
The same, explicittheory0.00017 % (stress), < 10⁻⁴ % (plastic strain)1 %j2-uniaxial-explicit
Bauschinger effect, kinematic hardening, back to zero straintheory< 10⁻⁴ %10⁻⁶ rel.j2-bauschinger
Bar held at its ends, heated past yieldtheory< 10⁻⁴ %10⁻⁸ / 10⁻⁷ rel.j2-heated-bar
Hill’s thick cylinder: bore displacement at a plastic radius 1.5a; collapse pressuretheory0.0089 %; < 10⁻⁴ %0.2 %; 0.1 %plastic-thick-cylinder
Cantilever plastic collapsetheory (beam hinge)−3.23 %5 %plastic-hinge-cantilever
Neo-Hookean uniaxial stretch λ = 2theory< 10⁻⁴ %10⁻⁶ rel.nl-neo-hookean-uniaxial
Mooney–Rivlin uniaxial, equibiaxial, pure sheartheory< 10⁻⁴ %10⁻⁶ rel.nl-mooney-rivlin-modes
Mooney–Rivlin tube inflated and stretched to λ_z = 1.5 (Rivlin’s incompressible solution, ν = 0.4995)theory0.62 % (3D), 0.66 % (axisymmetric)1 %nl-mooney-rivlin-tube, nl-mooney-rivlin-tube-axisymmetric
Yeoh uniaxial stretch λ = 2theory< 10⁻⁴ %10⁻⁶ rel.nl-yeoh-uniaxial
Hybrid nearly incompressible stretch, ν = 0.4999theory< 10⁻⁴ %10⁻⁶ rel.nl-hybrid-incompressible
Explicit quasi-static neo-Hookean pull against the implicit solvertheory (cross-check)−0.092 %, 0.026 %0.5 %explicit-neo-hookean-implicit
Free thermal expansion with orthotropic α, every solidtheorydisplacement < 10⁻¹², stress < 10⁻⁶exactfree_thermal_expansion_is_stress_free
Plastic material in a linear stepelastic solution bit for bit, with the warning—exactplastic_materials_solve_elastically_with_a_warning
Damage with constant fracture strain D1theoryfails as ε_p reaches D1, then no stressexactdamage_fails_an_element_at_its_fracture_strain
Johnson–Cook impact: heating, damage, erosionconsistencyeroded elements reported, energy balance < 2 %, bit-identical runsas statedjohnson_cook_impact_erodes_elements
Material pointtheoryconsistent tangents against central differences (finite and small strain, from a plastic history); bilinear, table and Johnson–Cook flow curves; heating and damage; hostile increments stay finiteround-offcrates/fem/src/{plasticity,elastoplastic,constitutive}.rs tests
Orthotropic elasticitytheoryisotropic constants give the isotropic D; uniaxial responseround-offorthotropic_with_isotropic_constants_is_isotropic, orthotropic_uniaxial_response
Two-domain Tait PVTtheory only, on a constructed coefficient set (the equation written out term by term; zero-pressure limit; monotonic in T and p within a domain; branches meeting at the transition; densities in the handbook range of unfilled PP); not checked against measured PVT data (see Limitations)round-off10⁻¹⁴ rel.crates/model/src/pvt.rs tests

Limitations

  • Material axes are the global axes; there are no material orientations.
  • Plasticity is von Mises with isotropic, linear kinematic or Johnson–Cook hardening, on isotropic materials only; kinematic hardening is linear (Prager) and bilinear only.
  • The Johnson–Cook rate term is refused in nonlinear static steps; damage, erosion and adiabatic heating act in explicit dynamics only.
  • No hyperelastic plasticity; no hyperelastic thermal strain in explicit dynamics.
  • Thermal properties are constant in temperature.
  • Shells and beams take isotropic, linear elastic, homogeneous sections only.
  • Orthotropic thermal expansion is refused in explicit dynamics.
  • PVT behaviour is stored and evaluated (model.material.specific_volume) but no solver uses it yet: the solvers take the constant density. There is no cooling-rate dependence (the coefficients describe one cooling rate).
  • The Tait implementation is not yet checked against measured PVT data: its tests check it against the equation itself. The case against measured volumes is added in the PR that first uses PVT in a solver.

Implementation

FileContents
crates/model/src/materials.rsMaterial, Elastic, Plastic, Hardening, Damage, Erosion, Hyperelastic, Thermal, their validation
crates/model/src/pvt.rsPvt (the two-domain Tait equation), TaitDomain, Pvt::evaluate
crates/engine/src/cmd/define.rsmodel.material.create/edit/delete, model.material.plasticity, model.material.damage, model.material.pvt, model.material.specific_volume
crates/fem/src/material.rselasticity (isotropic, orthotropic), von_mises, principal
crates/fem/src/plasticity.rsJ2::from_model, J2::radial_return, J2::update, J2::tangent, Johnson–Cook flow and damage
crates/fem/src/elastoplastic.rsfinite- and small-strain J2 material points with consistent tangents
crates/fem/src/constitutive.rsMaterialModel: St Venant–Kirchhoff, neo-Hookean, polynomial (Mooney–Rivlin, Yeoh), J2
crates/solver/src/system.rsinelastic_warnings; materials resolved per section
crates/explicit/src/system.rsthe explicit solver’s material and its refusals

References

  • C. Miehe, N. Apel, M. Lambrecht. Anisotropic additive plasticity in the logarithmic strain space: modular kinematic formulation and implementation based on incremental minimization principles for standard materials. CMAME 191:5383–5425, 2002. doi:10.1016/S0045-7825(02)00438-3.
  • R. M. Jones. Mechanics of Composite Materials, 2nd ed. Taylor & Francis, 1999.
  • J. C. Simo, T. J. R. Hughes. Computational Inelasticity. Springer, 1998.
  • R. D. Krieg, D. B. Krieg. J. Press. Vessel Technol. 99(4):510–515, 1977. doi:10.1115/1.3454568
  • J. C. Simo. Algorithms for static and dynamic multiplicative plasticity that preserve the classical return mapping schemes of the infinitesimal theory. CMAME 99:61–112, 1992.
  • G. R. Johnson, W. H. Cook. A constitutive model and data for metals subjected to large strains, high strain rates and high temperatures. Proc. 7th Int. Symp. on Ballistics, The Hague, 541–547, 1983.
  • G. R. Johnson, W. H. Cook. Fracture characteristics of three metals subjected to various strains, strain rates, temperatures and pressures. Eng. Fract. Mech. 21(1):31–48, 1985. doi:10.1016/0013-7944(85)90052-9
  • G. A. Holzapfel. Nonlinear Solid Mechanics. Wiley, 2000.
  • P. J. Flory. Thermodynamic relations for high elastic materials. Trans. Faraday Soc. 57:829–838, 1961.
  • M. Mooney. J. Appl. Phys. 11:582–592, 1940.
  • R. S. Rivlin. Phil. Trans. R. Soc. A 241:379–397, 1948.
  • O. H. Yeoh. Rubber Chem. Technol. 66(5):754–771, 1993.
  • R. Y. Chang, C. H. Chen, K. S. Su. Modifying the Tait equation with cooling-rate effects to predict the pressure–volume–temperature behaviors of amorphous polymers: modeling and experiments. Polym. Eng. Sci. 36(13):1789–1795, 1996. doi:10.1002/pen.10574
  • T. Willerer, T. Brinkmann, K. Drechsler. Development and Application of a Cooling Rate Dependent PVT Model for Injection Molding Simulation of Semi Crystalline Thermoplastics. Polymers 16(22):3194, 2024. doi:10.3390/polym16223194 (open access)

Cited material library

The Material menu offers Browse Material Library and Add Library Material. The same actions are model.material.library.list and model.material.library.add in scripts, the CLI and MCP. Browse all twenty entries, or filter family to steel, stainless, cast_iron, aluminium, copper, titanium or fluid. Adding an entry creates an ordinary editable material; it refuses a taken name.

{"command":"model.material.library.list","params":{"family":"stainless"}}
{"command":"model.material.library.add","params":{"entry":"EN10088-14301","name":"Stainless304","reference_temperature":"20 degC"}}
{"command":"model.material.library.add","params":{"entry":"air","name":"Cooling_air","temperature":"40 degC"}}

The report gives every supplied value in the current display units, its basis, source document/edition/table or clause and, where checked against the document, page, with a publisher or catalogue link where available, and the product/temperature conditions. material_si is explicitly the material as stored, in SI. values are the elastic, density and thermal properties used; not_applied contains strength information. unavailable names properties not supplied by this small catalogue. No network request or external data file is needed.

Entry idMaterial and main qualification
EN10025-S235S235 hot-rolled steel, nominal thickness up to 40 mm
EN10025-S275S275JR hot-rolled steel; published DoP strength minimums for nominal thickness up to 16 mm
EN10025-S355S355 hot-rolled steel, nominal thickness up to 40 mm
EN10025-S460NS460N normalized fine-grain steel plate; published DoP strength minimums for nominal thickness 3-16 mm
EN10083-C45-QTC45+QT quenched and tempered engineering steel; Saarstahl strength minimums for diameter below 16 mm (flat thickness below 8 mm); Ovako typical physical constants
EN10083-42CrMo4-QT42CrMo4+QT quenched and tempered alloy steel; Saarstahl strength minimums for diameter below 16 mm (flat thickness below 8 mm); Ovako typical physical constants
EN10088-143011.4301 / 304 stainless, hot-rolled plate up to 75 mm
EN10088-144011.4401 / 316 stainless, hot-rolled plate up to 75 mm
EN1561-GJL-250EN-GJL-250 grey cast iron (BS EN 1561-2023); lower end of the published 103-118 GPa modulus range and 100-500 C conductivity curve; brittle (Rp0.1 listed in sheet, no Rp0.2)
EN1563-GJS-400-15EN-GJS-400-15 ductile cast iron (BS EN 1563 (2018)); specific heat (20-500 C) and expansion (20-400 C) are elevated-temperature interval averages; conductivity omitted (source lists only 300 C)
AA5083-H111Rolled 5083-H111 sheet; EN 485-2 strength minimums for 3.0-6.3 mm (Alumeco); thermal properties from Hydro 5083 sheet
AA6061-T6Wrought 6061-T6; no product-specific strength selected
AA6063-T6Extruded 6063-T6 profile; strength row for wall thickness up to 10 mm
AA6082-T6Extruded 6082-T6; strength row for 5-20 mm specimen cross-section
AA7075-T6Wrought 7075-T6; no product-specific strength selected
AA2024-T3Bare 2024-T3 sheet, 0.010-0.128 inch, explicitly legacy handbook edition
Cu-ETP-R240Rolled Cu-ETP (CW004A / C11000) copper strip in R240 temper; Wieland room-temperature physical values
CuZn37-R350Rolled CuZn37 (CW508L / C27200) brass strip in R350 temper; Wieland room-temperature physical values
Ti6Al4V-annealedAnnealed Ti-6Al-4V; strength row for ASTM B265 sheet/plate, 0.025-1 inch
airDry air, 200-400 K: viscosity, conductivity and sea-level density curves, perfect-gas specific heat

Temperature-dependent properties

Some entries give a property as a curve of (temperature, value) points instead of a constant; the report lists them under curves, each point in the display units, with its source like a constant. A curve is linear between its points and held at its end values outside them.

EntryCurvesSource
EN10025-S235, EN10025-S275, EN10025-S355, EN10025-S460Nconductivity and specific heat 20-1200 C, through the 5000 J/(kg K) specific heat peak at 735 CThe EN 1993-1-2:2005 (3.4.1) carbon-steel design equations as an open paper reproduces them (Abeysiriwardena and Mahendran, Thin-Walled Structures 180 (2022) 109792, accepted manuscript on QUT ePrints, p. 19, Eqs. (27)-(32)), evaluated densely enough that specific-heat interpolation stays within 0.1 % of its equations
EN1561-GJL-250conductivity 100-500 C every 100 K (at default 20 C, the 100 C end value 48.5 W/(m K) is held with a range warning)Ductile Castings, Grey Cast Irons Technical Data (BS EN 1561-2023, undated sheet), p. 1
airviscosity, conductivity, density, 200-400 K every 10 KU.S. Standard Atmosphere 1976, eq. (51) and (53) p. 19, eq. (42) at 101325 Pa p. 15

Adding such an entry makes a material that keeps the whole curves (saved in the model, so a later library update never changes its results) and takes each curve’s value at temperature (default 20 C) as its constant. The heat transfer solver follows the conductivity, specific heat and density curves: each element takes its properties at its mean temperature, iterated to convergence (see heat transfer), with a warning where the temperatures leave a curve. A CPU Newtonian fluid step with heat (thermal), without turbulence or porous zones, follows a viscosity curve cell by cell; the fluid’s density, conductivity and specific heat, and the curves of conducting solids in the flow, stay at their constants there, said in the run’s warnings. The structural and explicit solvers and the deck writers use the constants. A temperature outside a curve takes its end value and the reply warns.

Every curve cites a document a reader can open and check. Aluminium has no curves yet: the EN 1999-1-2 design equations are not reproduced in any open source we could check. Liquid water is not in the library yet: the published tables we found are NIST Standard Reference Data, which may not be redistributed without NIST’s permission.

The air density is that of the perfect gas at the sea-level pressure; at another pressure, edit the density. The Standard notes its viscosity equation fails at very high and very low temperatures, so the curves stop at 200 and 400 K.

The material name defaults to the stable entry id. The stress-free reference_temperature defaults to 20 degrees Celsius in every display system. This is a modelling choice, not a measured handbook property. Set it to the assembly’s actual stress-free temperature when calculating thermal strain. The report says whether expansion exists to use that reference.

All five display presets, including imperial and Fahrenheit overrides, use the existing public Quantity conversion boundary. Stored properties remain SI; changing display units never changes them. The legacy unspecified alias means the mm-tonne-second preset, and default follows the user’s setting. Thermal properties support the selected temperature scale, including Fahrenheit.

Scope and source choices

These are constant isotropic approximations, with each property’s own basis and conditions. design identifies a source’s nominal calculation constant, minimum a published minimum for its specified product/condition, and typical a representative physical value. They are not interchangeable. Yield and tensile strengths are informational only: adding an entry never enables plasticity, damage, erosion, a safety factor or a failure criterion. A supplier’s certificate and the applicable design standard remain necessary for an engineering decision.

The original small curation in materials.json selects individual cited facts; it does not copy a handbook table layout or another product’s material library. Standards are cited by number, edition, clause or table and, where checked, page; the catalogue does not link to third-party copies. Steel/stainless calculation constants come from the explicitly cited EN 1993 editions, with S275JR and S460N minimum strengths taken from published thyssenkrupp Steel Europe EN 10025-1 Declarations of Performance; C45+QT (EN 10083-2:2006) and 42CrMo4+QT (EN 10083-3:2006) pair Ovako typical physical constants with Saarstahl quenched-and-tempered strength minimums for small sections (diameter at most 16 mm); grey (EN-GJL-250) and ductile (EN-GJS-400-15) cast irons cite Ductile Castings’ published BS EN 1561-2023 and BS EN 1563 (2018) technical data sheets; 5083, 6063 and 6082 elastic constants use EN 1999-1-1, paired with product-specific Alumeco (5083-H111 strength) and Hydro sheets (5083 thermal properties; 6063 and 6082 thermal and strength values); Cu-ETP (EN 1652, CW004A) and CuZn37 (EN 1652, CW508L) cite Wieland rolled-strip datasheets (K32 and M37) as isotropic approximations. Stainless physical values are from Outokumpu’s public Core/Supra Table 7. NASA’s public 1972 alloy handbooks identify the 6061/7075 elastic constants and physical-property temperature ranges. Ti-6Al-4V combines NASA’s nominal design tensile modulus with TIMET’s cited room-temperature physical values: it is an isotropic approximation, not a single measured lot or texture-dependent stiffness tensor.

The 2024-T3 entry explicitly cites MIL-HDBK-5H (1998), Table 3.2.3.0(b1), in the section reproduced with Change Notice 1 (2001). Its link is the official DLA catalogue, which identifies the superseding 5J (2003); these values are deliberately not relabelled as that edition. Older handbook constants do not establish current procurement requirements or design allowables.

Missing properties stay absent. For example, 2024 has elasticity and density here, 6061/7075 have no conductivity or specific heat, C45+QT/42CrMo4+QT also omit conductivity and specific heat (Ovako lists them only as ranges, whereas EN-GJL-250 stores the lower end of its 103-118 GPa modulus range as a minimum value because solid entries require Young’s modulus), 6082 has conductivity but no specific heat, EN-GJL-250 omits yield (the sheet lists Rp0.1 rather than Rp0.2), and EN-GJS-400-15 has no conductivity (the source lists only a single value at 300 C). Supply independently justified missing properties with model.material.edit before an analysis that needs them. Mean thermal properties over a stated interval are applied as constants, preferring the narrower interval starting at 20 C where a sheet lists more than one (for example 20-200 C over 20-600 C for EN-GJL-250 specific heat, and 20-200 C over 20-400 C for EN-GJL-250 expansion).

Reproduce a conduction check

Run the original conduction recipe:

fieldcraft-cli run docs/recipes/material-library-conduction.json

It adds library 304 stainless and uses its cited constant conductivity, 15 W/(m K) at 20 C, in a 20 by 30 by 120 mm insulated bar with its ends held at 20 and 30 C. With 36 hex8 cells, the exact constant-property solution is midpoint 298.15 K, axial heat flux -1250 W/m2 and 0.75 W through either end, with opposite signed reactions. The recipe probes those results. This is a synthetic implementation check of the material/units/solver path, not experimental material validation, a transient prediction or a coupled heat exchanger. Real thermal design must account for property variation, contacts, convection and radiation as appropriate.

Contact and friction

Contact keeps surfaces of a model from passing through each other and transmits pressure and Coulomb friction across them. In explicit dynamics it is penalty contact integrated segment to segment over the overlaps of facing element faces; in nonlinear static steps it is mortar contact enforced by an augmented Lagrangian with its exact consistent tangent. Both pass the contact patch test on non-matching meshes. Planar rigid walls stop a set’s nodes in explicit dynamics.

Commandsinteraction.contact.pair, interaction.contact.general, interaction.contact.edit, interaction.contact.delete, interaction.contact.find, interaction.rigid_wall, interaction.rigid_wall.delete
Step procedure"explicit_dynamic" (pairs, general contact, rigid walls), "nonlinear_static" (pairs, general contact)
Solvercrates/explicit (penalty), crates/solver (mortar, augmented Lagrangian); geometry in crates/fem (contact, mortar, dual); CPU, f64
MethodExplicit: mortar segmentation with the penalty at the integration points (Puso & Laursen 2004; Fischer & Wriggers 2005). Static: mortar contact (Puso & Laursen 2004) by augmented Lagrangian (Simo & Laursen 1992; Alart & Curnier 1991)
Verified bycrates/explicit/tests/contact.rs, crates/explicit/tests/self_contact.rs, crates/solver/tests/contact.rs; oracle cases explicit-bars-collision, explicit-contact-patch, explicit-sliding-block-*, bar-rigid-wall-impact, nl-contact-patch*, nl-hertz-cylinder*, nl-friction-sliding-blocks

Synopsis

[
  {"command": "interaction.contact.pair", "params": {
    "name": "press", "main": "plate", "secondary": "punch",
    "friction": {"static": 0.3, "kinetic": 0.2, "decay": 10},
    "penalty_scale": 1, "initial_penetration": "adjust"}},
  {"command": "interaction.contact.general", "params": {"name": "all"}},
  {"command": "interaction.rigid_wall", "params": {
    "step": "Impact", "set": "front", "point": [0, 0, 0], "normal": [1, 0, 0]}}
]

A contact is a model definition, active in every step that takes it. Its surfaces are sets of element faces (element edges in a 2D model), so they survive remeshing like a pressure load.

Parameters

interaction.contact.pair and interaction.contact.general:

FieldValueDefaultMeaning
nametextrequiredUnique; at most 1000 contacts per model.
main, secondaryface setsrequired (pair)Two different surfaces. In nonlinear static steps secondary is the non-mortar side.
surfaceface setevery exterior face of the solids (2D: every exterior edge)General contact: every face against every other face of the surface (self contact).
friction.static0 to 100 (frictionless)Static coefficient μ_s.
friction.kinetic0 to 10the static oneKinetic coefficient μ_k; a different value needs a decay.
friction.decay0 to 10¹⁵ s/m0Decay d of μ = μ_k + (μ_s − μ_k) e^{−d γ̇} with the slip rate γ̇.
penalty_scale10⁻⁶ to 11Factor on the solver’s penalty: explicit, the stiffest that leaves the time increment alone; static, the augmented Lagrangian’s.
initial_penetration"adjust" | "refuse""adjust"Nodes that start inside the other surface. Explicit moves them onto it, strain-free; static takes the overlap out of their gap; both report them. refuse stops the analysis naming the first node, its depth and the face.

interaction.contact.edit replaces a contact with the model’s form: {"name", "surfaces": {"type": "pair", "main", "secondary"} | {"type": "general", "surface"}, "friction", "penalty_scale", "initial_penetration"}. interaction.contact.delete takes {"name"}.

interaction.contact.find:

FieldValueDefaultMeaning
tolerancelengtha tenth of the mean exterior face sizeDistance within which surfaces touch.
createboolfalseAdd two face sets and a contact pair per touching pair of parts, named find-N-main, find-N-secondary and find-N.
friction, penalty_scale, initial_penetrationas aboveas aboveOf the created pairs.

The solid elements are split into connected parts (elements sharing a node belong to one part); a node of one part’s exterior faces within tolerance of an exterior face of another makes the two parts touch there. Each touching pair is reported with the faces of each side that are close to the other. At most 1000 pairs are reported and 2 · 10⁸ point–face checks made.

interaction.rigid_wall (explicit dynamic steps only; the same list as the step’s rigid_walls):

FieldValueDefaultMeaning
stepnamethe model’s only explicit dynamic stepThe step the wall belongs to.
setnode setrequiredThe nodes the wall stops.
point[x, y, z]requiredA point on the plane.
normal[nx, ny, nz], non-zerorequiredToward the side the nodes stay on.
frictionas abovefrictionlessCoulomb friction.

The reply gives the step and the wall’s index; interaction.rigid_wall.delete takes {"step", "index"}.

Theory

Friction law

Coulomb’s law with a coefficient that falls from its static to its kinetic value with the slip rate γ̇ (the exponential decay of Rabinowicz’s observations):

μ = μ_k + (μ_s − μ_k) e^{−d γ̇}

A static step has no slip rate: a node takes the static coefficient while it sticks and the kinetic one once it slips.

Shared geometry

fieldcraft_fem::contact gives the closest point of a triangle (exact region tests) or of a bilinear quadrilateral (projected Newton with the exact Hessian, at most 30 iterations) to a point, with the signed gap along the face’s normal and the lateral offset, and a bucket grid of face boxes whose cell is twice the mean box, grown until the grid (at most 2²⁴ cells) and its entries (2²⁷) fit, queried by point or by box with the candidates in face order (Benson & Hallquist 1990).

Explicit dynamics: penalty, segment to segment

Kinematics. Each secondary face and each main face facing it (normals within 84° of opposite, a dot product below −0.1) are projected onto the secondary face’s plane, split into triangles and clipped against each other (Sutherland–Hodgman). On each overlap triangle a three-point rule takes the gap g = (x_s − x_m)·n_m between the faces’ closest points. Where g < 0, no deeper than half the main face’s element (the smallest of its undeformed thickness, its current thickness, volume over face area, and its thinnest current part under the face), a penalty pressure p = ε(−g) acts on the secondary face’s nodes with weights N_i^s along n_m and on the main face’s nodes with −N_j^m. For a uniform pressure across flat faces both meshes receive exactly the consistent nodal forces ∫ p N dA, so the contact patch test passes on non-matching meshes; node-to-segment contact fails it (Taylor & Papadopoulos 1991). Every contact runs both ways at half the penalty each: a pair with each surface as the secondary in turn, single-surface contact with every face against every other face that shares no node with it.

Self contact is general contact on one body’s faces, all its exterior faces or a set of them (single-surface contact: Benson & Hallquist 1990; Belytschko et al. 2014, ch. 10). Nothing in the search or the integration asks which body a face belongs to, so a body that folds onto itself meets itself as two bodies meet, with the same penalty, friction and energy account. Three rules keep a body from touching itself where it only bends or squeezes:

  • a face never meets a face that shares a node with it: its neighbours, however sharply the surface folds, are left out;
  • a face never meets a face of its own element (a hexahedron’s opposite faces share no node);
  • the depth limit is half the main face’s element, undeformed and as it is now, and as thin as it is now where it is thinnest (the nodes of the element that are not on the face, measured behind the face along its normal): a layer squeezed through its thickness brings the far side of its elements nearer than half an undeformed element, and an unevenly squeezed one nearer than half the average, but never nearer than the element’s thinnest part, so it is not taken for a surface its near side has passed.

Each normal force and its reaction act along the main face’s normal through both points, so the contact keeps linear momentum, and angular momentum where the point’s foot on the main face is not clamped to an edge (lateral offset zero). Friction acts at a node and, reversed, at the point of the face under it: a couple whose arm is the penetration plus that lateral offset, so with friction and a zero offset the angular momentum changes by at most δ_max μ ∫ F_n dt.

Penalty. Per area, from the masses and the stable increment Δt:

ε = s γ min_i (m_i / A_i) / Δt²,   γ = 0.3

over the contact’s nodes, m_i the lumped mass and A_i = κ_i max_d Σ_f a_f |n_f,d| the area that bounds node i’s contact stiffness (a_f its share of face f, κ_i = max_f Σ_d |n_f,d| ∈ [1, √3]). By Gershgorin’s theorem the contact adds at most 2 s γ / Δt² to the square of any frequency (Weyl’s inequality adds it to the elements’). With the default increment scale 0.9 (ω Δt ≤ 1.8), 1.8² + 2γ ≤ 4 keeps the step under the stability limit ω Δt = 2: contact never shortens the increment, and s ≤ 1 only softens it. The pressure stiffness is about a fifth of the smallest element’s M/h (M the constrained modulus), stiffer than the element-based penalty f K A²/V with f = 0.1 (Hallquist, Goudreau & Benson 1985), and a uniform ε keeps a uniform pressure uniform.

Friction at the secondary nodes by a regularised return map (Wriggers 2006, §5.2 and §10.3; Simo & Laursen 1992) against the main face that pressed each node most over the increment:

t* = P t_n − k_t Δu_T,   k_t = ε A_i / 2
stick: |t*| ≤ μ f_n → t = t*
slip:  t = μ f_n t*/|t*|, dissipating μ f_n (|t*| − μ f_n)/k_t

f_n is the node’s share of the pressure, Δu_T its tangential motion relative to the closest point of the main face, and the reaction goes to the main face’s nodes with −N_j. The slip rate is γ̇ = |Δu_T|/Δt. A node that leaves contact forgets its tangential force.

Rigid walls are kinematic (Hughes et al. 1976): a node that would cross its wall in the increment has its normal velocity set so it lands on it; friction is a tangential impulse at most μ times the normal one (the tangential velocity stops, or loses μ Δv_n when it slides).

Initial penetration. Before the analysis each secondary node is projected onto the main surface; a node behind a face it lies over (within a fiftieth of the face’s size), within the depth limit and with its own faces facing it, is moved onto it before the elements are built, or the analysis is refused, as the contact says.

Energy. Contact forces enter the equations of motion like external forces; their work (the penalty energy stored plus what friction dissipates) is integrated by the trapezoidal rule into the energy balance, and friction dissipation in contact and on rigid walls is reported apart.

Nonlinear static: mortar, augmented Lagrangian

Discretisation (fieldcraft_solver::contact): mortar contact, one pass, the pair’s secondary surface the non-mortar side. Each secondary node A carries a pressure p_A and the weighted gap

g̃_A = Σ_segments ∫ Φ_A (x_m − x_s) · n dA,   ĝ_A = g̃_A / A_A,   A_A = ∫ Φ_A dA

over the overlaps of its faces with the main faces facing them, Φ_A the secondary face’s own shape functions. The pressure field is interpolated like the displacements, so a uniform pressure crosses a non-matching interface as the consistent nodal forces of both meshes (McDevitt & Laursen 2000).

Segmentation (fieldcraft_fem::mortar). Both faces are projected along the secondary face’s unit normal onto its plane, the main polygon is clipped by the secondary one (Sutherland–Hodgman; a projected quadrilateral that is not convex goes as its two triangles), and the overlap’s fan of triangles is integrated with Radon’s seven-point degree-5 rule. At each point both faces’ coordinates come from inverting their projected maps (linear, or bilinear by the root of its quadratic), so the main point lies on the main surface along the normal, warped or not. A vertex within 10⁻⁸ of a clip edge’s length of its line is on it and never cut. The kernel is written over a generic scalar: f64 for values, forward-mode Dual for gradients and Hyper (gradient and packed Hessian in the 24 corner coordinates) for the consistent tangent, the exact linearisation of the segmentation, normal and projection (fieldcraft_fem::dual).

Quadratic faces (tri6, quad8: tet10, hex20; Puso, Laursen & Solberg 2008). Each face is segmented as four flat facets through its nodes (a tri6’s four sub-triangles, a quad8’s four quadrilaterals round its centre), each facet pair projected, clipped and integrated as linear faces are, with the quadratic shape functions at the facets’ points and the points interpolated quadratically from the nodes. On the secondary side the multiplier basis is transformed, Φ_c = N_c + α (N_m + N_m’) at a corner and Φ_m = (1 − 2α) N_m at a mid-side node: the standard functions integrate to 0 at a tri6’s corners and to −A/12 at a quad8’s, which leaves those nodes no area. α is the smallest that makes Φ non-negative over the face, 1/4 on a tri6 (Φ_c = L_c²) and 3/8 on a quad8, so every node’s weighted gap is a positive average of the gap; Φ remains a partition of unity spanning the same space, and the patch test holds. The automatic differentiation runs per facet pair over the facets’ 24 vertex coordinates and is chained to the nodes exactly. A node’s reported pressure is its nodal force in the transformed basis over its area.

2D models (plane strain, plane stress, axisymmetric). Each edge is oriented with its normal (t_y, −t_x) out of its element; the main edge is projected along the secondary edge’s normal onto its line, which maps main points to the secondary parameter linearly, so the overlap is an interval integrated with three-point Gauss–Legendre (exact for the degree-3 Φ_a N_b r of the axisymmetric patch test). The out-of-plane measure (the thickness, or 2πr at the secondary point) is in the weights, so A_A, g̃_A and the forces are totals over the slab or the ring, as the 2D elements’ are (Yang, Laursen & Meng 2005). Points keep z = 0 and the same 24 variables as faces, and the tangent blocks keep their in-plane rows. The element’s thickness under an edge is its area over the edge’s length.

General contact uses one face list, a set’s or every exterior face of the solids, as both sides: each face against every other one facing it that shares no node with its element and that it does not reach through more than half an element (the far side of a thin wall), paired both ways, so the folds of one body press on each other symmetrically.

Enforcement. With the multipliers λ_A fixed, p_A = ⟨λ_A − ε_A ĝ_A⟩ (⟨x⟩ = max(x, 0)), the derivative of

Π = Σ_A A_A/(2 ε_A) ⟨λ_A − ε_A ĝ_A⟩²

giving internal forces −p_A ∂g̃_A/∂x and the tangent

K_c = Σ_closed (ε_A/A_A) ∂g̃_A ⊗ ∂g̃_A − p_A ∂²g̃_A

(the second term the contact’s geometric stiffness). Once Newton converges an increment, λ_A ← p_A (Uzawa) and the increment is solved again from its solution, until every closed node’s gap is within 10⁻⁵ of the thickness of the element under it and no open node keeps a multiplier, at most 25 augmentations (then a warning). The penalty per length is

ε_A = s · 10 · 3Ḡ / h

Ḡ the mean shear modulus, h = V/A of the element under the face, s the penalty_scale: about ten times the local element stiffness; 3Ḡ rather than the constrained modulus keeps it so for nearly incompressible rubber.

Small and finite sliding. Without nonlinear geometry the face pairs (those within a main element’s thickness) and their mortar integrals D_ai = ∫ Φ_a N_i, M_aj = ∫ Φ_a N_j are fixed in the reference configuration, so g̃_a = n · (Σ M_aj x_j − Σ D_ai x_i) is linear. With nonlinear geometry the pairs are searched (a bucket grid of the main faces’ boxes grown by their depth limit) and integrated on the current configuration at every evaluation; a pair deeper than half the main element’s thickness has passed through and is left out.

Friction at the closed secondary nodes by a return map (Wriggers 2006, §5.2; Simo & Laursen 1992). The node’s weighted tangential slip since the last converged increment is

w_A = B_A Δx,   B_A = [∫ Φ_A N_i P, −∫ Φ_A N_j P],   P = I − n n,   ĝ_T = w_A / A_A

(the rate form of the mortar slip, McDevitt & Laursen 2000). The trial traction t* = P t_n − ε_A ĝ_T sticks when |t*| ≤ μ p_A and otherwise returns to the cone, t = μ p_A t*/|t*|, with the static coefficient for a node that stuck in the last increment and the kinetic one for one that slipped. The traction does the virtual work t · B_A δx, so a slipping interface carries exactly μ times its normal force. The tangent is symmetrised: it keeps (ε_A/A_A) Bᵀ B in stick and (ε_A μ p_A/(A_A |t*|)) Bᵀ (I − t̂ t̂) B in slip and leaves out the coupling to the pressure (μ t̂ ⊗ ∂p_A/∂x) and the change of B with the geometry. The residual is exact, so only the rate of convergence suffers while nodes slip. Tractions and slip states are committed when an increment converges.

Initial overclosure. Nodes whose gap starts negative are reported; adjust takes the overlap out of their weighted gap (an offset: strain-free, the nodes are not moved), refuse stops naming the node and the depth.

Algorithm

Explicit dynamics, every increment (explicit dynamics):

  1. Put each surface’s faces in a bucket grid with their boxes grown by their depth limit; each secondary face takes the main faces in the cells its box overlaps. Faces of eroded elements leave the contact.
  2. Integrate every facing pair’s overlap with the penalty from the current stable increment, both ways at half the penalty; apply friction at the secondary nodes.
  3. Faces are integrated in parallel, each on its own, and their forces added face by face in a fixed order: the result does not depend on the thread count.
  4. After the velocity update, rigid walls correct the velocities of crossing nodes, with friction.

Nonlinear static, inside each Newton iteration (nonlinear static):

  1. Evaluate gaps, pressures and forces; the max() decides which nodes are closed at every evaluation (semismooth Newton). The tangent’s pattern takes the blocks of the closed nodes’ face pairs on top of the mesh’s.
  2. With contact, the force scale of the convergence test is that of the converged states, the loads and the current state, not the largest force of every trial.
  3. An increment whose active set alternates between two states three times is cut back (chattering); for the rest of the step, nodes open by less than 10⁻³ of their element’s thickness keep their penalty in the tangent (their pressure, and the residual, stay exact).
  4. After convergence, update the multipliers and solve the increment again (augmentations), measured against the increment’s start and its first correction, until the gaps are within tolerance or 25 augmentations. The next increment’s size follows the increment’s own iterations.
  5. Commit tractions and slip states. Results do not depend on the thread count.

Output

Explicit dynamics (solve.explicit reply, contacts): per contact the nodes adjusted at the start (each reported in a warning with the deepest), the peak normal force and its time, the first and last time it carried a force, the deepest penetration and the friction dissipated. The histories (solve.history) give the normal force across each contact per sample; the energy account carries contact (penalty energy plus friction) and friction (in contact and on rigid walls).

Nonlinear static: per secondary node the pressure (its normal contact force over the area it carries, ∫ Φ_A over the overlaps, which is smoother than the multipliers at the contact’s edge), the multiplier, the gap ĝ, the status (open, closed; with friction stick or slip), and with friction the shear traction and the slip over the last increment; per contact the force on the secondary surface, the normal force Σ p_A ∫Φ_A, the deepest penetration and the augmentations. solve.nonlinear summarises each contact (normal_force, force, max_pressure, closed_nodes, slipping_nodes, penetration, augmentations), solve.probe gives a secondary node’s contact entries, and the results display draws contact_pressure, contact_gap, contact_status, contact_shear and contact_slip.

Decks. Abaqus writes *SURFACE INTERACTION with *FRICTION (exponential decay), *CONTACT PAIR and general *CONTACT; LS-DYNA writes *CONTACT_AUTOMATIC_SURFACE_TO_SURFACE and _SINGLE_SURFACE (fs, fd, dc, sfsa, sfsb). Nastran refuses contact by name.

A worked loading–unloading example is in contact loading and unloading.

Worked example

A steel roller of radius 20 mm pressed onto a steel plate in plane strain: Hertz line contact by mortar contact of the roller’s round edge on the plate’s flat edge, enforced by the augmented Lagrangian in a nonlinear static step. The two meshes do not match across the contact.

Geometryhalf model, symmetric about x = 0: the roller’s lower part, 4 mm wide and 6 mm high with its bottom edge the R20 arc; the plate 10 × 10 mm; unit thickness
Meshroller 20 × 12 quad4 graded towards the contact (bias 8, 8); plate 24 × 16 quad4 graded towards the contact (bias 10, 0.1); merge 0 keeps the bodies apart
Materialsteel: E = 210 000 MPa, ν = 0.3; plane strain sections
Contactpair Line: main flat (plate), secondary round (roller), frictionless
Boundary conditionsx held on the symmetry edges; y held on the plate’s base; a soft spring (0.01 N/mm per node) holds the roller’s top in y until the contact closes
Loadpressure 362.4915 MPa on the roller’s top edge: 1 449.97 N on the half, P = 2 899.93 N/mm on the whole roller, chosen for b = 0.8 mm
Stepnonlinear static, nonlinear_geometry false, max_iterations 60
Unitsmm, t, s, N, MPa
[
  {"command": "model.units", "params": {"system": "mm-t-s-N-MPa"}},
  {"command": "mesh.block", "params": {"body": "Roller", "kind": "quad4",
    "corners": [[0, 0, 0], [4.0, 0.40408205773457695, 0], [4.0, 6.0, 0], [0, 6.0, 0]],
    "divisions": [20, 12], "bias": [8, 8],
    "edges": [{"corners": [1, 2], "arc": {"center": [0, 20.0, 0]}, "name": "round"},
              {"corners": [3, 4], "name": "top"}, {"corners": [4, 1], "name": "sym"}]}},
  {"command": "mesh.block", "params": {"body": "Plate", "kind": "quad4",
    "corners": [[0, -10, 0], [10, -10, 0], [10, 0, 0], [0, 0, 0]],
    "divisions": [24, 16], "bias": [10, 0.1],
    "edges": [{"corners": [1, 2], "name": "base"}, {"corners": [3, 4], "name": "flat"}, {"corners": [4, 1], "name": "sym"}],
    "merge": 0}},
  {"command": "model.set.create", "params": {"name": "roller", "geometry": [{"body": "Roller", "face": "area"}]}},
  {"command": "model.set.create", "params": {"name": "plate", "geometry": [{"body": "Plate", "face": "area"}]}},
  {"command": "model.set.create", "params": {"name": "round", "geometry": [{"body": "Roller", "edge": "round"}]}},
  {"command": "model.set.create", "params": {"name": "flat", "geometry": [{"body": "Plate", "edge": "flat"}]}},
  {"command": "model.set.create", "params": {"name": "top", "geometry": [{"body": "Roller", "edge": "top"}]}},
  {"command": "model.set.create", "params": {"name": "base", "geometry": [{"body": "Plate", "edge": "base"}]}},
  {"command": "model.set.create", "params": {"name": "sym", "geometry": [{"body": "Roller", "edge": "sym"}, {"body": "Plate", "edge": "sym"}]}},
  {"command": "model.material.create", "params": {"name": "Steel", "elastic": {"type": "isotropic", "young": 210000, "poisson": 0.3}}},
  {"command": "model.section.create", "params": {"name": "Roller", "set": "roller", "material": "Steel", "kind": {"type": "plane_strain", "thickness": 1}}},
  {"command": "model.section.create", "params": {"name": "Plate", "set": "plate", "material": "Steel", "kind": {"type": "plane_strain", "thickness": 1}}},
  {"command": "interaction.contact.pair", "params": {"name": "Line", "main": "flat", "secondary": "round"}},
  {"command": "model.boundary_condition.create", "params": {"name": "Sym", "type": "displacement", "target": {"set": "sym"}, "values": [0, null, null, null, null, null]}},
  {"command": "model.boundary_condition.create", "params": {"name": "Base", "type": "displacement", "target": {"set": "base"}, "values": [null, 0, null, null, null, null]}},
  {"command": "model.spring.create", "params": {"name": "Hold", "type": "spring", "first": {"set": "top"}, "direction": {"dof": 2}, "stiffness": 0.01}},
  {"command": "model.load.create", "params": {"name": "Press", "type": "pressure", "set": "top", "magnitude": 362.4915}},
  {"command": "model.step.create", "params": {"name": "Press",
    "procedure": {"type": "nonlinear_static", "nonlinear_geometry": false, "max_iterations": 60},
    "boundary_conditions": ["Sym", "Base"], "loads": ["Press"]}},
  {"command": "solve.nonlinear", "params": {"step": "Press"}},
  {"command": "solve.probe", "params": {"step": "Press", "nodes": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 64]}},
  {"command": "results.contour", "params": {"step": "Press", "field": "von_mises"}},
  {"command": "results.deformed", "params": {"step": "Press", "show": true, "scale": 1}}
]

Hertz’s line contact of two bodies of one material on a flat (Johnson 1985, §4.3): 1/E* = 2 (1 − ν²)/E, b = √(4 P R / (π E*)), p₀ = 2 P / (π b), p(x) = p₀ √(1 − x²/b²). Results from the solve.nonlinear reply (seven increments, 46 Newton iterations, 1 341 equations, 0.2 s, Apple M4 Max, CPU):

QuantityFieldCraftReferenceDifference
contacts[0].max_pressure2 338.8 MPa (node 2, x = 0.059 mm)p₀ = 2 307.7 MPa+1.35 %
contacts[0].normal_force1 450.17 Napplied 1 449.97 N+0.014 %
closed_nodes9 (x ≤ 0.711 mm)b = 0.8 mm: the 9 roller nodes with x < b—
penetration3.8 × 10⁻⁷ mm0—
augmentations18——
slipping_nodes0frictionless—
max_von_mises1 393.9 MPa = 0.60 p₀ (node 64: on the axis, 0.53 mm inside the roller)——

The pressure at the roller’s edge nodes (solve.probe, contact[0].pressure; x from the graded mesh of the arc):

Node1234567891011
x (mm)00.0590.1240.1980.2790.3700.4720.5850.7110.8521.010
FieldCraft (MPa)2 287.72 338.82 281.02 236.62 185.02 054.61 819.71 690.7782.8112.70
Hertz (MPa)2 307.72 301.52 279.62 236.32 162.72 045.81 863.91 574.21 055.900

What to look at. The stress is largest inside both bodies, below the contact on the axis of symmetry, the subsurface maximum of Hertz contact; the contact edge carries little stress. The nodal pressure follows the semi-ellipse within 1.7 % over the inner half of the contact width and falls to zero between 0.71 and 1.01 mm, around b = 0.8 mm; at the edge each node’s pressure averages the distribution over the elements it carries, which flattens the steep fall there. Contact carries the whole load: the normal force equals the applied force to 0.014 %.

Verification

Explicit dynamics, oracle cases (results):

CaseReferenceQuantityErrorTolerance
explicit-bars-collisiontheory: 1D impact of equal barslast contact against 2L/c; peak interface force against ρcAv₀/2; struck bar’s far-end velocity; kinetic energy kept; contact energy after separation1.21 %; 2.94 %; 3.4 %; −0.0047 %; −7.7·10⁻⁵2 %; 4 %; 5 %; 1 %; ± 10⁻³
explicit-contact-patchtheory: contact patch test on non-matching meshesσ_zz ratios across the interface; interface force over σ_zz A; σ_xx/σ_zz≤ 0.056 %; 0.26 %; −3.6·10⁻⁴0.5 %; 1 %; ± 0.005
explicit-sliding-block-walltheory: v₀²/(2μg) on a rigid walldistance; friction dissipation over ½mv₀²−0.0053 %; 0.12 %1 %
explicit-sliding-block-contacttheory: decaying friction on a deformable plate, ∫ v dv / (g μ(v))distance−0.17 %1 %
bar-rigid-wall-impacttheory: contact for 2L/c, rebound at v₀end displacements; kinetic energy≤ 0.51 %; −0.54 %3 %; 2 %

Tests in crates/explicit/tests/contact.rs: colliding bars as a pair and as general contact (contact for 2L/c, interface force ρcAv₀/2, velocities exchanged, kinetic energy kept to 0.01 %, the contact energy back to 10⁻⁴ of it); a free body untouched by general contact on all its faces; a block sliding to a stop under constant and decaying friction on a rigid wall and on a deformable plate (distance and time to 0.1–0.5 %); the contact patch test (σ_zz uniform to 0.1 %); two spheres colliding against Hertz on a graded quarter-sphere mesh of 27 648 hex8 (spheres_collide_as_hertz_says: peak force +2.3 %, duration −0.4 %); initial penetrations adjusted or refused, the face cap, tetrahedra; bit-for-bit results on one and four threads.

Self contact, in crates/explicit/tests/self_contact.rs:

TestReferenceResultTolerance
hinged_bars_collide_like_two_bodies: two bars joined by a soft hinge cell over their joint (one body, general contact on all its faces) against the same bars unjoined (two bodies, a pair)the two-body run; wave theory (Graff 1991): contact 2L/c, force ρcAv₀/2peak force −0.022 %, contact time 0.000 %, rebound velocities within 1.6·10⁻³ v₀ of the two-body run; contact 1.2 % over 2L/c, peak force +0.3 % over ρcAv₀/2, velocities exchanged within 4·10⁻³ v₀; momentum to 2·10⁻¹⁴; balance 5·10⁻⁵1 %; 1 %; 0.005 v₀; 2 % (time), 5 % (force), 0.03 v₀; 10⁻¹⁰; 0.005
a_hairpin_closing_on_itself_keeps_momentum_and_energy: a U-shaped body whose arms are thrown at each other, one sliding along the otherconservation of linear and angular momentum; the friction couple’s bound δ_max μ ∫F_n dtlinear momentum to 5·10⁻¹⁵; angular momentum to 1.6·10⁻⁸ of itself frictionless, and with μ = 0.3 changed by 8.5·10⁻⁷ against the bound 1.7·10⁻⁵; balance 1.6·10⁻⁴; the same numbers on one and four threads; the arms overlap by at most 2.4·10⁻³ (the same arms without contact: 0.58)10⁻¹⁰; 10⁻⁶; the bound; 0.005; bit for bit; overlap < 0.01 (a tenth of an arm’s thickness)
a_ring_crushed_flat_carries_load_on_its_inner_surface (heavy): half a neo-Hookean ring (wall a tenth of the radius, two elements through it, plane strain) crushed between two punches from its height of 2.1 radii to 0.18, a little under its two wallswithout contact the walls pass; with it the inner surfaces carry the punch’s load; the penalty law p = ε(−g)without: the walls cross by 0.027 (27 % of the wall); with: no deeper than 0.0087, the contact carrying 99.6 % (inner surface) and 98 % (every face) of the punch’s force, 18 times the force bending alone takes; the force ε W ∫ d dx from the measured overlap, with the increments of the last samples, 7.1 to 11.1 around the reported 7.69crossing > 0.2 t; < 0.1 t; 3 %; > 10 times; within the bracket ± 5 %
a_bending_cantilever_feels_no_self_contact, an_ovalising_tube_feels_no_self_contact, a_squeezed_one_element_layer_feels_no_self_contact, a_squeezed_two_element_layer_feels_no_self_contact, a_tapered_two_element_stack_feels_no_self_contact, a_tapered_three_element_stack_feels_no_self_contact: a cantilever flung to a tip deflection of 0.78 of its length, a thick tube with a small bore squeezed oval by its own motion, a layer of foam one element thick squeezed by 60 % and two elements thick by 80 %, and stacks of two and three elements 0.001 thick over three corners and 1.0 over the fourththe same run without contactno contact force, the same frames bit for bit (before the depth limit followed the current element, the squeezed layers took false contact forces of 193 and 1 216 N, and before it followed the thinnest part the tapered stacks 52 and 43 N)exact
self_contact_cost_scales_with_the_exterior_faces (heavy): a slab n × n × 2 tumbling freely, n = 8 to 64—the contact’s time per increment and exterior face 13, 13, 6.4 and 5.1 µs for 192, 640, 2 304 and 8 704 faces (debug build; a guide to how the cost scales, not to speed): linear in the faces, the larger runs spread over more threads—

The fix that came with these tests (the depth limit also halving the current thickness at its thinnest, and a face never meeting a face of its own element) accepts no point that was refused before, and refuses a point that was accepted only where it lies deeper than half the current thickness of a squeezed element. Everywhere else nothing changes: the 14 solves of the contact tests that were there before the fix and are not marked heavy (crates/explicit/tests/contact.rs) give the same results bit for bit (compared by a digest of everything each run reports); the heavy spheres_collide_as_hertz_says was not compared that way and passes its own assertions.

Nonlinear static, oracle cases:

CaseReferenceQuantityErrorTolerance
nl-contact-patch (hex8), -plane-strain, -axisymmetric (quad4)theory: uniform σ, pressure equal to it, no lateral stressstress ratios, pressure, integrated pressure over reactionsmall sliding < 10⁻⁶; finite sliding ≤ 3.3·10⁻⁵10⁻⁶ rel.; 0.02 %
nl-contact-patch-quadratic (hex20)theory: uniform σ, pressure equal to it at corners and mid-side nodes, no lateral stressstress ratios, pressure, integrated pressure over reactionsmall sliding < 10⁻⁶; finite sliding ≤ 2.1·10⁻⁵10⁻⁶ rel.; 0.02 %
nl-hertz-cylinder, -plane-straintheory: Hertz line contactpeak pressure p₀; contact force; pressure at x = 0.296 and 0.367; σ_yy at depth 0.4710.25 %; 0.022 %; −2.9 %, 6.1 %; 1.9 %2 %; 0.2 %; 5 %, 10 %; 4 %
nl-hertz-cylinder-hex20 / -tet10 (curved quadratic faces, half the divisions)theory: Hertz line contactpeak pressure p₀; contact force; gap at x = 0.42 (inside b); pressure and separation at x = 0.72 (outside b)0.14 % / 1.7 %; 0.024 % / 0.023 %; < 10⁻⁷; 0; 4.5 % / 21 %2 % / 3 %; 0.2 %; 10⁻⁵ abs.; 1 abs.; 10 % / 25 %
nl-friction-sliding-blockstheory: Coulomb sliptangential over normal force (μ = 0.2); balance with the reaction; slipping nodes−10⁻⁶; < 10⁻⁶; 9 of 90.1 %; 10⁻⁶ rel.; exact

Tests in crates/solver/tests/contact.rs: the contact patch test on non-matching hex8, tet4 and (plane strain, axisymmetric) quad4 meshes, to 10⁻⁹ with small sliding and 10⁻⁴ with finite sliding, where the gaps the augmentation leaves enter through their geometric terms, and on hex20 and tet10 meshes against each other and against hex8 and tet4 ones (10⁻⁹ with small sliding, 2 × 10⁻⁴ with finite sliding, heavy); the chain rule of the quadratic pairs’ gradient and Hessian against central differences on curved faces; Hertz’s line contact (the half-width bracketed), and on hex20 and tet10 with their mid-side nodes on the circle (curved faces: peak pressure within 0.9 % and 4.2 %, the nodal pressures inside 0.6 b within 15 % of the ellipse as corners and mid-side nodes alternate, the half-width bracketed; heavy); Hertz’s sphere on a flat, a quarter model (peak pressure within 4 %, contact radius bracketed; heavy); Newton’s quadratic rate near the solution with finite sliding; Coulomb friction between pressed blocks (stick below the cone with the forces of glued blocks; slip carrying μ N to 0.1 % with small sliding and 3 % with finite sliding, and μ_k N once slipping); initial overclosure adjusted and refused; bit-for-bit results on one and four threads; the refusals. In 2D, Hertz’s line contact on quad4 edges matches the hex8 model to 10⁻⁵, and a hybrid Mooney–Rivlin C-ring closing on itself in plane strain moves as the one-layer solid ring with z held, node for node to 10⁻⁵. Under general (self) contact, a rubber ring’s two ends meet and press on each other without passing through, keeping the model’s mirror symmetry; a quarter rubber bellows squeezed axially by 0.8 folds onto itself (heavy suite).

Limitations

  • Nonlinear static contact takes linear and quadratic faces (tri3, quad4, tri6, quad8: tet4, tet10, wedge6, hex8, hex20) and in 2D the linear edges of tri3 and quad4; quadratic edges are refused by name, as is a mid-side node shared by a tri6 and a quad8 face of a secondary surface (their multiplier bases differ there).
  • On quadratic faces the reported nodal pressures alternate between corners and mid-side nodes where the pressure varies (by about a tenth in the Hertz test on hex20 and tet10); the forces are consistent, a node’s pressure is its force over its area in the transformed basis.
  • Arc-length steps refuse contact. The linear implicit analyses (static, frequency, buckling, heat) refuse contact by name.
  • The static friction tangent is symmetrised: convergence slows while nodes slip. A static step has no slip rate, so the exponential decay is not used there.
  • Explicit contact: faces exposed by eroded elements do not join the contact (eroding contact is not implemented).
  • Explicit self contact is face against face: two edges that cross without either touching the inside of a face (edge-to-edge contact) are not caught, and a node that slides off the edge of a surface into a sharp re-entrant corner may be caught late. It acts on hex8 and tet4 faces; explicit dynamics has no shells or beams yet.
  • One penalty per contact, from the lightest node per area of its whole surface: general contact on every exterior face of a model that joins very different materials or element sizes gets the penalty its lightest part allows, and its stiff parts sink further into each other. Name separate surfaces for such parts.
  • The depth limit follows the current element, at its thinnest: where the pressure is high enough that the penalty’s penetration p/ε passes half of the thinnest part of an element crushed under the face (for a tapered element, its thinnest corner), those points let go. The thickness is how far behind the face each of the element’s other nodes lies, taken at the closest point of the face’s own surface, so a warped face is measured as it is; that the far side of the layer is at least that far away is exact for flat layers and not proven for extreme warp. max_penetration reports only the points the depth limit accepts: a point that has let go is not counted, so it can stay small, or zero, while surfaces pass through each other, and it never shows a penetration deeper than the limit. A smaller penalty_scale makes the penetration larger. Under a pressure that drives p/ε past half a crushed element’s current thickness, the deepest points release and the run gives no warning: the remedy is a larger penalty_scale (a stiffer penalty) or a finer mesh, so that the element is not crushed that far.
  • Rigid walls are fixed planes in explicit dynamic steps only.
  • interaction.contact.find looks at solid elements only.
  • Caps: 1000 contacts per model; 10⁷ contact faces in explicit (max_contact_faces), 2 · 10⁶ in nonlinear static steps.

Implementation

  • crates/model/src/contact.rs: Contact, ContactSurfaces, Friction, InitialPenetration, validation and caps.
  • crates/explicit/src/contact.rs: penalty contact, search, friction, initial adjustment (GAMMA, FACING, DEPTH_FRACTION).
  • crates/explicit/src/integrate.rs: rigid walls (constrain, wall_friction).
  • crates/solver/src/contact.rs: mortar contact, augmented Lagrangian, friction, active set (PENALTY_FACTOR, GAP_TOLERANCE, MAX_AUGMENTATIONS, CHATTER_LIMIT, ENGAGED_BAND).
  • crates/fem/src/mortar.rs: segmentation and integration; crates/fem/src/dual.rs: Dual, Hyper; crates/fem/src/contact.rs: closest point, bucket grid.
  • crates/engine/src/cmd/contact.rs: the interaction.contact.* and interaction.rigid_wall* commands, find.

References

  • M. A. Puso, T. A. Laursen. A mortar segment-to-segment contact method for large deformation solid mechanics. CMAME 193:601–629, 2004.
  • M. A. Puso, T. A. Laursen, J. Solberg. A segment-to-segment mortar contact method for quadratic elements and large deformations. CMAME 197:555–566, 2008.
  • K. A. Fischer, P. Wriggers. Frictionless 2D contact formulations for finite deformations based on the mortar method. Comput. Mech. 36:226–244, 2005.
  • T. W. McDevitt, T. A. Laursen. A mortar-finite element formulation for frictional contact problems. IJNME 48:1525–1547, 2000.
  • J. C. Simo, T. A. Laursen. An augmented Lagrangian treatment of contact problems involving friction. Comput. Struct. 42(1):97–116, 1992.
  • P. Alart, A. Curnier. A mixed formulation for frictional contact problems prone to Newton like solution methods. CMAME 92:353–375, 1991.
  • B. Yang, T. A. Laursen, X. Meng. IJNME 62:1183–1225, 2005 (2D mortar contact).
  • P. Wriggers. Computational Contact Mechanics, 2nd ed., Springer 2006.
  • R. L. Taylor, P. Papadopoulos. On a patch test for contact problems in two dimensions, 1991.
  • D. J. Benson, J. O. Hallquist. A single surface contact algorithm for the post-buckling analysis of shell structures. CMAME 78:141–163, 1990.
  • T. Belytschko, W. K. Liu, B. Moran, K. I. Elkhodary. Nonlinear Finite Elements for Continua and Structures, 2nd ed. Wiley, 2014: ch. 10 (contact-impact).
  • K. F. Graff. Wave Motion in Elastic Solids. Dover, 1991: §2.1–2.3 (colliding bars).
  • J. O. Hallquist, G. L. Goudreau, D. J. Benson. Sliding interfaces with contact-impact in large-scale Lagrangian computations. CMAME 51:107–137, 1985.
  • T. J. R. Hughes, R. L. Taylor, J. L. Sackman, A. Curnier, W. Kanoknukulchai. A finite element method for a class of contact-impact problems. CMAME 8(3):249–276, 1976.
  • H. Hertz. J. reine angew. Math. 92:156–171, 1882; K. L. Johnson. Contact Mechanics, Cambridge 1985.

Constraints and connectors

Constraints relate degrees of freedom to each other: couplings tie a reference point to a set of nodes, ties bond non-matching meshes by dual mortar conditions, and symmetry conditions hold the motion normal to a plane of any orientation. The implicit solvers eliminate every linear constraint by transformation, so the reduced matrix stays symmetric positive definite with no penalty numbers and no Lagrange multipliers. Connectors add discrete stiffness, damping and mass: springs, dashpots and point masses with rotary inertia.

Commandsmodel.reference_point.create|edit|delete, model.coupling.create|edit|delete, interaction.tie, interaction.tie.edit, interaction.tie.delete, model.boundary_condition.create ("type": "symmetry"), model.boundary_condition.symmetry, model.spring.create|edit|delete, model.mass.create|edit|delete
Step procedureCouplings, ties: "static", "frequency", "buckle", "nonlinear_static" (ties also "heat_transfer", "coupled_temperature_displacement"). Symmetry, springs, point masses: the implicit structural steps and "explicit_dynamic" (translational only). Dashpots: "explicit_dynamic"
Solvercrates/solver (constraints, tie, discrete), crates/explicit (discrete, integrate); CPU, f64
MethodMaster–slave elimination by transformation (Cook, Malkus, Plesha & Witt 2002 §9.2; Abel & Shephard 1979); dual mortar ties (Wohlmuth 2000; Popp et al. 2012); interpolation constraints (Heirman & Desmet 2010)
Verified bycrates/solver/tests/{couplings,contact,inclined_symmetry,one_d}.rs, crates/explicit/tests/{one_d,inclined_symmetry}.rs; oracle cases tube-torsion-coupling, pure-bending-coupling, tie-patch, tie-heat-series

Synopsis

[
  {"command": "model.reference_point.create", "params": {"name": "RP", "xyz": [3, 0.5, 0.5]}},
  {"command": "model.coupling.create", "params": {
    "name": "pad", "reference_point": "RP", "set": "end", "kind": "kinematic"}},
  {"command": "interaction.tie", "params": {"name": "glue", "main": "plate", "secondary": "rib"}},
  {"command": "model.boundary_condition.symmetry", "params": {"name": "Sym", "datum": "Mid"}},
  {"command": "model.spring.create", "params": {
    "name": "mount", "type": "spring", "stiffness": 1000,
    "first": {"set": "foot"}, "direction": {"dof": 3}}},
  {"command": "model.mass.create", "params": {
    "name": "motor", "target": {"reference_point": "RP"}, "mass": 2.5,
    "inertia": [0.1, 0.1, 0.2, 0, 0, 0]}}
]

Parameters

Reference point (model.reference_point.create):

FieldValueDefaultMeaning
nametextrequired
xyz[x, y, z]requiredIts position.
labelintegerthe highest free labelIts node label in decks, kept through remeshes. A mesh node on the same label is an error of the check.

Coupling (model.coupling.create):

FieldValueDefaultMeaning
nametextrequired
reference_pointnamerequiredThe point coupled.
setnode or face setrequiredThe nodes it is coupled to, or the element faces whose surface it is coupled to.
kind"kinematic" | "distributing"requiredRigid link, or least-squares interpolation constraint (over the set’s faces, the consistent L2 fit; over a set of nodes, equal weights).
dofssubset of 1–6allThe coupled degrees of freedom (1–3 translations, 4–6 rotations, global axes).

Tie (interaction.tie, interaction.tie.edit):

FieldValueDefaultMeaning
nametextrequired
main, secondaryface setsrequiredEach secondary node follows the main surface under it.
position_tolerancelengthhalf the main element’s thicknessHow far a secondary node may lie from the main surface and still be tied.

Symmetry (model.boundary_condition.create, "type": "symmetry"):

FieldValueDefaultMeaning
target{"set"} | {"reference_point"}requiredThe nodes held.
plane"x" | "y" | "z" | {"normal": [nx, ny, nz]}requiredThe plane’s normal; any finite, non-zero vector.

model.boundary_condition.symmetry takes {"name", "datum", "set"?, "bodies"?}: a datum plane of any orientation and, unless set is given, a new set of the same name holding every face of the open design’s bodies (or of bodies) that lies on the plane within 10⁻⁶ of the body’s size, such as a partition’s cut faces. It reports the plane as "x", "y", "z" or its unit normal. Both forms are activated in steps with model.step.activate.

Spring or dashpot (model.spring.create):

FieldValueDefaultMeaning
type"spring" | "dashpot"required
stiffness / coefficientnumberrequiredForce per relative displacement / per relative velocity.
first{"set"} | {"reference_point"}requiredEvery node of the target gets its own copy.
secondtargetnoneWithout it each node of first connects to the ground; with it each end is one node.
direction{"dof": 1..6} | {"vector": [x, y, z]} | "line"requiredA global degree of freedom (4–6: torsional), a fixed vector, or the line through the two ends (two-point only, from the undeformed positions).

Point mass (model.mass.create):

FieldValueDefaultMeaning
target{"set"} | {"reference_point"}requiredEvery node of the target gets the full value.
massnumber | [mx, my, mz]requiredTranslational mass, the same in every direction or per global direction.
inertia[I11, I22, I33, I12, I13, I23]noneRotary inertia tensor about the node in global axes; needs rotations (a reference point, or a shell or beam node).

A point mass of 2 on a set of five nodes adds 2 at each of them; a mass shared over a face is a point mass on a reference point coupled to the face.

Theory

Reference points and couplings

A reference point is a single node off the mesh with three translations and three rotations, numbered after the mesh’s translational degrees of freedom. Each coupling becomes linear constraint rows Σ cⱼ uⱼ = 0.

Kinematic (a rigid link): every node s of the set follows the point r rigidly in the coupled translations,

u_s = u_r + θ_r × (x_s − x_r)

(small rotations; Cook et al. 2002, §9.2). The point’s rotations take part through the lever arms, so a moment on it reaches the face as a couple even when only translations are coupled. Coupled rotations tie the rotations of shell and beam nodes, θ_s = θ_r; solid nodes have none.

Distributing (an interpolation constraint): the point moves with the rigid motion that fits the set’s displacement best in the least-squares sense. For a set with element faces the fit is taken over those faces, ∫ |u_h − u_c − θ × r|² dA with u_h = Σ Nᵢ uᵢ, so the point’s force reaches the nodes as the consistent nodal loads of a uniform plus a linear traction (Zienkiewicz, Taylor & Zhu, The Finite Element Method, 7th ed., 2013, §6.6). About the surface’s centroid c, with r = x − c,

u_c = Σ sᵢ uᵢ,   θ = J⁻¹ Σ pᵢ × uᵢ,   J = ∫ (|r|² I − r rᵀ) dA
sᵢ = ∫ Nᵢ dA / A,   pᵢ = ∫ Nᵢ r dA,   A = ∫ dA
θ_r = θ,   u_r = u_c + θ × (x_r − c)

Over a set of nodes only (no faces), each node is a point of equal weight: u_c = Σ uᵢ / N, pᵢ = rᵢ, J = Σ (|rᵢ|² I − rᵢ rᵢᵀ). A set whose faces leave some of its nodes out is refused: the surface does not reach them. Only the coupled degrees of freedom are tied. By virtual work a force or moment on the point is spread over the nodes with the same weights, so a uniform or linear traction on the faces is carried exactly, and the region stays free to deform (Heirman & Desmet 2010). Nodes on one line cannot carry a rotation about that line: an error when rotations are coupled, their mean motion otherwise.

Elimination

Every degree of freedom is free, prescribed (a boundary condition), dependent on others, or inactive (a reference point direction no coupling ties). Rows are taken one at a time in a fixed order: boundary conditions first, then couplings by name, nodes by label, directions in order. A row is rewritten in terms of the current free and prescribed degrees of freedom; one free degree of freedom is then chosen to depend on the rest: the row’s intended one (the coupled node, the distributing coupling’s reference point, a tie’s secondary node) while it is free, otherwise the largest coefficient, lowest index first (Abel & Shephard 1979). A row with no free degree of freedom left is redundant when the prescribed values satisfy it and contradictory otherwise (an error naming it). Every dependent degree of freedom ends up as u = T_f q + T_p u_p, so

T_fᵀ K T_f q = T_fᵀ (f − K T_p u_p),   reactions = T_pᵀ (K u − f)

With no coupling T is the identity on the free degrees of freedom and the result is the plain elimination of prescribed values, bit for bit. A held distributing coupling point makes one coupled node depend on all the others, a dense (3N)² block in the reduced matrix: its size is estimated from the rows and refused against the factorization’s memory budget before anything is built, and every other reduction counts its entries, stopping at the budget, before it allocates them.

Ties (dual mortar)

Each secondary node A follows the main surface under it through the mortar condition ∫ ψ_A (u_s − u_m) dA = 0 per direction, integrated over the overlaps of the secondary faces with the main faces in the reference configuration (fieldcraft_fem::mortar). The multiplier space uses each secondary face’s dual shape functions,

ψ_a = Σ_b A_ab N_b,   A = D M⁻¹,   M_ab = ∫ N_a N_b,   D = diag ∫ N_a

biorthogonal to its own shape functions, ∫ ψ_a N_b = δ_ab ∫ N_b (Wohlmuth 2000; Popp et al. 2012). The secondary mortar matrix is then diagonal, and each secondary node is a weighted average of the main nodes under it:

u_A = Σ_J (M_AJ / Σ_K M_AK) u_J,   M_AJ = Σ_overlaps ∫ ψ_A N_J dA

The rows go to the elimination like a coupling’s, the secondary node the intended dependent, in linear static, frequency, buckling and nonlinear steps (small-displacement constraints). Where a secondary face is wholly covered, Σ_K M_AK = ∫ N_A, the plain mortar condition; dividing by the sum keeps rigid motions exact at a surface’s edge where a face is only partly covered. A uniform stress crosses a tie on flat faces exactly, because the dual mortar conditions are satisfied by the linear field on both sides.

Pairing. Each secondary face takes the main faces whose boxes, grown by the position tolerance, overlap its own, and that it overlaps along its normal with a mean gap within the tolerance. A secondary node with no main face under it stays free, with a warning.

Nodes in several ties. A node on the secondary surfaces of several ties (two secondary surfaces meeting at an edge) gets one constraint, over the main faces of all of them together, as if they were one tie: two near-repeated constraints would make the elimination divide by round-off. Two ties holding one interface both ways are an error naming them, and so are constraints that still nearly repeat each other (a tie and a coupling on one node, longer loops).

Heat. The same weights tie temperatures, T_A = Σ_J w_AJ T_J (one row per secondary node), in steady and transient heat transfer and in the heat solution of coupled temperature–displacement steps. The heat solver eliminates them with the prescribed temperatures through the same transformation, so the interface has no resistance, the heat leaving one side enters the other, and the reactions at prescribed temperatures (T_pᵀ (K T + C Ṫ − f)) balance the heat supplied.

Symmetry planes

A plane normal to X, Y or Z holds global degrees of freedom: X holds 1, 5 and 6, Y holds 2, 4 and 6, Z holds 3, 4 and 5. A normal within 10⁻¹² of an axis (unit length) is that axis. On any other plane the condition is linear constraint rows: at every target node n · u = 0, eliminating the translation of the largest |nₖ|, and at a node with rotations (shells, beams, a reference point whose rotations exist) tᵢ · θ = 0 about two in-plane axes, t₁ = n × e / |n × e| with e the axis n leans on least and t₂ = n × t₁: a mirror image turns only about the normal. A node also held, or on two planes, is no conflict; a prescribed motion off the plane is (an error). In explicit dynamics an inclined plane removes its nodes’ velocity along its normal after the velocity update, from their free components (the mass-weighted projection onto the constraint).

Springs, dashpots and point masses

Implicit. A point mass adds m_x, m_y, m_z on the node’s translations and its inertia tensor J (3 × 3, products included) on its rotations, the same in the consistent and the lumped mass matrix. A spring with stiffness k and unit direction coefficients c on each end’s six degrees of freedom adds k c cᵀ to each end and −k c cᵀ between them (Cook et al. 2002, §2.2): the elongation is cᵀ(u_second − u_first); a grounded spring adds k c cᵀ. A dashpot has the same form on velocities. Gravity acts on point masses when it acts on the whole model.

Explicit. Point masses add to the lumped mass of their node, per direction. Springs add the force k (cᵀ Δu) c and dashpots c_d (cᵀ Δv) c, with Δu, Δv the relative motion of the ends along c; a direction along the line of the ends follows that line as it turns under nonlinear geometry, with the stretch l − L₀. Dashpots use the velocity of the previous half increment v^{n−½}, as the bulk viscosity does (Belytschko et al. 2014, §6.2). Spring work counts as internal energy, dashpot work as viscous (dissipated) energy. Their stable increment is bounded per degree of freedom (explicit dynamics); a run warns when a spring or dashpot limits the increment.

Algorithm

  1. Resolve each definition to its nodes. A reference point direction that no coupling ties is inactive; a boundary condition on a reference point that no coupling ties to the mesh and no spring or point mass uses holds nothing, with a warning.
  2. Build the constraint rows: couplings (kinematic or distributing), tie rows (pairing, dual shape functions, merged per secondary node), inclined symmetry rows.
  3. Eliminate in the fixed order (boundary conditions, couplings by name, nodes by label, directions), checking redundancy and contradiction, and the memory budget of the reduction.
  4. Assemble springs, dashpots and point masses into the stiffness, damping and mass of the free degrees of freedom; solve; recover dependent degrees of freedom and the reactions T_pᵀ (K u − f), including the forces and moments at reference points and the reactions of inclined symmetry planes.

Output

Static and nonlinear replies list each coupled reference point (reference_points: name, label, six displacements, six reactions); solve.probe with a reference point’s label gives the same. Frequency results give the reference point’s mode shape (point_shape); point masses count in the total mass and the effective masses. Ties report uncovered secondary nodes as warnings. Explicit results count point masses in total_mass (with their mean over the three directions) and spring and dashpot work in the internal and viscous energies.

Decks.

DefinitionAbaqusNastranLS-DYNA
Kinematic coupling*COUPLING with *KINEMATICRBE2 (reference point independent)*CONSTRAINED_NODAL_RIGID_BODY; some degrees of freedom only: refused
Distributing coupling*COUPLING with *DISTRIBUTING, WEIGHTING METHOD=UNIFORM, each node’s weight on the node-based *SURFACERBE3 (one weight group per node, reference point dependent)*CONSTRAINED_INTERPOLATION (one independent node card per node with its weight)
Tie*TIE, ADJUST=NO (secondary first, POSITION TOLERANCE when given)refused*CONTACT_TIED_SURFACE_TO_SURFACE between segment sets
Inclined symmetry plane*EQUATION (model data: refused when active in some steps only)one MPC set per step*BOUNDARY_SPC_*_ID in a *DEFINE_COORDINATE_SYSTEM whose x axis is the normal
Point mass, rotary inertiaMASS / *MASS, ROTARYI / *ROTARY INERTIACONM1*ELEMENT_MASS, *ELEMENT_INERTIA
Spring, dashpotSPRING1/2/A, DASHPOT1/2/ACELAS2, CDAMP2*ELEMENT_DISCRETE

A distributing coupling on faces is written with one weight per node, w = ∫ N dA over the set’s faces (the consistent loads of a unit traction; negative at the corners of quadratic faces), and a set of nodes only with equal weights. The target fits its reference point to the nodes with these weights, so a force spreads as in FieldCraft and a moment slightly differently: FieldCraft fits the surface displacement, which no format’s coupling keyword can state.

Abaqus reports a mass that differs by direction and a spring along a skew fixed vector; per-direction masses are written by Nastran only, skew fixed spring directions by LS-DYNA only.

Worked example

A steel cantilever whose end face is coupled to a reference point at its centroid, loaded by a force on that point: first through a kinematic coupling, then the same model with the coupling edited to distributing. The reference point’s displacement and rotation come back in the solve.static reply and compare with Timoshenko beam theory.

Geometry200 mm along x, 10 mm wide (y), 20 mm deep (z); one block, faces root (x = 0) and end (x = 200)
Mesh160 hex20 (20 × 2 × 4), 1 077 nodes
Materialsteel: E = 210 000 MPa, ν = 0.3
Reference pointTip at (200, 5, 10), the centroid of end
CouplingEnd: Tip to the nodes of end, all six degrees of freedom; kinematic, then distributing
Boundary conditions, loadroot fixed; 1 000 N along −z on Tip
Stepstatic
Unitsmm, t, s, N, MPa
[
  {"command": "model.units", "params": {"system": "mm-t-s-N-MPa"}},
  {"command": "mesh.block", "params": {"body": "Beam", "kind": "hex20",
    "corners": [[0,0,0],[200,0,0],[200,10,0],[0,10,0],[0,0,20],[200,0,20],[200,10,20],[0,10,20]],
    "divisions": [20, 2, 4], "faces": {"6": "root", "4": "end"}}},
  {"command": "model.set.create", "params": {"name": "all", "geometry": [{"body": "Beam"}]}},
  {"command": "model.set.create", "params": {"name": "root", "geometry": [{"body": "Beam", "face": "root"}]}},
  {"command": "model.set.create", "params": {"name": "end", "geometry": [{"body": "Beam", "face": "end"}]}},
  {"command": "model.material.create", "params": {"name": "Steel", "elastic": {"type": "isotropic", "young": 210000, "poisson": 0.3}}},
  {"command": "model.section.create", "params": {"name": "Beam", "set": "all", "material": "Steel", "kind": {"type": "solid"}}},
  {"command": "model.reference_point.create", "params": {"name": "Tip", "xyz": [200, 5, 10]}},
  {"command": "model.coupling.create", "params": {"name": "End", "reference_point": "Tip", "set": "end", "kind": "kinematic"}},
  {"command": "model.boundary_condition.create", "params": {"name": "Clamp", "type": "fixed", "target": {"set": "root"}}},
  {"command": "model.load.create", "params": {"name": "Push", "type": "force", "target": {"reference_point": "Tip"}, "vector": [0, 0, -1000]}},
  {"command": "model.step.create", "params": {"name": "Load", "procedure": {"type": "static"}, "boundary_conditions": ["Clamp"], "loads": ["Push"]}},
  {"command": "solve.static", "params": {"step": "Load"}},
  {"command": "results.contour", "params": {"step": "Load", "field": "von_mises"}},
  {"command": "results.deformed", "params": {"step": "Load", "show": true, "scale": 10}},
  {"command": "model.coupling.edit", "params": {"name": "End", "reference_point": "Tip", "set": "end", "kind": "distributing"}},
  {"command": "solve.static", "params": {"step": "Load"}}
]

Results from the two solve.static replies (reference_points, max_von_mises; each solve under 0.05 s, Apple M4 Max, CPU). The references: tip deflection δ = P L³/(3 E I) + P L/(κ G A) with κ = 5/6 (Timoshenko beam), section rotation θ = P L²/(2 E I), root stress σ = P L c / I = 300 MPa, with I = 6 666.7 mm⁴.

QuantityKinematicDistributingReferenceDifference
Equations3 0153 120——
Tip u_z, ν = 0.3−1.905469 mm−1.905526 mm−1.919619 mm−0.74 %, −0.73 %
Tip rotation about y, ν = 0.30.0142169 rad0.0142176 rad0.0142857 rad−0.48 %, −0.48 %
Tip u_z, ν = 0−1.916102 mm−1.916155 mm−1.916190 mm−0.005 %, −0.002 %
Tip rotation about y, ν = 00.0142857143 rad0.0142857143 rad0.0142857 rad< 10⁻⁸, < 10⁻⁸
max_von_mises, ν = 0.3304.98 MPa (node 65, at the root)304.98 MPaσ = 300 MPa+1.7 %
reaction_total z1 000.0 N1 000.0 N1 000 N< 10⁻¹⁰

The ν = 0 rows are the same script with "poisson": 0.

What to look at. The force acts on one point, and the coupling carries it into the whole end face; one depth or two from the end the stress is the beam’s, peaking where the bending moment peaks, at the root. A kinematic coupling makes the end face move rigidly with the point, so the point’s rotation is the face’s; a distributing coupling spreads the force over the face as the consistent loads of a uniform plus linear traction and lets the face warp, and its point follows the least-squares rigid fit of the face’s displacement. The two differ only near the end, so the deflection and rotation agree within 0.01 % (Saint-Venant). At ν = 0 both couplings reproduce the beam’s rotation to 10⁻⁸, and the deflection to 0.005 % (kinematic) and 0.002 % (distributing); at ν = 0.3 the fixed root face also holds the section’s Poisson contraction, which stiffens the beam by 0.5–0.6 %.

Verification

Oracle cases (results):

CaseReferenceQuantityErrorToleranceResult
tube-torsion-couplingtheory: φ = T L/(G J), τ = T r/Jrotation of the reference point; surface shear stress0.00062 %; 0.29 %0.5 %; 1 %pass
pure-bending-couplingtheory: σ = M z/I, κ = M/(E I)bending stress at mid-span; rotation of the reference point< 10⁻⁴ %; < 10⁻⁴ %0.5 %; 1 %pass
tension-couplingtheory: u = F L/(E A), σ = F/Aaxial displacement of the reference point; maximum von Mises stress< 10⁻⁴ %; < 10⁻⁴ %10⁻⁸ rel.pass
tie-patchtheory: tie patch testσ_zz in five elements on both sides; u_z at a tied node< 10⁻⁶10⁻⁹ rel.pass
tie-heat-seriestheory: series conductiontemperatures at the tie and in both blocks; heat flux< 10⁻⁶10⁻⁹ rel.pass

Tests:

  • crates/solver/tests/couplings.rs: a block held only through a coupled reference point given a rigid motion follows it rigidly with no stress (10⁻¹³), for both kinds; clamping through a kinematically coupled fixed point equals direct clamping in displacements and frequencies (10⁻¹⁰, 10⁻⁹), the point’s reaction carrying the load; a distributing force equals the equivalent pressure away from the end (10⁻⁴); bending through a distributing coupling (σ = M z/I and κ to 0.5 %); torsion of a hex20 tube (twist 10⁻³, shear stress 0.5 %); determinism; errors that name the problem; oversized reductions refused before allocating; uniform tension and pure bending through a distributing coupling on element faces are exact to round-off (10⁻⁹), and a set whose faces leave nodes out is refused by name.
  • crates/solver/tests/contact.rs: a_tie_passes_the_patch_test (a linear field across non-matching hex8/tet4 meshes to round-off, to 10⁻⁶ on distorted quadrilateral faces, in linear and nonlinear steps; uniaxial tension across a tie σ_zz = Eε to 10⁻⁹); heat_crosses_a_tie_exactly (matching, graded and mixed meshes: the linear profile, the flux and k A ΔT / L to 10⁻⁹; with k₁ ≠ k₂ the series interface temperature (k₁ T₀ + k₂ T₁)/(k₁ + k₂) and heat flow ΔT/(L₁/k₁ + L₂/k₂)); transient_heat_through_a_tie_is_the_single_body_s; a_tied_body_expands_freely_under_a_uniform_temperature (u = α ΔT x, no stress); what_ties_refuse.
  • crates/solver/tests/inclined_symmetry.rs: a turned half cantilever with its inclined plane solves to the turned displacements of the unturned half and of the whole (10⁻⁹, 10⁻⁸), the plane’s reactions balancing the load; an eighth of a simply supported plate cut on the diagonal matches the quarter (10⁻⁹; first frequency 10⁻⁸) and Navier’s series (1 %); conflicts.
  • crates/solver/tests/one_d.rs: spring–mass frequency √(k/m) and static stretch (10⁻¹²); springs along skew vectors (10⁻¹⁰); a two-mass chain against the characteristic equation (10⁻⁸); a bar with a tip mass (10⁻⁹); a torsional pendulum √(k_t/J) on a reference point (10⁻¹²); gravity on point masses, dashpots ignored with a warning, determinism.
  • crates/explicit/tests/one_d.rs: spring–mass period (10⁻⁴), damped decay rate (1 %), two masses on a line spring, a whirling mass on a corotational rod; rotary inertia refused.
  • crates/explicit/tests/inclined_symmetry.rs: turned planes move as the axis-aligned ones and the whole (10⁻¹²); a prescribed motion off the plane is refused.

Limitations

  • Couplings and ties are small-displacement (linear) constraints in nonlinear steps; couplings give a warning.
  • Explicit dynamics refuses couplings, ties, boundary conditions and loads on reference points, discrete elements on reference points, rotary inertia and rotational springs.
  • Ties take linear faces only (tri3, quad4 of tet4, wedge6, hex8) in 3D models, for heat as for displacement. Nastran refuses ties.
  • Dashpots act only in explicit dynamics; static, nonlinear static and frequency steps ignore them with a warning.
  • Connector elements (hinges, slots, joints with stops) and nonstructural mass are not implemented.

Implementation

  • crates/model/src/constraints.rs: ReferencePoint, Coupling, CouplingKind, label policy.
  • crates/model/src/tie.rs: Tie. crates/model/src/bcs.rs: Symmetry (from_normal, dofs, inclined, in_plane). crates/model/src/discrete.rs: PointMass, Spring.
  • crates/solver/src/constraints.rs: coupling rows, symmetry_rows, Reduction (the elimination, reactions, memory budget).
  • crates/solver/src/tie.rs: pairing, dual shape functions, rows_of.
  • crates/solver/src/discrete.rs: point masses, springs and dashpots in the implicit system.
  • crates/explicit/src/discrete.rs, crates/explicit/src/integrate.rs (constrain): explicit springs, dashpots, point masses, inclined planes.
  • crates/engine/src/cmd/define.rs, crates/engine/src/cmd/contact.rs, crates/engine/src/cmd/symmetry.rs: the commands.

References

  • R. D. Cook, D. S. Malkus, M. E. Plesha, R. J. Witt. Concepts and Applications of Finite Element Analysis, 4th ed., Wiley 2002 (§2.2, §2.10, §9.2).
  • C. A. Felippa. Introduction to Finite Element Methods, ch. 8, University of Colorado lecture notes.
  • J. F. Abel, M. S. Shephard. An algorithm for multipoint constraints in finite element analysis. IJNME 14(3):464–467, 1979.
  • G. H. K. Heirman, W. Desmet. Interface reduction of flexible bodies for efficient modeling of body flexibility in multibody dynamics. Multibody Syst. Dyn. 24(2):219–234, 2010.
  • B. I. Wohlmuth. A mortar finite element method using dual spaces for the Lagrange multiplier. SIAM J. Numer. Anal. 38(3):989–1012, 2000.
  • A. Popp, B. I. Wohlmuth, M. W. Gee, W. A. Wall. Dual quadratic mortar finite element methods for 3D finite deformation contact. SIAM J. Sci. Comput. 34(4):B421–B446, 2012.
  • T. Belytschko, W. K. Liu, B. Moran, K. Elkhodary. Nonlinear Finite Elements for Continua and Structures, 2nd ed., Wiley 2014 (§2.4, §4.5, §6.2, §6.3).
  • S. Timoshenko, S. Woinowsky-Krieger. Theory of Plates and Shells, 2nd ed., McGraw-Hill 1959 (§30).

Linear solvers

The sparse direct solvers behind every implicit analysis: a fill-reducing nested dissection ordering of the mesh nodes, a supernodal left-looking Cholesky factorization A = L Lᵀ for symmetric positive definite systems, and a symmetric indefinite factorization P A Pᵀ = L D Lᵀ with bounded Bunch–Kaufman pivoting on the same symbolic structure, which also reports the matrix’s inertia. Both factor in parallel with a fixed operation order, so the factor is the same bit for bit on any number of threads. The factor’s size is computed and checked against a cap before any of its memory is committed.

Commandsthe max_factor_entries, max_dofs, max_iterations and threads parameters of solve.static, solve.heat, solve.frequency, solve.buckle, solve.nonlinear
Step procedurestatic, coupled_temperature_displacement, heat_transfer, frequency, buckle, nonlinear_static
Solvercrates/solver (CPU, f64): ordering, cholesky, ldlt, constraints, sparse
Methodnested dissection (George 1973; Simon 1991; George & Liu 1978); elimination tree and supernodes (Liu 1990; Liu, Ng & Peyton 1993), on the compressed matrix of a solid model’s blocks (Ashcraft 1995); left-looking supernodal Cholesky (Ng & Peyton 1993; Rothberg & Gupta 1994); bounded Bunch–Kaufman pivoting (Ashcraft, Grimes & Lewis 1998) within supernodes (Schenk & Gärtner 2006)
Verified bycholesky::tests, ldlt::tests, ordering::tests, constraints::tests, sparse::tests; every solver test and oracle case runs on them

Synopsis

{"command": "solve.static", "params": {"step": "Load", "max_factor_entries": 500000000, "threads": 16}}

This raises the factor cap for this solve only (later solves keep the default) and runs on 16 threads with the same result as on one.

Parameters

FieldValueDefaultMeaning
max_factor_entries1 to 2 000 000 000400 000 000cap on the entries of the factor L (8 bytes each); may be raised deliberately for one solve
max_dofs1 to 6 000 0006 000 000cap on the model’s unknowns; may only be lowered
max_iterations1 to 30003000frequency and buckling: cap on the Lanczos vectors; may only be lowered
threads1 to 256the session’s (FIELDCRAFT_THREADS or the cores)changes the time, never the result

Internal constants (crates/solver/src/cholesky.rs, scalar.rs, ldlt.rs, ordering.rs):

ConstantValueRole
PIVOT_TOLERANCE10⁻¹⁰relative pivot size below which a matrix is singular to working precision
PANEL64columns per panel of a supernode’s dense factorization
TILE64rows per tile of the dense kernels
PARALLEL_WORK2²¹ multiply–addsdense work from which a kernel’s tiles run in parallel
BATCH_BYTES32 MBproducts of updates that the supernodes above the subtree tasks compute and hold at once: in all, on any number of threads, real and complex alike
PACKED_KEPT2¹⁴ packed rows (1 MB real, 2 MB complex)most packed rows a thread keeps from one tile to the next; a larger buffer is given back when its tile is done
PARALLEL_ENTRIES2¹⁶ entriessize of an update from which its columns are subtracted in parallel
SORTED1024columns of the matrix that one task copies or sorts
BLOCK3unknowns of a block in the symbolic analysis by blocks (a node’s displacements)
SUBTREE_SHARE256subtrees are handed to threads in pieces of about 1/256 of the total work
ALPHA(1 + √17)/8Bunch–Kaufman growth bound
ROOK_STEPS64most steps of one rook search
LEAF16parts this small are ordered as they come
PERIPHERAL_SEARCHES8searches for a pseudo-peripheral node per part

PANEL and TILE are part of every entry’s sequence of operations. The constants below only divide the work and its memory; the factor is the same bit for bit at any value of them. Where their values come from:

  • BATCH_BYTES: measured on the whole solve.static of eight solid models of 57 000 to 918 000 unknowns, on the 24 threads of an i7-13700KF. Against one update at a time, batches of 8 MB take 7 to 15 % less time; 32 MB takes 3 to 9 % less than 8 MB; 128 MB takes from 1 % more to 7 % less than 32 MB. Each fourfold step gains about half of the one before, and 32 MB is small beside the factor (285 MB for the smallest of these models). One thread has nothing to compute at the same time, and a product it holds leaves the cache before it is subtracted: it holds no batch. With one, the block of tet10 of tests/speed.rs takes 7.31 s on one thread against 6.79 s without, and the block of hex20 13.39 s against 13.21 s.
  • PACKED_KEPT: 2¹⁴ packed rows serve a tile over 2048 columns and are 1 MB of real values, the order of a core’s second-level cache. A larger buffer would not stay in the cache, and taking it anew costs 1/wu of the work of a tile over wu columns.
  • PARALLEL_ENTRIES: on the same models and machine, 2¹⁴ and 2¹⁶ entries take the same time within the 1 % that two runs differ by, and 2¹⁸ takes 1 to 3 % more on the models of 129 000 unknowns and more. 2¹⁶ is the larger of the two that are as fast, so that fewer small updates are handed out.
  • SORTED: a task must be long beside the cost of handing it out, and a large matrix must still give many more tasks than threads. On the same models and machine, 256, 1024 and 4096 columns take the same time within the 1 % that two runs differ by; 1024 is the middle one.
  • BLOCK: the three displacements of a solid’s node, the only block the analysis looks for.

Theory

Assembly and pattern

Matrices are stored in compressed rows with both triangles (sparse::Csr). The pattern is built once from the element connectivity on the node graph: a node’s row holds every node it shares an element with, and each node pair is a dense block of their unknowns (a node’s unknowns are contiguous in the DofLayout), so stiffness and mass share it. Sums run in a fixed order (elements by label, then the element’s own node order).

Ordering

Nested dissection (George 1973) orders a separator after the two parts it splits, so the factor of a 3D mesh of n nodes fills O(n^{4/3}) instead of the O(n^{5/3}) of a band or envelope ordering. Two separators are tried and the order whose factor has fewer entries is kept (fill_reducing_order):

  • coordinate bisection (nested_dissection): split at the median of the longest axis of the part’s bounding box; the nodes of the smaller side that touch the other side are the separator (Simon 1991, with vertex separators);
  • graph dissection (graph_dissection): the separator is a middle level of the breadth-first level structure rooted at a pseudo-peripheral node (George & Liu 1978; Gibbs, Poole & Stockmeyer 1976), which cuts a thin curved wall (a shell meshed with solids, a bellows, a revolved part) across its surface where a plane would cut it many times.

The symbolic count that compares them costs O(|L|) time and O(n + |A|) memory. Ties are broken by node index, so the ordering is deterministic. The free unknowns are numbered node by node in this order; reference point equations follow the mesh nodes.

Sparse Cholesky

fieldcraft_solver::cholesky factors a symmetric positive definite A = L Lᵀ.

Symbolic. The elimination tree (Liu 1990) and the column counts of L come from the row subtrees (Davis 2006, §4.1–4.4), so the factor’s size is known and checked against max_factor_entries before any memory is committed. The columns are renumbered in a postorder of the tree (an equivalent ordering with the same fill), so every subtree is a contiguous range of columns, and consecutive columns with nested structures merge into fundamental supernodes (Liu, Ng & Peyton 1993): a supernode’s columns share one row structure and are stored as one dense lower trapezoid, so the factor holds exactly the entries of L.

Where the matrix is made of blocks of three consecutive unknowns that are indistinguishable (each couples with the whole of every block it couples with, its own included: a solid model whose nodes keep all three displacements), the tree and the counts come from the compressed matrix of the blocks (Ashcraft 1995), which has a ninth of the entries: within a block each unknown’s parent is the next one, the last one’s parent is the first unknown of the block’s parent, and unknown c of a block whose column of blocks has count blocks has 3 · count − c entries. The result is the same as column by column. One block that is not whole (a node with a roller or a symmetry condition, a shell’s rotations, a coupling row) sends the whole matrix to the analysis column by column.

Numeric (left-looking supernodal; Ng & Peyton 1993; Rothberg & Gupta 1994). A supernode starts as its columns of A, receives the update L_K L_Kᵀ of every descendant supernode K whose rows reach it (K in increasing order), and is factored densely by panels of 64 columns: a panel is updated with the supernode’s columns before it, its diagonal block is factored column by column, and the rows below are solved against that block.

Threads and determinism. Each entry of L is computed by one task, by a sequence of operations fixed by the matrix and the constants TILE and PANEL: sums over a supernode’s columns run in column order from zero, and updates are subtracted in supernode order. Disjoint subtrees of the supernodal tree are factored concurrently (a supernode reads only its descendants), the dense work of a large supernode is split into row tiles, and a supernode above the subtree tasks computes the products of the updates it receives several at a time (as many as BATCH_BYTES holds) and subtracts them in supernode order, a large update column by column in parallel (every entry takes one subtraction); none of this changes any entry’s sequence of operations, and multiplications and additions are never fused, so the factor is the same bit for bit on any number of threads and on every platform.

Singularity. A pivot at or below 10⁻¹⁰ times the matrix’s own diagonal entry means the matrix is singular to working precision (an unconstrained rigid-body motion, a disconnected part, a zero-stiffness direction): the factorization stops and names the column, the first such column in the postorder whichever thread meets it.

Symmetric indefinite LDLᵀ

fieldcraft_solver::ldlt factors P A Pᵀ = L D Lᵀ, L unit lower triangular and D block diagonal with 1 × 1 and 2 × 2 pivots, on the Cholesky factor’s symbolic factorization: the same ordering, elimination tree, supernodes, fill, factor-size cap and parallel subtree tasks.

Pivoting. The bounded Bunch–Kaufman (rook) search (Bunch & Kaufman 1977; Ashcraft, Grimes & Lewis 1998): with α = (1 + √17)/8 and ω_i the largest off-diagonal magnitude of column i, column k is a 1 × 1 pivot when |a_kk| ≥ α ω_k; otherwise the search walks from column i to the row r of its largest entry: r is a 1 × 1 pivot when |a_rr| ≥ α ω_r, (i, r) a 2 × 2 pivot when ω_r = ω_i, else the search continues from r (at most 64 steps; each strictly raises ω, and at the cap the last two columns are the 2 × 2 pivot). Every entry of L is then bounded by 1/(1 − α) ≈ 2.78 for 1 × 1 pivots. A 2 × 2 pivot has |a_ii a_rr| < α² a_ir², a negative determinant: one positive and one negative eigenvalue.

Pivots within supernodes (Schenk & Gärtner 2006). The columns of a supernode are fully summed once its descendants’ updates are in, so any of them can be the next pivot: a symmetric interchange inside the supernode leaves every row structure unchanged, so nothing is delayed and the static symbolic factorization holds (multifrontal codes delay a failed column into the parent instead, which changes the structure as it goes; Duff & Reid 1983; Liu 1992). The search looks at the supernode’s own rows only. Inside a panel each column is brought up to date with the panel’s columns before it when the search looks at it (the partial factorization of LAPACK’s dsytrf, Anderson et al. 1999); after the panel the rest of the supernode receives its update by the tiled, parallel kernel of the Cholesky factor. Every pivot decision is made by one task, ties broken by the lowest index, so the factor, its pivots and its inertia are the same on any number of threads.

Inertia (Sylvester’s law): the counts of positive and negative eigenvalues of A are those of D, a 1 × 1 pivot by its sign, a 2 × 2 one by its eigenvalues. A factor of K − σM counts the eigenvalues below σ; a tangent’s negative pivots count its unstable directions.

Refinement. Symmetric::solve_refined solves A x = b, then refines with the residual against A while it shrinks, at most a given number of times (iterative refinement in working precision; Higham 2002, §12.2). Cholesky solutions are returned as solved.

Choice of factorization (Symmetric::new(a, cap, kind)): Definite is Cholesky, refusing a matrix that is not positive definite (the default wherever a matrix is, so linear results are unchanged bit for bit); Indefinite is LDLᵀ; Auto is Cholesky and, when the matrix turns out not to be positive definite, LDLᵀ on the same symbolic factorization.

AnalysisMatrixFactorization
Linear static, coupled stepK_ffCholesky
Heat transferK_ff (steady), C + θΔt K (transient)Cholesky
FrequencyK − σMCholesky
Buckling without a shiftKCholesky (Definite)
Buckling with a shiftK + σ K_σLDLᵀ (Indefinite), refined twice per solve
Nonlinear staticthe tangentAuto: Cholesky, LDLᵀ when indefinite (Nonlinear static)

Memory limits

solve.static, solve.nonlinear, solve.heat, solve.frequency and solve.buckle accept max_factor_entries: 400 000 000 by default, or an explicit whole number from 1 to 2 000 000 000. {"step": "Load", "max_factor_entries": 500000000} deliberately raises the cap for that solve; it does not change the default of later solves. The other work and iteration caps can only be lowered.

Each factor value is 8 bytes: the default allows 3.2 GB of values, and the ceiling 16 GB. These are factor values alone, not total RAM: indices, assembled matrices, numeric workspace and other solver storage need additional memory. Raising the cap neither reserves memory nor guarantees that it is available. A factor over the cap is reported before its values are allocated, with the required entry count and its byte estimate: “the factorization needs N entries (B bytes of factor values alone; indices and workspace are additional); the limit is M entries (refine less or raise max_factor_entries)”. An allocation that fails is “not enough memory for the factorization (N entries)”. 32-bit builds remain limited by addressable allocation sizes. The ceiling is defined once, as FACTOR_ENTRY_CEILING in crates/engine/src/cmd/solve.rs.

Workspace. Beyond the factor’s values, the numeric factorization takes memory for its dense kernels: the product of an update until it is subtracted (no more than about the rows times the columns of the supernode that receives it) and packed copies of the columns it is computed from. This memory is not counted in max_factor_entries. It is asked for without aborting: where it cannot be had, the solve stops with the same “not enough memory for the factorization (N entries)”. Each thread keeps its buffer of packed rows from one tile to the next, up to PACKED_KEPT rows (1 MB of real values, 2 MB of complex ones); a larger one is given back when its tile is done. The supernodes above the subtree tasks are factored one at a time and hold the products of several updates at once, BATCH_BYTES (32 MB) in all on any number of threads; an update whose product is larger is held alone, as every update is inside a task and on one thread.

The same entry budget guards two more stores:

  • Constraint reduction (constraints::Budget, 8 × max_factor_entries bytes over the matrices being reduced): a held distributing coupling makes every coupled node depend on every other, a dense (3N)² block, estimated from the rows and refused before anything is built (“distributing coupling name couples N nodes and its reference point is held …; split the surface into smaller couplings, hold the surface itself, or use a kinematic coupling”); every other reduction counts its entries and stops at the budget before allocating (“reduced matrices need more than …”).
  • The Lanczos basis (vectors and their mass products, 2 n × vectors): at most max_factor_entries / (2 n) vectors, within max_iterations. At 6 000 000 equations this is 33 vectors with the default cap and 166 at the ceiling.

Algorithm

  1. Pattern. NodeGraph::new from the elements’, trusses’, shells’, beams’ and discrete elements’ node lists, its rows sorted in parallel.
  2. Order. fill_reducing_order on the mesh nodes: coordinate and graph dissection, the one with the smaller symbolic fill kept.
  3. Reduce. constraints::Reduction eliminates prescribed values and constraint rows in that order (free unknowns numbered by the node order), within its memory budget.
  4. Symbolic. Elimination tree, postorder, column counts (from the blocks’ matrix where the matrix is made of blocks of three unknowns), supernodes; the entry count against max_factor_entries (refused before allocation).
  5. Allocate the supernodes’ values, each taken and zeroed by a task (try_reserve_exact; a failure of any is the out-of-memory error).
  6. Numeric. Subtrees in parallel, supernodes left-looking, dense panels and tiles; the run is cancellable between supernodes. A non-positive pivot (Cholesky) or a supernode without an acceptable pivot (LDLᵀ) stops with the column, which the solver turns into the node and direction: “the stiffness is singular at node N in direction …” (Cholesky) or “the matrix is singular at …: no pivot of its supernode is more than round-off (a mechanism, or a shift or load at an eigenvalue)” (LDLᵀ).
  7. Solve. Forward and back substitution over the supernodes, the permutation applied; LDLᵀ solves with D’s 1 × 1 and 2 × 2 blocks, optionally refined.

There is no iteration in the factorization itself; the bounded loops are the rook search (64 steps), the refinement (a fixed count, stopping when the residual stops shrinking) and the Lanczos basis (max_iterations).

Output

The solve replies report dofs (all unknowns), equations (the free ones factored) and factor_entries (entries of L); frequency and buckling replies add lanczos_vectors. Nonlinear steps record each iteration’s negative pivot count, and a shifted buckling step its below_shift count, both from the LDLᵀ inertia.

Worked example

The bracket-hex sample (5 778 hex20 elements, the model of the Linear static example) solved on 1, 4 and 14 threads, its results written to CSV after each solve and compared byte for byte, and solved once more with a factor cap below what its factor needs.

Modelfile.sample bracket-hex: filleted steel L-bracket, hex20 of 3 mm, 27 708 nodes; upright’s end clamped, 1 kN on the foot’s end; step Load (static)
Solvessolve.static with threads 1, 4 and 14; then with max_factor_entries 50 000 000
Comparedresults.export.csv after each solve: probe results of nodes 1 to 10 000 (coordinates, displacement, reaction, stress, principal and von Mises stress, 17 significant digits) and the reactions of set top
MachineApple M4 Max (14 cores), macOS 26, CPU
[
  {"command": "file.sample", "params": {"name": "bracket-hex"}},
  {"command": "solve.static", "params": {"step": "Load", "threads": 1}},
  {"command": "results.export.csv", "params": {"what": "probe", "step": "Load", "nodes": [1, 2, 3, "…", 10000], "path": "t1.csv"}},
  {"command": "results.export.csv", "params": {"what": "reactions", "step": "Load", "sets": ["top"], "path": "r1.csv"}},
  {"command": "solve.static", "params": {"step": "Load", "threads": 4}},
  {"command": "results.export.csv", "params": {"what": "probe", "step": "Load", "nodes": [1, 2, 3, "…", 10000], "path": "t4.csv"}},
  {"command": "results.export.csv", "params": {"what": "reactions", "step": "Load", "sets": ["top"], "path": "r4.csv"}},
  {"command": "solve.static", "params": {"step": "Load", "threads": 14}},
  {"command": "results.export.csv", "params": {"what": "probe", "step": "Load", "nodes": [1, 2, 3, "…", 10000], "path": "t14.csv"}},
  {"command": "results.export.csv", "params": {"what": "reactions", "step": "Load", "sets": ["top"], "path": "r14.csv"}},
  {"command": "solve.static", "params": {"step": "Load", "max_factor_entries": 50000000}}
]

("…" stands for the node labels 4 to 9 999, written out in the run; a probe takes at most 10 000 nodes.) Results from the solve.static replies and the files. Wall times are of solve.static (assembly, ordering, factorization, solve and stress recovery) in two runs, with other jobs running on the machine (load average about 18).

Quantity1 thread4 threads14 threads
dofs83 12483 12483 124
equations82 06582 06582 065
factor_entries91 826 20591 826 20591 826 205
max_displacement0.5511123143618812 mmthe samethe same
max_von_mises295.0983647905056 MPathe samethe same
reaction_total y999.999999981553 Nthe samethe same
Probe CSV, 10 000 nodes (3 481 210 bytes)—identical to 1 threadidentical to 1 thread
Reaction CSV, set top—identical to 1 threadidentical to 1 thread
Wall time, two runs11.2 s, 11.8 s3.9 s, 3.6 s3.8 s, 2.5 s

The solve under a cap of 50 000 000 entries is refused in 0.7 s, before the numeric factorization, with:

limit reached: the factorization needs 91826205 entries (734609640 bytes of factor values alone;
indices and workspace are additional); the limit is 50000000 entries (refine less or raise
max_factor_entries)

What to look at. The factor holds 91.8 million entries, 0.73 GB of values, for 82 065 equations, about 1 120 entries per equation. Every entry of L comes from one task with a fixed sequence of operations, so the three solves write the same files to the last digit while the time falls about threefold from one thread to four. The refused solve names the entries the factor needs and their bytes, computed from the symbolic factorization alone; max_factor_entries of at least 91 826 205 lets it through.

Verification

CaseCheckTest
Sparse SPD factor and solve; cap refused before allocation; singular matrix located; cancellation; empty and 1 × 1 matricesexact solution, located errorscholesky::tests::factor_and_solve_a_sparse_spd_matrix
Supernodes wider than two panels, 1, 2 and 7 threads; the products of updates one at a time, a few at a time and all at onceresidual < 10⁻¹², factor bit-identical on every thread count and batch size; only the supernodes above the subtree tasks hold a batch, and none on one threadsupernodes_panels_and_threads
Size of a batchcounts what its products take, whole tiles; an update over the limit goes alonea_batch_counts_the_tiles_of_its_products
An update whose columns are not in its supernode, one after anotheran internal error, not a wrong factoran_update_outside_its_supernode_is_an_error
Symbolic analysis by blocksthe tree and the counts of the analysis column by column, on a matrix of blocks and on the ordered, constrained stiffness of a hex8 model held at its base; a ragged or shorter block, or one node held in one direction, is analysed column by columnthe_structure_of_uniform_blocks_is_the_structure_by_columns, a_solid_models_stiffness_is_analysed_by_blocks
The matrix’s upper triangle copied and its columns sorted by tasks of SORTED columns, on more than three tasksevery column’s rows sorted, every value keptthe_matrix_is_copied_and_reordered_whole
Workspace of a dense kernel that cannot be hadthe out-of-memory error with the factor’s entries, no aborta_kernel_without_memory_is_an_error
Packed rows of a threadas many as asked for; kept up to PACKED_KEPT and given back beyond; in use or without memory is an errorscalar::tests::a_thread_keeps_its_packed_rows_up_to_a_bound
Indefinite shifted systemsinertia equals the eigenvalue count below σ; residual < 10⁻¹⁰; on an SPD matrix the same fill as Cholesky and no negative pivotldlt::tests::indefinite_systems_solve_with_their_inertia
Saddle points with zero diagonals2 × 2 pivots; inertia (K’s size, the constraints’)two_by_two_pivots_for_zero_diagonals
Singular Laplacian, NaN, capslocated Singular errors; cap before the numeric factorizationsingular_and_hostile_matrices_are_located_errors
LDLᵀ on 1 and several threadsvalues and pivot order bit-identicalsame_factor_on_any_number_of_threads
Auto selection and refinementCholesky for SPD, LDLᵀ otherwise with the right inertia; refined solutionsauto_selection_and_refinement
LDLᵀ cost on a hex8 stiffness pattern of 140 000 equations (1.5 · 10⁸ entries)1.1 times the Cholesky factor; 1.2 times on a shift with 10 600 negative eigenvalues and 7 700 2 × 2 pivotsspeed_against_cholesky (heavy)
Static solve of a tet10 block (70 644 unknowns) and a hex20 block (75 924) on 1, 4 and the machine’s threadsreactions balance the load; displacements, reactions and stresses bit-identical on every thread count; the times are printedtests/speed.rs: static_solve_speed (heavy); static_solve_is_the_same_on_any_number_of_threads (blocks of 4 cells a side)
Orderingsa permutation with separators last; graph dissection deterministic; less fill than planes on a thin curved wall; a block keeps the better orderingordering::tests
Constraint budgeta held distributing coupling of 12 321 nodes refused with its size before allocating; byte counts that overflow refusedoversized_reductions_are_refused_before_allocating, reduced_matrix_budget_refuses_byte_counts_that_overflow
Lanczos basis under a raised cap33 and 166 vectors at 6 000 000 equationsraised_factor_budget_keeps_the_lanczos_vector_limit
Cap error textentry count and byte estimate before allocationfactor_limit_estimates_bytes_without_allocating_the_factor, heat_factor_cap_reports_value_bytes_before_allocation

Every implicit solver test and oracle case runs on these factorizations; the oracle fixtures fail CI on any change of a frozen result beyond its band (10⁻⁹ of the value).

Limitations

  • Direct solvers only: memory grows with the factor (O(n^{4/3}) entries for a 3D mesh under nested dissection); there is no iterative solver and no out-of-core factorization.
  • LDLᵀ keeps a static structure: L’s entries below a supernode are not bounded by the search (refinement covers accuracy where it matters), and a nonsingular saddle point whose zero diagonal couples only to rows of a later supernode would stop as singular. No FieldCraft system has one: hybrid pressures are condensed per element.
  • A zero eigenvalue is never counted in the inertia: a zero pivot is a located error.
  • The symbolic analysis by blocks is all or nothing: it needs every block of three unknowns whole. Detecting any run of indistinguishable unknowns (the general compressed graph of Ashcraft 1995) is not implemented.
  • Unsymmetric matrices are not factored: the skew part of a follower pressure’s load stiffness and of friction is left out of the tangent (Nonlinear static).

Implementation

FileContents
crates/solver/src/sparse.rsCsr, NodeGraph, add_block, add_scalar, add_diagonal
crates/solver/src/ordering.rsnested_dissection, graph_dissection, fill_reducing_order, fill
crates/solver/src/cholesky.rsUpperColumns, Symbolic, Factor, FactorError, PIVOT_TOLERANCE, PANEL, TILE
crates/solver/src/scalar.rsScalar (with_packed), PACKED_ROWS, PACKED_KEPT
crates/solver/src/ldlt.rsLdltFactor, Inertia, Kind, Symmetric (new, solve, solve_refined, inertia)
crates/solver/src/constraints.rsReduction, Budget
crates/solver/src/analysis.rspattern, factor_raw, factor_symmetric, factor_error, budget, lanczos_basis
crates/solver/src/lib.rsLimits, Error::factor_limit
crates/solver/tests/speed.rsthe static solve’s times on a tet10 and a hex20 block
crates/engine/src/cmd/solve.rslimits, FACTOR_ENTRY_CEILING, threads

References

  • A. George. Nested dissection of a regular finite element mesh. SIAM J. Numer. Anal. 10(2):345–363, 1973.
  • A. George, J. W. H. Liu. An automatic nested dissection algorithm for irregular finite element problems. SIAM J. Numer. Anal. 15(5):1053–1069, 1978.
  • N. E. Gibbs, W. G. Poole, P. K. Stockmeyer. An algorithm for reducing the bandwidth and profile of a sparse matrix. SIAM J. Numer. Anal. 13(2):236–250, 1976.
  • H. D. Simon. Partitioning of unstructured problems for parallel processing. Computing Systems in Engineering 2:135–148, 1991.
  • J. W. H. Liu. The role of elimination trees in sparse factorization. SIAM J. Matrix Anal. Appl. 11(1):134–172, 1990.
  • J. W. H. Liu, E. G. Ng, B. W. Peyton. On finding supernodes for sparse matrix computations. SIAM J. Matrix Anal. Appl. 14(1):242–252, 1993.
  • T. A. Davis. Direct Methods for Sparse Linear Systems. SIAM, 2006.
  • C. Ashcraft. Compressed graphs and the minimum degree algorithm. SIAM J. Sci. Comput. 16(6):1404–1411, 1995.
  • E. Ng, B. W. Peyton. Block sparse Cholesky algorithms on advanced uniprocessor computers. SIAM J. Sci. Comput. 14(5):1034–1056, 1993.
  • E. Rothberg, A. Gupta. An efficient block-oriented approach to parallel sparse Cholesky factorization. SIAM J. Sci. Comput. 15(6):1413–1439, 1994.
  • J. R. Bunch, L. Kaufman. Some stable methods for calculating inertia and solving symmetric linear systems. Math. Comp. 31(137):163–179, 1977.
  • C. Ashcraft, R. G. Grimes, J. G. Lewis. Accurate symmetric indefinite linear equation solvers. SIAM J. Matrix Anal. Appl. 20(2):513–561, 1998.
  • O. Schenk, K. Gärtner. On fast factorization pivoting methods for sparse symmetric indefinite systems. Electron. Trans. Numer. Anal. 23:158–179, 2006.
  • I. S. Duff, J. K. Reid. The multifrontal solution of indefinite sparse symmetric linear equations. ACM TOMS 9(3):302–325, 1983.
  • J. W. H. Liu. The multifrontal method for sparse matrix solution: theory and practice. SIAM Review 34(1):82–109, 1992.
  • E. Anderson et al. LAPACK Users’ Guide. SIAM, 1999.
  • N. J. Higham. Accuracy and Stability of Numerical Algorithms, 2nd ed. SIAM, 2002.

Lattice Boltzmann flow

A fluid step computes time-dependent, weakly compressible, Newtonian flow in a box of cubic cells, less the cells inside obstacle bodies, and the force the fluid exerts on every wall. It serves internal and external flows at low Mach number: channels and ducts, flow past parts, cavities, electronics cooling with heat, fans and vents. The method is the lattice Boltzmann equation on the D3Q19 velocity set with a two-relaxation-time, recursive regularised or multiple-relaxation-time collision, Guo forcing, halfway bounce-back walls (or interpolated bounce-back at obstacles), Zou–He velocity inlets and extrapolated pressure faces.

Commandsmodel.fluid_domain.create, model.fluid_domain.edit, model.fluid_domain.delete, model.fluid_domain.boundary, model.step.create, solve.fluid, solve.settings
Step procedure"fluid"
Solvercrates/lbm (CPU, f64, the reference); crates/lbm-gpu (wgpu, f32)
MethodD3Q19 lattice Boltzmann (Qian, d’Humières & Lallemand 1992; Krüger et al. 2017)
Verified bycrates/lbm/tests/verification.rs, mrt.rs, regularized.rs, hrr.rs, outlets.rs, steady.rs, thermal.rs, interpolated.rs, interpolated_couette.rs; crates/lbm-gpu/tests/verification.rs; oracle cases de-vahl-davis-ra1e3 … ra1e6, conjugate-cavity-centred-body

Synopsis

[
  {"command": "model.units", "params": {"system": "m-kg-s-N-Pa"}},
  {"command": "model.material.create", "params": {"name": "Air", "density": 1.2,
    "fluid": {"type": "newtonian", "viscosity": 1.8e-5}}},
  {"command": "model.fluid_domain.create", "params": {"name": "Flow", "material": "Air",
    "min": [0, 0, 0], "max": [0.24, 0.12, 0.1], "spacing": 0.0025,
    "faces": {"x_min": {"type": "velocity", "velocity": [0.025, 0, 0]},
              "x_max": {"type": "pressure", "pressure": 0}},
    "obstacles": ["Body1"]}},
  {"command": "model.step.create", "params": {"name": "Run", "procedure":
    {"type": "fluid", "domain": "Flow", "end_time": 16, "frames": 10}}},
  {"command": "solve.fluid", "params": {"step": "Run", "backend": "cpu"}}
]

Numbers are in the model’s display units, here SI (set by model.units), or carry their own unit (“2 m/s”; Units). With air (ν = 1.5 × 10⁻⁵ m²/s) this box of 96 × 48 × 40 cells gets the automatic Δt = 5 ms and τ⁺ = 0.536.

Parameters

The fluid domain (model.fluid_domain.create, .edit)

FieldValueDefaultMeaning
namestringrequiredThe domain’s name; a fluid step refers to it.
materialmaterial namerequiredA material with a density and fluid: {"type": "newtonian", "viscosity": μ} (dynamic viscosity). The kinematic viscosity is ν = μ/ρ₀.
min, max[x, y, z]requiredThe box’s lower and upper corners.
spacinglengthrequiredThe side Δx of the cubic cells. Every extent of the box must be a whole number of spacings (to 10⁻⁶ of a spacing), 1 to 2²⁰ cells per side.
faces{"x_min": {…}, …}every face a wallThe condition of each box face (Boundary conditions).
obstacles["Body1", …]noneSolid bodies of the open design or imported surfaces, by name; at most 1000. Their cells are not fluid.
surfaces[{"face": {"body", "face"}, "condition": {…}}]every obstacle face a wall at restMoving-wall conditions on named obstacle faces; at most 10 000.
initial_velocity[u, v, w][0, 0, 0]The fluid’s velocity at the start (equilibrium at density ρ₀ and this velocity).
acceleration[x, y, z][0, 0, 0]A body acceleration: gravity, or a uniform driving force per mass.
tolerancelengthΔx/10The chordal tolerance obstacles are triangulated with.
thermal{…}none (isothermal)Heat in the fluid and conducting solids (Heat transfer).
porous, fans[{…}]nonePorous resistance zones and fans, at most 1000 together (Fans and vents).
baffles[{name, axis, position, conductance}], at most 64noneThin walls: zero-thickness no-slip sheets across the box, conducting heat with thermal (Heat transfer).
free_surface{"liquid": [{"min", "max"}, …]}none (a full box)Liquid in the liquid regions and gas elsewhere; the liquid moves through the gas (Free surface).

The fluid step (model.step.create, procedure "fluid")

FieldValueDefaultMeaning
domaindomain namerequiredThe fluid domain the step solves in.
end_timetime—The flow time to run. Exactly one of end_time and steps.
steps1 to 10⁹—The number of time steps.
time_steptimeautomaticΔt. Left out, the solver chooses it (Theory, below).
frames1 to 100010Output frames after the initial one, evenly spaced to the end.
collision"trt", "regularized", "mrt", "hrr""trt"The collision operator (Collision operators).
sigmaabove 0, at most 10.99The hybrid collision’s σ (hrr only; Collision operators).
magicabove 0, at most 13/16The two-relaxation-time parameter Λ. Warned about with any other collision.
turbulence{"type": "smagorinsky", …}, {"type": "vreman", …}noneSmagorinsky’s or Vreman’s subgrid eddy viscosity, Van Driest damping (Smagorinsky’s) and the wall model (Turbulence, Large-eddy simulation).
walls"halfway", "interpolated", "interpolated_quadratic""halfway"Where obstacle walls lie: halfway between cells (a staircase), or where the surface crosses each link (Bouzidi et al. 2001; linear, or quadratic from three nodes in line; Boundary conditions).
steady{…}noneStop once the flow stops changing (Steady state and averaging).

The solve (solve.fluid)

FieldValueDefaultMeaning
stepstep namethe only fluid stepThe fluid step to solve.
backend"cpu", "gpu"see belowcpu: double precision, the same result on every machine. gpu: the device FIELDCRAFT_GPU picks, single precision (GPU backend). Left out: FIELDCRAFT_SOLVE_BACKEND when set, else the step’s saved preference (solve.settings), else the CPU.
max_cellswhole number16 000 000Cap on the grid’s cells. May be raised up to what the machine’s memory bound holds.
max_stepswhole number10 000 000Cap on the time steps. May only be lowered.
max_cell_updateswhole number10¹²Cap on cells × time steps. May be raised up to the machine’s ceiling.
max_frame_byteswhole number2 × 10⁹Cap on the memory the output frames take. May be raised up to the machine’s bound.
threadswhole numberas for solve.staticCPU threads. The result does not depend on it.
estimateboolfalseReturn only the memory estimate, without solving.

The machine’s memory bound is half its physical memory. A run with a raised max_cells or max_frame_bytes must fit in it. A run over any cap is refused before it starts, with the value to raise the cap to or what to coarsen.

solve.settings ({"step", "backend": "gpu" | "cpu" | "none", "fallback": "cpu" | "none"}) saves a step’s preferred backend with the model, outside its definition. With a GPU preference on a machine without a suitable GPU the solve falls back to the CPU with a notice (fallback: "none" refuses instead). FIELDCRAFT_SOLVE_BACKEND=cpu|gpu overrides every preference on a machine.

Theory

The lattice

The populations f_q(x, t) of the D3Q19 velocity set (the rest velocity, the six axis directions and the twelve face diagonals) evolve by

f_q(x + c_q Δt, t + Δt) = f*_q(x, t)           (streaming)
f*_q(x, t) = f_q − Ω(f_q − f_q^eq) + S_q          (collision with forcing)

with the weights w_q = 1/3 (rest), 1/18 (axes), 1/36 (diagonals), c_s² = 1/3 and the second-order equilibrium

f_q^eq = w_q ρ (1 + 3 c_q·u + 9/2 (c_q·u)² − 3/2 u²)

The density and momentum are ρ = Σ f_q and ρu = Σ f_q c_q + F/2 (Guo’s half force). The scheme recovers the incompressible Navier–Stokes equations with a pressure p = c_s² ρ and an error of order Ma². Directions come in opposite pairs (1–2, 3–4, …, 17–18).

Units

Lattice units take Δx, Δt and the fluid’s density ρ₀ as 1 (Krüger et al. 2017, ch. 7). A model quantity converts to lattice units by:

QuantityLattice unit
VelocityΔx/Δt
Kinematic viscosityΔx²/Δt
AccelerationΔx/Δt²
Pressureρ₀ Δx²/Δt²
Forceρ₀ Δx⁴/Δt²
Volume flowΔx³/Δt

The lattice viscosity ν Δt/Δx² fixes the symmetric relaxation time, ν Δt/Δx² = c_s² (τ⁺ − ½). A gauge pressure p is the lattice density ρ = 1 + p/(c_s² ρ₀ Δx²/Δt²), and the reported pressure of a cell is (ρ − 1) c_s² ρ₀ Δx²/Δt².

The time step

Unless the step gives time_step, Δt is the largest that keeps the characteristic lattice velocity at 0.05 (Mach 0.087) and τ⁺ at most 1:

Δt = min(0.05 Δx / U, (1 − ½) Δx² / (3 ν))

U, the characteristic velocity, is the largest of: the inlet and moving-wall velocities (box faces and obstacle faces), the initial velocity, √(2 Δp/ρ₀) across the pressure faces, √(2 Δp_max/ρ₀) of every fan’s largest pressure rise, and, with a body acceleration a, the smaller of the viscous plane-channel peak a H²/(8 ν) (H the box’s smallest extent) and the free-fall speed √(2 a L) (L its largest). With end_time and no time_step, the number of steps is ⌈t_end/Δt⌉ and Δt is shortened to t_end over it. With both time_step and end_time, the steps are round(t_end/Δt).

Limits

The setup refuses a step, naming the numbers and what to change, when:

CheckLimitReason
Lattice Mach number U Δt/(Δx c_s)at most 0.3The scheme is weakly compressible and loses stability towards Ma ≈ 0.5.
τ⁺at least 0.505; 0.5001 with a turbulence model (0.50354 with "mrt")The stable velocity range shrinks to nothing as τ → ½ (Lallemand & Luo 2000). The message gives the cell Reynolds number and suggests refining, a longer time step or a turbulence model.
Lattice acceleration a Δt²/Δxat most 0.01
Thermal τ_Tat least 0.505With heat; the message gives the cell Péclet number.
Cells across an inlet or outlet faceat least 2
Steps, cells, cell updatesthe caps of solve.fluid

It warns when the lattice Mach number exceeds 0.1 (the compressibility error, of order Ma², may be visible), when τ⁺ < 0.51 with the two-relaxation-time collision, when τ⁺ < 0.508 with the regularised collision, and when τ_T > 2.

While running, a lattice speed above 0.5 (Mach 0.87) or a density that is not a positive number stops the run as unstable at that time step. At the end, a density spread above 1 % is warned about: the weakly compressible error is visible, and a shorter time step reduces it quadratically.

Forcing

A body force per volume F enters by Guo, Zheng & Shi (2002): the velocity is u = (Σ f_q c_q + F/2)/ρ and the source term, in its two-relaxation-time form (Krüger et al. 2017, ch. 10), is split into its symmetric part, scaled by 1 − 1/(2τ⁺), and its antisymmetric part, scaled by 1 − 1/(2τ⁻):

S_q⁺ = (1 − ω⁺/2) w_q (9 (c_q·u)(c_q·F) − 3 u·F)
S_q⁻ = (1 − ω⁻/2) w_q 3 c_q·F

F is the sum of ρ₀ times the domain’s acceleration, the Boussinesq buoyancy −β (T − T₀) g per mass with heat, a fan’s push along its direction, and a porous zone’s Darcy–Forchheimer resistance −ρ (α u + β |u| u). A porous resistance depends on the velocity it defines; that quadratic is solved exactly for u (Guo & Zhao 2002), which keeps strong resistances stable (Fans and vents). Open boundaries prescribe the velocity with the half force.

The fluid domain and its obstacles

The grid fills the box: cell (i, j, k) has its centre at min + (i + ½, j + ½, k + ½) Δx. Each obstacle body is triangulated at the domain’s tolerance (default Δx/10) from the open design, or taken from an imported surface (a 3MF, STL, OBJ, PLY or glTF file, geometry.import.mesh; geometry.stitch closes small gaps), and its surface must bound a solid (closed and oriented). A cell is solid when its centre lies inside an obstacle: the winding number of the surface around the centre, counted along the ray in +x, is positive. Every crossing is decided with exact predicates (orient2d, orient3d), and degenerate positions (a ray through an edge or vertex, a centre on a plane) by one symbolic perturbation of the centre (Edelsbrunner & Mücke 1990), so a watertight surface gives a consistent count and the result never depends on rounding. The first obstacle that covers a cell owns it.

Each wall link (a fluid cell next to a solid one) is assigned the face of the triangle nearest the link’s midpoint, so forces are reported per B-rep face by its persistent name. Imported surfaces have no face names; their faces are face0, face1, …. An obstacle that covers no cell centre is warned about; a conducting solid with power that covers none is refused.

Streaming layout (CPU)

The CPU keeps two arrays of populations, structure of arrays (f[q · stride + cell]), each direction’s array starting an odd number of cache lines after the previous one. Streaming pulls: every population of a cell comes from one source (a neighbour, a periodic image, the cell itself through a wall, or an open boundary). Cells whose 18 neighbours are all fluid cells inside the box stream by one shifted copy per direction; the others follow per-link rules (bounce-back, specular reflection, periodic pull, open). The GPU backend streams in place or in two buffers (GPU backend).

Algorithm

solve.fluid runs:

  1. Estimate. The memory the run needs (populations, flags, temperature lattice, frames, readback) is estimated from the model and checked against the caps and the machine’s bound. With estimate: true the solve stops here.
  2. Obstacles. Each obstacle is triangulated or taken from its imported surface.
  3. Setup. The step in lattice units: the grid, Δt and the number of steps, τ⁺ and τ⁻, the characteristic velocity and its Mach number, the boundary conditions and zones, and the limit checks above.
  4. Preparation. Voxelisation of every obstacle, the link list (every population that does not stream from its neighbour), the open cells of every inlet and outlet face, the zones’ cells, and the initial equilibrium at ρ₀ and the initial velocity.
  5. Backend. The CPU steps the prepared flow itself; the GPU backend takes its grid, links and open cells from it.
  6. Time loop. Each time step: collide (with forcing and, with a turbulence model, each cell’s relaxation rate), stream with the wall rules, measure the momentum exchange on every wall link, apply the open boundaries; then, with heat, the temperature lattice and the conducting solids. The steps run in chunks up to the next frame, history sample, monitor sample or progress count (at most 64 steps).
  7. Records. Forces (and heat and zone flows) every k-th step, with k = ⌈steps/10 000⌉, so a history keeps at most 10 000 samples; frame j (1 to frames) at step round(j · steps/frames).
  8. Stop. At the step count, at a steady-state decision, or at an instability (an error without a stop rule; with one, the run ends as diverged and keeps the frames saved so far).

Collision and streaming run by fixed blocks of cells on threads (fieldcraft-parallel), each cell writing only its own populations; wall forces and every other sum run in a fixed order on one thread. The CPU result is the same bit for bit on any number of threads and on every platform.

Output

The reply of solve.fluid, in the display units (its units names them):

FieldMeaning
step, backendThe step, and what stepped it: cpu or gpu: <adapter>.
executioncompleted, or diverged when a steady rule stopped a blow-up. It says the run finished, not that its result is valid.
cells, fluid_cells, steps, time_step, end_timeThe grid and the run.
tau, tau_minus, magic, collisionτ⁺, τ⁻, Λ and the collision operator.
tau_characteristic, tau_rangeWith a shear-dependent fluid each cell relaxes with its own τ⁺: tau_characteristic is τ⁺ at the flow’s characteristic shear rate, tau_range the [τ_min, τ_max] each cell’s own is held in, and tau the characteristic one held within that range (the reference that sets tau_minus).
velocity_scale, lattice_velocity, machThe characteristic velocity U, U Δt/Δx and the lattice Mach number.
eddy_viscosity_ratioWith a turbulence model, the largest ν_t/ν in the last step.
framesThe time of every frame.
max_speed, max_speed_time, final_max_speedThe largest speed over all frames, its time, and the last frame’s, over interior fluid cells (the open-boundary layers excluded).
massfirst, last and relative_change of the fluid mass.
forcesPer wall with a non-zero history: name, body, final force and mean over the last quarter of the history.
tau_thermal, temperature, heat, solids, components_okWith heat (Heat transfer).
zonesFans and porous zones (Fans and vents).
stopWith a steady rule (Steady state and averaging).
validitySampled density and Mach extrema and force-spike indicators (Sampled runtime validity).
memoryThe run’s estimate: flow_bytes, frame_bytes (about 16 bytes per cell per frame, 20 with heat), total_bytes, bound_bytes, frames_that_fit, each cap’s ceilings, and on the GPU the population buffer against the device’s limit per buffer.
backend_choice, noticeWhat chose the backend, and a fallback notice.
warningsEvery warning of the setup and the run.

The result stays in the session for the results commands (Fluid results).

Sampled runtime validity

A finished run can hide an earlier density or Mach excursion, or a force spike. validity reports what the run’s own field reads show: the smallest and largest density as a ratio to the material’s density, the largest departure from it, and the smallest and largest local Mach number, over every fluid cell including the inlet and outlet layers (solid and fully gaseous cells excluded), in full precision before the frames are rounded. It is measured on the reads the run makes anyway, the output frames, the steady monitor’s samples and the final field, so it costs no extra readback on the CPU or the GPU; at most one read per field_every_steps (a 256th of the run) is kept, at most 258 in all. With few frames and no steady rule the samples are few: an excursion between two reads is not seen, and more frames give a denser record.

Crossing a density departure of 0.02 or a local Mach number of 0.2 adds a warning. That envelope is a low-Mach study guide, not a stability limit: the existing blow-up guard still stops a run that diverges, and an unusable field is marked and leaves the envelope unassessed. A pressure gradient the case intends is not subtracted; a study states its own reference. Per wall, the peak force and the largest jump between history samples are reported against the signed mean force (null for a zero mean). None of this establishes statistical convergence, grid independence or agreement with a reference.

validity survives a CPU checkpoint and resume bit for bit; it is part of the command’s reply, not of the saved results, so a reopened result has none.

Worked example

The bundled flow-past sample: air past an L-bracket standing on the floor of a box, solved with this page’s defaults (D3Q19, two relaxation times, the automatic time step) on the CPU. The run shows the automatic Δt and τ⁺, the mass the weakly compressible scheme keeps, and the force on every wall.

Geometry8 mm L-bracket Bracket: upright 50 mm high and 40 mm wide at the upstream end (x 0–8 mm), foot 60 mm long along the flow, on the floor
Domainbox (−60, −40, 0) to (180, 80, 100) mm, Δx = 2.5 mm: 96 × 48 × 40 = 184 320 cells, 182 304 fluid
Fluidair, ρ₀ = 1.2 kg/m³, μ = 1.8 × 10⁻⁵ Pa s (ν = 15 mm²/s)
Boundariesx_min velocity inlet 25 mm/s; x_max pressure 0; z_min wall; y_min, y_max, z_max slip; initial velocity 25 mm/s
StepFlow: fluid, end_time 16 s, 10 frames, collision default (trt, Λ = 3/16)
Unitsmm, t, s, N, MPa (the sample sets them)
[
  {"command": "file.sample", "params": {"name": "flow-past"}},
  {"command": "solve.fluid", "params": {"step": "Flow", "backend": "cpu"}},
  {"command": "results.streamlines", "params": {"step": "Flow", "show": false}},
  {"command": "results.slice", "params": {"step": "Flow", "field": "velocity", "axis": "y", "position": "auto"}}
]

From the solve.fluid reply (Apple M4 Max, CPU, 14 cores; 7–23 s wall-clock over several runs on a machine shared with other jobs). The drag is the sum of the x components of the eight bracket faces in forces; q A = ½ ρ₀ U² × (40 × 50 mm²) = 7.5 × 10⁻⁷ N is the dynamic pressure on the upright’s frontal area.

QuantityFieldCraftReferenceDifference
time_step0.005 smin(0.05 Δx/U, Δx²/(6 ν)) = min(0.005, 0.0694) sexact
steps320016 s / 0.005 sexact
tau (τ⁺)0.536½ + 3 ν Δt/Δx² = 0.536exact
tau_minus (τ⁻)5.708½ + Λ/(τ⁺ − ½)exact
lattice_velocity, mach0.05, 0.08660.05, 0.05 √3exact
mass.relative_change−7.67 × 10⁻⁴0—
max_speed41.69 mm/s at 1.6 s——
final_max_speed39.29 mm/s——
Drag on the bracket, final1.13 × 10⁻⁶ N (1.51 q A)——
Drag on the bracket, mean (last quarter)1.74 × 10⁻⁶ N (2.32 q A)——
warnings“the density varies by 1.2% at the end: the weakly compressible error is visible; …”

What to look at. The time step is the advective limit (lattice velocity 0.05, Mach 0.087); the viscous limit allows 14 times more, so τ⁺ = 0.536 stays above the 0.51 warning of the two-relaxation-time collision. The slice shows the flow accelerated over the upright’s top edge and a slow wake behind the upright over the foot; the 39.29 mm/s maximum of the last frame lies beside the bracket, at (18.75, −16.25, 26.25) mm. The drag is a small difference of large face forces: each wall’s momentum exchange carries the lattice’s rest pressure c_s² ρ₀ (Δx/Δt)² = 0.1 Pa over its area (0.19 mN on the upstream face of the upright, 0.14 mN the other way on its downstream face, 2.6 mN on the floor), which cancels only in the total of a body closed in that direction. The final and mean drags differ by half because the drag still oscillates at 16 s, by 1.0 × 10⁻⁶ N RMS about its mean from 4 s on (Steady state and averaging); the 1.2 % density spread is the weakly compressible error the warning names.

Verification

Analytic cases in crates/lbm/tests/verification.rs (two relaxation times, Λ = 3/16 unless stated):

CaseReferenceMeasuredToleranceTest
Plane Poiseuille, body force, 4/8/16 cells, τ = 1Parabola (theory)Exact to round-off10⁻¹⁰ of the peakplane_poiseuille_is_exact_with_the_magic_parameter_and_second_order_otherwise
The same with Λ = 1/4, 8 → 64 cellsParabolaOrder 2order − 2
Couette, 16 cellsLinear profile, wall shear μU/H (theory)Profile exact; shear on both walls10⁻¹⁰; shear 10⁻⁶ relativecouette_flow_is_linear_and_the_wall_shear_is_mu_u_over_h
Taylor–Green vortex, 16/32/64 cells, τ = 0.8Amplitude e^(−2νt) (theory)1.6e-2, 4.0e-3, 9.9e-4: order 2.0; mass to 10⁻¹³finest < 2 × 10⁻³, order > 1.8taylor_green_vortex_decays_at_the_viscous_rate_to_second_order_and_conserves_mass
Poiseuille pipe, staircase wall, 4/8/16 cells per radiusHagen–Poiseuille; wall force = driving forceL2 error < 5 % at 16 cells; force balance to 10⁻⁶pipe_poiseuille_on_a_staircase_wall_converges (heavy)
Stokes drag of a simple cubic array of spheres, R = 3 and 6 cellsHasimoto (1959) with Sangani & Acrivos (1982) (theory)Within 5 % at R = 6, closer than at R = 3; mass to round-off5 %stokes_drag_of_a_sphere_array_matches_hasimoto (heavy)
The pipe, a channel with walls off the cell faces, annular Couette and the sphere array with interpolated wallsThe same closed formsSecond order in place of first; sphere at R = 3: −1.6 % in place of +11.7 %crates/lbm/tests/interpolated.rs, interpolated_couette.rs (Boundary conditions)
Parabolic inlet, pressure outlet, 16 cells, τ = 0.6Poiseuille profile and gradient −12 μŪ/H²Profile 3.0e-4, gradient +0.07 %5 × 10⁻³, 1 %channel_with_a_parabolic_inlet_and_a_pressure_outlet_develops_poiseuille_flow (heavy)
Pressure-driven channel, two pressure facesParabola; each end at its pressure3 %pressure_driven_poiseuille_holds_its_end_pressures
Stability limitsRefusals with clear errorsstability_limits_are_enforced_with_clear_errors
Memory estimateWhat a run allocates+0.5 % (channel), +0.2 % (heat, buoyancy), −0.1 % (sphere)1 %the_memory_estimate_matches_what_a_run_allocates
DeterminismOne thread against manyBit for bitexactresults_are_bit_for_bit_reproducible

The other collision operators, open boundaries and benchmark flows are on their pages: Collision operators, Boundary conditions, Steady state and averaging, GPU backend. The natural-convection oracle cases (de-vahl-davis-ra1e3 to ra1e6, conjugate-cavity-centred-body) are in Oracle results. The isothermal oracle cases cylinder-channel-2d1 (Schäfer & Turek 2D-1) and lid-driven-cavity-re100 (Ghia et al.) are pending: their reference values are cited, their recipes are not written yet; the same flows are run by the crate’s tests (Collision operators).

Limitations

  • One uniform grid: no local refinement. With halfway walls (the default) obstacle walls are staircase and curved walls are first order in position; walls: "interpolated" makes them second order but is not mass conservative (Boundary conditions).
  • Weakly compressible: the pressure is tied to the density, and the error grows as Ma².
  • Newtonian fluids only.
  • Obstacles do not move; a moving-wall condition gives a face a tangential velocity, the body stays where it is.
  • A uniform pressure outlet distorts the last cell layer where an unrecovered wake reaches it; the reported extremes leave the open layers out (Boundary conditions).
  • results.export.vtu does not export fluid steps yet (Fluid results).

Implementation

FileContents
crates/model/src/fluids.rsFluidDomain, BoxFace, FaceCondition, SurfaceCondition, validation.
crates/model/src/steps.rsProcedure::Fluid, Collision, Turbulence, Steady.
crates/lbm/src/lattice.rsD3Q19: C, W, CS2, opposite, equilibrium, moving_wall.
crates/lbm/src/setup.rsSetup::new: lattice units, the time step, the limits; TARGET_LATTICE_VELOCITY, MIN_TAU, MAX_MACH.
crates/lbm/src/voxel.rsvoxelise, TriangleTree, Grid.
crates/lbm/src/flow.rsFlow::new (links, open cells), Flow::step, collide, stream, open_boundaries, zou_he.
crates/lbm/src/solve.rssolve_fluid_on, run: the time loop, frames and histories.
crates/lbm/src/memory.rsMemory::estimate, the caps’ checks.
crates/lbm/src/backend.rsThe Backend trait, register_backend, Choice.
crates/engine/src/cmd/solve.rssolve.fluid (run_fluid, fluid_summary, obstacles), solve.settings.
crates/engine/src/cmd/define.rsmodel.fluid_domain.* commands.

References

  • Y. H. Qian, D. d’Humières, P. Lallemand. Lattice BGK models for Navier–Stokes equation. EPL 17(6):479, 1992. doi:10.1209/0295-5075/17/6/001
  • T. Krüger, H. Kusumaatmaja, A. Kuzmin, O. Shardt, G. Silva, E. M. Viggen. The Lattice Boltzmann Method: Principles and Practice. Springer, 2017. doi:10.1007/978-3-319-44649-3
  • I. Ginzburg, F. Verhaeghe, D. d’Humières. Two-relaxation-time lattice Boltzmann scheme: about parametrization, velocity, pressure and mixed boundary conditions. Commun. Comput. Phys. 3(2):427–478, 2008. doi:10.4208/cicp.2008.v3.p427
  • Z. Guo, C. Zheng, B. Shi. Discrete lattice effects on the forcing term in the lattice Boltzmann method. Phys. Rev. E 65:046308, 2002. doi:10.1103/PhysRevE.65.046308
  • Z. Guo, T. S. Zhao. Lattice Boltzmann model for incompressible flows through porous media. Phys. Rev. E 66:036304, 2002.
  • P. Lallemand, L.-S. Luo. Theory of the lattice Boltzmann method: dispersion, dissipation, isotropy, Galilean invariance, and stability. Phys. Rev. E 61:6546–6562, 2000. doi:10.1103/PhysRevE.61.6546
  • H. Edelsbrunner, E. P. Mücke. Simulation of Simplicity. ACM Trans. Graph. 9(1):66–104, 1990.
  • H. Hasimoto. J. Fluid Mech. 5(2):317–328, 1959.
  • A. S. Sangani, A. Acrivos. Int. J. Multiphase Flow 8(4):343–360, 1982.

Collision operators

The collision relaxes each cell’s populations towards equilibrium; it sets the viscosity, the position of bounce-back walls and how close to τ⁺ = ½ a grid can run. A fluid step chooses one of four operators on D3Q19: two relaxation times (the default), the recursive regularised collision for flows the default cannot hold on an affordable grid, multiple relaxation times, the operator of the wall-modelled large-eddy simulation, and the hybrid recursive regularised collision, which adds a hyperviscosity for large-eddy simulation (CPU only). The temperature lattice of a flow with heat always collides with two relaxation times.

Commandsmodel.step.create (procedure fluid: collision, magic, sigma), solve.fluid
Step procedure"fluid"
Solvercrates/lbm (CPU, f64); crates/lbm-gpu (f32), every operator
MethodTRT (Ginzburg, Verhaeghe & d’Humières 2008); recursive regularised (Latt & Chopard 2006; Coreixas et al. 2017); MRT (d’Humières et al. 2002, rates of Malaspinas & Sagaut 2014); hybrid recursive regularised (Jacob, Malaspinas & Sagaut 2018)
Verified bycrates/lbm/tests/verification.rs, regularized.rs, mrt.rs, hrr.rs, thermal.rs; crates/lbm-gpu/tests/verification.rs (every operator, both layouts)

Synopsis

{"name": "Run", "procedure": {"type": "fluid", "domain": "Flow", "end_time": 16,
  "collision": "regularized"}}

Parameters

FieldValueDefaultMeaning
collision"trt"defaultTwo relaxation times. Most flows: bounce-back walls sit exactly halfway between cells, so it is the most accurate of the three on a given grid.
"regularized"Recursive regularised. Flows the two-relaxation-time scheme cannot hold on the grid you can afford: τ⁺ below about 0.52, fast inlets and fans, sharp corners. It costs 15–35 % more per step and its staircase walls are less accurate. Uniform pressure outlets extrapolate interior stress; their previous equilibrium closure caused 3–8 % error near the outlet (Theory).
"mrt"Multiple relaxation times. Refused below τ⁺ = 0.50354, where it is linearly unstable at rest (its stability bound); not a collision for large-eddy simulation close to τ⁺ = ½.
"hrr"Hybrid recursive regularised. The regularised collision with its stress blended with the one the finite-difference strain rate gives (sigma), which damps the shortest waves: for large-eddy simulation.
magicabove 0, at most 13/16The two-relaxation-time parameter Λ. With regularized, mrt or hrr it has no effect, and the solve warns.
sigmaabove 0, at most 10.99The hybrid collision’s σ: its share of the populations’ own stress. 1 is regularized exactly; lower adds more hyperviscosity. "dynamic": σ per cell and step from the turbulence model’s eddy viscosity, which then stays out of τ (needs turbulence; Theory). With another collision it has no effect, and the solve warns.

The same choice runs on the CPU and on the GPU (backend: "gpu"), with buoyancy, heat and the turbulence model (GPU backend for hrr’s finite-difference gradient there). solve.fluid reports it as collision, with tau, tau_minus and magic.

Warnings: with two relaxation times below τ⁺ = 0.51 the solve warns and suggests the regularised collision; with the regularised collision it warns below τ⁺ = 0.508, its measured limit on the flow-past sample, where the reflecting inlet and outlet still fail.

Theory

Two relaxation times

Each pair of opposite populations (q, q̄) splits into a symmetric and an antisymmetric part, f_q⁺ = (f_q + f_q̄)/2 and f_q⁻ = (f_q − f_q̄)/2, which relax at their own rates:

f*_q = f_q − ω⁺ (f_q⁺ − f_q^eq⁺) − ω⁻ (f_q⁻ − f_q^eq⁻) + S_q⁺ + S_q⁻
f_q^eq⁺ = w_q ρ (1 + 9/2 (c_q·u)² − 3/2 u²),   f_q^eq⁻ = 3 w_q ρ c_q·u
ω⁺ = 1/τ⁺,   ω⁻ = 1/τ⁻,   Λ = (τ⁺ − ½)(τ⁻ − ½)

τ⁺ sets the viscosity, ν = c_s² (τ⁺ − ½); τ⁻ follows from Λ. The rest population is symmetric only. With Λ = 3/16 halfway bounce-back puts the wall exactly halfway between cells, and steady solutions do not depend on the viscosity (Ginzburg et al. 2008). With a turbulence model each cell’s τ⁺ rises by its eddy viscosity and its τ⁻ follows, keeping Λ.

Recursive regularised

crates/lbm/src/regularized.rs has the derivation; in short:

  • Every population is rebuilt from the cell’s density, its velocity u = (Σ f c + F/2)/ρ (Guo’s half force) and its non-equilibrium momentum flux before relaxing. The ghost modes the two-relaxation-time scheme relaxes by 1 − ω ≈ −1 as τ⁺ → ½ are set to equilibrium every step instead.
  • Second order: the equilibrium and the flux P = Σ c c f − ρ (c_s² I + u u) + ½ (u F + F u). Third order, recursively from P: u_a P_bc + u_b P_ac + u_c P_ab, plus the equilibrium ρ u_a u_b u_c, for the six third moments D3Q19 holds (xxy, yzz, xyy, xzz, xxz, yyz). On D3Q19 each pair (H_xxy, H_yzz) enters by its sum and difference, which are orthogonal under the weights (norms 2/27 and 6/27), so the populations carry exactly those moments.
  • Guo forcing, re-derived for the rebuilt populations: f* = f^eq + (1 − ω) f⁽¹⁾[P] + ½ F_q, F_q = w_q [3 c·F + 9 (c·u)(c·F) − 3 u·F]. Mass is kept, the momentum gains exactly F, and fans, porous zones (Guo & Zhao’s implicit velocity) and buoyancy enter through F and u.
  • Uniform pressure faces use the same non-equilibrium extrapolation for every collision: prescribed density, zero tangential velocity, and normal velocity and non-equilibrium populations from the inner cell. Unlike the former equilibrium-only RR/HRR outlet, this retains the inner viscous stress. The local equilibrium closure remains the fallback when there is no inner fluid cell and for convective backflow. Velocity inlets keep Zou–He. See Boundary conditions.
  • Collisions run by fixed blocks of cells: 1 and N threads give the same result bit for bit (results_are_bit_for_bit_the_same_on_one_and_many_threads).

Without Λ its bounce-back wall is off the halfway point by O(Δx²) (second order, with a larger constant), which shows on staircase cylinders as a few percent more drag on coarse grids. Choose it where the two-relaxation-time scheme does not run.

Why this operator. The cumulant collision (Geier et al. 2015) is defined on D3Q27’s 27 moments; D3Q19 lacks the corner directions its higher cumulants need. The projected regularisation (second order only) filters the ghost modes too, but drops the third moments; in our runs it failed where the recursive form ran (a 64² lid-driven cavity at Re 2000, τ⁺ = 0.510: projected unstable at step 786, recursive 20 000 steps; a periodic shear layer at lattice speed 0.2, τ⁺ = 0.505: projected unstable at step 603, recursive 5 000 steps), as Coreixas et al. (2017, 2019) found.

Hybrid recursive regularised

crates/lbm/src/hrr.rs has the details (J. Jacob, O. Malaspinas, P. Sagaut, J. Turbul. 19:1051–1076, 2018, doi:10.1080/14685248.2018.1540879). The recursive regularised collision rebuilds the populations from the non-equilibrium flux P; the hybrid one rebuilds them from

P̃ = σ P + (1 − σ)(−2 ρ c_s² τ̄ S^FD),

with S^FD the strain rate of second-order centred differences of the neighbouring cells’ velocity (one-sided first-order differences where a neighbour is not a fluid cell, 0 where both are missing) and τ̄ = 1/ω the cell’s own relaxation time (with Smagorinsky’s or Vreman’s eddy viscosity, or the wall model’s rate, when they act). The third-order part is rebuilt recursively from P̃. The centred difference’s error adds a hyperviscosity; to leading order in the paper’s continuous analysis (their eq. 47) ν_σ = (1 − σ)/(6σ) Δx² c_s² τ, so a shear wave of wavenumber k decays at ν k² [1 + ((1 − σ)/σ)(1 − sin(kΔx)/(kΔx))]. The exact linear analysis of the discrete scheme (tests/hrr.rs) keeps ν exactly as k → 0 with τ̄ = 1/ω; its k⁴ term is not eq. 47’s: the extra damping relative to regularized grows as τ̄ approaches ½ (about 7 times eq. 47’s at τ̄ = 0.55, σ near 1), is about half of it at τ̄ = 0.8, vanishes at τ̄ = 1 (the collision then keeps no non-equilibrium part) and changes sign above. Resolved waves (k Δx = 2π/64) stay within 1 % of eq. 47 at τ̄ 0.55 and 0.8.

Dynamic σ (sigma: "dynamic", their §4). With a turbulence model’s eddy viscosity ν_t, σ is set per cell and step so that the blend’s hyperviscous dissipation ν_σ |∇²u|² equals the subgrid one ν_t |∇u|² (eq. 48): ν_σ = L_VK² ν_t, L_VK = |∇u| / |∇²u| (eq. 49), and with eq. 47’s ν_σ = (1 − σ)/(6σ) Δx² c_s² τ, reading the continuous c_s² τ as the molecular ν,

σ = 1 / (1 + 6 L_VK² ν_t / (Δx² ν)) (eq. 50),

in [0, 1]: 1 where ν_t = 0 (then regularized bit for bit). Eq. 50 alone gives 0 where ∇²u = 0 and ν_t > 0, however small: unbounded as |∇²u| → 0, a regime the paper’s flows never reach but a near-uniform region does. As a guard (ours, not the paper’s) L_VK² = min(|∇u|²/|∇²u|², L_max²), L_max the box’s shortest extent in cells (the smallest cell count along x, y, z, periodic or not), ∇²u = 0 giving L_VK = L_max. The cap bounds that amplification without removing it: a ν_t between the CPU’s and the GPU’s round-off floors can still move σ by 6 L_max² ν_t / ν in a near-uniform region of a large box, where u is near-linear and σ barely matters; the GPU’s agreement is checked on the tested cases, not proven in general. |∇u|² = α_ij α_ij from the same differences as S^FD; ∇²u_j is the 7-point centred Laplacian of each component from the same neighbours, an axis whose either neighbour is missing contributing nothing. The subgrid viscosity is then not added to τ: the cell relaxes with the fluid’s own τ̄ and the model only sets σ (the paper’s implicit large-eddy simulation, case 4). ν_t is Vreman’s (the paper’s model), or with Smagorinsky’s model Hou’s, (1/ω − 1/ω₀)/3 from the implicit rate, computed without that difference’s cancellation and 0 where the flux |P| is below its round-off, 16 ε ρ (crates/lbm/src/turbulence.rs): L_VK² is unbounded where ∇²u vanishes, so a ν_t made of rounding would otherwise set σ there towards 0 (from an equilibrium start, σ is then 1 exactly in the first step). A wall cell under the wall model keeps σ = 1. eddy_viscosity_ratio reports the model’s ν_t, and with heat α_t = ν_t / Pr_t still reaches the scalar lattice. Eq. 47 is the continuous model’s estimate; near τ̄ = ½ the scheme’s own hyperviscosity is several times larger (above), so there dynamic σ dissipates more than the subgrid model it matches.

Trace relaxation (opt-in)

A fluid step with "collision": "hrr" takes "trace_bulk_one": true (a boolean, off by default; the setup refuses it with another collision). It relaxes one mode of the hybrid collision at its own rate: the non-equilibrium density (trace) mode, the Hermite component H = |c|² − 1 of the populations, at the bulk rate ω_b = 1 in every hybrid cell. The CPU and the GPU run it the same way. The step carries it, so a restored run goes on with it (a checkpoint of a run with the relaxation is refused by a model without it), and off the collision is bit for bit what it was (a test pins the 8-cell duct’s fields after 500 steps).

The populations lose 1.5 a w_q H_q with a = Σ f_q H_q − ρ u² − u·F, which leaves density and momentum alone, since H is orthogonal to both and Σ w H² = 2/3 on D3Q19; the u·F is the trace Guo’s forcing puts in the populations at this rate ((1 − ω_b/2) · 2 u·F), which stays. The bulk rate is a free parameter of the collision, independent of the shear rate (Dellar 2001, “Bulk and shear viscosities in lattice Boltzmann equations”, Phys. Rev. E 64:031203). The value 1 is derived, not fitted: the mode’s non-equilibrium part is multiplied by 1 − ω_b in each collision, which is stable for 0 < ω_b < 2 and changes sign every step for ω_b > 1, a cell-to-cell alternation of its own; so the fastest rate without the alternation is ω_b = 1, which removes the mode in one collision and leaves it no memory. A single trace rate gives the bulk viscosity ζ = (2/9)(1/ω_b − ½) in lattice units (d’Humières 2002, eq. 3.16), against the shear viscosity ν = (1/3)(1/ω − ½). The removal acts on the outgoing populations before the mass and momentum projection, on the CPU and on the device, and at every σ, σ = 1 included.

The rate of the trace, taken from the populations after the collision of a uniformly accelerated periodic box, is ρ u² + u·F to round-off (tests/trace_bulk.rs): the equilibrium’s ρ u² and the forcing’s share at ω_b = 1, with u the velocity of the half force.

Measured against theory, the bulk viscosity it sets. A plane density wave of amplitude 1e-4 and one wavelength of N cells in a periodic box (ν = 0.01 lattice) decays at Γ = (k²/2)(4ν/3 + ζ), k = 2π/N. Off, the hybrid collision has ζ = 2ν/3 and Γ = νk²; on, ζ = 1/9 and the wave decays six times faster at N = 32. Relative error of the measured rate (the bar, set before the run: at most (2π/N)²):

σNoffonbar
0.99320.079 %0.166 %3.86 %
0.99640.020 %0.042 %0.96 %
1320.000 %0.175 %3.86 %
1640.000 %0.045 %0.96 %

The observed order of the error in N is 1.97 with the relaxation on. Anything unsteady that carries density waves changes with it on, start-up transients included.

What it does, measured on its own (σ 0.99, hybrid collision). On a bed with no trace mode it changes nothing measurable: a periodic square duct at τ̄ − ½ = 6e-3, flow rate over the exact laminar series (Boussinesq), with the series summed at the cell centres (the midpoint rule’s bias of the cell-centre mean, 1.85, 0.82 and 0.46 % at 8, 12 and 16 cells) divided out:

cellsplain hybridwith the trace relaxation
80.927360.92750
120.962950.96304
160.975290.97537

and a slot between two plates driven at a held speed (6 and 8 cells, τ̄ − ½ = 1.8e-3 and 2.4e-3) has the same cell-to-cell alternation along the flow with it as without (4.1e-3 against 4.0e-3 in the wall row at 6 cells). The deficit of the hybrid collision in the duct is the blend’s own, not the trace’s: the relaxation is for flows where a treatment elsewhere in the collision leaves the density mode undamped and it grows into a cell-to-cell mode, not a correction of the plain collision.

Limits. The bulk rate fixes ζ against ν: at τ̄ − ½ = 3e-3 and ω_b = 1, ζ is about 110 ν. The dilatational mode, which carries sound, is damped two orders of magnitude harder than the shear. That suits steady and low-Mach flows (RANS, the incompressible limit), where the density mode carries noise. It does not suit aeroacoustics, compressible transients (waves, fronts, the dilatational dissipation are the physics there), or lattice Mach numbers above 0.1, where the setup already warns of the compressibility error of the lattice. Switching it on changes the answer of every hybrid flow it is on for; keep it off for those.

Multiple relaxation times

The populations are mapped to 19 orthogonal moments m = M f, each relaxed towards its equilibrium at its own rate, and mapped back (d’Humières et al. 2002, appendix A):

m* = m − S (m − m^eq) + (I − S/2) M F̂,   f* = M⁻¹ m*

with F̂ Guo’s force in the populations, w_q (3 (c − u) + 9 (c·u) c)·F. The moments are integer polynomials of the lattice velocity c (c² = |c|²): the density 1; the energy 19 c² − 30 and its square (21 c⁴ − 53 c² + 24)/2; the momentum c_a and the energy flux (5 c² − 9) c_a; the stresses 3 c_x² − c², c_y² − c_z², c_x c_y, c_y c_z, c_x c_z; the two quartic modes (3 c² − 5)(3 c_x² − c²), (3 c² − 5)(c_y² − c_z²); and the three cubic modes (c_y² − c_z²) c_x, (c_z² − c_x²) c_y, (c_x² − c_y²) c_z. They are orthogonal, so M⁻¹ is the transpose over each moment’s squared norm. Built from the polynomials, the map does not depend on the order of the lattice’s directions.

The equilibria are the second-order ones equivalent to the single-relaxation-time model: e = ρ (−11

  • 19 u²), ε = 3 ρ − 11/2 ρ u², q = −2/3 ρ u, the stresses ρ u_a u_b in the same combinations, the quartic modes −½ of the stresses’, the cubic ones 0, with u including half the force. The rates are Malaspinas & Sagaut’s (2014, appendix A, from d’Humières et al.’s linear stability analysis):
MomentsRate
energy1.19
energy square, quartic modes1.4
energy flux1.2
cubic modes1.98
the five stresses1/(3 ν + ½), per cell: 1/(3 (ν + ν_t) + ½) with Smagorinsky’s model, the wall model’s rate in its wall cells
density, momentumconserved: their equilibria are themselves

Where this differs from the papers: Malaspinas & Sagaut’s eq. 10 for the energy square’s equilibrium is printed as (11/2) ρ (3 − u²); FieldCraft uses d’Humières et al.’s single-relaxation-time-equivalent 3 ρ − 11/2 ρ u² (w_ε = 3, w_εj = −11/2), the choice the paper’s other equilibria (the quartic modes at −½) correspond to. The equilibria use j·j/ρ (the paper’s ρ u u); d’Humières et al. use j·j/ρ₀.

The stability bound

With these rates and equilibria the collision is linearly unstable in fluid at rest below a lattice viscosity ν Δt/Δx² of 1.1801 × 10⁻³ (τ⁺ = 0.50354), and solve.fluid refuses a step below it, naming the bound. The analysis is Lallemand & Luo’s (2000), the one d’Humières et al. chose the rates with: about a uniform state a plane wave of wavevector k advances by G(k) = diag(e^(−ik·c_q)) J, J the collision’s Jacobian at the equilibrium, and grows where the spectral radius of G(k) exceeds one. crates/lbm/tests/mrt_stability.rs runs it on mrt::collide itself.

Lattice viscosity (τ⁺)Largest growth per step, at rest
5 × 10⁻⁵ (0.50015)7.9 × 10⁻³, at k = π (0.20, 0.59, 0.59)
2 × 10⁻⁴ (0.5006)6.7 × 10⁻³
1 × 10⁻³ (0.503)1.0 × 10⁻³
1.1801 × 10⁻³ (0.50354) and abovenone; the last wave to settle is k = π (0.25, 0.42, 0.42)
  • A subgrid model does not lift the bound. Smagorinsky’s and Vreman’s eddy viscosities are zero where the strain rate is, so the growth starts wherever the flow is uniform. A periodic box at rest with Smagorinsky’s model (C 0.1) and a disturbance of 10⁻⁹ fills with isotropic grid-scale noise within 4000 steps and stays at a lattice speed of about 7 × 10⁻³ rms per component, with ⟨ν_t⟩/ν ≈ 8; at ν = 1.3 × 10⁻³ the same box decays.
  • The bound rises with the flow’s speed. About a uniform stream it is 1.2295 × 10⁻³ (τ⁺ 0.50369) at lattice Mach 0.1, 1.40 × 10⁻³ (0.50421) at 0.2 and 1.90 × 10⁻³ (0.50569) at 0.3, highest for a stream along (1, ½, ½). A step between the bound at rest and the one at Mach 0.1 is warned about. At Mach 0.1 nothing grows one per cent above the bound, over 45 sampled directions of the stream; past it slower waves grow at larger viscosities too: 2 × 10⁻⁶ per step at Mach 0.15 (up to ν ≈ 1.7 × 10⁻³), 3 × 10⁻⁵ at 0.2 (≈ 3 × 10⁻³), 2 × 10⁻⁴ at 0.3 (≈ 6 × 10⁻³). A single relaxation time has none of these at the same points.
  • Where it comes from. The stresses relax at a rate close to 2 while the quartic modes relax at 1.4; with the quartic modes at the stresses’ rate the state of rest is stable at ν = 5 × 10⁻⁵. The equilibria of the energy square do not matter at rest. This is a diagnosis: the rates are the published ones and are not changed.
  • The published bound. d’Humières et al. (appendix A) state “a maximum speed of 0.19 … and a viscosity ν > 2.54 × 10⁻³” for these rates with their optimised equilibria (w_ε = 0, w_εj = −475/63, w_xx = 0), and note that boundaries may lower the stability further. FieldCraft’s bound is the one of its own equilibria; it is not the paper’s number.
  • The other collisions close to τ⁺ = ½. None is linearly stable in a stream there. At ν = 5 × 10⁻⁵ and a lattice speed of 0.05 the regularised collision grows by at most 5 × 10⁻⁵ per step (stable at rest, and stable in the stream from ν = 10⁻³), the two-relaxation-time one with Λ = 3/16 by 1.7 × 10⁻² along (1, 1, 0) (stable at rest).

With halfway bounce-back the MRT wall lies half a cell out up to an error of order Δx² that depends on τ: the rates are fixed, and there is no Λ to put it exactly halfway. Its uniform pressure faces use non-equilibrium extrapolation, as for the other collisions.

The thermal lattice (#629)

With heat, the D3Q7 temperature lattice (flow.rs, lbm.wgsl) collides with two relaxation times whatever collision the flow uses: each axis pair’s antisymmetric part, which carries the heat flux, relaxes with τ_T = 4 α + ½ (that sets the diffusivity α in lattice units), the symmetric part and the rest population with τ_T⁺ = ½ + Λ_T/(τ_T − ½). With Λ_T fixed a steady temperature field does not depend on τ_T (d’Humières & Ginzburg 2009), and neither do the walls: the anti-bounce-back of a held temperature, the bounce-back of an adiabatic wall or a flux, and the interface links of conducting solids keep their rules, and the conjugate links still give the solid exactly the heat the fluid loses (conjugate.rs). With a single relaxation time, Λ_T = (τ_T − ½)², the walls moved with the time step: on the automatic time step’s τ_T ≈ 1.44 the de Vahl Davis cavity’s largest local Nusselt number was 7.5 % high and its smallest 11.8 % low on 32 cells.

Λ_T = 1/12 (setup::THERMAL_MAGIC). For a conducting field along a flat held wall (a harmonic temperature, T = Re e^{i k y − k x}, solved to steady state on the lattice in a standalone calculation of the scheme), the heat each wall link takes is fourth-order accurate at 1/12 — 8.1e-4, 5.0e-5 and 3.2e-6 of the flux on 8, 16 and 32 cells per wavelength — and second order at every other value (6.4e-3 on 16 cells at 1/24 and 1/8, 1.3e-2 at 1/6, 2.5e-2 at 1/4); with a flow along the wall the optimum moves to smaller values (1/24 at a cell Péclet number of 0.3). In the cavity the wall-flux error grows with Λ_T, and 1/12 puts it within 0.2 % of the reference on 64 cells (Verification).

Below τ_T = 0.79 (setup::thermal_magic, ½ + √Λ_T) the lattice keeps the single relaxation time (Λ_T = (τ_T − ½)², which is smaller there). A fixed Λ_T makes τ_T⁺ grow without bound as τ_T → ½ (a fluid of high Prandtl number, such as water, on a fine grid), and a von Neumann analysis of the D3Q7 lattice with its linear equilibrium finds that unstable from lattice speeds of 0.02–0.03 at τ_T 0.505–0.51 for any Λ_T below 1/4, where the single relaxation time holds 0.25. With τ_T⁺ ≤ τ_T the largest stable lattice speed is at least 0.25 at every τ_T, as with the single relaxation time (0.25 at 0.505, 0.36 at 0.7, 0.44 at 0.8, 0.46–0.47 from 1 to 3, against 0.25, 0.36, 0.45 and 0.50–0.54), well above the characteristic lattice speeds a run is allowed (Mach 0.3, 0.17). The single relaxation time’s wall error grows with its Λ_T, so below 0.79 it is smaller than at 1/12.

What it costs. A transient Fourier mode at rest decays 0.105 (k Δx)² faster than α k² (4.0e-3 on 32 cells per wavelength; the single relaxation time had −8e-4 at τ_T = 1 and −1.5e-2 at 1.5), and the conjugate array of insulating cylinders on 16, 32 and 64 cells (conjugate.rs), a first-order staircase interface, reads −5.7, −3.0 and −1.2 % against −3.9, −2.2 and −0.85 % at the single relaxation time’s τ_T = 1 (Λ_T = 1/4) and −12.4 and −4.7 % at τ_T = 0.6 (Λ_T = 0.01): its error now does not depend on the time step. The shader collides the same way (collide_thermal, the symmetric rate in therm.w).

Algorithm

Per fluid cell and time step (Flow::collide, blocks of cells in parallel):

  1. Read the 19 populations; ρ = Σ f, j = Σ f c. Under the wall model, rebuild a wall cell’s populations from the wall law first and take its relaxation rate (Large-eddy simulation).
  2. Refuse a density that is not a positive finite number (the run stops as unstable).
  3. The velocity with the half force and the force per volume (body acceleration, buoyancy, zone); a porous zone’s velocity from the exact root of its quadratic.
  4. Track the cell’s speed: the largest over the step is checked against the lattice-speed limit 0.5 after the collision.
  5. Collide:
    • regularized: rebuild and relax (regularized::rebuild), with Smagorinsky’s or Vreman’s rate per cell.
    • hrr: as regularized, the flux blended with the finite-difference strain rate of the neighbours’ velocities first (hrr::gradient, hrr::strain, regularized::rebuild); those velocities come from a pass over every fluid cell before the collision (Flow::gradient_velocities, steps 1–3 through the same cell_state). The same pass runs with Vreman’s model, whatever the collision: its eddy viscosity comes from the same gradient (vreman::eddy_viscosity) and sets the cell’s rate 1/(1/ω⁺ + 3 ν_t) below.
    • mrt: the stresses’ rate (the wall model’s, Smagorinsky’s from the cell’s flux, Vreman’s, or 1/τ⁺); map, relax with forcing, map back (mrt::collide).
    • trt: per cell ω⁺ (Smagorinsky’s from the flux, or Vreman’s, when a model is on) and ω⁻ from Λ; the rest population, then each opposite pair with its symmetric and antisymmetric forcing.
  6. With heat, keep the cell’s velocity for the temperature equilibrium and its eddy viscosity for the turbulent diffusivity; then collide the D3Q7 lattice with τ_T and τ_T⁺.

Output

solve.fluid reports collision (trt, regularized, mrt or hrr), tau (τ⁺), tau_minus (τ⁻ of the two-relaxation-time scheme), magic (Λ), with heat tau_thermal (τ_T), and with a turbulence model eddy_viscosity_ratio.

Worked example

The bundled flow-past sample (Lattice Boltzmann flow) solved three times on the CPU, once with each collision, everything else equal: the sample’s step Flow (two relaxation times) and two copies of it.

Modelflow-past: air at 25 mm/s past the L-bracket, 184 320 cells of 2.5 mm, 16 s, automatic Δt = 0.005 s (3200 steps), τ⁺ = 0.536
StepsFlow (trt, Λ = 3/16), FlowRR (regularized), FlowMRT (mrt)
Unitsmm, t, s, N, MPa
[
  {"command": "file.sample", "params": {"name": "flow-past"}},
  {"command": "model.step.create", "params": {"name": "FlowRR", "procedure": {"type": "fluid",
    "domain": "Wind", "end_time": 16, "frames": 10, "collision": "regularized"}}},
  {"command": "model.step.create", "params": {"name": "FlowMRT", "procedure": {"type": "fluid",
    "domain": "Wind", "end_time": 16, "frames": 10, "collision": "mrt"}}},
  {"command": "solve.fluid", "params": {"step": "Flow", "backend": "cpu"}},
  {"command": "solve.fluid", "params": {"step": "FlowRR", "backend": "cpu"}},
  {"command": "solve.fluid", "params": {"step": "FlowMRT", "backend": "cpu"}},
  {"command": "results.streamlines", "params": {"step": "FlowRR", "show": false}},
  {"command": "results.slice", "params": {"step": "FlowRR", "field": "velocity", "axis": "y", "position": "auto"}}
]

From the solve.fluid replies (Apple M4 Max, CPU, 14 cores). Drag is the sum of the x components of the bracket faces’ forces. Run times are the fastest of several runs each; the machine was shared with other jobs, and single runs took up to 24 s.

Quantitytrtregularizedmrt
tau, tau_minus, magic0.536, 5.708, 0.18750.536, 5.708, 0.1875—
Drag, final1.133 × 10⁻⁶ N1.115 × 10⁻⁶ N (−1.6 %)—
Drag, mean (last quarter)1.737 × 10⁻⁶ N1.845 × 10⁻⁶ N (+6.2 %)—
mass.relative_change−7.67 × 10⁻⁴−1.89 × 10⁻³—
max_speed41.69 mm/s42.30 mm/s—
final_max_speed39.29 mm/s39.94 mm/s—
Density spread warning1.2 %1.9 %—
Wall-clock time6.9 s8.9 s (+29 %)—
Outcome3200 steps3200 stepsrefused: “unstable: the flow went unstable at time step 149: the lattice speed reached 0.529 (limit 0.5) …”

What to look at. At τ⁺ = 0.536 both the two-relaxation-time and the regularised collision run, and the regularised wake on the slice is the same as the two-relaxation-time one (Lattice Boltzmann flow). The drags differ by less than the drag’s own oscillation at 16 s (1.0 × 10⁻⁶ N RMS, Steady state and averaging), so this grid does not separate the two operators’ wall accuracy; the regularised collision cost 29 % more time, inside the 15–35 % of Parameters, and kept mass less well. The step still reports Λ = 0.1875 for the regularised run, where it has no effect. The multiple-relaxation-time step went unstable at step 149 (0.745 s). In the channel of Boundary conditions (velocity inlet, pressure outlet) the same collision ran at its automatic τ⁺ = 0.65 and went unstable at step 216 at τ⁺ = 0.5375 (Δt/4), while a periodic channel driven by a body force ran 2 s at τ⁺ = 0.5375: with open boundaries this operator needed a larger τ⁺ than the other two in these runs.

Verification

Laminar flows, two relaxation times and regularised

Analytic and published references, cargo test -p fieldcraft-lbm (heavy ones with --include-ignored):

CaseReferenceTwo relaxation timesRegularised
Plane Poiseuille, body force, 8/16/32 cells, τ = 1Parabola (theory)Exact (round-off)5.2e-3, 1.3e-3, 3.3e-4 of the peak: order 2.00
The same, τ = 0.6ParabolaExact1.1e-2, 2.9e-3, 7.2e-4: order 2.00
Couette, 16 cellsLinear, wall shear μU/H (theory)1e-10, shear to 1e-62.3e-13, shear to 1e-6
Taylor–Green decay, 16/32/64 cellsexp(−2νt) (theory)1.6e-2, 4.0e-3, 9.9e-4: order 2.01.7e-2, 4.3e-3, 1.1e-3: order 2.0; mass to 1e-13
Sphere array, bounce-back, 1500 stepsMass, force balance—Mass drift 6.7e-13; wall force = driving force to 1e-3
Parabolic inlet, pressure outlet, 16 cellsPoiseuille; inflow = outflowProfile 3.0e-4, gradient +0.07 %, mass steady to 1e-12Profile 2.3e-3, gradient +0.49 %, mass steady to 1e-12; 3.2e-2 next to the outlet
Porous plate (Darcy–Forchheimer, loss coefficient)The lawWithin 0.5 %Within 0.5 %
Fan against a plateOperating pointFlow 0.5 %, rise 1 %, mass 1e-12The same
de Vahl Davis cavity, Ra 10³, 16 / 32 cellsNu 1.118 (benchmark)1.1161 / 1.11721.1173 / 1.1178
de Vahl Davis cavity, Ra 10⁴, 48 cellsNu 2.2432.24492.2426
Lid-driven cavity, Re 100, 64 cellsGhia et al.: u/U −0.2109 at y 0.4531 (benchmark)−0.2136 at 0.4585−0.2139 at 0.4586
Schäfer–Turek 2D-1, Re 20, D/Δx 10c_D 5.57–5.59, c_L 0.0104–0.0110 (benchmark)5.989, 0.01206.303, 0.0180
The same, D/Δx 205.773 (+3.5 %), 0.01075.890 (+5.5 %), 0.0132
Schäfer–Turek 2D-2, Re 100, D/Δx 20c_D,max 3.22–3.24, c_L,max 0.99–1.01, St 0.295–0.3053.447, 1.102, 0.29873.496, 1.081, 0.2975

The two-relaxation-time results did not change when the regularised collision was added.

Multiple relaxation times

cargo test -p fieldcraft-lbm --test mrt -- --nocapture, and the unit tests of mrt.rs:

CaseReferenceMeasuredToleranceTest
MomentsOrthogonal; momentum rows = cExactexactthe_moments_are_orthogonal
Equilibrium populationsLeft unchanged by the collision1e-151e-15an_equilibrium_is_left_as_it_is
A pure shearRelaxes at the viscous rate1e-151e-15a_shear_relaxes_at_the_viscous_rate
Plane Poiseuille, 8/16/32 cells, τ = 0.8Parabola (theory)Order 2finest < 2 × 10⁻³,order − 2
Plane Poiseuille, 16 cells, τ = 1Parabola3.0e-3 of the peak4 × 10⁻³ (GPU suite)plane_poiseuille_matches_the_analytic_profile_and_the_cpu (fieldcraft-lbm-gpu)
Couette, 16 cells, lattice speed 0.1Linear profileCompressibility error2 × 10⁻³ of the wall speedcouette_flow_is_linear
Taylor–Green, 16/32/64 cellsexp(−2νt)2.2e-2, 5.5e-3, 1.4e-3 (orders 2.015, 2.004)finest < 2 × 10⁻³, order > 1.8taylor_green_decays_at_the_viscous_rate_to_second_order
Linear stability about rest and a streamVon Neumann analysis of mrt::collidegrows 6.1e-5 per step at 0.99 of the bound, decays 6.1e-5 at 1.01; no wave of a 32³ box grows above it±1 % of MIN_VISCOSITYthe_state_of_rest_is_unstable_below_the_bound_and_stable_above_it, no_wave_grows_above_the_bound_and_the_bound_rises_with_the_stream (mrt_stability.rs)
A step below the boundrefused, naming the boundrefused at ν 5e-5 and at 0.99 of the bound; warned up to the Mach 0.1 boundexactbelow_its_stability_bound_the_collision_is_refused
Couette with Smagorinsky’s modelν_t = (C Δx)² U/h, wall shear ρ (ν + ν_t) U/hshear 2 × 10⁻³, ν_t/ν 2 × 10⁻²smagorinsky_couette_flow_takes_the_closed_form_eddy_viscosity
DeterminismOne thread against severalBit for bitexactresults_are_bit_for_bit_the_same_on_one_and_many_threads

The wall-modelled channel against Lee & Moser and Dean runs with this collision (Verification and validation, “Wall-modelled channel”).

Hybrid recursive regularised

cargo test -p fieldcraft-lbm --test hrr -- --nocapture (the full shear-wave sweep: cargo test --release -p fieldcraft-lbm --test hrr -- --include-ignored --nocapture), and the unit tests of hrr.rs:

CaseReferenceMeasuredToleranceTest
σ = 1regularized, bit for bitEvery density, velocity and wall force equal after 200 steps of a forced channel with a ball, inlet, outlet and slip face, with and without Smagorinsky’s modelexactsigma_one_is_the_regularised_collision_bit_for_bit
Plane Poiseuille, 8/16/32 cells, τ = 0.8, σ 0.99Parabola (theory)3.5e-3, 8.6e-4, 2.2e-4 (orders 2.000, 2.000)finest < 2 × 10⁻³,order − 2
Couette, 16 cells, σ 0.9Linear profile6e-14 of the wall speed2 × 10⁻³couette_flow_is_linear
Couette with Smagorinsky’s model, σ 0.9ν_t = (C Δx)² U/h, wall shear ρ (ν + ν_t) U/hshear 3e-6, ν_t/ν 8e-4 relativeshear 2 × 10⁻³, ν_t/ν 2 × 10⁻²smagorinsky_couette_flow_takes_the_closed_form_eddy_viscosity
Taylor–Green, 16/32/64 cells, σ 0.99exp(−2νt)1.7e-2, 4.3e-3, 1.1e-3 (orders 2.009, 2.004)finest < 2 × 10⁻³, order > 1.8taylor_green_decays_at_the_viscous_rate_to_second_order
Shear wave, N = 64, 16, 8 cells (k Δx = 2π/N), τ̄ 0.8 and 0.55, σ 0.5, 0.9, 0.97, 0.985Exact rate −ln λ of the scheme’s linear map (derived in the test)Within 2.5e-7 relative (1e-11 for N ≥ 16)1 %shear_waves_decay_at_the_exact_rate_and_at_eq_47_when_resolved (heavy; N = 16, τ̄ 0.8, σ 0.9 in the trunk gate)
The same, N = 64Eq. 47 of Jacob et al.Within 6.2e-3 (τ̄ 0.55, σ 0.5), 1e-3 or less otherwise1 %the same
DeterminismOne thread against severalBit for bitexactresults_are_bit_for_bit_the_same_on_one_and_many_threads
Refusalsσ 0, below 0, above 1, not finite: refused by name; "dynamic" without turbulence: refused, naming itbad_sigmas_are_refused_and_dynamic_needs_a_subgrid_model
Dynamic σ, closed formu_x = sin(ky), k = 2π/16: σ = 1/(1 + 6 L_VK² ν_t/ν) with the discrete α_yx = cos(ky) sin k, ∇²u_x = 2 sin(ky)(cos k − 1); the limits ν_t = 0 → 1, ∇²u = 0 → L_VK = L_maxwithin 1e-141e-14hrr::tests::dynamic_sigma_matches_the_closed_form_of_a_sine
Dynamic σ, near-uniform forced start16³ at speed 0.05 with a 1e-6 perturbation, a body force, Smagorinsky’s model, first step: σ ≥ 1/(1 + 6 L_max² ν_t/ν), L_max 16σ min 0.99999988 against the bound 0.99999988 (ν_t/ν 7.7e-11 from the force’s flux); without the cap 2.6e-10exact bounda_near_uniform_forced_start_keeps_dynamic_sigma_above_the_cap_s_bound (tests/vreman.rs)
Dynamic σ with no eddy viscosityCouette and Poiseuille with Vreman’s model: σ = 1 everywhere, regularized bit for bitequal; σ min and mean exactly 1exactdynamic_sigma_without_eddy_viscosity_is_the_regularised_collision_bit_for_bit (tests/vreman.rs)
Dynamic σ from an equilibrium startTaylor–Green 16³ with Smagorinsky’s model, first step: the flux is round-off only, so ν_t = 0 and σ = 1σ min and mean exactly 1, ν_t/ν 0 (1 − 1.7e-12 and 1.7e-14 without the floor)exactan_equilibrium_start_gives_dynamic_sigma_one_exactly (tests/vreman.rs)
Dynamic σ, Taylor–Green 16³, Re 50σ in [0, 1], below 1Vreman’s: σ min 0.030, mean 0.421; Smagorinsky’s: 0.024, 0.443—dynamic_sigma_acts_in_the_taylor_green_vortex
Dynamic σ, determinismOne thread against several, Vreman’s and Smagorinsky’sBit for bit, σ statistics tooexactdynamic_sigma_is_bit_for_bit_the_same_on_one_and_many_threads

The thermal lattice

Errors against de Vahl Davis (1983): Nu 1.118, Nu_max 1.505, Nu_min 0.692 at Ra 10³; 4.519, 7.717, 0.729 at 10⁵. Nu_max and Nu_min as solve.probe reads them (the one-sided difference through the wall, the extreme on the parabola through three samples; Nu_min at the top cell’s centre, half a cell below the corner where the reference is) and from each wall link’s own heat (“links”). Run to 1.5 H²/α with cargo test --release -p fieldcraft-lbm --test thermal -- --ignored local_wall_heat_flux_with_two_relaxation_times --nocapture (the 1/8 and 3/16 rows from the same harness with those values).

RacellsΛ_Tτ_TNuNu_maxNu_minNu_max (links)Nu_min (links)
10³32²(τ_T − ½)², before0.6+0.02 %−0.19 %+0.71 %+0.45 %+0.28 %
10³32²(τ_T − ½)², before0.8+0.01 %+0.46 %−0.40 %+0.24 %−0.39 %
10³32²(τ_T − ½)², before1.0−0.00 %+1.78 %−2.66 %+1.12 %−2.26 %
10³32²(τ_T − ½)², before1.5−0.07 %+8.63 %−13.51 %+4.61 %−9.66 %
10³32²(τ_T − ½)², before1.439 (automatic)−0.06 %+7.54 %−11.79 %+4.15 %−8.61 %
10³32²1/240.6 / 1.5+0.02 / −0.07 %+0.06 / +0.23 %+0.28 / +0.26 %+0.35 / +0.52 %+0.12 / +0.08 %
10³32²1/120.6 / 1.5+0.02 / −0.07 %+0.40 / +0.56 %−0.31 / −0.32 %+0.24 / +0.41 %−0.31 / −0.32 %
10³32²1/80.6 / 1.5+0.02 / −0.07 %+0.73 / +0.89 %−0.89 / −0.90 %+0.34 / +0.55 %−0.81 / −0.82 %
10³32²1/60.6 / 1.5+0.02 / −0.07 %+1.06 / +1.22 %−1.48 / −1.49 %+0.59 / +0.80 %−1.30 / −1.31 %
10³32²3/160.6 / 1.5+0.02 / −0.07 %+1.24 / +1.39 %−1.77 / −1.78 %
10³32²1/40.6 / 1.5+0.02 / −0.07 %+1.74 / +1.88 %−2.66 / −2.67 %+1.07 / +1.28 %−2.26 / −2.27 %
10³32²shipped0.8+0.01 %+0.41 %−0.31 %+0.26 %−0.31 %
10³32²shipped1.0−0.00 %+0.44 %−0.31 %+0.28 %−0.31 %
10³32²shipped1.5−0.07 %+0.56 %−0.32 %+0.41 %−0.32 %
10³32²shipped1.439 (automatic)−0.06 %+0.54 %−0.31 %+0.39 %−0.32 %
10³64²(τ_T − ½)², before0.8−0.01 %+0.17 %−0.17 %+0.13 %−0.18 %
10³64²(τ_T − ½)², before1.5−0.03 %+2.09 %−3.42 %+1.62 %−3.28 %
10³64²1/241.5−0.03 %+0.11 %−0.01 %+0.20 %−0.01 %
10³64²1/121.5−0.03 %+0.19 %−0.15 %+0.17 %−0.16 %
10³64²1/61.5−0.03 %+0.37 %−0.44 %+0.12 %−0.45 %
10³64²1/41.5−0.03 %+0.54 %−0.73 %+0.27 %−0.75 %
10³64²shipped0.8−0.01 %+0.16 %−0.15 %+0.13 %−0.16 %
10⁵64²(τ_T − ½)², before0.8+0.16 %+2.26 %−11.06 %+0.87 %−10.96 %
10⁵64²1/240.8+0.16 %+0.45 %−4.03 %+1.26 %−6.66 %
10⁵64²1/12 (shipped)0.8+0.16 %+2.01 %−10.09 %+0.92 %−10.12 %
10⁵64²1/60.8+0.16 %+5.22 %−22.19 %+0.27 %−20.53 %
10⁵64²1/40.8+0.16 %+8.48 %−34.22 %−0.35 %−30.76 %

“Shipped” is Λ_T = 1/12 above τ_T = 0.79 and the single relaxation time below. At a fixed Λ_T the rows move with τ_T by at most 0.16 points on 32 cells and 0.04 on 64 (the single relaxation time: 14 and 3.4): that remainder is the linear equilibrium’s numerical diffusion along the flow, 4 u² of the diffusivity in lattice units, which grows with the time step’s lattice speed (0.03 at τ_T 1.5 on 32 cells). At Ra 10⁵ on 64 cells the top corner is under-resolved and smaller Λ_T reads closer there; 1/12 is the value that is exact for conduction and keeps the stability of the single relaxation time, and the cavity cases of the oracle, run at τ_T 0.62–0.8, stay within their tolerances (Oracle results).

Stability

The stream limit of two relaxation times (#1063). About a uniform stream the collision is linearly stable up to a lattice speed proportional to τ⁺ − ½: |u| ≤ C (τ⁺ − ½), a cell Reynolds number |u| Δx/ν of 3 C. With Λ = 3/16, C = 5.6 is the smallest onset found over the stream’s direction (setup::TRT_STREAM_LIMIT; cell Reynolds number 16.8). The onset is 5.606, a long wave beside the staggered mode k = π e_y, for a stream along (1, 0.437, 0.01); it is rounded down. Between 5.6 and 6.18 the growth is at most 2e-5 per step. It rests on a search over directions, so it is sampled, not proved, and not published. Along (1, 1, 0) C is 6.18 (cell Reynolds number 18.5), on a standing wave normal to the stream, k = π (0.336, −0.336, 0.673); 5.61–6.9 over 91 sampled oblique directions; along a lattice axis 24.5, and 9.3 already 9.5° off it. The (1, 1, 0) law holds from τ⁺ = 0.5001 to 0.53; above, that limit flattens (0.26 at 0.55, 0.42 from 0.7). As τ⁺ → ½ at a fixed Λ the symmetric modes relax by −(1 − 4(τ⁺ − ½)) and the antisymmetric ones by 1 − (τ⁺ − ½)/Λ, neither damped in the limit, and the stream couples them at a rate proportional to its speed. Past its (1, 1, 0) limit a diagonal stream grows by about 0.33 (|u| − 6.18 (τ⁺ − ½)) per step.

τ⁺largest growth-free lattice speed, smallest oblique onsetalong an axis
0.50010.00060.0024
0.505 (the floor)0.0280.12
0.50810.045 (Mach 0.08; the automatic time step’s 0.05 is past it)above Mach 0.3
0.5160.090 (Mach 0.16)above Mach 0.3
0.5280.157 (Mach 0.27)above Mach 0.3

A periodic 32³ box through the solver, 10⁻⁹ disturbance: at τ⁺ = 0.505 and 0.05 along (1, 1, 0) it grows by 6.0e-3 per step (analysis 6.2e-3) and stops as unstable at step 3831; along x, or at 0.02, it decays. A subgrid model does not lift it (its eddy viscosity is zero in a uniform stream): with Smagorinsky’s model (C 0.1) the same box saturates with a disturbance of 0.16 of the stream at τ⁺ = 0.505 and 0.5 of it at 0.5001. The regularised and hybrid collisions decay in the same boxes; at τ⁺ = 0.5001 they grow only near Mach 0.3 (2.9e-3 and 1.2e-3 per step at lattice speed 0.17). No fixed Λ removes the limit (the smallest C over four sampled directions at τ⁺ = 0.505: 4.5 at 1/24, 5.0 at 1/12, 6.7 at 1/8, 6.0 at 3/16, 5.3 at 1/4, 3.7 at 1/2; the 3/16 figures there are the earlier four-direction search, not the 5.6 onset); the limit is measured at Λ = 3/16 only, and the solve says so at any other Λ; a single relaxation time (Λ = (τ⁺ − ½)²) holds to 0.154 there, but moves the bounce-back wall. The cell Reynolds number does not depend on the time step: a finer spacing or another collision is what changes it. The solve warns when the characteristic lattice velocity is past the limit; the local speed around a body is higher, which is why the runs below fail from 2.8 (τ⁺ − ½) of the inlet’s. The analysis is the von Neumann one of Sterling & Chen (1996) and Wissocq, Sagaut & Boussuge (2019); crates/lbm/tests/trt_stability.rs holds the (1, 1, 0) limit and the warning. Wissocq & Sagaut (2022, Sec. 7.8) analyse the scheme at τ/Δt = 10⁻³ for a stream and waves along x only, where it is stable.

The flow-past sample (#557): the bracket in a 240 × 120 × 100 mm box, air, the inlet raised, initial velocity 25 mm/s, 16 s, automatic time step, on the GPU (Apple M4 Max); the CPU gives the same outcome where run (75 and 90 mm/s at 2.5 mm: the two-relaxation-time scheme unstable at steps 951 and 786, the regularised running 16 s). Re on the 50 mm upright, ν = 15 mm²/s.

inlet (mm/s)Respacing (mm)τ⁺two relaxation timesregularised
25832.50.536runsruns
401332.50.5225runsruns
501672.50.518unstable, step 2520runs
602002.50.515unstable, step 1332runs
752502.50.512unstable, step 911runs
903002.50.510unstable, step 742runs
1003332.50.509unstable, step 684runs
1103672.50.508runs
1204002.50.5075unstable, step 612unstable, step 2032
1505002.50.506unstable, step 438unstable, step 684
903002.00.5125unstable, step 968runs
903001.250.520unstable, step 4672runs
1806001.250.510unstable, step 750runs, sheds

On the gallery grid (2.5 mm) the highest Reynolds number that runs goes from 133 to 367 and the lowest τ⁺ from 0.5225 to 0.508. At 1.25 mm the wake sheds at Re 600: the cross-stream velocity 50 mm behind the bracket swings by ±150 mm/s at 1.07 Hz, a Strouhal number of 0.30 on the upright’s height. At 2.5 mm, 100–110 mm/s, it wavers by ±9–13 mm/s without settling into one frequency. Beyond τ⁺ ≈ 0.508 the inlet and the outlet still reflect the start-up’s pressure waves.

The heat sink of the electronics-cooling examples (#587: the six-fin sink held at 80 °C in a duct, 20 °C air, 1 mm cells, 4 s, automatic time step; GPU, the regularised 150 mm/s run also on the CPU with the same heat):

inlet (mm/s)τ⁺two relaxation timesregularised
1000.52254.56 W, 13.2 K/W4.45 W, 13.5 K/W
1500.515unstable, step 7046.08 W, 9.9 K/W
2000.5116.89 W, 8.7 K/W
2500.5096.89 W, 8.7 K/W
3000.5075unstable, step 303unstable, step 1023

Small cases in the test suite: a 48² lid-driven cavity at Re 1500 (τ⁺ 0.5096): two relaxation times unstable at step 767, regularised runs (a_lid_driven_cavity_at_tau_0_51_…); a cylinder of ten cells in the Schäfer–Turek channel at Re 200 (τ⁺ 0.510): unstable at step 1324, regularised runs 6000 steps (heavy).

Cost

two relaxation timesregularised
CPU, one thread, flow-past sample (million updates per CPU second)13.89.2 (−33 %)
GPU M4 Max, in place, periodic 128³ (million updates per second)1160–1250920–1030 (−20 %)
GPU M4 Max, in place, sphere 128³945–955810–820 (−14 %)

The CPU figure is CPU time (the build machine was shared, so wall-clock throughput was not repeatable); the GPU figures are the range of three runs of cargo test --release -p fieldcraft-lbm-gpu --test throughput -- --ignored --nocapture.

CPU and GPU

cargo test -p fieldcraft-lbm-gpu --test verification runs every case with every collision and both streaming layouts. On an Apple M4 Max (Metal), regularised velocity fields within 5e-7–7.4e-6 of the largest speed, densities within 2.6e-7, wall shear within 1.9e-5 of itself, heats within 2.1e-6, mass drift 0: inside the backend’s stated tolerances (2e-5, 1e-6, 5e-5, 1e-4; GPU backend).

The hybrid collision on the GPU (NVIDIA GB10, Vulkan), against the CPU from the same initial state, both layouts: σ 0.9 in a forced channel (Re_τ 30, 6 cells per half-height, perturbed, 150 steps) and in a periodic box with a ball (24³, 200 steps), velocity within 7.9e-7 of the largest speed, density within 1.2e-7; with Smagorinsky’s model (channel at Re_τ 180) 4.4e-6, 1.4e-7, ν_t/ν within 1.1e-4 of itself; with Van Driest’s damping and with the wall-function bounce 4.4e-6, wall drag 4.0e-6 (tolerances 1e-4, 1e-5, 1e-3, drag 1e-3: the_hybrid_collision_follows_the_cpu, the_hybrid_collision_with_wall_damping_and_the_wall_function_bounce_follows_the_cpu). σ 1 is the GPU’s regularised collision bit for bit (sigma_one_is_the_regularised_collision_on_the_gpu). The shear wave of the gate (N 16, τ̄ 0.8, σ 0.9) decays on the GPU at 1.547614e-2 per step against the exact 1.547615e-2 (−4.2e-7; tolerance 1e-3: a_shear_wave_decays_at_the_exact_rate_on_the_gpu).

Limitations

  • D3Q19 only: no cumulant collision (it needs D3Q27).
  • Two relaxation times are linearly unstable past a cell Reynolds number of 16.8 where the flow is oblique to the grid, at the smallest oblique onset found (Stability); the solve warns by the characteristic velocity at Λ = 3/16 only, and says the limit is not established at any other Λ.
  • The regularised collision’s walls are less accurate than the two-relaxation-time scheme’s. Its local fallback at blocked pressure faces and convective backflow still discards stress.
  • Below τ⁺ ≈ 0.508 even the regularised collision went unstable on a coarse bluff-body grid: the inlet and outlet reflect pressure waves. There are no absorbing layers.
  • MRT’s rates are fixed (no Λ): its wall is second-order accurate with a τ-dependent constant.
  • MRT is linearly unstable at rest below τ⁺ = 0.50354 and is refused there (the stability bound); a subgrid model does not change that.
  • MRT went unstable with a velocity inlet and a pressure outlet at τ⁺ ≈ 0.54 (the flow-past sample and a channel, Worked example), where the other two collisions ran.
  • The thermal lattice’s linear equilibrium diffuses along the flow by 4 u² of the diffusivity.

Implementation

FileContents
crates/lbm/src/flow.rsFlow::collide: the two-relaxation-time collision, the dispatch to the other operators, Guo forcing, velocity_force; collide_thermal; hold_equilibrium.
crates/lbm/src/regularized.rscollide: the recursive regularised collision with Guo forcing.
crates/lbm/src/mrt.rsM, NORM, RATES, equilibrium, collide.
crates/lbm/src/turbulence.rsflux, omega: each cell’s rate under Smagorinsky’s model.
crates/lbm/src/setup.rsDEFAULT_MAGIC, THERMAL_MAGIC, thermal_magic, REGULARIZED_TAU_LIMIT, the warnings.
crates/lbm-gpu/src/lbm.wgslcollide_regularized (with HRR the blend, DYNAMIC its σ), collide_mrt (override constants REGULARIZED, MRT), gradient_velocity and fd_gradient (the finite differences), collide_thermal.

References

  • I. Ginzburg, F. Verhaeghe, D. d’Humières. Two-relaxation-time lattice Boltzmann scheme: about parametrization, velocity, pressure and mixed boundary conditions. Commun. Comput. Phys. 3(2):427–478, 2008. doi:10.4208/cicp.2008.v3.p427
  • G. Wissocq, P. Sagaut. Hydrodynamic limits and numerical errors of isothermal lattice Boltzmann schemes. J. Comput. Phys., 2022, article 110858. doi:10.1016/j.jcp.2021.110858
  • J. Latt, B. Chopard. Lattice Boltzmann method with regularized pre-collision distribution functions. Math. Comput. Simul. 72:165–168, 2006. doi:10.1016/j.matcom.2006.05.017
  • C. Coreixas, G. Wissocq, G. Puigt, J.-F. Boussuge, P. Sagaut. Recursive regularization step for high-order lattice Boltzmann methods. Phys. Rev. E 96:033306, 2017. doi:10.1103/PhysRevE.96.033306
  • C. Coreixas, B. Chopard, J. Latt. Comprehensive comparison of collision models in the lattice Boltzmann framework: Theoretical investigations. Phys. Rev. E 100:033305, 2019. doi:10.1103/PhysRevE.100.033305
  • D. d’Humières, I. Ginzburg, M. Krafczyk, P. Lallemand, L.-S. Luo. Multiple-relaxation-time lattice Boltzmann models in three dimensions. Phil. Trans. R. Soc. Lond. A 360:437–451, 2002. doi:10.1098/rsta.2001.0955
  • P. Lallemand, L.-S. Luo. Theory of the lattice Boltzmann method: dispersion, dissipation, isotropy, Galilean invariance, and stability. Phys. Rev. E 61:6546–6562, 2000. doi:10.1103/PhysRevE.61.6546
  • O. Malaspinas, P. Sagaut. Wall model for large-eddy simulation based on the lattice Boltzmann method. J. Comput. Phys. 275:25–40, 2014. doi:10.1016/j.jcp.2014.06.020
  • Z. Guo, C. Zheng, B. Shi. Discrete lattice effects on the forcing term in the lattice Boltzmann method. Phys. Rev. E 65:046308, 2002. doi:10.1103/PhysRevE.65.046308
  • M. Geier, M. Schönherr, A. Pasquali, M. Krafczyk. The cumulant lattice Boltzmann equation in three dimensions: Theory and validation. Comput. Math. Appl. 70:507–547, 2015. doi:10.1016/j.camwa.2015.05.001
  • T. Krüger et al. The Lattice Boltzmann Method: Principles and Practice. Springer, 2017. doi:10.1007/978-3-319-44649-3
  • Q. Zou, X. He. On pressure and velocity boundary conditions for the lattice Boltzmann BGK model. Phys. Fluids 9:1591–1598, 1997. doi:10.1063/1.869307
  • M. Schäfer, S. Turek. Benchmark computations of laminar flow around a cylinder. NNFM 52:547–566, 1996. doi:10.1007/978-3-322-89849-4_39
  • U. Ghia, K. N. Ghia, C. T. Shin. High-Re solutions for incompressible flow using the Navier–Stokes equations and a multigrid method. J. Comput. Phys. 48:387–411, 1982. doi:10.1016/0021-9991(82)90058-4
  • D. d’Humières, I. Ginzburg. Viscosity independent numerical errors for Lattice Boltzmann models: From recurrence equations to “magic” collision numbers. Comput. Math. Appl. 58:823–840, 2009. doi:10.1016/j.camwa.2009.02.008
  • I. Ginzburg. Equilibrium-type and link-type lattice Boltzmann models for generic advection and anisotropic-dispersion equation. Adv. Water Resour. 28:1171–1195, 2005. doi:10.1016/j.advwatres.2005.03.004
  • G. de Vahl Davis. Natural convection of air in a square cavity: a bench mark numerical solution. Int. J. Numer. Methods Fluids 3:249–264, 1983. doi:10.1002/fld.1650030305

No code of any lattice Boltzmann package was read for this implementation.

Fluid boundary conditions

Each of the six faces of a fluid domain’s box carries a condition: a no-slip wall, a moving or slip wall, a velocity inlet, a pressure outlet, or one of a periodic pair. Obstacle faces are no-slip walls, at rest or moving tangentially. Walls are halfway bounce-back, or, on obstacles and when the step asks for it, interpolated bounce-back where the surface crosses each link; velocity inlets use Zou–He (corrected under TRT), with a convective outflow for outlets that a wake reaches and a characteristic, partially non-reflecting outflow for outlets that pressure waves reach, and the force the fluid exerts on every wall is measured by momentum exchange.

Commandsmodel.fluid_domain.create (faces, surfaces), model.fluid_domain.edit, model.fluid_domain.boundary
Step procedure"fluid"
Solvercrates/lbm (CPU, f64); crates/lbm-gpu (f32), every condition, interpolated walls included, except the characteristic outflow (CPU only)
MethodHalfway bounce-back with Ladd’s moving-wall term (Ladd 1994); interpolated bounce-back at obstacles (Bouzidi, Firdaouss & Lallemand 2001); Zou & He (1997) with Hecht & Harting’s D3Q19 transverse correction; convective outflow (Orlanski 1976); characteristic outflow (Poinsot & Lele 1992; Rudy & Strikwerda 1980 for σ; Selle, Nicoud & Poinsot 2004 for its reflection; Guo, Zheng & Shi 2002); momentum exchange (Ladd 1994; Mei et al. 2002)
Verified bycrates/lbm/tests/verification.rs, outlets.rs, characteristic.rs, interpolated.rs, interpolated_couette.rs; crates/lbm-gpu/tests/verification.rs; oracle case characteristic-outlet-reflection

Synopsis

{"command": "model.fluid_domain.boundary", "params": {"domain": "Flow", "at": "x_min",
  "condition": {"type": "velocity", "velocity": [0.3, 0, 0], "profile": "parabolic"}}}
{"command": "model.fluid_domain.boundary", "params": {"domain": "Flow", "at": "x_max",
  "condition": {"type": "pressure", "pressure": 0, "outflow": "convective"}}}
{"command": "model.fluid_domain.boundary", "params": {"domain": "Flow", "at": "x_max",
  "condition": {"type": "pressure", "pressure": 0, "outflow": "characteristic", "sigma": 0.25}}}
{"command": "model.fluid_domain.boundary", "params": {"domain": "Flow",
  "at": {"body": "Drum", "face": "F2:side"},
  "condition": {"type": "moving_wall", "velocity": [0, 0.1, 0]}}}

Parameters

model.fluid_domain.boundary sets one boundary’s condition: domain, at (a box face x_min, x_max, y_min, y_max, z_min, z_max, or an obstacle face {"body", "face"}) and condition. The same conditions go in faces (box) and surfaces (obstacles) of model.fluid_domain.create and .edit.

condition.typeFieldsWhereMeaning
wall—box, obstacleNo-slip wall at rest. Every box face and every obstacle face is one unless given.
moving_wallvelocity: [u, v, w]box, obstacleNo-slip wall sliding with this velocity. On a box face the normal component must be 0. On an obstacle face it is the tangential motion of a rotating or sliding surface; the body does not move.
slip—boxFrictionless wall: no flow through it, no shear.
symmetry—boxSymmetry plane of a half model: the flow of a slip face, and no heat through it, in the fluid and in every conducting solid it cuts. Setting it makes the face’s thermal condition adiabatic; a held temperature or flux on it is refused.
velocityvelocity: [u, v, w], profile: "uniform" | "parabolic" (default uniform)boxVelocity inlet, or outlet if the velocity points out of the box. parabolic multiplies the velocity by 4 s (1 − s) across each direction of the face that ends at walls (not periodic), s from 0 to 1 across the box: fully developed flow between plates (one such direction), or in a rectangular duct approximated by the product (two). The given velocity is the peak. A direction that ends at a symmetry plane is the half of the whole model’s: the profile peaks at the plane.
pressurepressure: p (gauge), outflow: "uniform" | "convective" | "characteristic" (default uniform), sigma (characteristic only, above 0 and at most 1, default 0.25)boxPressure outlet (or inlet). uniform: the face at the pressure, the flow crossing it normally. convective: each cell at the pressure, the flow leaving as it arrives; for outlets a wake or vortices reach. characteristic: as uniform, but partially non-reflecting: an outgoing pressure wave leaves instead of coming back, while the face’s pressure relaxes towards p at a rate set by sigma (Characteristic outlets). One face at most, CPU only, no checkpoints; sigma with another outflow is refused.
periodic—boxWhat leaves through this face enters through the opposite one, which must be periodic too.

Obstacle faces take only wall and moving_wall; setting wall removes the face’s entry, walls being the default. A face is named as in sets: F2:top also selects its split pieces F2:top#0, …; each obstacle face has at most one condition. A box face that is an inlet or outlet needs at least 2 cells across it.

Where the obstacle walls lie is set on the fluid step, beside the collision: walls in the "fluid" procedure of model.step.create is "halfway" (the default), "interpolated" or "interpolated_quadratic".

{"command": "model.step.create", "params": {"name": "Run", "procedure": {"type": "fluid",
  "domain": "Flow", "end_time": 2, "walls": "interpolated"}}}
wallsObstacle wallsUse it for
"halfway"Halfway between the fluid cell and the solid one: a staircase of cell faces. Mass conservative.Bodies whose faces lie on cell faces (boxes aligned with the grid), and flows where a fraction of a cell in wall position does not matter.
"interpolated"Where the obstacle’s surface crosses each link (below). Not mass conservative.Curved bodies (cylinders, spheres, pipes, fins) and bodies that do not sit on the grid, when drag, pressure drop or the velocity near the wall matter on a grid you can afford. Keep τ⁺ at 1 or below (the automatic time step does).
"interpolated_quadratic"The same crossings, with the quadratic form below where the flow has three nodes in line. Not mass conservative. On the CPU and the GPU.The same bodies when the wall is turned against the grid and the flow rate or wall shear matters: on a Poiseuille channel at 26.57° or 45° to the grid, 8 cells across, the velocity’s L2 error is 1.1e-3 to 7.0e-3 against the linear form’s 6.5e-3 to 1.6e-2, and the flow rate is within 0.76 % against 1.36 %.

The box’s own faces are halfway with either setting: they lie halfway along their links already. Interpolated walls are refused with a wall model (turbulence.wall_model) and with a free surface, which rebuild or reflect the wall populations their own way.

Theory

Walls: halfway bounce-back

At every link from a fluid cell x to a solid cell, or across a wall face of the box, the population leaving x towards the wall returns into x in the opposite direction one step later:

f_q(x, t + Δt) = f*_q̄(x, t) + 6 w_q ρ₀ c_q·u_w

with q̄ the opposite of q and u_w the wall velocity (Ladd’s moving-wall term; zero for a wall at rest). The wall lies halfway between the fluid cell and the solid one. With the two-relaxation-time collision and Λ = 3/16 that position is exact for the Poiseuille parabola; with the other collisions it is second-order accurate (Collision operators). With halfway walls obstacle walls are staircase: they follow the cell faces, and curved walls are first order in position. Interpolated walls (below) put them where the surface is.

A link into a fluid cell from an obstacle cell belongs to the obstacle face of the triangle nearest the link’s midpoint, and takes that face’s wall velocity.

Obstacle walls: interpolated bounce-back

With walls: "interpolated", each link from a fluid cell x_f to an obstacle cell bounces back where the obstacle’s surface crosses it, at the fraction q ∈ (0, 1] of the link from x_f (Bouzidi, Firdaouss & Lallemand 2001, linear interpolation). With x_ff = x_f + c_q the next cell away from the wall and f* the post-collision populations:

q < ½:  f_q(x_f, t + Δt) = 2q f*_q̄(x_f) + (1 − 2q) f*_q̄(x_ff) + δ
q ≥ ½:  f_q(x_f, t + Δt) = [f*_q̄(x_f) + (2q − 1) f*_q(x_f) + δ] / (2q)

δ = 6 w_q ρ₀ c_q·u_w is Ladd’s moving-wall term, as for halfway walls (Lallemand & Luo 2003 write the moving wall into Bouzidi et al.’s scheme this way). At q = ½ both lines are halfway bounce-back.

Where the surface crosses. q comes from the obstacle’s triangles: the nearest crossing of the segment from the fluid cell’s centre to the solid cell’s, decided with exact orient3d tests (an edge or a vertex hit counts) and constructed from the plane distances. Where the face has an exact curved surface (a cylinder, sphere, cone or torus of the design), the crossing is taken on that surface instead of on its triangles’ chords, as the voxeliser decides the cells near it. q is taken as it is, from 0 (the surface through the fluid cell’s centre) to 1. At q = 0 both interpolations return the population that left x_ff toward the wall, unchanged, with one exception: the linear rule’s moving-wall term δ does not vanish at q = 0 on a moving wall. q divides only on the q ≥ ½ line. A floor on q would move the wall by a fixed fraction of a link, a first-order error.

Links that keep halfway bounce-back. A link with q < ½ needs the second fluid cell x_ff (across a periodic face if the link leaves the box there). Where x_ff is solid (a gap a cell or two wide) or outside a box face that is not periodic, the link has nothing to interpolate from and keeps halfway bounce-back; so does a link on which no crossing is found. The solve counts both and warns: “interpolated walls: N of M wall links kept halfway bounce-back (…)”. Refine the spacing where obstacles nearly touch.

Quadratic form. With "interpolated_quadratic" the same characteristic is read from three nodes in line (Lagrange interpolation; the coefficients sum to one and both lines are halfway bounce-back at q = ½). With x_ff = x_f + c_q and x_fff = x_f + 2c_q:

q < ½:  f_q(x_f) = q(1 + 2q) f*_q̄(x_f) + (1 − 4q²) f*_q̄(x_ff) − q(1 − 2q) f*_q̄(x_fff)
q ≥ ½:  f_q(x_f) = f*_q̄(x_f) / (q(2q + 1)) + (2q − 1)/q · f*_q(x_f) − (2q − 1)/(2q + 1) · f*_q(x_ff)

A link on a moving wall (the quadratic form has no moving-wall term), or whose nodes in line are not all fluid, keeps the linear form. The reply’s wall_links counts the links that took the quadratic form (quadratic) and those that kept the linear one (linear_moving_wall, linear_too_few_nodes), and the solve warns: “quadratic interpolated walls: N of M interpolated wall links kept the linear form (…)”. (The quadratic interpolation of Bouzidi et al. 2001, checked here against the continuity at q = ½ and a parabola.)

Mass. The populations an interpolated wall sends back no longer sum to those it received, so the fluid’s mass drifts. In the verification cases below the drift is 10⁻¹⁰ to 10⁻⁷ of the mass over a run; mass.relative_change in the reply shows it for yours.

The wall depends on τ. The linear interpolation’s effective wall position carries an error that depends on the relaxation rates (Ginzburg & d’Humières 2003), so its drag moves with τ. On the 3-cell sphere array below the drag error is +0.72 % at τ⁺ = 0.6, −1.6 % at 1, −6.2 % at 2 and −9.7 % at 3, while halfway walls (Λ = 3/16) read +11.7 % at every τ. Interpolated walls are accurate for τ⁺ ≤ 1: keep the relaxation time near or below 1 (the automatic time step does; a time_step you give raises τ⁺ as it grows), or refine the grid.

Heat. The temperature lattice keeps its walls halfway on every link (anti-bounce-back for a held temperature, bounce-back for an adiabatic wall), and conducting solids keep their staircase interface (Heat transfer).

Slip walls

A slip face reflects populations specularly: the population entering x across the face in direction q comes from the cell in the same layer, shifted tangentially, in the mirrored direction (the normal component of c_q reversed). Where a link crosses more than one face (an edge or a corner), or the mirror source is not a fluid cell, the slip face bounces back instead. A slip face takes normal momentum only.

Symmetry planes

A symmetry plane solves half of a model that is symmetric about a box face. To the flow it is a slip face, with one difference: where the mirror source of a reflected population is an obstacle cell (a body the plane cuts), the population bounces back off the obstacle’s mirror image and its momentum is the obstacle’s, as in the whole model. No heat crosses it: the fluid’s populations bounce back (adiabatic), and a conducting solid’s cell on the plane faces its own mirror image, at its own temperature. That face still counts in the solid’s explicit stability limit, so the half sub-steps as the whole does and the transient matches too. A parabolic inlet treats the plane as the middle of its profile.

Enter the whole model’s inputs. A conducting solid, fan or porous zone that reaches the plane is half of one body or zone of the whole model, continued across the plane as its mirror image. That holds whether its geometry ends at the plane (the usual half model, with the body cut there) or reaches past it. Whether a part reaches the plane is decided from its geometry against the plane’s coordinate, never from the cells it falls in: a fan or solid that stops a fraction of a cell short of the plane is clear of it, even when its last cell layer is on the plane. Its power or curve is that whole body’s or fan’s:

  • A powered solid spreads its power over its cells and their mirror images, so the half generates half of it (a quarter in the corner of a quarter model).
  • A fan reads its curve at the whole fan’s flow, twice its flow in the box.
  • A solid, fan or zone clear of every plane keeps all of its power or curve, because its mirror image is a second one.

The whole-model cell count follows from the box (the cells in it over the share), so no extra grid is built. The reply states the share: solids[].power is the power generated in the box, with power_share (½ per plane reached) beside it, and a fan or zone carries share.

Every input that crosses the plane breaks the symmetry, and the model check, the boundary command’s reply and the solve’s warnings name each one: a body acceleration, buoyancy gravity or initial velocity with a component normal to the plane; a velocity inlet or moving wall on another face whose velocity crosses it; a fan the plane cuts that blows through it or is cut off its middle. A fan that blows toward the plane without reaching it is fine: its mirror image is a second fan blowing the other way. The solve’s setup also warns about an obstacle the plane cuts off its middle, whose extent across the plane is not symmetric about it. The half model solves the obstacle’s part in the box and that part’s mirror image, so the result is not the obstacle’s. Only the obstacle’s bounding box is checked, so an asymmetric shape with a symmetric extent passes. An obstacle that ends at the plane is the half the model is meant to solve and gets no warning.

solve.fluid adds whole_model to its reply: the totals of the whole symmetric model, factor (2 per plane) times this one, clearly labelled. These are every wall’s force (its components along the planes times the factor, its component normal to a plane zero, because the mirror images cancel), every wall’s heat, each conducting solid’s power and heat to the fluid, and each fan’s or porous zone’s flow. Each entry keeps its name in this model but stands for it and its mirror images together: the box face opposite a plane, for instance, is that wall and its image across the plane, two walls of the whole model, its heat summed over both and its normal force zero because the two cancel. The planes’ own faces are inside the whole model and are left out. There is no whole model when both faces of an axis are planes (an unbounded strip).

Periodic faces

A link that leaves through a periodic face pulls from the periodic image on the opposite face. Periodic faces come in opposite pairs; a domain whose face is periodic and whose opposite face is not is refused.

Velocity inlets and pressure faces

On the first layer of a velocity inlet, the five unknown populations (those entering from outside: one along the normal, four diagonals) are set after streaming (Zou & He 1997):

  1. The tangential sum T (populations with c_n = 0) and the outgoing sum O (c_n pointing out) of the known populations.
  2. A velocity inlet with normal velocity u_n gives the density ρ = (T + 2 O)/(1 − u_n); a pressure face with density ρ gives the normal velocity u_n = 1 − (T + 2 O)/ρ, the tangential velocity 0. The prescribed velocity is the one with Guo’s half force, so the bare velocity the populations carry is the target less F/(2ρ).
  3. Each unknown is its opposite plus the equilibrium difference (bounce-back of the non-equilibrium part): f_q = f_q̄ + 6 w_q ρ c_q·u.
  4. The transverse momentum is corrected on the two diagonal unknowns of each tangential axis, as Hecht & Harting (2010) do for D3Q19.

For a TRT velocity inlet without a free surface and with two inner fluid cells, a correction removes the alternating inlet mode seen near τ = 1/2 (#820). The non-equilibrium stress trace is extrapolated as 2 trace(inner1) − trace(inner2). The five deviatoric stress components and the prescribed velocity are preserved. Density receives only the high-frequency part of the extrapolation residual:

δρ = (I − S₁ S₂) [2ρ(inner1) − ρ(inner2) − ρ(Zou–He)]
S = [−1, 4, 10, 4, −1] / 16 along each tangential axis
δf_q = f_eq(q, δρ, u_bare) + (3/2) w_q (|c_q|² − 1) δtrace

The filter wraps periodic sides and reflects at wall sides; missing or differently owned open-face neighbours use the centre. Without two inner fluid cells, or at a velocity face pointing outward, the original reconstruction is retained. Free-surface flows also retain their original closure: a moving liquid/gas interface does not provide two fixed inner fluid samples. The correction reads a snapshot of streamed populations before any open face is changed. It changes neither the bulk TRT collision nor SGS viscosity, and the other collision operators retain their inlet closure. This correction is FieldCraft’s own: it is not a published inflow condition. It takes the equilibrium/non-equilibrium split of non-equilibrium extrapolation (Guo, Zheng & Shi 2002, doi:10.1088/1009-1963/11/4/310) and Shapiro’s selective filter (1970, doi:10.1029/RG008i002p00359), and combines them in a way neither paper describes. Published closures were tried on the same box first: full non-equilibrium extrapolation, the regularised inlet of Latt et al. (2008, doi:10.1103/PhysRevE.77.056703), an equilibrium inlet, and a characteristic (LODI) inlet density after Izquierdo & Fueyo (2008, doi:10.1103/PhysRevE.78.046707) and Heubes, Bartel & Ehrhardt (2014, doi:10.1016/j.cam.2013.09.019). At τ = 0.5005 each either went unstable or left disturbances far above the 1e-6 seed (below).

The 16³, U=0.05, τ=0.505 checkerboard reproduction that failed at step 2838 completes 30,000 steps with density departure about 8e-9. Broadband disturbances and τ=0.507 and 0.518 are also checked. No stable inlet result was obtained in the tested cases below τ = 0.505 at this Mach number, and the setup warns about it (only a turbulence model allows τ below 0.505):

  • The bulk is itself the first limit. Linearised about the uniform stream at U = 0.05 (Mach 0.087) along x, with the default Λ = 3/16 the TRT collision has growing modes on the 16³ box for τ ≤ 0.502 (1.96e-3 per step at τ = 0.5005) and none from 0.5025; at τ = 0.5005 it is stable only up to U = 0.01. The analysis is the von Neumann one of Sterling & Chen (1996) and Wissocq, Sagaut & Boussuge (2019, doi:10.1016/j.jcp.2018.12.015), who trace BGK’s instability to collisions of non-hydrodynamic with physical modes, worst for oblique waves; Lallemand & Luo (2000) find BGK unstable above V ≈ 0.07 already at τ ≈ 0.5025. Λ = 3/16 at τ = 0.5005 makes τ⁻ ≈ 375, odd moments that hardly relax; the stable MRT of Lallemand & Luo relaxes them fast. The test tests/trt_stability.rs keeps these numbers. A stream oblique to the grid is stable only up to 5.6 (τ − ½) at every τ in the smallest oblique onset found (Collision operators).
  • A near-BGK Λ (≤ 3e-5, τ⁻ ≤ 0.56) makes the bulk stable at τ = 0.5005, but moves the bounce-back wall: the effective channel width is √(H² + (16Λ − 3)/3) (Ginzburg, Verhaeghe & d’Humières 2008, doi:10.4208/cicp.2008.v3.p519, from Eq. 2.29), for a channel of H cells, exact only at Λ = 3/16. With it no inlet closure above held either: Zou–He and this correction fail within 150 steps, the others fail or keep departures of 1e-3 to 1e-2.
  • Where the bulk is stable but τ < 0.505 (τ = 0.5005 at U = 0.01; τ = 0.5025–0.503 at U = 0.05) this inlet still fails or keeps departures of 5e-3 and more: its own floor is between 0.503 and 0.505 at Mach 0.087.

This inlet repair is not a validation of high-Reynolds-number LES or drag.

A uniform pressure face uses non-equilibrium extrapolation (Guo, Zheng & Shi 2002): its density is prescribed, physical tangential velocity is zero, and normal velocity is taken from the fluid cell one layer inside. All populations are rebuilt as the boundary equilibrium plus that inner cell’s non-equilibrium populations. This retains viscous stress and avoids feeding the local normal-stress mode back into the outlet velocity (#819). The inner cell is read after streaming, before any boundary writes, including at intersections of open faces. This closure is the same for TRT, MRT, RR and HRR.

If the inner cell is solid, the local Zou–He pressure balance above remains the fallback; RR/HRR then hold its equilibrium. Convective backflow also retains that local fallback.

A gauge pressure p becomes the lattice density 1 + p/(c_s² ρ₀ Δx²/Δt²).

A cell on the edge of two open faces, or the corner of three, belongs to one of them only: a velocity face before a pressure face, otherwise the first in the order x_min, x_max, y_min, y_max, z_min, z_max. Its populations from outside the other faces keep the placeholder, the bounce-back of its own. Where a link crosses a wall face and an open face at once, the wall face’s bounce-back applies.

Raising the inlet (inlet_ramp)

A velocity face that is at its full value from the first step sends a pressure wave through the box. A velocity step U at a velocity face sends a density pulse of U / c_s = Ma, with Ma = √3 U the lattice Mach number, since a travelling wave has p′ = ρ c v′ (Joukowsky’s relation: N. Joukowsky, Mém. Acad. Imp. Sci. St-Pétersbourg, sér. 8, 9(5), 1900). At the default lattice speed 0.05 that is a pressure coefficient of 2 / Ma = 23 dynamic pressures. inlet_ramp (the time T of a fluid step) raises every velocity face from the initial field as

u(t) = u0 + r(t) (u − u0),    r(t) = ½ (1 − cos(π t / T)) for t < T, and 1 from T on,

with u0 the domain’s initial velocity (rest unless given) and u the face’s velocity. The raised cosine is the lowest-order trigonometric rise with r(0) = 0, r(T) = 1 and r′ = 0 at both ends, so the inlet’s acceleration is continuous at the start and at the end. Without inlet_ramp nothing changes.

What is left after it. A velocity step U at a velocity face sends a density pulse U / c_s = Ma (Ma = √3 U, the lattice Mach number). Its pressure coefficient, against ½ρU², is 2 / Ma. In a box of length L between the velocity face and a pressure face, the fundamental period is T₀ = 4 L / c_s (c_s = 1/√3 cells per step, a closed–open tube). The step’s fundamental standing wave has (4/π) of the step’s amplitude (the odd harmonics of a square wave, 4 / (π (2n + 1))). A ramp of T = m T₀ multiplies it by |cos(π m)| / |4 m² − 1|, the Fourier transform of the rise’s slope at the fundamental. So the residual pressure coefficient of the fundamental is

C_p,res ≈ (4/π) · (2/Ma) · |cos(π m)| / |4 m² − 1|

The cosine is at most 1, which gives the envelope

C_p,res ≤ (8 / (π Ma)) / (4 m² − 1)

For a tolerance ε on the residual, the envelope is below ε when 4 m² − 1 ≥ 8 / (π ε Ma), that is

m ≥ ½ √(1 + 8 / (π ε Ma))

What the formula leaves out. It is linear acoustics, the limit Ma → 0. A wave travels at c_s ± u (the Riemann invariants u ± c_s ln ρ of a fluid with p = c_s² ρ; Whitham, Linear and Nonlinear Waves, 1974, §6.8). While the inlet rises, a wave’s trip back sees a faster flow than its trip down, so the round trip is longer than 2 L / c_s by a time proportional to U. This leaves a residual in the pressure coefficient (0.43 at one period: the ideal tube sits 0.43 above the formula, 7.207 against 6.775), which the formula’s 1/Ma does not carry, so its share of the formula’s value grows with Ma. Once the inlet is at U, the period is T₀ / (1 − Ma²) (down at c_s + U, back at c_s − U), so a ramp of m T₀ no longer sits on the zero at m = 2.5. The “ideal tube” column below has both effects: it is the one-dimensional solution by characteristics (crates/lbm/tests/common/ramp_tube.rs). In an empty tube of 192 cells the solver is within 0.13 % of it at m = 1 and 0.08 % at m = 2 (crates/lbm/tests/inlet_ramp_tube.rs), and the period it shows is that of a tube 191.3 cells long: the faces act between their cells’ centres (191 apart) and the box’s faces (192 apart), so L is the box’s length less about half a cell.

A body in the box then damps the mode. In the cylinder case the fundamental decays by 1.08 × 10⁻⁶ per step, which is 2.8 % by the middle of the rms window. Inferred, not derived: the rate is what the cylinder’s drag, linearised about the mean flow, would take from the mode, C_d U D sin²(k x_c) / (L H) per unit time (x_c the body’s distance from the inlet, H the box’s height), with C_d near 0.7.

The time T is yours to choose: the code recommends none. The measured rows below are the evidence.

Measured against the references. The heavy test crates/lbm/tests/inlet_ramp_cylinder.rs prints these rows: a 2-D cylinder in a 24 D × 12 D box, 16 cells per D, Hrr with Smagorinsky C = 0.1 at Re 3900, halfway walls, CPU, f64, started at rest, run to 120 D/U. The far-field C_p rms is at the probe 3 D upstream of the centre and 3 D above it, over the second half of the run. The printed values are frozen, since the run is deterministic. The formula column is linear_rms in crates/lbm/tests/common/ramp_tube.rs: the envelope’s fundamental at that probe, its residual amplitude (4/π)(2/Ma)|cos πm|/|4m² − 1| taken as an rms (÷ √2), times cos(k x_probe) with k = π/(2L).

The residual C_p,res and the tolerance ε in the formulas above are amplitudes at the velocity face: the peak of the standing wave’s pressure coefficient. They are not rms values; the rms of a sinusoid of amplitude A is A / √2.

The formula and ideal tube columns are for a tube of 383.5 cells with the probe 48.25 cells from the inlet, as an rms sampled as the probe is. The ideal tube is the one-dimensional solution by characteristics on 384 cells; its error at this grid, from a Richardson estimate on 384, 768 and 1536 cells, is about 10⁻⁶ relative. The last column multiplies the ideal tube by the run’s own measured decay of the fundamental to the middle of the window (printed by the test, not asserted).

ramp Tmfar-field C_p rms (measured)formula (Ma → 0), fundamentalideal tubeideal tube × measured decay
none020.190(the step’s wave steepens into shocks)
2660 steps (T₀)17.0206.7757.2077.008
5320 steps (2 T₀)21.3501.3561.3771.357
6650 steps (2.5 T₀)2.50.0490.0080.0580.058

The one-period row is 3.6 % above the formula (7.020 against 6.775) and 2.6 % below the ideal tube (7.207). The ideal tube times the run’s own decay gives 7.008, within 0.2 % of the measurement, so the excess over the formula is the Mach-number effects the formula leaves out together with the body’s damping of the mode. The two-period row is 0.4 % below the formula and 0.5 % below the ideal tube times its decay. The one- and two-period rows give rms(T₀)/rms(2T₀) = 5.198; the formula gives 4.997 and the ideal tube 5.235 (printed), so the ideal tube accounts for the ratio, and the measured ratio is 0.7 % below it. At 2.5 T₀ the ideal tube moves by 35 % between the two bounds of the acoustic length (0.050 to 0.067, printed), so its 0.058 against the measured 0.049 is within that spread. Of the measured ramps, 2.5 T₀ removes most of the start’s pulse for this case: 0.049 against 20.190 with no ramp.

The refusals: inlet_ramp needs a velocity face; a free surface is not supported yet; a ramp longer than the run is refused, since the faces would never reach their velocities; and the time must be positive and finite. Moving walls are not ramped, and the temperature of a velocity inlet is not ramped.

Convective outlets

A uniform pressure outlet holds its cell at the face’s density with no tangential velocity. Where an unrecovered wake reaches it, that balance puts a step into the velocity of the last layer. A convective outlet updates the five unknown populations of each outlet cell N by the convective outflow equation ∂f/∂t + U ∂f/∂n = 0, upwind and implicit in time (Orlanski 1976, with the local flow speed as the phase speed):

f_q(N, t+1) = (f_q(N, t) + λ f_q(N−1, t+1)) / (1 + λ),   λ = U Δt/Δx

with f_q(N−1, t+1) the population of the cell one layer in after streaming and f_q(N, t) the outlet cell’s own after the last step. U is the cell’s own outward velocity after the last step, clamped to [0, 0.5]. The update is a convex blend, stable for every λ ≥ 0. The known populations stream as everywhere else. Every population then gains w_q (ρ_out − ρ), which sets the cell’s density to the face’s without changing its momentum: the face holds its pressure cell by cell while the velocity, normal and tangential, comes from the flow.

Backflow guard. A cell whose convected flow points into the box takes the legacy local fallback: Zou–He at the face’s density, no tangential velocity, which stays stable with reversed outlet cells. The rule changes only the outlet cells’ streamed populations, so it does not depend on the collision operator.

Characteristic outlets

A uniform pressure outlet holds the face’s density, so an outgoing pressure wave is reflected almost whole: after an impulsive start the box’s acoustic mode rings between inlet and outlet until viscosity removes it. A characteristic outlet lets each outlet cell carry its own density ρ_b and outward normal velocity u_b, advanced every step after streaming by the linearised one-dimensional characteristic (LODI) balance of Poinsot & Lele (1992) in density units (p = c_s² ρ), with ρ₁, u₁ the inner cell’s state and ρ₀ the face’s density:

L₅ = (u_b + c_s) [(ρ_b − ρ₁) + (ρ₀ / c_s)(u_b − u₁)]    the outgoing wave, one-sided from the inner cell
L₁ = K (ρ_b − ρ₀),   K = σ c_s / L                      the incoming wave: only the pressure's relaxation
ρ_b ← ρ_b − ½ (L₅ + L₁),   u_b ← u_b − (c_s / 2ρ₀)(L₅ − L₁)

with u_b + c_s limited to [0, 1] cells per step, L the box’s extent along the face’s normal, in cells, and σ = 0.25 by default (after Rudy & Strikwerda 1980). ρ₁ and u₁ are read as the closure reads them: u₁ is the inner cell’s physical velocity, with a fan’s, a porous zone’s or a mushy cell’s action included. The cell then takes the equilibrium at (ρ_b, u_b), with no tangential velocity, plus the inner cell’s non-equilibrium part (Guo, Zheng & Shi 2002): the uniform outlet’s own closure, at a density and velocity that move.

The relaxation reflects R(ω) = −1 / (1 − 2iω/K) of a normal wave of angular frequency ω (radians per step), so |R| = K / √(K² + 4ω²) (Selle, Nicoud & Poinsot 2004): in time, a one-pole low-pass of rate K/2 applied to the wave a fully reflecting end returns. Slow waves come back, fast ones leave; σ trades how much of the slow waves come back against how far the mean pressure drifts from p and how fast it returns. Besides the relaxation, the closure itself reflects a little: 0.23 % of an incident pulse’s peak at σ 0.25, 0.5 and 1.0 (oracle case characteristic-outlet-reflection). A cell counts the steps its balance went non-finite or non-positive and kept its last state, and the steps it had no fluid cell inside it (an obstacle in the outlet’s inner layer), when it takes the local closure at p and reflects; the solve warns when any did.

Wall forces: momentum exchange

Each wall link transfers momentum to the wall: the population f* leaving the fluid cell towards the wall and the one f′ coming back give c_out f* − c_in f′ (Ladd 1994; Mei et al. 2002). For a bounce-back link of direction q (into the fluid), c_out = −c_q, so the wall receives −c_q (f*_q̄ + f′_q). On an interpolated link the exchange is taken in the wall’s frame, (c_out − u_w) f* − (c_in − u_w) f′ with f′ the interpolated population (Wen et al. 2014), which keeps the force Galilean invariant when the populations sent back no longer balance those received; at rest it is the same sum. A slip link gives c_q′ f* − c_q f*, its normal momentum. The forces are summed per force group (each box face, then each obstacle face) in link order, every time step, in lattice units and scaled by ρ₀ Δx⁴/Δt². They are the force of the fluid on the wall, including pressure and shear. The pressure in them is absolute: each face’s force carries the lattice’s rest pressure c_s² ρ₀ (Δx/Δt)² over its area, which depends on Δt and cancels only in the sum over a body closed in that direction, while probes and slices report the gauge pressure. Under the wall model a wall also takes the momentum each reconstruction of its wall cells removes, so its force is the drag the flow carries (Large-eddy simulation).

Heat at the boundaries

With thermal settings, the temperature lattice follows the same links: a wall held at a temperature is anti-bounce-back (g_q = −g*_q̄ + 2 w_q T_w, the temperature halfway between the cells), an adiabatic wall bounces back, a heat flux through a wall face adds the flux to the bounced population, an inlet holds its temperature (the equilibrium at the cell’s velocity; the initial temperature unless the face holds one), and an outlet takes its neighbour’s. A heat flux goes on a wall only, never on an inlet, outlet or periodic face. Thermal conditions are set with model.fluid_domain.thermal_boundary (Heat transfer).

Algorithm

  1. Links (Flow::new): for every fluid cell and direction q, the source cell x − c_q. A source inside the box and fluid streams normally (no link). A source across a periodic face becomes a Pull from its image; a solid source a Bounce of the obstacle face nearest the link’s midpoint, or with interpolated walls an Interpolated link carrying q, x_ff and the moving-wall term (a Bounce where it has no x_ff or no crossing); a source across a box face a Bounce (a wall or moving wall among the crossed faces), a Reflect (a slip face) or an Open placeholder (inlet or outlet).
  2. Open cells: the fluid cells of each open face’s layer with their target (a velocity, with the parabolic profile applied; a density; a convective density), each cell to one face.
  3. Each step, after the collision: stream (one shifted copy per direction, then the links’ rules: Bounce takes f*_q̄ of the cell plus the moving-wall term, Interpolated Bouzidi et al.‘s value from the post-collision populations, Reflect the mirrored population, Open a placeholder); sum the momentum exchange of every Bounce, Interpolated and Reflect link; then the open boundaries: the convective cells’ actions from the streamed populations (read before any open cell changes), then every open cell’s velocity, extrapolated-pressure or convective update, in parallel, stored in cell order.

Output

solve.fluid reports, per wall with a non-zero force, its name (x_min … for box faces, the face’s persistent name for obstacle faces), body, final force and mean over the last quarter of the history. solve.probe with {"forces": ["x_min", "F2:top", "Body1/F2:top"]} returns those walls’ complete histories (Fluid results). Forces are in the display units; the sign is the force of the fluid on the wall.

With interpolated walls the reply’s wall_links counts the obstacle links: interpolated, halfway_no_second_node (q < ½ with no fluid cell behind) and halfway_no_crossing, and with quadratic walls quadratic, linear_moving_wall and linear_too_few_nodes; it is null with halfway walls.

Worked example

Plane Poiseuille flow between two no-slip walls: a parabolic velocity inlet, a pressure outlet and a periodic pair across the span, a model of our own built from commands. The centreline velocity, the pressure gradient and the wall shear are compared with the closed form, at the automatic time step and at a quarter of it.

Domainbox (0, 0, 0) to (0.1, 0.002, 0.01) m: length L = 100 mm along x, gap H = 10 mm along z, 2 mm span along y; Δx = 0.5 mm, 200 × 4 × 20 = 16 000 cells
Fluidair, ρ₀ = 1.2 kg/m³, μ = 1.8 × 10⁻⁵ Pa s; initial velocity 0.02 m/s
Boundariesx_min velocity 0.03 m/s, profile: "parabolic" (peak U = 0.03 m/s, Re = U H/ν = 20); x_max pressure 0; y_min, y_max periodic; z_min, z_max walls
StepsFlow: 6 s, automatic Δt; Fine: 6 s, time_step 2.0833 × 10⁻⁴ s (a quarter)
Unitsm, kg, s, N, Pa
[
  {"command": "model.units", "params": {"system": "m-kg-s-N-Pa"}},
  {"command": "model.material.create", "params": {"name": "Air", "density": 1.2,
    "fluid": {"type": "newtonian", "viscosity": 1.8e-5}}},
  {"command": "model.fluid_domain.create", "params": {"name": "Channel", "material": "Air",
    "min": [0, 0, 0], "max": [0.1, 0.002, 0.01], "spacing": 0.0005,
    "faces": {"x_min": {"type": "velocity", "velocity": [0.03, 0, 0], "profile": "parabolic"},
              "x_max": {"type": "pressure", "pressure": 0},
              "y_min": {"type": "periodic"}, "y_max": {"type": "periodic"},
              "z_min": {"type": "wall"}, "z_max": {"type": "wall"}},
    "initial_velocity": [0.02, 0, 0]}},
  {"command": "model.step.create", "params": {"name": "Flow", "procedure": {"type": "fluid",
    "domain": "Channel", "end_time": 6, "frames": 6}}},
  {"command": "model.step.create", "params": {"name": "Fine", "procedure": {"type": "fluid",
    "domain": "Channel", "end_time": 6, "frames": 6, "time_step": 0.000208333333333}}},
  {"command": "solve.fluid", "params": {"step": "Flow", "backend": "cpu"}},
  {"command": "solve.probe", "params": {"step": "Flow", "line": {"from": [0.07, 0.001, 0], "to": [0.07, 0.001, 0.01], "field": "velocity_x"}}},
  {"command": "solve.probe", "params": {"step": "Flow", "line": {"from": [0.02, 0.001, 0.005], "to": [0.08, 0.001, 0.005], "count": 7, "field": "pressure"}}},
  {"command": "solve.fluid", "params": {"step": "Fine", "backend": "cpu"}},
  {"command": "solve.probe", "params": {"step": "Fine", "line": {"from": [0.07, 0.001, 0], "to": [0.07, 0.001, 0.01], "field": "velocity_x"}}},
  {"command": "solve.probe", "params": {"step": "Fine", "line": {"from": [0.02, 0.001, 0.005], "to": [0.08, 0.001, 0.005], "count": 7, "field": "pressure"}}},
  {"command": "results.streamlines", "params": {"step": "Fine", "show": false}},
  {"command": "results.slice", "params": {"step": "Fine", "field": "velocity", "axis": "y", "position": "auto"}}
]

Closed form for the fully developed flow with peak U: u(z) = 4 U s (1 − s), s = z/H, so the centreline speed is U, −dp/dx = 8 μ U/H² = 0.0432 Pa/m and each wall takes the shear force μ (4 U/H) L W = 4.32 × 10⁻⁸ N along x (W = 2 mm the span). The centreline speed is the max of the velocity_x line across the gap at x = 70 mm (the vertex of the parabola through the samples); the gradient is the pressure difference between x = 20 and 80 mm on the centreline over 60 mm; the wall force is the x component of forces z_min in the solve.fluid reply. Apple M4 Max, CPU.

QuantityFlow (automatic Δt)Fine (Δt/4)Closed formDifference (Flow, Fine)
time_step, steps8.333 × 10⁻⁴ s, 72002.083 × 10⁻⁴ s, 28 800
tau, mach0.65, 0.08660.5375, 0.0217
Centreline velocity at x = 70 mm0.030607 m/s0.029964 m/s0.03 m/s+2.02 %, −0.12 %
−dp/dx, x = 20 → 80 mm0.044876 Pa/m0.043292 Pa/m0.0432 Pa/m+3.88 %, +0.21 %
Wall force on z_min, x4.393 × 10⁻⁸ N4.270 × 10⁻⁸ N4.32 × 10⁻⁸ N+1.69 %, −1.15 %
mass.relative_change+1.55 × 10⁻²+9.35 × 10⁻⁴0
warnings“the density varies by 3.1% at the end: …”none
Wall-clock time2.5 s14.7 s

What to look at. The parabolic inlet enters the flow already developed, so the slice’s bands run parallel from inlet to outlet and the profile across the gap is the parabola within 0.12 % at the fine time step. The halfway bounce-back walls sit on the box faces: the profile’s zero lies at z = 0 and z = H, half a cell outside the first cell centres, whose speed (0.00293 m/s) is the parabola’s at s = 0.025. At the automatic time step the pressure drop along the channel (4.46 × 10⁻³ Pa in the first cell, 0 at the outlet) is 3.1 % of the lattice’s c_s² ρ₀ (Δx/Δt)² = 0.144 Pa: the density falls by that much towards the outlet, the velocity rises to keep the mass flow (0.0299 m/s at the inlet to 0.0310 m/s at the outlet on the centreline), and the gradient and the centreline speed read 2–4 % high. A quarter of the time step raises that pressure scale 16 times (the density warning, given above 1 %, no longer appears) and brings every quantity within 1.2 % of the closed form.

Verification

CaseReferenceMeasuredToleranceTest
Couette, moving wall, 16 cellsLinear profile; wall shear ±μU/H on both walls (theory)Profile 1e-10; shear to 1e-610⁻⁶ relativecouette_flow_is_linear_and_the_wall_shear_is_mu_u_over_h
Pipe, staircase wallWall force = driving force (momentum balance)10⁻⁶ relativepipe_poiseuille_on_a_staircase_wall_converges (heavy)
Sphere array, periodicWall force = driving force at steady state10⁻³stokes_drag_of_a_sphere_array_matches_hasimoto (heavy)
Pipe, 4/6/8/12/16 cells per radius, halfway and interpolated walls, τ = 1Hagen–Poiseuille (theory)L2 halfway 4.5e-2 … 9.5e-3 (fitted order 1.01), interpolated 6.6e-3 … 6.9e-4 (order 1.65); wall force = driving forceinterpolated order > 1.5, halfway < 1.3; interpolated below 0.3 × halfway on every grida_coarse_pipe_is_closer_with_interpolated_walls (8 cells); the order studies pipe_poiseuille_converges_at_second_order_with_interpolated_walls and, up to 32 cells, pipe_poiseuille_orders_on_eight_grids (both heavy)
Plane channel, walls 0, 0.2, 0.4, 0.6, 0.8 of a cell off the cell faces, 8/16/32 cellsThe parabola (theory; Bouzidi et al.’s test)Worst over the shifts: halfway 0.185, 0.096, 0.049 of the peak (order 0.95); interpolated 0.039, 0.0099, 0.0025 (order 1.99); both exact at shift 0interpolated orders > 1.8, halfway < 1.2a_channel_with_walls_anywhere_in_a_cell_keeps_its_parabola
Plane channel turned 26.57° (2:1) and 45° (1:1) against the grid, three wall offsets each, 8/12/16/24 cells across, the same physical offset on each grid, quadratic wallsThe parabola (theory); both of Bouzidi et al.’s interpolations second orderVelocity L2 error, fitted order: 26.57° 1.98, 2.76, 2.24; 45° 2.03 at offset 0.5; 45° at offsets 0 and 0.25 0.30 and 0.57 (the linear form 0.75 and 1.80), recorded as known misses: at offset 0 a wall through cell centres leaves 168 and 172 links without a crossing on 12 and 24 cells; at offset 0.25 the 24-cell error rises, cause not found yetorder > 1.5the_quadratic_rule_on_a_turned_channel_converges_at_second_order (heavy)
Annular Couette: rod of radius ½ sliding along the axis of a pipe of radius 1, 6/8/12/16 cells per radius, τ = 1u = U ln(r/R₂)/ln(R₁/R₂); rod drag 2πμUL/ln(R₂/R₁) (theory)L2 halfway 8.4e-2 … 3.4e-2 (order 1.02), interpolated 7.3e-3 … 1.1e-3 (order 1.98); rod drag halfway +1.5 … +14 %, interpolated within 0.11 %; the two walls’ forces balance to 2e-7interpolated order > 1.6, halfway < 1.3; drag within 0.5 %a_sliding_rod_on_eight_cells_per_radius_is_closer_with_interpolated_walls; the order studies annular_couette_with_a_sliding_rod_converges_at_second_order_with_interpolated_walls and, to 48 cells, annular_couette_orders_on_seven_grids (both heavy; 6–48 cells: orders 1.16 and 1.92)
Sphere array, R = 3 cells in 16³ (#798), τ = 1Hasimoto (1959) with Sangani & Acrivos (1982) (theory)K halfway +11.66 %, interpolated −1.64 %halfway > 11 %, interpolated within 2 %stokes_drag_of_a_coarse_sphere_array_with_interpolated_walls (heavy)
Sphere array, R = 3, 6, 9 cells (16³, 32³, 48³), τ = 1The sameK halfway +11.7 %, +1.7 %, +2.3 % (not monotone); interpolated −1.64 %, −0.85 %, −0.32 %interpolated within 2 % and closer at every refinementstokes_drag_of_a_sphere_array_with_interpolated_walls_over_radii_and_tau (heavy, with the τ sweep above)
Round pipe from a SolidCraft design, interpolated walls, 8 and 16 cells per radius (oracle pipe-poiseuille-interpolated-walls)u_max = a R²/(4ν) (theory)−0.15 %, −0.04 % (halfway: −5.5 %, −2.1 %)0.5 %, 0.15 %Oracle results
A one-cell gap, interpolated wallsThe links with no second fluid cell keep halfway bounce-back and are reported10 of 10exactlinks_without_a_second_fluid_cell_keep_halfway_and_are_reported
Interpolated walls with a wall model or a free surfaceRefusedinterpolated_walls_refuse_wall_models_and_free_surfaces
Parabolic inlet, uniform pressure outletPoiseuille profile and gradientProfile 3.0e-4, gradient +0.07 %5 × 10⁻³, 1 %channel_with_a_parabolic_inlet_and_a_pressure_outlet_develops_poiseuille_flow (heavy)
Pressure-driven channel, two uniform pressure facesParabola; each end at its pressure3 %pressure_driven_poiseuille_holds_its_end_pressures
The same, two convective facesParabola; ends at their pressures3 %; ends to 10⁻³pressure_driven_poiseuille_holds_its_end_pressures_with_convective_faces
Edge of two pressure faces, every outflow combinationEdge cell at the outlet density; inlet corner at the inlet velocity10⁻¹²an_edge_of_two_pressure_faces_holds_the_outlet_density
Schäfer–Turek 2D-1 cut 1.5 D behind the cylinder, uniform outletThe interior stays smoothOutlet layer 9.2e-3 departure, interior 5.3e-3interior < 0.03 U (9 × 10⁻³)a_wake_at_a_pressure_outlet_distorts_only_the_last_layer
The same, convective outletNo step at the outletinside and outlet layer < 2 × 10⁻³a_wake_leaves_a_convective_outlet_without_a_step
The same against a channel 1.6 long (outlet 13 D behind)The long channel’s velocity at the short one’s outletconvective < 1 %, below half the uniform outlet’sa_wake_at_a_convective_outlet_matches_a_long_channel (heavy)
A vortex leaving through the outletA box 3 long the vortex never leavesConvective reflects lessbelow 0.8 × the uniform outlet’sa_vortex_leaves_a_convective_outlet_with_less_reflection
A strong vortex (swirl 1.8 U) reversing the outlet flowStable runUniform outlet diverges, convective stablea_strong_vortex_with_backflow_leaves_a_convective_outlet_stably (heavy)
Re 100, outlet 1 D behind the cylinder, reversed outlet cellsStable, mass conservedmass 1 %a_convective_outlet_survives_backflow_at_re_100 (and …_with_the_regularized_collision)
The same run 20 s (60 000 steps)Stable, mass boundeda_convective_outlet_stays_stable_with_backflow_for_long (heavy)
Schäfer–Turek 2D-2 (Re 100), convective outlet at 7.5 D and 21 D, D/Δx 20c_D,max 3.22–3.24, c_L,max 0.99–1.01, St 0.295–0.305 (benchmark)7.5 D: 3.356, 1.072, 0.2989; 21 D: 3.446, 1.102, 0.2984the two within 4 %; c_D 8 %, c_L 12 %, St 2 % of the benchmarkschafer_turek_2d2_does_not_depend_on_the_outlet_distance (heavy)
Coarse 2D-2, D/Δx 10, τ = 0.51Uniform outlet diverges (step 6699), convective runs 24 000 stepsSt within 2 % of 0.302 %a_coarse_cylinder_at_re_100_runs_with_a_convective_outlet_where_the_uniform_one_diverges (heavy)
A uniform stream through a characteristic outletThe uniform outlet’s rundensity and velocity 10⁻¹³the_characteristic_outlet_keeps_a_uniform_stream
A box’s acoustic mode, 64 × 4 × 4 cells, characteristic outlet (σ 0.25)The uniform outlet reflects itDensity RMS after 2000 steps 2.17e-8 against 4.20e-4below a hundredththe_characteristic_outlet_lets_the_box_s_acoustic_mode_out
A plane pulse in a 2048-cell duct (σ 1.0 and 0.25), the reflection in timeThe one-pole response of rate K/2 to the uniform outlet’s reflection (Selle, Nicoud & Poinsot 2004)Largest departure 2.28e-3 of the incident peak at both; tail rate over K/2 1.0005 (σ 1.0), 1.0054 (σ 0.25); uniform outlet 0.9928departure 4e-3; rate 0.5 % (σ 1.0), 2 % (σ 0.25); control 1 %oracle case characteristic-outlet-reflection
A stream through a porous zone ending at the characteristic outlet’s inner cellThe steady balance u_b = u₁ + c_s (ρ₁ − ρ₀) / ρ₀ with u₁ the closure’s inner velocity6e-1610⁻⁹the_characteristic_outlet_reads_the_inner_velocity_of_a_porous_zone
The same box started from rest through solve.fluid, outflow: "characteristic"The uniform outlet reflects the start-up waveLargest pressure RMS over the last quarter (steps 1500–2000) 4.11e-4 Pa against 2.50e-2 Pabelow a twentietha_characteristic_outlet_is_set_by_command_and_lets_the_start_up_wave_out (crates/engine)
Heated channel, a powered conducting block across the middle: the lower half with a symmetry plane through the block, given the block’s whole power, against the wholeThe whole channelvelocity 3.6e-15 of the peak, temperature 1.0e-15 of the rise, 2 × half drag and the floor heat equal to 7 digits1e-12a_half_channel_with_a_symmetry_plane_is_half_the_whole
The same half with a slip roof, its parabola ending at the roofThe whole channelvelocity 35 % offmust miss(same test)
A fan loop driven by a fan across the channel: the lower half with a symmetry plane through the fan, given the whole fan’s curve, against the wholeThe whole loop2 × half flow and the pressure rise equal to 7 digits, velocity 3e-161e-12a_fan_cut_by_a_symmetry_plane_runs_on_the_whole_fans_curve
The heated channel’s half with the block a quarter cell short of the plane (its last cell layer on the plane), given its powerThe whole channel with the block and its mirror image, each given that powervelocity 1.7e-16, temperature 6.5e-16 of the rise; power_share 11e-12a_powered_solid_short_of_a_symmetry_plane_keeps_its_power
The fan loop’s half with the fan a quarter cell short of the planeThe whole loop with the fan and its mirror image as two fansflow and pressure rise each fan’s to 7 digits, velocity 3e-16; share 11e-12a_fan_short_of_a_symmetry_plane_mirrors_into_a_second_fan
Every condition on the GPUThe CPUGPU backendzou_he_channel_matches_the_cpu, convective_outlet_matches_the_cpu_with_a_vortex_and_backflow, edges_of_two_pressure_faces_match_the_cpu, couette_wall_forces_match_the_cpu, a_half_channel_on_a_symmetry_plane_matches_the_cpu
Interpolated walls on the GPU: a radius-6 sphere in a periodic 24³ box, 300 steps, every collision, at rest and movingThe CPUvelocity ≤ 6.5e-6 of the peak, density ≤ 1.1e-7, skin force ≤ 4.7e-6 at rest and ≤ 1.3e-5 moving (Apple M4 Max)2e-5, 1e-6, 5e-5interpolated_walls_match_the_cpu_fields_and_forces, halfway_walls_stay_halfway_on_the_gpu

The 20-cell staircase cylinder puts c_D,max 4–7 % and c_L,max 7–10 % above the 2D-2 benchmark (2D-1 at this resolution: c_D 3.4 % above).

Limitations

  • Halfway walls (the default) are staircase. Interpolated walls are linear interpolation only (no quadratic variant), not mass conservative, their position moves with τ (keep τ⁺ ≤ 1), links with q < ½ and no second fluid cell keep halfway bounce-back, and they are refused with a wall model or a free surface. They apply to any collision, on the CPU and the GPU; the verification cases run the two-relaxation-time one.
  • The temperature lattice and conducting solids keep halfway walls with either setting.
  • Obstacles do not move: a moving wall is tangential motion of a fixed surface.
  • Slip faces and symmetry planes are box faces only; obstacle faces take walls and moving walls.
  • A symmetry plane’s results are those of the half: they are not mirrored for display yet, and only the reply’s whole_model totals stand for the whole model.
  • A uniform pressure outlet distorts the last cell layer where an unrecovered wake reaches it. The reported speed extremes (max_speed, slice ranges) leave every inlet and outlet layer out for this reason, convective outlets included.
  • Inlets and outlets reflect pressure waves; there are no absorbing layers. A start from rest should raise its inlets (inlet_ramp). The characteristic outlet is partially non-reflecting, not non-reflecting: its balance is one-dimensional along the face’s normal (oblique waves and vortices crossing it were not measured); through its pressure relaxation it reflects waves slower than about K / 2, |R| = K / √(K² + 4ω²); and its closure reflects directly about 0.23 % of an incident pulse’s peak at the three measured σ values. Its |R| inside the relaxation band (ω ≈ K/4 to 4K) was not measured: this pulse experiment cannot resolve it before the inlet reflection returns, so the oracle case checks the same one-pole response in time instead. It goes on one face at most and steps on the CPU only, without checkpoints (refused before the solve starts).
  • Where the flow comes back in through a characteristic outlet (u_b < 0), the cell keeps the outflow treatment: a subsonic inflow needs more prescribed waves (Poinsot & Lele 1992), which it does not have. A convective outlet holds reversed cells instead.
  • Fans and porous zones must stay at least one cell inside the inlet and outlet layers.

Implementation

FileContents
crates/model/src/fluids.rsFaceCondition, Profile, Outflow, SurfaceCondition, FluidDomain::set_boundary, validation.
crates/lbm/src/lattice.rsmoving_wall: Ladd’s term.
crates/lbm/src/flow.rsRule, Link, Interpolation, bouzidi, WallLinks, OpenCell, Target; Flow::new (links and open cells), stream (rules, momentum exchange), open_boundaries, zou_he, hold_equilibrium, thermal_rule.
crates/lbm/src/outlet.rsOutlets::convect, record, unknowns, backflow; pressure_closure (both pressure closures); Characteristic::advance (the LODI balance per outlet cell).
crates/lbm/src/flow.rs (characteristic)Flow::characteristic_outlet, advance_characteristic, inner_cell (the inner cell’s state both closures read).
crates/lbm/src/reflection.rsoutlet_reflection: the plane-pulse duct (solve.outlet_reflection).
crates/model/src/steps.rsWallTreatment (walls on the fluid step).
crates/lbm/src/voxel.rsTriangleTree::nearest: the face of each wall link; link_fraction, TriangleTree::crossing: where the surface crosses a link.
crates/engine/src/cmd/define.rsmodel.fluid_domain.boundary.

References

  • A. J. C. Ladd. Numerical simulations of particulate suspensions via a discretized Boltzmann equation. Part 1. J. Fluid Mech. 271:285–309, 1994. doi:10.1017/S0022112094001771

  • M. Bouzidi, M. Firdaouss, P. Lallemand. Momentum transfer of a Boltzmann-lattice fluid with boundaries. Phys. Fluids 13(11):3452–3459, 2001. doi:10.1063/1.1399290

  • R. Mei, L.-S. Luo, W. Shyy. An accurate curved boundary treatment in the lattice Boltzmann method. J. Comput. Phys. 155(2):307–330, 1999. doi:10.1006/jcph.1999.6334

  • P. Lallemand, L.-S. Luo. Lattice Boltzmann method for moving boundaries. J. Comput. Phys. 184(2):406–421, 2003. doi:10.1016/S0021-9991(02)00022-0

  • I. Ginzburg, D. d’Humières. Multireflection boundary conditions for lattice Boltzmann models. Phys. Rev. E 68:066614, 2003. doi:10.1103/PhysRevE.68.066614

  • Y. Wen, Z. Zhou, C. Shu, H. Ho, J. Fan. Galilean invariant fluid–solid interfacial dynamics in lattice Boltzmann simulations. J. Comput. Phys. 266:161–170, 2014. doi:10.1016/j.jcp.2014.02.018

  • R. Mei, D. Yu, W. Shyy, L.-S. Luo. Force evaluation in the lattice Boltzmann method involving curved geometry. Phys. Rev. E 65:041203, 2002.

  • Q. Zou, X. He. On pressure and velocity boundary conditions for the lattice Boltzmann BGK model. Phys. Fluids 9(6):1591–1598, 1997. doi:10.1063/1.869307

  • M. Hecht, J. Harting. Implementation of on-site velocity boundary conditions for D3Q19 lattice Boltzmann simulations. J. Stat. Mech. 2010, P01018.

  • I. Orlanski. A simple boundary condition for unbounded hyperbolic flows. J. Comput. Phys. 21(3):251–269, 1976.

  • Q. Lou, Z. Guo, B. Shi. Evaluation of outflow boundary conditions for two-phase lattice Boltzmann equation. Phys. Rev. E 87:063301, 2013.

  • Z. Yang. Lattice Boltzmann outflow treatments: convective conditions and others. Comput. Math. Appl. 65(2):160–171, 2013.

  • T. J. Poinsot, S. K. Lele. Boundary conditions for direct simulations of compressible viscous flows. J. Comput. Phys. 101:104–129, 1992. doi:10.1016/0021-9991(92)90046-2

  • L. Selle, F. Nicoud, T. Poinsot. Actual impedance of nonreflecting boundary conditions: implications for computation of resonators. AIAA J. 42(5):958–964, 2004.

  • D. H. Rudy, J. C. Strikwerda. A nonreflecting outflow boundary condition for subsonic Navier–Stokes calculations. J. Comput. Phys. 36:55–70, 1980.

  • T. Krüger et al. The Lattice Boltzmann Method: Principles and Practice. Springer, 2017. doi:10.1007/978-3-319-44649-3

  • M. Schäfer, S. Turek. Benchmark computations of laminar flow around a cylinder. NNFM 52:547–566, 1996. doi:10.1007/978-3-322-89849-4_39

  • Z. Guo, C. Zheng, B. Shi. Non-equilibrium extrapolation method for velocity and pressure boundary conditions in the lattice Boltzmann method. Chinese Physics 11:366–374, 2002. doi:10.1088/1009-1963/11/4/310

Turbulence

A fluid step can add a subgrid eddy viscosity to the lattice Boltzmann flow: a large-eddy simulation with Smagorinsky’s model or Vreman’s. Smagorinsky’s eddy viscosity of each cell follows from its own non-equilibrium momentum flux in closed form, with no finite differences; Vreman’s from the finite-difference velocity gradient of its neighbours, and it vanishes in laminar shear. Either raises that cell’s relaxation time. Near no-slip walls the model can be damped with Van Driest’s mixing length, or the wall cells can be rebuilt from a law of the wall for grids that do not resolve the wall.

Commandsmodel.step.create (turbulence of a fluid procedure), solve.fluid
Step procedure"fluid" with "turbulence": {"type": "smagorinsky", …} or {"type": "vreman", …}
Solvercrates/lbm (CPU, f64); crates/lbm-gpu (GPU, f32) for both models, Van Driest’s damping and the wall models
MethodSmagorinsky 1963 with Hou et al.’s local relaxation time (1996); Vreman 2004; Van Driest damping (1956) with Spalding’s law (1961); wall model of Malaspinas & Sagaut (2014)
Verified bycrates/lbm/tests/turbulence.rs, crates/lbm/tests/mrt.rs, crates/lbm/tests/vreman.rs, crates/lbm-gpu/tests/verification.rs, crates/lbm/tests/sa_channel.rs (Spalart–Allmaras); Re_τ 180 channel studies (docs/verification.md)

Synopsis

{"name": "Flow", "procedure": {
  "type": "fluid", "domain": "Channel", "end_time": 2.0,
  "collision": "regularized",
  "turbulence": {"type": "smagorinsky", "constant": 0.1, "prandtl": 0.9, "van_driest": 26}
}}

Vreman’s model takes the same fields but van_driest:

"turbulence": {"type": "vreman", "constant": 0.18}

The Spalart–Allmaras model is a Reynolds-averaged one and takes inflow_ratio (ν̃/ν at inflows and in the initial field, 3 by default) instead of a constant:

"turbulence": {"type": "spalart_allmaras", "inflow_ratio": 3}

model.step.create takes these fields; solve.fluid runs the step. The wall model replaces van_driest with "wall_model": "musker" (Large-eddy simulation).

Parameters

FieldValueDefaultMeaning
turbulence.type"smagorinsky", "vreman", "spalart_allmaras"requiredThe subgrid model, or the Reynolds-averaged Spalart–Allmaras model. Without turbulence the step has no eddy viscosity.
turbulence.constantabove 0, at most 0.5requiredSmagorinsky’s constant C. 0.1 to 0.2 is usual; 0.17 is Lilly’s value for isotropic turbulence. For vreman, the Smagorinsky-equivalent C_s of Vreman’s c = 2.5 C_s² (0.17 gives his c = 0.07; Jacob et al. 2018 use 0.18).
turbulence.inflow_ratioat least 03spalart_allmaras only: ν̃/ν at the inflows and in the initial field (3 is the value of NASA’s Turbulence Modeling Resource). With 0 the model gives no eddy viscosity and the flow equals the model off bit for bit.
turbulence.prandtl0.1 to 100.9Turbulent Prandtl number Pr_t of the turbulent heat diffusivity ν_t / Pr_t (with heat only). 0.85 to 0.9 is usual for air and water.
turbulence.van_driest1 to 100noneVan Driest’s A⁺: damps the length scale near no-slip walls. 26 is Van Driest’s value. Smagorinsky’s model only: Vreman’s needs no damping, and the field is refused with it.
turbulence.wall_model"musker", "spalding_bounce", "spalart_allmaras_bounce", "spalding_bounce_matched", "spalding_bounce_halfway"none"musker" rebuilds each fluid cell next to a no-slip wall from Musker’s profile, for a first cell above the viscous sublayer (y⁺ 30 to 100). "spalding_bounce" is Han, Ooka and Kikumoto’s wall-function bounce as their eq. 14 states it (2021), on-node: the outermost cell layer at each plane no-slip box face is the wall (the wall plane through its centres, so a channel 2δ wide is 2δ + Δx high), bounces back and sends into the fluid the specular images of its incoming diagonals less the stress of Spalding’s law at the interior node one cell above; CPU and GPU, the box periodic along the walls, no obstacles, moving walls or heat. "spalart_allmaras_bounce" is the same wall with the Spalart–Allmaras model’s own constant-stress law in place of Spalding’s (spalart_allmaras turbulence only, and the only wall model it takes). "spalding_bounce_matched" is the same on-node wall with Spalding’s law read four cells from the wall and the three rows below relaxed by Malaspinas and Sagaut’s mixing length; CPU and GPU, with Smagorinsky’s or Vreman’s model but no van_driest, the box at least 9 cells across its walls. "spalding_bounce_halfway" is disabled because its wall-row checkerboard mode grows. Files preserve this selection when loaded, but solves refuse it at setup. Remove wall_model for resolved no-slip walls, or explicitly select and validate a supported treatment; the on-node variant changes the wall location.
collision"trt", "regularized", "mrt", "hrr""trt"Either model runs with every collision (Collision operators); with hrr the finite-difference stress uses the cell’s τ̄ with its eddy viscosity.

A value outside its range is refused when the step is set up, naming the range. With a turbulence model the fluid’s own symmetric relaxation time τ⁺ may go down to 0.5001 (MIN_TAU_TURBULENT; 0.50354 with "mrt", its stability bound; the Spalart–Allmaras model with inflow_ratio 0 gives no eddy viscosity and keeps 0.505); without one the floor is 0.505 and the refusal suggests adding turbulence.

Theory

Eddy viscosity. Smagorinsky’s model adds

ν_t = (C Δx)² |S|,   |S| = √(2 S:S)

with the filter width the lattice spacing Δx and S the local strain-rate tensor. In lattice units (Δx = Δt = 1, c_s² = ⅓) the non-equilibrium momentum flux of a cell is

P = Σ_q c_q c_q f_q − ρ (c_s² I + u u) + ½ (u F + F u)  ≈  −2 ρ c_s² τ S

the flux Guo’s forcing ties to the strain rate. The cell’s relaxation time τ = τ₀ + 3 ν_t then solves a quadratic (Hou et al. 1996), with |P| = √(P:P):

τ = ½ (τ₀ + √(τ₀² + 18 √2 C² |P| / ρ))

so τ ≥ τ₀, with τ = τ₀ where the flow does not shear. The model is built on the regularised collision’s flux (Malaspinas & Sagaut 2012).

Vreman’s model. A. W. Vreman (2004) builds the eddy viscosity from the velocity gradient α_ij = ∂_i u_j so that it vanishes for exactly the locally laminar flows whose theoretical subgrid dissipation is zero:

ν_t = c √(B_β / (α_ij α_ij)),   β_ij = Δx² Σ_m α_mi α_mj,
B_β = β₁₁β₂₂ − β₁₂² + β₁₁β₃₃ − β₁₃² + β₂₂β₃₃ − β₂₃²,   c = 2.5 C_s²

and ν_t = 0 where α = 0. B_β is the second invariant of the positive semidefinite β, a sum of squared 2 × 2 minors of α (computed that way, so never negative): ν_t is zero wherever the gradient has rank one, as in plane Couette and Poiseuille flow, any simple shear and at a no-slip wall in pure shear, so no wall damping is needed. A rigid rotation, u = Ω (−y, x, 0), is not in that set: ν_t = c Δx² |Ω| / √2. α comes from the same differences of the neighbours’ velocities as the hybrid collision’s strain rate (hrr::gradient): second-order centred, first-order one-sided next to a cell that is not fluid or a face that is not periodic, 0 with neither neighbour. The velocities come from a pass over every fluid cell before the collision, so the eddy viscosity is explicit (this step’s neighbours), where Smagorinsky’s is implicit in the cell’s own flux. The cell relaxes with τ̄ = 3 (ν + ν_t) + ½, per collision as below; a modelled wall cell keeps the wall model’s rate, and with heat α_t = ν_t / Pr_t as for Smagorinsky’s.

Dynamic σ. With collision: "hrr" and sigma: "dynamic", either model’s ν_t sets the hybrid collision’s σ per cell instead of entering τ (Collision operators, “Hybrid recursive regularised”); eddy_viscosity_ratio then reports the model’s ν_t. The von Kármán length |∇u|/|∇²u| that scales ν_t there is capped at the box’s shortest extent in cells, our guard for near-uniform regions where ∇²u vanishes (eq. 50 alone would give σ = 0 for any ν_t > 0); and Smagorinsky’s ν_t is 0 below the flux’s round-off (crates/lbm/src/turbulence.rs).

Per collision. With two relaxation times the symmetric rate takes the cell’s τ and the antisymmetric one follows, keeping Λ = (τ⁺ − ½)(τ⁻ − ½). The regularised collision relaxes its rebuilt non-equilibrium part with the cell’s τ. The multiple-relaxation-time collision replaces the rate of its five stress moments with the cell’s, as in Malaspinas & Sagaut’s eqs. 47–48.

Turbulent heat diffusivity. With heat, each cell’s turbulent diffusivity α_t = ν_t / Pr_t (the Reynolds analogy) adds to the scalar lattice’s relaxation time, τ_T = 4 (α + α_t) + ½; τ_T⁺ follows with Λ_T kept, and a cell on a single relaxation time stays on one (Heat transfer).

Van Driest damping. Smagorinsky’s eddy viscosity is largest where the shear is, at the wall, where the turbulence it stands for is suppressed, so the wall friction comes out too high. Van Driest’s mixing length damps it over the viscous sublayer:

l = C Δx (1 − exp(−y⁺/A⁺)),   y⁺ = y u_τ / ν

Wall distance. Every fluid cell with a no-slip bounce-back link is a wall cell; its wall lies halfway along the link, and the nearest such point (an axis link first, then the lowest direction) is its wall point and gives the wall’s normal. Each other fluid cell takes the nearest wall point of its 26 neighbours, spread outward in cell order until no distance shrinks (vector propagation, Danielsson 1980): exact for plane walls, within a fraction of a cell elsewhere.

Friction velocity. Each wall cell’s u_τ solves Spalding’s law of the wall at its distance y, from its speed parallel to the wall relative to the wall’s own velocity:

y⁺ = u⁺ + e^{−κB} (e^{κu⁺} − 1 − κu⁺ − (κu⁺)²/2 − (κu⁺)³/6),   κ = 0.4, B = 5.5

the sublayer u⁺ = y⁺ where the wall cell lies in it and the log law above. Every cell is damped with the u_τ of the wall cell its wall point belongs to. A still flow over a still wall has u_τ = 0, which damps the eddy viscosity fully.

Wall model. On a grid whose first cell lies above the viscous sublayer, the bounce-back cannot carry the wall stress and damping cannot help. The wall model (wall_model: "musker") samples the velocity at the second cell off the wall, solves Musker’s profile for u_τ there, and rebuilds every population of the wall cell from the profile’s velocity at the first cell, its density and its regularised stress; the cell relaxes with a mixing-length eddy viscosity (κ = 0.384, A⁺ = 26) in place of Smagorinsky’s. The method, its parameters, its reported wall force and its validation are in Large-eddy simulation.

Spalart–Allmaras model

A one-equation Reynolds-averaged model (Spalart and Allmaras 1994, with the f_t2 term, the limited S̃ and the negative form of Allmaras, Johnson and Spalart 2012). ν̃ is transported on the lattice cells (first-order upwind advection in advective form, conservative central diffusion, bounded, sub-stepped where its coefficients need it), and ν_t = ν̃ f_v1 enters every collision through the same explicit-rate route as Vreman’s model. Each cell reads its exact distance to the nearest no-slip wall (a separable distance transform, Felzenszwalb and Huttenlocher 2012; it crosses periodic faces). ν̃ is part of a checkpoint.

Without a wall model, walls are halfway bounce-back, ν̃ = 0 on them, and the boundary layer must be resolved (the first cell’s centre at y⁺ 1 or below). In a wall-resolved channel at Re_τ 180 the lattice solution converges at second order to the model’s own 1-D solution, which differs from Moser, Kim and Mansour’s DNS by +1.1 % in bulk velocity, +0.8 % at the centre line and −2.1 % in skin friction: the model’s error, not the solver’s (verification). On resolved walls the fluid keeps the laminar floor on τ⁺ (0.505): ν_t goes to 0 at a wall, so it does not hold the wall cells stable as a subgrid model’s does. It does not add to a subgrid model, it replaces one.

Its own wall law (wall_model: "spalart_allmaras_bounce", crates/lbm/src/sa_law.rs). In a layer of constant total stress χ = κ y⁺ solves the model’s steady equation exactly at every height (S̃ = u_τ/(κ y), r = 1, f_w = 1, the f_t2 terms cancel, and c_w1 = c_b1/κ² + (1 + c_b2)/σ balances the rest: Spalart and Allmaras, AIAA-92-0439, 1992, sections “Near-wall region, high Reynolds number” and “finite Reynolds number”, eqs. 7–9; the same model as their 1994 paper). The velocity that goes with it is u⁺(y⁺) = ∫₀^y⁺ dy/(1 + κ y f_v1(κ y)), with nothing fitted: u⁺ = y⁺ in the sublayer, the log law with κ 0.41 and the intercept 5.033 above (derived from the integral, not chosen). With x = κ y the integrand is (x³ + a)/(x⁴ + x³ + a), a = c_v1³, so the integral is evaluated in closed form (the quartic factored into two real quadratics, partial fractions, two logarithms and two arctangents), and u_τ is inverted by bisection at the geometric mean of a bracket, at most 62 steps (the starting bracket spans less than 2⁹ in ln y⁺, and 52 more halvings reach the last bit). The wall is Han et al.’s on-node wall (below): each boundary node takes ρ u_τ² of this law at its interior node one cell away, and after ν̃’s transport the interior node’s ν̃ is set to κ u_τ y, the model’s exact value there. The boundary nodes are outside ν̃’s field; the interior node’s face to its node is a wall one cell away (ν̃ = 0 on the node), and the wall distance is measured from the node plane. The boundary nodes do not collide and the first cells that do carry the law’s ν_t, so with the regularised and hybrid collisions the fluid’s own τ⁺ may go down to 0.5001, as with a subgrid model; the TRT collision keeps 0.505 (it is unstable in an oblique stream near the lower floor, #1063). The split is the same as with spalding_bounce (#1101): each node hands the fluid the law’s stress less its half cell’s body force, ½ ρ a, and takes that force back with its momentum, so the walls carry the whole body force of the box, a δ per wall, for either law (the split is applied after the law’s dispatch). In the 1-D model of the lattice channel at Re_τ 1000 the law’s own error at y⁺ 62 and 100 is +1.2 % and +2.2 % of C_f against the wall-resolved model, the figures the sa-wall notes give. Limitation: the law assumes the first node lies in a log layer of constant stress, y₁ ≪ δ. At Re_τ 182 the first node at y⁺ 30 or 61 is a sixth or a third of the way to the centre line, and C_f is +19 % or +41 % above the wall-resolved model’s; use it where the first node is a small fraction of δ. The channel against the wall-resolved model and Lee and Moser is in verification.

Refused, with a message that names the model: another wall model (musker, spalding_bounce: another law’s stress would disagree with the ν̃ the model keeps at the wall), interpolated walls and the hybrid collision’s dynamic σ (both backends); on the GPU also heat, fans and porous zones, and a box face with two kinds of cell (an inlet patch). backend: "cpu" runs these.

On the GPU each sub-step’s Δt is chosen on the device from that sub-step’s largest coefficient sum, by the CPU’s rule (parts = ⌈largest sum × time left⌉, Δt = time left / parts, so Δt Σ coefficients ≤ 1), with at most 64 sub-steps per time step; a time step that needs more is refused, as on the CPU. In single precision the product Δt × largest sum is checked and one more part taken where it is not below 1.

Algorithm

Each time step, before the collision:

  1. Damping (van_driest). Each wall cell’s u_τ is solved from Spalding’s law, in parallel, each wall cell’s its own: u⁺ y⁺(u⁺) = U y / ν is bracketed between 0 and √(U y / ν), started at the log law, and refined by Newton steps guarded by bisection, at most 100 (SPALDING_ITERATIONS). A speed or a Reynolds number that is not a positive finite number gives u_τ = 0.
  2. Wall model (wall_model). With "musker", each wall cell whose second cell is fluid inside the box samples that cell’s velocity and stores its modelled velocity and relaxation rate. A wall cell whose second cell is not fluid inside the box keeps the bounce-back alone. With "spalding_bounce" (Han et al.‘s eq. 14, crates/lbm/src/bounce.rs), each boundary node (the outermost cell layer at a wall face; the wall passes through its centre) takes the stress τ = ρ u_τ² along the velocity parallel to the wall of the interior node one cell above it, u_τ the root of Spalding’s law with κ 0.41 and B 5.5 at y = Δx, ρ that node’s density. The boundary nodes do not collide: after the fluid cells’ collision each runs eq. 14 instead (axis and wall-parallel populations bounced back; each diagonal into the fluid the specular image of the one arriving from the fluid, ∓τ/2 along the wall; each diagonal into the wall its opposite’s value; the rest population kept). The streaming is unchanged; populations that would arrive from outside the box are replaced by the images of those from the fluid (they reach only the populations that leave the box), so each node keeps its mass. The node hands the fluid the stress less its half cell’s body force, ½ ρ a (a the body acceleration of its cell, ρ the interior node’s density): the node’s cell spans half a cell into the fluid, and the balance of mean forces in a fully developed channel (S. B. Pope, Turbulent Flows, Cambridge University Press 2000, doi:10.1017/CBO9780511840531) gives the stress at the half cell’s inner face as τ_w − ½ ρ a Δx. The wall’s force is the momentum the nodes take from the fluid plus that ½ ρ a: τ along the wall per node and step, to round-off, and 2 Σ f + ½ ρ a_n along the normal, so the walls carry the whole body force of the box (issue #1101). In a laminar channel the profile is the Poiseuille parabola shifted by the slip a Δx²/(2ν) (the law’s u_1 = a δ Δx / ν against the parabola’s a (δ − ½Δx) Δx / ν); the slip alone raises the bulk speed by 6/(M(M+1)), M = 2N the wall-to-wall cells: 8.3 %, 2.2 % and 0.57 % at N = 4, 8, 16. The test the_laminar_on_node_profile_is_the_parabola_shifted_by_the_slip pins it, to the weakly compressible bound 9 u_max³. The recorded wall force is the two-step mean of the per-step total (flux + ½ ρ a). The boundary nodes are no fluid cells: no eddy viscosity, no part in their neighbours’ finite-difference gradients (one-sided there), left out of the cell count, the mass, the mean velocity and the fields. With damping, the interior nodes are the wall cells, one cell from the wall. The GPU runs the same scheme (node_bounce; GPU backend, “Han et al.’s on-node wall-function bounce”), within 10⁻⁴ of the CPU’s velocity and 10⁻³ of its wall drag from the first step.
  3. Collision. For each fluid cell: the flux P from its populations; the cell’s constant C, scaled by 1 − exp(−y⁺/A⁺) with damping (taken as 1 from y⁺/A⁺ = 40, where it rounds to 1); the cell’s rate from the closed form above, or the fluid’s own rate where the result is not a finite number at least τ₀ (a zero or hostile flux or density); a modelled wall cell relaxes with its wall-model rate instead. The cell’s ν_t = (τ − τ₀) / 3 is kept for the reply’s maximum and, with heat, for the scalar lattice.
  4. Heat. The scalar lattice collides each cell with τ_T raised by 4 ν_t / Pr_t.

The wall distances are spread once, when the flow is built. The spreading may lower each cell’s distance at most 64 times on average (MAX_UPDATES_PER_CELL); past that the run is refused with Limit (“the wall distances did not settle”). Damping and the wall model build the wall cells from the no-slip links only: slip faces have no friction and are left out.

If a damped run goes unstable, its error adds the largest first-cell y⁺, stating that the grid does not resolve the wall when it is past y⁺ 5.

Output

solve.fluid adds to its reply:

FieldMeaning
eddy_viscosity_ratioThe largest ν_t / ν over the fluid cells in the last step (null without a turbulence model). Under the wall model it includes the wall cells’ mixing-length viscosity.
warningsWith damping, a warning when the first cells off the walls reached y⁺ above 5 at the end of the run: the grid does not resolve the wall.

The flow fields, wall forces, heat and the steady-state report are those of any fluid step (Fluid results). A turbulent flow never settles to a tolerance; the running mean stop rule (steady.averaging) is described in Steady state and averaging.

Worked example

The flow-past sample (air past an L-bracket on the floor) with its inlet speed raised from 25 mm/s to 100 and 200 mm/s, solved with and without Smagorinsky’s model. On the sample’s 2.5 mm grid the relaxation time falls toward ½ as the speed rises; the model decides whether the run is accepted and whether it stays stable.

Geometrythe upright L-bracket (60 × 40 × 50 mm, upright facing the inlet) on the floor of a 240 × 120 × 100 mm box
Cells2.5 mm: 184 320 (182 304 fluid)
Fluidair, ρ = 1.2 kg/m³, μ = 1.8 × 10⁻⁵ Pa s
Boundariesx_min velocity U, x_max pressure 0, floor no-slip, sides and top slip; initial velocity U
CasesU = 100 mm/s (Re 333 on the 50 mm upright, τ = 0.509), 4 s; U = 200 mm/s (Re 667, τ = 0.5045), 2 s; both 3 200 steps, ten frames
Turbulencenone, or {"type": "smagorinsky", "constant": C} with C = 0.1 and 0.17
Collisiontrt, regularized, mrt
Unitsmm, t, s, N, MPa

The 200 mm/s case with C = 0.17 (the others change velocity, initial_velocity, end_time, collision and turbulence, or leave turbulence out):

[
  {"command": "file.sample", "params": {"name": "flow-past"}},
  {"command": "model.fluid_domain.edit", "params": {"name": "Wind", "material": "Air",
    "min": [-60, -40, 0], "max": [180, 80, 100], "spacing": 2.5,
    "faces": {"x_min": {"type": "velocity", "velocity": [200, 0, 0]}, "x_max": {"type": "pressure", "pressure": 0},
              "y_min": {"type": "slip"}, "y_max": {"type": "slip"}, "z_min": {"type": "wall"}, "z_max": {"type": "slip"}},
    "obstacles": ["Bracket"], "initial_velocity": [200, 0, 0]}},
  {"command": "model.step.edit", "params": {"name": "Flow", "procedure": {"type": "fluid", "domain": "Wind",
    "end_time": 2, "frames": 10, "collision": "regularized",
    "turbulence": {"type": "smagorinsky", "constant": 0.17}}}},
  {"command": "solve.fluid", "params": {"backend": "cpu"}},
  {"command": "results.slice", "params": {"field": "velocity", "axis": "y", "position": 20}},
  {"command": "results.streamlines", "params": {"show": false}}
]

Results from the solve.fluid replies (Apple M4 Max, CPU; each completed run 9–16 s). The drag is the x component of the bracket’s face forces summed, mean over the last quarter of the run; eddy_viscosity_ratio is the largest ν_t / ν in the last step.

U = 200 mm/s, regularised collision:

TurbulenceOutcomeeddy_viscosity_ratioDrag (mean)max_speedmass.relative_change
nonerefused: “the relaxation time τ = 0.50450 is below 0.505: the grid cannot resolve viscosity 0.000015 at this time step (cell Reynolds number 33.3); … or add a turbulence model (turbulence)”————
C = 0.1completed0.9801.00056 × 10⁻⁴ N443.8 mm/s−1.94 × 10⁻³
C = 0.17completed1.8379.9395 × 10⁻⁵ N414.4 mm/s−1.70 × 10⁻³

Both completed runs carry the warning that τ = 0.5045 is below 0.508, where even the regularised collision went unstable on a coarse bluff-body grid.

U = 100 mm/s:

CollisionTurbulenceOutcomeeddy_viscosity_ratioDrag (mean)
trtnoneunstable at time step 668——
trtC = 0.1unstable at time step 837——
trtC = 0.17completed; warnings: τ = 0.5090 close to ½, density varies by 30.6 %2.8562.2099 × 10⁻⁵ N
regularizednonecompleted—2.4658 × 10⁻⁵ N
regularizedC = 0.1completed0.3182.4909 × 10⁻⁵ N (+1.0 %)
regularizedC = 0.17completed0.9202.5358 × 10⁻⁵ N (+2.8 %)
mrtC = 0.17unstable at time step 130 (lattice speed 0.509)——

What to look at. At 200 mm/s the fluid’s own τ⁺ = 0.5045 is below the 0.505 floor and the step is refused; with the model the floor is 0.5001 (MIN_TAU_TURBULENT) and the run completes. The eddy viscosity scales with C²: from C = 0.1 to 0.17 its largest ratio rises 1.9 times (0.98 → 1.84, against 2.9 times for C²), the peak speed falls 7 % and the mean drag moves by 0.7 %. At 100 mm/s with the two-relaxation-time collision the model is what keeps the run stable: C = 0.1 only delays the instability (step 837 against 668), C = 0.17 holds it, at a peak ν_t/ν of 2.9 and with the reply’s warning of a 30.6 % density variation (the weakly compressible error). With the regularised collision the same flow is stable without a model, and the model adds viscosity to the laminar wake, raising the drag by 1.0 % and 2.8 %: the eddy viscosity acts wherever the flow shears, laminar flow included. This grid does not resolve the wall (the floor’s first cell is 1.25 mm off it), so no damping is used; a wall-modelled channel is in Large-eddy simulation.

Verification

Theory (crates/lbm/tests/turbulence.rs, crates/lbm/tests/mrt.rs; CPU, every run):

CaseReferenceResultToleranceTest
Plane Couette, 16 cells, C = 0.4 (ν_t/ν > 0.05), TRT and regulariseduniform ν_t = (C Δx)² U/h, linear profile, wall shear ρ (ν + ν_t) U/hprofile, shear and ν_t/ν within toleranceprofile 2e-3 of U; wall shear 0.2 %; ν_t/ν 0.2 % (regularised), 20 % (TRT: the cells next to the walls read a little more flux)couette_flow_takes_the_smagorinsky_viscosity_of_its_shear
The same, MRTthe samewithin tolerancewall shear 0.2 %; ν_t/ν 2 %smagorinsky_couette_flow_takes_the_closed_form_eddy_viscosity
Simple shear, the closed form aloneν₀ + C² γexact1e-12turbulence::tests::simple_shear_gets_the_smagorinsky_viscosity
Plane Poiseuille, C = 0.4, 8 → 64 cellsthe laminar parabola; the eddy viscosity’s error falls like Δx²observed orders TRT 1.970, 1.993, 1.998; regularised 1.839, 1.906, 1.950each above 1.8, the last within 0.06 of 2with_the_model_on_poiseuille_converges_to_the_laminar_profile_like_dx_squared
Taylor–Green vortex, C = 0.4, 16 → 64 cellsthe laminar decaysecond orderabove 1.8with_the_model_on_taylor_green_approaches_the_laminar_decay_to_second_order
Heated Couette, C = 0.4, Pr_t = 0.9steady drop q h / (ρ c (α + α_t)), α_t = ν_t / Pr_twithin tolerance0.2 %heated_couette_flow_conducts_with_the_turbulent_diffusivity
Lid-driven cavity 48², Re 5000 (cell Reynolds number 104, τ⁺ = 0.5029)refused without a model; stable with onerefused without; C = 0.17 stable over 4000 steps—the_closure_holds_a_cavity_too_fast_for_the_lattice_alone
Couette at h⁺ = 10, A⁺ = 26 (damping)wall distances exactly the half-cell offsets; largest ν_t/ν the undamped value times the factor squared at the farthest cell (y⁺ ≈ 4.7, factor 0.165)within toleranceν_t/ν 2 % (regularised), 20 % (TRT); first-cell y⁺ 1 %; wall shear the laminar one within 0.2 %van_driest_damping_scales_couette_flow_s_eddy_viscosity_by_the_wall_factor
Pipe of radius 1, 8 cells per radius (wall distance)R − rwithin 0.75 cell (staircase)0.75 cellwall_distances_in_a_pipe_follow_its_radius
Couette, 4 cells, first cell at y⁺ ≈ 12, dampedthe unresolved-wall warningwarned; undamped and resolved grids not—damping_on_a_wall_the_grid_does_not_resolve_is_warned_about
Han et al.’s eq. 14 (spalding_bounce) on one node, the paper’s numbering mapped by vectorevery assignment of eq. 14a–c; the node’s 19 populations, the incoming and outgoing ones; the momentum takenexact; mass and momentum to round-off on every face1e-15eq_14_assigns_every_population_of_a_node_on_the_floor, eq_14_conserves_mass_and_carries_the_stress_on_every_face
On-node bounce, perturbed coarse channel (13 cells across, walls through the outermost centres), 40 steps, TRT, regularised, HRRthe walls carry the sampled stresses along them; momentum budget P(t + 1) − P(t) = a M + Σ ½ρa − F with the populations in flight at the nodes; Spalding’s law at one cell; the stress along the interior node’s velocity; massto round-offbudget 2e-13, carried 2e-14, law 5e-14, direction 2e-17, mass 8e-14the_on_node_bounce_gives_the_walls_exactly_the_law_s_stress
On-node bounce, steady force-driven channel (4 cells per δ, 4 × 9 × 4 cells, periodic, TRT, 6000 steps, laminar, a = (10⁻⁵, −5·10⁻⁶, 0))the law’s stress sums to the body force on the fluid and the half cells, a (M + ½ Σ ρ); the walls along and along the normal carry it; the half cells’ shareto round-offlaw −5e-13, walls along −5e-13, walls normal −2e-12, share −6e-16the_law_s_stress_balances_the_whole_body_force_in_a_steady_channel
On-node bounce: grid relation, readback, damping distances, refusals (moving wall, edge with a non-periodic face, obstacle, box under 3 cells), 1, 3 and 7 threadsas statedas statedexactthe_boundary_nodes_are_the_outermost_layers_and_not_fluid, damping_measures_the_distance_from_the_wall_through_the_nodes, the_on_node_bounce_refuses_what_it_does_not_support, on_node_results_are_bit_for_bit_the_same_on_one_and_many_threads
Stationary toy: the k_x = π mode of the wall rows, 1e-6 seeded on a steady laminar base, on-node, regularised, τ̄ 0.5015, u⁺ 5the mode does not grow−1.2e-4 per step≤ 0the_on_node_bounce_damps_the_odd_even_mode_of_its_wall_rows
The same, both forms × regularised, HRR, MRT (from τ̄ 0.505), TRT × τ̄ 0.50015–0.8 × u⁺ ≈ 5, 11 (heavy)the growth rate per step, printed (docs/verification.md, “the odd–even mode of the wall rows”)on-node −2e-5 to −1.6e-2, every case; halfway +6e-5 to +0.13, every caseprintedthe_odd_even_mode_of_the_wall_rows_across_forms_collisions_and_tau
Disabled-model diagnostic only: wall-function bounce (spalding_bounce_halfway), perturbed coarse channel, 40 steps, every collisionthe walls carry the sampled stress; momentum budget P(t + 1) − P(t) = a M − F; Spalding’s law; massto round-off3e-15, 3e-14, 3e-14, 4e-14the_wall_function_bounce_gives_the_walls_exactly_the_law_s_stress
Wall-function bounce on a moving wallrefused, naming the facerefused—the_wall_function_bounce_refuses_a_moving_wall
Damped and wall-modelled cavity, 1, 3 and 7 threadsbit-for-bit equalityequalexactdamped_results_are_bit_for_bit_the_same_on_one_and_many_threads, wall_modelled_results_are_bit_for_bit_the_same_on_one_and_many_threads

Vreman’s model (crates/lbm/src/vreman.rs unit tests, crates/lbm/tests/vreman.rs; CPU, every run):

CaseReferenceResultToleranceTest
Zero gradient; each single component ∂_i u_j; one row (eq. 14) and one column (eq. 15) of αν_t = 0 (Vreman §II)0 exactlyexactzero_and_rank_one_gradients_give_zero_exactly
General rank-one gradient a bᵀν_t = 0below 1e-9 (round-off)1e-9the same
Rigid rotation u = Ω (−y, x, 0)ν_t = c Δx² |Ω| / √2within 1e-15 relative1e-15a_rigid_rotation_has_c_omega_over_root_two
Axisymmetric strain s (x, y, −2z); plane strain s (x, −y, 0)c √(3/2) |s|; c |s| / √2within 1e-15 relative1e-15strains_have_their_closed_forms
Sum of squared minors against eq. 8, 200 random gradientseq. 8within 1e-14 relative1e-14the_minors_are_eq_8
Plane Couette and Poiseuille, 16 cells, C_s 0.18, trt, regularized, mrt, hrrthe run without a modelevery density, velocity and wall force equal bit for bit; largest ν_t/ν exactly 0exactcouette_and_poiseuille_flow_are_unchanged_by_the_model_bit_for_bit
Taylor–Green vortex 16³, Re 50, t 3.1, trt and hrrpositive ν_t, energy below the run without a modelν_t/ν up to 0.35; k 0.0671 against 0.0729 (trt), 0.0637 against 0.0695 (hrr)—the_taylor_green_vortex_takes_a_positive_eddy_viscosity_and_decays_faster
Ball channel, 1, 3 and 7 threads, trt and hrrbit-for-bit equalityequalexactresults_are_bit_for_bit_the_same_on_one_and_many_threads
Every collision, the ball channel, 40 steps; Musker’s wall model and the wall-function bounce, coarse channelsruns, the model actsν_t/ν about 0.004; finite—every_collision_runs_with_the_model, the_wall_models_run_with_the_model
Constant 0, negative, above 0.5, not finite; Pr_t out of range; van_driest givenrefused, naming the modelrefused—bad_constants_are_refused

GPU against CPU (crates/lbm-gpu/tests/verification.rs, every collision and both streaming layouts): Couette with the model on, velocity within 1e-4, wall shear within 2e-4 and ν_t/ν within 5e-4 of the CPU’s (couette_flow_with_smagorinsky_matches_the_cpu); forced Poiseuille, velocity within 2e-5 (forced_poiseuille_with_smagorinsky_matches_the_cpu); heated Couette, temperature and wall heat within 3e-4 (heated_couette_flow_with_smagorinsky_matches_the_cpu); the Re 5000 cavity over 1000 steps, ν_t/ν within 1e-3 (a_cavity_held_by_the_closure_follows_the_cpu). Van Driest damping in a coarse three-dimensional channel (6 cells per half-height, perturbed, 150 steps), on bounce-back walls and under the wall model: velocity within 1e-4 of the largest speed, density within 1e-5, ν_t/ν and the wall cells’ largest y⁺ within 1e-3 of the CPU’s (measured on an NVIDIA GB10: velocity up to 5.6e-6, ν_t/ν up to 1.2e-4, y⁺ up to 6.3e-6; a_coarse_channel_with_van_driest_damping_follows_the_cpu). The wall-function bounce with Van Driest damping in the same channel: the same tolerances, and the walls’ drag within 1e-3 of the CPU’s (measured: velocity up to 3.1e-6, drag up to 3.5e-6; a_coarse_channel_with_the_wall_function_bounce_follows_the_cpu). On the GPU the shift of the reflected populations is applied as link streaming writes them (bounce_shift), the stress sampled before the collision (bounce_sample). Vreman’s model with trt, regularized, mrt and hrr, in the coarse channel and in a periodic box with a ball (24³, ν 0.005, 200 steps), both layouts, from the same initial state: velocity within 1e-4 of the largest speed, density within 1e-5, ν_t/ν within 1e-3 of the CPU’s (measured on the GB10: velocity up to 6.9e-6, density up to 6.3e-7, ν_t/ν up to 3.3e-5; vreman_s_model_follows_the_cpu); on the GPU its gradient comes from a velocity pass before the collision (GPU backend).

Benchmark: Re_τ 180 channel (a long study, run by hand; docs/verification.md, “Long studies”). C = 0.1, regularised collision, channel 2πδ × 2δ × πδ driven by u_τ²/δ, 10 δ/u_τ of start-up discarded and 15 averaged. Reference: Moser, Kim & Mansour (1999), Re_τ = 178: U_b/u_τ ≈ 15.7, U_c/u_τ ≈ 18.3, C_f ≈ 8.18 × 10⁻³. Recorded on Windows x86_64 (PR #668), undamped:

cells per δy⁺ per cellU_b/u_τU_c/u_τC_f
1215.09.95 (−36.6 %)13.07 (−28.6 %)2.02e-2
1810.011.55 (−26.4 %)14.42 (−21.2 %)1.50e-2
247.512.81 (−18.4 %)15.60 (−14.8 %)1.22e-2
325.614.17 (−9.8 %)17.00 (−7.1 %)9.96e-3

None of these grids is within a tolerance of the reference. The bulk speed approaches it monotonically as the first cell moves toward the viscous sublayer; without damping the eddy viscosity is too large in the first cells, so the friction is too high. The heavy CI job runs the 12-cell grid with the full protocol and checks it stays turbulent and within 3 % of the recorded means (a_coarse_channel_at_re_tau_180_stays_turbulent_with_the_study_s_means); the flow is chaotic, so the means move with the platform (9.90 and 12.95 on macOS aarch64). With van_driest: 26 short probes (5 δ/u_τ discarded, 1 averaged) gave U_b/u_τ 12.42 at 18 cells per δ and 14.00 at 24, and the 12-cell grid went unstable at 2.2 δ/u_τ: at Re_τ 180 none of these grids resolves the wall (Δy⁺ = 180 / N), and damping is meant for a first cell at y⁺ ≈ 1–2.

Wall model. The wall-modelled channel against Lee & Moser (2015) and Dean (1978) is recorded in docs/verification.md and summarised in Large-eddy simulation.

Limitations

  • Smagorinsky’s and Vreman’s models, each with a constant; the filter width is the lattice spacing. Vreman’s model has no Van Driest damping.
  • The model adds viscosity wherever the flow shears, laminar flow included: a laminar answer is reached only as the grid is refined, the eddy viscosity falling like Δx².
  • Damping is meant for a wall resolved to y⁺ ≈ 1–2 at the first cell. Above y⁺ 5 the run warns, and on a coarse grid removing the eddy viscosity at the wall can make the run unstable.
  • One wall point per cell (the nearest). The wall-distance spreading does not cross periodic faces, so near one a distance may come out longer than across it.
  • No grid of the Re_τ 180 study reaches the reference: the bulk speed is 9.8 % low at 32 cells per δ, and that grid had not settled. Each grid is one realisation; no confidence interval is stated.
  • A turbulent case stopping on its running mean has not been run; the stop rule is shown on laminar vortex shedding.
  • Curved bodies need interpolated walls. With halfway walls a curved or inclined obstacle is a staircase: on a circular cylinder at Re 3900 with 16 cells per diameter it carried 13 % more drag than with walls: "interpolated". The solve warns where a connected oblique region of the surface rises at least one cell along its axis: a curved body about 7 cells across or more (a faceted one a little earlier). A smaller curved body is not flagged (Verification).

Implementation

  • crates/lbm/src/turbulence.rs: flux (the non-equilibrium flux P), omega (the cell’s rate from Hou et al.’s closed form).
  • crates/lbm/src/vreman.rs: eddy_viscosity (Vreman’s ν_t of a gradient), model_constant; crates/lbm/src/hrr.rs: gradient (the finite differences).
  • crates/lbm/src/wall.rs: Walls (wall cells, wall distances, refresh of u_τ, factor, sample and reconstruct for the wall model), friction_velocity (Spalding), musker, wall_law, unresolved_wall.
  • crates/lbm/src/flow.rs: Flow::collide (the rate per cell for each collision), collide_thermal (α_t), refresh_damping, sample_walls, eddy_viscosity_ratio.
  • crates/lbm/src/regularized.rs, crates/lbm/src/mrt.rs: the collisions’ use of the cell’s rate.
  • crates/lbm/src/setup.rs: MAX_SMAGORINSKY, TURBULENT_PRANDTL, VAN_DRIEST, MIN_TAU_TURBULENT, and the step’s checks.
  • crates/lbm-gpu/src/lbm.wgsl: smagorinsky_omega, collide_trt_rate, wall_omega, behind the override constants SMAGORINSKY and WALL_MODEL; gradient_velocity, fd_gradient, vreman_nu, explicit_omega behind VREMAN.
  • crates/lbm/src/sa.rs: the closure (its constants, f_v1, f_v2, f_w, f_t2, f_n, s_tilde, sources) and SaField (ν̃’s transport); crates/lbm/src/distance.rs: WallDistance.
  • crates/lbm-gpu/src/lbm.wgsl, native.rs: ν̃’s transport pass and the wall distance on the device, behind the override constant SA.
  • crates/model/src/steps.rs: Turbulence, WallModel.

References

  • P. R. Spalart, S. R. Allmaras. A one-equation turbulence model for aerodynamic flows. La Recherche Aérospatiale 1994(1):5–21; first as AIAA-92-0439, 1992, doi:10.2514/6.1992-439 (the wall law: its eqs. 7–9).
  • S. R. Allmaras, F. T. Johnson, P. R. Spalart. Modifications and clarifications for the implementation of the Spalart–Allmaras turbulence model. ICCFD7-1902, 2012.
  • P. F. Felzenszwalb, D. P. Huttenlocher. Distance transforms of sampled functions. Theory of Computing 8:415–428, 2012.
  • A. W. Vreman. An eddy-viscosity subgrid-scale model for turbulent shear flow: Algebraic theory and applications. Phys. Fluids 16(10):3670–3681, 2004. doi:10.1063/1.1785131
  • J. Smagorinsky. General circulation experiments with the primitive equations. Mon. Weather Rev. 91(3):99–164, 1963. doi:10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2
  • S. Hou, J. Sterling, S. Chen, G. D. Doolen. A lattice Boltzmann subgrid model for high Reynolds number flows. Fields Inst. Commun. 6:151–166, 1996. doi:10.1090/fic/006/12
  • O. Malaspinas, P. Sagaut. Consistent subgrid scale modelling for lattice Boltzmann methods. J. Fluid Mech. 700:514–542, 2012. doi:10.1017/jfm.2012.155
  • O. Malaspinas, P. Sagaut. Wall model for large-eddy simulation based on the lattice Boltzmann method. J. Comput. Phys. 275:25–40, 2014. doi:10.1016/j.jcp.2014.06.020
  • E. R. Van Driest. On turbulent flow near a wall. J. Aeronaut. Sci. 23(11):1007–1011, 1956. doi:10.2514/8.3713
  • D. B. Spalding. A single formula for the “law of the wall”. J. Appl. Mech. 28(3):455–458, 1961. doi:10.1115/1.3641728
  • P. Moin, J. Kim. Numerical investigation of turbulent channel flow. J. Fluid Mech. 118:341–377, 1982. doi:10.1017/S0022112082001116
  • P.-E. Danielsson. Euclidean distance mapping. Comput. Graph. Image Process. 14(3):227–248, 1980. doi:10.1016/0146-664X(80)90054-4
  • M. Han, R. Ooka, H. Kikumoto. A wall function approach in lattice Boltzmann method: algorithm and validation using turbulent channel flow. Fluid Dyn. Res. 53:045506, 2021. doi:10.1088/1873-7005/ac1782
  • A. J. Musker. Explicit expression for the smooth wall velocity distribution in a turbulent boundary layer. AIAA J. 17(6):655–657, 1979. doi:10.2514/3.61193
  • U. Piomelli, E. Balaras. Wall-layer models for large-eddy simulations. Annu. Rev. Fluid Mech. 34:349–374, 2002. doi:10.1146/annurev.fluid.34.082901.144919
  • R. D. Moser, J. Kim, N. N. Mansour. Direct numerical simulation of turbulent channel flow up to Re_τ = 590. Phys. Fluids 11:943–945, 1999.
  • M. Lee, R. D. Moser. Direct numerical simulation of turbulent channel flow up to Re_τ ≈ 5200. J. Fluid Mech. 774:395–415, 2015. doi:10.1017/jfm.2015.268

Large-eddy simulation

A large-eddy simulation resolves the flow’s large eddies on the lattice and models the rest with a subgrid eddy viscosity (Turbulence: Smagorinsky’s and Vreman’s models, Van Driest’s damping). Near a no-slip wall the eddies shrink with the distance from it, so a grid that resolves them there needs its first cell at y⁺ ≈ 1. At Re_τ 10³ and above that grid is too fine to run, and the wall is modelled instead: the first cell lies in the log layer, and a law of the wall supplies what the grid cannot resolve.

FieldCraft has two wall models. Each is named by the authors of the paper it is written from, and each is documented here with its measurements against that paper’s own case. Neither passes on a collision that is stable at these viscosities: the MRT runs below are void, and on the regularised and hybrid collisions both carry about half the drag or less.

Wall modelwall_modelWhat it imposesStatus
Malaspinas & Sagaut (2014)"musker"a velocity on the first fluid cellFails. On the regularised and hybrid collisions at Re_τ 1000 it carries 51–74 % too little drag, still falling when the runs end (probe runs). Its MRT runs are void.
Han, Ooka & Kikumoto (2021)"spalding_bounce"a stress on the wallFails as published (first-node sampling): 46–49 % too little drag at Re_τ 1000, about −53 % at A20. With the law read three or more cells up, about +5 % (probe).

Neither has passed the drag gate (the carried skin friction within 5 % of the DNS), so neither is recommended for engineering skin friction or pressure drop. Compared below.

Commandsmodel.step.create (turbulence.wall_model of a fluid procedure), solve.fluid
Solvercrates/lbm (CPU, f64), crates/lbm-gpu (GPU, f32): both wall models on both
Implementationcrates/lbm/src/wall.rs, crates/lbm/src/mrt.rs (Malaspinas & Sagaut); crates/lbm/src/bounce.rs (Han, Ooka & Kikumoto); crates/lbm-gpu/src/lbm.wgsl
Verified bycrates/lbm-gpu/tests/verification.rs (the two channel studies), crates/lbm/tests/wall_stability.rs, crates/lbm/tests/turbulence.rs

Synopsis

Malaspinas & Sagaut’s wall model:

{"name": "Flow", "procedure": {
  "type": "fluid", "domain": "Channel", "end_time": 2.0,
  "collision": "hrr",
  "turbulence": {"type": "smagorinsky", "constant": 0.1, "wall_model": "musker"}
}}

Han, Ooka & Kikumoto’s wall-function bounce:

"collision": "hrr",
"turbulence": {"type": "smagorinsky", "constant": 0.1, "van_driest": 26, "wall_model": "spalding_bounce"}

Both papers run the MRT collision. At the relaxation times a wall-modelled grid needs (τ⁺ 0.5001–0.5005) FieldCraft’s MRT is below its stability bound and is refused, so the examples use the hybrid collision.

model.step.create takes these fields. solve.fluid runs the step with "backend": "cpu" or "backend": "gpu".

Parameters

FieldValueMeaning
turbulence.type"smagorinsky", "vreman"The subgrid model (Turbulence). Malaspinas & Sagaut’s wall model was run with Smagorinsky’s only.
turbulence.constant0.08–0.1Smagorinsky’s C. Malaspinas & Sagaut use 0.08, Han, Ooka & Kikumoto 0.1.
turbulence.wall_model"musker"Malaspinas & Sagaut: rebuild the cells next to no-slip walls from Musker’s profile.
"spalding_bounce"Han, Ooka & Kikumoto’s eq. 14, on-node: the outermost cell layer at each plane no-slip box face is the wall. The box is periodic along the walls; no obstacles, moving walls or heat.
"spalding_bounce_halfway"Disabled because its wall-row checkerboard grows. Files preserve this selection when loaded, but solves refuse it at setup. Select a supported treatment explicitly; the on-node variant changes the wall location.
omittedThe bounce-back alone.
turbulence.van_driest26 or omitVan Driest’s damping. Han, Ooka & Kikumoto use it with their wall model; Malaspinas & Sagaut’s model replaces it, so don’t combine the two.
collision"hrr", "regularized"The papers’ "mrt" (d’Humières et al. 2002) is refused below τ⁺ = 0.50354 (Collision operators), which is where a wall-modelled grid puts it.

With a wall model the fluid’s own relaxation time may go down to τ = 0.5001 (0.50354 with "mrt"). A grid that needs a lower τ is refused with the value it needs.

When to use it

  • Use a wall model when the first fluid cell lies in the log layer, y⁺ ≈ 30–100: internal flows at Re_τ 10³ and above, such as ducts, heat-sink channels and fin passages. Plan skin friction and pressure drop with the margins under Limitations.
  • Don’t use one on a wall-resolved grid, with the first cell at y⁺ ≲ 2. Use Van Driest’s damping or no wall treatment there.
  • Don’t use one in the buffer layer (y⁺ 5–30). Neither model is validated with a first cell there.

y⁺ = y u_τ / ν, y the distance of the first cell’s centre from the wall: half a cell with Malaspinas & Sagaut’s halfway wall, one cell with Han, Ooka & Kikumoto’s on-node wall.

The two wall models compared

Malaspinas & Sagaut (2014)Han, Ooka & Kikumoto (2021)
Imposesthe first cell’s velocity, ũ(y₁)the wall’s shear stress, τ_w = ρ u_τ²
Where the wall lieshalfway along the link, half a cell below x₁through the boundary nodes’ centres; a channel 2δ wide is 2δ + Δx high
Samplesthe velocity at x₂, 3y₁ from the wallthe velocity at x₁, Δ from the wall
Law of the wallMusker’s profile (κ 0.41)Spalding’s law (κ 0.41, B 5.5)
The first cellrebuilt: equilibrium plus regularised stress, relaxed with a mixing-length ν_tthe boundary node does not collide: bounce-back plus the stress on its diagonals
Drag the flow carrieswhat the rebuilt cell carries; the model’s u_τ is 8–11 % above itτ_w exactly, to round-off (7 × 10⁻¹⁵)
Wallsany no-slip wall: exact on plane walls, within a fraction of a cell on curved onesplane box faces only
Reproducedno valid run: the Re_τ 950 runs are void (MRT below its bound)no, at A20 on the hybrid collision; the MRT run is void
Carried C_f against Deanno valid run−52 to −55 % (hybrid) at Re_τ 640

Imposing the stress closes the gap between the model and the drag that Malaspinas & Sagaut leave open: the wall takes exactly what Spalding’s law gives for the sampled velocity. It does not make the drag right. That now depends on the velocity at x₁, which the LES above the wall sets. On the hybrid collision the first three to four rows cannot carry the stress: the eddies there are smaller than the cell, the resolved stress is a third of what is needed and Smagorinsky’s ν_t is ten times too small, so the mean velocity gains 15 u_τ over rows 1–5 where the log law gains 4.6, and the wall carries half the right drag. Taking the hybrid collision’s filter away (σ 0.99 → 0.999 → 1) does not change that (U_b⁺ 26.8, 27.4, 27.6). This is the log-layer mismatch of wall-modelled LES (Kawai & Larsson 2012) at full size. The MRT runs say nothing about either wall model: they were below the collision’s stability bound.

Malaspinas & Sagaut (2014)

Before each collision, for every wall cell x₁ (a fluid cell with a no-slip bounce-back link) and the cell x₂ one link further along the wall normal:

  1. Friction velocity. The velocity at x₂, relative to the wall, gives the direction e parallel to the wall and the speed U₂. u_τ is the root of U₂ = ũ(y₂; u_τ), where ũ is Musker’s profile and y₂ = 3 y₁. The profile covers the viscous sublayer, the buffer layer and the log law in one expression. Each root is solved by Newton’s method, guarded by bisection.
  2. Velocity. x₁’s velocity is set to ũ(y₁; u_τ) e.
  3. Density. x₁’s density is the one its known populations give with that velocity, by the Zou–He relation.
  4. Stress. x₁’s non-equilibrium stress is the one its known populations carry. The unknown populations, those streaming in from the wall, are taken from their opposites.
  5. Reconstruction. All of x₁’s populations are rebuilt as the equilibrium at that density and velocity, plus the regularised non-equilibrium part of that stress.
  6. Relaxation. x₁ relaxes with ν + ν_t, where ν_t is a damped mixing-length viscosity from the profile’s shear at y₁: (κ y₁ (1 − e^(−y₁⁺/A⁺)))² |∂ũ/∂y|, with κ = 0.384 and A⁺ = 26. Smagorinsky’s viscosity applies everywhere else.

Collision. The D3Q19 multiple-relaxation-time operator maps the populations to 19 orthogonal moments, each relaxed at its own rate:

MomentsRate
energy1.19
energy square, quartic modes1.4
energy flux1.2
cubic modes1.98
the five stresses1 / (3 (ν + ν_t) + ½), per cell

Guo’s forcing enters through the moments. The rates are those Malaspinas & Sagaut use, from d’Humières et al.’s stability analysis. That analysis is for d’Humières et al.’s optimised equilibria; with the equilibria used here the collision is linearly unstable below τ⁺ = 0.50354 (Collision operators), and a step below it is refused. Every channel in this section ran below it.

Walls. The wall distance and normal come from each wall cell’s bounce-back links: exact for plane walls, and within a fraction of a cell for curved ones. A moving wall is taken relative to its own velocity. A wall cell whose x₂ is not a fluid cell inside the domain keeps the bounce-back.

Reported wall force. The wall force that solve.fluid reports is the momentum the flow transfers to the wall, the drag the simulation actually carries. It is not the stress the wall model infers at x₂. The two differ on coarse grids, as the verification below shows. The force has two parts:

  • the bounce-back’s momentum exchange on the wall cell’s links, after the rebuilt cell’s collision;
  • the momentum the reconstruction (step 5) takes from the cell: the momentum of its streamed populations less that of its rebuilt ones.

Together they close the fluid’s momentum budget every step, so at steady state the walls carry the body force exactly. A wall cell on an edge or corner, with links into more than one wall, puts all of the reconstruction’s share into the wall of its nearest link.

Reported velocity at x₁. The velocity field that solve.fluid reports gives each modelled wall cell the velocity its reconstruction imposed in the last step, ũ(y₁; u_τ) e (step 2). The cell’s populations between steps are the streamed state that the next reconstruction overwrites; in a channel their velocity is a quarter below ũ. The density reported is that of those populations, so the reported mass stays the populations’ sum. Before the first step nothing is imposed yet, and x₁ reports its initial state.

The density the reconstruction sets (step 3) does not conserve mass exactly. In a coarse channel the total mass drifts by 1e-7 to 1e-5 over the first 40 steps.

Verification: the paper’s channel at Re_τ 950

Void (#1057). These runs used the MRT collision at lattice viscosities of 5.4 × 10⁻⁵ (N = 10), 1.08 × 10⁻⁴ (N = 20) and 1.62 × 10⁻⁴ (N = 30), 22, 11 and 7 times below its stability bound of 1.18 × 10⁻³ (Collision operators). At those viscosities the collision alone, at rest and without walls, fills a periodic box with isotropic noise of 1.5–1.8 u_τ rms per component. The numbers below are kept as the record of what was run; none is a reproduction, a pass or a property of the wall model, and solve.fluid now refuses these set-ups. A rerun needs a collision that is stable there.

The paper’s channel (its §5), run exactly as it sets it up and compared on its own measures.

ItemSetting (as printed in the paper)
CasePeriodic channel, half-height δ, domain 2πδ × 2δ × 2πδ (rounded to whole cells)
Reynolds numberRe_τ 950; bulk Re_m 37 042 from Dean’s correlation
GridsN = 10, 20 and 30 cells per δ (first cell at y⁺ 47.5, 23.8 and 15.8)
ModelSmagorinsky C 0.08, D3Q19 MRT, Musker’s profile
ForcingBody force updated every step to hold the bulk velocity (their eq. 67); u_m = 0.1 in lattice units
ReferenceHoyas & Jiménez’s DNS mean profile (the Re950.prof file, Re_τ 934), as in the paper
Precisionf32 on the GPU (NVIDIA GB10)
AveragingFrom 20 δ/u_τ, at least 50 δ/u_τ, until the wall force’s 95 % half-width is below 1 %

Pass criteria, fixed before the runs: C_f by the wall model’s u_τ within the paper’s 4.22 % of Dean, and the profile error E within 15 % of the paper’s Table 1 on every grid.

NEE, paperC_f by the model’s u_τ vs DeanC_f by the carried drag vs Deanmodel u_τ / carried u_τ
102.082.11 (−1.4 %)+1.8 %−16.8 %1.106
200.991.07 (−7.5 %)+0.8 %−13.7 %1.081
300.870.83 (+4.8 %)+3.5 %−14.1 %1.098

Recorded as passing at the time; void, as above.

Readings where the paper is silent. The paper doesn’t state these; each was chosen as below, and only this combination matches its Table 1 on all three grids.

QuestionReading usedThe other readings
Which u_τ scales U⁺ and y⁺ in EThe carried u_τ (from the force balance), the DNS conventionThe model’s u_τ gives E 2–5 × below the paper’s
Which points E sums overEvery cell centre of the whole channel, M = 2NThe half channel gives E √2 higher (+37 to +52 %)
x₁’s velocityThe velocity the wall model imposes on it—
Which u_τ the paper’s C_f (their eq. 70) usesThe wall model’sThe carried drag is reported beside it

E is the paper’s eq. 69: 100/M times the root of the summed squared relative errors of U⁺ against the DNS.

The drag the flow carries. The paper reports C_f from the friction velocity the wall model infers at x₂. The flow carries less: the body force that holds the bulk velocity, which equals the drag on the walls at steady state, gives a C_f 14–17 % below Dean’s correlation on every grid. The model’s u_τ is 8–11 % above the carried one. This was read as a property of the method (it imposes a velocity on x₁, and the stress the flow then carries comes from the rebuilt populations and the bounce-back on x₁’s wall links, which nothing makes equal to ρ u_τ²); with the collision unstable it is not established. In the velocity profile the gap shows as the whole curve lying about 1–2.5 U⁺ above the DNS once it is scaled by the carried u_τ. solve.fluid reports the carried drag, so the 15 % is not a figure to plan with.

Reported velocity of the wall cells. Before #755 the velocity field the solver reported came from x₁’s populations as streamed, before the rebuild: 0.72–0.79 of the velocity the wall model imposes in this channel. The reported field now gives each rebuilt cell its imposed velocity, on the CPU and the GPU. The flow itself is unchanged.

Verification: Lee & Moser at Re_τ 1000 and 2000

Void (#1057). MRT at lattice viscosities of 5.1 × 10⁻⁵ to 1.53 × 10⁻⁴ (Re_τ 1000) and 4.6 × 10⁻⁵ to 6.9 × 10⁻⁵ (Re_τ 2000): 8 to 26 times below the stability bound. Kept as the record, as above; the agreement at Re_τ 2000, N = 30 is not a result.

Before the reproduction, the wall model ran at Re_τ 1000 and 2000 against Lee & Moser’s DNS, with the bulk held at Dean’s correlation, Smagorinsky’s C 0.08 at Re_τ 1000 and 0.1 at Re_τ 2000, and the same averaging (#749; the full record, with Re_τ 550, is in Verification and validation). Its E values used x₁’s pre-rebuild velocity, so they are not comparable with the paper’s; its C_f values are unaffected.

Re_τNfirst cell y⁺C_f, carried drag: vs Lee & Moser / vs DeanC_f, wall-model u_τ: vs Dean
10001046−11.4 % / −14.5 %+1.3 %
10002023−8.9 % / −12.1 %−0.9 %
10003016−8.7 % / −11.9 %+1.4 %
200010100refused: needs τ = 0.50007—
20002052+10.2 % / +8.9 %−3.1 %
20003033−0.7 % / −1.8 %−1.8 %

At Re_τ 1000 the 20- and 30-cell grids put the first cell below y⁺ 30, outside the method’s range. Re_τ 2000 at N = 30 is the one grid where the carried drag lands within 5 %; across the rest it is 9–15 % off, with a sign that depends on Re_τ and N.

Reproduce

FIELDCRAFT_PAPER_CHANNEL=950 cargo test --release -p fieldcraft-lbm-gpu --test verification \
  -- --ignored study_malaspinas_and_sagaut_s_channel_against_lee_and_moser --nocapture

These runs use the MRT collision at the paper’s relaxation times, which solve.fluid now refuses (below its stability bound); the command is kept as the record of how they were run.

FIELDCRAFT_PAPER_CHANNEL=950:20 runs one grid; 1 runs the Re_τ 1000 and 2000 study. The runs take 2 minutes (N = 10) to an hour (N = 30) each on a GB10.

Han, Ooka & Kikumoto (2021)

The wall-function bounce of their eq. 14 is on-node: the outermost cell layer at each plane no-slip box face is the wall, which passes through those nodes’ centres, and the first interior node x₁ lies one cell, Δ, from it. Each step:

  1. Friction velocity. The velocity at x₁ parallel to the wall gives the direction and the speed U₁; u_τ is the root of Spalding’s law (κ 0.41, B 5.5) at y = Δ, solved by Newton’s method guarded by bisection.

  2. Stress. τ_w = ρ u_τ² along that direction, with ρ the density at x₁.

  3. Boundary node. The boundary node b does not collide. After the fluid cells’ collision:

    • the axis and wall-parallel populations bounce back;
    • each diagonal into the fluid is the specular image of the one arriving from the fluid, ∓ τ_w/2 along the wall;
    • each diagonal into the wall takes its opposite’s value; the rest population is kept.

    Streaming is unchanged. Populations that would arrive from outside the box are replaced by the images of those from the fluid, so each node keeps its mass, and a node’s stress reaches the interior neighbours at x ± 1.

  4. Wall force. The momentum the boundary nodes take from the fluid: τ_w along the wall per node and step, to round-off, and the bounce-back’s 2 Σ f of the incoming populations along the normal.

The boundary nodes are not fluid cells: no eddy viscosity, no part in their neighbours’ finite-difference gradients (one-sided there), and left out of the cell count, the mass, the mean velocity and the fields. With Van Driest’s damping, x₁ is the wall cell. The GPU runs the same scheme (node_bounce), within 10⁻⁴ of the CPU’s velocity and 10⁻³ of its wall drag from the first step (GPU backend).

The spalding_bounce_halfway wall model is disabled because its wall-row checkerboard mode grows. Files preserve this selection when loaded, but solves refuse it at setup. Remove wall_model for resolved no-slip walls, or explicitly select and validate a supported treatment; the on-node variant changes the wall location. The disabled-model measurements below are diagnostic evidence, not a supported solve configuration.

Verification: the paper’s channel on MRT

Void (#1057). A20 runs at a lattice viscosity of 5.0 × 10⁻⁵ (τ⁺ 0.50015), 24 times below the MRT’s stability bound; A40 lower still. Every MRT row of this section, the sensitivity table included, is the collision’s own instability and not the channel’s turbulence. Kept as the record.

Their channel (Fluid Dyn. Res. 53:045506, 2021) as the paper sets it up: 2πD × 2D × πD, periodic in x and z, MRT with d’Humières et al.’s rates, Smagorinsky C_s 0.1 with Van Driest’s damping (A⁺ 26), driven by the constant pressure gradient of u_τ = 1, at their Mach numbers. A20 (20 cells per D, Re_τ 640, x₁ at y⁺ 32) and A40. WFB is the wall-function bounce, BB plain bounce-back. Pass criteria fixed before the runs: ε_u⁺ over the whole channel and the log-law intercept b within 15 % of their Tables 2 and 3. Recorded on Linux aarch64 (NVIDIA GB10), GPU, f32 unless stated; Hoyas & Jiménez’s U_b⁺ is about 21.7.

A20, averaged 20–150 δ/u_τU_b⁺C_f vs Deanε whole (paper)b (paper)walls carry
BB9.24+235 %0.511 (0.056)−2.55 (5.6)1.01
WFB, eq. 1414.44+53 %0.248 (0.057)1.92 (6.4)1.01
WFB, our halfway variant9.56+215 %0.499 (0.057)−2.64 (6.4)1.03
WFB, halfway variant, CPU f649.54+217 %0.500 (0.057)−2.66 (6.4)1.03

A40 with the halfway variant went unstable at 93 δ/u_τ (U_b⁺ ≈ 6.9 throughout); A40 BB was stopped at 52.5 δ/u_τ, U_b⁺ 7.88 and falling. Void. CPU and GPU agree and the walls carry the body force: the port and the momentum budget are sound, and the collision is the cause (below).

What the flow does. In A20 BB (snapshot at 35 δ/u_τ) the resolved stress −⟨u′v′⟩ carries the whole momentum flux and the eddy viscosity is small (⟨ν_t⟩/ν ≈ 3 across the channel); u′rms⁺ ≈ v′rms⁺ ≈ 5 from y⁺ 48 to the centreline (about 1 in the DNS core), and the mean profile is flat from y⁺ 48 to the centre. u′’s streamwise spectrum has a distinct band at k_x δ ≈ 31–41 (a wavelength of 3–4 cells), above the largest scale’s energy at y⁺ 48, falling by 10³ past k_x δ ≈ 43 (the cutoff is 63). That band mixes the channel into a plug, which raises the drag.

Ruled out. Hou et al.’s ν_t applies C² with Δ = Δx (the simple-shear test gives ν₀ + C²γ); Van Driest’s y is measured from the wall point; the energy mode’s rate is 1.19, not near 2; forcing and units are covered by the MRT Poiseuille tests.

Sensitivity (A20, BB unless stated, 10–35 δ/u_τ averaged, diagnostic switches not merged; the MRT rows are void):

A20, 10–35 δ/u_τU_b⁺ε wholebC_f vs Dean
MRT, C_s 0.1, damped (the paper’s)10.90.426−0.99+150 %
without damping6.80.637−5.19+466 %
C_s 0.05unstable
regularised collision, C_s 0.18.60.537−4.69+280 % (checkerboard at y⁺ 16–80)
TRT, C_s 0.1unstable at 0.4 δ/u_τ
MRT with d’Humières et al.’s optimised equilibria12.90.3250.70+88 % (same state, reached later)
C_s 0.1519.20.0666.46−7 % (v′ > u′ in the core)
C_s 0.220.40.1297.41−16 %
WFB (halfway variant), C_s 0.215.00.2071.36+44 %

Tuning the model’s constant until the bulk fits is not a reproduction, and none of these rows passes on both measures.

Cause: the collision is linearly unstable at this viscosity, at rest, without walls. A von Neumann analysis of the MRT collision (Collision operators) finds a band of waves growing by 7.9 × 10⁻³ per step at A20’s lattice viscosity of 5 × 10⁻⁵, in fluid at rest; the bound is 1.18 × 10⁻³. A periodic 12³ box at rest, with no force and no subgrid model, grows from 10⁻⁹ at that rate and overflows by step 3000, where a single relaxation time decays. With Smagorinsky’s model at C_s 0.1 a 24³ box at rest saturates by step 4000 at u′, v′, w′ rms of 4.4–4.8 u_τ (A20’s u_τ), isotropic, with ⟨ν_t⟩/ν ≈ 8.5. The channel shows that state: u′ ≈ v′ ≈ w′ ≈ 5 u_τ on every row from y⁺ 64 to the centreline, already at 1–3 δ/u_τ, and its resolved field dissipates 28 times what the pressure gradient feeds it. The band in the spectrum, the plug profile and the drag are the saturated instability, not turbulence, and none of it is driven at the walls.

Three earlier readings on this page were wrong and are withdrawn. “The pile-up is driven at the walls”: it grows at rest in a periodic box. The Taylor–Green control (study_taylor_green_vortex_dissipation, 64³, MRT with C_s 0.1, Re 1600 and 12000) “dissipates as it should”: those runs were at lattice viscosities of 3.2 × 10⁻⁴ and 4.2 × 10⁻⁵, below the bound too, and a few thousand steps from an f64 start are over before a wave growing by 7 × 10⁻³ per step shows; they are void as a control. “The documented failure of this MRT in under-resolved channels (Nathen et al. 2018)”: the cause is the viscosity bound of the collision itself, not the channel’s resolution. Smagorinsky’s model cannot hold it: its ν_t in lattice units scales with the Mach number (C² u_τ/(κ y) ≈ 8 × 10⁻⁶ at A20) and the bound does not.

Han, Ooka & Kikumoto’s clean MRT fields at lattice viscosities of 5 × 10⁻⁵ and 3.3 × 10⁻⁵ cannot come from an MRT with the published d’Humières rates and these equilibria. The paper gives neither its rates nor its damping constant, so its result cannot be reproduced from what is published.

Verification: the odd–even mode of the wall rows

In the channels our halfway variant grew a streamwise odd–even (k_x = π) mode of u_x in its wall rows, about 3 × 10⁻⁵ per step, until the run broke. A numerical linear analysis of that mode (crates/lbm/tests/wall_stability.rs) compares it with eq. 14 on-node: a periodic box 16 × (2N + 1) × 2 cells on-node, 16 × 2N × 2 halfway, N = 4, both walls modelled, no subgrid model, a body force holding the laminar base steady, and a checkerboard of 10⁻⁶ in u_x added to the first fluid row at each wall. The growth rate per step is the least-squares slope of ½ ln E of the mode’s energy over the second half of 20 000 steps, shown as the range over the regularised, hybrid (σ 0.99), MRT and TRT collisions and both aimed u⁺ (the first node’s u⁺ in brackets). The heavy test runs MRT only from τ̄ 0.505 (below its stability bound it is not run); the rows below are its sweep as rerun for #1101, the on-node ones with the half cells’ body force.

τ̄eq. 14, on-nodehalfway variant
0.50015−5.1e-5 to −1.9e-5 (5, 11)+5.6e-5 to +1.3e-4 (5, 10.8)
0.5015−2.9e-4 to −9.5e-5 (5, 8.5)+5.5e-4 to +6.4e-4 (4.8)
0.505−6.9e-4 to −3.2e-4 (5, 5.1)+1.8e-3 to +2.3e-3 (2.7; broke by step 7 500)
0.55−4.3e-3 to −2.6e-3 (1.65)+2.1e-2 to +2.4e-2 (0.85; broke by step 640)
0.8−1.6e-2 to −1.5e-2 (0.68)+0.13 (0.35; broke by step 107)

Eq. 14 damps the mode with every collision and τ̄; the halfway variant amplifies it, faster as τ̄ rises. The trunk keeps one case (on-node, regularised, τ̄ 0.5015, u⁺ 5, rate ≤ 0); the sweep is the heavy test the_odd_even_mode_of_the_wall_rows_across_forms_collisions_and_tau. It uses an explicit test-only override for the disabled halfway model; it is not a supported solve path. Old model files still retain their exact wall selection and receive an actionable error at solve setup rather than silently moving the wall to an on-node position.

Verification: the paper’s channel on the hybrid collision

The same channel on the hybrid recursive regularised collision (Jacob, Malaspinas & Sagaut 2018), a labelled change of collision: it is not unstable at rest at this viscosity, as MRT is.

set-upcollisionsubgrid model
paperMRTSmagorinsky C_s 0.1, Van Driest A⁺ 26
hrr-vremanhrr, σ 0.99Vreman C_s 0.18 (Jacob et al.’s explicit LES, case 3)
hrr-dynamichrr, dynamic σVreman C_s 0.18, which only sets σ (their case 4)
hrr-smagorinskyhrr, σ 0.99Smagorinsky C_s 0.1, Van Driest A⁺ 26

These GB10 runs predate #1101 (the walls carried a(δ − Δx/2), 2.5 % low at 20 cells per δ) and have not been rerun; the table is left as recorded.

A20, GPU f32, NVIDIA GB10, Re_τ 640, averaged 20–150 δ/u_τ; WFB is eq. 14 on-node:

set-up, wallU_b⁺C_f vs Deanε whole (paper)b (paper)walls carry
hrr-vreman, BB17.90+5.2 %0.153 (0.056)4.68 (5.6)1.00
hrr-vreman, WFB28.77−54 %0.535 (0.057)15.23 (6.4)0.99
hrr-smagorinsky, BB16.69+19 %0.171 (0.056)3.53 (5.6)1.01
hrr-smagorinsky, WFB27.94−52 %0.491 (0.057)14.30 (6.4)0.99
hrr-dynamic, BB6.23not stationary1.20 (20–70 δ/u_τ)
hrr-dynamic, WFB28.94−55 %0.607 (0.057)9.04 (6.4)1.00

Every eq. 14 run held, with no odd–even mode in the walls; the halfway variant on the hybrid collision went unstable at 39 δ/u_τ (fixed σ) and 113 δ/u_τ (dynamic σ).

Where the dissipation sits. With σ 0.99 the hybrid collision’s own viscosity ν_s/ν at k_x Δx 1.5–2.1 is about 10–18 at y⁺ 48 and on the centreline, against the subgrid ⟨ν_t⟩/ν of 0.2–1.4: the collision’s filter dissipates more than Vreman’s or Smagorinsky’s model there. It is not what sets the drag: with the filter weakened and removed (σ 0.999, 1) U_b⁺ goes 26.8 → 27.4 → 27.6. Dynamic σ drives σ to 0.006–0.007 with eq. 14 and 0.57–0.74 with BB.

Result: not reproduced at A20, with their own eq. 14. No set-up meets the gate on any wall. The hybrid collision with eq. 14 carries too little drag (C_f about half Dean’s, b two to three times theirs); the MRT run is void. BB on the hybrid collision with Vreman’s model comes nearest the DNS bulk (C_f +5 %), but it is a no-slip run at y⁺ 32, not the paper’s wall model, and its ε is three times theirs. A40 was not run.

Reproduce

FIELDCRAFT_HAN=A20,A40 FIELDCRAFT_HAN_SETUP=paper,hrr-vreman,hrr-dynamic,hrr-smagorinsky \
FIELDCRAFT_STUDY_RECORDS=<dir> \
  cargo test --release -p fieldcraft-lbm-gpu --test verification study_han -- --ignored --nocapture

FIELDCRAFT_HAN_SETUP takes a comma-separated list or all (paper when unset). WFB runs use the on-node spalding_bounce model. FIELDCRAFT_HAN_START and FIELDCRAFT_HAN_END (δ/u_τ, default 20 and 150) shorten a smoke test, which is not a result; FIELDCRAFT_HAN_CPU=1 runs on the CPU in f64. The paper set-up uses the MRT collision at A20’s relaxation time, which solve.fluid now refuses (below its stability bound); the hybrid set-ups are unaffected. Every run records (<dir>/han-<setup>-<case>-<wall>.json), from a velocity readback every 0.05 δ/u_τ:

  • per row of the folded half channel: U⁺, u′, v′, w′ rms⁺, the shear budget −⟨u′v′⟩⁺ + viscous + subgrid against 1 − y/δ, ⟨ν_t⟩/ν, and the molecular and subgrid dissipation. Vreman’s ν_t is the model’s own formula on the readback; Smagorinsky’s is an estimate, (C D Δx)² √(2 S:S) with Van Driest’s D at the nominal y⁺; dynamic σ is fieldcraft_lbm::hrr::dynamic_sigma on the readback;
  • u′’s streamwise spectrum at the row nearest y⁺ 48 and at the centreline, with the premultiplied peak and the share above k_x Δx = π/2;
  • on the hybrid collision, the scheme’s own viscosity ν_s/ν at k_x Δx 1.5, 1.8 and 2.1 and at the spectrum’s peak: the exact decay of a transverse shear wave under the collision less ν̄ k², so a pass is not credited to the subgrid model when the collision’s filter did the work.

Limitations

  • No wall model passes. On the regularised and hybrid collisions at Re_τ 1000 Malaspinas & Sagaut’s model carries 51–74 % too little drag and Han, Ooka & Kikumoto’s 46–49 % too little; their MRT runs are void (below that collision’s stability bound). Both read the law of the wall in the first cells (Verification).
  • Equilibrium boundary layers. Both laws of the wall assume an attached, equilibrium boundary layer. Separation, reattachment and strong pressure gradients are not validated.
  • Smooth walls only. No roughness.
  • No wall heat flux model. Malaspinas & Sagaut’s model leaves the thermal lattice’s bounce-back walls as they are, and the wall-function bounce refuses heat, so wall heat transfer on a wall-modelled grid is not validated.
  • Han, Ooka & Kikumoto on box faces only. The wall-function bounce needs plane box faces, periodic along the walls, with no obstacles or moving walls.

References

  • O. Malaspinas, P. Sagaut. Wall model for large-eddy simulation based on the lattice Boltzmann method. J. Comput. Phys. 275:25–40, 2014. doi:10.1016/j.jcp.2014.06.020
  • M. Han, R. Ooka, H. Kikumoto. A wall function approach in lattice Boltzmann method: algorithm and validation using turbulent channel flow. Fluid Dyn. Res. 53:045506, 2021. doi:10.1088/1873-7005/ac1782
  • J. Jacob, O. Malaspinas, P. Sagaut. A new hybrid recursive regularised Bhatnagar–Gross–Krook collision model for lattice Boltzmann method-based large eddy simulation. J. Turbul. 19(11–12):1051–1076, 2018. doi:10.1080/14685248.2018.1540879
  • D. d’Humières, I. Ginzburg, M. Krafczyk, P. Lallemand, L.-S. Luo. Multiple-relaxation-time lattice Boltzmann models in three dimensions. Phil. Trans. R. Soc. Lond. A 360:437–451, 2002. doi:10.1098/rsta.2001.0955
  • P. Lallemand, L.-S. Luo. Theory of the lattice Boltzmann method: dispersion, dissipation, isotropy, Galilean invariance, and stability. Phys. Rev. E 61:6546–6562, 2000. doi:10.1103/PhysRevE.61.6546
  • P. Nathen, D. Gaudlitz, M. J. Krause, N. A. Adams. On the stability and accuracy of the BGK, MRT and RLB Boltzmann schemes for the simulation of turbulent flows. Commun. Comput. Phys. 23:846–876, 2018. doi:10.4208/cicp.OA-2016-0229
  • A. J. Musker. Explicit expression for the smooth wall velocity distribution in a turbulent boundary layer. AIAA J. 17(6):655–657, 1979. doi:10.2514/3.61193
  • D. B. Spalding. A single formula for the “law of the wall”. J. Appl. Mech. 28(3):455–458, 1961. doi:10.1115/1.3641728
  • M. Lee, R. D. Moser. Direct numerical simulation of turbulent channel flow up to Re_τ ≈ 5200. J. Fluid Mech. 774:395–415, 2015. doi:10.1017/jfm.2015.268
  • S. Hoyas, J. Jiménez. Reynolds number effects on the Reynolds-stress budgets in turbulent channels. Phys. Fluids 20:101511, 2008. doi:10.1063/1.3005862. Mean profiles from torroja.dmt.upm.es.
  • J. C. del Álamo, J. Jiménez. Spectra of the very large anisotropic scales in turbulent channels. Phys. Fluids 15:L41–L44, 2003. doi:10.1063/1.1570830. The Re_τ 934 simulation behind Re950.prof.
  • R. B. Dean. Reynolds number dependence of skin friction and other bulk flow variables in two-dimensional rectangular duct flow. J. Fluids Eng. 100(2):215–223, 1978. doi:10.1115/1.3448633
  • S. Kawai, J. Larsson. Wall-modeling in large eddy simulation: length scales, grid resolution, and accuracy. Phys. Fluids 24:015105, 2012. doi:10.1063/1.3678331
  • U. Piomelli, E. Balaras. Wall-layer models for large-eddy simulations. Annu. Rev. Fluid Mech. 34:349–374, 2002. doi:10.1146/annurev.fluid.34.082901.144919

See also Turbulence, Collision operators, Verification and validation and the solver literature, entries C5.1–C5.5.

Requested, applied and carried stress

The channel studies distinguish the wall model’s requested stress, the traction applied through momentum exchange, and the drag carried by the flow. The model’s inferred stress is not a substitute for the reported wall force or an independent drag reference. Displayed wall velocities can contain reconstruction targets; they do not measure the momentum stored in the populations.

The original Re_τ 950 N10 case still fails carried-drag validation: requested/ carried stress is about 1.245, and carried C_f is 0.0043803 versus DNS 0.00509. That case ran MRT below its stability bound, so the numbers are a record of that run and not a measurement of the wall model. Reproducing the paper’s inferred C_f or profile measure does not establish accurate drag. The diagnostics do not repair the wall model, and completion of a study does not certify physical validation. See the wall-stress verification contract for test thresholds, scope and the known-failure regression.

Statistical acceptance of study windows

The long channel studies stop only when their averaged signal passes a shared statistical acceptance: enough complete blocks after the start-up, a narrow mean interval at two block lengths, no drift between the window’s halves and no correlation between blocks. A study that reaches its time cap without passing reports inconclusive, never steady or validated, and prints every criterion it checked. Passing says only that the mean is well sampled; drag, frequency, wall treatment and resolution still need their own reference comparisons. The thresholds, their sources and the rejection controls are in Verification and validation.

Heat transfer in the flow

A fluid domain with thermal settings carries a temperature field with the flow: a second lattice, D3Q7, advects it with the velocity of the momentum lattice and diffuses it with the fluid’s diffusivity k / (ρ c). The temperature drives the flow back through Boussinesq buoyancy. Obstacles can conduct heat (conjugate heat transfer), with their own conductivity, heat capacity and power, coupled to the fluid at every face they share, and with thermal interface layers between touching solids. A fluid whose material has a phase change melts and freezes: the lattice carries its enthalpy, the latent heat is released at the front, and the flow stops where it has frozen. The solve reports the heat into every wall and each conducting solid’s peak temperature against its limit.

Commandsmodel.fluid_domain.create / .edit (thermal), model.fluid_domain.thermal_boundary, model.fluid_domain.limit, model.material.phase_change, solve.fluid, solve.probe
Step procedure"fluid" on a domain with thermal settings
Solvercrates/lbm (CPU, f64); crates/lbm-gpu (GPU, f32), conducting solids and contacts included
MethodD3Q7 passive scalar with two relaxation times (Krüger et al. 2017; Ginzburg 2005); cell-centred finite-volume conduction in solids (Patankar 1980) coupled through anti-bounce-back links (Li, Mei & Klausner 2013)
Verified byoracle de-vahl-davis-ra1e3 … ra1e6, conjugate-cavity-centred-body, radiation-slab-lattice, stefan-two-phase, frozen-channel-poiseuille, thin-wall-series-conduction; crates/lbm/tests/thermal.rs, crates/lbm/tests/conjugate.rs, crates/lbm/tests/solidification.rs

Synopsis

{"name": "Box", "material": "Air", "min": [0, 0, 0], "max": [100, 100, 10], "spacing": 1,
 "obstacles": ["Sink", "Die", "Lid"],
 "thermal": {
   "initial_temperature": 20,
   "gravity": [0, -9810, 0], "expansion": 2.1e-4,
   "faces": {"y_min": {"type": "temperature", "value": 80}, "y_max": {"type": "flux", "value": 1000}},
   "surfaces": [{"face": {"body": "Sink", "face": "F2:top"}, "condition": {"type": "temperature", "value": 80}}],
   "solids": [{"body": "Die", "material": "Silicon", "power": 5, "limit": 95},
              {"body": "Lid", "material": "Aluminium"}],
   "contacts": [{"bodies": ["Die", "Lid"], "thickness": 0.05, "conductivity": 5}]
 },
 "baffles": [{"name": "Sheet", "axis": "y", "position": 50, "conductance": 0.5}]}

model.fluid_domain.create (or .edit) takes the domain; the numbers are in the display units (the default mm-t-s-N-MPa, with temperatures in °C). Single boundaries and limits change with:

{"domain": "Box", "at": "x_min", "condition": {"type": "adiabatic"}}
{"domain": "Box", "body": "Die", "limit": 95}

(model.fluid_domain.thermal_boundary and model.fluid_domain.limit). A fluid step on the domain (model.step.create, "type": "fluid") solves the flow and the heat together.

Parameters

thermal of the fluid domain (left out, the flow is isothermal):

FieldValueDefaultMeaning
initial_temperaturetemperature0 °CThe temperature everywhere at the start, and the reference T₀ of the buoyancy.
gravityvector[0, 0, 0]Gravity for the buoyancy; zero for none. Separate from the domain’s acceleration, which is a plain body force.
expansion≥ 0, per temperaturenoneVolumetric expansion coefficient β; required with a gravity.
faces.<face>conditionadiabaticThe thermal condition of each box face.
surfaces[{face, condition}], at most 10 000noneConditions on named faces of non-conducting obstacles; their other faces are adiabatic.
solids[{body, material, power, limit, radiation}]noneObstacles that conduct heat.
contacts[{bodies, resistance}] or [{bodies, thickness, conductivity}], at most 10 000noneThermal interface layers between two touching conducting solids.
temperature_zerokelvin0 °CThe temperature the lattice counts from (see Theory); a model from before SI storage keeps the zero of the system it was typed in.

Thermal conditions (faces, surfaces, model.fluid_domain.thermal_boundary):

typeFieldMeaning
adiabatic—No heat crosses it. At an inlet the fluid enters at the initial temperature; at an outlet it leaves at the temperature it has.
temperaturevalueHeld at this temperature; at a velocity inlet the fluid enters at it.
fluxvalue (power per area)A heat flux into the fluid; negative draws heat out. On walls only: a flux on an inlet, outlet or periodic face is refused.

Conducting solid (solids):

FieldValueDefaultMeaning
bodyobstacle namerequiredAn obstacle of the domain, listed once. Its faces exchange heat with the fluid and take no thermal condition.
materialmaterial namerequiredA density, a conductivity (isotropic, or [kx, ky, kz] along the box’s axes) and a specific heat.
powerpower0Heat generated, spread evenly over its cells; negative draws heat out. A powered solid that covers no cell centre is refused.
limittemperature, above 0 KnoneThe highest temperature it may reach (a junction or case limit); the solve reports its peak against it.
radiation{emissivity, ambient}: ε above 0 and at most 1, a temperature at or above 0 KnoneRadiation from its faces that touch the fluid to surroundings at ambient (the enclosure or room), through the fluid taken as transparent: ε σ (T⁴ − T_amb⁴) per area. Faces see only the surroundings (no view factors). CPU backend only: the GPU backend refuses it.

Thermal contact (contacts): bodies, two conducting solids that share at least one cell face; either resistance (per area, K·m²/W in SI) or thickness with conductivity (R = t / k), not both. Solids not listed touch perfectly. One contact per pair.

Thin wall (baffles of the fluid domain, beside thermal, at most 64): a zero-thickness, no-slip sheet across the whole box, separating the passages either side, with its conduction through the thickness as a conductance per area. Without thermal it is a no-slip wall only.

FieldValueMeaning
nametextUnique in the domain; its two sides report as baffle/<name>/low and /high in the heat and force histories.
axisx, y or zThe sheet’s normal.
positionlengthWhere it crosses the axis: on a lattice face strictly inside the box.
conductance≥ 0, power per area and temperatureConductivity over thickness, k / t (or 1 / R); 0 insulates.

Sheets in one domain are parallel and on distinct faces. The first version takes closed boxes (walls, moving walls and slip faces; periodic faces only along the sheet), sheets clear of obstacles, laminar flow without phase change or a free surface, on the CPU; anything else is refused. Where a sheet meets a moving box wall, the links through its edge take the wall’s motion and give it their force, as at an edge of the box. The solve reports, per sheet, its area and, with heat, the mean temperature of its low and high sides and the heat_flux into the sheet from each side (equal and opposite), in the solve’s reply; a saved file keeps each side’s heat history (heat), not yet the side temperatures.

The fluid’s material needs a positive isotropic conductivity and a positive specific heat.

Phase change of the fluid’s material (model.material.phase_change, or phase_change in model.material.create / .edit; null removes it):

{"name": "Water", "phase_change": {"latent_heat": 3.34e11, "solidus": 0, "liquidus": 0}}
FieldValueMeaning
latent_heat> 0, energy per massReleased as the material freezes (mJ/t in mm-t-s: water 3.34e11, J/kg in SI).
solidustemperatureBelow it the material is solid and does not flow.
liquidustemperature, at least the solidusAbove it the material is liquid; equal to the solidus for a pure substance’s isothermal front.

It needs the material’s specific heat. Conducting solids with a phase change are refused (only the fluid melts and freezes), and so is the GPU backend.

Theory

Temperature lattice. D3Q7 (the rest direction and the six axis directions, the first seven of D3Q19), weights ¼ and ⅛, c_s² = ¼, with the equilibrium

g_q^eq = w_q T (1 + 4 c_q·u)

at the velocity the momentum lattice just collided to (the passive-scalar double-distribution model, Krüger et al. 2017, ch. 8). It collides with two relaxation times (Ginzburg 2005): the antisymmetric part of each axis pair, which carries the heat flux, relaxes with

τ_T = 4 α + ½      (α in lattice units, α Δt / Δx²)

which sets the diffusivity; the symmetric part and the rest population relax with τ_T⁺ = ½ + Λ_T / (τ_T − ½). With Λ_T fixed at 1/12 (THERMAL_MAGIC) a steady temperature field, its walls included, does not depend on τ_T, and neither do the local wall heat fluxes (d’Humières & Ginzburg 2009); at 1/12 the heat a held-wall link takes from a conducting field is fourth-order accurate. Below τ_T = ½ + √Λ_T (0.79) the lattice keeps a single relaxation time, Λ_T = (τ_T − ½)²: a fixed Λ_T makes τ_T⁺ grow without bound as τ_T approaches ½, which a von Neumann analysis finds unstable from lattice speeds of 0.02–0.03, where the single relaxation time holds 0.25. The choice and its study are in Collision operators.

Numerical diffusion. The linear equilibrium diffuses less along the flow by (τ_T − ½) u² in lattice units, 4 u² of the diffusivity (Chopard, Falcone & Latt 2009): this bounds the lattice speed a heat problem should run at.

Boundaries. The scalar populations stream along the momentum lattice’s links:

  • a held temperature is an anti-bounce-back, g_q = −g*_q̄ + 2 w_q T_w, which puts the temperature halfway between the cells;
  • an adiabatic wall bounces back;
  • a heat flux through a wall face adds the flux to the bounced population (one axis direction crosses each wall face, so the cell gains exactly that heat);
  • an inlet holds its temperature (the equilibrium at the cell’s velocity); an outlet takes its neighbour’s populations.

Buoyancy. Boussinesq: every cell’s body force per mass gains −β (T − T₀) g, T₀ the initial temperature, through Guo’s forcing as for the constant acceleration.

Temperature scale. The lattice’s temperatures are the model’s kelvin less temperature_zero (0 °C unless the model is older than SI storage). The scheme’s walls are not invariant under a shift of the temperature scale (a wall’s bounce-back carries T u), so the zero is part of the model, never of how it is shown. Single precision (frames, the GPU) keeps the differences that drive the heat.

Turbulence. With Smagorinsky’s model each cell’s turbulent diffusivity α_t = ν_t / Pr_t raises its τ_T by 4 α_t (Turbulence).

Conduction in solids. A cell-centred finite-volume conduction on the lattice’s own cells (Patankar 1980, ch. 4). The heat through the face between two cells is g (T_b − T_a), with g the series conductance of the two half cells along the face’s axis (the harmonic mean, which keeps the flux continuous across a change of material); a held box face adds 2 k (T_w − T), a flux face its flux. An orthotropic conductivity uses each axis’s value on that axis’s faces. Explicit in time, sub-cycled so that every cell’s sum of conductances over its heat capacity stays below one.

Fluid–solid interface. Each D3Q7 link from a fluid cell into a conducting cell is an anti-bounce-back held at the interface temperature

T_i = (k_s T_s + k_f T_f) / (k_s + k_f)

the temperature halfway between the two cell centres at which the conductive fluxes of the two half cells are equal. The heat the link takes from the fluid is given to the solid cell, so the heat leaving the fluid is the heat the solid receives to round-off. That heat is affine in the solid’s temperature, a − b T_s with b = 2 w_q k_s / (k_s + k_f), so the solid takes it point-implicitly: stable for any heat capacity (an explicit link needs Σ b < C, which a corner cell of aluminium in water already breaks). Interface conditions of this kind: Li, Mei & Klausner (2013).

Thermal contacts. A thin layer (a paste, a pad, a gap filler) is not resolved: its resistance per face r adds in series with the two half cells on every face between cells of the two bodies,

g = 1 / (1/(2 k_a) + 1/(2 k_b) + r),   r = R (ρ c)_f Δx / Δt

(Incropera et al. 2011, §3.1.4). Both cells see the same g, so heat is conserved, and a resistance only lowers a conductance, so the sub-cycling limit holds as without it.

Radiation to the surroundings. A solid with radiation loses, through each of its cells’ faces shared with the fluid (one per fluid link into the cell), e (T⁴ − T_amb⁴) per step with e = ε σ Δt / ((ρ c)_f Δx) in lattice heat units, on the absolute temperature T = θ + T₀ (θ the lattice temperature, T₀ the kelvin it counts from). Inside each sub-step the loss is linearised about the cell’s old temperature and taken point-implicitly with the fluid links,

C (T' − T) = Δt' (H − b T' − q(T) − q'(T) (T' − T)),   q = n e (T⁴ − T_amb⁴), q' = 4 n e T³

(n the cell’s fluid faces, H the rest of its heat), so it stays stable however strongly the solid radiates and the heat it loses is exactly what is counted as radiated. At a steady state T’ = T and the loss is the exact quartic. The fluid neither absorbs nor emits: the radiated heat leaves the domain.

Thin walls. A sheet sits on a lattice face, where the halfway rules put a wall. Every momentum link that crosses it bounces back on its own side (Ladd 1994), so no fluid crosses it and it takes no cells. On the scalar lattice the two populations a (leaving the low side) and b (leaving the high side) through each face return as a − H and b + H, and the anti-bounce-back relation (Krüger et al. 2017, ch. 8) gives the two surface temperatures, T_low = 4 (2a − H) and T_high = 4 (2b + H) with the weight 1/8. Fourier’s law through the sheet, H = G (T_low − T_high), then closes it:

H = (a − b) G / (G + 1/8),   G = conductance Δt / ((ρ c)_f Δx)

What one side loses the other gains, face by face, so heat is conserved exactly, zero conductance passes none, and the mix factor stays below 1 for any conductance (no stability limit, no resolved cell). In the steady state the discrete profile is the exact series solution q = ΔT / (L/k_f + 1/G).

Units of the solid. Heat is counted in the fluid’s lattice heat, (ρ c)_f Δx³ per degree. A solid’s lattice conductivity is k Δt / ((ρ c)_f Δx²), its capacity ρ c / (ρ c)_f and its power P Δt / ((ρ c)_f Δx³); a solid with the fluid’s properties behaves exactly as the fluid at rest.

Steady runs. A step run to steady state (steady) scales each solid’s heat capacity down to the smallest that needs at most 4 sub-steps (STEADY_SUBSTEPS), when that is smaller: the steady temperatures do not depend on it, while a solid’s own time constant (seconds to minutes for a heat sink, against milliseconds for the air around it) would otherwise set the run’s length. The run warns that the transient before the steady state is not physical.

Melting and freezing. With a phase change the scalar lattice carries the total enthalpy in temperature units, E = T + (L / c) f_l, where f_l is the liquid fraction (Huang, Wu & Cheng 2013). The rest population’s equilibrium becomes E − T + w₀ T and the others keep w_q T (1 + 4 c_q·u), so the populations sum to E, carry the flux T u and diffuse T:

∂E/∂t + ∇·(T u) = ∇·(α ∇T)

The latent heat is released as E falls, with no source term and no iteration (the enthalpy method, Voller 1990). T and f_l follow from E: solid (f_l = 0, T = E) below the solidus, liquid (f_l = 1, T = E − L/c) above the liquidus plus L/c, and f_l linear in between, T rising from the solidus to the liquidus with it. Walls, inlets and the conjugate interface act on T as before; an inlet holds the enthalpy of its temperature. The flow stops where the fluid has frozen: every cell’s velocity carries the Carman–Kozeny resistance A (1 − f_l)² / (f_l³ + ε) per step, A = 100 and ε = 1e-4 in lattice units (Voller & Prakash 1987; MUSHY), taken implicitly like a porous zone’s (Guo & Zhao 2002). A frozen cell’s velocity is about 2ε/A = 2e-6 of what it would be, a half-frozen cell’s 1/100, and above f_l 0.95 the flow is barely touched.

Algorithm

Set-up:

  1. α = k / (ρ c) of the fluid; τ_T = 4 α Δt / Δx² + ½. τ_T below 0.505 is refused (the grid cannot resolve the diffusivity at this time step; the message gives the cell Péclet number); above 2 the run warns that the transient is coarse in time.
  2. Conditions to lattice units: a flux becomes the temperature per step it adds through one cell face, Δt / ((ρ c)_f Δx) times the flux; held temperatures are taken relative to the zero.
  3. Solids and contacts to lattice units; the conducting cells, their faces and the fluid links into them. The sub-step count is the worst cell’s conductance sum over its capacity, over 0.9; more than 64 sub-steps (MAX_SUBSTEPS) is refused (“shorten the time step”). A contact between solids that share no cell face is refused.
  4. With steady, each solid’s capacity scaled as above.

Each time step:

  1. Buoyancy: every cell’s body force from its current temperature.
  2. The momentum lattice’s collision, streaming and open boundaries (Lattice Boltzmann flow).
  3. Scalar collision with the velocity the momentum lattice collided to (τ_T raised by α_t with turbulence).
  4. Scalar streaming with the wall, interface, inlet and outlet rules above.
  5. Each cell’s temperature (with a phase change, its temperature and liquid fraction from its enthalpy); conduction in the solids by sub-steps, each solving its cells’ balance with the interface heat implicit. The liquid fractions set the next step’s resistance.
  6. A temperature that is not a number stops the run as unstable, naming the step.

The heat each wall face receives is summed over its links like the momentum exchange. Links into inlet and outlet cells are left out: the open boundary sets all their populations after streaming, so that heat never stays in the fluid (counted, a held wall meeting a held inlet reported twice its heat, #675).

Output

solve.fluid adds, with heat:

FieldMeaning
tau_thermalThe scalar lattice’s τ_T.
temperaturemin and max of the fluid’s temperature in the last frame.
heatPer wall with non-zero heat (box face or obstacle face, with its body): the power into it, final and mean over the last quarter of the history; positive into the wall.
solidsPer conducting solid: body, cells, power, heat_to_fluid (final, mean: what its faces give the fluid), radiated (final, mean: the power it radiates to the surroundings, when it radiates), temperature (min, max, mean at the end), capacity_scale (when scaled), peak and peak_time, limit, margin (limit less peak; negative over it), ok.
components_okWhether every solid with a limit stays at or under it; null when none has a limit.
frozenWith a phase change: the share of the fluid frozen at the end, the mean over the fluid cells of 1 − f_l; null without. Reported by the solve, not saved with the results.

The peak is the solid’s steady value when the run stopped as steady (its last frame), else the highest over the run’s frames (a transient peak between two frames is not seen; more frames resolve it). Every frame carries the temperature of every cell.

solve.probe reads the temperature at points (points), the heat into named walls over time (heat), and along a line (line with field temperature or wall_heat_flux). The wall heat flux of a box wall is, at a held temperature, the second-order one-sided difference through the wall and the two cell layers beside it, (8 T_w − 9 T₁ + T₂) / (3 Δx) times k; at a flux face its flux; at an adiabatic face zero. A steady rule may monitor heat on faces and the mean_temperature (Steady state and averaging).

Worked example

The heated-flow sample: air at 20 °C flows at 1 mm/s past the upright L-bracket, whose faces are held at 80 °C. It shows held-temperature surfaces, the heat each face gives the air, and the temperature carried to the outlet. The sample has no buoyancy and no conducting solid.

Geometrythe upright L-bracket (60 × 40 × 50 mm, upright facing the inlet) on the floor of a 130 × 80 × 70 mm box
Cells5 mm: 5 824 (5 504 fluid)
Fluidair, ρ = 1.2 kg/m³, μ = 1.8 × 10⁻⁵ Pa s, k = 0.026 W/(m K), c = 1005 J/(kg K)
Flow boundariesx_min velocity 1 mm/s, x_max pressure 0, floor no-slip, sides and top slip; initial velocity 1 mm/s
Thermalinitial 20 °C; x_min held at 20 °C; every bracket face held at 80 °C (surfaces); other faces adiabatic
StepHeatedFlow: TRT, 180 steps of 0.25 s (45 s), six frames
Unitsmm, t, s, N, MPa; °C, mW
[
  {"command": "file.sample", "params": {"name": "heated-flow"}},
  {"command": "solve.fluid", "params": {"step": "HeatedFlow", "backend": "cpu"}},
  {"command": "results.surface", "params": {"field": "wall_heat_flux"}},
  {"command": "results.slice", "params": {"field": "temperature", "axis": "y", "position": 20}},
  {"command": "results.streamlines", "params": {"show": false}},
  {"command": "solve.probe", "params": {"step": "HeatedFlow", "points": [[92.5, -17.5, 2.5], [92.5, -17.5, 7.5]]}}
]

The outlet values come from solve.probe at the 224 cell centres of the last interior layer, x = 92.5 mm (y = −17.5 to 57.5 mm, z = 2.5 to 67.5 mm, every 5 mm; the probe above shows its first two points); the outlet layer itself, x = 97.5 mm, is an open-boundary layer.

Results from the solve.fluid reply (0.1–0.4 s, Apple M4 Max, CPU), results.surface and solve.probe:

QuantityFieldCraftSource
tau, tau_thermal0.95, 1.362solve.fluid
temperature (fluid)20 to 79.80 °Csolve.fluid
Heat into the bracket, all faces, final−509.0 mW (mean −542.6 mW)sum of heat
Largest face heat: F2:side:l6 (upright’s downstream face, 2 000 mm²)−186.5 mWheat
End faces F2:start, F2:top (y = 0 and 40 mm, mirror images about the mid-plane)−70.53 mW eachheat
Underside F2:side:l1 (on the floor)0results.surface
Largest flux: F2:side:l5 (upright’s top, 320 mm²)−0.1644 mW/mm²results.surface
Outlet temperature, mean of the 224 cells47.52 °C (43.27 to 52.49 °C)solve.probe
Outlet temperature, weighted by the axial velocity45.85 °Csolve.probe
Volume flow through the layer5 311 mm³/s (inlet 1 mm/s × 80 × 70 mm = 5 600 mm³/s)solve.probe
Heat carried through the layer, ρ c Q (T̄ − 20 °C)166 mWfrom the above
mass.relative_change2.2 × 10⁻³solve.fluid

The reply warns that the density varies by 15.9 % at the end (the weakly compressible error).

What to look at. Heat flows from the bracket into the air, so every face’s heat is negative (positive into the wall). The diffusivity α = k / (ρ c) = 21.6 mm²/s against 1 mm/s over the 50 mm upright is a Péclet number of about 2.3: conduction carries heat nearly as fast as the flow, and the warm region reaches upstream of the upright as well as downstream. τ_T = 1.362 is above ½ + √Λ_T (0.79), so the scalar lattice collides with two relaxation times. The run is a transient of 45 s, about a third of a pass through the 130 mm box: the layer before the outlet carries 166 mW of the 509 mW the bracket gives, and the rest is still warming the box. The sample is a display demonstration on a coarse grid, not a converged heat-transfer result.

Verification

Benchmarks (oracle; docs/oracle.md). De Vahl Davis’s differentially heated cavity, Pr 0.71, two-dimensional as a one-cell-thick periodic slab, 64² cells (128² at Ra 10⁶):

CaseQuantityReferenceFieldCraftErrorTolerance
de-vahl-davis-ra1e3mean Nu1.1181.1179−0.012 %0.13 %
largest local Nu1.5051.50730.155 %0.4 %
u H/α max3.6493.6481−0.026 %0.2 %
de-vahl-davis-ra1e4mean Nu2.2432.24640.152 %0.27 %
largest local Nu3.5283.54380.448 %0.55 %
w H/α max19.61719.630.064 %0.23 %
de-vahl-davis-ra1e5mean Nu4.5194.53460.345 %0.73 %
largest local Nu7.7177.73710.261 %0.68 %
smallest local Nu0.7290.74982.85 %6.3 %
de-vahl-davis-ra1e6 (nightly)mean Nu8.88.84760.541 %1.3 %
largest local Nu17.925—known failure1.6 %
u H/α max64.6365.461.28 %1.5 %

docs/oracle.md lists every quantity of these cases (the positions of the extremes and the mid-plane velocities too). The Ra 10⁶ largest local Nusselt number is 2.7 % low on 128 cells and listed as a known failure with its reason.

Conjugate cavity (conjugate-cavity-centred-body): the same cavity at Ra 10⁵ with a centred body of side H/2, 64² cells, against House, Beckermann & Smith (1990), Table 3:

k_s / k_fReference NuFieldCraftErrorTolerance
0.24.62574.63560.214 %0.6 %
14.50614.51510.201 %0.6 %
54.32214.32980.178 %0.6 %

The grid converges at second order from above: on 48 cells +0.5 %, on 64 cells +0.2 %; extrapolated from the two, −0.22 % from the published values (conjugate_cavity_matches_house_et_al, heavy).

Theory (crates/lbm/tests/thermal.rs, crates/lbm/tests/conjugate.rs; CPU):

CaseReferenceToleranceTest
Plates held at 0 and 1, no flowlinear profile, walls halfway between cells1e-9conduction_between_plates_is_linear
Flux through one plate, the other helddrop q H / k; wall heat q A1e-6a_heat_flux_sets_the_gradient_and_the_wall_heat_balances
Plug flow from a held inletthe inlet temperature everywhere1e-3the_flow_carries_the_inlet_temperature
Graetz channel, Pe 200the wall heat the inner layers received; out as ρ c_p Q (T_bulk − T_in)1e-9 / 2 %wall_heat_from_plates_that_start_at_the_inlet_is_what_the_fluid_keeps
Periodic flow with a heat blobtotal temperature conserved1e-10a_periodic_flow_conserves_and_carries_heat
Drifting sinedecays as e^(−α k² t); at rest 0.105 (k Δx)² faster, second order; along the flow the 4 u² deficitorders > 1.8a_drifting_sine_decays_at_the_diffusivity
De Vahl Davis, Ra 10³, 16 cells, TRT and regularisedNu 1.118; hot-wall heat equals cold-wall heat2 %; 1e-3natural_convection_cavity_is_close_on_a_coarse_grid
The same, Ra 10³ on 32 and 10⁴ on 48 cells1.118, 2.2431 %natural_convection_cavity_matches_de_vahl_davis (heavy)
Local wall flux at τ_T 0.8 and 1.4independent of τ_T with Λ_T fixed3e-3 (single relaxation time: > 2e-2)local_wall_heat_flux_does_not_depend_on_the_thermal_relaxation_time
Fluid, conducting slab, fluid in seriesq = ΔT / Σ (L/k), exact discrete solution1e-9a_composite_wall_conducts_in_series
Two solids with a contactjump q R across it1e-9a_contact_resistance_drops_the_temperature_by_q_r
Thin wall between held plates, normal along x, y and z, G 0, 0.05 and 10¹²q = ΔT / (L/k_f + 1/G); side temperatures T_hot − q L_low/k_f and T_cold + q L_high/k_f1e-9thin_wall_matches_series_conduction_on_every_axis (crates/lbm/tests/baffles.rs)
Counter-flowing Couette streams either side of the sheetu = U (1 − 2y) in both passages; the series conduction; equal and opposite shear on the sides1e-9counter_flowing_streams_either_side_of_a_conducting_sheet
Thin wall between held plates (oracle)q = ΔT / (L/k_f + 1/G) and both side temperatures1e-9thin-wall-series-conduction
Thin wall against the same wall resolved, one cell of k = G Δxthe slab’s flux and face temperatures: the series conduction with the fluid path shortened by Δx, ΔT / ((L − Δx)/k_f + 1/G); the thin wall’s, with the whole path1e-6; 1e-9thin_wall_matches_a_resolved_conducting_slab
A sheet in an isothermal flow driven by a moving wall across its edgeeach passage the half box with a resting wall in the sheet’s place, every cell at every step; the moving wall’s force twice the half box’s1e-13; 1e-12sheet_divides_an_isothermal_flow_driven_by_a_moving_wall_across_its_edge
Moving fluid either side, G 0, 0.05, 10¹²each passage’s mass; total heat; G = 0 passes none1e-11baffle_conserves_heat_and_each_passages_mass
A thin wall through commandsunits in and out; side difference = flux / G; refusals1e-9a_thin_wall_reports_both_sides (engine)
Powered die and lid, contactsolids gain power less what leaves, every step1e-9heat_crosses_a_contact_conserved_and_a_contact_must_touch
Heat-generating slabhalf the power to each plate; parabola, error s Δx² / (8 k_s), second order1e-6; 2 %; order > 1.8a_heat_generating_slab_balances_and_converges
Heated wall under a channel flowthe conduction solution2e-3a_heated_wall_under_a_channel_flow_conducts_across_it
Low-capacity cube, strong links (τ_T 0.52)stable, heat balanced every step1e-9a_low_capacity_solid_with_strong_links_stays_stable
Heated block in a channel flowheat balanced every step; at steady state its faces give the fluid its power1e-9; 1e-3a_heated_block_in_a_flow_conserves_heat
Slow block run to steady statecapacity scaled; same temperatures as a long fixed run1e-3 of the risea_steady_run_scales_a_slow_solid_and_lands_on_the_same_temperatures
Conduction limit of the House et al. cavityNu 0.7069, 1, 1.41381.5 %a_conducting_body_in_a_cavity_without_flow_matches_house_et_al
Square array of cylinders, κ 10 and 0.1, 16 cellsRayleigh’s series (Perrins et al. 1979; Godin 2012)1 %; 6 % (measured +0.55 %, −5.66 %)a_square_array_of_cylinders_conducts_as_rayleigh_s_series
Insulating cylinders on 32 and 64 cellsthe series−2.99 %, −1.21 %: first order or betterinsulating_cylinders_converge_at_first_order (heavy)
Slab on the hot plate radiating through the fluid (ε 0.9, to the cold plate’s 293.15 K), 8 and 16 cellsthe top cell’s balance (T₀ − T_c)/R₁ = (T_c − T₁)/R₂ + ε σ (T_c⁴ − T_amb⁴), exact on the lattice; measured: top cell 363.9536 K (8 cells), 362.6096 K (16) to < 10⁻⁹ K, radiation 53 % of the hot plate’s heat, the plates and the radiation closing the balance to round-off10⁻⁶ K; 10⁻⁶a_radiating_slab_balances_conduction_and_radiation
The 16-cell slab in the oraclethe same balance (Incropera & DeWitt, §3.1 and §1.3.1): top cell 362.609625 K, radiated 1.97422 W10⁻⁸ rel.; 10⁻⁶ rel.radiation-slab-lattice
Slab against limits either side of its peakpeak 7.625 °C, pass and fail2 %a_heated_slab_passes_and_fails_limits_either_side_of_its_peak

Melting and freezing (crates/lbm/tests/solidification.rs; CPU):

CaseReferenceMeasuredTolerance
Two-phase Stefan problem: liquid at +0.5 frozen from a wall at −1, melting at 0, L/c = 2 (Stefan numbers 0.5 and 0.25), frozen to 0.3Neumann’s front 2 λ √(α t), λ = 0.38341 (Carslaw & Jaeger 1959, §11.2)front within 0.97 % (64 cells per unit) and 0.27 % (128); temperatures within 9.0e-3 and 1.7e-3 of the 1.5 range1.2 %, 0.4 %; 0.8 %, 0.15 %
The samethe heat into the cold wall is the fall in the total enthalpy1.4e-14, 3.5e-141e-10
Channel between walls at −1 and +1, melting at −0.5, driven along itfrozen on the cold quarter; plane Poiseuille flow Q = a (H − y*)³ / (12 ν) in the liquid; frozen cells still+8.9 % (16 cells), +4.4 % (32): first order; frozen cells at 1e-7 of the peak speed9.5 %, 4.8 %; 5e-7
Water in a box frozen from one face, through commandsunits, the frozen share (a regression pin), refusals0.2216111e-6 relative; water_freezes_on_a_cold_face (engine)

The same two problems run through commands as oracle cases (docs/oracle.md; each case’s README has its refinement study), at the end of the run, 64 cells per unit:

CaseQuantityReferenceFieldCraftErrorTolerance
stefan-two-phasefrozen thickness0.299540.30036+0.27 %0.4 %
T in the solid, y = 0.1484−0.48624−0.485883.6e-41e-3
T in the liquid, y = 0.50780.195430.197672.2e-34e-3
frozen-channel-poiseuillefrozen share0.250.25< 1e-61e-6
largest velocity, a (H − y*)² / (8 ν)7.0312e-47.1344e-4+1.47 %2.2 %
its height0.6250.62226−2.7e-34e-3

Tests: a_freezing_front_follows_neumanns_solution, a_frozen_layer_stops_the_flow. The GPU backend refuses a phase change (melting_and_freezing_are_refused_clearly).

A measurement of a curved conjugate interface, Rahman et al.’s vented cavity with a passive conducting cylinder (40 cells), runs in the heavy job as a regression guardrail: its heated-wall Nusselt number stays within 2 % of the published 4.842449. That is not the 1 % target the case is meant for (rahman_curved_conjugate_coarse_measurement).

GPU against CPU (crates/lbm-gpu/tests/verification.rs): conduction between plates (profile within 5e-5, wall heat within 1e-4 of k ΔT A / H), a heated channel, a held inlet’s wall heat and natural convection, temperature within 2e-5 of the range and heat within 1e-4; composite wall with power, thermal contact, heated block in a channel, a conductor through the inlet and outlet, a conductor filling the box and a low-capacity solid, temperature and heat within 2e-5.

Limitations

  • Solid–fluid interfaces are staircases of cell faces: curved interfaces lose accuracy, an error of first order for insulating inclusions.
  • There is no contact resistance between a solid and the fluid.
  • Thin walls are planar, grid-aligned and span the whole box, without in-plane conduction or heat capacity; inlets and outlets, obstacles touching a sheet, turbulence, phase change, free surfaces, checkpoints and the GPU refuse them for now.
  • Radiation goes from conducting solids to the surroundings only: no exchange between surfaces (no view factors), no radiation from non-conducting obstacles or box walls, a transparent fluid, a gray surface with a constant emissivity; the solid radiates at its cell-centre temperature, half a cell from the surface. The GPU backend refuses it (#839).
  • The fluid’s conductivity is isotropic.
  • A steady run’s transient is not physical when a solid’s capacity is scaled.
  • The numerical diffusion along the flow, 4 u² of the diffusivity in lattice units, bounds the lattice speed of a heat problem.
  • The automatic time step does not take the buoyant velocity into account; it comes from the inlets, walls, pressures, fans and the driving acceleration (Lattice Boltzmann flow).
  • A solid’s peak is read from the frames: a transient peak between two frames is missed.
  • Melting and freezing: the front is diffuse over about one cell, and the liquid sees the frozen layer as a no-slip wall about a third of a cell inside it, so the flow along a front converges at first order (+4.4 % flow rate with 24 cells across the liquid). The mushy-zone resistance is a fixed lattice constant, not a permeability of the material. The density, conductivity and specific heat are the same in both phases, so there is no shrinkage and no change of conductivity on freezing. Filling (a melt front entering an empty mould) needs free-surface flow (#155). The GPU backend and conducting solids refuse a phase change.
  • The heated square cylinder in a channel (Dhiman, Chhabra & Eswaran 2005) is a pending oracle case with its reference values not yet transcribed.

Implementation

  • crates/lbm/src/flow.rs: ThermalState, collide_thermal, stream_thermal, open_boundaries_thermal, refresh_buoyancy, update_temperature, conduct; Phase, MUSHY, freezing (melting and freezing).
  • crates/lbm/src/baffle.rs: Baffle (thin walls: links, the through-wall mix, side results).
  • crates/lbm/src/conduction.rs: SolidHeat::build, series, with_resistance, smallest_capacity, MAX_SUBSTEPS.
  • crates/lbm/src/setup.rs: ThermalSetup, SolidSetup, ContactSetup, thermal_magic, THERMAL_MAGIC, the conversion of conditions, solids and contacts.
  • crates/lbm/src/solve.rs: HeatHistory, SolidResult, Peak, ComponentCheck, FluidResult::components_ok.
  • crates/lbm-gpu/src/lbm.wgsl: the scalar lattice and “Conducting solids”; native.rs solid_data.
  • crates/model/src/fluids.rs: FluidThermal, ThermalCondition, ConductingSolid, ThermalContact; crates/model/src/materials.rs: PhaseChange.
  • crates/engine/src/cmd/define.rs: model.fluid_domain.thermal_boundary, model.fluid_domain.limit, model.material.phase_change; crates/engine/src/cmd/solve.rs: the reply and solve.probe.

References

  • T. Krüger, H. Kusumaatmaja, A. Kuzmin, O. Shardt, G. Silva, E. M. Viggen. The Lattice Boltzmann Method: Principles and Practice. Springer, 2017. doi:10.1007/978-3-319-44649-3
  • I. Ginzburg. Equilibrium-type and link-type lattice Boltzmann models for generic advection and anisotropic-dispersion equation. Adv. Water Resour. 28:1171, 2005.
  • D. d’Humières, I. Ginzburg. Viscosity independent numerical errors for Lattice Boltzmann models: From recurrence equations to “magic” collision numbers. Comput. Math. Appl. 58:823, 2009.
  • B. Chopard, J.-L. Falcone, J. Latt. Eur. Phys. J. Special Topics 171:245–249, 2009.
  • Z. Guo, C. Zheng, B. Shi. Discrete lattice effects on the forcing term in the lattice Boltzmann method. Phys. Rev. E 65:046308, 2002. doi:10.1103/PhysRevE.65.046308
  • S. V. Patankar. Numerical Heat Transfer and Fluid Flow. Hemisphere, 1980.
  • L. Li, R. Mei, J. F. Klausner. Boundary conditions for thermal lattice Boltzmann equation method. J. Comput. Phys. 237:366–395, 2013.
  • F. P. Incropera, D. P. DeWitt, T. L. Bergman, A. S. Lavine. Fundamentals of Heat and Mass Transfer, 7th ed. Wiley, 2011.
  • G. de Vahl Davis. Natural convection of air in a square cavity: a bench mark numerical solution. Int. J. Numer. Methods Fluids 3:249–264, 1983. doi:10.1002/fld.1650030305
  • J. M. House, C. Beckermann, T. F. Smith. Effect of a centered conducting body on natural convection heat transfer in an enclosure. Numer. Heat Transfer A 18(2):213–225, 1990. doi:10.1080/10407789008944791
  • M. M. Rahman, M. A. Alim, S. Saha, M. K. Chowdhury. Mixed Convection in a Vented Square Cavity with a Heat Conducting Horizontal Solid Circular Cylinder. J. Naval Architecture and Marine Engineering 5(2):37–46, 2008. doi:10.3329/jname.v5i2.2504
  • W. T. Perrins, D. R. McKenzie, R. C. McPhedran. Transport properties of regular arrays of cylinders. Proc. R. Soc. Lond. A 369:207–225, 1979.
  • Y. A. Godin. J. Math. Phys. 53:063703, 2012.
  • A. K. Dhiman, R. P. Chhabra, V. Eswaran. Flow and heat transfer across a confined square cylinder in the steady flow regime: effect of Peclet number. Int. J. Heat Mass Transfer 48:4598–4614, 2005. doi:10.1016/j.ijheatmasstransfer.2005.04.033
  • R. Huang, H. Wu, P. Cheng. A new lattice Boltzmann model for solid–liquid phase change. Int. J. Heat Mass Transfer 59:295–301, 2013.
  • V. R. Voller. Fast implicit finite-difference method for the analysis of phase change problems. Numer. Heat Transfer B 17:155–169, 1990.
  • V. R. Voller, C. Prakash. A fixed grid numerical modelling methodology for convection–diffusion mushy region phase-change problems. Int. J. Heat Mass Transfer 30(8):1709–1719, 1987.
  • Z. Guo, T. S. Zhao. Lattice Boltzmann model for incompressible flows through porous media. Phys. Rev. E 66:036304, 2002.
  • H. S. Carslaw, J. C. Jaeger. Conduction of Heat in Solids, 2nd ed. Oxford, 1959 (§11.2, Neumann’s solution).

Fans and vents

A fluid domain can hold fans and porous resistance zones, both axis-aligned boxes of cells. A porous zone stands for a vent, grille, filter or perforated plate without resolving its holes: it resists the flow with the Darcy–Forchheimer law. A fan raises the pressure along its direction by its pressure–flow curve, read at the volume flow through it, so the operating point comes out of the solve where the curve meets the system’s resistance. Both act on the lattice Boltzmann flow as body forces.

Commandsmodel.fluid_domain.create / .edit (porous, fans), solve.fluid
Step procedure"fluid" on a domain with porous or fans
Solvercrates/lbm (CPU, f64); the GPU backend (crates/lbm-gpu, f32) steps them too, within the tolerances GPU states.
MethodDarcy–Forchheimer resistance through Guo’s forcing with the implicit velocity of Guo & Zhao (2002); fan curve with an under-relaxed pressure rise
Verified bycrates/lbm/tests/zones.rs; a_fan_drives_a_duct_through_a_grille_and_the_reply_reports_the_operating_point (crates/engine/src/cmd/solve.rs)

Synopsis

{"name": "Duct", "material": "Air", "min": [0, 0, 0], "max": [60, 4, 4], "spacing": 1,
 "faces": {"x_min": {"type": "periodic"}, "x_max": {"type": "periodic"}},
 "porous": [{"name": "Grille", "min": [10, 0, 0], "max": [12, 4, 4], "axis": "x",
             "resistance": {"type": "darcy_forchheimer", "permeability": 0.05}}],
 "fans": [{"name": "Fan", "min": [2, 0, 0], "max": [4, 4, 4], "direction": "+x",
           "curve": [[0, 0.002], [1.0, 0]], "relaxation": 0.05}]}

model.fluid_domain.create (or .edit) takes the domain, in the display units; a fluid step on it (model.step.create) and solve.fluid solve the flow and report each zone.

Parameters

Porous zone (porous):

FieldValueDefaultMeaning
nametextrequiredUnique among the domain’s fans and porous zones, not empty.
min, maxpointsrequiredThe box; its zone is the cells whose centres it contains.
axis"x", "y", "z"requiredThe flow’s direction through it: its thickness for a loss coefficient and the direction its flow is reported in. The resistance itself acts in every direction.
resistance{"type": "darcy_forchheimer", "permeability": K, "inertial": C₂}inertial 0K > 0 (a length²), C₂ ≥ 0 (per length).
{"type": "loss_coefficient", "coefficient": k}—k > 0: Δp = k ρ u²/2 across the zone along its axis.

Fan (fans):

FieldValueDefaultMeaning
nametextrequiredUnique among the domain’s fans and porous zones, not empty.
min, maxpointsrequiredThe box (usually one or a few cells thick).
direction"+x", "-x", "+y", "-y", "+z", "-z"requiredThe direction it blows.
curve[[Q, Δp], …], 2 to 1000 pointsrequiredVolume flow Q (volume per time) strictly increasing from 0 or more; pressure rise Δp not increasing, positive somewhere. Linear between points.
relaxation0 < r ≤ 10.01How far the pressure rise moves toward the curve’s value each time step; smaller is steadier.

A rising branch of a curve is refused: it has no stable operating point. A domain holds at most 1000 fans and porous zones together (MAX_ZONES). Every refusal leaves the model unchanged.

Theory

Porous resistance. A porous zone adds the force per volume

F = −(μ/K) u − (ρ C₂ / 2) |u| u

so a plate of thickness t crossed at the superficial velocity u drops the pressure by

Δp = (μ/K) u t + (ρ C₂ / 2) u² t

(Darcy 1856 and Forchheimer 1901, through Ergun 1952). A loss coefficient k is C₂ = k / t over the zone’s thickness along its axis, with no viscous part (loss coefficients of grids and screens: Idelchik 1996). In lattice units the acceleration is −α u − β |u| u, with α = ν Δt / K and β = C₂ Δx / 2 (for a loss coefficient α = 0 and β = k / (2 n), n the zone’s cell layers along its axis).

Implicit velocity. The resistance depends on the velocity it defines in Guo’s scheme, u = (j + F/2) / ρ. Solving that quadratic exactly keeps strong resistances stable (Guo & Zhao 2002): with v = (j + (ρ a + push)/2) / ρ,

u = v / (c₀ + √(c₀² + c₁ |v|)),   c₀ = (1 + α/2) / 2,   c₁ = β / 2

and the cell’s force is ρ a + push − ρ (α + β |u|) u, which enters the collision through Guo’s forcing term.

Fan. A fan pushes its cells along its direction with the uniform force per volume Δp / t, t its thickness. Before every step its volume flow Q is read (the mean over its cell layers of the flux Σ u_axis through each), and its pressure rise moves toward the curve’s value,

Δp ← Δp + r (Δp_curve(Q) − Δp)

so the operating point settles where the curve meets the system’s resistance curve. Beyond the curve’s last point the fan holds its end value (it never brakes the flow past free delivery); before the first, the first value.

Algorithm

Set-up:

  1. Each zone takes the cells whose centres its box contains (tolerance 1e-9 of a cell). A box that contains no cell centre is refused (“make it at least one spacing thick and put it inside the box”).
  2. Each fluid cell belongs to the first zone that contains it, porous zones first, then fans. A zone with no fluid cell (inside obstacles or another zone) is refused.
  3. A zone that reaches the layer of an inlet or outlet face is refused: zones stay at least one cell inside it.
  4. Resistances and curves to lattice units (a pressure by ρ₀ Δx² / Δt², a volume flow by Δx³ / Δt); a value that is not finite there is refused.
  5. The characteristic velocity of the automatic time step includes √(2 Δp_max / ρ) of each fan, Δp_max its shut-off pressure.

Each time step, before the collision: each fan’s flow is read and its rise relaxed toward the curve, and its push set to the rise over its thickness. In the collision, each zone cell’s velocity and force follow from the implicit formula above.

Output

solve.fluid’s reply has zones, one entry per fan and porous zone:

FieldMeaning
name, kindThe zone and "fan" or "porous".
flowThe volume flow through it along its axis (a fan’s along its direction), final and mean over the last quarter of the history.
pressure_riseA fan’s rise from its curve (its operating point), final and mean.
measured_pressure_riseA fan’s measured rise.
pressure_dropA porous zone’s measured drop (upstream by the flow’s sign).

The measured values are the static-pressure difference between the mean pressures of the fluid cell layers just outside the zone, over its footprint (its own end layers where it meets the box’s ends). They include the wall friction over the zone’s thickness plus one cell. The full histories are kept in the result, one value per history time.

Worked example

No bundled sample has a fan or a porous zone (the cooling samples drive their air with a uniform inlet velocity), so this is a small model of its own: a square air duct closed on itself through periodic ends, driven by a fan zone through a porous vent. The fan settles at the operating point where its curve meets the loop’s resistance, the vent’s Darcy loss plus the walls’ friction.

Geometryduct 100 × 10 × 10 mm, x_min and x_max periodic (a closed loop), the four long faces walls
Cells1 mm: 10 000, all fluid
Fluidair, ρ = 1.2 kg/m³, μ = 1.8 × 10⁻⁵ Pa s
FanFan, x = 10 to 12 mm, +x, curve Δp = 0.02 Pa at Q = 0 falling linearly to 0 at 5 000 mm³/s, relaxation 0.01
VentVent, x = 50 to 54 mm, axis x, Darcy, K = 0.1 mm² (10⁻⁷ m²)
StepBlow: TRT, 10 s, two frames; automatic time step 2.739 × 10⁻⁴ s (36 515 steps), τ = 0.5123
Unitsmm, t, s, N, MPa (0.02 Pa = 2 × 10⁻⁸ MPa)
[
  {"command": "model.units", "params": {"system": "mm-t-s-N-MPa"}},
  {"command": "model.material.create", "params": {"name": "Air", "density": "1.2 kg/m^3",
    "fluid": {"type": "newtonian", "viscosity": "1.8e-5 Pa s"}}},
  {"command": "model.fluid_domain.create", "params": {"name": "Duct", "material": "Air",
    "min": [0, 0, 0], "max": [100, 10, 10], "spacing": 1,
    "faces": {"x_min": {"type": "periodic"}, "x_max": {"type": "periodic"}},
    "porous": [{"name": "Vent", "min": [50, 0, 0], "max": [54, 10, 10], "axis": "x",
                "resistance": {"type": "darcy_forchheimer", "permeability": 0.1}}],
    "fans": [{"name": "Fan", "min": [10, 0, 0], "max": [12, 10, 10], "direction": "+x",
              "curve": [[0, 2e-8], [5000, 0]], "relaxation": 0.01}]}},
  {"command": "model.step.create", "params": {"name": "Blow",
    "procedure": {"type": "fluid", "domain": "Duct", "end_time": 10, "frames": 2}}},
  {"command": "solve.fluid", "params": {"step": "Blow", "backend": "cpu"}},
  {"command": "results.streamlines", "params": {"show": false}},
  {"command": "results.slice", "params": {"field": "pressure", "axis": "y", "position": 5}},
  {"command": "results.slice", "params": {"field": "velocity", "axis": "y", "position": 5}}
]

The reference is an estimate built from the duct’s parts at a mean velocity U = Q / A (A = 100 mm², D = 10 mm): the fan curve Δp = 0.02 Pa (1 − U / 0.05 m/s); the vent’s Darcy loss (μ/K) U t with t = 4 mm, 0.72 U Pa s/m; and the fully developed laminar friction of a square duct, Δp = 28.45 μ U L / D² (f Re = 56.9 on the hydraulic diameter), 0.512 U Pa s/m over the 100 mm loop. Their intersection is U = 12.26 mm/s, Q = 1 225 mm³/s. Results from the solve.fluid reply’s zones (final; the mean over the last quarter agrees to 10 digits), 14.6 s on an Apple M4 Max, CPU:

QuantityFieldCraftReferenceDifference
Fan flow1 182.40 mm³/s1 225 mm³/s (estimate above)−3.5 %
Fan pressure_rise (the operating point)1.52704 × 10⁻⁸ MPathe curve at 1 182.40 mm³/s: 1.52704 × 10⁻⁸ MPa< 10⁻⁶
Vent flow1 182.26 mm³/sthe fan’s flow−1.2 × 10⁻⁴
Fan measured_pressure_rise1.50910 × 10⁻⁸ MPathe rise less the wall friction over t + Δx = 3 mm: 1.5089 × 10⁻⁸ MPa+0.01 %
Vent pressure_drop9.3779 × 10⁻⁹ MPaDarcy (μ/K) U t = 8.513 × 10⁻⁹ MPa, plus wall friction over 5 mm, 3.0 × 10⁻¹⁰ MPa: 8.816 × 10⁻⁹ MPa+6.4 %
mass.relative_change−8.5 × 10⁻¹³0—

What to look at. The fan’s pressure_rise lies exactly on its curve at the flow it carries: the under-relaxed update has converged to the operating point. The same flow passes the vent, and the mass is conserved to 10⁻¹². The flow is 3.5 % below the estimate, and the vent’s measured drop 6.4 % above its Darcy loss plus the plain duct’s friction: the vent flattens the velocity profile, which shears the walls harder inside it, and the flow redevelops behind it (the velocity picture). The measured rise falls short of the fan’s push by the friction over three cells, as the Output section describes.

Verification

Theory (crates/lbm/tests/zones.rs, TRT and regularised collisions; one-dimensional flows, periodic across, so the resistance law is the whole pressure drop):

CaseReferenceToleranceTest
40 × 2 × 2 channel, plate 4 layers, K = 5, C₂ = 2, inlet u = 0.01 and 0.03flow 4u; Δp = ρ (ν/K u t + C₂/2 u² t), ρ the density in the plateflow 1 %; Δp 0.5 %a_porous_plate_drops_the_pressure_by_the_darcy_forchheimer_law
The same, loss coefficient k = 3, u = 0.03Δp = k ρ u²/20.5 %the same
Periodic loop, fan with a linear curve, the plate abovethe intersection of the curve’s first segment with the plate’s resistanceflow 0.5 %; rise 1 %; plate drop and measured rise 0.5 %; mass 1e-12; reply’s histories 1 %a_fan_settles_at_the_intersection_of_its_curve_and_the_system_resistance
Zones outside the box, thinner than a cell, on the inlet or outlet layerrefused, naming the zone—zones_off_the_grid_or_on_an_open_layer_are_refused

Through commands (crates/engine/src/cmd/solve.rs): a 60 × 4 × 4 walled duct loop with a fan and a Darcy grille. The fan’s rise lies on its curve within 1 %, the grille’s flow equals the fan’s within 1 %, the loop’s momentum balance (fan, grille and the duct’s wall shear) closes within 1 %, the grille’s own loss is Darcy’s within 10 % (the remainder is wall shear in the grille’s flattened profile), and the mass changes by less than 1e-10. Hostile curves, directions, relaxations, boxes, names and resistances are refused and leave the model as it was (a_fan_drives_a_duct_through_a_grille_and_the_reply_reports_the_operating_point).

GPU (crates/lbm-gpu/tests/verification/zones.rs, every collision and both layouts): the fields, flows, pressures and fan rises follow the CPU from the first steps, independent of how the steps are chunked and read back; the strong-resistance velocity is the implicit closed form; the porous drops match the laws above within 0.5 % and the fan’s operating point within 0.5 % in flow and 1 % in rise (heavy job); and with the wall model and both wall-function bounces the fields stay within 1e-4 of the largest speed. A curve or a resistance that single precision cannot hold is refused by the zone’s name, before a device is opened.

Limitations

  • Zones are axis-aligned boxes of whole cells.
  • A porous zone’s resistance is isotropic (the same law in every direction); axis sets only the loss coefficient’s thickness and the reported direction.
  • A fan is a uniform push over its cells: no swirl and no hub.
  • The measured pressure differences include the wall friction over the zone and one cell.
  • Zones stay off the inlet and outlet layers.
  • The tests cover the two-relaxation-time and regularised collisions.

Implementation

  • crates/model/src/fluid_zones.rs: PorousZone, Resistance, Fan, FanDirection, curve_value, validate_zones, MAX_ZONES, MAX_CURVE_POINTS, DEFAULT_FAN_RELAXATION.
  • crates/lbm/src/setup.rs: zones (to lattice units), ZoneSetup, ZoneKind, cell_range.
  • crates/lbm/src/flow.rs: velocity_force (the implicit velocity), refresh_fans, zone_flow, zone_samples.
  • crates/lbm/src/solve.rs: ZoneHistory.
  • crates/engine/src/cmd/solve.rs: the reply’s zones.

References

  • Z. Guo, T. S. Zhao. Lattice Boltzmann model for incompressible flows through porous media. Phys. Rev. E 66:036304, 2002.
  • Z. Guo, C. Zheng, B. Shi. Discrete lattice effects on the forcing term in the lattice Boltzmann method. Phys. Rev. E 65:046308, 2002. doi:10.1103/PhysRevE.65.046308
  • S. Ergun. Fluid flow through packed columns. Chem. Eng. Prog. 48:89, 1952.
  • I. E. Idelchik. Handbook of Hydraulic Resistance, 3rd ed., 1996.

Free surface

A fluid domain with a free surface holds liquid in part of its box and gas elsewhere, and the liquid moves through the gas: a column collapsing (a dam break), a cavity filling from a gate, a wave running up a wall. The gas is at rest at the gauge pressure 0 and carries no momentum, so the surface is a free-slip, constant-pressure boundary that moves with the liquid. Velocity inlets inject liquid, so a filling can start from an empty box. The solve tracks the liquid’s mass exactly and reports the balance, the fill level of every cell, and the liquid’s extent over time.

Commandsmodel.fluid_domain.create / .edit (free_surface), solve.fluid (free_surface in the reply), solve.probe (line with field: "fill", front, depth)
Step procedure"fluid" on a domain with free_surface settings
Solvercrates/lbm/src/surface.rs (CPU, f64); not on the GPU backend yet
MethodVolume of fluid on the lattice with interface cells: mass exchange, reconstruction from the gas and cell conversion (Körner et al. 2005; Thürey 2007)
Verified byoracle free-surface-hydrostatic-column, free-surface-plug-filling (theory), dam-break-martin-moyce (experiment); crates/lbm/tests/free_surface.rs, checkpoint.rs

Synopsis

[
  {"command": "model.units", "params": {"system": "m-kg-s-N-Pa"}},
  {"command": "model.material.create", "params": {"name": "Liquid", "density": 1000,
    "fluid": {"type": "newtonian", "viscosity": 0.2}}},
  {"command": "model.fluid_domain.create", "params": {"name": "Tank", "material": "Liquid",
    "min": [0, 0, 0], "max": [0.286, 0.00114, 0.171], "spacing": 0.00114,
    "acceleration": [0, 0, -9.81],
    "faces": {"y_min": {"type": "periodic"}, "y_max": {"type": "periodic"}},
    "free_surface": {"liquid": [{"min": [0, 0, 0], "max": [0.057, 0.00114, 0.114]}]}}},
  {"command": "model.step.create", "params": {"name": "Collapse", "procedure":
    {"type": "fluid", "domain": "Tank", "end_time": 0.19, "time_step": 3.1e-5, "frames": 6}}},
  {"command": "solve.fluid", "params": {"step": "Collapse"}},
  {"command": "solve.probe", "params": {"step": "Collapse",
    "front": {"axis": "x", "at": [[0.082, 0, 0], [0.171, 0, 0]]}}}
]

A column a = 57 mm wide and 2a high collapses in a tank 5a long under gravity, one cell deep and periodic across (a plane problem). The probe gives the surge front’s position over time and when it passed 1.44a and 3a.

Parameters

The domain (model.fluid_domain.create, .edit)

FieldValueDefaultMeaning
free_surface{…}noneA free surface. Left out, the box is full of one fluid.
free_surface.liquid[{"min": [x, y, z], "max": [x, y, z]}, …][]The regions that hold liquid at the start: the cells whose centres they contain. Everything else is gas. At most 1000; each must contain a cell centre. Empty when every drop comes in through an inlet.

With a free surface the domain takes walls, moving walls, slip faces, periodic faces and velocity inlets on its box faces, obstacles with walls and moving walls, an acceleration (gravity) and an initial velocity, and a Newtonian fluid. Everything else is refused by name as not supported yet: pressure faces, heat (thermal), a turbulence model, porous zones and fans, a shear-dependent viscosity, and the GPU backend. Surface tension is not modelled.

A velocity inlet injects liquid: its cells are liquid for good and the Zou–He condition sets the velocity. Nothing leaves the box (there are no outlets yet), so a filling ends when the box is full or the step ends.

The reply of solve.fluid

free_surface: the liquid’s initial_mass, its mass at the end, what the inlets injected, the mass_error of that balance, (mass − initial_mass − injected) over the larger of the initial and injected mass (round-off, about 10⁻¹³, when all is well: a warning names a larger one), the fill share of the fluid cells’ volume that is liquid, the counts of liquid_cells, interface_cells and gas_cells at the end, and how many cells filled and emptied over the run.

Probing (solve.probe)

  • {"step", "line": {…, "field": "fill"}}: the fill level along a line, 1 in the liquid, 0 in the gas, between in the interface cells.
  • {"step", "front": {"axis": "x", "end": "max", "at": [[x, y, z], …]}}: the liquid’s extent along the axis at every history time (times, extent: the max or min face of the cells at least half full), its volume, and per point in at the time the extent first reached the point’s coordinate along the axis, coming or going (arrivals; between two samples by linear interpolation; null when it never did). The surge front of a dam break is axis: "x", end: "max"; the column’s falling top is axis: "z", end: "max" with points at the heights of interest.
  • {"step", "depth": {"axis": "z", "at": [[x, y, z], …]}, "frame": k}: per point, the liquid in the column of cells through it along the axis in that frame, the fill levels summed times the spacing: a wave gauge’s depth, or the height of a collapsing column at its wall.
  • points and the other line fields read the liquid’s and the interface cells’ velocity and pressure; a gas cell has velocity 0 and pressure 0.

The frames’ fill levels are saved with the results. The viewport does not draw the surface yet: results.slice with pressure or velocity shows the liquid, since the gas has neither.

Theory

Every fluid cell is gas, interface or liquid. Liquid cells run the ordinary lattice Boltzmann collision and streaming, and their mass is their density. Gas cells hold no populations and do nothing. Interface cells, the one-cell layer between the two, collide and stream too, and carry a mass m apart from their density ρ; their fill level ε = m / ρ says how much of the cell is liquid (Körner et al. 2005; Thürey 2007, ch. 4).

Mass exchange. After streaming, an interface cell’s mass changes by Δm = Σ_i (f_ī(x + c_i) − f_i(x)) over its liquid neighbours and by the same weighted with (ε(x) + ε(x + c_i)) / 2 over its interface neighbours; nothing passes to a gas cell or through a wall. Each exchange is antisymmetric between its two cells, so the total mass, the liquid cells’ densities plus the interface cells’ masses, is conserved to round-off. An inlet’s mass enters through its face: the incoming populations the boundary sets less the outgoing ones that left.

Reconstruction. The populations an interface cell would receive from a gas cell at x + c_i do not exist. They are set to f_ī = f_i^eq(ρ_A, u) + f_ī^eq(ρ_A, u) − f_i(x): the equilibria at the gas density ρ_A (the gauge pressure 0) and the cell’s velocity, less the population leaving toward the gas. That makes the surface a free-slip boundary at the gas pressure. The populations arriving from the gas side of the surface normal (n · c_i > 0, n pointing from the liquid into the gas, from the central difference of the fill levels) are reconstructed too, so the balance at the surface does not depend on which cells happen to be gas.

Conversion. An interface cell whose mass exceeds (1 + κ) ρ, or that has no gas neighbour left, becomes liquid; one whose mass falls below −κ ρ, or that has no liquid neighbour left, becomes gas (κ = 10⁻³ keeps a cell from converting back in the next step). A cell that fills turns its gas neighbours into interface cells (mass 0, populations at the equilibrium of their populated neighbours’ mean density and velocity); a cell that empties turns its liquid neighbours into interface cells (mass: their density) and drops its populations. A cell next to one that fills does not empty in the same step. The mass a conversion leaves over, m − ρ of a filled cell and m of an emptied one, goes to the interface neighbours weighted by n · c_i toward the gas for a filled cell and away from it for an emptied one, evenly when no weight is positive, and into a reservoir shared out over every interface cell when there is none. Cells next to an inlet never empty.

Time step. With a free surface and an acceleration the solver’s characteristic velocity is the free-fall speed over the box’s largest extent, √(2 a L), so the automatic Δt keeps a falling liquid at lattice speed 0.05. Give time_step to control τ: the viscosity the lattice can hold is ν ≥ (τ_min − ½) Δx² / (3 Δt) with τ_min = 0.505, which for water on millimetre cells is a hundred times its viscosity. Dam breaks and fillings are driven by gravity and inertia; their fronts are insensitive to the Reynolds number once it is in the hundreds, but the grid refinement in the dam-break case’s README shows what the viscosity and the resolution cost.

Determinism. The mass exchange and the reconstruction run by fixed blocks of cells in parallel, each cell writing only its own mass and populations; the conversions run on one thread in cell order. The result is the same bit for bit on any number of threads, and a checkpointed run resumes to the same bits.

Verification

CaseKindWhat it checks
free-surface-hydrostatic-columntheoryA column at rest under gravity: ρ g (h − z) at the bottom, the surface staying, the liquid holding still, the mass to round-off.
free-surface-plug-fillingtheoryA frictionless channel filled from an inlet: the front at U t + Δx, the liquid’s volume, the mass balance.
dam-break-martin-moyceexperimentMartin and Moyce’s collapsing column (1952): the surge front’s travel times between stations and the column’s fall, against their Table 2 and Table 6.

Sources

  • C. Körner, M. Thies, T. Hofmann, N. Thürey, U. Rüde, Lattice Boltzmann model for free surface flow for modeling foaming, J. Stat. Phys. 121(1–2):179–196, 2005.
  • N. Thürey, Physically based animation of free surface flows with the lattice Boltzmann method, PhD thesis, Universität Erlangen-Nürnberg, 2007, ch. 4.
  • N. Thürey, U. Rüde, Stable free surface flows with the lattice Boltzmann method on adaptively coarsened grids, Comput. Visual. Sci. 12(5):247–263, 2009.
  • J. C. Martin, W. J. Moyce, Part IV. An experimental study of the collapse of liquid columns on a rigid horizontal plane, Phil. Trans. R. Soc. A 244:312–324, 1952.

Steady state and averaging

A fluid step is time-dependent. With a steady-state rule it stops on its own once the flow stops changing: the velocity field, the temperature field with heat, and any monitored mass flows, wall forces, wall heats and mean temperature vary over a window of flow time by less than a tolerance. For a turbulent or periodically shedding flow, which never stops fluctuating, the rule watches each quantity’s running mean instead and reports its mean, fluctuation and extremes. A divergence limit stops a run that blows up while keeping the frames saved so far.

Commandsmodel.step.create (procedure fluid, steady), solve.fluid (reply stop)
Step procedure"fluid"
Solvercrates/lbm (steady.rs), on the CPU and the GPU backend
MethodRelative spread of each monitored quantity per window; running means after a start-up
Verified bycrates/lbm/tests/steady.rs; runs_to_steady_state_stop_where_the_cpu_does (crates/lbm-gpu/tests/verification.rs)

Synopsis

A run to steady state with a monitored drag:

{"name": "Run", "procedure": {"type": "fluid", "domain": "Flow", "end_time": 20,
  "steady": {"tolerance": 1e-3, "window": 0.5, "min_time": 2,
    "monitors": [{"type": "force", "faces": [{"body": "Cylinder", "face": "side"}]},
                 {"type": "mass_flow", "face": "x_max"}]}}}

A statistically steady run of a shedding or turbulent flow:

"steady": {"tolerance": 1e-2, "window": 1.0,
  "monitors": [{"type": "force", "faces": [{"body": "Cylinder", "face": "side"}]}],
  "averaging": {"start": 4.0}}

Parameters

steady in a fluid step:

FieldValueDefaultMeaning
toleranceabove 0, below 110⁻³The relative change per window below which a quantity is steady.
windowflow timea twentieth of the step’s lengthThe flow time each change is measured over. Sampled 8 times.
min_timeflow time, not negative0No decision, steady or diverged by the limit, before this time.
divergenceabove tolerancenoneA relative change above this after min_time stops the run as diverged.
monitorsup to 100noneQuantities monitored besides the residuals (below).
averaging{"start": t}noneDecide on running means from flow time start on (start not negative).

Monitors:

typeFieldsQuantity
mass_flowface: a box faceThe mass flow out through the face: Σ ρ u_n over the face’s cell layer, times ρ₀ Δx² (positive leaving the box).
forcefaces: 1 to 1000 box faces or obstacle faces {"body", "face"}The total force of the fluid on those walls (a vector).
heatfaces: 1 to 1000The total heat the fluid gives those walls. Needs heat in the domain.
mean_temperature—The mean temperature of the fluid cells. Needs heat in the domain.

The step’s end_time or steps is the most the run may take. A face a monitor names must be a wall of the domain (an obstacle face selects its split pieces too); one that names none, and a heat or mean_temperature monitor without heat, are refused when the solve starts.

Theory

The monitored quantities

The rule always monitors the velocity residual, and with heat the temperature residual, then the step’s monitors in their order. Each quantity q is a vector: the whole velocity field of the fluid cells (three components each) for the velocity residual; the temperatures of the fluid cells and the conducting solids’ cells, counted from the initial temperature, for the temperature residual; the force vector; or a single number. Its reported value is the root mean square over the cells for a residual (the RMS speed, the RMS temperature change), the vector for a force, the number otherwise.

The relative change

Over each window the rule takes the componentwise extremes of q over the window’s samples (both ends included) and forms the relative spread

change = ‖max q − min q‖ / max over all samples so far of ‖q‖

with the Euclidean norm. It is 0 while q has always been 0, and infinite for a spread over a zero peak. The spread sees an oscillation whose period divides the window, which the difference of the window’s ends would miss. Temperatures count from the initial temperature, so an offset (kelvin, say) does not hide a change. A sample that is not a finite number makes the change infinite.

The stop rule

At the end of every full window:

  1. Diverged when any change is not finite (at any time), or exceeds divergence at or after min_time.
  2. Steady when every change is below tolerance for the second consecutive window, the second ending at or after min_time.
  3. Otherwise the count of steady windows restarts, and the run goes on.

A last window cut short by the end of the step takes no decision; the run then stops at its full length (max_time) with a warning. When the backend reports the flow unstable (a lattice speed above 0.5 or a density that is not a positive number), the run stops as diverged with the backend’s message; without a stop rule the same instability is an error.

Averaging

With averaging, each quantity’s running mean of its reported value (the RMS speed for the velocity field) from start on is what must settle. Samples from the start on enter running sums of the value and its square, and its extremes. A window’s change counts only when the window begins at or after the start, and its peak is the largest running mean so far, so the start-up never enters a decision. Before the start only a value that is not a number counts (it ends the run). A sample that is not a finite number still ends the run as diverged.

At the end the report gives, per quantity and componentwise over the averaged samples, the mean, the root mean square about the mean (the fluctuation), and the extremes:

mean = Σ x / n,   rms = √(max(Σ x²/n − mean², 0))

Window and sampling in time steps

The window is round(window/Δt) steps, clamped to 1 … the step’s length, and never shorter than ⌈steps/10 000⌉ steps, so the sample history stays bounded. The sample interval is max(1, window/8) steps, and the window is rounded down to a whole number of samples. min_time and averaging.start become ⌈t/Δt⌉ steps. Samples are taken at the same chunk boundaries on every backend, so the CPU and the GPU take their decisions at the same steps; a GPU backend reads its fields back a few times per window, never per step.

Conducting solids

A step with a steady rule scales each conducting solid’s heat capacity down to the smallest the lattice allows, which the steady temperatures do not depend on: the solids reach steady state sooner, and the temperatures before it are not a physical transient. The solve warns and reports each solid’s capacity_scale. A solid’s peak temperature is the last frame’s when the run stopped steady, else the highest over the frames (Heat transfer).

Algorithm

  1. Setup. Validate the rule; convert window, min_time and averaging.start to steps; resolve each monitor’s faces to force groups (refusing one that names no wall, and heat monitors without heat).
  2. Initial sample at step 0 (no change yet).
  3. Time loop. The chunks of steps end at every sample point, as at frames and history samples. At each sample: read the fields (and forces, heats) from the backend, update every quantity’s window extremes (and running sums with averaging).
  4. At a window’s end: compute every change, decide (above), record the sample with its values and changes, and start the next window from this sample.
  5. Stop. On a decision the loop ends; when the flow is still sound, a frame is added at the stop step if the last frame is not there. A diverged run keeps the frames saved so far and warns the run diverged at time t: …; the frames end there.
  6. Report the reason, the history and, with averaging, the statistics.

Output

solve.fluid’s reply carries stop when the step has a rule, and end_time and steps are where the run stopped:

FieldMeaning
reasonsteady, max_time (the step’s length passed first) or diverged.
steps, timeThe time step and flow time of the stop.
tolerance, windowThe rule’s tolerance and its window in flow time (whole samples).
quantitiesThe monitored quantities: velocity, temperature (with heat), then each monitor’s label (mass_flow x_max, force x_min, Body1/F3, heat …, mean_temperature).
historyEvery sample: step, time, values (per quantity, in the display units) and changes (per quantity, the relative change of the window ending there, null otherwise).
unitsThe display unit of each quantity’s values. Residuals are root mean squares; a temperature residual is a temperature difference.
messageWhy the run diverged.
averagesWith averaging, per quantity: quantity, from (the averaging start), samples, mean, rms (in rms_unit: for a temperature a difference, without the scale’s offset), min, max, unit.

Warnings: the flow did not reach steady state (relative changes below …) within the step's length; run longer or loosen the tolerance, and the diverged warning above.

Worked example

The bundled flow-past sample (Lattice Boltzmann flow) with three stop rules on copies of its step, monitoring the total force on the bracket’s eight wetted faces and the mass flow out through x_max: the instantaneous rule, and running means from 4 s at two tolerances.

Modelflow-past: air at 25 mm/s past the L-bracket, 184 320 cells of 2.5 mm, Δt = 0.005 s, at most 16 s (3200 steps)
Monitorsforce on Bracket faces F2:start, F2:side:l2 … l6, F2:top, F3:blend(F2:side:l3|F2:side:l4); mass_flow through x_max
RulesSteady: tolerance 10⁻³, window 1 s, min_time 2 s. Averaged: tolerance 10⁻³, window 1 s, averaging.start 4 s. AveragedLoose: the same with tolerance 10⁻²
Unitsmm, t, s, N, MPa
[
  {"command": "file.sample", "params": {"name": "flow-past"}},
  {"command": "model.step.create", "params": {"name": "Steady", "procedure": {"type": "fluid",
    "domain": "Wind", "end_time": 16, "frames": 10,
    "steady": {"tolerance": 1e-3, "window": 1.0, "min_time": 2, "monitors": [
      {"type": "force", "faces": [
        {"body": "Bracket", "face": "F2:start"}, {"body": "Bracket", "face": "F2:side:l6"},
        {"body": "Bracket", "face": "F2:side:l5"}, {"body": "Bracket", "face": "F2:side:l4"},
        {"body": "Bracket", "face": "F2:side:l3"}, {"body": "Bracket", "face": "F2:side:l2"},
        {"body": "Bracket", "face": "F2:top"},
        {"body": "Bracket", "face": "F3:blend(F2:side:l3|F2:side:l4)"}]},
      {"type": "mass_flow", "face": "x_max"}]}}}},
  {"command": "model.step.create", "params": {"name": "Averaged", "procedure": {"type": "fluid",
    "domain": "Wind", "end_time": 16, "frames": 10,
    "steady": {"tolerance": 1e-3, "window": 1.0, "averaging": {"start": 4}, "monitors": [
      {"type": "force", "faces": [
        {"body": "Bracket", "face": "F2:start"}, {"body": "Bracket", "face": "F2:side:l6"},
        {"body": "Bracket", "face": "F2:side:l5"}, {"body": "Bracket", "face": "F2:side:l4"},
        {"body": "Bracket", "face": "F2:side:l3"}, {"body": "Bracket", "face": "F2:side:l2"},
        {"body": "Bracket", "face": "F2:top"},
        {"body": "Bracket", "face": "F3:blend(F2:side:l3|F2:side:l4)"}]},
      {"type": "mass_flow", "face": "x_max"}]}}}},
  {"command": "model.step.create", "params": {"name": "AveragedLoose", "procedure": {"type": "fluid",
    "domain": "Wind", "end_time": 16, "frames": 10,
    "steady": {"tolerance": 1e-2, "window": 1.0, "averaging": {"start": 4}, "monitors": [
      {"type": "force", "faces": [
        {"body": "Bracket", "face": "F2:start"}, {"body": "Bracket", "face": "F2:side:l6"},
        {"body": "Bracket", "face": "F2:side:l5"}, {"body": "Bracket", "face": "F2:side:l4"},
        {"body": "Bracket", "face": "F2:side:l3"}, {"body": "Bracket", "face": "F2:side:l2"},
        {"body": "Bracket", "face": "F2:top"},
        {"body": "Bracket", "face": "F3:blend(F2:side:l3|F2:side:l4)"}]},
      {"type": "mass_flow", "face": "x_max"}]}}}},
  {"command": "solve.fluid", "params": {"step": "Steady", "backend": "cpu"}},
  {"command": "solve.fluid", "params": {"step": "Averaged", "backend": "cpu"}},
  {"command": "solve.fluid", "params": {"step": "AveragedLoose", "backend": "cpu"}},
  {"command": "results.streamlines", "params": {"step": "AveragedLoose", "show": false}},
  {"command": "results.slice", "params": {"step": "AveragedLoose", "field": "velocity", "axis": "y", "position": "auto"}}
]

The relative change of each quantity per window, from stop.history[].changes of the solve.fluid replies (velocity residual, force, mass flow):

Window ending atSteadyAveraged and AveragedLoose
1 s0.378, 1.01, 0.342— (before the start)
5 s0.174, 0.0207, 0.4180.0254, 0.00484, 0.132
8 s0.137, 0.0126, 0.4240.00193, 0.000891, 0.0179
10 s0.117, 0.0110, 0.4570.000600, 0.000525, 0.00989
11 s0.101, 0.0120, 0.3640.00189, 0.000280, 0.00872
16 s0.0834, 0.0076, 0.4060.00196, 0.000107, 0.00372
Rulestop.reasonStopped atWall-clock (Apple M4 Max, CPU)
Steady (10⁻³)max_time, with the warning “the flow did not reach steady state (relative changes below 1e-3) within the step’s length; run longer or loosen the tolerance”16 s, step 320017.4 s
Averaged (10⁻³)max_time, the same warning16 s, step 320017.6 s
AveragedLoose (10⁻²)steady11 s, step 2200 (a frame added at 11 s)12.6 s

The force on the bracket (x, the drag) and the mass flow out, AveragedLoose (stop.averages, 57 samples from 4 s to 11 s), against the instantaneous values and the inflow ρ₀ U A = 1.2 × 10⁻¹² t/mm³ × 25 mm/s × 120 × 100 mm² = 3.6 × 10⁻⁷ t/s:

QuantityLast sample (11 s)meanrmsmin … maxReference
Drag2.003 × 10⁻⁶ N1.776 × 10⁻⁶ N1.25 × 10⁻⁶ N−8.4 × 10⁻⁷ … 5.11 × 10⁻⁶ N—
Mass flow out4.29 × 10⁻⁷ t/s3.619 × 10⁻⁷ t/s8.07 × 10⁻⁸ t/s2.56 … 4.74 × 10⁻⁷ t/s3.6 × 10⁻⁷ t/s (+0.54 %)
RMS speed27.33 mm/s0.593 mm/s26.12 … 28.45 mm/s—

What to look at. The sample’s flow is laminar, yet the instantaneous rule never stops it: the mass flow out swings by ±30 % from window to window (changes 0.34–0.46 to the end) and the drag crosses zero, so at the resolution of these monitors the flow is not steady. On running means from 4 s, the drag’s change stays below 10⁻³ from 8 s on, but the mass flow’s mean settles slowly (3.7 × 10⁻³ at 16 s), so the 10⁻³ rule also runs the full 16 s; at 10⁻² it stops after the two windows ending at 10 and 11 s, with 31 % fewer steps. The averaged mass flow out matches the inflow within 0.54 %. The averaged drag, 1.78 × 10⁻⁶ N, comes with an RMS of 1.25 × 10⁻⁶ N: the size of the oscillation a single last sample hides.

Verification

CaseReferenceMeasuredToleranceTest
Plane Poiseuille, wall forces monitored, tolerance 10⁻⁵A fixed long run; wall force = driving force ρ a V (theory)Steady in under half the long run’s steps; a frame at the stopvelocity 10⁻³ of the peak; force 10⁻³; same decisions every runpoiseuille_flow_stops_at_steady_state_with_the_long_run_s_profile
de Vahl Davis cavity, Ra 10³, 16 cells, heats and mean temperature monitoredA fixed long runSteady in under half the stepshot-wall heat 10⁻³, velocity 10⁻², mean temperature within 1.5 × 10⁻³ of the mid temperature (wall difference 1)the_de_vahl_davis_cavity_stops_at_steady_state_with_the_long_run_s_heat
Periodic box accelerating without boundUnstable at the lattice-speed checkError without a rule; with one, diverged between steps 50 and 60 with finite framesan_unstable_flow_stops_as_diverged
The same with divergence 0.05 and min_time 20 ΔtDiverged at the first sample at or after min_timeStep 20exactsame
Poiseuille stopped before it settlesmax_time, the full length, a warning17 samples (16 windows of ⅛ and the initial one)exacta_flow_that_does_not_settle_runs_its_length_and_says_so
Monitors naming no wall, heat without heatRefusedmonitors_the_flow_cannot_measure_are_refused
Mass flow through two periodic facesρ ū H Δx; the two opposite10⁻²; sum 10⁻¹²same
Vortex shedding, Schäfer–Turek 2D-2 channel at Re 100, 10 cells across the cylinder, convective outlet, 16 sThe long run’s mean drag and lift RMSInstantaneous rule: max_time. Running mean from 4 s: steady at 9 s, mean drag 0.24 % from the long run’s, lift RMS 0.8 % from it; lift extremes either side of 0drag 1 %, lift RMS 10 %vortex_shedding_stops_on_its_running_mean_with_the_long_run_s_mean_drag (heavy)
CPU and GPUStop at the same stepruns_to_steady_state_stop_where_the_cpu_does

A turbulent case stopping on its running mean (the channel, or a graphics-card cooling case) is not run (Verification and validation, “What #664’s acceptance still lacks”).

Limitations

  • The rule watches the quantities it is given: a flow steady in the residuals and the monitors may still change elsewhere, in a quantity nobody monitors.
  • The decision is per window: a run stops at the end of a window, never between two.
  • With heat and conducting solids, the temperatures before the steady state are not a physical transient (their capacity is scaled).
  • Averaging needs a start after the start-up: the start-up is excluded from the decision but a start set too early lets it into the means.

Implementation

FileContents
crates/model/src/steps.rsSteady, Averaging, FlowMonitor, Steady::validate.
crates/lbm/src/steady.rsSteadySetup::new, Monitor::new, Monitor::sample, Monitor::report, StopReason, SUB_SAMPLES, STEADY_WINDOWS.
crates/lbm/src/solve.rsrun: chunks to sample points, the stop, the frame at the stop, the warnings.
crates/lbm/src/setup.rsThe heat capacity scaling of conducting solids for a steady run.
crates/engine/src/cmd/solve.rssteady_summary: the reply’s stop in the display units.

References

  • M. Schäfer, S. Turek. Benchmark computations of laminar flow around a cylinder. NNFM 52:547–566, 1996. doi:10.1007/978-3-322-89849-4_39
  • G. de Vahl Davis. Natural convection of air in a square cavity: a bench mark numerical solution. Int. J. Numer. Methods Fluids 3:249–264, 1983. doi:10.1002/fld.1650030305

GPU backend

The GPU backend steps a fluid step’s lattice Boltzmann scheme on a graphics device through wgpu compute shaders, in single precision. It runs the same collision operators, wall rules, open boundaries, momentum exchange, heat, conducting solids and turbulence model as the CPU, prepared by the CPU code so that voxelisation and every boundary rule exist once. The CPU result is the reference: the GPU result is deterministic on its device and agrees with the CPU within stated tolerances.

Commandssolve.fluid (backend: "gpu"), solve.settings
Step procedure"fluid"
Solvercrates/lbm-gpu (wgpu, WGSL, f32); adapter selection in crates/gpu
MethodThe CPU scheme (Lattice Boltzmann flow) with in-place AA streaming (Bailey et al. 2009; Wittmann et al. 2013) and populations stored as deviations from their weights (Krüger et al. 2017, §13.3.4)
Verified bycrates/lbm-gpu/tests/verification.rs (every case against the CPU, every collision, both layouts); throughput.rs (ignored, performance)

Synopsis

{"command": "solve.fluid", "params": {"step": "Run", "backend": "gpu"}}
{"command": "solve.settings", "params": {"step": "Run", "backend": "gpu", "fallback": "cpu"}}
FIELDCRAFT_GPU=hardware fieldcraft-cli run model.json
WGPU_BACKEND=vulkan FIELDCRAFT_GPU=auto fieldcraft-cli run model.json

Parameters

SettingValueDefaultMeaning
solve.fluid backend"gpu"—Solve on the device FIELDCRAFT_GPU picks; an error when the build has no GPU backend.
solve.settings backend"gpu", "cpu", "none"noneThe backend a step prefers, saved with the model outside its definition. none forgets it.
solve.settings fallback"cpu", "none""cpu" for a GPU preferenceOn a machine with no suitable GPU: fall back to the CPU with a notice, or refuse.
FIELDCRAFT_SOLVE_BACKENDcpu, gpuunsetA machine’s override of every step’s preference.
FIELDCRAFT_GPUauto, hardware, software, cpuautoThe adapter policy (below). cpu means no GPU device: the fluid GPU backend refuses.
WGPU_BACKENDwgpu backend namesthe platform’sNarrows the graphics backends tried (WGPU_BACKEND=gl forces GL).
WGPU_DX12_COMPILERfxc, dxcDXC when dxcompiler.dll is on the DLL search path, else FXCDX12’s shader compiler. staticdxc is refused (not built in).

Without a backend in solve.fluid, the backend is FIELDCRAFT_SOLVE_BACKEND’s when set, else the step’s saved preference, else the CPU; the reply’s backend_choice says what chose it. The desktop application and fieldcraft-cli register the GPU backend. In the browser there is no device backend yet: backend: "gpu" reports that none is available.

Adapter selection

FIELDCRAFT_GPU chooses the policy (crates/gpu/src/select.rs):

  • auto walks a hardware GPU, then a software adapter (lavapipe, llvmpipe, WARP, SwiftShader).
  • hardware and software are strict: an error when there is no such adapter.
  • cpu: no device.

Within the hardware tier a discrete GPU outranks an integrated one, then a virtual one, then any other; a CPU device is the software tier. Backends are Metal on macOS, DX12 and Vulkan on Windows, Vulkan and GL elsewhere. Where both Vulkan and GL are on offer, Vulkan is asked first and GL is brought up only when Vulkan has no adapter of the tier the policy wants. Each backend set has one wgpu instance for the whole process (drivers that stop exposing the GPU after many instances would otherwise lose it in a long session). A software adapter’s name in the reply carries (software).

Theory

Precision

Every momentum population is stored in f32 as its deviation from its weight, h_q = f_q − w_q: the deviations are small, so single precision keeps their digits instead of the weight’s (Krüger et al. 2017, §13.3.4). Then ρ = 1 + Σ h_q, the momentum is Σ h_q c_q, and every rule is written for h. The temperature lattice is stored as deviations from w_q T₀, with T₀ the initial temperature. Each group’s force is read back as the sum of the deviations’ exchange plus its weights’ share, which the host adds.

Streaming layouts

The momentum populations stream in one of two layouts (fieldcraft_lbm_gpu::Options::streaming):

  • In place (the AA pattern: Bailey, Myre, Walsh, Lilja and Saar, ICPP 2009; Wittmann, Zeiser, Hager and Wellein, Comput. Math. Appl. 65 (2013) 924–935, §6). One population buffer. Even steps read population q of cell x at (q, x) and write the collided one at (q̄, x); odd steps read it at (q̄, x − c_q) and write it at (q, x + c_q). In both, a cell writes exactly the addresses it read, so cells never race, and streaming happens inside the collision: 152 population bytes per cell update.
  • Two buffers (A–B). Collide in place, then pull into the other buffer: 304 bytes per update.

The wall, reflection and open-face rules are the same per-link rules in both. In place, a gather pass reads every link’s post-collision source into a scratch value before a scatter pass writes, so no link overwrites another’s source; the momentum exchange is taken in the gather of the step whose forces are read back (a submission’s last). The temperature lattice is two-buffer in both.

Streaming::Auto, what a solve uses, streams in place: it was faster on every device measured (Verification). With 128³ cells in place also needs one 152 MiB population buffer less.

What runs on the GPU

FeatureGPU
Collisions trt, regularized, mrtyes
Collision hrr (hybrid recursive regularised), fixed and dynamic σyes
Vreman’s subgrid model (turbulence: {"type": "vreman"}), with every collisionyes
Walls, moving walls, slip, symmetry planes, periodic faces, obstacles, momentum exchangeyes
Velocity inlets, uniform and convective pressure outlets, edges of open facesyes
Body acceleration, and changing it between stepsyes
Heat: the D3Q7 lattice, held temperatures, fluxes, buoyancyyes
Conducting solids, thermal contacts, solid poweryes
Interpolated obstacle walls (walls: "interpolated"), moving walls includedyes (within 1.3e-5 of the CPU in the skin force, 6.5e-6 of the peak velocity)
Quadratic interpolated walls (walls: "interpolated_quadratic"), at rest (a moving wall keeps the linear form)yes (within 4.8e-6 of the CPU in the skin force, 6.4e-6 of the peak velocity, on an Apple M4 Max)
Thin walls (baffles)no: refused before a device is opened
The characteristic outflow (outflow: "characteristic")no: refused before a device is opened
Smagorinsky’s model, the wall model (wall_model: "musker"), Van Driest damping (van_driest)yes
Steady-state rule and averagingyes (decided on the host from read-back fields)
Fans and porous zones (curves, Darcy–Forchheimer, loss coefficients), with every collision and wall treatmentyes
The halfway wall-function bounce (wall_model: "spalding_bounce_halfway")yes
Han et al.’s on-node wall-function bounce (wall_model: "spalding_bounce", their eq. 14)yes
The Spalart–Allmaras model’s own wall law on the on-node wall (wall_model: "spalart_allmaras_bounce")yes
Han et al.’s matched on-node wall (wall_model: "spalding_bounce_matched": the law four cells from the wall, the mixing-length layer), with Smagorinsky’s or Vreman’s model and TRT, regularised, hybrid or MRTyes (on an NVIDIA GB10 against the CPU in the coarse channel: peak velocity within 2.0e-6, density 1.3e-7, wall drag 9.6e-7, sampled stress 8.0e-7)

Algorithm

  1. Preparation on the CPU (Flow::new): voxelisation, links, open cells, conducting cells, the initial state. A flow handed to the GPU never allocates the CPU’s streaming targets.
  2. Refusals: a fan curve or resistance that single precision cannot hold (by the zone’s name); a policy that finds no device; an adapter that allows fewer storage buffers per compute stage than the shader needs (the message names the graphics backend and suggests Vulkan, Metal or DX12, or the CPU).
  3. Memory: before preparation, the population buffer is checked against the device’s limit per storage buffer (asked once per process), and the run’s estimate includes the GPU readback.
  4. Device and kernels: the device is requested with the adapter’s own limits and shared; the kernels are compiled once per device and variant (layout, collision, Smagorinsky, Vreman, the hybrid collision and its dynamic σ, wall model, Van Driest damping) and reused by the next solve. A fixed σ of 1 compiles to the regularised kernels.
  5. Stepping: steps are submitted in chunks of at most 64; after each submission the host reads the stability statistics (largest speed, a non-positive or non-finite density), so the GPU may notice an instability only at the end of the chunk. The solve advances the backend only up to its next frame, force-history sample, monitor sample or progress report, and the history samples every step of a run shorter than 10 000 steps (MAX_HISTORY), so such a run submits one step at a time and reads the forces back after each. A cancel takes effect between submissions. A device that does not answer within 120 s fails the solve.
  6. Readback: populations stay on the device; frames (density, velocity, temperature), force and heat histories, monitor samples and the stability check come back. The time loop, frames, histories and stop rule are the CPU’s run, driven through the Backend trait.

Output

The reply’s backend is gpu: <adapter>, and the solve adds the warning solved on gpu: …: single precision, deterministic on this device, within the backend's tolerance of the CPU. The memory estimate (memory) gives the population buffer against the device’s limit per buffer. Frames are single precision on both backends.

Worked example

The flow-past sample (air past an L-bracket on the floor) solved on the CPU and on the GPU, then the same model on a grid twice as fine. It shows the GPU backend’s reply, its agreement with the CPU reference, and where its time goes.

Geometrythe upright L-bracket (60 × 40 × 50 mm, upright facing the inlet) on the floor of a 240 × 120 × 100 mm box
Cells2.5 mm: 184 320 (182 304 fluid); refined to 1.25 mm: 1 474 560
Fluidair, ρ = 1.2 kg/m³, μ = 1.8 × 10⁻⁵ Pa s
Boundariesx_min velocity 25 mm/s, x_max pressure 0, floor no-slip, sides and top slip
StepFlow: TRT, 16 s (3 200 steps of 0.005 s), ten frames; the 1.25 mm run 2 s (800 steps of 0.0025 s), one frame
Unitsmm, t, s, N, MPa
[
  {"command": "file.sample", "params": {"name": "flow-past"}},
  {"command": "solve.fluid", "params": {"step": "Flow", "backend": "cpu"}},
  {"command": "solve.fluid", "params": {"step": "Flow", "backend": "gpu"}},
  {"command": "results.slice", "params": {"field": "velocity", "axis": "y", "position": 20}},
  {"command": "results.streamlines", "params": {"show": false}}
]

The finer grid edits the sample’s domain and step, then solves on each backend:

[
  {"command": "model.fluid_domain.edit", "params": {"name": "Wind", "material": "Air",
    "min": [-60, -40, 0], "max": [180, 80, 100], "spacing": 1.25,
    "faces": {"x_min": {"type": "velocity", "velocity": [25, 0, 0]}, "x_max": {"type": "pressure", "pressure": 0},
              "y_min": {"type": "slip"}, "y_max": {"type": "slip"}, "z_min": {"type": "wall"}, "z_max": {"type": "slip"}},
    "obstacles": ["Bracket"], "initial_velocity": [25, 0, 0]}},
  {"command": "model.step.edit", "params": {"name": "Flow",
    "procedure": {"type": "fluid", "domain": "Wind", "end_time": 2, "frames": 1}}},
  {"command": "solve.fluid", "params": {"backend": "gpu"}},
  {"command": "solve.fluid", "params": {"backend": "cpu"}}
]

The GPU reply names its adapter and layout, backend: "gpu: Apple M4 Max, in-place streaming", adds the warning solved on gpu: Apple M4 Max, in-place streaming: single precision, deterministic on this device, within the backend's tolerance of the CPU, and gives the population buffer against the device’s limit (memory.gpu_buffer: 14 008 320 bytes of 4 294 967 292 at 2.5 mm, 112 066 560 at 1.25 mm). The forces are the sums over the bracket’s faces of the solve.fluid replies’ forces (final, and mean over the last quarter of the run); the drag is their x component.

Quantity (2.5 mm)CPUGPUGPU − CPU
Drag, final1.13263 × 10⁻⁶ N1.13260 × 10⁻⁶ N−2.2 × 10⁻⁵ relative
Drag, mean1.736549 × 10⁻⁶ N1.736543 × 10⁻⁶ N−3.2 × 10⁻⁶
Vertical force (z), final−2.393076 × 10⁻⁴ N−2.393077 × 10⁻⁴ N2.2 × 10⁻⁷
Largest face force (F2:side:l6, x)1.9405010 × 10⁻⁴ N1.9405012 × 10⁻⁴ N1.1 × 10⁻⁷
max_speed41.693213 mm/s41.693235 mm/s5.4 × 10⁻⁷
mass.relative_change−7.671 × 10⁻⁴−7.670 × 10⁻⁴—
Quantity (1.25 mm)CPUGPUGPU − CPU
Drag, final7.83728 × 10⁻⁷ N7.83682 × 10⁻⁷ N−5.8 × 10⁻⁵ relative
Drag, mean2.308221 × 10⁻⁶ N2.308195 × 10⁻⁶ N−1.1 × 10⁻⁵
Vertical force (z), final−2.383840 × 10⁻⁴ N−2.383839 × 10⁻⁴ N−4.8 × 10⁻⁷

Run times are the wall-clock time of each solve.fluid call, voxelisation and readback included, on an Apple M4 Max (14 CPU cores; GPU through Metal) shared with other jobs, so they varied between runs. Million cell updates per second are cells × steps over that time; the reply does not report them.

RunCell updatesCPUGPU
2.5 mm, 3 200 steps5.90 × 10⁸19.3–26.2 s (23–31 M/s)7.2–19.1 s (31–82 M/s)
1.25 mm, 800 steps1.18 × 10⁹18.1 s (65 M/s)3.6 s (328 M/s)

What to look at. The GPU’s face forces agree with the CPU’s to 10⁻⁷ of themselves, well inside the backend’s 5 × 10⁻⁵ for wall forces. The drag is the small difference of the upright’s front and back forces (1.9 × 10⁻⁴ and −1.4 × 10⁻⁴ N), so single precision shows in it as a relative difference of 2 × 10⁻⁵ to 6 × 10⁻⁵; measured against the face forces it adds up from, it is 2 × 10⁻⁷. Neither run reaches the throughput of the Performance table: below 10 000 steps (MAX_HISTORY) the run records the force history at every step, so the GPU advances one step per submission and reads the forces back after each one (crates/lbm/src/solve.rs, run), and that fixed cost per step dominates the small grid. With eight times the cells per step the GPU is five times faster than the CPU.

Verification

CPU and GPU

cargo test -p fieldcraft-lbm-gpu --test verification runs each case on both backends, with every collision (two relaxation times, regularised, multiple relaxation times) and both streaming layouts. The backend’s stated tolerances, measured on lavapipe at 2–5 × 10⁻⁶ with a margin:

QuantityTolerance
Velocity field2 × 10⁻⁵ of the largest speed
Density field10⁻⁶
Wall forces5 × 10⁻⁵ of their magnitude (a wall’s shear within 5 × 10⁻⁵ of itself)
Mass driftbelow 10⁻⁶
Temperatures2 × 10⁻⁵ of the field’s range
Wall heats10⁻⁴ of the largest (a heat is a difference of populations, so it keeps fewer digits)

The cases: plane Poiseuille against the parabola and the CPU (TRT within 2 × 10⁻⁵ of the peak, regularised 2 × 10⁻³, MRT 4 × 10⁻³), Couette wall forces, Taylor–Green with mass conservation, flow past a sphere (fields and forces), a Zou–He channel, a convective outlet with a vortex and backflow, edges of two pressure faces, conduction between plates, a heated channel, wall heat at a held inlet, natural convection, runs to steady state stopping where the CPU does, odd/even and chunk readbacks with heat, open and slip faces and around an obstacle, Smagorinsky’s model (Couette, forced Poiseuille, heated Couette), a cavity held by the closure, a body force changed mid-run, the wall model (Couette, a coarse channel, a steady channel’s drag), and conducting solids (a composite wall with power, a thermal contact, a heated block, a conductor through the inlet and outlet, a conductor filling the box, a low-capacity solid). The thin Smagorinsky Couette case (τ = 0.55, 80 000 steps) keeps fewer digits (measured on an RTX 4070 Laptop GPU: velocity up to 4.2e-5, wall shear up to 9.6e-5) and is held to 10⁻⁴ and 2 × 10⁻⁴.

On an Apple M4 Max (Metal), the regularised velocity fields are within 5e-7–7.4e-6 of the largest speed, densities within 2.6e-7, wall shear within 1.9e-5 of itself, heats within 2.1e-6, mass drift 0.

The hybrid collision, Vreman’s model and dynamic σ

Their finite-difference gradient needs every neighbour’s velocity at the same time level, so a kernel (gradient_velocity) computes each cell’s velocity before the collision exactly as the collision does (half force, the wall model’s reconstruction) into a buffer of three f32 per cell (12 bytes, beside the population buffer’s 76), and the collision reads its six axis neighbours’ from it: across a periodic face the periodic image, a solid cell or one beyond a face that is not periodic missing, centred differences, first-order one-sided ones or none as on the CPU (fieldcraft_lbm::hrr). The neighbours are explicit ±x, ±y, ±z cells, not a loop over the lattice directions with a condition on c_q, a loop shape the NVIDIA GB10’s driver (580.159) miscompiles. With that buffer the collision binds 8 storage buffers, WebGPU’s default per stage. Smagorinsky’s ν_t for dynamic σ is taken as (τ − τ₀)/3 written without the cancellation of 1/ω − 1/ω₀, and is 0 where the flux is below its f32 rounding (16 ε (|δρ| + ρ |u|)): dynamic σ multiplies ν_t by |∇u|²/|∇²u|², large where ∇²u vanishes, and would otherwise take rounding for an eddy viscosity. That length is capped at the box’s shortest extent in cells (passed in the uniforms), as on the CPU (Collision operators, “Dynamic σ”).

Against the CPU (the_hybrid_collision_follows_the_cpu, vreman_s_model_follows_the_cpu, dynamic_sigma_follows_the_cpu, the_hybrid_collision_with_wall_damping_and_the_wall_function_bounce_follows_the_cpu): a forced channel (6 cells per half-height, perturbed, 150 steps; Re_τ 180 with a subgrid model, 30 without) and a periodic box with a ball (24³, ν 0.005, from a field of lattice speed 0.03, 200 steps), both layouts, both backends from the same initial state. Tolerances, those of the wall-model cases: velocity 10⁻⁴ of the largest speed, density 10⁻⁵, the largest ν_t/ν 10⁻³ of itself, wall drag 10⁻³. Measured on the NVIDIA GB10 (Vulkan), the larger of the two layouts and cases:

Casevelocitydensityν_t/ν
hrr σ 0.97.9e-71.2e-7—
hrr σ 0.9 + Smagorinsky 0.14.4e-61.4e-71.1e-4
Vreman 0.18 with trt / regularized / hrr3.0e-6 / 6.9e-6 / 4.4e-66.3e-7 / 3.4e-7 / 1.4e-73.1e-5 / 6.0e-6 / 5.2e-6
dynamic σ, Vreman 0.18 / Smagorinsky 0.15.4e-6 / 5.7e-61.1e-7 / 9.5e-81.6e-7 / 2.3e-6
hrr σ 0.9 + Smagorinsky with Van Driest / the wall-function bounce (channel)4.4e-6 / 2.2e-61.5e-7 / 1.2e-76.3e-6 / 1.6e-6 (drag 4.0e-6 / 2.5e-7)

σ 1 gives the regularised collision’s fields bit for bit; two runs on one device give the same fields bit for bit (the_les_kernels_are_deterministic_on_their_device); the shear wave of the CPU’s gate (N 16, τ̄ 0.8, σ 0.9) decays at the exact rate of the linear analysis within 4.2e-7 (tolerance 10⁻³, a_shear_wave_decays_at_the_exact_rate_on_the_gpu).

Han et al.’s on-node wall-function bounce

Han, Ooka and Kikumoto’s eq. 14 (wall_model: "spalding_bounce", crates/lbm/src/bounce.rs) runs on the GPU as on the CPU. The outermost cell layer at each wall face is boundary nodes: their flag word marks them as streaming but not fluid, so they stream like any cell and stay out of the collision, the finite-difference gradients, the moments, the mass and the mean velocity. Each step, before the collision, bounce_sample takes each node’s stress ρ u_τ² from Spalding’s law (κ 0.41, B 5.5) at its interior node one cell into the fluid (distance 1, the velocity with the half force); after the collision node_bounce runs eq. 14 on each node in place of a collision, reading and writing only the node’s own populations (with the in-place layout’s addressing of a collision), hands the fluid the stress less its half cell’s body force, ½ ρ a, with ρ the interior node’s density (bounce_sample samples it into row 2’s w), and records the momentum the node took from the fluid plus ½ ρ a. wall_forces adds that to one of the node’s links from outside the box (an open placeholder that exchanges nothing itself), so the node’s box face receives it; the weights’ share, −n/3 per node, is added on the host. Each of the six face orientations has its assignments written out (no loop over the lattice directions that tests c_q, which the GB10’s driver miscompiles). node_bounce binds two storage buffers (the populations and the wall rows).

With the Spalart–Allmaras model’s own wall law (wall_model: "spalart_allmaras_bounce") bounce_sample takes u_τ from the model’s constant-stress law in closed form (crates/lbm/src/sa_law.rs) instead of Spalding’s, and keeps it in the node’s row. The law’s eight factor constants reach the shader as pipeline constants from the CPU’s factors(). After ν̃’s sub-steps sa_impose sets ν̃ = κ u_τ d at each interior node and its ν_t for the collision, and ν̃’s transport sees a boundary node as a wall one cell away, as on the CPU. In single precision the logarithm ln(1 + s) below κy⁺ = 1 is the series 2 atanh(s/(2 + s)) to its fourth term (the terms left out are below 2⁻²⁴ of it), and the inversion takes Newton steps inside its bracket, a bisection when one leaves it, at most 24.

The law has its own bars, apart from the Spalding ones below (crates/lbm-gpu/tests/verification/sa.rs: the_wall_law_follows_the_cpu_in_a_box, ..._in_its_column, ..._where_two_nodes_share_an_interior_node, the_wall_law_at_rest_gives_no_stress_on_the_gpu). u_τ 5.18e-4 relative to the CPU’s, about 5.1e-4 of it WGSL’s allowance for atan2; the node’s stress 1.04e-3; ν̃ at the interior nodes against κ u_τ d 2.38e-7; velocity and density at the suite’s LES tolerances (check_les). Measured on the GB10: coarse channel at Re_τ 180, regularised, u_τ 5.73e-7, stress 1.15e-6, ν̃ 5.62e-8; the column at Re_τ 1000, regularised, u_τ 1.45e-7, and with hrr, 6.12e-8.

Against the CPU from step 0 with Spalding’s law on the nodes, both layouts, regularised, hrr σ 0.99 and trt, each with Smagorinsky 0.1 + Van Driest 26 and with Vreman 0.18 (the_on_node_wall_function_bounce_follows_the_cpu: the CPU’s perturbed coarse channel, 13 cells across, 150 steps; the_on_node_wall_function_bounce_follows_the_cpu_in_han_s_a20_channel, heavy: Han et al.‘s A20 box, 126 × 41 × 63 cells, 300 steps). Tolerances: velocity 10⁻⁴ of the largest speed, density 10⁻⁵, the walls’ drag 10⁻³ of the CPU’s, the GPU walls’ carried stress 10⁻³ of the stress the GPU sampled, and that sampled stress 10⁻³ of the CPU’s. The largest over the cases:

Device, casevelocitydensitydragcarried vs sampledsampled vs CPU
GB10, coarse channel4.1e-66.6e-79.5e-77.8e-78.7e-7
GB10, A201.3e-51.1e-78.9e-69.5e-78.5e-6
llvmpipe, coarse channel4.0e-66.5e-72.6e-67.3e-72.2e-6
llvmpipe, A201.1e-51.0e-77.1e-61.4e-67.4e-6

Two runs on one device give the same fields and forces bit for bit (the_on_node_wall_function_bounce_is_deterministic_on_its_device). The CPU’s stationary toy (the k_x = π mode of the wall rows, on-node, regularised, τ̄ 0.5015, u⁺ 5) damps on the GPU at the CPU’s rate (the_on_node_bounce_damps_the_odd_even_mode_of_its_wall_rows_on_the_gpu: −1.195e-4 per step on the GB10, −1.174e-4 on llvmpipe, −1.169e-4 on the CPU, tolerance 10 % and ≤ 0), seeded at 1e-3 of a lattice speed: at the CPU’s 1e-6 single precision’s rounding of the base holds the mode near 4e-6 and the rate measured is the rounding’s.

The Taylor–Green study (study_taylor_green_vortex_dissipation, 64³, lattice speed 0.05, to t = 20) on the GB10 gives the CPU’s peak dissipation to the digits printed, at the same time:

variantRe 1600: peak −dk/dt (t)Re 12000
hrr@0.99:0.1 (σ 0.99, Smagorinsky 0.1)0.01158 (8.39)0.01202 (8.89)
hrr@0.99:v0.18 (σ 0.99, Vreman 0.18)0.01129 (8.39)0.01162 (8.39)
hrr@dynamic:v0.18 (dynamic σ, Vreman 0.18)0.01352 (5.88)0.01357 (5.88)

Fans and porous zones (tests/verification/zones.rs) follow the CPU with feedback on the first steps, independent of chunks and read-backs, on all six fan directions, overlapping zones, strong Darcy terms, heat, buoyancy and a powered conductor, and with the wall model, the halfway and the on-node wall-function bounces (fans_and_porous_zones_with_every_wall_treatment_follow_the_cpu: velocity within 1.1e-6 of the largest speed, zone flow and fan rise within 5e-7, on an M4 Max). Tests skip without a GPU adapter unless FIELDCRAFT_REQUIRE_GPU=1, which makes a missing adapter a failure. CI has no hardware GPU and runs the suite on lavapipe.

Performance

cargo test --release -p fieldcraft-lbm-gpu --test throughput -- --ignored --nocapture runs each case in both layouts on the device FIELDCRAFT_GPU picks, marks the one Auto chooses and prints how long creating the pipelines took (on Metal this reads near zero: the driver compiles lazily or from its cache, so the cost lands in the first dispatches instead). With FIELDCRAFT_LBM_GPU_PROFILE=1 it also prints each kernel’s GPU time (Options::profile, timestamp queries; the throughput is then not representative, as every dispatch gets its own pass).

Million cell updates per second, means of three runs, two relaxation times (the RTX 4090 row is from the first version of the in-place layout, before its addressing was made cheaper):

devicecasein placetwo buffers
RTX 4090, Vulkanperiodic 128³38972578
RTX 4090, Vulkansphere 128³35722441
GB10 (unified memory), Vulkanperiodic 128³1224656
GB10 (unified memory), Vulkansphere 128³1146630
M4 Max, Metalperiodic 128³1364937
M4 Max, Metalsphere 128³1256872

On the 4090 and the GB10 the two-buffer step is bound by memory bandwidth (~0.8 TB/s and ~0.2 of the GB10’s 0.27), so halving the bytes pays directly; on the M4 Max it gains once the in-place addressing is cheap (a cell’s coordinates once, neighbours wrapped by compare and add). 64³ fits in cache, where the two layouts are closer and vary more between runs.

With the regularised collision, in place on the M4 Max: periodic 128³ 920–1030 against 1160–1250 for two relaxation times (−20 %), sphere 128³ 810–820 against 945–955 (−14 %) (Collision operators).

The hybrid collision and the subgrid models (les_cost: from a field of lattice speed 0.05, ν 0.002, 500 steps; median of three runs, the variants run alternately as separate processes with FIELDCRAFT_LES_VARIANT), NVIDIA GB10, Vulkan, million cell updates per second:

caselayoutregularizedhrr σ 0.99hrr + Vremanhrr dynamic σ (Vreman)
periodic 128³in place1207777 (−36 %)773772
periodic 128³two buffers636490 (−23 %)492493
sphere 128³in place1103723 (−34 %)724720
sphere 128³two buffers606466 (−23 %)463463

The cost is the velocity pass’s traffic: it reads every population once more (76 bytes per cell) and writes the velocity (12), against 152 bytes per in-place update, and the collision reads its neighbours’ velocities; Vreman’s model and dynamic σ add arithmetic only.

Fans and porous zones. Each zone cell’s velocity is the CPU’s implicit half-force one (Guo and Zhao 2002), its root scaled so a strong Darcy term does not overflow single precision. Before every collision fan_partials sums the axial velocity over each fan’s cells, one workgroup per 256 cells of its cell list, and fan_update adds a fan’s workgroups in order and moves its rise toward its curve, so the feedback runs every lattice step on the device with no read-back. The zones live in the flag buffer after the flags, in fields of their own (each cell’s zone, the headers, the curves, the fans’ cell lists), so no kernel binds another buffer; only fan_update writes it, through a second binding no other kernel takes, and every other kernel reads it read-only. zone_samples reads a zone’s flow, pressure difference and fan rise back only when a history or the reply asks (16 bytes per zone). Periodic 64³, two relaxation times, in place, 200 steps after 32, M4 Max, Metal, million cell updates per second (zone_throughput_and_diagnostic_cost):

zonesupdates per second
none1352
a porous vent across the box1297
a fan across the box, and the vent1181

Limitations

  • Single precision: results agree with the CPU within the stated tolerances and are deterministic per device only.
  • An instability is noticed at the end of a chunk of up to 64 steps.
  • A run shorter than 10 000 steps advances one step per submission (its force history samples every step), far below the throughput of the Performance table.
  • A device must offer enough storage buffers per compute stage; GL adapters may not.
  • No device backend in the browser yet.
  • Radiation from conducting solids (#839), like melting and freezing, a free surface and a shear-dependent viscosity, is refused by name: solve those on the CPU (backend: "cpu").
  • The whole population state lives in one buffer, which must fit the device’s limit per storage buffer.

Implementation

FileContents
crates/lbm-gpu/src/native.rsGpuFlow (with_options, advance, readbacks), Options, Streaming, register, buffer_limit, check_storage_buffers, MAX_CHUNK, DEVICE_TIMEOUT.
crates/lbm-gpu/src/lbm.wgslThe kernels: collision (TRT, collide_regularized with the hybrid blend, collide_mrt; Vreman’s vreman_nu, dynamic_sigma), the velocity pass gradient_velocity and fd_gradient, AA and A–B streaming, links, open boundaries and convective outlets, momentum exchange, thermal lattice, conducting solids, wall model, Van Driest damping (damping_refresh).
crates/lbm-gpu/src/lib.rsThe wasm stub (register does nothing).
crates/gpu/src/select.rsPolicy, pick, adapter, backends, the process’s wgpu instances.
crates/lbm/src/backend.rsBackend, register_backend, device_available, Choice.
crates/engine/src/cmd/solve.rssolve.fluid’s backend choice, solve.settings.

References

  • P. Bailey, J. Myre, S. D. C. Walsh, D. J. Lilja, M. O. Saar. Accelerating lattice Boltzmann fluid flow simulations using graphics processors. ICPP 2009.
  • M. Wittmann, T. Zeiser, G. Hager, G. Wellein. Comput. Math. Appl. 65:924–935, 2013.
  • T. Krüger et al. The Lattice Boltzmann Method: Principles and Practice. Springer, 2017. doi:10.1007/978-3-319-44649-3

Fluid results

A solved fluid step keeps, in the session, its output frames (velocity, gauge pressure and, with heat, temperature in every cell; with a free surface, each cell’s fill level), the force on every wall and, with heat, the heat into every wall over time; with a free surface, the liquid’s extent and volume over time (Free surface: solve.probe with front and depth). The results commands probe them at points, along lines and on walls, and show them as a coloured slice through the domain, as the obstacles coloured by the fluid beside them, and as streamlines traced through the velocity field.

Commandssolve.fluid (the reply), solve.probe, results.fluid.measure, results.slice, results.surface, results.streamlines, results.contour, results.frame, results.animate
Step procedure"fluid"
Solvercrates/lbm (solve.rs: frames and histories); display in crates/engine/src/flow.rs, crates/render/src/flow.rs
MethodCell-centred fields; trilinear interpolation between cell centres; streamlines by the midpoint rule in half-cell steps
Verified bycrates/render/src/flow.rs and crates/engine/src/flow.rs tests; crates/engine/src/flow/line.rs, flow/wall.rs tests

Synopsis

[
  {"command": "results.slice", "params": {"step": "Run", "field": "pressure", "axis": "z", "position": 0.05}},
  {"command": "results.streamlines", "params": {"step": "Run", "field": "velocity", "count": 100,
    "line": {"from": [0.01, 0.0, 0.05], "to": [0.01, 0.12, 0.05]}}},
  {"command": "results.surface", "params": {"step": "Run", "show": true, "field": "velocity"}},
  {"command": "solve.probe", "params": {"step": "Run", "points": [[0.15, 0.06, 0.05]]}},
  {"command": "solve.probe", "params": {"step": "Run", "line": {"from": [0.1, 0, 0.05],
    "to": [0.1, 0.12, 0.05], "field": "velocity_x"}}},
  {"command": "solve.probe", "params": {"step": "Run", "forces": ["F2:top", "Body1/F3"]}}
]

Parameters

Display

CommandFieldValueDefaultMeaning
results.slicestepstep nameThe fluid step.
fieldvelocity, pressure, temperatureas shownVelocity magnitude, gauge pressure, or temperature when the frames carry heat.
axisx, y, z, noneas shownThe slice’s normal; none hides the slice.
positioncoordinate or "auto"the symmetry plane, else the middleWhere along axis; "auto" is the symmetry plane along axis when the domain has one there, else the middle; must lie inside the domain.
frame0 … lastthe one shown (at first the last)The frame.
results.surfaceshowboolColour the obstacles by the field (false: the part in its own colours).
fieldvelocity, pressure, temperature, wall_heat_fluxas shownRead in the fluid cells beside each obstacle face; wall_heat_flux per face (below).
frame0 … lastas shown
results.streamlinesshowboolfalse hides them.
fieldvelocity, pressure, temperatureas shownColour by speed or temperature; plain for pressure.
seeds[[x, y, z], …]At most 2000 seed points.
line{"from", "to"}count seeds evenly along this line.
count1 to 200064Seeds along line, or on the inlet face when neither seeds nor line is given.
max_steps1 to 100 0004000Steps (half a cell each) per streamline.
frame0 … lastas shown
results.contourfieldvelocity, pressure, temperature, wall_heat_fluxThe banded field and its legend (bands 2 to 24, range) for a fluid step.
results.frameframe or timeindex or flow timethe lastThe frame shown (by index, or the frame nearest a time).
results.animateonboolPlays the recorded frames in order.

What a command leaves out stays as shown. A fluid step is first shown with velocity magnitude on a slice normal to the horizontal axis across the flow (the slice holds the flow direction and the vertical; Z is up), on the symmetry plane of the domain along that axis when it has a symmetry face there (else through the middle), the obstacles coloured, and 64 streamlines seeded on the inlet face. The flow direction is the axis of the largest mean velocity over the fluid cells of the last frame (+x for fluid at rest).

Probing (solve.probe on a fluid step)

FormFieldsReply
Pointspoints: [[x, y, z], …] (at most 10 000), frame (default the last)Per point: its cell, whether it is solid, velocity, pressure and, with heat, temperature of the cell containing it; cell: null outside the grid.
Lineline: {"from", "to", "count", "field", "face"}, frameThe field at count points evenly along the line (default one per cell spacing, at most 10 000), their xyz, and the max and min with their xyz.
Forcesforces: ["x_min", "F2:top", "Body1/F2:top"] (at most 100)times and each wall’s force history.
Heatheat: ["y_min", …] (at most 100)times and each wall’s heat history (power, positive into the wall). Needs heat.

Line fields: velocity_x, velocity_y, velocity_z, speed, pressure, temperature, wall_heat_flux (with face, the box wall the line lies on).

Theory

Cooling and exchanger measurements

results.fluid.measure {"step": "Run", "from": "x_min", "to": "x_max"} reads the last saved frame; frame selects another by its zero-based index. It leaves the displayed frame and model unchanged. The command is available through command search and its form, the CLI, scripts and the control channel. Stale and free-surface results are refused.

The reply’s rows table identifies each measurement by body (null for a box face), face and quantity, with a value and display unit. csv contains the same table as RFC 4180 text, including the step, frame, time and time unit on every row. It can be saved by a script without opening a dialog. These are measurements of one saved frame, not time averages or a validation verdict. Wall heat is linearly interpolated between recorded samples at that frame’s time; there is no extrapolation. Missing heat, material properties or thermal fields give null values (empty CSV cells), not invented zeros.

For each open box face (x_min, x_max, y_min, y_max, z_min, z_max):

  • area excludes obstacle cells. area_mean_pressure, area_mean_temperature and area_mean_velocity_x/y/z include stagnant fluid cells. The mean is sum(value * cell_area) / sum(cell_area); blocked faces have no mean. The ports report of solve.fluid and results.frame carries the same means per face as area_mean.
  • inflow_volume_flow and outflow_volume_flow integrate the normal velocity separately in each direction. Each rate is nonnegative; opposing flow is never cancelled before averaging. The corresponding mass_flow uses the reference density saved at solve time.
  • inflow_mean_temperature and outflow_mean_temperature weight temperature by mass flow (equivalently volume flow for the constant reference density); zero flow has no mixed temperature. inflow_sensible_heat and outflow_sensible_heat use rho * cp * Q * (T - Tref). The heat_reference row gives Tref, the mixed temperature of all incoming flow. Without incoming flow, no sensible heat reference is inferred.

With both from and to, pressure_drop is the first face’s area-mean static gauge pressure minus the second’s, also included in the table. Both must be open faces with fluid area. It measures boundary-layer cell fields, not an extrapolated wall value or total pressure. Every recorded thermal wall contributes a wall_heat_rate, positive into that wall, including named obstacle interfaces. This is the saved thermal exchange, separate from port advection.

This first slice of #837 leaves arbitrary face sets/surfaces, port conduction, time-window averages, exchanger effectiveness and LMTD, and a complete energy balance with sources and storage for follow-up. The existing heated-block check verifies advective heat against the generated power within 2%; the pressure-driven Poiseuille check verifies the area-mean pressure drop within 0.1%. Synthetic fields check nonuniform weighting, backflow, blocked and stagnant faces; command tests check units, history interpolation, frame selection and CSV.

Fields

A frame holds, per cell (index i + nx (j + ny k)), the velocity in the model’s units (with Guo’s half force), the gauge pressure (ρ − 1) c_s² ρ₀ Δx²/Δt², and with heat the temperature, all in single precision; solid cells hold zero. The fluid mass of the frame is kept in double precision. The initial frame and frames more, evenly spaced to the end, are recorded; a run stopped by its steady rule adds a frame at the stop. Force, heat and zone histories are sampled every ⌈steps/10 000⌉ steps. Each wall-force entry is the mean of the last two steps, because a wall’s force alternates step by step near τ⁺ = ½ (A. J. C. Ladd, J. Fluid Mech. 271:285–309, 1994): it is the force at (k − ½)Δt for the step k. The first step of a run has no step before it, so its entry is that step’s force alone.

Interpolation

Values are cell-centred; solid cells have no value. Inside the fluid a point’s value is the trilinear interpolation between the cell centres around it, from the fluid cells among them. Within half a cell of a box face there is no centre beyond the point, so the value is the nearest centre’s: a temperature line run onto a held wall reads the first cell’s temperature; wall_heat_flux reads the wall.

Slices

A slice joins the cell centres of the layers either side of its plane, interpolated linearly between them, into triangles carrying their corners’ values, and bands them with the contour legend. The outermost centres move out to the domain’s faces, so the slice covers the whole domain. A triangle touching cells with no value takes the mean of its other corners there, and one with none is left out (the obstacle is drawn there). A layer larger than 2²⁰ quadrilaterals is sampled every few cells. The automatic slice is placed from the model as it is at that moment: when a step’s results are first shown, when position is "auto" and when the axis changes. After the domain’s faces are edited, "auto" places it on the edited faces’ plane; a step the model no longer has is sliced through the middle.

Ranges

The slice’s contour.range (the legend’s Max and Min) and the solve’s max_speed are taken over interior fluid cells: the layers of inlet and outlet faces are left out, convective outlets too, because a wake reaching a uniform pressure outlet distorts the last layer (Boundary conditions).

Streamlines

Streamlines follow the trilinear interpolation of the cell velocities (solid cells at rest: the no-slip value), integrated downstream along their arc length by the midpoint (second-order Runge–Kutta) rule with a step of half a cell. Each stops where it leaves the domain, enters a solid cell or reaches still fluid (a speed below 10⁻⁶ of the field’s largest), or at max_steps. All of them together stop at 2 000 000 points. Default seeds lie on a lattice across the inlet face (the upstream face of the flow direction), half a cell inside it: over the obstacles’ shadow on the face, grown by half its size on every side and kept on the face, so the streamlines pass over and around the obstacles; over the whole face without obstacles. A seed outside the fluid starts none.

Wall heat flux

results.surface and results.contour with wall_heat_flux colour each obstacle face by the signed power it receives divided by its complete tessellated area, in power per area (positive into the wall). The face’s heat history is interpolated at the shown frame’s time without extrapolation: frame 0, which predates the history, has no value; recorded adiabatic faces are zero; faces without a history stay uncoloured. No slice is drawn for this surface-only field.

Along a line on a box wall, solve.probe gives the heat flux into the wall from its thermal condition: a held temperature T_w gives the one-sided second-order difference through the wall and the two cell-centre layers beside it (at Δx/2 and 3Δx/2), a flux face its flux, an adiabatic face zero:

q = k (9 T₁ − T₂ − 8 T_w) / (3 Δx)

Line extremes

The max and min of a line probe lie between the samples, at the vertex of the parabola through the extreme sample and its two neighbours; at an end of the line, or beside a point without a value, the sample itself.

Algorithm

  1. solve.fluid stores the result and replies with its summary (Lattice Boltzmann flow).
  2. A display command updates the session’s results view (slice, surface, streamlines, field, frame); the desktop viewport and the headless pictures draw the same plot of it.
  3. Streamlines are traced on the chosen frame and kept until the result, the frame or the settings change; the reply’s traced gives the number of streamlines, their points, the seeds, and no_start, the seeds that started none.

Output

CommandReply
results.sliceThe view, with contour.range over interior fluid cells.
results.surfaceThe view.
results.streamlinesThe view and traced: streamlines, points, seeds, no_start.
solve.probeAs in Parameters, in the display units.

The reply of solve.fluid lists every wall’s final and mean force and, with heat, its heat; the probe returns their complete histories.

Worked example

The bundled flow-past sample (Lattice Boltzmann flow) after its 16 s run, read with every results command of this page: a pressure slice, the bracket coloured by the pressure beside it, streamlines from a seed line, point and line probes, and two faces’ force histories.

Modelflow-past: air at 25 mm/s past the L-bracket, box (−60, −40, 0) to (180, 80, 100) mm, 184 320 cells of 2.5 mm, step Flow (16 s, 3200 steps, 11 frames), solved on the CPU
Viewsslice of pressure normal to z at 25 mm (half the upright’s height); results.surface with pressure; 100 streamlines seeded along the line (−50, −20, 5) → (−50, 60, 60) mm, coloured by speed
Probesfour points on y = 20 mm (the bracket’s mid-plane); a velocity_x line across the wake at x = 100 mm; the force histories of the upright’s upstream (F2:side:l6) and downstream (F2:side:l4) faces
Unitsmm, t, s, N, MPa
[
  {"command": "file.sample", "params": {"name": "flow-past"}},
  {"command": "solve.fluid", "params": {"step": "Flow", "backend": "cpu"}},
  {"command": "results.streamlines", "params": {"step": "Flow", "show": false}},
  {"command": "results.slice", "params": {"step": "Flow", "field": "pressure", "axis": "z", "position": 25}},
  {"command": "results.slice", "params": {"step": "Flow", "axis": "none"}},
  {"command": "results.surface", "params": {"step": "Flow", "show": true, "field": "pressure"}},
  {"command": "results.surface", "params": {"step": "Flow", "show": true, "field": "velocity"}},
  {"command": "results.streamlines", "params": {"step": "Flow", "show": true, "field": "velocity",
    "count": 100, "line": {"from": [-50, -20, 5], "to": [-50, 60, 60]}}},
  {"command": "solve.probe", "params": {"step": "Flow", "points": [[-30, 20, 25], [30, 20, 60], [100, 20, 25], [170, 20, 25]]}},
  {"command": "solve.probe", "params": {"step": "Flow", "line": {"from": [100, 20, 0], "to": [100, 20, 100], "field": "velocity_x"}}},
  {"command": "solve.probe", "params": {"step": "Flow", "forces": ["Bracket/F2:side:l6", "Bracket/F2:side:l4"]}}
]

The pictures were taken with the MCP screenshot tool after the slice (top view), the pressure surface (camera yaw 135°, pitch 30°, looking at the upstream face) and the streamlines (iso view). The headless pictures draw no colour legend; the ranges below are the replies’ contour.range (interior fluid cells of the whole domain, the last frame).

CommandWhat it returned
results.slice (pressure)contour.range: max 8.21 × 10⁻¹⁰ MPa at (−56.25, 18.75, 1.25), min −7.68 × 10⁻¹⁰ MPa at (1.25, 11.25, 51.25), just above the upright’s top
results.slice (velocity, first view)max 39.29 mm/s at (18.75, −16.25, 26.25), beside the bracket; min 0.043 mm/s at (103.75, −1.25, 1.25), on the floor in the wake
results.streamlinestraced: 100 streamlines, 18 639 points, 100 seeds, no_start 0
solve.probe points (frame 10, 16 s)(−30, 20, 25), upstream: u = (23.12, 0.26, 4.08) mm/s, p = 2.92 × 10⁻¹⁰ MPa. (30, 20, 60), above the bracket: u = (26.11, 0.02, 1.45) mm/s, p = −4.01 × 10⁻¹⁰ MPa. (100, 20, 25), 40 mm behind the foot: u = (6.33, −0.14, −4.17) mm/s, p = −3.11 × 10⁻¹¹ MPa. (170, 20, 25), 10 mm before the outlet: u = (14.95, −0.03, −6.90) mm/s, p = 1.51 × 10⁻¹⁰ MPa
solve.probe line, velocity_x at x = 100 mmmax 33.39 mm/s at z = 80.73 mm; min −0.876 mm/s at z = 5.23 mm
solve.probe forcestimes: 3200 samples, 0.005 s to 16 s (every step: ⌈3200/10 000⌉ = 1). F2:side:l6 x: 2.238 × 10⁻⁴ N at 0.005 s, 1.941 × 10⁻⁴ N at 16 s; F2:side:l4 x: −1.175 × 10⁻⁴ N to −1.368 × 10⁻⁴ N

Machine: Apple M4 Max; the solve on the CPU, the pictures on the GPU (renderer: Apple M4 Max (Metal), hardware). Each results command replied in under 0.1 s.

What to look at. The slice shows the stagnation pressure ahead of the upright, the low pressure where the flow separates off its two vertical edges, and the recovery downstream. The line probe across the wake finds reversed flow near the floor (−0.88 mm/s at z = 5.2 mm, 40 mm behind the foot) under the faster flow that went over the bracket (33.4 mm/s at z = 81 mm), and the point probes show the flow turning down (w < 0) behind the bracket. results.surface colours each tessellated triangle from the values at its vertices: the upright’s flat upstream face is two triangles, so it shows the pressure at its corners and misses the stagnation in its middle, which the slice shows beside it. The force histories of the two upright faces are each of order 10⁻⁴ N, over a hundred times the bracket’s drag (1.13 × 10⁻⁶ N): each face’s force carries the lattice’s rest pressure c_s² ρ₀ (Δx/Δt)² = 0.1 Pa over its area (Lattice Boltzmann flow), so drag is read from the sum over a closed set of faces.

Verification

CaseReferenceToleranceTest
A uniform flow along xThe streamline runs straight to the outlet in half-cell steps (19 points over 10 cells); a solid cell stops it; seeds outside, in a solid or in still fluid start none10⁻¹² off the linestreamlines_follow_the_flow
A rigid rotation about zStreamlines are circles: the midpoint rule keeps the radius 5 over 2000 steps0.05 (1 %)streamlines_of_a_vortex_close
64³ cells, hostile countsSeeds capped at 2000, points at 2 000 000exactstreamline_work_is_bounded
Default seedsOver the obstacle’s shadow grown by half its sizeseeds_lie_upstream_of_the_obstacle
SlicesCover the domain and interpolate; skip solid cells; a large layer is sampleda_slice_covers_the_domain_and_interpolates, a_slice_skips_solid_cells_and_refuses_bad_input, a_large_slice_is_sampled
First viewSlice across the flow, surfaces and streamlinesa_fluid_result_is_first_shown_across_the_flow
Line extremesVertex of the parabola through three samplesextremes_lie_on_the_parabola_through_three_samples
Wall heat on obstacle facesFace identity, area, sign and frame; no heat before the first samplewall_heat_uses_face_identity_area_sign_and_frame_in_both_views, histories_interpolate_without_fabricating_initial_heat

The local Nusselt numbers of the de Vahl Davis oracle cases are read with solve.probe lines (Oracle results).

Limitations

  • results.export.vtu does not export fluid steps yet: fluid results are per cell (“not supported yet”).
  • results.export.csv writes node probes only: a fluid probe’s reply has no node rows and is refused.
  • Frames are single precision.
  • Transient peaks between frames are not seen; more frames resolve them.
  • The speed ranges leave out every inlet and outlet layer.
  • results.xy refuses a fluid step’s fields: they are per cell (solve.probe reads them).

Implementation

FileContents
crates/lbm/src/solve.rsFrame, ForceHistory, HeatHistory, FluidResult (probe, in_open_layer, temperatures).
crates/engine/src/flow.rsFlowView::for_result, cell_values, interior_range, direction.
crates/engine/src/flow/line.rsLine probes, wall_heat_flux on box walls, line extremes.
crates/engine/src/flow/wall.rsFace-averaged wall heat of obstacle faces.
crates/render/src/flow.rsSlices, surface sampling, streamlines, face_seeds, the caps.
crates/engine/src/cmd/results.rsresults.slice, results.surface, results.streamlines.
crates/engine/src/cmd/solve.rsprobe_fluid.

OpenFOAM cases

deck.openfoam writes a fluid step as an OpenFOAM case directory, an export for running the case in OpenFOAM. FieldCraft writes the case and nothing else: OpenFOAM runs as its own program from its own installation. The case is written for ESI OpenFOAM v2406 or later (openfoam.com), and every file says so in its header. FieldCraft’s own fluid results are checked against theory, experiments and published benchmarks (see verification), never against OpenFOAM’s.

{"command": "deck.openfoam", "params": {"path": "channel_case", "processes": 8,
  "refine_boxes": [{"min": [40, 0, 0], "max": [190, 8, 8], "spacing": 0.5}]}}

Then, in the case directory with OpenFOAM’s environment: sh Allrun, then open case.foam in ParaView. The script runs on the processes ranks the case was written for (its decomposeParDict); write the case again to change them.

Every setting the case depends on is written into it, the mesh-quality limits included: nothing is taken from the installation’s own files (no #include), so the same case meshes and runs the same on every installation that reads it. Each fixed entry names, in the source beside it, the section of OpenFOAM’s public user guide, tutorial guide or documentation site it follows, or how its value is derived.

What is written

ModelCase
fluid domain boxsystem/blockMeshDict: one block, cells of spacing × cell_factor (1 by default); patches x_min … z_max
obstacle bodiesconstant/triSurface/<body>.stl: ASCII, one solid per named face (tessellated as solve.fluid does), in metres
system/snappyHexMeshDict: obstacle surfaces refined back to the spacing, refine_boxes to their own; feature edges from surfaceFeatureExtract
velocity faceU fixed, p zero gradient
pressure facep fixed at pressure / density (OpenFOAM’s incompressible pressure is kinematic), U inflow/outflow (pressureInletOutletVelocity)
slip faceU slip, on a plain patch
symmetry facesymmetryPlane (box faces are planar)
wall face, obstacle faceno-slip; a moving_wall face or a named obstacle surface condition: U fixed at its velocity
Newtonian materialconstant/transportProperties: ν = μ / ρ
step turbulenceconstant/turbulenceProperties: laminar without one; Smagorinsky’s model as OpenFOAM’s LES Smagorinsky, its Ck derived from the step’s constant
step length and framessystem/controlDict: pimpleFoam, endTime, a result every length / frames, the time step adapted to max_courant (1 by default, the most it may be)
step averaginga running mean of U and p from the step’s own averaging start (none when the step does not average)
processessystem/decomposeParDict (scotch) and the ranks Allrun uses

Each obstacle face becomes the patch <body>_<face>: characters OpenFOAM does not take become _, and +/- become p/m (Plate_F1_px). The reply maps every patch back to its model face.

snappyHexMesh keeps the side of the obstacles that holds location, which must lie on no cell face. The point written is always the centre of a cell of the finest refinement level, and the lattice’s exact inside test decides that it is in the fluid:

  • when location is given, the centre of the finest cell holding it (the reply shows the point written); a point inside an obstacle is refused;
  • when it is left out, the first fluid lattice cell whose neighbours are all fluid, flooding in from the inlets and outlets (or from the box’s faces when none is open), so the point is in the fluid the open faces reach, never in a closed pocket.

Lengths are given in the input units; the case is SI, as the model stores it.

Reading the results back

results.openfoam {"path": "channel_case"} reads the results of a case deck.openfoam wrote and OpenFOAM ran as the fluid results of its step, for viewing them with FieldCraft’s slices, probes, lines and measurements. OpenFOAM’s results are shown as OpenFOAM computed them; they are never used to judge FieldCraft’s own.

  • Each written time is a frame, sampled at the centres of a lattice over the domain box (the domain’s spacing, or spacing). Each fluid lattice cell takes the values of the OpenFOAM cell whose centre is nearest; the obstacles’ cells are solid.
  • Velocity, and the gauge pressure: OpenFOAM’s incompressible pressure is kinematic, so it is multiplied by the density the case was written with (recorded in fieldcraft.json beside the case).
  • The cell centres come from 0/C, which Allrun writes. The fields must be ASCII, as the case is written.
  • A case that was not reconstructed (only processor0 … processorN) is read from its processor directories, each rank’s centres and fields joined in rank order.
  • Fewer frames: from and to (the written times in this range, input units, inclusive) and every (every n-th of them, always with the last).

What is refused, rather than read as something else:

  • a directory without fieldcraft.json, or one whose record lacks a value;
  • a case none of whose cell centres lies in the step’s domain (another model’s case);
  • a fluid lattice cell with no OpenFOAM cell near it, which would otherwise show as zero flow. “Near” is bounded by the case’s largest cell: the background cell’s diagonal, plus the distance snappyHexMesh may move points onto a surface;
  • a field whose count differs from its mesh’s cells, binary files, and counts beyond the memory the fluid results may take.

Compressible cases

"compressible": {"ambient": 0.101325, "temperature": 20, "gas_constant": 287.05, "far_field": 50} writes a rhoCentralFoam case instead: a laminar ideal gas, for flows the lattice cannot run, such as a choked nozzle. Every value is required; no gas is assumed.

InputWhat it is
ambientthe absolute pressure the model’s gauge pressures count from
temperaturethe initial temperature, and the total temperature of the reservoirs
gas_constantthe specific gas constant R/M of the gas (air: about 287 J/(kg·K))
far_fieldthe far-field relaxation length of the non-reflecting outlets (OpenFOAM’s lInf): the distance over which an outlet’s pressure relaxes towards its value
initial_pressureboxes of the fluid that start at their own gauge pressure (setFields), such as a charged reservoir
the materialthe specific heat, viscosity and conductivity (isotropic); its density is not used
ModelCompressible case
pressure face above the ambienta reservoir: total pressure and total temperature
other pressure facesa non-reflecting outlet at that pressure
velocity faceU fixed, T at temperature
walls, obstacle facesno-slip and adiabatic
time stepadapts to max_courant: 0.2 unless given, at most ½ (see below)

A turbulence model is refused in a compressible case: it is laminar.

The time-step limit

The Courant number of a cell is C = Σ over the axes i of (|u_i| + c) Δt / Δx_i, the sum of the wave speeds crossing each cell face’s axis, as OpenFOAM’s CourantNo sums it. The case adapts the step to max_courant.

The case writes the central-upwind flux of Kurganov, Noelle and Petrova (2001, SIAM J. Sci. Comput. 23), which the solver applies in semi-discrete form.

The default is 0.2: the CFL number at which Greenshields, Weller, Gasparini and Reese (2010, Int. J. Numer. Meth. Fluids 63, §4.1 and §4.2) ran their central-scheme cases, a shock tube and a forward step, and their figures 2 and 3 use it too.

The ceiling ½ is the stability limit of the central schemes that the same paper states in §4.1 (“below the stability limit of 0.5 of the central schemes”). The paper states it and does not derive it, and this document does not prove it. max_courant may not pass it.

Specific heats and γ

γ = c_p / (c_p − R) is derived from the material’s c_p and the gas constant, not given. An ideal gas has c_v ≥ 3R/2 (equipartition over the three translational quadratic terms; Kittel and Kroemer, Thermal Physics, 2nd ed., ch. 3), so γ ≤ 5/3, with equality for a monatomic gas. A γ above 5/3 means the data are not an ideal gas’s. The case is still written, with a note on the case naming γ: data rounded to four figures can sit just above 5/3 for a monatomic gas (argon, with c_p = 520.3 and R = 208.13, is 0.0032 % above it).

Reading a compressible case back gives each cell’s gauge pressure (the absolute pressure less ambient), its temperature, and its density ρ = p/(R T). A cell whose temperature or pressure is not positive is refused. The ports’ mass flow, mixed temperature and heat then weigh each cell by its own density.

Results saved by FieldCraft 0.8 and earlier (the MCRSLT05 results encoding and older) open with their model and without their results; solve the step again.

Not written yet

The command fails and names what it cannot write yet:

  • heat in the fluid
  • porous zones, fans and thin walls
  • free surfaces
  • body accelerations
  • periodic faces
  • parabolic inlet profiles
  • Vreman’s and the Spalart–Allmaras models; any turbulence model in a compressible case
  • non-Newtonian viscosity, and a density or viscosity that follows the temperature
  • a material without a density or a viscosity (no value is assumed)
  • a case directory that already holds files: choose a new or empty one (nothing is overwritten or deleted)

What it writes differently from the lattice step is listed in the reply’s notes:

  • the lattice’s time step is not used
  • the steady stop rule is not mapped
  • the wall models are not mapped (walls are resolved no-slip)
  • a convective or characteristic outflow becomes an inflow/outflow pressure face
  • Van Driest’s damping is written as OpenFOAM’s law, min(κ y D, C Δ) with Cdelta the step’s constant, not the lattice’s C Δx D

Licence and clean room

The case files are written from OpenFOAM’s public documentation (case layout, dictionary syntax, boundary conditions); no OpenFOAM source or tutorial case is read, copied or linked. OpenFOAM is run by the user as a separate program.

What works: verified fluid capabilities

The fluid capabilities whose results have been checked against theory, a published benchmark or an experiment, with the numbers, and the ones that have not. Each number is quoted from the page or test that records it; nothing here was rerun for this page. Use it to pick examples and to word posts: a capability is described as verified only for the case and resolution it was verified on.

Large-eddy simulation of bluff bodies and wall-modelled LES are not on this list. Their state, the measured errors and what blocks them are in RFC 0003.

Laminar flow (CPU, f64)

CapabilityCaseReferenceMeasuredToleranceSource
D3Q19 TRT collisionplane Poiseuille, body force, 4/8/16 cells, τ = 1parabola (theory)exact to round-off10⁻¹⁰ of the peakLattice Boltzmann, Verification
Taylor–Green vortex, 16/32/64 cellse^(−2νt)1.6e-2, 4.0e-3, 9.9e-4: order 2.0; mass to 1e-13finest < 2e-3, order > 1.8same
Couette, 16 cellslinear profile, wall shear μU/Hprofile 1e-10, shear 1e-610⁻¹⁰; shear 10⁻⁶ relativesame
Regularised and hybrid (HRR) collisionsPoiseuille 8/16/32 cellsparabolaorder 2.00 (both)order − 2
shear wave, HRR, σ 0.5–0.985exact rate of the scheme’s linear mapwithin 2.5e-71 %same
MRT collisionTaylor–Green 16/32/64e^(−2νt)orders 2.015, 2.004finest < 2e-3, order > 1.8same
Lid-driven cavityRe 100, 64² cellsGhia, Ghia & Shin 1982: u/U −0.2109 at y 0.4531−0.2136 at 0.4585 (TRT), −0.2139 (regularised)—same
Confined cylinder, steadySchäfer & Turek 2D-1, Re 20, D/Δx 20, staircase wallsc_D 5.57–5.595.773 (+3.5 %)—same
Confined cylinder, sheddingSchäfer & Turek 2D-2, Re 100, D/Δx 20, staircase wallsc_D,max 3.22–3.24, c_L,max 0.99–1.01, St 0.295–0.305St 0.2987 (inside the band); c_D,max 3.447 (+7 %), c_L,max 1.102 (+9 %)c_D 8 %, c_L 12 %, St 2 % (the outlet-distance test)same, and Boundary conditions (outlet at 7.5 D: 3.356, 1.072, 0.2989)
Interpolated (Bouzidi) wallsround pipe, 8 and 16 cells per radius (oracle pipe-poiseuille-interpolated-walls)a R²/(4ν)−0.15 %, −0.04 % (halfway walls: −5.5 %, −2.1 %)0.5 %, 0.15 %Oracle results
annular Couette, sliding rod, 6–16 cells per radiusln profile; rod drag 2πμUL/ln(R₂/R₁)order 1.98; rod drag within 0.11 % (halfway: +1.5 to +14 %)order > 1.6; drag 0.5 %Boundary conditions
periodic Stokes sphere array, R = 3, 6, 9 cellsHasimoto 1959, Sangani & Acrivos 1982−1.64 %, −0.85 %, −0.32 % (halfway: +11.7 %, +1.7 %, +2.3 %)2 %, closer at every refinementsame
Inlets and outletsparabolic inlet, pressure outlet, 16 cellsPoiseuille profile, gradient −12μŪ/H²profile 3.0e-4, gradient +0.07 %5e-3, 1 %Lattice Boltzmann
characteristic outlet, plane pulse in a 2048-cell duct (oracle characteristic-outlet-reflection)Selle, Nicoud & Poinsot 2004 one-pole responsedeparture 2.28e-3 of the peak; tail rate 1.0005 of K/2departure 4e-3; rate 0.5 %Boundary conditions
Inlet ramp (inlet_ramp)empty 192-cell tubeone-dimensional solution by characteristicswithin 0.13 % (m = 1), 0.08 % (m = 2)—Boundary conditions, “Raising the inlet”
2-D cylinder Re 3900, 16 cells per D, far-field C_p rmsideal tube × the run’s measured decayno ramp 20.19; ramps of 1, 2, 2.5 T₀: 7.020, 1.350, 0.049 (ideal tube × decay 7.008, 1.357, 0.058)printed, not assertedsame
Shear-dependent viscositypower-law Poiseuille, n = 0.5 and 1.5 (oracle)Bird, Armstrong & Hassagerwithin 2.5e-5 to 3.8e-4 m/s of 0.04–0.30 m/s3.3e-4, 6.0e-4 m/sOracle results
Free surfacehydrostatic column; plug filling (oracle)hydrostatics; volume conservation0.3 %; 0.11 %; mass to 1e-101.5 %; 0.5 %; 1e-10same
dam break (oracle dam-break-martin-moyce, experiment)Martin & Moyce 1952front times +10 to +13 %; column height +0.5 %14–16 %; 5 %same
Determinism (threads)a channel with an inlet, outlet, slip top, body force and a block, plain TRT with halfway, linear and quadratic interpolated walls; heat with buoyancyone thread against 2, 3 and 7bit for bitexactcrates/lbm/tests/threads.rs
Determinism (repeat)one ball in a channel, solved twicethe first solvebit for bitexactresults_are_bit_for_bit_reproducible (crates/lbm/tests/verification.rs)

Heat (CPU, f64)

CapabilityCaseReferenceMeasuredToleranceSource
Natural convectionde Vahl Davis cavity, Ra 10³ to 10⁶, Pr 0.71 (oracle)de Vahl Davis 1983mean Nu −0.012 %, +0.15 %, +0.35 %, +0.54 %; Nu_max at Ra 10⁶ −2.7 % (known failure)mean Nu 0.13 %, 0.27 %, 0.73 %, 1.3 %; every other quantity has its own in docs/oracle.mdHeat transfer, Oracle results
Conjugate heat transfercavity with a centred conducting body, k_s/k_f 0.2, 1, 5 (oracle)House, Beckermann & Smith 1990+0.21 %, +0.20 %, +0.18 %0.6 %Heat transfer
Conduction through solids and contactscomposite walls, contact resistance, thin wallsseries conductionexact discrete solution1e-9same
Radiation from a conducting slab16-cell slab (oracle radiation-slab-lattice)conduction–radiation balance< 1e-6 relative1e-8, 1e-6 relativesame
Melting and freezingtwo-phase Stefan problem (oracle)Neumann’s solutionfront +0.27 % on 128 cells0.4 %same
channel frozen on its cold quarter (oracle)plane Poiseuille in the liquid+1.47 %2.2 %same

Turbulence: what is verified

CapabilityCaseReferenceMeasuredToleranceSource
Smagorinsky’s modelCouette with Smagorinsky’s model, HRR σ 0.9ν_t = (CΔx)²U/hwall shear 3e-6, ν_t/ν 8e-4 relative2e-3, 2e-2Collision operators
Spalart–Allmaras (RANS)wall-resolved Re_τ 180 channelthe model’s own 1-D solutionsecond-order convergence; the model itself +1.1 % in U_b against Moser, Kim & Mansour—Turbulence, verification.md
SA constant-stress wall lawRe_τ 1000 channel, first node at y⁺ 31–100wall-resolved 1-D SAC_f +0.8 to +7.3 %—verification.md, “Spalart–Allmaras: its wall law in the channel”

Smoke-tested, no accuracy claim. The matched on-node wall (spalding_bounce_matched) at Re_τ 1000, 8 cells per δ, 2 δ/u_τ discarded and 2 averaged (the heavy job’s bounded run): U_b⁺ 19.792 against Lee & Moser’s 19.990 (#1121; the run asserts stability and U_b⁺ within 30 %). Its full study on the GPU (16, 24, 32 cells per δ to the statistical protocol) is inconclusive (time cap): not passed, with C_f −2.9 % at 16 cells, −6.7 % at 24 and −8.7 % at 32 (#1151). Do not post either as an accuracy result.

GPU backend (wgpu, f32)

WhatMeasuredSource
Agreement with the CPUstated tolerances: velocity 2e-5 of the peak, density 1e-6, wall forces 5e-5. Measured on the M4 Max: velocity 5e-7 to 7.4e-6, wall shear 1.9e-5; on the GB10, Schäfer–Turek C_d 7e-5 % and St 4e-4 % off the CPU (#785)GPU backend
Throughput, TRT, in place, periodic 128³ (million cell updates per second)RTX 4090 3897, M4 Max 1364, GB10 1224same, “Performance”
Throughput, TRT, sphere 128³RTX 4090 3572, M4 Max 1256, GB10 1146same
Throughput, HRR σ 0.99 / + Vreman / dynamic σ, periodic 128³, GB10777 / 773 / 772 (regularised 1207)same
Against the CPU on a whole modelflow-past at 1.25 mm, 1.47 M cells, 800 steps: CPU 18.1 s (65 M/s), GPU 3.6 s (328 M/s), M4 Max; face forces within 1e-7 of the CPU’ssame, “Worked example”
A large modelAIO radiator air side, 5.07 M cells, 20 513 steps: about four minutes on the GB10Examples, “AIO cooler radiator”

The CPU figure for one thread is 13.8 million updates per CPU second (TRT, flow-past; Collision operators, “Cost”). The CPU stops scaling at about four threads (#643); quote GPU speed-ups against a stated CPU configuration, never as one ratio.

OpenFOAM export and read-back

deck.openfoam writes a fluid step as an ESI OpenFOAM v2406 case, incompressible (pimpleFoam) or compressible (rhoCentralFoam, a laminar ideal gas); results.openfoam reads the results back for viewing (OpenFOAM cases). What is tested: every written dictionary against our own reader of the documented grammar, the round trip of what we write, and read-backs of files we build in the documented ASCII format (reconstructed and decomposed cases, refusals of hostile counts, of uncovered cells, of non-positive T and p). What is not: no case written by FieldCraft has been run in OpenFOAM by the project. One compressible case still needs a run on v2406 by someone who has it (#1094). An OpenFOAM run is an interoperability check; it never verifies FieldCraft’s results.

Proposed showcase examples

Run times marked measured are from the page cited; the others are estimates from cells × steps over the throughput above and must be measured before they are posted.

#ModelWhat it showsRun timeWhere
1Schäfer & Turek 2D-2: cylinder in a channel at Re 100, D/Δx 20, staircase (halfway) walls, convective outlet; animate the vorticityperiodic shedding with St 0.2987 inside the benchmark’s 0.295–0.305 (c_D,max +7 % on this staircase grid); the CPU and the GPU agreeing on C_d to 7e-5 % (#785)a few minutes on the CPU (estimate)CPU, then GB10 for the side-by-side
2de Vahl Davis cavity at Ra 10⁵, then the House et al. cavity with a conducting bodymean Nusselt number within 0.35 % (Ra 10⁵) and 0.18–0.21 % (House et al.) of the benchmarks; temperature and streamlinesabout a minute each (estimate; oracle cases)CPU
3AIO cooler radiator, air side (cooling-aio-half)5 M cells of real geometry from SolidCraft in about four minutes; 61 W at effectiveness 0.93, grid change 0.4 %about 4 min (measured)GB10
4Inlet ramp, two runs of the 2-D cylinder in a 24 D × 12 D box: started at full speed and ramped over 2.5 T₀the start-up pressure wave and its removal: far-field C_p rms 20.19 without the ramp, 0.049 with it, against 0.058 from the characteristics solution times the run’s decayabout 10–15 min per run on the CPU (estimate)CPU
5Staircase against interpolated walls: the round pipe at 8 cells per radius, or the sphere array at R = 3−5.5 % against −0.15 % on the pipe; +11.7 % against −1.6 % on the spheresseconds to a minute (estimate)CPU
6Lid-driven cavity at Re 100, 64² (the pending oracle case’s recipe)the primary vortex and the centreline profile on Ghia et al.’s pointsunder a minute (estimate)CPU
7cooling-heat-sinkmixed convection with buoyancy, 1.93 W at 13.0 K/Wabout 4 min (measured)CPU
8GPU throughput on the GB10, M4 Max and RTX 40901.2–3.9 billion cell updates per second, CPU/GPU agreement on the same modelthe throughput test, minutes (--test throughput)GB10, M4 Max
9Dam break against Martin & Moycea free surface against measured front positions, mass exactminutes (estimate)CPU
10A model exported with deck.openfoam, run in OpenFOAM by its user, read back with results.openfoam and shown with FieldCraft’s slicesinteroperability only, never a comparison of answersexport seconds; the OpenFOAM run is the user’sCPU; needs OpenFOAM

Not for posts as accuracy: bluff-body LES (cylinder Re 3900 C_d 1.07–1.83 against 0.99 depending on the setup and the start), wall-modelled LES channels, the Re_τ 5200 channel (not runnable below about 42 cells per δ). See RFC 0003.

Verification and validation

Every solver capability is checked against three kinds of reference, and every accepted result is frozen so it cannot drift.

KindWhat it checksSources
TheoryThe code solves the equations rightClosed-form solutions (beams, plates, Lamé, Kirsch, waves, shocks, Poiseuille…), patch tests, convergence rates, mesh invariants
ExperimentThe model predicts realityMeasurements published in papers and reports (Taylor bar, cavity and cylinder flows, FSI experiments…)
Standard benchmarksThe code agrees with the published targets of standard problemsNAFEMS benchmarks, MacNeal–Harder and other published standard problems and reference solutions. Values openly published in benchmark reports and guides (ESRD, vendors’ benchmark guides) may be cited; we never run the product that made them

Rules:

  • Each case is our own model of the problem, built from the published description (geometry, material, loads, boundary conditions). We never run a commercial product and never copy its input files, manual text or figures; only the published numbers are used, with a citation.
  • Closed-source or non-permissively licensed software is never used to verify a result, brute-force a value or decide behaviour. Results a contributor shares from their own commercial licence are a cross-check in the discussion, never a reference value (AGENTS.md).
  • Each case lives in tests/oracle/<case>/:
    • recipe.json — the model as FieldCraft commands (or a SolidCraft recipe for geometry);
    • expected.json — the reference values with kind (theory | experiment | benchmark), source (citation: document, table or figure, page), quantity, value, tolerance and the reason for that tolerance (mesh, measurement scatter, model differences);
    • fixture.json — FieldCraft’s accepted result, written by cargo xtask oracle --bless <case> only after the case passes against expected.json.
  • cargo xtask oracle runs every case, compares with expected.json (pass/fail with error) and with fixture.json (any change beyond the fixture tolerance fails CI, even if the reference still passes), and writes docs/oracle.md with the table of cases, sources, errors and status.
  • A fixture is updated only deliberately (--bless), in a PR that says why the result moved (a better element, a finer default mesh), never to hide a regression.
  • The theory suite is the gate for every merge; experiment and benchmark cases run in CI too, with their cited tolerances.

The case format

cargo xtask oracle builds fieldcraft-testkit’s oracle binary (release) once and runs every case through the command engine; the results are in oracle.md.

cargo xtask oracle                      # every case; writes docs/oracle.md
cargo xtask oracle --case nafems-le1    # one case (repeatable); docs untouched
cargo xtask oracle --bless nafems-le1   # freeze a passing case's results (or --bless all)
cargo xtask oracle --quick              # skip cases marked "slow" (and "nightly")
cargo xtask oracle --nightly            # also run the cases marked "nightly"
  • recipe.json is a script fieldcraft-cli run also accepts: a JSON array of {"command", "params"}; a step may carry an "id" so a quantity can read its output. Meshes come from mesh.block (mapped hex, tet or wedge blocks with arcs and elliptical edges, named faces, edges and vertices that sets select), mesh.tet.generate, or nodes and elements written one by one; once structured and automatic meshers land, cases may use them.
  • design.json (optional) is a SolidCraft script that builds the geometry, opened before the recipe (the test corpus’s recipe form).
  • expected.json:
    {"title": "…", "kind": "theory|benchmark|experiment",
     "source": "document, section/table/figure, page",
     "status": "active|pending", "requires": "the capability a pending case waits for",
     "slow": false, "nightly": false,
     "quantities": [{"id": "syy_D", "quantity": "σ_yy at D (2, 0)",
       "measure": {"command": "solve.probe", "params": {"step": "Load", "at": [[2, 0, 0]]}, "pointer": "/nodes/0/stress/1"},
       "value": 92.7, "tolerance": {"relative": 0.01}, "reason": "why this tolerance",
       "known_failure": "optional: why FieldCraft misses the reference today"}]}
    
    A measure reads a JSON pointer either from a recipe step’s output ("from": "<id>") or from a command run after the recipe ("command", "params"); an optional "scale" multiplies it, an optional "plus" (a measure of its own) adds another number of the same run (the mean of two nodes, each scaled by ½), and an optional "over" (a measure of its own) divides the result by another number of the same run, for ratios such as the stress in one element over the stress in another. A case too long for every change (minutes) is marked "nightly": true: it runs in the nightly, manual and release runs (--nightly), or when named with --case or --bless; any other run checks it by its fixture (a fixture that misses an edited reference fails), and docs/oracle.md always shows its fixture, so the page is the same either way. "slow" cases run on every change and only --quick skips them. A tolerance is relative (of the reference), absolute, both, or "exact": true. A pending case cites its reference values (or null until transcribed) and has no recipe yet.
  • fixture.json holds each passing quantity’s accepted value and its band (10⁻⁹ of the larger of value and reference, plus 10⁻³ of an absolute tolerance; a quantity whose reference is zero, which is rounding noise, keeps its absolute tolerance as its band; an ill-conditioned quantity may set a wider fixture_relative with a fixture_reason; a quantity that depends on a mesh generated from geometry, which is not bit-identical across platforms, sets "fixture": false with a fixture_reason and is gated by its reference tolerance alone): the result is deterministic, the band only absorbs last-digit differences of the system maths library.

The run fails when a quantity misses its reference (unless it is a known_failure, which is listed in oracle.md with its reason), when a known failure starts passing (remove the mark), when a result leaves its fixture band, when a passing quantity has no fixture, or when a case cannot run.

Adding cases for a new capability

Every capability that lands brings its oracle cases in the same pull request:

  1. Turn the pending cases that waited for it into active ones (write recipe.json, drop status/requires, add measure and tolerance with its reason to each quantity), and add theory cases for its closed-form solutions (patch test and convergence for an element; the analytic problem for a load, constraint or procedure).
  2. Choose meshes that are converged well inside the tolerance (show the refinement in the case’s README), or the mesh a benchmark prescribes.
  3. Run cargo xtask oracle --case <name>; when it passes, --bless <name>; commit the case, its fixture and the regenerated docs/oracle.md.
  4. A case that misses its reference stays honest: keep the tolerance its reason supports and add known_failure with what is missing. Never widen a tolerance to make a case pass.

The meshing corpus

The meshers have a regression gate of the same kind: every part of the meshing test corpus (tests/corpus, docs/meshing/corpus.md) has a fixture.json with each stage’s outcome and its deterministic measures, in the oracle’s format, and every tet mesh the corpus makes is checked against validity invariants that do not depend on the mesher’s own gate. cargo xtask corpus and the heavy test corpus_matches_its_fixtures (CI’s heavy job) fail when a part moves from its fixture or a mesh breaks an invariant; cargo xtask corpus --bless <part> rewrites a fixture. docs/meshing/corpus.md gives the bands and the rules for blessing.

TRT velocity inlet against published closures (#820)

FieldCraft’s TRT velocity inlet (crates/lbm/src/inlet.rs; literature C3.3e) against the published closures, each implemented from its paper behind the same inlet path, on the same three cases; all TRT with Λ = 3/16, no turbulence model, measured on CPU (2026-11-13). The comparison harness swapped the closure in place and is not committed; the committed tests cover the adopted inlet.

  • Slip box: the #820 16³ box, slip sides, uniform inlet 0.05 (Mach 0.087), convective pressure outlet, a 1e-6 checkerboard or broadband seed; steps survived of 30 000 (the run stops or the density departs by more than 0.1). Survival is checked in 50-step chunks; a solver error reports the last fully completed chunk.
  • Duct: walled 48 × 16 × 16, uniform inlet 0.05, convective outlet, τ⁺ = 0.52, 60 000 steps in 1000-step chunks (a solver error reports the last fully completed chunk); over the last 10 000 the total-mass drift per step, the inlet’s mass flux against ρ_b U A (the prescribed velocity), and inlet against outlet plane.
  • Poiseuille: the parabolic-inlet channel of regularized.rs, τ⁺ = 0.6, H = 8, 16, 32 cells; the largest profile error over u_max at mid-length (order from 16 to 32) and in the first cell inside the inlet, at H = 32.
ClosureSlip box, checkerboard, τ⁺ 0.505 / 0.507 / 0.51 / 0.52Slip box, broadbandDuct: steps; mass drift/step; flux vs ρ_b U A; in vs outPoiseuille: mid error, order; next to inlet
FieldCraft (Zou–He + trace extrapolation + Shapiro high-pass)all 30 000 (final ρ′ ≤ 8e-9)all 30 000 (final ρ′ ≤ 3e-8)60 000; 1e-20; 8e-16; 7.9e-57.7e-5, 1.99; 5.6e-6
Zou & He 1997 / Hecht & Harting 2010 (develop)2 800 / 12 200 / 30 000 / 30 000400 / 450 / 600 / 5 700fails at 11 0007.7e-5, 2.00; 6.8e-6
Guo, Zheng & Shi 2002 extrapolation300 / 350 / 500 / 23 950300 / 350 / 500 / 27 050fails before 1 0003.1e-4, 1.98; 2.7e-4
Latt et al. 2008 regularised400 / 550 / 950 / 30 000450 / 550 / 1 000 / 30 00060 000; 4e-20; 4e-16; 8.0e-57.7e-5, 2.00; 5.1e-5
LODI (Izquierdo & Fueyo 2008; Heubes et al. 2014), bounce-back1 200 / 1 750 / 6 650 / 20 4001 150 / 1 700 / 6 850 / 22 00060 000; 0; −3.7e-4; 7.7e-57.6e-5, 1.97; 9.2e-5
LODI, regularised populations300 / 400 / 550 / 11 250300 / 350 / 500 / 11 500fails before 1 0009.3e-5, 2.08; 1.5e-4

The in-versus-out mismatch of about 8e-5 is the same for every closure that survives: it is the outlet plane’s, not the inlet’s (the inlet plane and the first interior plane agree to 1e-15). The LODI inlets use the outgoing amplitude from one-sided interior differences with no pressure relaxation; with bounce-back the boundary density is not the cell’s, and the inlet’s mass flux falls 3.7e-4 short of ρ_b U A. A sponge or PML layer (Xu & Sagaut 2013; Najafi-Yazdi & Mongeau 2012) was not built. Below τ⁺ = 0.505, reachable only with a turbulence model, none of these holds at this Mach number (literature C3.3c, C1.5).

Fluid capabilities at a glance

The fluid capabilities verified against theory, benchmarks or experiment, with their numbers and proposed showcase examples, are listed in What works. Large-eddy simulation is not among them: its measured errors, what blocks published accuracy and the options are in RFC 0003 (the LBM-LES work is parked as of 2026-11-26).

Long studies

Some studies take hours and run in no CI job; the heavy job (cargo xtask test --heavy, 60 minutes) runs a bounded regression of each instead, and each study is run by hand when the physics under it changes. The study’s test stays #[ignore]d and returns at once unless its environment variable is set, so --heavy passes over it.

Re_τ 180 channel against Moser, Kim & Mansour (#663, #664)

Smagorinsky’s model (C = 0.1, regularised collision), the channel 2πδ × 2δ × πδ driven by u_τ²/δ, 10 δ/u_τ of start-up discarded and 15 averaged. Reference: R. D. Moser, J. Kim, N. N. Mansour, Direct numerical simulation of turbulent channel flow up to Re_τ = 590, Phys. Fluids 11:943–945, 1999 (Re_τ = 178): U_b/u_τ ≈ 15.7, U_c/u_τ ≈ 18.3, C_f ≈ 8.18 × 10⁻³.

FIELDCRAFT_CHANNEL_STUDY=1 cargo test --release -p fieldcraft-lbm --test turbulence -- --ignored --nocapture study

About 1.8 h on 32 threads. Recorded on Windows x86_64 (PR #668):

cells per δy⁺ per cellU_b/u_τU_c/u_τC_f
1215.09.95 (−36.6 %)13.07 (−28.6 %)2.02e-2
1810.011.55 (−26.4 %)14.42 (−21.2 %)1.50e-2
247.512.81 (−18.4 %)15.60 (−14.8 %)1.22e-2
325.614.17 (−9.8 %)17.00 (−7.1 %)9.96e-3

The heavy job runs the 12-cell grid alone with the same protocol (a_coarse_channel_at_re_tau_180_stays_turbulent_with_the_study_s_means, about a minute and a half on 14 cores): turbulent, and within 3 % of the 12-cell means above. The flow is chaotic, so its means move with the platform (9.90 and 12.95 on macOS aarch64); the band is three times that scatter.

With Van Driest damping (van_driest: 26, literature C5.3; probes, not validation). At Re_τ 180 a grid of N cells per δ has Δy⁺ = 180 / N, so none of these grids resolves the wall: damping is meant for a wall resolved down to y⁺ ≈ 1–2 at the first cell (about 90 cells per δ). The probes are short (5 δ/u_τ of start-up discarded, 1 averaged) and the bulk speed was still falling at their end. Recorded on Linux aarch64 (NVIDIA GB10, 20 cores, shared):

cells per δΔy⁺damped, short run: U_b/u_τU_c/u_τundamped, full protocol: U_b/u_τ
1215.0unstable at 2.2 δ/u_τ—9.95
1810.012.42 (−20.9 %)15.63 (−14.6 %)11.55
247.514.00 (−10.8 %)17.26 (−5.7 %)12.81

All three are not wall-resolving. On the 12-cell grid the damping takes away the eddy viscosity that held τ₀ = 0.5013 stable at a wall the grid cannot resolve; the run now says so (the first cells’ y⁺ in the instability’s message, and a warning past y⁺ 5 when a run ends). A wall-resolving study in a minimal flow unit (πδ × 2δ × 0.3πδ at 90 cells per δ, 4.3 M cells, about 6 × 10¹⁰ cell updates per δ/u_τ) would take a day or more on the CPU and is not run.

What it does not establish yet:

  • No converged reference. The bulk speed approaches MKM’s monotonically as the first cell moves into the viscous sublayer, but no grid is within its tolerance of it: without wall damping the eddy viscosity is too large in the first cells off the wall, so the friction is too high, and the grids above are too coarse for damping to model the wall. A wall model (literature C5.2) or a wall-resolving grid is the next step.
  • The finest grid had not settled. At 32 cells per δ the bulk speed was still falling slowly at the end of the averaging, so its mean is an upper bound of that run’s, and the observed trend is not a convergence order.
  • One realisation per grid. The means carry the sampling scatter of a single 15 δ/u_τ average (about 1 % at 12 cells per δ, from the two platforms above); no confidence interval is stated.

Spalart–Allmaras: wall-resolved channel against its 1-D solution and Moser, Kim & Mansour

The Spalart–Allmaras model (no wall law) in a channel at Re_τ 178.12, one cell along x and z (the flow is fully developed), halfway walls, the body force u_τ²/δ, the lattice viscosity fixed at 0.002 (τ⁺ 0.506) so that Δt ∝ Δx² (crates/lbm/tests/sa_channel.rs).

  • Theory (asserted). The steady 1-D SA solution with the same constants, solved in the test by second-order finite volumes and pseudo-transient Newton, Richardson-extrapolated from 1728 and 3456 cells (U_b⁺ 15.850273, U_c⁺ 18.447753, largest correction 7.9e-6 u_τ). The lattice u⁺ profile must converge to it at second order: the observed order on the finest pair in [1.8, 2.2], sa_mms.rs’s band (heavy test). The trunk test checks the reference’s own order and that the coarsest lattice run settles on the turbulent branch.
  • Benchmark (reported, not asserted). R. D. Moser, J. Kim, N. N. Mansour, Phys. Fluids 11:943–945, 1999, chan180.means: U_b⁺ 15.68, U_c⁺ 18.301, C_f 8.135 × 10⁻³. No published SA-against-DNS comparison at this Re_τ gives a tolerance, so the gap is reported as the model’s error: the converged 1-D SA solution is +1.09 % in U_b, +0.80 % in U_c and −2.1 % in C_f.
cells across 2δfirst cell y⁺L2 / L∞ of u⁺ against 1-DU_b⁺U_c⁺C_fU_b, U_c, C_f against MKM
961.860.130 / 0.13815.72618.3108.087e-3+0.30 %, +0.05 %, −0.59 %
1441.240.0592 / 0.062815.79418.3858.018e-3+0.73 %, +0.46 %, −1.43 %
2160.820.0265 / 0.028015.82518.4207.986e-3+0.92 %, +0.65 %, −1.82 %
1-D (converged)——15.85018.4487.961e-3+1.09 %, +0.80 %, −2.1 %

Observed orders (L2, L∞): 1.937, 1.941 (96→144) and 1.982, 1.996 (144→216). The coarse grids sit closer to MKM only because their discretisation error has the opposite sign to the model’s. The heavy study took 245 s.

Spalart–Allmaras: its wall law in the channel against the wall-resolved 1-D solution and Lee & Moser

The Spalart–Allmaras model with its own wall law (wall_model: "spalart_allmaras_bounce") in a column 1 × (2N + 1) × 1, δ = N cells, periodic in x and z, on-node walls, the body force u_τ²/δ, the regularized collision (TRT keeps the 0.505 floor with this law and cannot run these grids, #1063), lattice bulk speed 0.1 (crates/lbm/tests/sa_wall_channel.rs). Re_τ 182.088 at N 3 and N 6, and Re_τ 1000.512 at N 10, 16 and 32, each run to 1e-6 u_τ. The 1-D solutions are Richardson-extrapolated from the reference grid (1728 or 3200 cells) and its double (the Re_τ 1000.512 solve starts from the Re_τ 182.088 solution scaled in wall units near the wall and in outer units above, χ = min(κ y⁺, χ₁₈₂ Re_τ/182.088)), and the wall-modelled 1-D solution starts at y₁ = Re_τ / N with the law’s stress share.

  • Theory (asserted). (1) The 1-D solutions are turbulent and converge at second order at shared faces, wall-resolved and wall-modelled (trunk test, and heavy test for Re_τ 1000.512). (2) The momentum balance: the walls’ force equals a × the fluid mass, within the run’s last change Δ, since per δ/u_τ the momentum moves at most M Δ u_τ. (3) The walls’ friction velocity is √(a (N − ½)), within Δ: the boundary nodes take no force, so each wall carries the share 1 − 1/(2N) (#1101). (4) The first node: U₁ = u_τ u⁺(u_τ y₁ / ν) and ν̃₁ = κ u_τ · 1 cell, exactly. (5) The trapezoid identity u_{j+1} − u_j = ½ (g_j + g_{j+1}), g_j = a (N − j) / (ν + ν_t,j), on every link, within Δ u_τ²/(ν + ν_t,1) (derived in the test’s module docs). Each bar uses the run’s own Δ.
  • Benchmark (reported, not asserted). Lee & Moser, J. Fluid Mech. 774:395–415, 2015: U_b⁺ 1/0.0637309 = 15.69 (Re_τ 182.088), U_b⁺ 1/0.0500256 = 19.99 and U_c⁺ 22.593 (Re_τ 1000.512).
Re_τN per δy₁⁺U_b⁺U_c⁺C_fagainst wall-resolved 1-D: U_b, U_c, C_fof which the law alone: U_b, C_flattice − law (as run), L∞ (u_τ)against Lee & Moser: U_b, U_c, C_f
182.088360.713.39015.4581.1155e-2−15.79 %, −16.38 %, +41.0 %−6.49 %, +14.4 %6.5e-2−14.66 %, —, +37.3 %
182.088630.314.56717.0069.4253e-3−8.38 %, −8.01 %, +19.1 %−4.13 %, +8.8 %4.2e-2−7.16 %, —, +16.0 %
1000.51210100.119.16321.4105.4463e-3−3.45 %, −3.21 %, +7.3 %−1.06 %, +2.2 %2.2e-2−4.14 %, −5.24 %, +8.8 %
1000.5121662.519.47821.7415.2718e-3−1.87 %, −1.71 %, +3.9 %−0.61 %, +1.2 %5.7e-2−2.56 %, −3.77 %, +5.3 %
1000.5123231.319.77322.0505.1155e-3−0.38 %, −0.32 %, +0.8 %−0.28 %, +0.6 %1.3e-1−1.09 %, −2.41 %, +2.2 %

The 1-D wall-resolved solutions: Re_τ 182.088 U_b⁺ 15.899968, U_c⁺ 18.485491 (correction 8.3e-6); Re_τ 1000.512 U_b⁺ 19.848774, U_c⁺ 22.119259 (correction 8.6e-5). Each lattice run settled after 108 to 147 δ/u_τ with Δ ≈ 1e-7 u_τ and 1e-6 u_τ left.

The column “lattice − law (as run)” compares the run with the continuum wall-modelled solution at the same stress. It is reported, not asserted, and it grows with N: in lattice units the log profile is ln(y/Δx) whatever N, and the trapezoid sum of 1/(κ j) over the rows exceeds ln j/κ by (γ − ½)/κ = 0.19 u_τ as j grows (γ is Euler’s constant), so the more rows lie in the log layer, the closer the offset comes to that value (2.2e-2, 5.7e-2 and 1.3e-1 u_τ at N 10, 16 and 32). SA’s own discrete ν̃ in the first rows moves it by a few hundredths.

  • The walls carry a(δ − Δx/2) (#1101), not aδ: the law gets 1 − 1/(2N) of the stress. That half cell is most of the gap between the law alone and the run (at Re_τ 1000.512, C_f +1.2 % and +2.2 % for the law alone against +3.9 % and +7.3 % as run, first node at y⁺ 62 and 100).
  • The law’s own error is negative and large in these cases: in the wall-resolved solution ν̃ falls below κ u_τ y faster than the stress, so the law under-predicts U_b (−1.06 % at Re_τ 1000.512, N 10, the first node at y⁺ 100).
  • Limitation: the law assumes a log layer of constant stress. At Re_τ 182.088 the first node at y⁺ 30 or 61 is at y/δ 1/6 or 1/3, where the stress has fallen by that share and there is no constant-stress layer: C_f is +19 % and +41 % against the wall-resolved model (the law alone +8.8 % and +14.4 %). The law is for first nodes well inside a log layer, y₁/δ small; at Re_τ 1000.512 with y₁/δ 1/32 to 1/10 the error is +0.8 % to +7.3 %.
  • y⁺ 100 at Re_τ 182.088 is not run: it needs fewer than 2 cells per δ. Re_τ 2000 is not run in this study: its 1-D reference was not solved (from the plain start the Newton iteration does not converge within its cap; the start scaled from the Re_τ 182.088 solution, which the Re_τ 1000.512 reference uses, was not tried there).
  • The first rows carry the stress. Wall-modelled LES loses the stress of the first rows (the resolved part is missing there, so the law must be read three or more cells up; Kawai & Larsson 2012). In RANS the model’s own ν_t carries it: the modelled share (1 − ω_j/2)(−Π_xy)/(ρ a (N − j)) of rows 1 to 3, ω_j with the cell’s eddy viscosity, is 1.000000 in every case, as the link identity makes it. Reading the law higher would add error here, since the law’s own error grows with y₁/δ. (The finite-difference readings (ν + ν_t) dU/dy of 0.73 to 1.22 are the difference quotient’s error at one to three cells, not the stress.)
  • Setup warns that τ⁺ 0.5001 to 0.5006 is below 0.508 (the regularized collision’s stability note); the bars hold.

Wall-modelled LES: Malaspinas & Sagaut at Re_τ 950 (void)

Void (#1057). The MRT collision is linearly unstable at rest below a lattice viscosity of 1.1801 × 10⁻³ (τ⁺ 0.50354; Collision operators, crates/lbm/tests/mrt_stability.rs). These runs were at 5.4 × 10⁻⁵, 1.08 × 10⁻⁴ and 1.62 × 10⁻⁴ (N 10, 20, 30): 22, 11 and 7 times below it. solve.fluid now refuses them. The table is kept as the record of what was run.

Malaspinas & Sagaut’s channel run exactly as their paper sets it up (Re_τ 950, Re_m 37 042, N 10, 20 and 30, Smagorinsky C 0.08, MRT, their forcing), against the paper’s own measures and Hoyas & Jiménez’s DNS. Set-up, the readings where the paper is silent, and figures: Large-eddy simulation. Recorded on Linux aarch64 (NVIDIA GB10), GPU, f32. Pass criteria fixed before the runs: E within 15 % of the paper’s Table 1 and C_f by the model’s u_τ within its 4.22 % of Dean.

NE (paper)C_f by the model’s u_τ vs DeanC_f by the carried drag vs Dean
102.08 (2.11)+1.8 %−16.8 %
200.99 (1.07)+0.8 %−13.7 %
300.87 (0.83)+3.5 %−14.1 %

Recorded as passing on the paper’s measures at the time; void, as above. The 14–17 % low carried drag is not established as a property of the method.

Requested, applied and carried wall stress

The shared test support in crates/lbm/tests/support/wall_balance.rs separates requested Musker shear, applied momentum-exchange traction (including reconstruction impulse exactly once), and carried traction inferred from body impulse minus the change in stored population momentum, divided by the same wall area. Displayed wall-target velocities cannot replace stored momentum in this budget.

For a closed, unheated box with uniform acceleration and no zones or on-node boundary nodes, the per-step identity is P_after - P_before = body_impulse - wall_impulse. The residual limit is relative_tolerance * scale + 64 * f64::EPSILON * max(lattice_mass, 1), where scale is the maximum component magnitude of the two stored momenta and the body/wall impulses. Relative tolerances are 1e-12 on CPU and 1e-5 on GPU; the absolute floor covers the host sums on both backends, including rest. Tests cover both streaming layouts and odd/even GPU steps. Open boundaries need momentum fluxes and are outside this diagnostic’s scope.

Carried drag is compared independently with DNS at 5%; requested/carried stress has a proposed 1% agreement gate. The original Re_τ 950 N10 audit fails both: requested/carried ≈1.245, carried C_f 0.0043803 versus DNS 0.00509 (−16.75% versus Dean, reported separately). That audit’s run used MRT below its stability bound (above), so the two numbers are frozen data of that run, not a measurement of the wall model; the test checks the classification of frozen data only. The fast frozen-data regression measured_n10_discrepancy_remains_a_failed_validation asserts both failures and fails if either starts passing; a changed validator must not silently accept this known discrepancy.

Until the #785 wall repair, the long M&S study reports the additional carried-drag/stress-agreement result without adding it to its failure list, as requested in the #829 review. Its existing paper-reproduction and in-range DNS acceptance checks remain active. This keeps those regression checks usable without calling the known stress defect a validation pass. The frozen-data test checks classification, not a fresh flow result; after the repair, rerun the study and review its diagnostic gates before claiming physical validation.

Statistical acceptance of study windows

The M&S and Han studies stop on fieldcraft_lbm::statistics::Blocks (#796). A burn-in in samples precedes equally spaced samples; partial blocks never count. Acceptance is assessed on the largest even prefix of complete blocks, so both block lengths cover the same window, and needs:

  • at least 40 base blocks (MIN_BLOCKS), so the doubled-length series has 20 values;
  • a Student-t 95 % mean half-width below 1 % of the absolute mean at both block lengths, and a change of less than 20 % in that half-width when the block length doubles;
  • a half-window drift below 1 %;
  • absolute block correlations below 0.5 at lags 1 to 5 on both block lengths.

The block minimum follows from the lags tested: a lag-k autocorrelation from N independent values has a standard error near 1/√N (NIST/SEMATECH §1.3.5.12, after Bartlett 1946), and Box & Jenkins (1976, §2.1.6) estimate lags only up to about N/4, so lag 5 on the doubled series needs 20 doubled blocks. At the earlier minimum of 20 base blocks (10 doubled values, standard error about 0.3) a simulation of 20 000 independent Gaussian windows rejected 47 %: 18 % on the doubled-series correlations and 34 % on the half-width change. At 40 blocks 14 % are rejected and at 80 blocks 1.5 %; a rejected window only means the study keeps averaging. The unit test independent_windows_at_the_minimum_usually_pass checks the same on 400 synthetic windows.

The interval uses the NIST/SEMATECH Student-t definition with its 0.975 critical values, rounded upward; above 30 degrees of freedom the value for 30 is used (conservative). A zero mean cannot pass a relative interval. The store is capped at 65 536 block means (512 KiB); a sample beyond the cap is an error and leaves acceptance false.

Rejection controls: three FieldCraft cylinder drag histories from #796 (Re 3900, N12, HRR, GB10; 100–200 and 400–600 D/U, and 400–600 D/U from a potential-flow start) are replayed at blocks of 1.2 and 2.5 D/U (at least 40 blocks each) and must keep failing on the evidence: their relative half-widths are 2.7–9.2 % and their drifts 1.8–8.8 %. They are failure controls, not validation fixtures. The synthetic unit tests reject alternating, lag-2, drifting and pair-dependent signals.

Wall-modelled LES: Han, Ooka & Kikumoto not reproduced at A20

Han, Ooka & Kikumoto’s channel (Fluid Dyn. Res. 53:045506, 2021) at A20 (Re_τ 640), with their wall-function bounce (eq. 14, on-node) and with plain bounce-back, on the paper’s MRT collision at C_s 0.1 (void: below the collision’s stability bound) and on the hybrid recursive regularised collision. Gate fixed before the runs: ε_u⁺ over the whole channel and the log-law intercept b within 15 % of their Tables 2 and 3. Recorded on Linux aarch64 (NVIDIA GB10), GPU, f32. Set-up, the flow’s diagnosis (the MRT collision’s instability at this viscosity), the odd–even mode of the wall rows, figures and how to rerun: Large-eddy simulation.

A20, wall-function bounceU_b⁺C_f vs Deanε whole (paper)b (paper)
MRT, Smagorinsky C_s 0.1, Van Driest (the paper’s): void, lattice viscosity 5.0 × 10⁻⁵, 24 times below the bound14.44+53 %0.248 (0.057)1.92 (6.4)
hybrid σ 0.99, Vreman C_s 0.1828.77−54 %0.535 (0.057)15.23 (6.4)
hybrid σ 0.99, Smagorinsky C_s 0.1, Van Driest27.94−52 %0.491 (0.057)14.30 (6.4)
hybrid, dynamic σ, Vreman C_s 0.1828.94−55 %0.607 (0.057)9.04 (6.4)

Not reproduced on the hybrid collision, which carries about half the right drag: the first rows above the wall cannot carry the stress (the log-layer mismatch). The MRT row is void: at A20’s lattice viscosity the MRT collision is linearly unstable at rest, without walls (growth 7.9 × 10⁻³ per step), and the channel’s u′ ≈ v′ ≈ w′ ≈ 5 u_τ is that instability’s saturated state, which a periodic box at rest reaches too (4.4–4.8 u_τ). The earlier reading, “driven at the walls” and “the documented failure in under-resolved channels”, is withdrawn. The paper states neither its MRT rates nor its damping constant, so its result is not reproducible from what is published. A40 was not run.

Bluff-body LES (#785)

Probe runs of 2026-11-23/24 on develop 655d92fe (NVIDIA GB10, f32; hybrid collision σ 0.99, Smagorinsky C 0.1, no wall model; box 24 D long, body 6 D from a uniform inlet, convective outlet, slip sides, periodic span; averaged over 100–240 D/U in 8 blocks, except the 1.113 row, which averages 100–200 D/U as the 1.437 run below does). They are not acceptance runs: no grid is converged and the intervals are block intervals of one realisation. References: circular cylinder at Re 3900, C_d 0.99 ± 0.05 (experiment) and 1.04 (LES), A. G. Kravchenko, P. Moin, Phys. Fluids 12:403–417, 2000, doi:10.1063/1.870318; square cylinder, C_d 2.1 at Re 21 400, D. A. Lyn, S. Einav, W. Rodi, J.-H. Park, J. Fluid Mech. 304:285–319, 1995, doi:10.1017/S0022112095004435, and 2.18 (DNS at Re 22 000), F. X. Trias, A. Gorobets, A. Oliva, Comput. Fluids 123:87–98, 2015, doi:10.1016/j.compfluid.2015.09.013.

casestartobstacle wallsC_dagainst the reference
cylinder Re 3900, 16 cells per D, blockage 8.3 %free stream everywherehalfway1.310 ± 0.043+32 %
sameat rest on the bodyhalfway1.260 ± 0.012+27 %
sameat rest on the body, 1 % cross-flow seed (exp(−r²/4) envelope), no rampinterpolated1.113 ± 0.012+12 %
same, blockage 4.2 %at rest on the bodyinterpolated1.098 ± 0.018+11 %
same, 24 cells per D, blockage 8.3 %at rest on the bodyinterpolated1.067 ± 0.019+8 %
square Re 22 000, 16 cells per D, blockage 7.1 %at rest on the bodyhalfway (faces on cell faces)1.81 ± 0.07−14 % (Lyn), −17 % (Trias)
same, blockage 3.6 %at rest on the bodyhalfway1.73 ± 0.03−18 %, −21 %

What the earlier records of these cases (#787: 1.32–1.35; #789: 4.11) contained besides resolution:

  • A single-step force. Near τ⁺ = ½ a halfway wall’s force alternates step by step. On the square cylinder the odd steps alone read 4.09 and the even steps alone −0.48; their mean, 1.81, is the pressure integrated over the body’s faces (1.79). #789’s 4.11 was one of the two.
  • The start. With the free stream filling the box, body included, the body appears impulsively and the pressure wave it sends stays between the reflecting inlet and outlet: on the cylinder the force’s rms is 3.7 against 0.41 with a start at rest on the body, and the mean is 4 % higher; the square case went unstable at 161 D/U.
  • The staircase, 13 % on the cylinder (rows 2 and 3).

The remaining error is resolution, qualified by the start: 16–24 cells per diameter leave the separating shear layers on one or two cells, and the drag is start-sensitive (#1153). Density stays within 0.84–1.18 (square) and 0.93–1.08 (cylinder) of the reference, local Mach numbers up to 0.28.

Re 3900 cylinder rows rerun after the two-step force (#788, #1109)

Probe runs of 2026-11-25 on develop d2b829be (NVIDIA GB10, f32, solve.fluid backend: gpu, in-place streaming). One setup for the three rows, so they compare with each other: D = U = ρ = 1 m, ν = 1/3900, the box 24 D × 12 D × 3.1667 D at Δx = D/12, convective outlet, slip sides, periodic span, free stream everywhere (no wake perturbation), HRR σ 0.99 (dynamic for its row), Smagorinsky C 0.1, lattice speed 0.05, 200 D/U, the 3D cylinder imported as a 1024-segment prism (geometry.import.mesh). C_d = 2F_x/(ρU²DS), averaged over 100–200 D/U in 8 blocks, Student-t 95 % half-width from the block means (df 7). The last column is #788’s old statistic on its own setup; the two differ in setup (below).

Start: free stream everywhere, no cross-flow seed, no inlet ramp. The Re 3900 cylinder’s C_d is start-sensitive (#1153): on 16 cells per D the probe’s 1 % cross-flow wave gives 1.113 ± 0.012, and the same setup without it 1.437 ± 0.009. These rows are unseeded and on 12 cells per D. Their absolute values are not comparable with the seeded 1.113 or with #788’s perturbed-start rows; they compare only with each other.

Reproduce: one fieldcraft-cli run of a JSON command script per row, all with the same model: model.units (m-kg-s-N-Pa); model.material.create (Fluid, density 1, newtonian viscosity 2.5641025641e-4); geometry.import.mesh (the cylinder: an analytic binary STL, radius 0.5 m about (6, 6) m, 1024 segments, z from −0.5 to 3.6667 m); model.fluid_domain.create (Flow, min [0, 0, 0], max [24, 12, 3.1666666666666665], spacing 0.08333333333333333, x_min velocity [1, 0, 0], x_max convective pressure 0, y slip, z periodic, obstacle cylinder, initial_velocity [1, 0, 0]); model.step.create (Run: fluid, end_time 200, time_step 0.0041666667, frames 1, collision hrr, turbulence smagorinsky constant 0.1 prandtl 0.9, sigma 0.99); solve.fluid (backend gpu); solve.probe (step Run, forces cylinder/face0). The Musker row adds "wall_model": "musker" to the turbulence; the dynamic row sets sigma to dynamic.

rowC_d ± 95 % (this setup, 2026-11-25)block lag-1half-window drift#788 old (develop cb976117, perturbed start)
baseline (HRR σ 0.99)1.799 ± 0.018−0.115+0.0161.354 ± 0.040
Musker wall model−0.026 ± 0.0640.565+0.1142.441 ± 0.171
dynamic σ1.620 ± 0.043−0.127+0.0451.649 ± 0.022

Musker’s row is not converged: its block means drift (+0.11 between the window’s halves) and correlate (lag-1 0.57), so its interval is not a block interval of a stationary mean. The manual (les.md) records the Musker wall model as failing on the regularised and hybrid collisions at Re_τ 1000; this row is a second instance, not a fix.

Why the absolute values move: the setups differ. The old driver seeded a wake perturbation (v and w with ζ = 2πz/S), which excites the spanwise mode; this run starts from free stream everywhere, with no seed. The two-step force also changed every recorded force near τ⁺ = ½ (here τ⁺ = 0.50046), so the old numbers are not a valid baseline for the new force either. Neither effect was separated: a run of the old setup on the new force would be needed.

Bluff-body LES reruns with HRR + Vreman on the GB10 (#1106, #785 step 7)

Measurement only, 2026-11-25, on develop d2b829be, NVIDIA GB10 (f32) through crates/lbm-gpu/tests/bluff_body_les.rs (FIELDCRAFT_BLUFF_CASE, #[ignore]d: heavy). Hybrid recursive regularised collision, Vreman C_s 0.18 (Jacob, Malaspinas & Sagaut 2018), interpolated walls, box 24 D long, body 6 D from the inlet, convective outlet, slip sides, periodic span 3.125 D, 16 cells per D, averaging window 100–240 D/U in 8 blocks for the ramped rows (not results); the 1.113 and 1.437 pair averages 100–200 D/U. Not converged, one realisation.

The ramped runs of this section (the two unstable rows and the two dynamic-σ rows) used an inconsistent start (box at U, inlet ramp from 0): they are not results and are tracked in #1153.

The start sets the cylinder’s drag (#1106 follow-up, GB10, 2026-11-26). The earlier 1.113 was run with the probe’s start, which adds a 1 % cross-flow wave under a Gaussian envelope exp(−r²/4), with r the distance in D from the point 1 D behind the body centre (v and w, varying across the span as 1 + cos ζ and sin ζ). Without it, the same configuration (Smagorinsky C 0.1, σ 0.99, interpolated, no ramp, averaging window 100–200 D/U) gives C_d 1.437 ± 0.009, St 0.250, L_r/D 0.60; with the seed, C_d 1.113 ± 0.012 (recorded 1.113 ± 0.012), St 0.220, L_r/D 2.1 (recorded bubble 2.0–2.2 D). The Vreman, no-ramp run without the perturbation gives 1.422. No develop commit moved the number: the difference is the start, and the 1.113 record stands as a start-sensitive result.

Wall-modelled channel at Re_τ 1000 on the regularised collision (#785)

Probe runs of 2026-11-23/24 on develop 655d92fe: 2πδ × 2δ × πδ, constant force u_τ²/δ, Smagorinsky C 0.1, the regularised collision unless stated; 15–20 δ/u_τ discarded and 15–20 averaged, shorter than the studies’ protocol, so every row is inconclusive by the statistical acceptance. Reference: M. Lee, R. D. Moser, J. Fluid Mech. 774:395–415, 2015 (U_b⁺ 19.99 at Re_τ 1000.5).

wall treatmentcells per δU_b⁺C_f against Lee & Moser
none (halfway bounce-back)1610.5–12.1+173 to +261 %
Malaspinas & Sagaut (musker)1628.6–33.1, still rising−51 to −63 %
same3235.5, still rising−68 %
same, hybrid collision σ 0.993238.9, still rising−74 %
Han, Ooka & Kikumoto (spalding_bounce), Van Driest 2616 / 3227.3 / 28.1−46 / −49 %
Han’s wall, the law sampled at the 2nd row (probe)1621.5−13.9 %
sampled at the 3rd row, h/δ 0.19 (probe)1619.4+5.8 %
sampled at the 4th row, h/δ 0.17 (probe)2419.5+5.4 %
sampled at the 6th row, h/δ 0.19 (probe)3219.5+5.1 %

Both published forms read the law of the wall in the first cells, where the grid resolves none of the stress (resolved stress 0 to 0.5 of the total in rows 1–2), so the wall takes too little and the flow speeds up. Reading it three or more cells up (S. Kawai, J. Larsson, Phys. Fluids 24:015105, 2012) brings the carried friction to about +5 %; the probe changed only where the law is sampled.

Matched on-node wall at Re_τ 1000 against Lee & Moser (#1105, #785)

wall_model: "spalding_bounce_matched": Han, Ooka & Kikumoto’s on-node wall with Spalding’s law read four cells from the wall and Malaspinas & Sagaut’s eq. 57 mixing-length eddy viscosity on the rows below. The channel is 2πδ × (2δ + Δx) × πδ, driven by u_τ²/δ (u_τ = δ = 1), regularised collision, Smagorinsky C 0.1, lattice bulk speed 0.1, started from a perturbed blunt profile; 20 δ/u_τ of start-up discarded and at least 50 averaged, stopped when statistics::Blocks accepts the bulk speed (one block per δ/u_τ), a cap of 400 δ/u_τ being inconclusive. Reference: M. Lee, R. D. Moser, J. Fluid Mech. 774:395–415, 2015 (Re_τ 1000.5, U_b⁺ 19.99; the profile at 16 points). Bar, fixed before the runs: C_f, (U_b⁺_LM / U_b⁺)² − 1, within 5 %, and U⁺ within 5 % on every row from the sample row (the rows at least 4 cells from the nearer wall) to the centreline. U_b⁺ is the trapezoid rule over the full 2δ, the walls’ zero at y = 0 and 2δ included, as Lee & Moser’s U_b covers 2δ.

The sample height is a fixed 4 cells, our choice, not the paper’s number for this method. Kawai & Larsson (Phys. Fluids 24:015105, 2012) state two conditions: sample away from the cells next to the wall, which the LES resolves poorly (§III), and h_wm fixed in outer units, about 0.1δ, inside the inner layer (§III.B); their h_wm ≈ 4Δy_w is for their sixth-order compact scheme (Δy_w = 0.011δ). Four cells address the first. The second holds only when 4Δx ≤ 0.1δ, about 40 cells per δ or more; four cells are 0.25δ, 0.167δ and 0.125δ at 16, 24 and 32 cells per δ, and coarser grids carry the error this study measures. The study prints h_wm/δ for its grid and marks it above 0.1. The model carries no channel half-height, so setup does not warn. In the laminar limit the law read at 4Δx gives a slip of a(4Δx)²/(2ν) and a bulk high by 96/(M(M+1)) with M = 2N wall-to-wall cells: 35 %, 9.1 % and 2.3 % at 8, 16 and 32 cells per δ (the_matched_wall_slips_by_the_law_at_four_cells_in_a_laminar_channel, 35.3 % measured at 8).

FIELDCRAFT_MATCHED_CHANNEL=16 cargo test --release -p fieldcraft-lbm --test turbulence -- --ignored --nocapture matched_wall_channel

The heavy job runs a bounded regression of it (a_coarse_matched_wall_channel_at_re_tau_1000_stays_stable_over_a_short_run, about four minutes on the build server): 8 cells per δ, 2 δ/u_τ discarded and 2 averaged, the study’s code. It asserts a stable run (largest local Mach below 0.3), finite positive row means and U_b⁺ within 30 % of Lee & Moser’s; it is not the accuracy bar. The study’s table (grids 16, 24, 32) is not recorded yet: the runs take hours.

Matched on-node wall on the GPU against Lee & Moser at Re_τ 1000, 2000 and 5200 (#1108)

The CPU study above, run on the device (crates/lbm-gpu/tests/matched_channel.rs). The grid and Re_τ come from the environment, and the study is ignored unless the grid is set:

FIELDCRAFT_MATCHED_CHANNEL_GPU=16 FIELDCRAFT_MATCHED_RE_TAU=1000 cargo test --release -p fieldcraft-lbm-gpu --test matched_channel -- --ignored --nocapture matched_wall_channel_on_the_gpu

FIELDCRAFT_MATCHED_RE_TAU must be 1000, 2000 or 5200 (1000 when unset); any other value is refused.

  • Device and precision. NVIDIA GB10 (a borrowed box, reached through gpurun), single-precision populations (Streaming::InPlace). The GPU backend’s stated tolerances (crates/lbm-gpu/tests/verification.rs) apply: the fields are f32, so a row’s U⁺ carries f32 round-off on top of the discretisation error. The study is not checked against the CPU at these grids, except for the bounded regression below.
  • Protocol. The CPU study’s: the same box, walls, driving, regularised collision, Smagorinsky C 0.1 with spalding_bounce_matched, the start-up field with libm sin, cos and pow as the CPU uses, 20 δ/u_τ discarded, at least 50 averaged, a cap of 400 δ/u_τ (inconclusive, never a pass), and the Blocks stop on the bulk speed. The pass bars are the CPU study’s, unchanged: C_f and (U_b⁺_LM / U_b⁺)² − 1 within 5 %, and U⁺ within 5 % on every row at least 4 cells from a wall.
  • Read-back and the block. The flow is read back every block / 32 steps, so a block has 32 samples; the block statistic is the mean of its samples and the stop is checked at each block’s end. At 16 cells per δ and Re_τ 1000 the block is 32 read-backs of 99 steps, 3168 of the 3198 steps, so a block spans 0.99 δ/u_τ (the span is printed with each run). Sub-sampling a correlated series inside a block leaves the block mean an unbiased estimate of the same quantity, so the stop keeps its meaning. The CPU study samples every step. The largest local Mach number is taken over the read-backs, not over every step.
  • Reference. M. Lee and R. D. Moser, Direct numerical simulation of turbulent channel flow up to Re_τ = 5200, J. Fluid Mech. 774:395–415, 2015, doi:10.1017/jfm.2015.268. Mean profiles LM_Channel_{1000,2000,5200}_mean_prof.dat from the public data at turbulence.oden.utexas.edu (channel2015/data). The 16 points are linearly interpolated in y between the file’s rows, and clamped to the last row (the files end at y/δ 0.997 to 0.999, and the centreline takes that row). The 1000 table is the CPU study’s, shared in crates/lbm/tests/common/lee_moser.rs. The bulk is U_b⁺ = 1/u_τ = 19.990, 21.796 and 24.102 for u_τ 0.0500256, 0.0458794 and 0.0414872. The data files are not committed.
  • Bounded regression. a_coarse_matched_wall_channel_on_the_gpu_stays_stable_over_a_short_run (heavy job): 8 cells per δ at Re_τ 1000 with the CPU bounded regression’s protocol, on the GB10. U_b⁺ 19.792 against the CPU’s 19.792 (a_coarse_matched_wall_channel_at_re_tau_1000_stays_stable_over_a_short_run, same printed value), largest Mach 0.245 on both. The GPU stops at 6370 steps, the CPU at 6397: the GPU’s cap is a whole number of read-backs. The test asserts stability, finite rows and U_b⁺ within 30 % of Lee & Moser; it is not the accuracy bar.
  • Set-up refusal. the_setup_refuses_re_tau_5200_at_16_cells_per_delta_and_accepts_re_tau_1000 (fast, in the trunk gate) checks the refusal at 16 cells per δ and that Re_τ 1000 at the same grid is accepted.

Wall time is the test’s own clock on the GB10 (one job per grid, one at a time on the box). Verdicts: every run that set up hit the 400 δ/u_τ cap without an accepted block mean, so each is inconclusive (time cap): not passed.

Re_τcells per δU_b⁺ (LM)C_f errorworst row error (≥ 4 cells from a wall)h_wm/δstopstepswallverdict
10001620.281 (19.990)−2.85 %6.04 %0.250 (above 0.1)time cap1 279 278287 sinconclusive (time cap): not passed
10002420.698 (19.990)−6.73 %6.87 %0.167 (above 0.1)time cap1 918 9711 153 sinconclusive (time cap): not passed
10003220.922 (19.990)−8.71 %7.11 %0.125 (above 0.1)time cap2 558 5433 464 sinconclusive (time cap): not passed
20001621.999 (21.796)−1.83 %5.58 %0.250 (above 0.1)time cap1 394 928338 sinconclusive (time cap): not passed
20002422.467 (21.796)−5.88 %6.41 %0.167 (above 0.1)time cap2 092 4311 291 sinconclusive (time cap): not passed
20003222.783 (21.796)−8.47 %6.93 %0.125 (above 0.1)time cap2 789 7523 732 sinconclusive (time cap): not passed
520016, 24, 32not runnot run: set-up refused (τ below the stability bound)

Every grid’s h_wm/δ is above 0.1, so every grid lies outside Kawai & Larsson’s second condition (4Δx ≤ 0.1δ, about 40 cells per δ). The row errors are the time-averaged profile at the cap, reported as they are. Nothing was tuned: the wall-model constants and the bars are the CPU study’s. The per-row tables below recompute each printed reference from the table above (the printed references of the first runs came from an earlier sampler and differ by at most 0.001 U⁺, which moves no verdict).

Re_τ 5200 is not runnable on these grids. The set-up refuses the lattice viscosity at 16, 24 and 32 cells per δ: the relaxation time is τ = 0.50004, 0.50006 and 0.50008, below the solver’s stability bound 0.5001. From the lattice viscosity ν_lat = (1/Re_τ)·0.1/(U_b⁺Δx), τ − 1/2 = 3 ν_lat = 0.3 n / (Re_τ U_b⁺), so the bound τ ≥ 0.5001 needs n ≥ 0.0001 · Re_τ · U_b⁺ / 0.3 = 41.8, that is n ≥ 42 cells per δ at Re_τ 5200. No grid at 42 or finer was run.

Re_τ 1000 series. C_f error grows with resolution (−2.85 %, −6.73 %, −8.71 % at 16, 24, 32 cells per δ) instead of falling, and the row errors stay near 6 % to 7 % from the sample row to the centreline. Re_τ 2000 shows the same trend.

Per-row results, wall to centreline (the mirror half agrees within 0.2 %):

Re_τ 1000, 16 cells per δ (wall to centreline; the mirror half agrees within 0.2 %; worst row error at ≥ 4 cells from a wall: 6.04 %):

y/δU⁺ (GPU)Lee & Mosererrorwithin 5 %?
0.062514.51815.360-5.48 %not in the bar (wall rows)
0.125016.28417.003-4.23 %not in the bar (wall rows)
0.187517.01318.032-5.65 %not in the bar (wall rows)
0.250018.82618.816+0.05 %yes
0.312520.52119.440+5.56 %no
0.375021.11519.978+5.69 %no
0.437521.67320.445+6.01 %no
0.500022.02020.858+5.57 %no
0.562522.37121.230+5.37 %no
0.625022.63021.560+4.96 %yes
0.687522.87421.853+4.67 %yes
0.750023.05222.097+4.32 %yes
0.812523.20422.303+4.04 %yes
0.875023.30522.452+3.80 %yes
0.937523.37322.542+3.69 %yes
1.000023.39222.593+3.54 %yes

Re_τ 1000, 24 cells per δ (wall to centreline; the mirror half agrees within 0.2 %; worst row error at ≥ 4 cells from a wall: 6.87 %):

y/δU⁺ (GPU)Lee & Mosererrorwithin 5 %?
0.041713.25214.347-7.63 %not in the bar (wall rows)
0.083315.27216.030-4.73 %not in the bar (wall rows)
0.125016.03017.003-5.72 %not in the bar (wall rows)
0.166717.77717.725+0.29 %yes
0.208319.39718.312+5.92 %no
0.250019.98118.816+6.19 %no
0.291720.55619.243+6.83 %no
0.333320.94219.630+6.68 %no
0.375021.33319.978+6.78 %no
0.416721.63720.294+6.62 %no
0.458321.93020.589+6.51 %no
0.500022.17320.858+6.30 %no
0.541722.40321.111+6.12 %no
0.583322.60421.345+5.90 %no
0.625022.79021.560+5.71 %no
0.666722.95421.759+5.49 %no
0.708323.10321.941+5.30 %no
0.750023.23322.097+5.14 %no
0.791723.34822.244+4.96 %yes
0.833323.44422.354+4.88 %yes
0.875023.52122.452+4.76 %yes
0.916723.57722.524+4.68 %yes
0.958323.61122.559+4.66 %yes
1.000023.62322.593+4.56 %yes

Re_τ 1000, 32 cells per δ (wall to centreline; the mirror half agrees within 0.2 %; worst row error at ≥ 4 cells from a wall: 7.11 %):

y/δU⁺ (GPU)Lee & Mosererrorwithin 5 %?
0.031212.25413.561-9.64 %not in the bar (wall rows)
0.062514.55315.360-5.25 %not in the bar (wall rows)
0.093815.34916.307-5.87 %not in the bar (wall rows)
0.125017.03117.003+0.16 %yes
0.156218.60117.556+5.95 %no
0.187519.17918.032+6.36 %no
0.218819.73918.448+7.00 %no
0.250020.12118.816+6.93 %no
0.281220.50319.141+7.11 %no
0.312520.80519.440+7.02 %no
0.343821.09919.722+6.98 %no
0.375021.34919.978+6.86 %no
0.406221.58820.216+6.79 %no
0.437521.80420.445+6.65 %no
0.468822.01020.659+6.54 %no
0.500022.20120.858+6.44 %no
0.531222.38321.049+6.34 %no
0.562522.55521.230+6.24 %no
0.593822.71821.401+6.15 %no
0.625022.87221.560+6.09 %no
0.656223.01721.710+6.02 %no
0.687523.15321.853+5.95 %no
0.718823.28021.981+5.91 %no
0.750023.39622.097+5.88 %no
0.781223.50322.207+5.83 %no
0.812523.59722.303+5.80 %no
0.843823.67922.379+5.81 %no
0.875023.74722.452+5.77 %no
0.906223.80122.514+5.71 %no
0.937523.84022.542+5.76 %no
0.968823.86422.568+5.74 %no
1.000023.87222.593+5.66 %no

Re_τ 2000, 16 cells per δ (wall to centreline; the mirror half agrees within 0.2 %; worst row error at ≥ 4 cells from a wall: 5.58 %):

y/δU⁺ (GPU)Lee & Mosererrorwithin 5 %?
0.062516.26316.955-4.08 %not in the bar (wall rows)
0.125017.95618.716-4.06 %not in the bar (wall rows)
0.187518.69819.801-5.57 %not in the bar (wall rows)
0.250020.57120.606-0.17 %yes
0.312522.29821.242+4.97 %yes
0.375022.91021.780+5.19 %no
0.437523.48822.247+5.58 %no
0.500023.83422.659+5.19 %no
0.562524.18823.032+5.02 %no
0.625024.43423.364+4.58 %yes
0.687524.67423.660+4.29 %yes
0.750024.84723.905+3.94 %yes
0.812524.99824.112+3.68 %yes
0.875025.09524.259+3.45 %yes
0.937525.16324.346+3.35 %yes
1.000025.18124.396+3.22 %yes

Re_τ 2000, 24 cells per δ (wall to centreline; the mirror half agrees within 0.2 %; worst row error at ≥ 4 cells from a wall: 6.41 %):

y/δU⁺ (GPU)Lee & Mosererrorwithin 5 %?
0.041715.21915.996-4.86 %not in the bar (wall rows)
0.083316.96217.667-3.99 %not in the bar (wall rows)
0.125017.71818.716-5.33 %not in the bar (wall rows)
0.166719.54919.482+0.35 %yes
0.208321.19920.091+5.52 %no
0.250021.79120.606+5.75 %no
0.291722.39021.042+6.41 %no
0.333322.77321.432+6.26 %no
0.375023.17021.780+6.38 %no
0.416723.46522.097+6.19 %no
0.458323.75922.391+6.11 %no
0.500023.99622.659+5.90 %no
0.541724.22622.913+5.73 %no
0.583324.42123.148+5.50 %no
0.625024.60723.364+5.32 %no
0.666724.76923.565+5.11 %no
0.708324.92023.748+4.93 %yes
0.750025.05123.905+4.80 %yes
0.791725.16724.052+4.63 %yes
0.833325.26124.162+4.55 %yes
0.875025.33624.259+4.44 %yes
0.916725.39124.329+4.36 %yes
0.958325.42624.363+4.36 %yes
1.000025.43724.396+4.27 %yes

Re_τ 2000, 32 cells per δ (wall to centreline; the mirror half agrees within 0.2 %; worst row error at ≥ 4 cells from a wall: 6.93 %):

y/δU⁺ (GPU)Lee & Mosererrorwithin 5 %?
0.031214.44715.324-5.72 %not in the bar (wall rows)
0.062516.27016.955-4.04 %not in the bar (wall rows)
0.093817.03017.967-5.22 %not in the bar (wall rows)
0.125018.81718.716+0.54 %yes
0.156220.42719.305+5.81 %no
0.187521.01119.801+6.11 %no
0.218821.60520.230+6.80 %no
0.250021.99120.606+6.72 %no
0.281222.38920.938+6.93 %no
0.312522.69121.242+6.82 %no
0.343822.99221.524+6.82 %no
0.375023.24221.780+6.71 %no
0.406223.48722.018+6.67 %no
0.437523.70122.247+6.53 %no
0.468823.91022.460+6.45 %no
0.500024.10222.659+6.37 %no
0.531224.28822.851+6.29 %no
0.562524.46223.032+6.21 %no
0.593824.62823.204+6.14 %no
0.625024.78423.364+6.08 %no
0.656224.93223.515+6.02 %no
0.687525.07023.660+5.96 %no
0.718825.19723.788+5.92 %no
0.750025.31523.905+5.90 %no
0.781225.42124.016+5.85 %no
0.812525.51524.112+5.82 %no
0.843825.59724.187+5.83 %no
0.875025.66524.259+5.80 %no
0.906225.71924.320+5.75 %no
0.937525.75924.346+5.80 %no
0.968825.78224.372+5.79 %no
1.000025.79024.396+5.71 %no

Wall-modelled LES: Malaspinas & Sagaut against Lee & Moser and Dean (#664, #749)

Void (#1057). Every run of this section used the MRT collision below its stability bound (lattice viscosity 1.1801 × 10⁻³): Re_τ 1000 at 5.1 × 10⁻⁵, 1.02 × 10⁻⁴ and 1.53 × 10⁻⁴ (10, 20, 30 cells per δ); Re_τ 2000 at 4.6 × 10⁻⁵ and 6.9 × 10⁻⁵ (20, 30); Re_τ 550 at 1.0 × 10⁻⁴ to 1.8 × 10⁻⁴. They are 7 to 26 times below it. The tables are kept as the record of what was run; none of the numbers, the Re_τ 2000, 30-cell agreement included, is a result, and the Kawai & Larsson reading of the 9–15 % is not established.

Malaspinas & Sagaut’s wall model with Musker’s profile and the multiple-relaxation-time collision (Large-eddy simulation), on the GPU in f32. Periodic channel, half-height δ, with the flow rate held at the bulk velocity of Dean’s correlation by a body force updated every step; 20 δ/u_τ of start-up discarded and at least 50 averaged; Smagorinsky’s C 0.08 at Re_τ 1000 and 0.1 at Re_τ 2000. References: M. Lee, R. D. Moser, Direct numerical simulation of turbulent channel flow up to Re_τ ≈ 5200, J. Fluid Mech. 774:395–415, 2015 (doi:10.1017/jfm.2015.268), and R. B. Dean’s correlation (J. Fluids Eng. 100(2):215–223, 1978, doi:10.1115/1.3448633). Acceptance, fixed before the runs: C_f and the log layer’s mean velocity within 5 % of Lee & Moser.

FIELDCRAFT_PAPER_CHANNEL=1 cargo test --release -p fieldcraft-lbm-gpu --test verification \
  -- --ignored study_malaspinas_and_sagaut_s_channel_against_lee_and_moser --nocapture

This study uses the MRT collision at the paper’s relaxation times, which solve.fluid now refuses (below its stability bound); the command records how the void runs were made.

Two minutes to an hour per grid. Recorded on Linux aarch64 (NVIDIA GB10), PR #749. C_f by the force balance is the drag the flow carries, which equals the body force at steady state and is what solve.fluid reports as the wall force; C_f by the wall model’s u_τ is the one the model infers at the second cell, Malaspinas & Sagaut’s measure. E is their profile error measure (their values with Musker’s profile in brackets: Re_τ 950 and 2000).

Re_τcells per δfirst cell y⁺C_f, force balance: vs Lee & Moser / vs DeanC_f, wall-model u_τ: vs DeanE (paper)log layer vs Lee & Moser
10001046−11.4 % / −14.5 %+1.3 %2.65 (2.11)7.6 %
10002023−8.9 % / −12.1 %−0.9 %1.21 (1.07)6.7 %
10003016−8.7 % / −11.9 %+1.4 %0.99 (0.83)8.3 %
200010100refused: τ 0.50007 is below the 0.5001 floor———
20002052+10.2 % / +8.9 %−3.1 %1.01 (1.15)9.0 %
20003033−0.7 % / −1.8 %−1.8 %0.29 (0.88)3.3 %
  • C_f by the wall model’s u_τ is within the paper’s 0.3–4.2 % of Dean on every grid. The E values here took x₁’s velocity before its rebuild and are superseded by the Re_τ 950 reproduction above. A CPU run in f64 of Re_τ 1000 at 10 cells per δ gives −14.8 % against Dean, against the GPU’s −14.5 %.
  • The drag the flow carries meets the acceptance only at Re_τ 2000 with 30 cells per δ. On the other grids it is 9–15 % off, the log-layer mismatch of S. Kawai, J. Larsson, Wall-modeling in large eddy simulation: length scales, grid resolution, and accuracy, Phys. Fluids 24:015105, 2012 (doi:10.1063/1.3678331). Recorded as it is, not counted as a pass (owner decision 2026-10-26); the next step is sampling the wall model’s input several cells off the wall, as Kawai & Larsson do, on the same grids.
  • At Re_τ 1000 the 20- and 30-cell grids put the first cell below y⁺ 30, outside the range the method is meant for; they are listed for completeness.

Re_τ 550: out of range. Re_τ 550 was in the original protocol, but its grids put the first cell centre at y⁺ 13–24, below the method’s range. This was found after the runs, so it is recorded here as out of range, with its results, rather than counted. The protocol chose those grids by cell size (Δy⁺ 54, 39 and 30) where the method’s range is for the first cell’s centre, half a cell off the wall, at y⁺ 30 or more: that was our protocol’s error, recognised on 2026-10-25 after the results below. Malaspinas & Sagaut validate only at Re_τ 950 and above, so 550 is outside the paper’s tested range too; the y⁺ placement decides it. Owner decision 2026-10-26: keep its numbers, not in the acceptance.

These runs used the study as it stood on 2026-10-25, before it followed the paper exactly: 2πδ × 2δ × 2πδ, MRT, C 0.08, the wall model with Spalding’s profile (not Musker’s), the flow rate held at Lee & Moser’s bulk velocity and updated every 0.05 δ/U_m (not every step), and the running-mean stop rule on the force. Recorded on Linux aarch64 (NVIDIA GB10), GPU, f32. The current study lists Re_τ 550 at 10, 14 and 18 cells per δ outside the acceptance (FIELDCRAFT_PAPER_CHANNEL=550); that version has not been run at 550. The C_f by the wall model’s u_τ, E and C_f against Dean were not measured for these runs.

cells per δmeasured Re_τfirst cell y⁺U_b⁺ (Lee & Moser 18.40)C_f, force balance vs Lee & Moserlog layer vs Lee & MosercellsGPU time
10470≈ 2321.30−25.3 %17.9 %79 k10 s
14461≈ 1621.72−28.3 %23.2 %217 k37 s
18475≈ 1321.08−23.8 %19.0 %460 k121 s

The first cell’s y⁺ is the measured Re_τ × 0.5 / N.

What #664’s acceptance still lacks

  • Developing pipe flow against Shah & London (1978): not built.
  • The graphics-card cooling case (#642) to statistically steady state: not run.
  • The stop rule on a turbulent flow. It is shown on a physically fluctuating laminar one: vortex shedding behind the Schäfer–Turek cylinder at Re 100 (vortex_shedding_stops_on_its_running_mean_with_the_long_run_s_mean_drag in crates/lbm/tests/steady.rs, heavy job). The rule on the instantaneous force runs all 16 s; on the running mean from 4 s it stops at 9 s with the mean drag 0.24 % from the long run’s (tolerance 1 %) and the lift’s RMS 0.8 % from it. A turbulent case (the channel, or #642’s card) stopping on its running mean is not run.

Done for #664: the averaged statistics in the solve reply (stop.averages), the stop rule above, model-off results unchanged, and Poiseuille and Taylor–Green converging like Δ² with the model on (crates/lbm/tests/turbulence.rs).

Verification and validation oracle

Generated by cargo xtask oracle from tests/oracle/; the policy is verification.md. Every case is our own model, built with FieldCraft commands from the problem’s published description, and compared with the reference value its expected.json cites, within the stated tolerance and for the stated reason. Accepted results are frozen in each case’s fixture.json: a later change that moves one beyond its band (10⁻⁹ of its size) fails CI even while the reference still passes. Errors are rounded to 100 bands and an error under 1000 bands (rounded up to a power of ten) is shown as that bound: digits at the band’s scale are rounding noise. No reference value was produced with a commercial product.

500 of 510 quantities pass (10 known failure(s)) in 120 active cases: 95 theory, 24 published benchmark, 1 experiment; 7 pending cases wait for capabilities still being built.

Theory: closed-form solutions, patch tests and mesh invariants

CaseQuantityReferenceFieldCraftErrorToleranceResultFixture
arc-shallow-archupper limit load factor (snap-through)10.99183-0.817%2%passmatches
arc-shallow-archlower limit load factor0.211040.218957.9e-3± 0.02passmatches
arc-shallow-archnegative eigenvalues of the tangent past the upper limit point11< 1e-6exactpassmatches
bar-pressure-wavedisplacement of the loaded end at t = 0.06-6.0000e-4-5.9980e-40.034%1%passmatches
bar-pressure-waveparticle velocity at x = 5, 20 elements behind the front, at t = 0.06-0.01-0.00985521.45%2%passmatches
bar-pressure-waveenergy balance error00.0015271.5e-3± 0.01passmatches
bar-rigid-wall-impactdisplacement of the struck end at t = 0.3 (in contact until 2L/c = 0.2, then leaving at v₀)0.010.0099541-0.459%3%passmatches
bar-rigid-wall-impactdisplacement of the far end at t = 0.3 (−v₀L/c, then +v₀ after the reflection)0.010.0099488-0.512%3%passmatches
bar-rigid-wall-impactkinetic energy after the rebound over the initial ½mv₀²10.99463-0.537%2%passmatches
buckle-euler-cantileverfirst buckling stress (load factor of a unit end pressure)2.04612.0424-0.181%0.5%passmatches
buckle-euler-pinnedfirst buckling stress (load factor of a unit end pressure)2.04612.0424-0.179%0.5%passmatches
buckle-plate-squarebuckling stress of a unit edge pressure0.361520.36013-0.386%1%passmatches
cantilever-frequenciesfirst bending frequency (modes 1 and 2 are the y and z pair)0.0127710.012751-0.158%1%passmatches
cantilever-frequenciesthe other first bending frequency0.0127710.012751-0.158%1%passmatches
cantilever-frequenciessecond bending frequency0.0800340.079167-1.08%2%passmatches
cantilever-hex20tip deflection u_z at (10, 0.5, 0.5)-4.024-4.02350.0131%0.5%passmatches
cantilever-hex20total reaction z11< 1e-4%1e-9 rel.passmatches
cantilever-hex8-incompatibletip deflection u_z at (10, 0.5, 0.5)-4.024-4.01750.162%0.5%passmatches
cantilever-hex8-incompatibletotal reaction z11< 1e-4%1e-9 rel.passmatches
cantilever-tet10tip deflection u_z at (10, 0.5, 0.5)-4.024-4.02330.018%0.5%passmatches
cantilever-tet10total reaction z11< 1e-4%1e-9 rel.passmatches
cdt-cylindervolume of the tetrahedra6267.5mesh-dependentwithin 0.25%0.25%pass—
cdt-cylinderelements that fail the certified Jacobian check00≈ 0exactpassmatches
cdt-stepped-blockvolume of the tetrahedra4700047000< 1e-4%1e-12 rel.passmatches
cdt-stepped-blockelements that fail the certified Jacobian check00≈ 0exactpassmatches
cdt-stepped-blockelements the Jacobian check could not decide00≈ 0exactpassmatches
characteristic-outlet-reflectionσ 1.0: the largest departure of the characteristic outlet’s reflection from the one-pole response (rate K/2) to the uniform outlet’s, over the incident peak, up to step 726800.00228052.3e-3± 0.004passmatches
characteristic-outlet-reflectionσ 1.0: the decay rate fitted to the reflection’s tail, over K/211.00050.0479%0.5%passmatches
characteristic-outlet-reflectionσ 0.25 (the default): the largest departure of the characteristic outlet’s reflection from the one-pole response (rate K/2) to the uniform outlet’s, over the incident peak, up to step 726800.00228462.3e-3± 0.004passmatches
characteristic-outlet-reflectionσ 0.25: the decay rate fitted to the reflection’s tail, over K/211.00540.538%2%passmatches
characteristic-outlet-reflectionthe control: the uniform outlet’s reflected over incident peak (a pressure-release end, |R| = 1)10.99283-0.717%1%passmatches
characteristic-outlet-reflectionσ 0.25: windowed spectral ratio at ω 0.01 rad/step, includes the truncated relaxation tail (reflected over incident pulse, rectangular windows of ±346 steps); not the outlet’s |R| at ω 0.010.0078210.0052854-2.5e-3± 0.005passmatches
characteristic-outlet-reflectionσ 0.25: windowed spectral ratio at ω 0.02 rad/step, includes the truncated relaxation tail (reflected over incident pulse, rectangular windows of ±346 steps); not the outlet’s |R| at ω 0.020.0034020.00746294.1e-3± 0.005passmatches
characteristic-outlet-reflectionσ 0.25: windowed spectral ratio at ω 0.04 rad/step, includes the truncated relaxation tail (reflected over incident pulse, rectangular windows of ±346 steps); not the outlet’s |R| at ω 0.040.040670.0426232.0e-3± 0.005passmatches
em-cavity-copper-qualityTE101’s quality factor from the walls’ losses7649.67678.30.375%1%passmatches
em-cavity-rectangularTE101, the lowest mode1.2491e101.2492e100.00434%0.2%passmatches
em-cavity-rectangularTE1101.6759e101.6761e100.00983%0.2%passmatches
em-cavity-rectangular(0, 1, 1) and (2, 0, 1), equal in the closed form: the first of the pair1.8015e101.8018e100.0169%0.2%passmatches
em-cavity-rectangularthe second of the (0, 1, 1) and (2, 0, 1) pair1.8015e101.8018e100.0171%0.2%passmatches
em-cavity-rectangular(1, 1, 1), its TE and TM modes: the first1.9512e101.9518e100.0283%0.2%passmatches
em-cavity-rectangularthe second of the (1, 1, 1) pair1.9512e101.9518e100.0314%0.2%passmatches
explicit-bars-collisiontime of the last contact (the bars touch from t = 0) against 2L/c = 0.20.20.202421.21%2%passmatches
explicit-bars-collisionthe largest force across the interface against ρcAv₀/2 = 0.050.050.051472.94%4%passmatches
explicit-bars-collisionvelocity of the struck bar’s far end after the impact (0: the striker stops)0-0.0033987-3.4e-3± 0.005passmatches
explicit-bars-collisionvelocity of the struck bar’s far end after the impact (v₀ = 0.1)0.10.10343.4%5%passmatches
explicit-bars-collisionkinetic energy after the impact over ½mv₀² (frictionless elastic impact)10.99995-0.00468%1%passmatches
explicit-bars-collisionenergy left in the contact after the separation, over ½mv₀² (its drift)0-7.7435e-5-7.7e-5± 0.001passmatches
explicit-contact-patchσ_zz of the lower block’s corner element under the interface (element 10) over that of the upper block’s corner element over it (element 19)11.00010.0118%0.5%passmatches
explicit-contact-patchσ_zz of the lower block’s centre element under the interface (element 14) over that of element 1911.00030.0287%0.5%passmatches
explicit-contact-patchσ_zz of the lower block’s bottom corner element (element 1) over that of element 1911.00010.0134%0.5%passmatches
explicit-contact-patchσ_zz of the upper block’s top far corner element (element 26) over that of element 1910.99944-0.0564%0.5%passmatches
explicit-contact-patchthe force across the interface over −σ_zz A (A = 1)11.00260.259%1%passmatches
explicit-contact-patchσ_xx of element 14 over its σ_zz (uniaxial stress: 0)0-3.6052e-4-3.6e-4± 0.005passmatches
explicit-neo-hookean-implicitlateral displacement of the corner (1, 1, 1) along y, explicit over implicit10.99908-0.0922%0.5%passmatches
explicit-neo-hookean-implicitσ_xx of element 1, explicit, over σ_xx at the node at (0, 0, 0), implicit11.00030.0255%0.5%passmatches
explicit-self-contact-barstime of the last contact (the bars touch from t = 0) against 2L/c = 0.20.20.202421.21%2%passmatches
explicit-self-contact-barsthe largest force across the interface against ρcAv₀/2 = 0.050.050.051472.94%4%passmatches
explicit-self-contact-barsvelocity of the struck bar’s far end after the impact (0: the striker stops)0-0.0033987-3.4e-3± 0.005passmatches
explicit-self-contact-barsvelocity of the struck bar’s far end after the impact (v₀ = 0.1)0.10.10343.4%5%passmatches
explicit-self-contact-barskinetic energy after the impact over ½mv₀² (frictionless elastic impact)10.99995-0.00468%1%passmatches
explicit-self-contact-barsenergy left in the contact after the separation, over ½mv₀² (its drift)0-7.7435e-5-7.7e-5± 0.001passmatches
explicit-sliding-block-contactdistance travelled (top centre node) against ∫ v dv / (g μ(v)) = 2.015242.01522.0118-0.171%1%passmatches
explicit-sliding-block-contactvelocity of the top centre node after the stop0≈ 0≈ 0± 0.03passmatches
explicit-sliding-block-walldistance travelled (top centre node) against v₀²/(2μg) = 1.51.51.4999-0.0053%1%passmatches
explicit-sliding-block-wallvelocity of the top centre node after the stop0≈ 0≈ 0± 0.03passmatches
explicit-sliding-block-wallfriction dissipation over ½mv₀² = 2.2511.00120.121%1%passmatches
filleted-bracket-fillet-stresslargest nodal von Mises stress on the fillet face (MPa)213mesh-dependentwithin 3%3%pass—
filleted-bracket-fillet-stresstotal reaction x (N)-2000-2000< 1e-4%1e-9 rel.passmatches
filleted-bracket-fillet-stress-coarselargest nodal von Mises stress on the fillet face (MPa)213mesh-dependentwithin 5%5%pass—
filleted-bracket-fillet-stress-coarsetotal reaction x (N)-2000-2000< 1e-4%1e-9 rel.passmatches
free-beam-frequenciessixth frequency (the last rigid-body mode)0≈ 0≈ 0± 8.1264e-5passmatches
free-beam-frequenciesfirst free–free bending frequency (mode 7)0.0812640.080618-0.795%1.5%passmatches
free-beam-frequenciestotal mass2020< 1e-4%1e-12 rel.passmatches
free-surface-hydrostatic-columngauge pressure at the lowest cell centre, ρ g (h − Δx/2)4782.44796.70.3%1.5%passmatches
free-surface-hydrostatic-columnthe liquid’s upper extent at the end, h0.50.5< 1e-6± 1.0000e-9passmatches
free-surface-hydrostatic-columnthe largest speed at the end (zero: the liquid holds still)00.00307193.1e-3± 0.005passmatches
free-surface-hydrostatic-columnrelative mass error (mass − initial)0≈ 0≈ 0± 1.0000e-10passmatches
free-surface-plug-fillingliquid volume at the end, (U t + Δx) Δx²1.5030e-41.5047e-40.114%0.5%passmatches
free-surface-plug-fillingtime the front reaches x = 0.5, (0.5 − 1.5 Δx) / U9.53129.5-3.1e-2± 0.05passmatches
free-surface-plug-fillingrelative mass error of the balance (mass − initial − injected)0≈ 0≈ 0± 1.0000e-10passmatches
frozen-channel-poiseuillefrozen thickness Σ(1 − f_l)Δx / H0.250.25< 1e-6± 1.0000e-6passmatches
frozen-channel-poiseuillelargest velocity across the gap, a (H − y*)² / (8 ν)7.0312e-47.1344e-41.47%2.2%passmatches
frozen-channel-poiseuilleits height, (H + y*) / 20.6250.62226-2.7e-3± 0.004passmatches
general-profile-cantileverTimoshenko beam: tip stretch u_x, N L/(E A)0.00119050.0011905< 1e-4%1e-9 rel.passmatches
general-profile-cantileverTimoshenko beam: tip deflection u_y across the width, P_y L³/(3 E I_z) + P_y L/(G A_s,y)0.41230.4123< 1e-4%1e-9 rel.passmatches
general-profile-cantileverTimoshenko beam: tip deflection u_z across the height, P_z L³/(3 E I_y) + P_z L/(G A_s,z)-0.16429-0.16429< 1e-4%1e-9 rel.passmatches
general-profile-cantileverTimoshenko beam: tip twist θ_x, T L/(G J)0.0619050.061905< 1e-4%1e-9 rel.passmatches
general-profile-cantileverEuler–Bernoulli beam: tip deflection u_y, P_y L³/(3 E I_z) (no shear term)0.396830.39683< 1e-4%1e-9 rel.passmatches
general-profile-cantileverEuler–Bernoulli beam: tip deflection u_z, P_z L³/(3 E I_y)-0.14881-0.14881< 1e-4%1e-9 rel.passmatches
general-profile-cantileverEuler–Bernoulli beam: tip twist θ_x, T L/(G J)0.0619050.061905< 1e-4%1e-9 rel.passmatches
initial-stress-beamσ_xx of the held beam at (100, 10, 0), −E α (20 − 100)192192< 1e-4%1e-8 rel.passmatches
initial-stress-beamσ_xx of the held beam at (100, 10, 10), −E α (20 − 140)288288< 1e-4%1e-8 rel.passmatches
initial-stress-beamdeflection u_z of the released beam’s free end (200, 0, 0), −(dσ₀/dz) L²/(2E)0.960.96< 1e-4%1e-8 rel.passmatches
initial-stress-beamaxial displacement u_x of the released beam’s free end (200, 0, 0), −σ₀(0) L/E-0.192-0.192< 1e-4%1e-8 rel.passmatches
initial-stress-beamlargest nodal von Mises stress of the released beam (zero)0≈ 0≈ 0± 1.0000e-4passmatches
initial-temperature-beamdeflection u_z of the free end (200, 0, 0), α g L²/20.960.96< 1e-4%1e-8 rel.passmatches
initial-temperature-beamaxial displacement u_x of the free end (200, 0, 0), α (T − T₀(0)) L-0.192-0.192< 1e-4%1e-8 rel.passmatches
initial-temperature-beamlargest nodal von Mises stress (zero: the eigenstrain is compatible)0≈ 0≈ 0± 1.0000e-4passmatches
j2-bauschingeraxial stress back at zero strain after a pull to ε_a = 0.01-247.52-247.52< 1e-4%1e-6 rel.passmatches
j2-bauschingeraccumulated equivalent plastic strain0.0160890.016089< 1e-4%1e-6 rel.passmatches
j2-heated-baraxial stress, ΔT = 300 (α ΔT = 3.6·10⁻³, 2.9 times the yield strain)-254.65-254.65< 1e-4%1e-8 rel.passmatches
j2-heated-barequivalent plastic strain0.00232670.0023267< 1e-4%1e-7 rel.passmatches
j2-uniaxial-explicitaxial Cauchy stress at a logarithmic strain of 0.2643.56643.570.00017%1%passmatches
j2-uniaxial-explicitequivalent plastic strain0.196780.19678< 1e-4%1%passmatches
kirchhoff-slab-steelT at (0, 0, 50), the root of a T + b T²/2 = θ(z)160.03160.03< 1e-4%1e-9 rel.passmatches
kirchhoff-slab-steelT at (0, 0, 100), the root of a T + b T²/2 = θ(z)314.99314.99< 1e-4%1e-9 rel.passmatches
kirchhoff-slab-steelT at (0, 0, 150), the root of a T + b T²/2 = θ(z)490.99490.99< 1e-4%1e-9 rel.passmatches
kirchhoff-slab-steelheat flux q_z at (0, 0, 100), −(θ(T₁) − θ(T₀)) / L-142.84-142.84< 1e-4%1e-9 rel.passmatches
kirsch-plateσ_xx at the top of the hole (0, 1, 0) over the remote stress33.01210.402%2%passmatches
kirsch-plateσ_yy at the side of the hole (1, 0, 0) over the remote stress-1-1.011-1.1%3%passmatches
kirsch-plate-plane-stressσ_xx at the top of the hole (0, 1) over the remote stress33.00290.096%2%passmatches
kirsch-plate-plane-stressσ_yy at the side of the hole (1, 0) over the remote stress-1-1.0019-0.187%3%passmatches
lame-cylinderradial displacement at the bore (10, 0, 0)0.00907940.0090793-0.00027%0.1%passmatches
lame-cylinderradial displacement outside (20, 0, 0)0.00577780.0057778-0.0003%0.1%passmatches
lame-cylinderhoop stress σ_θ = σ_yy at the bore (10, 0, 0)166.67166.36-0.183%1%passmatches
lame-cylinder-axisymmetricradial displacement at the bore (r = 10)0.00907940.0090793-0.00042%0.1%passmatches
lame-cylinder-axisymmetricradial displacement outside (r = 20)0.00577780.0057778-0.00033%0.1%passmatches
lame-cylinder-axisymmetrichoop stress σ_θ at the bore (stress component 3 of an axisymmetric element)166.67165.98-0.412%1%passmatches
lame-cylinder-axisymmetricaxial stress σ_z = 2νA at the bore (held ends)2020.0840.42%1%passmatches
lame-cylinder-linearisationhoop membrane stress σᵐ_θ = p a / (b − a) along the radial line from the bore (10, 0, 0.5) to the outside (20, 0, 0.5)100100.220.225%1%passmatches
lame-cylinder-linearisationhoop bending stress at the bore, (6 B₀ / t²) [c (1/a − 1/b) − ln(b/a)] with c = (a + b)/245.48245.6570.385%1%passmatches
lame-cylinder-linearisationhoop peak stress at the bore, σ_θ(a) − σᵐ_θ − σᵇ_θ21.18420.479-3.33%5%passmatches
lame-cylinder-linearisationhoop peak stress outside, σ_θ(b) − σᵐ_θ + σᵇ_θ12.14912.134-0.122%5%passmatches
lame-cylinder-linearisationradial membrane stress σᵐ_r = −p a / (a + b)-33.333-33.484-0.451%1%passmatches
lame-cylinder-linearisationaxial membrane stress σᵐ_z = 2 ν A₀ (plane strain)2020.0220.112%1%passmatches
lame-cylinder-linearisationvon Mises stress of the membrane tensor (σᵐ_r, σᵐ_θ, σᵐ_z)116.24116.560.279%1%passmatches
lame-cylinder-plane-strainradial displacement at the bore (10, 0)0.00907940.0090793-0.00027%0.1%passmatches
lame-cylinder-plane-strainhoop stress σ_θ = σ_yy at the bore (10, 0)166.67166.36-0.183%1%passmatches
lame-cylinder-plane-strainaxial stress σ_zz = 2νA at the bore (plane strain)2020.0830.415%1%passmatches
nl-cattaneo-mindlin-cylinderthe share of the closed secondary nodes that slip, 1 − c/a (Q = 0.5 μP)0.292890.307691.5e-2± 0.03passmatches
nl-cattaneo-mindlin-cylinderthe shear over the pressure at the centre of contact, q(0)/p(0) (Q = 0.5 μP)0.0878680.0900782.52%5%passmatches
nl-cattaneo-mindlin-cylinderthe share of the closed secondary nodes that slip, 1 − c/a (Q = 0.75 μP)0.50.48718-1.3e-2± 0.03passmatches
nl-cattaneo-mindlin-cylinderthe shear over the pressure at the centre of contact, q(0)/p(0) (Q = 0.75 μP)0.150.153432.29%5%passmatches
nl-cattaneo-mindlin-cylinderthe largest contact pressure p₀ under the shear (Q = 0.75 μP)2884.62888.60.138%2%passmatches
nl-contact-patchSmall: σ_zz of the lower block’s corner element under the interface (element 10) over that of the upper block’s corner element over it (element 19)11< 1e-4%1e-6 rel.passmatches
nl-contact-patchSmall: σ_zz of the lower block’s centre element under the interface (element 14) over that of element 1911< 1e-4%1e-6 rel.passmatches
nl-contact-patchSmall: σ_zz of the lower block’s bottom corner element (element 1) over that of element 1911< 1e-4%1e-6 rel.passmatches
nl-contact-patchSmall: σ_zz of the upper block’s top far corner element (element 26) over that of element 1911< 1e-4%1e-6 rel.passmatches
nl-contact-patchSmall: σ_xx of element 14 over its σ_zz (uniaxial stress: 0)0≈ 0≈ 0± 1.0000e-6passmatches
nl-contact-patchSmall: the contact pressure at the secondary node (0.5, 0.5, 1) over −σ_zz of element 1911< 1e-4%1e-6 rel.passmatches
nl-contact-patchSmall: the integrated contact pressure over the reaction at the pushed top11< 1e-4%1e-6 rel.passmatches
nl-contact-patchFinite: σ_zz of the lower block’s corner element under the interface (element 10) over that of the upper block’s corner element over it (element 19)110.00017%0.02%passmatches
nl-contact-patchFinite: σ_zz of the lower block’s centre element under the interface (element 14) over that of element 1910.99999-0.00124%0.02%passmatches
nl-contact-patchFinite: σ_zz of the lower block’s bottom corner element (element 1) over that of element 1910.99999-0.00082%0.02%passmatches
nl-contact-patchFinite: σ_zz of the upper block’s top far corner element (element 26) over that of element 1910.99999-0.00087%0.02%passmatches
nl-contact-patchFinite: σ_xx of element 14 over its σ_zz (uniaxial stress: 0)0≈ 0≈ 0± 2.0000e-4passmatches
nl-contact-patchFinite: the contact pressure at the secondary node (0.5, 0.5, 1) over −σ_zz of element 1910.99998-0.00161%0.02%passmatches
nl-contact-patchFinite: the integrated contact pressure over the reaction at the pushed top11< 1e-4%0.02%passmatches
nl-contact-patchSmall: σ_zz of element 19 (uniaxial stress E ε = −10 for the 1% squeeze)-10-9.99960.00426%0.01%passmatches
nl-contact-patch-axisymmetricSmall: σ_yy of element 4 over that of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-axisymmetricSmall: σ_yy of element 6 over that of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-axisymmetricSmall: σ_yy of element 1 over that of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-axisymmetricSmall: σ_yy of element 10 over that of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-axisymmetricSmall: σ_xx of element 6 over its σ_yy (uniaxial stress: 0)0≈ 0≈ 0± 1.0000e-6passmatches
nl-contact-patch-axisymmetricSmall: the contact pressure at the secondary node (1.5, 1) over −σ_yy of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-axisymmetricSmall: the integrated contact pressure over the reaction at the pushed top11< 1e-4%1e-6 rel.passmatches
nl-contact-patch-axisymmetricFinite: σ_yy of element 4 over that of element 711< 1e-4%0.02%passmatches
nl-contact-patch-axisymmetricFinite: σ_yy of element 6 over that of element 710.99997-0.00325%0.02%passmatches
nl-contact-patch-axisymmetricFinite: σ_yy of element 1 over that of element 710.99999-0.00149%0.02%passmatches
nl-contact-patch-axisymmetricFinite: σ_yy of element 10 over that of element 710.99998-0.00185%0.02%passmatches
nl-contact-patch-axisymmetricFinite: σ_xx of element 6 over its σ_yy (uniaxial stress: 0)0-6.2023e-6-6.2e-6± 2.0000e-4passmatches
nl-contact-patch-axisymmetricFinite: the contact pressure at the secondary node (1.5, 1) over −σ_yy of element 710.99997-0.00285%0.02%passmatches
nl-contact-patch-axisymmetricFinite: the integrated contact pressure over the reaction at the pushed top11< 1e-4%0.02%passmatches
nl-contact-patch-axisymmetricSmall: σ_yy of element 7 (uniaxial stress E ε = −10 for the 1% squeeze)-10-9.99960.00426%0.01%passmatches
nl-contact-patch-plane-strainSmall: σ_yy of element 4 over that of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-plane-strainSmall: σ_yy of element 6 over that of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-plane-strainSmall: σ_yy of element 1 over that of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-plane-strainSmall: σ_yy of element 10 over that of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-plane-strainSmall: σ_xx of element 6 over its σ_yy (uniaxial stress: 0)0≈ 0≈ 0± 1.0000e-6passmatches
nl-contact-patch-plane-strainSmall: the contact pressure at the secondary node (0.5, 1) over −σ_yy of element 711< 1e-4%1e-6 rel.passmatches
nl-contact-patch-plane-strainSmall: the integrated contact pressure over the reaction at the pushed top11< 1e-4%1e-6 rel.passmatches
nl-contact-patch-plane-strainFinite: σ_yy of element 4 over that of element 711< 1e-4%0.02%passmatches
nl-contact-patch-plane-strainFinite: σ_yy of element 6 over that of element 710.99999-0.00087%0.02%passmatches
nl-contact-patch-plane-strainFinite: σ_yy of element 1 over that of element 711-0.00031%0.02%passmatches
nl-contact-patch-plane-strainFinite: σ_yy of element 10 over that of element 711-0.00043%0.02%passmatches
nl-contact-patch-plane-strainFinite: σ_xx of element 6 over its σ_yy (uniaxial stress: 0)0≈ 0≈ 0± 2.0000e-4passmatches
nl-contact-patch-plane-strainFinite: the contact pressure at the secondary node (0.5, 1) over −σ_yy of element 710.99999-0.00075%0.02%passmatches
nl-contact-patch-plane-strainFinite: the integrated contact pressure over the reaction at the pushed top11< 1e-4%0.02%passmatches
nl-contact-patch-plane-strainSmall: σ_yy of element 7 (plane strain uniaxial stress E ε/(1 − ν²) = −10.989 for the 1% squeeze)-10.989-10.9880.00516%0.01%passmatches
nl-contact-patch-quadraticSmall: σ_zz of the lower block’s corner element under the interface (element 10) over that of the upper block’s corner element over it (element 19)11< 1e-4%1e-6 rel.passmatches
nl-contact-patch-quadraticSmall: σ_zz of the lower block’s centre element under the interface (element 14) over that of element 1911< 1e-4%1e-6 rel.passmatches
nl-contact-patch-quadraticSmall: σ_zz of the lower block’s bottom corner element (element 1) over that of element 1911< 1e-4%1e-6 rel.passmatches
nl-contact-patch-quadraticSmall: σ_zz of the upper block’s top far corner element (element 26) over that of element 1911< 1e-4%1e-6 rel.passmatches
nl-contact-patch-quadraticSmall: σ_xx of element 14 over its σ_zz (uniaxial stress: 0)0≈ 0≈ 0± 1.0000e-6passmatches
nl-contact-patch-quadraticSmall: the contact pressure at the secondary node (0.5, 0.5, 1) over −σ_zz of element 1911< 1e-4%1e-6 rel.passmatches
nl-contact-patch-quadraticSmall: the integrated contact pressure over the reaction at the pushed top11< 1e-4%1e-6 rel.passmatches
nl-contact-patch-quadraticFinite: σ_zz of the lower block’s corner element under the interface (element 10) over that of the upper block’s corner element over it (element 19)110.00214%0.02%passmatches
nl-contact-patch-quadraticFinite: σ_zz of the lower block’s centre element under the interface (element 14) over that of element 19110.00034%0.02%passmatches
nl-contact-patch-quadraticFinite: σ_zz of the lower block’s bottom corner element (element 1) over that of element 19110.00128%0.02%passmatches
nl-contact-patch-quadraticFinite: σ_zz of the upper block’s top far corner element (element 26) over that of element 19110.00145%0.02%passmatches
nl-contact-patch-quadraticFinite: σ_xx of element 14 over its σ_zz (uniaxial stress: 0)0-8.6461e-6-8.6e-6± 2.0000e-4passmatches
nl-contact-patch-quadraticFinite: the contact pressure at the secondary node (0.5, 0.5, 1) over −σ_zz of element 19110.00139%0.02%passmatches
nl-contact-patch-quadraticFinite: the integrated contact pressure over the reaction at the pushed top11< 1e-4%0.02%passmatches
nl-contact-patch-quadraticSmall: σ_zz of element 19 (uniaxial stress E ε = −10 for the 1% squeeze)-10-9.99960.00426%0.01%passmatches
nl-cylinder-inflationradial displacement of the bore (10, 0, 0) at the pressure that inflates it to a = 1555.0040.0793%0.5%passmatches
nl-cylinder-inflationradial displacement of the outer wall (20, 0, 0)2.91292.91730.152%0.5%passmatches
nl-elastica-cantilevertip deflection δ_v/L at P L²/(E I) = 10.301720.302260.179%1%passmatches
nl-elastica-cantilevertip shortening δ_h/L at P L²/(E I) = 10.0564330.0566330.354%2%passmatches
nl-elastica-cantilevertip deflection δ_v/L at P L²/(E I) = 20.493460.494550.221%1%passmatches
nl-elastica-cantilevertip shortening δ_h/L at P L²/(E I) = 20.160640.161320.422%2%passmatches
nl-elastica-cantilevertip deflection δ_v/L at P L²/(E I) = 50.713790.715980.306%1%passmatches
nl-elastica-cantilevertip shortening δ_h/L at P L²/(E I) = 50.387630.389550.495%2%passmatches
nl-elastica-cantilevertip deflection δ_v/L at P L²/(E I) = 100.810610.814210.444%1%passmatches
nl-elastica-cantilevertip shortening δ_h/L at P L²/(E I) = 100.5550.5580.541%2%passmatches
nl-elastica-cantilever-hex8-incompatibletip deflection δ_v/L at P L²/(E I) = 1 (mean of the tip’s bottom and top nodes)0.301720.302160.144%1%passmatches
nl-elastica-cantilever-hex8-incompatibletip shortening δ_h/L at P L²/(E I) = 1 (mean of the tip’s bottom and top nodes)0.0564330.05660.296%2%passmatches
nl-elastica-cantilever-hex8-incompatibletip deflection δ_v/L at P L²/(E I) = 2 (mean of the tip’s bottom and top nodes)0.493460.49440.191%1%passmatches
nl-elastica-cantilever-hex8-incompatibletip shortening δ_h/L at P L²/(E I) = 2 (mean of the tip’s bottom and top nodes)0.160640.161240.374%2%passmatches
nl-elastica-cantilever-hex8-incompatibletip deflection δ_v/L at P L²/(E I) = 5 (mean of the tip’s bottom and top nodes)0.713790.715780.278%1%passmatches
nl-elastica-cantilever-hex8-incompatibletip shortening δ_h/L at P L²/(E I) = 5 (mean of the tip’s bottom and top nodes)0.387630.389410.459%2%passmatches
nl-elastica-cantilever-hex8-incompatibletip deflection δ_v/L at P L²/(E I) = 10 (mean of the tip’s bottom and top nodes)0.810610.813960.413%1%passmatches
nl-elastica-cantilever-hex8-incompatibletip shortening δ_h/L at P L²/(E I) = 10 (mean of the tip’s bottom and top nodes)0.5550.557820.509%2%passmatches
nl-friction-sliding-blocksthe tangential over the normal force across the sliding interface0.20.2-0.0001%0.1%passmatches
nl-friction-sliding-blocksthe tangential contact force on the upper block over the sideways reaction at its top (they balance)-1-1< 1e-4%1e-6 rel.passmatches
nl-friction-sliding-blocksthe secondary nodes that slip (all 9)99< 1e-5exactpassmatches
nl-hertz-cylinderthe largest contact pressure p₀ (at x = 0)2884.628920.254%2%passmatches
nl-hertz-cylinderthe force across the contact (half model, 1 mm thick)1132.81133.10.0294%0.2%passmatches
nl-hertz-cylinderthe contact pressure at the secondary node at x = 0.29594 (node 7)2325.12258.1-2.88%5%passmatches
nl-hertz-cylinderthe contact pressure at the secondary node at x = 0.36701 (node 8)19592078.86.11%10%passmatches
nl-hertz-cylinderthe contact pressure at the secondary node at x = 0.63325 (node 11, beyond the half-width b = 0.5)0≈ 0≈ 0± 1passmatches
nl-hertz-cylinderthe vertical stress σ_yy under the centre of contact at depth 0.47127 (node 713)-2099.2-2059.81.87%4%passmatches
nl-hertz-cylinder-hex20the largest contact pressure p₀ (at x = 0)2884.62888.70.143%2%passmatches
nl-hertz-cylinder-hex20the force across the contact (half model, 1 mm thick)1132.81133.10.0295%0.2%passmatches
nl-hertz-cylinder-hex20the gap at the secondary node at x = 0.42285 (0.85 b, inside the contact)0≈ 0≈ 0± 1.0000e-5passmatches
nl-hertz-cylinder-hex20the contact pressure at the secondary node at x = 0.71946 (1.44 b)0≈ 0≈ 0± 1passmatches
nl-hertz-cylinder-hex20the gap at the secondary node at x = 0.71946 (1.44 b, outside the contact)0.00728890.00761524.48%10%passmatches
nl-hertz-cylinder-plane-strainthe largest contact pressure p₀ (at x = 0)2884.628920.255%2%passmatches
nl-hertz-cylinder-plane-strainthe force across the contact (half model, 1 mm thick)1132.81133.10.0301%0.2%passmatches
nl-hertz-cylinder-plane-strainthe contact pressure at the secondary node at x = 0.295942325.12258.1-2.88%5%passmatches
nl-hertz-cylinder-plane-strainthe contact pressure at the secondary node at x = 0.3670119592078.86.11%10%passmatches
nl-hertz-cylinder-plane-strainthe contact pressure at the secondary node at x = 0.63325 (beyond the half-width b = 0.5)0≈ 0≈ 0± 1passmatches
nl-hertz-cylinder-plane-strainthe vertical stress σ_yy under the centre of contact at depth 0.47127-2099.2-2059.81.87%4%passmatches
nl-hertz-cylinder-tet10the largest contact pressure p₀ (at x = 0)2884.62933.71.7%3%passmatches
nl-hertz-cylinder-tet10the force across the contact (half model, 1 mm thick)1132.81133.10.0293%0.2%passmatches
nl-hertz-cylinder-tet10the gap at the secondary node at x = 0.42285 (0.85 b, inside the contact)0≈ 0≈ 0± 1.0000e-5passmatches
nl-hertz-cylinder-tet10the contact pressure at the secondary node at x = 0.71946 (1.44 b)0≈ 0≈ 0± 1passmatches
nl-hertz-cylinder-tet10the gap at the secondary node at x = 0.71946 (1.44 b, outside the contact)0.00728890.008789120.6%25%passmatches
nl-hybrid-incompressibleaxial Cauchy stress, stretch λ = 2, ν = 0.49993.49883.4988< 1e-4%1e-6 rel.passmatches
nl-hybrid-incompressiblelateral displacement at (1, 1, 1): l − 1-0.29281-0.29281< 1e-4%1e-6 rel.passmatches
nl-j2-bauschingerCauchy axial stress after returning from axial logarithmic strain 0.2 to zero displacement-247.65-247.65< 1e-4%1e-6 rel.passmatches
nl-j2-bauschingerAccumulated equivalent plastic strain0.392330.39233< 1e-4%1e-6 rel.passmatches
nl-j2-simple-shearKirchhoff shear stress at gamma = 1, on the published r = 0 curve140.55140.55< 1e-4%5e-5 rel.passmatches
nl-j2-simple-shearKirchhoff shear stress at gamma = 2, on the published r = 0 curve120.26120.26< 1e-4%5e-5 rel.passmatches
nl-j2-simple-shearKirchhoff shear stress at gamma = 4, on the published r = 0 curve76.83476.834< 1e-4%5e-5 rel.passmatches
nl-j2-simple-shearKirchhoff shear stress at gamma = 8, on the published r = 0 curve39.26639.266< 1e-4%5e-5 rel.passmatches
nl-j2-uniaxialaxial Cauchy stress at a logarithmic strain of 0.2642.74642.74< 1e-4%1e-6 rel.passmatches
nl-j2-uniaxialequivalent plastic strain0.196780.19678< 1e-4%1e-6 rel.passmatches
nl-mooney-rivlin-modesaxial Cauchy stress, uniaxial stretch λ = 22.73662.7366< 1e-4%1e-6 rel.passmatches
nl-mooney-rivlin-modeslateral displacement at (1, 1, 1), uniaxial: l − 1-0.28647-0.28647< 1e-4%1e-6 rel.passmatches
nl-mooney-rivlin-modesin-plane Cauchy stress, equibiaxial stretch λ = 1.52.84272.8427< 1e-4%1e-6 rel.passmatches
nl-mooney-rivlin-modesCauchy stress along the stretch, pure shear λ = 23.52613.5261< 1e-4%1e-6 rel.passmatches
nl-mooney-rivlin-modesCauchy stress across, in the held direction, pure shear λ = 21.50671.5067< 1e-4%1e-6 rel.passmatches
nl-mooney-rivlin-tuberadial displacement of the bore (10, 0, 0) at the pressure that inflates it to a = 15 at λ_z = 1.555.03110.622%1%passmatches
nl-mooney-rivlin-tuberadial displacement of the outer wall (20, 0, 0): b − B, a small difference of radii0.615530.643392.8e-2± 0.04passmatches
nl-mooney-rivlin-tube-axisymmetricradial displacement of the bore (10, 0, 0) at the pressure that inflates it to a = 15 at λ_z = 1.555.03290.658%1%passmatches
nl-mooney-rivlin-tube-axisymmetricradial displacement of the outer wall (20, 0, 0): b − B, a small difference of radii0.615530.644732.9e-2± 0.04passmatches
nl-neo-hookean-uniaxialaxial Cauchy stress at the corner (1, 1, 1), stretch λ = 28.06018.0601< 1e-4%1e-6 rel.passmatches
nl-neo-hookean-uniaxiallateral displacement u_y at the corner (1, 1, 1), l − 1-0.18686-0.18686< 1e-4%1e-6 rel.passmatches
nl-patch-hex8u_x at inner node 220.135830.13583< 1e-4%1e-8 rel.passmatches
nl-patch-hex8u_y at inner node 223.4875e-43.4875e-4< 1e-4%1e-8 rel.passmatches
nl-patch-hex8u_z at inner node 22-0.0023985-0.0023985< 1e-4%1e-8 rel.passmatches
nl-patch-hex8Cauchy σ_xx at inner node 2242.29642.296< 1e-4%1e-7 rel.passmatches
nl-patch-hex8Cauchy σ_yy at inner node 2223.50123.501< 1e-4%1e-7 rel.passmatches
nl-patch-hex8Cauchy σ_zz at inner node 2231.45331.453< 1e-4%1e-7 rel.passmatches
nl-patch-hex8Cauchy σ_xy at inner node 22-0.88971-0.88971< 1e-4%1e-7 rel.passmatches
nl-patch-hex8Cauchy σ_xz at inner node 22-1.8906-1.8906< 1e-4%1e-7 rel.passmatches
nl-patch-hex8Cauchy σ_yz at inner node 221.94621.9462< 1e-4%1e-7 rel.passmatches
nl-patch-hex8-incompatibleu_x at inner node 220.135830.13583< 1e-4%1e-8 rel.passmatches
nl-patch-hex8-incompatibleu_y at inner node 223.4875e-43.4875e-4< 1e-4%1e-8 rel.passmatches
nl-patch-hex8-incompatibleu_z at inner node 22-0.0023985-0.0023985< 1e-4%1e-8 rel.passmatches
nl-patch-hex8-incompatibleCauchy σ_xx at inner node 2242.29642.296< 1e-4%1e-7 rel.passmatches
nl-patch-hex8-incompatibleCauchy σ_yy at inner node 2223.50123.501< 1e-4%1e-7 rel.passmatches
nl-patch-hex8-incompatibleCauchy σ_zz at inner node 2231.45331.453< 1e-4%1e-7 rel.passmatches
nl-patch-hex8-incompatibleCauchy σ_xy at inner node 22-0.88971-0.88971< 1e-4%1e-7 rel.passmatches
nl-patch-hex8-incompatibleCauchy σ_xz at inner node 22-1.8906-1.8906< 1e-4%1e-7 rel.passmatches
nl-patch-hex8-incompatibleCauchy σ_yz at inner node 221.94621.9462< 1e-4%1e-7 rel.passmatches
nl-rigid-rotationu_x at inner node 22: the rotation’s-0.011149-0.011149< 1e-7± 1.0000e-9passmatches
nl-rigid-rotationu_y at inner node 22: the rotation’s0.0785910.078591< 1e-7± 1.0000e-9passmatches
nl-rigid-rotationu_z at inner node 22: the rotation’s-0.067441-0.067441< 1e-7± 1.0000e-9passmatches
nl-rigid-rotationvon Mises stress at inner node 220≈ 0≈ 0± 1.0000e-8passmatches
nl-thermal-expansiondisplacement of the corner (1, 1, 1) along x, free, α ΔT = 0.20.20.2< 1e-4%1e-8 rel.passmatches
nl-thermal-expansionstress of the free body (σ_xx at the corner)0≈ 0≈ 0± 1.0000e-8passmatches
nl-thermal-expansionstress of the held block, σ_xx (hydrostatic)-3.5108-3.5108< 1e-4%1e-8 rel.passmatches
nl-yeoh-uniaxialaxial Cauchy stress, stretch λ = 23.17433.1743< 1e-4%1e-6 rel.passmatches
nl-yeoh-uniaxiallateral displacement at (1, 1, 1): l − 1-0.28545-0.28545< 1e-4%1e-6 rel.passmatches
octree-filleted-bracketx reaction on the clamped face (5 mm mesh)-2000-2000< 1e-4%1e-6 rel.passmatches
octree-filleted-bracketelements the certified Jacobian check does not prove valid (5 mm mesh)00≈ 0exactpassmatches
octree-filleted-bracketmesh volume against the CAD volume (5 mm mesh)32145321610.0489%0.3%passmatches
octree-filleted-bracketσ_yy on the outer face of the upright leg at y = 19, z = 6 (5 mm mesh)145.31149.332.77%5%passmatches
octree-filleted-bracketσ_yy on the inner face of the upright leg at y = 19, z = 6 (5 mm mesh)-145.31-147.32-1.38%5%passmatches
octree-filleted-bracketvon Mises stress at the middle of the fillet, 7 mm mesh143.21138.9-3.01%5%passmatches
octree-filleted-bracketvon Mises stress at the middle of the fillet, 5 mm mesh143.21140.81-1.68%2%passmatches
patch-hex20u_x at the corner (1, 1, 1)-2.5000e-4-2.5000e-4< 1e-4%1e-9 rel.passmatches
patch-hex20u_y at the corner (1, 1, 1)0.0010.001< 1e-4%1e-9 rel.passmatches
patch-hex20u_z at the corner (1, 1, 1)0.002250.00225< 1e-4%1e-9 rel.passmatches
patch-hex20σ_xx at the inner node (0.46, 0.55, 0.53)11< 1e-4%1e-9 rel.passmatches
patch-hex20σ_yy at the inner node (0.46, 0.55, 0.53)22< 1e-4%1e-9 rel.passmatches
patch-hex20σ_zz at the inner node (0.46, 0.55, 0.53)33< 1e-4%1e-9 rel.passmatches
patch-hex20σ_xy at the inner node0≈ 0≈ 0± 1.0000e-9passmatches
patch-hex20-reducedu_x at the corner (1, 1, 1)-2.5000e-4-2.5000e-4< 1e-4%1e-9 rel.passmatches
patch-hex20-reducedu_y at the corner (1, 1, 1)0.0010.001< 1e-4%1e-9 rel.passmatches
patch-hex20-reducedu_z at the corner (1, 1, 1)0.002250.00225< 1e-4%1e-9 rel.passmatches
patch-hex20-reducedσ_xx at the inner node (0.46, 0.55, 0.53)11< 1e-4%1e-9 rel.passmatches
patch-hex20-reducedσ_yy at the inner node (0.46, 0.55, 0.53)22< 1e-4%1e-9 rel.passmatches
patch-hex20-reducedσ_zz at the inner node (0.46, 0.55, 0.53)33< 1e-4%1e-9 rel.passmatches
patch-hex20-reducedσ_xy at the inner node0≈ 0≈ 0± 1.0000e-9passmatches
patch-hex8u_x at the corner (1, 1, 1)-2.5000e-4-2.5000e-4< 1e-4%1e-9 rel.passmatches
patch-hex8u_y at the corner (1, 1, 1)0.0010.001< 1e-4%1e-9 rel.passmatches
patch-hex8u_z at the corner (1, 1, 1)0.002250.00225< 1e-4%1e-9 rel.passmatches
patch-hex8σ_xx at the inner node (0.46, 0.55, 0.53)11< 1e-4%1e-9 rel.passmatches
patch-hex8σ_yy at the inner node (0.46, 0.55, 0.53)22< 1e-4%1e-9 rel.passmatches
patch-hex8σ_zz at the inner node (0.46, 0.55, 0.53)33< 1e-4%1e-9 rel.passmatches
patch-hex8σ_xy at the inner node0≈ 0≈ 0± 1.0000e-9passmatches
patch-hex8-incompatibleu_x at the corner (1, 1, 1)-2.5000e-4-2.5000e-4< 1e-4%1e-9 rel.passmatches
patch-hex8-incompatibleu_y at the corner (1, 1, 1)0.0010.001< 1e-4%1e-9 rel.passmatches
patch-hex8-incompatibleu_z at the corner (1, 1, 1)0.002250.00225< 1e-4%1e-9 rel.passmatches
patch-hex8-incompatibleσ_xx at the inner node (0.46, 0.55, 0.53)11< 1e-4%1e-9 rel.passmatches
patch-hex8-incompatibleσ_yy at the inner node (0.46, 0.55, 0.53)22< 1e-4%1e-9 rel.passmatches
patch-hex8-incompatibleσ_zz at the inner node (0.46, 0.55, 0.53)33< 1e-4%1e-9 rel.passmatches
patch-hex8-incompatibleσ_xy at the inner node0≈ 0≈ 0± 1.0000e-9passmatches
patch-tet10u_x at the corner (1, 1, 1)-2.5000e-4-2.5000e-4< 1e-4%1e-9 rel.passmatches
patch-tet10u_y at the corner (1, 1, 1)0.0010.001< 1e-4%1e-9 rel.passmatches
patch-tet10u_z at the corner (1, 1, 1)0.002250.00225< 1e-4%1e-9 rel.passmatches
patch-tet10σ_xx at the inner node (0.46, 0.55, 0.53)11< 1e-4%1e-9 rel.passmatches
patch-tet10σ_yy at the inner node (0.46, 0.55, 0.53)22< 1e-4%1e-9 rel.passmatches
patch-tet10σ_zz at the inner node (0.46, 0.55, 0.53)33< 1e-4%1e-9 rel.passmatches
patch-tet10σ_xy at the inner node0≈ 0≈ 0± 1.0000e-9passmatches
patch-tet4u_x at the corner (1, 1, 1)-2.5000e-4-2.5000e-4< 1e-4%1e-9 rel.passmatches
patch-tet4u_y at the corner (1, 1, 1)0.0010.001< 1e-4%1e-9 rel.passmatches
patch-tet4u_z at the corner (1, 1, 1)0.002250.00225< 1e-4%1e-9 rel.passmatches
patch-tet4σ_xx at the inner node (0.46, 0.55, 0.53)11< 1e-4%1e-9 rel.passmatches
patch-tet4σ_yy at the inner node (0.46, 0.55, 0.53)22< 1e-4%1e-9 rel.passmatches
patch-tet4σ_zz at the inner node (0.46, 0.55, 0.53)33< 1e-4%1e-9 rel.passmatches
patch-tet4σ_xy at the inner node0≈ 0≈ 0± 1.0000e-9passmatches
patch-wedge6u_x at the corner (1, 1, 1)-2.5000e-4-2.5000e-4< 1e-4%1e-9 rel.passmatches
patch-wedge6u_y at the corner (1, 1, 1)0.0010.001< 1e-4%1e-9 rel.passmatches
patch-wedge6u_z at the corner (1, 1, 1)0.002250.00225< 1e-4%1e-9 rel.passmatches
patch-wedge6σ_xx at the inner node (0.46, 0.55, 0.53)11< 1e-4%1e-9 rel.passmatches
patch-wedge6σ_yy at the inner node (0.46, 0.55, 0.53)22< 1e-4%1e-9 rel.passmatches
patch-wedge6σ_zz at the inner node (0.46, 0.55, 0.53)33< 1e-4%1e-9 rel.passmatches
patch-wedge6σ_xy at the inner node0≈ 0≈ 0± 1.0000e-9passmatches
pipe-closed-pressurehoop stress at the bore, p (a² + b²)/(b² − a²), a = 10, b = 20, p = 100166.67166.67< 1e-4%1e-9 rel.passmatches
pipe-closed-pressurehoop stress outside, 2 p a²/(b² − a²)66.66766.667< 1e-4%1e-9 rel.passmatches
pipe-closed-pressureradial stress at the bore, −p-100-100< 1e-4%1e-9 rel.passmatches
pipe-closed-pressureaxial wall stress of the closed pipe, p a²/(b² − a²)33.33333.333< 1e-4%1e-9 rel.passmatches
pipe-closed-pressureelongation of the 1000 mm pipe, (1 − 2ν) σ_x L/E0.0634920.063492< 1e-4%1e-9 rel.passmatches
pipe-closed-pressurebore hoop stress of the thin pipe (a = 97.5, b = 102.5, p = 5), p (a² + b²)/(b² − a²)100.06100.06< 1e-4%1e-8 rel.passmatches
pipe-poiseuille-interpolated-wallscentreline velocity a R² / (4 ν), 8 cells per radius0.24mesh-dependentwithin 0.5%0.5%pass—
pipe-poiseuille-interpolated-wallscentreline velocity a R² / (4 ν), 16 cells per radius0.24mesh-dependentwithin 0.15%0.15%pass—
pipe-pressure-loopthrust X at the first anchor (reaction along x)28.10228.102< 1e-4%1e-8 rel.passmatches
pipe-pressure-loopdisplacement of corner 5 along x, w (ε − X/(E A))/20.121670.12167< 1e-4%1e-8 rel.passmatches
pipe-pressure-looprise of corner 3, ε h0.162410.16241< 1e-4%1e-8 rel.passmatches
pipe-pressure-looprise of the run’s middle, ε h + X (h − ȳ) w²/(8 E I)0.213370.21337< 1e-4%1e-8 rel.passmatches
pipe-pressure-loopwall force N in the run, p A_i − X6358963589< 1e-4%1e-8 rel.passmatches
pipe-pressure-loophoop stress at the bore, p (a² + b²)/(b² − a²), a = 45, b = 50, p = 1095.26395.263< 1e-4%1e-8 rel.passmatches
plastic-hinge-cantilevertip force at a tip deflection of 15 (4.5 times the first yield’s)-312.5-322.78-3.29%5%passmatches
plastic-thick-cylinderbore displacement at the pressure that takes the plastic zone to c = 15 (a = 10, b = 20, σ_y = 250)0.0243550.0243580.0089%0.2%passmatches
plastic-thick-cylinderradial force on the bore (per radian times 2π, height 1) at a bore displacement of 0.3, 24 times the first yield’s: the collapse pressure 2k ln 2 = 200.094 times 2πa1257212572< 1e-4%0.1%passmatches
power-law-poiseuille-n0.5streamwise velocity u at y = 0.484375 (the cell beside the mid-plane), m/s0.166660.166692.5e-5± 3.3300e-4passmatches
power-law-poiseuille-n0.5streamwise velocity u at y = 0.234375 (the cell beside the quarter of the gap), m/s0.141680.14147-2.1e-4± 3.3300e-4passmatches
power-law-poiseuille-n0.5streamwise velocity u at y = 0.046875 (the second cell from the plate), m/s0.0426180.042381-2.4e-4± 3.3300e-4passmatches
power-law-poiseuille-n1.5streamwise velocity u at y = 0.484375 (the cell beside the mid-plane), m/s0.299070.299453.8e-4± 6.0000e-4passmatches
power-law-poiseuille-n1.5streamwise velocity u at y = 0.234375 (the cell beside the quarter of the gap), m/s0.195460.195571.1e-4± 6.0000e-4passmatches
power-law-poiseuille-n1.5streamwise velocity u at y = 0.046875 (the second cell from the plate), m/s0.0453940.045488.6e-5± 6.0000e-4passmatches
pure-bending-couplingbending stress σ_xx at mid-span, top fibre (10, 0.5, 1)1515< 1e-4%0.5%passmatches
pure-bending-couplingrotation of the reference point about y0.30.3< 1e-4%1%passmatches
radiation-lumped-cubeT at t = 600 s, surroundings at 300 K (Crank–Nicolson, 320 increments)440.53440.52-0.00075%2e-5 rel.passmatches
radiation-lumped-cubeT at t = 600 s, surroundings at 0 K (Crank–Nicolson, 320 increments)425.86425.86-0.00086%2e-5 rel.passmatches
radiation-plateT of the radiating face, surroundings at 293.15 K: (q/εσ + T_amb⁴)^¼476.32476.32< 1e-4%1e-9 rel.passmatches
radiation-plateT of the heated face, surroundings at 293.15 K: T_L + q L / k478.98478.98< 1e-4%1e-9 rel.passmatches
radiation-plateheat the radiation takes out, surroundings at 293.15 K (all of q A = 2000 W)-2000-2000< 1e-4%1e-9 rel.passmatches
radiation-plateT of the radiating face, surroundings at 0 K: (q/εσ)^¼458.23458.23< 1e-4%1e-9 rel.passmatches
radiation-plateT of the heated face, surroundings at 0 K460.9460.9< 1e-4%1e-9 rel.passmatches
radiation-plateT of the cooled face, convection (h 10, T∞ 295 K) and radiation (ε 0.9, T_amb 300 K): the root of h (T − T∞) + εσ (T⁴ − T_amb⁴) = q379.96379.96< 1e-4%1e-9 rel.passmatches
radiation-plateheat the radiation takes out with convection beside it, εσ (T_L⁴ − T_amb⁴) A-650.35-650.35< 1e-4%1e-8 rel.passmatches
radiation-plateheat the convection takes out, h (T_L − T∞) A-849.65-849.65< 1e-4%1e-8 rel.passmatches
radiation-slab-latticetemperature of the slab’s top cell (y = 0.21875)362.61362.61< 1e-4%1e-8 rel.passmatches
radiation-slab-latticepower the slab radiates, ε σ (T_c⁴ − T_sur⁴) over the column’s cross-section Δx²1.97421.9742< 1e-4%1e-6 rel.passmatches
rotating-cylinder-axisymmetricradial stress σ_r on the axis (r = 0)0.385710.386080.0958%1%passmatches
rotating-cylinder-axisymmetrichoop stress σ_θ at the surface (r = 1)0.128570.128730.123%1%passmatches
rotating-disc-plane-stresshoop stress σ_θ = σ_yy at the bore (20, 0)65.31265.188-0.19%1%passmatches
rotating-disc-plane-stressradial stress σ_r = σ_xx at r = √(ab), its maximum20.72420.683-0.2%1%passmatches
rotating-disc-plane-stresshoop stress σ_θ = σ_yy at the rim (100, 0)16.32816.3520.149%1%passmatches
shaft-torsion-axisymmetricdisplacement along Z, −r θ for a right-handed twist θ about +Y, at the surface of the loaded end (r = 20, axial position 100)-0.098524-0.098524< 1e-4%1e-9 rel.passmatches
shaft-torsion-axisymmetricshear stress τ_zθ at the surface at mid length (stress component 6, yz)-79.577-79.577< 1e-4%1e-9 rel.passmatches
shaft-torsion-axisymmetricshear stress τ_rθ at the same point (stress component 5, xz)0≈ 0≈ 0± 1.0000e-6passmatches
shaft-torsion-hollow-axisymmetricdisplacement along Z, −r θ for a right-handed twist θ about +Y, at the outer surface of the loaded end (r = 20, axial position 100)-0.10509-0.10509< 1e-4%1e-9 rel.passmatches
shaft-torsion-hollow-axisymmetricshear stress τ_zθ at the mid wall (r = 15, z = 40)-63.662-63.662< 1e-4%1e-9 rel.passmatches
stefan-two-phasefrozen thickness Σ(1 − f_l)Δx at t = 3.0517578125, 2 λ √(α t) (the solve’s frozen share of the 2-long column, times 2)0.299540.300360.273%0.4%passmatches
stefan-two-phasetemperature at y = 0.1484375 (in the solid)-0.48624-0.485883.6e-4± 0.001passmatches
stefan-two-phasetemperature at y = 0.5078125 (in the liquid)0.195430.197672.2e-3± 0.004passmatches
tension-couplingaxial displacement of the reference point (the end face’s mean)0.00476190.0047619< 1e-4%1e-8 rel.passmatches
tension-couplingmaximum von Mises stress over the bar at the coupled step1010< 1e-4%1e-8 rel.passmatches
thin-wall-series-conductionheat flux into the sheet from the hot side, ΔT/(L/k_f + 1/G)0.0250.025< 1e-4%1e-9 rel.passmatches
thin-wall-series-conductionthe sheet’s hot-side temperature, T_hot − q (L/2)/k_f0.750.75< 1e-4%1e-9 rel.passmatches
thin-wall-series-conductionthe sheet’s cold-side temperature, T_cold + q (L/2)/k_f0.250.25< 1e-4%1e-9 rel.passmatches
tie-heat-seriesT at the tied secondary node (0.5, 0.5, 1)8484< 1e-4%1e-9 rel.passmatches
tie-heat-seriesT in the lower block at (0, 0, 0.5)5252< 1e-4%1e-9 rel.passmatches
tie-heat-seriesT in the upper block at (1, 1, 1.5)9292< 1e-4%1e-9 rel.passmatches
tie-heat-seriesheat flux q_z at (0, 0, 0.5)-640-640< 1e-4%1e-9 rel.passmatches
tie-heat-seriesheat flux q_z at (1, 1, 1.5)-640-640< 1e-4%1e-9 rel.passmatches
tie-patchσ_zz of the lower block’s corner element under the tie (element 10)1010< 1e-4%1e-9 rel.passmatches
tie-patchσ_zz of the lower block’s centre element under the tie (element 14)1010< 1e-4%1e-9 rel.passmatches
tie-patchσ_zz of the lower block’s bottom corner element (element 1)1010< 1e-4%1e-9 rel.passmatches
tie-patchσ_zz of the upper block’s corner element over the tie (element 19)1010< 1e-4%1e-9 rel.passmatches
tie-patchσ_zz of the upper block’s top far corner element (element 26)1010< 1e-4%1e-9 rel.passmatches
tie-patchσ_xx of element 14 (uniaxial stress: 0)0≈ 0≈ 0± 1.0000e-9passmatches
tie-patchu_z at the tied secondary node (0.5, 0.5, 1)0.010.01< 1e-4%1e-9 rel.passmatches
tube-torsion-couplingrotation of the reference point about z0.0560710.0560710.00062%0.5%passmatches
tube-torsion-couplingsurface shear stress τ_θz = σ_yz at (10, 0, 20)1078.31081.40.288%1%passmatches

Published benchmarks

CaseQuantityReferenceFieldCraftErrorToleranceResultFixture
conjugate-cavity-centred-bodyhot-wall Nusselt number, body conductivity 0.2 of the fluid’s4.62574.63560.214%0.6%passmatches
conjugate-cavity-centred-bodyhot-wall Nusselt number, body conductivity equal to the fluid’s4.50614.51510.201%0.6%passmatches
conjugate-cavity-centred-bodyhot-wall Nusselt number, body conductivity 5 times the fluid’s4.32214.32980.178%0.6%passmatches
de-vahl-davis-ra1e3mean Nusselt number, from the heat the lattice gives the hot wall1.1181.1179-0.0121%0.13%passmatches
de-vahl-davis-ra1e3largest local Nusselt number on the hot wall1.5051.50730.155%0.4%passmatches
de-vahl-davis-ra1e3height of the largest local Nusselt number, z/H0.0920.087237-4.8e-3± 0.013passmatches
de-vahl-davis-ra1e3smallest local Nusselt number on the hot wall (at its top, z = H)0.6920.69098-0.147%0.36%passmatches
de-vahl-davis-ra1e3height of the smallest local Nusselt number, z/H10.99219-7.8e-3± 0.029passmatches
de-vahl-davis-ra1e3largest horizontal velocity on the vertical mid-plane, u H/α3.6493.6481-0.0255%0.2%passmatches
de-vahl-davis-ra1e3its height, z/H0.8130.813131.3e-4± 0.013passmatches
de-vahl-davis-ra1e3largest vertical velocity on the horizontal mid-plane, w H/α3.6973.6957-0.0346%0.21%passmatches
de-vahl-davis-ra1e3its distance from the hot wall, x/H0.1780.178646.4e-4± 0.014passmatches
de-vahl-davis-ra1e4mean Nusselt number, from the heat the lattice gives the hot wall2.2432.24640.152%0.27%passmatches
de-vahl-davis-ra1e4largest local Nusselt number on the hot wall3.5283.54380.448%0.55%passmatches
de-vahl-davis-ra1e4height of the largest local Nusselt number, z/H0.1430.14293-6.5e-5± 0.014passmatches
de-vahl-davis-ra1e4smallest local Nusselt number on the hot wall (at its top, z = H)0.5860.58192-0.697%1.1%passmatches
de-vahl-davis-ra1e4height of the smallest local Nusselt number, z/H10.99219-7.8e-3± 0.025passmatches
de-vahl-davis-ra1e4largest horizontal velocity on the vertical mid-plane, u H/α16.17816.1860.051%0.23%passmatches
de-vahl-davis-ra1e4its height, z/H0.8230.82298-1.8e-5± 0.013passmatches
de-vahl-davis-ra1e4largest vertical velocity on the horizontal mid-plane, w H/α19.61719.630.0642%0.23%passmatches
de-vahl-davis-ra1e4its distance from the hot wall, x/H0.1190.119454.5e-4± 0.013passmatches
de-vahl-davis-ra1e5mean Nusselt number, from the heat the lattice gives the hot wall4.5194.53460.345%0.73%passmatches
de-vahl-davis-ra1e5largest local Nusselt number on the hot wall7.7177.73710.261%0.68%passmatches
de-vahl-davis-ra1e5height of the largest local Nusselt number, z/H0.0810.0826611.7e-3± 0.0079passmatches
de-vahl-davis-ra1e5smallest local Nusselt number on the hot wall (at its top, z = H)0.7290.74982.85%6.3%passmatches
de-vahl-davis-ra1e5height of the smallest local Nusselt number, z/H10.99219-7.8e-3± 0.018passmatches
de-vahl-davis-ra1e5largest horizontal velocity on the vertical mid-plane, u H/α34.7334.9780.714%0.88%passmatches
de-vahl-davis-ra1e5its height, z/H0.8550.855016.1e-6± 0.0064passmatches
de-vahl-davis-ra1e5largest vertical velocity on the horizontal mid-plane, w H/α68.5968.6870.141%0.5%passmatches
de-vahl-davis-ra1e5its distance from the hot wall, x/H0.0660.0667787.8e-4± 0.007passmatches
de-vahl-davis-ra1e6mean Nusselt number, from the heat the lattice gives the hot wall8.88.84760.541%1.3%passnightly
de-vahl-davis-ra1e6largest local Nusselt number on the hot wall17.925——1.6%known failure: 2.7 % low on 128 cells; the reference is the outlier here: de Vahl Davis’s 17.925 needed a special extrapolation (p. 255, Fig. 2), later solutions give 17.536 (Hortmann, Perić & Scheuerer 1990, as quoted by ERCOFTAC UFR 4-10), and our 256 × 256 run gives 17.546, 0.06 % from it—
de-vahl-davis-ra1e6height of the largest local Nusselt number, z/H0.03780.0409023.1e-3± 0.0079passnightly
de-vahl-davis-ra1e6smallest local Nusselt number on the hot wall (at its top, z = H)0.9891.04235.39%12%passnightly
de-vahl-davis-ra1e6height of the smallest local Nusselt number, z/H10.98953-1.0e-2± 0.02passnightly
de-vahl-davis-ra1e6largest horizontal velocity on the vertical mid-plane, u H/α64.6365.461.28%1.5%passnightly
de-vahl-davis-ra1e6its height, z/H0.850.851891.9e-3± 0.0065passnightly
de-vahl-davis-ra1e6largest vertical velocity on the horizontal mid-plane, w H/α219.36221.360.912%1.3%passnightly
de-vahl-davis-ra1e6its distance from the hot wall, x/H0.03790.0380661.7e-4± 0.0065passnightly
mh-curved-cantilevertip displacement along the in-plane load0.087340.076833-12%2%known failure: 0.880 of the theory, grade C: straight-sided hex8 on six elements over 90° (MacNeal–Harder’s HEXA(8): 0.880, Table 9 p. 15)—
mh-curved-cantilevertip displacement along the out-of-plane load0.50220.40095-20.2%2%known failure: 0.798 of the theory, grade D: out-of-plane bending with torsion on one element across (MacNeal–Harder’s HEXA(8): 0.849)—
mh-solid-patchσ_xx at inner node 7 (0.788, 0.693, 0.644)20002000< 1e-4%1e-9 rel.passmatches
mh-solid-patchσ_yy at inner node 7 (0.788, 0.693, 0.644)20002000< 1e-4%1e-9 rel.passmatches
mh-solid-patchσ_zz at inner node 7 (0.788, 0.693, 0.644)20002000< 1e-4%1e-9 rel.passmatches
mh-solid-patchτ_xy at inner node 7400400< 1e-4%1e-9 rel.passmatches
mh-solid-patchτ_xz at inner node 7400400< 1e-4%1e-9 rel.passmatches
mh-solid-patchτ_yz at inner node 7400400< 1e-4%1e-9 rel.passmatches
mh-solid-patchu_x at inner node 70.00145650.0014565< 1e-4%1e-9 rel.passmatches
mh-straight-cantilevertip displacement along the load, extension3.0000e-52.9629e-5-1.24%2%passmatches
mh-straight-cantilevertip displacement along the load, in-plane shear (width 0.2)0.10810.10574-2.18%2%known failure: 0.978 of the theory, grade B: one hex8 with incompatible modes through the depth of the prescribed mesh (MacNeal–Harder’s HEXA(8): 0.981, Table 8(a) p. 15); refined meshes converge (cantilever-hex8-incompatible)—
mh-straight-cantilevertip displacement along the load, out-of-plane shear (depth 0.1)0.43210.42037-2.71%2%known failure: 0.973 of the theory, grade B, as for in-plane shear (MacNeal–Harder’s HEXA(8): 0.981)—
mh-straight-cantilevertip rotation under a unit twisting moment0.032080.028612-10.8%2%known failure: 0.892 of the theory, grade C: one element across the section cannot represent the torsion warping (MacNeal–Harder’s HEXA(8): 0.910, HEX20: 0.904)—
mh-thick-cylinderradial displacement at the inner radius, ν = 0.490.00503990.0049705-1.38%2%passmatches
mh-thick-cylinderradial displacement at the inner radius, ν = 0.4990.00506020.0049892-1.4%2%passmatches
mh-thick-cylinderradial displacement at the inner radius, ν = 0.49990.00506230.0049911-1.41%2%passmatches
mh-twisted-beamtip displacement along the in-plane load (width direction, u_z at the tip centre)0.0054240.00554432.22%2%known failure: 1.022 of the theory at 12 × 2 (1.028, 1.031 and 1.032 at 24 × 4, 48 × 8 and 96 × 16): the drilling penalty γ = G/100 lets the rotation about the normal lag the membrane’s on the twisted surface, which adds (t τ)² / (6 (1 − ν) γ/G) = 3.75% to the plate-bending compliance at any mesh (issue #1077)—
mh-twisted-beamtip displacement along the out-of-plane load (normal direction, u_y at the tip centre)0.0017540.0016836-4.02%2%known failure: 0.960 of the theory at 12 × 2 (1.005, 1.020 and 1.024 at 24 × 4, 48 × 8 and 96 × 16): the bilinear membrane’s parasitic shear in in-plane bending (estimated at about −6.5% at this element length, gone with refinement along the span) against the same drilling softness as in_plane (issue #1077)—
nafems-fv2frequency of mode 1 (Hz)11.33611.328-0.0721%1%passmatches
nafems-fv2frequency of mode 2 (Hz)17.70917.65-0.332%1%passmatches
nafems-fv2frequency of mode 3 (Hz)17.70917.65-0.332%1%passmatches
nafems-fv2frequency of mode 4 (Hz)17.70917.679-0.172%1%passmatches
nafems-fv2frequency of mode 5 (Hz)17.70917.679-0.172%1%passmatches
nafems-fv2frequency of mode 6 (Hz)17.70917.679-0.172%1%passmatches
nafems-fv2frequency of mode 7 (Hz)17.70917.679-0.172%1%passmatches
nafems-fv2frequency of mode 8 (Hz)17.70917.679-0.172%1%passmatches
nafems-fv2frequency of mode 9 (Hz)45.34545.3610.036%1%passmatches
nafems-fv2frequency of mode 10 (Hz)57.3957.094-0.515%1%passmatches
nafems-fv2frequency of mode 11 (Hz)57.3957.094-0.515%1%passmatches
nafems-fv2frequency of mode 12 (Hz)57.3957.410.035%1%passmatches
nafems-fv2frequency of mode 13 (Hz)57.3957.410.035%1%passmatches
nafems-fv2frequency of mode 14 (Hz)57.3957.410.035%1%passmatches
nafems-fv2frequency of mode 15 (Hz)57.3957.410.035%1%passmatches
nafems-fv2frequency of mode 16 (Hz)57.3957.410.035%1%passmatches
nafems-fv32frequency of mode 1 (Hz)44.62344.623-0.00022%1%passmatches
nafems-fv32frequency of mode 2 (Hz)130.03130.030.00356%1%passmatches
nafems-fv32frequency of mode 3 (Hz)162.7162.7-0.00108%1%passmatches
nafems-fv32frequency of mode 4 (Hz)246.05246.050.00159%1%passmatches
nafems-fv32frequency of mode 5 (Hz)379.9379.90.00018%1%passmatches
nafems-fv32frequency of mode 6 (Hz)391.44391.44-0.0012%1%passmatches
nafems-le1σ_yy at D (2, 0)92.792.8690.182%1%passmatches
nafems-le1-plane-stressσ_yy at D (2, 0)92.792.648-0.0559%1%passmatches
nafems-le10σ_yy at D (2, 0, 0.3) on the loaded face-5.38-5.33390.857%2%passmatches
nafems-le2tangential stress at E, outer surface, load case 1 (edge moment)6059.936-0.107%1%passmatches
nafems-le2tangential stress at E, outer surface, load case 2 (pressure and edge traction)6059.904-0.161%1%passmatches
nafems-le3radial displacement at A (10, 0, 0), m0.1850.18418-0.446%2%passmatches
nafems-le5σ_xx at A (2.5, −1, −1), mid-surface of the lower flange at its free edge-108-109.45-1.35%2%passmatches
nafems-le6maximum principal stress at E (933.01, 250), lower surface0.8020.819692.21%2%known failure: the target is a thin-plate value; at the specified 10 mm the transverse shear deformation the MITC4 shell keeps raises it to 0.8197 (+2.2%; converged about 0.821), as ESRD’s converged thin-solid model does (quantity s1_E_solid), and thinner plates move towards 0.802 only slowly (about 0.809 at 1 mm, see README); FieldCraft has no thin-plate (Kirchhoff) element—
nafems-le6maximum principal stress at E (933.01, 250), lower surface, against the converged thin-solid model0.820.81969-0.0372%1%passmatches
nafems-le7axial stress σ_yy at D (1.0125, 1.4034), outer surface25.8625.283-2.23%1%known failure: the target is the axisymmetric thin-shell solution and FieldCraft has no axisymmetric shell element; our axisymmetric solid model converges to 25.27 (−2.3%), the value ESRD reports for its converged axisymmetric solid (quantity syy_D_solid)—
nafems-le7axial stress σ_yy at D (1.0125, 1.4034), outer surface, against the converged solid model25.2725.2830.0496%1%passmatches
pinched-cylinderradial displacement under the load, mid-surface-1.8248e-5-1.8038e-51.15%2%passmatches
pinched-hemispheredisplacement under the outward load along the load0.0940.092253-1.86%2%passmatches
pinched-hemispheredisplacement along y under the inward load (the load acts along −y)-0.094-0.0922531.86%2%passmatches
scordelis-lo-roof-shellvertical displacement at the midpoint of the free edge, mid-surface-0.3024-0.299011.12%2%passmatches
scordelis-lo-roof-solidvertical displacement at the midpoint of the free edge, mid-surface-0.3024-0.30140.33%2%passmatches

Experiments

CaseQuantityReferenceFieldCraftErrorToleranceResultFixture
dam-break-martin-moyceT(Z = 3.00) − T(Z = 1.44): the front’s time from 1.44 a to 3.00 a in units of 1 / (n √(g/a))1.321.48912.8%16%passmatches
dam-break-martin-moyceT(Z = 4.11) − T(Z = 1.44)2.142.358210.2%14%passmatches
dam-break-martin-moyceH = h / (n² a) at the plane of symmetry at τ = 2 (frame 2), from the liquid depth in the first column of cells0.50.502280.457%5%passmatches
dam-break-martin-moyceH(τ = 1) − H(τ = 2): the column’s fall between τ = 1 (frame 1) and τ = 2 (frame 2); Table 6 gives 0.806 at τ = 1 (between 0.83 at 0.93 and 0.78 at 1.08) and 0.50 at τ = 20.3060.30205-1.29%5%passmatches
dam-break-martin-moycerelative mass error (mass − initial)0≈ 0≈ 0± 1.0000e-9passmatches

Sources and tolerances

  • arc-shallow-arch (theory): Snap-through of a shallow arch by arc length. Source: One-mode closed form of a shallow sinusoidal arch y₀ = a sin(πx/L) on pins at a fixed span under q₀ sin(πx/L): q₀ = EI k⁴ [c + (a − c)(2ac − c²)/(4r²)], k = π/L, limit points at c = a ∓ r √((a²/r² − 4)/3) (S. P. Timoshenko, J. M. Gere, Theory of Elastic Stability, 2nd ed., McGraw-Hill 1961, §7.6; Y. C. Fung, A. Kaplan, NACA TN 2840, 1952): L = 100, h = 1, unit width, E = 10⁴, ν = 0, a/r = 3.5; the load is scaled to the upper limit load, so the peak load factor is 1 and the valley 0.211035. Tolerances — peak: 40 × 2 × 1 hex20 against shallow Euler–Bernoulli arch theory, the load piecewise constant per element, and the limit load picked from converged states (second order in the arc); valley: as the peak; the valley is a fifth of the peak load and a small difference of the bending and axial terms, so its tolerance is stated as 2 % of the peak load; negative: the inertia of the LDLᵀ factor: exactly one unstable direction between the limit points
  • bar-pressure-wave (theory): Elastic wave in a bar from a pressure step (explicit). Source: d’Alembert’s solution of the one-dimensional wave equation: c = √(E/ρ), particle velocity v = p/(ρc); Graff, Wave Motion in Elastic Solids, Dover 1991, §2.1. Tolerances — u_end: the end moves at the particle velocity p/(ρc) from the start; the discrete wave’s ringing behind the front changes the end’s displacement by well under 1%; v_mid: central differences ring behind a step front (dispersion); bulk viscosity damps it within a few elements, leaving about 1% twenty elements behind; balance: external work = kinetic + internal + dissipated energy; the solver warns above 1%
  • bar-rigid-wall-impact (theory): Elastic bar striking a rigid wall (explicit). Source: One-dimensional elastic impact on a rigid wall: contact time 2L/c, rebound at the impact speed, contact stress ρcv₀; Graff, Wave Motion in Elastic Solids, Dover 1991, §2.3; Johnson, Impact Strength of Materials, Arnold 1972, §1.6. Tolerances — u_front: the contact ends at 2L/c in the elastic theory; the discrete release front is spread over a few elements, a few tenths of a percent of the time, and the rebound speed is v₀ to about 1%; u_back: as for the struck end; ke: an elastic impact keeps the kinetic energy; quadratic bulk viscosity in the compression front and the vibration left in the bar take about 1%
  • buckle-euler-cantilever (theory): Euler buckling of a clamped–free column of solids. Source: Euler’s column with Engesser’s shear correction P = P_e/(1 + P_e/(κ G A)), κ = 5/6 (S. P. Timoshenko, J. M. Gere, Theory of Elastic Stability, 2nd ed., McGraw-Hill 1961, §2.1, §2.17): square section 1 × 1, E = 1000, ν = 0, length 10 clamped–free, effective length 20, P_e = π² E I/20², so σ_cr = P/A = 2.046071. Tolerances — lambda: hex20, 2 × 2 across and 10 along: the 3D solid’s bending and shear against beam theory, and the preload concentrated at the held face
  • buckle-euler-pinned (theory): Euler buckling of a pinned column of solids. Source: Euler’s column with Engesser’s shear correction P = P_e/(1 + P_e/(κ G A)), κ = 5/6 (S. P. Timoshenko, J. M. Gere, Theory of Elastic Stability, 2nd ed., McGraw-Hill 1961, §2.1, §2.17): square section 1 × 1, E = 1000, ν = 0, effective length 20, P_e = π² E I/20², so σ_cr = P/A = 2.046071. Tolerances — lambda: hex20, 2 × 2 across and 10 along: the 3D solid’s bending and shear against beam theory, and the preload concentrated at the held face
  • buckle-plate-square (theory): Buckling of a simply supported square plate in uniaxial compression. Source: Bryan’s plate buckling stress σ_cr = k π² E/(12 (1 − ν²)) (t/b)² with k = 4 for a square plate simply supported on four edges (G. H. Bryan, Proc. London Math. Soc. 22:54–67, 1891; Timoshenko & Gere 1961, §9.2): b = 50, t = 0.5, E = 1000, ν = 0.3, σ_cr = 0.361524. Tolerances — lambda: a quarter plate of 10 × 10 × 2 hex20 (b/t = 100) supported on its bottom edge lines: the solid against thin-plate theory (−1.5 % at b/t = 50, falling with t/b) and the discretisation
  • cantilever-frequencies (theory): Natural frequencies of a cantilever (Euler–Bernoulli). Source: Euler–Bernoulli beam: f_n = (β_n L)²/(2π L²)·√(EI/ρA), β₁L = 1.8751, β₂L = 4.6941; Timoshenko, Young and Weaver, Vibration Problems in Engineering, 4th ed., Wiley 1974, §5.3. Tolerances — f1: Euler–Bernoulli neglects shear and rotary inertia, which lower f1 by about 0.2% at L/h = 20; f1_pair: as f1: a square section bends alike in y and z; f2: shear and rotary inertia lower the second mode by about 1% at L/h = 20 (Timoshenko)
  • cantilever-hex20 (theory): Cantilever under a tip load, Timoshenko deflection (hex20). Source: Timoshenko and Gere, Mechanics of Materials (beam with shear deformation: δ = PL³/3EI + PL/κGA, κ = 5/6 for a rectangle); Cowper, J. Appl. Mech. 33 (1966) 335–340 for the shear coefficient. Tolerances — tip_uz: beam theory vs 3D elasticity: the shear coefficient and the fully clamped end change the tip deflection by a few tenths of a percent at L/h = 10; reaction: equilibrium holds to rounding
  • cantilever-hex8-incompatible (theory): Cantilever under a tip load, Timoshenko deflection (hex8-incompatible). Source: Timoshenko and Gere, Mechanics of Materials (beam with shear deformation: δ = PL³/3EI + PL/κGA, κ = 5/6 for a rectangle); Cowper, J. Appl. Mech. 33 (1966) 335–340 for the shear coefficient. Tolerances — tip_uz: beam theory vs 3D elasticity (a few tenths of a percent at L/h = 10); incompatible modes represent the bending exactly in the constant-moment part; reaction: equilibrium holds to rounding
  • cantilever-tet10 (theory): Cantilever under a tip load, Timoshenko deflection (tet10). Source: Timoshenko and Gere, Mechanics of Materials (beam with shear deformation: δ = PL³/3EI + PL/κGA, κ = 5/6 for a rectangle); Cowper, J. Appl. Mech. 33 (1966) 335–340 for the shear coefficient. Tolerances — tip_uz: beam theory vs 3D elasticity (a few tenths of a percent at L/h = 10); quadratic tetrahedra are converged on this mesh; reaction: equilibrium holds to rounding
  • cdt-cylinder (theory): Constrained Delaunay mesh of a cylinder: volume within the chordal bound, valid elements. Source: mesh invariants: an inscribed polygon of sagitta s loses at most 2s/R of a circle’s area (elementary geometry); constrained Delaunay tetrahedralization after Diazzi et al., ACM TOG 42(6) 2023. Tolerances — volume: the tessellation inscribes the cylinder within the chordal tolerance s = 0.05: the polygon section loses between 0 and 2s/R = 0.5% of the area; the reference is the middle of that band; invalid: every element of a valid mesh has positive volume
  • cdt-stepped-block (theory): Constrained Delaunay mesh of a stepped block: exact volume, valid elements. Source: mesh invariants: a tetrahedralization of a polyhedron fills its volume exactly (Si, TetGen paper ACM TOMS 41(2) 2015 for the definition of a CDT; Diazzi et al., ACM TOG 42(6) 2023); the volume is 60·40·10 + 40·40·10 + 20·40·10 − 10·10·10. Tolerances — volume: a planar boundary is tessellated exactly and the constrained Delaunay mesh fills it exactly: only rounding; invalid: every element of a valid mesh has positive volume; undetermined: a linear tetrahedron’s sign is exact
  • characteristic-outlet-reflection (theory): The characteristic pressure outlet’s reflection of a plane pulse: the one-pole (Selle) response in time. Source: L. Selle, F. Nicoud, T. Poinsot, ‘Actual impedance of nonreflecting boundary conditions: implications for computation of resonators’, AIAA J. 42(5):958–964, 2004 (the relaxed outlet’s R(ω) = −1/(1 − 2iω/K), so |R| = K/√(K² + 4ω²): a one-pole low-pass of rate K/2 applied to a fully reflected wave); T. J. Poinsot, S. K. Lele, ‘Boundary conditions for direct simulations of compressible viscous flows’, J. Comput. Phys. 101:104–129, 1992 (the boundary treatment); D. H. Rudy, J. C. Strikwerda, ‘A nonreflecting outflow boundary condition for subsonic Navier–Stokes calculations’, J. Comput. Phys. 36:55–70, 1980 (σ ≈ 0.25). Tolerances — departure_s1: the one-pole response leaves out the outlet closure’s own direct reflection, measured at 2.28·10⁻³ of the incident peak and the same at σ 0.25, 0.5 and 1.0 (so not from the relaxation); the tolerance is 1.75 times that, so a doubling of it fails; rate_s1: the record holds 0.54 e-folds of the tail (to step 7268, before the inlet’s reflection returns), and the closure’s direct reflection sits on it; measured +0.05 %; the tolerance is ten times that; departure_s025: the one-pole response leaves out the outlet closure’s own direct reflection, measured at 2.28·10⁻³ of the incident peak and the same at σ 0.25, 0.5 and 1.0 (so not from the relaxation); the tolerance is 1.75 times that, so a doubling of it fails; rate_s025: the record holds only 0.13 e-folds of the tail (time constant 2/K = 28,000 steps), so the fit is looser than at σ 1.0; measured +0.54 %; the tolerance is about four times that; control_uniform: the pulse also spreads by viscosity (τ 0.51) between its two passes of the probe, and the closure’s direct reflection is part of it; measured 0.9928; windowed_01: the reference is the same window applied to the one-pole response to the uniform outlet’s reflection (this runner’s number, not |R|); the measurement adds the closure’s direct reflection, which the one-pole response leaves out: measured less reference is −0.0025, +0.0041 and +0.0019 at ω 0.01, 0.02 and 0.04, and the tolerance 0.005 covers the largest. The fixture freezes this runner’s value; windowed_02: the reference is the same window applied to the one-pole response to the uniform outlet’s reflection (this runner’s number, not |R|); the measurement adds the closure’s direct reflection, which the one-pole response leaves out: measured less reference is −0.0025, +0.0041 and +0.0019 at ω 0.01, 0.02 and 0.04, and the tolerance 0.005 covers the largest. The fixture freezes this runner’s value; windowed_04: the reference is the same window applied to the one-pole response to the uniform outlet’s reflection (this runner’s number, not |R|); the measurement adds the closure’s direct reflection, which the one-pole response leaves out: measured less reference is −0.0025, +0.0041 and +0.0019 at ω 0.01, 0.02 and 0.04, and the tolerance 0.005 covers the largest. The fixture freezes this runner’s value
  • conjugate-cavity-centred-body (benchmark): Natural convection in a square cavity with a centred conducting body, Ra = 10⁵. Source: J. M. House, C. Beckermann and T. F. Smith, ‘Effect of a centered conducting body on natural convection heat transfer in an enclosure’, Numerical Heat Transfer Part A 18 (1990) 213–225, doi:10.1080/10407789008944791, Table 3 (finest grid). Tolerances — nu_k02: the grid’s distance to its own extrapolated limit (64 cells +0.2 %, the 48/64 extrapolation −0.22 % from the reference: README) plus a margin; House et al. state no accuracy for their finest grid; nu_k1: the grid’s distance to its own extrapolated limit (64 cells +0.2 %, the 48/64 extrapolation −0.22 % from the reference: README) plus a margin; House et al. state no accuracy for their finest grid; nu_k5: the grid’s distance to its own extrapolated limit (64 cells +0.2 %, the 48/64 extrapolation −0.22 % from the reference: README) plus a margin; House et al. state no accuracy for their finest grid
  • dam-break-martin-moyce (experiment): Collapse of a liquid column (dam break): the surge front and the column’s fall against Martin and Moyce. Source: J. C. Martin, W. J. Moyce, Part IV. An experimental study of the collapse of liquid columns on a rigid horizontal plane, Phil. Trans. R. Soc. A 244 (1952) 312–324: Table 2 (rectangular section, n² = 2, a = 2¼ in, the mean of nine records: the surge front Z = z/a against T = n t √(g/a)) and Table 6 (n² = 2, a = 2¼ in: the column’s top H = h/(n² a) against τ = t √(g/a)). Tolerances — front_1.44_to_3.00: the simulated liquid is 200 times more viscous than water (the lattice holds τ ≥ 0.505 on this grid; Reynolds number about 350 on the front speed and a), which slows the front along the no-slip floor: the refinement study (README) finds the interval 18.9 % long at 25 cells per a, 12.8 % at 50 (this case) and 9.9 % at 100, the viscosity halving with each refinement at fixed τ; the nine records spread ±0.14 in T at Z = 3 (±10 % of the interval); front_1.44_to_4.11: as the first interval: 16.2 % long at 25 cells per a, 10.2 % at 50 (this case), 6.9 % at 100; the records spread ±0.15 in T at Z = 4.11; height_tau2: Table 6’s time origin is the release trigger and the motion began at or before τ = 0.16, which moves H(τ = 2) by up to 0.05; the refinement study finds 0.502 at 25, 50 (this case) and 100 cells per a; height_drop_tau1_to_2: a difference of two heights, which the uncertain time origin hardly moves; H(τ = 1) is interpolated between two tabulated rows (±0.01); the refinement study finds 0.303, 0.302 (this case) and 0.303 at 25, 50 and 100 cells per a; mass_error: the mass exchange and the conversions are exact; round-off over the run
  • de-vahl-davis-ra1e3 (benchmark): Natural convection in a square cavity (de Vahl Davis), Ra = 10³, Pr = 0.71. Source: G. de Vahl Davis, ‘Natural convection of air in a square cavity: a bench mark numerical solution’, Int. J. Numer. Methods Fluids 3 (1983) 249–264, doi:10.1002/fld.1650030305, Table V (the bench mark solution), p. 256. Tolerances — nu_mean: de Vahl Davis’s accuracy at this Ra (0.1 %) plus the change between the two grids of the refinement study (README); the reference is his cavity average, which at steady state equals the heat through the wall (his own wall value Nu₀ differs from it by his wall-derivative error); nu_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); nu_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids; nu_min: the reference’s accuracy, the change between the two grids, and the change of the profile over the half cell between the top cell’s centre, where it is read, and the corner, where the reference is; nu_min_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation), plus half a cell: the profile is read at the cell centres, the last half a cell below the top wall; u_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); u_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids; w_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); w_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids
  • de-vahl-davis-ra1e4 (benchmark): Natural convection in a square cavity (de Vahl Davis), Ra = 10⁴, Pr = 0.71. Source: G. de Vahl Davis, ‘Natural convection of air in a square cavity: a bench mark numerical solution’, Int. J. Numer. Methods Fluids 3 (1983) 249–264, doi:10.1002/fld.1650030305, Table V (the bench mark solution), p. 256. Tolerances — nu_mean: de Vahl Davis’s accuracy at this Ra (0.22 %) plus the change between the two grids of the refinement study (README); the reference is his cavity average, which at steady state equals the heat through the wall (his own wall value Nu₀ differs from it by his wall-derivative error); nu_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); nu_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids; nu_min: the reference’s accuracy, the change between the two grids, and the change of the profile over the half cell between the top cell’s centre, where it is read, and the corner, where the reference is; nu_min_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation), plus half a cell: the profile is read at the cell centres, the last half a cell below the top wall; u_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); u_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids; w_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); w_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids
  • de-vahl-davis-ra1e5 (benchmark): Natural convection in a square cavity (de Vahl Davis), Ra = 10⁵, Pr = 0.71. Source: G. de Vahl Davis, ‘Natural convection of air in a square cavity: a bench mark numerical solution’, Int. J. Numer. Methods Fluids 3 (1983) 249–264, doi:10.1002/fld.1650030305, Table V (the bench mark solution), p. 256. Tolerances — nu_mean: de Vahl Davis’s accuracy at this Ra (0.46 %) plus the change between the two grids of the refinement study (README); the reference is his cavity average, which at steady state equals the heat through the wall (his own wall value Nu₀ differs from it by his wall-derivative error); nu_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); nu_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids; nu_min: the reference’s accuracy, the change between the two grids, and the change of the profile over the half cell between the top cell’s centre, where it is read, and the corner, where the reference is; nu_min_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation), plus half a cell: the profile is read at the cell centres, the last half a cell below the top wall; u_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); u_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids; w_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); w_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids
  • de-vahl-davis-ra1e6 (benchmark): Natural convection in a square cavity (de Vahl Davis), Ra = 10⁶, Pr = 0.71. Source: G. de Vahl Davis, ‘Natural convection of air in a square cavity: a bench mark numerical solution’, Int. J. Numer. Methods Fluids 3 (1983) 249–264, doi:10.1002/fld.1650030305, Table V (the bench mark solution), p. 256. Runs nightly (--nightly); the table shows its fixture. Tolerances — nu_mean: de Vahl Davis’s accuracy at this Ra (1 %) plus the change between the two grids of the refinement study (README); the reference is his cavity average, which at steady state equals the heat through the wall (his own wall value Nu₀ differs from it by his wall-derivative error); nu_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); nu_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids; nu_min: the reference’s accuracy, the change between the two grids, and the change of the profile over the half cell between the top cell’s centre, where it is read, and the corner, where the reference is; nu_min_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation), plus half a cell: the profile is read at the cell centres, the last half a cell below the top wall; u_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); u_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids; w_max: the reference’s accuracy plus the change between the two grids of the refinement study (README); w_max_at: half of the finest mesh de Vahl Davis solved at this Ra (h = 0.025 for Ra ≤ 10⁴, 0.0125 above; his bench mark itself is extrapolated on a coarser 21 × 21 or 41 × 41 subset, and his positions come from polynomial interpolation) plus the change between the two grids
  • em-cavity-copper-quality (theory): Quality factor of a rectangular cavity with copper walls. Source: Rectangular cavity, TE101 with lossy conducting walls, by the perturbation method: Q = (k a d)³ b η / (2π² Rₛ) / (2a³b + 2bd³ + a³d + ad³), Rₛ = √(ω μ₀ / (2σ)); D. M. Pozar, Microwave Engineering, 4th ed., Wiley 2012, §6.7, eq. 6.46, and §1.7, eq. 1.131. Tolerances — q1: mesh: the error of Q falls as h² (the losses take the curl’s trace on the walls); on boxes of the same proportions at order 1 it is 1.4 % on 8 × 4 × 6 cells and 0.65 % on 12 × 6 × 9 (crates/solver/tests/cavity.rs), so about 0.35 % on these 16 × 8 × 12; 1 % is above it
  • em-cavity-rectangular (theory): Resonant modes of a rectangular cavity with perfectly conducting walls. Source: Rectangular cavity with perfectly conducting walls: f_mnl = (c₀/2)·√((m/a)² + (n/b)² + (l/d)²), a TE and a TM mode when no index is zero; D. M. Pozar, Microwave Engineering, 4th ed., Wiley 2012, §6.4. Tolerances — f1: mesh: order-2 edge elements, whose eigenvalue error falls as h⁴ (D. Boffi, Acta Numer. 19, 2010); on 4 × 2 × 3 cells of a box of the same proportions the largest k² error is 0.81 % (crates/solver/tests/cavity.rs), so on these 8 × 4 × 6 about 16 times less (0.05 % in k², 0.03 % in f); 0.2 % is well above it; f2: as f1; f3: as f1; the mesh splits the pair by less than its error; f4: as f3; f5: as f3; f6: as f3
  • explicit-bars-collision (theory): Two identical elastic bars colliding (explicit contact). Source: One-dimensional elastic impact of equal bars: contact for 2L/c, interface force ρcAv₀/2, exchange of velocities, no loss of energy; Graff, Wave Motion in Elastic Solids, Dover 1991, §2.1–2.3; Johnson, Impact Strength of Materials, Arnold 1972, §1.6. Tolerances — duration: the penalty springs at the interface delay the release by a few element transit times (about 1% of 2L/c with 200 elements per bar); force: the plateau is ρcAv₀/2 to 0.01%; the peak is the plateau plus the ringing behind the discrete wave front, a few percent; v_a: the striker stops on average (its kinetic energy is under 0.01% of the start’s, see ke); its far end node keeps the ringing of the discrete release front, a few percent of v₀; v_b: the struck bar leaves at v₀ on average; its far end node keeps the ringing of the discrete wave fronts, a few percent; ke: an elastic impact keeps the kinetic energy; the quadratic bulk viscosity at the compression fronts and the vibration left in the bars take a fraction of a percent; contact_energy: the penalty springs give back what they took; the trapezoidal work of a spring that engages between increments drifts by far less than 0.1%
  • explicit-contact-patch (theory): Contact patch test: two blocks with non-matching meshes in uniaxial compression (explicit contact). Source: The contact patch test: a contact discretisation must transmit a uniform pressure across a non-matching interface exactly; Taylor & Papadopoulos, On a patch test for contact problems in two dimensions, Nonlinear Computational Mechanics, Springer 1991, 690–702; Crisfield, Re-visiting the contact patch test, IJNME 48:435–449, 2000. Uniaxial stress between frictionless symmetry planes is uniform in both blocks. Tolerances — lower_corner: a uniform stress is an equilibrium of the discrete system (the integrated contact forces are the consistent nodal forces of a uniform pressure on both meshes); what is left is the ringing of the loading, a hundred wave transits slow; lower_centre: as for the corner element; lower_base: as for the corner element; upper_top: as for the corner element; force: the integrated contact pressure carries the whole load; the largest force of the run is the final one in a slow squeeze, up to the ringing; lateral: frictionless symmetry planes and a frictionless interface leave the blocks free to expand sideways; the non-matching interface must not hold them
  • explicit-neo-hookean-implicit (theory): Neo-Hookean cube stretched to λ = 1.5: explicit dynamics, loaded slowly, against the implicit nonlinear solver. Source: Uniaxial stress of a compressible neo-Hookean solid (Holzapfel, Nonlinear Solid Mechanics, Wiley 2000, §6.5): a homogeneous state that a quasi-static explicit run must share with the implicit Newton solution on the same material point; the implicit solver is itself checked against the closed form by nl-neo-hookean-uniaxial. Tolerances — lateral: the same material point and a homogeneous state; the explicit run is pulled over a few hundred wave transits, and what is left of its waves is a fraction of a percent; stress: as for the displacement
  • explicit-self-contact-bars (theory): Two identical elastic bars colliding under one general contact on all their exterior faces (explicit self contact). Source: One-dimensional elastic impact of equal bars: contact for 2L/c, interface force ρcAv₀/2, exchange of velocities, no loss of energy; Graff, Wave Motion in Elastic Solids, Dover 1991, §2.1–2.3; Johnson, Impact Strength of Materials, Arnold 1972, §1.6; single-surface (self) contact: D. J. Benson, J. O. Hallquist, CMAME 78:141–163, 1990. Tolerances — duration: the penalty springs at the interface delay the release by a few element transit times (about 1% of 2L/c with 200 elements per bar); force: the plateau is ρcAv₀/2 to 0.01%; the peak is the plateau plus the ringing behind the discrete wave front, a few percent; v_a: the striker stops on average (its kinetic energy is under 0.01% of the start’s, see ke); its far end node keeps the ringing of the discrete release front, a few percent of v₀; v_b: the struck bar leaves at v₀ on average; its far end node keeps the ringing of the discrete wave fronts, a few percent; ke: an elastic impact keeps the kinetic energy; the quadratic bulk viscosity at the compression fronts and the vibration left in the bars take a fraction of a percent; contact_energy: the penalty springs give back what they took; the trapezoidal work of a spring that engages between increments drifts by far less than 0.1%
  • explicit-sliding-block-contact (theory): Block sliding to a stop on a deformable plate, friction decaying with the slip rate (explicit contact). Source: A rigid block launched at v₀ with friction μ(v) = μk + (μs − μk) e^(−d v) decelerates at g μ(v); it travels ∫₀^v₀ v dv / (g μ(v)) (Simpson’s rule, 200 000 intervals) and stops after [v₀ + ln((μk + (μs − μk) e^(−d v₀))/μs)/d]/(g μk) = 1.2001; Meriam & Kraige, Engineering Mechanics: Dynamics, §3/5; the exponential decay law as in Oden & Martins, CMAME 52:527–634, 1985. Tolerances — distance: the block bounces on the penalty springs and the plate under it shears elastically, so the normal force and the slip rate it feels vary by a little around their rigid-body values; velocity: the block sticks; what is left is its elastic vibration, under 1% of v₀
  • explicit-sliding-block-wall (theory): Block sliding to a stop on a rigid wall with Coulomb friction (explicit). Source: A rigid block launched at v₀ on a horizontal plane with Coulomb friction μ decelerates at μg and stops after v₀/(μg) at v₀²/(2μg), its kinetic energy all dissipated by friction; Meriam & Kraige, Engineering Mechanics: Dynamics, §3/5 (work and energy). Tolerances — distance: the wall’s friction impulses are exact Coulomb impulses; the block’s elastic vibration from the sudden gravity and the friction moment move the node by a fraction of a percent; velocity: the block sticks; what is left is its elastic vibration, under 1% of v₀; dissipated: the kinetic energy goes into friction; the vibration and the work of gravity as the block settles add or take a fraction of a percent
  • filleted-bracket-fillet-stress (theory): Filleted L-bracket under a side load: the peak von Mises stress on the R6 fillet, fine tet10 mesh. Source: mesh convergence of the finite element solution (P. J. Roache, Verification and Validation in Computational Science and Engineering, Hermosa, 1998, ch. 5): the bracket has no closed-form stress; the reference is the mesh-independent peak of a four-level study of quadratic tetrahedral meshes refined by √2 in size and in curvature resolution (README.md); equilibrium. Tolerances — fillet_peak: the four-level study gives 213.3, 210.6, 214.3, 213.3 MPa (2k to 13.5k elements): the bending stress is converged across the fillet, and the peak nodal value moves only with which of the fillet’s tessellation lines (fixed angles, through every level) carries the largest node, by under 2%; reaction: equilibrium holds to rounding
  • filleted-bracket-fillet-stress-coarse (theory): Filleted L-bracket under a side load: the peak von Mises stress on the R6 fillet, coarse tet10 mesh. Source: mesh convergence of the finite element solution (P. J. Roache, Verification and Validation in Computational Science and Engineering, Hermosa, 1998, ch. 5): the bracket has no closed-form stress; the reference is the mesh-independent peak of a four-level study of quadratic tetrahedral meshes refined by √2 in size and in curvature resolution (README.md); equilibrium. Tolerances — fillet_peak: at this level (16 mm, one element per 90° of the fillet) the peak moves with the mesh by more than at the finer ones: 213.3 MPa (macOS) and 210.2 MPa (Linux) for the kernel’s face order before the mesher took its input in a canonical order, 203.6 MPa after (#115), so the band is 5%; the four-level study gives 213.3, 210.6, 214.3, 213.3 MPa (2k to 13.5k elements): the bending stress is converged across the fillet, and the peak nodal value moves only with which of the fillet’s tessellation lines (fixed angles, through every level) carries the largest node, by under 2%; reaction: equilibrium holds to rounding
  • free-beam-frequencies (theory): Natural frequencies of a free beam: rigid-body modes and the first bending mode. Source: Euler–Bernoulli free–free beam, β₁L = 4.7300; Timoshenko, Young and Weaver, Vibration Problems in Engineering, 4th ed., Wiley 1974, §5.3. Tolerances — rigid_6: a free body has six zero frequencies; numerical rigid-body frequencies below 10⁻³ of the first elastic one (eigenvalues below 10⁻⁶ of it) are rounding of the shifted solve; f7: Euler–Bernoulli neglects shear and rotary inertia, about 0.8% at L/h = 20 for the free–free mode; mass: the mass matrix integrates the density exactly
  • free-surface-hydrostatic-column (theory): A liquid column at rest under gravity: hydrostatic pressure and a surface that stays. Source: Hydrostatics: p = ρ g (h − z) below a free surface at height h at the gauge pressure 0; the liquid holds still. Tolerances — p_bottom: the weakly compressible lattice’s density grows by 0.6 % down the column, and the pressure in the cells against the surface is read a cell away from it (measured 0.67 % of ρ g h at worst over the column); height: the top cell stays at least half full (the column stands 0.3 % lower by its compression), so the extent is the face above it exactly; still: spurious currents at the interface cells: measured 8.5·10⁻⁴ m/s, 2.7·10⁻⁴ of the free-fall speed √(2 g h); mass_error: the mass exchange is exact; round-off over 4000 steps (measured 4·10⁻¹³)
  • free-surface-plug-filling (theory): A plug of liquid filling a frictionless channel from a velocity inlet. Source: Volume conservation: a channel of cross-section A fed at U holds the volume U t A plus the inlet cell’s at time t, so the front is at x_f = U t + Δx; the extent of the cells at least half full reaches a cell face X when x_f = X − Δx/2. Tolerances — volume: the weakly compressible lattice: the plug’s density is below ρ₀ by order Ma² (0.75 % at lattice speed 0.05; measured 0.11 % more volume for its mass); arrival: the history samples every time step (1/64 s) and the plug’s volume runs 0.1 % ahead by the lattice’s compressibility: measured two steps early; mass_error: the mass exchange and the inlet accounting are exact; round-off over 768 steps
  • frozen-channel-poiseuille (theory): A channel frozen on its cold quarter: plane Poiseuille flow in the liquid layer. Source: Steady conduction between walls held at −1 and +1 with the melting point at −0.5 (the front at a quarter of the gap), and plane Poiseuille flow driven by a body force between the front and the far wall, u_max = a (H − y*)² / (8 ν) at the layer’s middle. Tolerances — front: the steady front lies on a cell face on every grid of the refinement study (16 to 128 cells across), so each cell is wholly frozen or wholly liquid; measured below 10⁻⁶; u_max: the error at this grid (+1.47 %) plus the change to the next finer grid (0.74 %); the error halves with the cell (first order: the frozen cells are held still by a drag at their centres, so the effective wall sits about 0.35 Δx inside the frozen layer): the refinement study (README); u_max_at: the error at this grid (−2.7·10⁻³) plus the change to the next finer grid (1.3·10⁻³): the refinement study (README)
  • general-profile-cantilever (theory): A cantilever of a general beam profile: Timoshenko and Euler–Bernoulli tip deflections. Source: Cantilever under end loads: S. P. Timoshenko and J. M. Gere, Mechanics of Materials, Van Nostrand 1972 (bending P L³/(3 E I), Saint-Venant twist T L/(G J)); the shear deflection P L/(G A_s) of the Timoshenko beam, S. P. Timoshenko, Phil. Mag. 41:744-746, 1921; G = E/(2(1 + ν)). Tolerances — timoshenko_axial: round-off only: the two-node beam’s stiffness is the exact flexibility of a beam under end loads (interdependent interpolation, Friedman and Kosmatka 1993; with no shear flexibility the Hermite element); timoshenko_width: round-off only: the two-node beam’s stiffness is the exact flexibility of a beam under end loads (interdependent interpolation, Friedman and Kosmatka 1993; with no shear flexibility the Hermite element); timoshenko_height: round-off only: the two-node beam’s stiffness is the exact flexibility of a beam under end loads (interdependent interpolation, Friedman and Kosmatka 1993; with no shear flexibility the Hermite element); timoshenko_twist: round-off only: the two-node beam’s stiffness is the exact flexibility of a beam under end loads (interdependent interpolation, Friedman and Kosmatka 1993; with no shear flexibility the Hermite element); euler_bernoulli_width: as timoshenko_width; the shear terms (3.8 % and 9.4 % of the Timoshenko deflections) are absent; euler_bernoulli_height: as euler_bernoulli_width; euler_bernoulli_twist: round-off only: the two-node beam’s stiffness is the exact flexibility of a beam under end loads (interdependent interpolation, Friedman and Kosmatka 1993; with no shear flexibility the Hermite element)
  • initial-stress-beam (theory): A residual stress linear through a beam’s depth, released. Source: Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §150 (a thermal strain linear in the coordinates is compatible and leaves a free body stress-free): the beam held at its ends (u_x = 0) while its thermal strain α (T − T₀(z)) is linear in z carries σ_xx = −E α (T − T₀(z)) and nothing else; mapped as the initial stress σ₀ of a free beam, it is released entirely into the strain −C⁻¹σ₀, linear in z, so the beam is left stress-free with the curvature 2 s/(E H) of a stress s (2z/H − 1) about its mean. Tolerances — held_bottom: a stress linear in z, which hex20 represents exactly; held_top: as for held_bottom; tip_deflection: a linear initial stress, which the hex20 nodal stresses map exactly, released into a quadratic displacement field, which hex20 represents exactly; tip_shortening: as for tip_deflection; max_von_mises: 10⁻⁶ of the released stress range (96): rounding only
  • initial-temperature-beam (theory): A beam ejected with a temperature linear through its depth, cooled to a uniform temperature. Source: Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §150 (a thermal strain linear in the coordinates is compatible and leaves a free body stress-free): the thermal strain α (T − T₀(z)) is linear in z, so the free beam bends stress-free to the curvature α dT₀/dz and its mid-line shrinks by α (T − T₀). Tolerances — tip_deflection: a quadratic displacement field, which hex20 represents exactly; the mapped temperature is linear, which the heat step and the mapping reproduce exactly; tip_shortening: as for tip_deflection; max_von_mises: 10⁻⁶ of E α ΔT over the depth (96): rounding only
  • j2-bauschinger (theory): Bauschinger effect of linear kinematic hardening: tension, then back to zero strain. Source: J2 plasticity with Prager’s linear kinematic hardening in uniaxial stress (W. Prager, Ing.-Arch. 1955; Simo and Hughes, Computational Inelasticity, Springer 1998, §2.3): from σ_a = σ_y + E_t (ε_a − σ_y/E) the material unloads elastically by 2σ_y and then hardens with E_t, so at zero strain σ = σ_a − 2σ_y − E_t (ε_a − 2σ_y/E). Tolerances — residual_stress: a homogeneous small-strain state the element represents exactly, with increments that end at the load path’s turn; isotropic hardening would give −281.835 (it yields again only at −σ_a); plastic_strain: (σ_a − σ_y)/H forward plus E/(E + H) (ε_a − 2σ_y/E) in reverse
  • j2-heated-bar (theory): A steel bar held at its ends and heated past yield (small strain). Source: Uniaxial J2 plasticity with linear hardening (Simo and Hughes, Computational Inelasticity, Springer 1998, §2.3) with the additive thermal strain: the bar’s total axial strain is held at zero, so its mechanical strain is −α ΔT and σ = −(σ_y + E_t (α ΔT − σ_y/E)) once α ΔT exceeds σ_y/E. Tolerances — sigma: a homogeneous uniaxial state the elements represent exactly; plastic_strain: (|σ| − σ_y)/H, as for the stress
  • j2-uniaxial-explicit (theory): Uniaxial tension of a J2 bilinear-hardening cube to large strain (explicit). Source: von Mises plasticity with linear isotropic hardening under uniaxial stress (Simo and Hughes, Computational Inelasticity, Springer 1998, §2.3); logarithmic strain for a hypoelastic–plastic law under coaxial stretching. Tolerances — sigma: uniaxial J2 with linear hardening: σ = σ_y + E_t (ε − σ_y/E) in logarithmic strain; the stretch takes 10⁴ wave transits, so inertia and the ringing of the start (ρcv ≈ 0.1% of σ) stay well under 1%; plastic_strain: ε_p = ε − σ/E, as for the stress
  • kirchhoff-slab-steel (theory): Steady conduction through a steel slab whose conductivity falls with the temperature (EN 1993-1-2 curve), 20 and 700 at the ends. Source: Kirchhoff transform of steady one-dimensional conduction with k(T): θ = ∫k dT satisfies Laplace’s equation, so across a slab held at T₀ and T₁ it is linear in z; with k = a + b T the temperature is the root of a T + b T²/2 = θ(z) (H. S. Carslaw, J. C. Jaeger, Conduction of Heat in Solids, 2nd ed., Oxford 1959, §1.7). k is the library’s EN 1993-1-2 carbon-steel curve, 54 − 3.33·10⁻² θ W/(m K) for θ in °C, linear over 20–700 °C. Tolerances — t_50: exact discrete solution: θ = ∫k dT is linear along the slab, and with k linear in T a hex8 element’s mean-temperature conductivity times its temperature gradient is θ’s gradient, so the nodal temperatures are exact; t_100: exact discrete solution: θ = ∫k dT is linear along the slab, and with k linear in T a hex8 element’s mean-temperature conductivity times its temperature gradient is θ’s gradient, so the nodal temperatures are exact; t_150: exact discrete solution: θ = ∫k dT is linear along the slab, and with k linear in T a hex8 element’s mean-temperature conductivity times its temperature gradient is θ’s gradient, so the nodal temperatures are exact; q_100: each element’s k(T̄) (T₂ − T₁)/h equals (θ₂ − θ₁)/h for k linear in T, so the flux is uniform and exact (142 840.8 W/m², shown in mW/mm²)
  • kirsch-plate (theory): Plate with a circular hole in tension (Kirsch). Source: Kirsch, Zeitschrift des VDI 42 (1898) 797–807; Timoshenko and Goodier, Theory of Elasticity, 3rd ed., 1970, §35. Tolerances — kt: the reference is the infinite plate; the finite plate (W = 60a, Heywood’s width correction about +0.1%, and the loaded ends 30a away) raises the peak by a few tenths of a percent, and the stress extrapolated to the hole surface adds up to about 1%; side: infinite-plate value −S; finite width and extrapolation as for Kt, on a smaller value
  • kirsch-plate-plane-stress (theory): Plate with a circular hole in tension, 2D plane stress (Kirsch). Source: Kirsch, Zeitschrift des VDI 42 (1898) 797–807; Timoshenko and Goodier, Theory of Elasticity, 3rd ed., 1970, §35. Tolerances — kt: the reference is the infinite plate; the finite plate (W = 60a, loaded ends 30a away) raises the peak by a few tenths of a percent, and the stress extrapolated to the hole surface adds up to about 1%; side: infinite-plate value −S; finite width and extrapolation as for Kt, on a smaller value
  • lame-cylinder (theory): Thick-walled cylinder under internal pressure, plane strain (Lamé). Source: Lamé’s solution, Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §28 (thick-walled cylinder). Tolerances — ur_a: quadratic elements on 8 radial divisions resolve u_r = A r + B/r to well under 0.1%; ur_b: as for the bore; hoop_a: stress extrapolated from the integration points to the bore surface and averaged over two elements: about 0.5% at the steepest gradient
  • lame-cylinder-axisymmetric (theory): Thick-walled cylinder under internal pressure, axisymmetric (Lamé). Source: Lamé’s solution, Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §28. Tolerances — ur_a: quadratic elements on 8 radial divisions resolve u_r = A r + B/r to well under 0.1%; ur_b: as at the bore; hoop_a: stress extrapolated to the bore surface: about 0.5%; axial: as for the hoop stress
  • lame-cylinder-linearisation (theory): Thick-walled cylinder under internal pressure: stress linearisation through the wall (ASME VIII-2 Annex 5-A on Lamé’s solution). Source: Lamé’s solution (Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §28) with A₀ = p a² / (b² − a²) = 33.333, B₀ = A₀ b² = 13 333.3, σ_θ = A₀ + B₀/r², σ_r = A₀ − B₀/r², σ_z = 2νA₀, integrated in closed form over the wall by the membrane and bending definitions of ASME BPVC Section VIII Division 2, Annex 5-A (5-A.4.1): hoop membrane p a/(b − a), hoop bending at the bore (6 B₀/t²)[c (1/a − 1/b) − ln(b/a)], c = (a + b)/2, peaks as total less membrane and bending, radial membrane −p a/(a + b). Tolerances — hoop_membrane: 8 × 16 hex20 mesh, each element’s own extrapolated nodal stresses integrated with Simpson’s rule on 41 points: the integrals are within 0.1% of the closed forms; hoop_bending_a: 8 × 16 hex20 mesh, each element’s own extrapolated nodal stresses integrated with Simpson’s rule on 41 points: the integrals are within 0.1% of the closed forms; hoop_peak_a: the peak is the small difference of the surface stress and the membrane and bending parts, each 0.2 to 0.4% off on this 8 × 16 hex20 mesh (0.3, 0.23 and 0.18 in stress units): added up, 3.4% of the 21.2 peak at the bore; 16 radial divisions bring it under 1%; hoop_peak_b: the peak is the small difference of the surface stress and the membrane and bending parts, each 0.2 to 0.4% off on this 8 × 16 hex20 mesh (0.3, 0.23 and 0.18 in stress units): added up, 3.4% of the 21.2 peak at the bore; 16 radial divisions bring it under 1%; radial_membrane: 8 × 16 hex20 mesh, each element’s own extrapolated nodal stresses integrated with Simpson’s rule on 41 points: the integrals are within 0.1% of the closed forms; axial_membrane: 8 × 16 hex20 mesh, each element’s own extrapolated nodal stresses integrated with Simpson’s rule on 41 points: the integrals are within 0.1% of the closed forms; membrane_von_mises: 8 × 16 hex20 mesh, each element’s own extrapolated nodal stresses integrated with Simpson’s rule on 41 points: the integrals are within 0.1% of the closed forms
  • lame-cylinder-plane-strain (theory): Thick-walled cylinder under internal pressure, 2D plane strain (Lamé). Source: Lamé’s solution, Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §28. Tolerances — ur_a: quadratic elements on 8 radial divisions resolve u_r = A r + B/r to well under 0.1%; hoop_a: stress extrapolated to the bore surface and averaged over two elements: about 0.5%; szz: σ_zz = ν(σ_r + σ_θ) follows the in-plane stresses, extrapolated as they are
  • mh-curved-cantilever (benchmark): MacNeal–Harder curved cantilever, hex8 with incompatible modes. Source: MacNeal and Harder, ‘A proposed standard set of problems to test finite element accuracy’, Finite Elements in Analysis and Design 1 (1985) 3–20: Fig. 5 (p. 7) geometry, material and mesh; Table 3 (p. 10) theoretical tip displacements. Tolerances — in_plane: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); out_of_plane: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14)
  • mh-solid-patch (benchmark): MacNeal–Harder patch test for solids (hex8 with incompatible modes). Source: MacNeal and Harder, ‘A proposed standard set of problems to test finite element accuracy’, Finite Elements in Analysis and Design 1 (1985) 3–20: Fig. 3 (p. 6) geometry and inner node locations, Table 2(c) (p. 10) boundary displacements and theoretical solution. Tolerances — sxx: a patch test is passed exactly: the tolerance only admits rounding; syy: a patch test is passed exactly: the tolerance only admits rounding; szz: a patch test is passed exactly: the tolerance only admits rounding; txy: a patch test is passed exactly: the tolerance only admits rounding; txz: a patch test is passed exactly: the tolerance only admits rounding; tyz: a patch test is passed exactly: the tolerance only admits rounding; u7: a patch test is passed exactly: the tolerance only admits rounding
  • mh-straight-cantilever (benchmark): MacNeal–Harder straight cantilever, regular hex8 mesh with incompatible modes. Source: MacNeal and Harder, ‘A proposed standard set of problems to test finite element accuracy’, Finite Elements in Analysis and Design 1 (1985) 3–20: Fig. 4(a) (p. 7) geometry, material and mesh; Table 3 (p. 10) theoretical tip displacements. Tolerances — extension: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); in_plane: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); out_of_plane: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); twist: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); the moment reaches the end through a distributing coupling
  • mh-thick-cylinder (benchmark): MacNeal–Harder thick-walled cylinder, nearly incompressible (hex8 with incompatible modes). Source: MacNeal and Harder, ‘A proposed standard set of problems to test finite element accuracy’, Finite Elements in Analysis and Design 1 (1985) 3–20: Fig. 10 (p. 9) geometry, material and radial mesh; Table 5(c) (p. 11) radial displacements at the inner radius. Tolerances — ur_1: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); ur_2: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); ur_3: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14)
  • mh-twisted-beam (benchmark): MacNeal–Harder twisted beam. Source: MacNeal and Harder, ‘A proposed standard set of problems to test finite element accuracy’, Finite Elements in Analysis and Design 1 (1985) 3–20, Fig. 6 (p. 8), Table 3 (p. 10). Tolerances — in_plane: MacNeal and Harder grade an element A within 2% of the theoretical value on the prescribed coarse mesh (p. 14); the 12 × 2 mesh gives 1.022 and 0.960 of the theory, recorded as a known failure with its two causes (README); out_of_plane: MacNeal and Harder grade an element A within 2% of the theoretical value on the prescribed coarse mesh (p. 14); the 12 × 2 mesh gives 1.022 and 0.960 of the theory, recorded as a known failure with its two causes (README)
  • nafems-fv2 (benchmark): NAFEMS FV2 pin-ended double cross, in-plane vibration (planar beams in a 2D model). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test FV2 (frequencies 11.336 Hz mode 1, 17.709 Hz modes 2-8, 45.345 Hz mode 9, 57.390 Hz modes 10-16); from F. Abbassian, D. J. Dawswell, N. C. Knowles, Selected Benchmarks for Natural Frequency Analysis, NAFEMS 1987, test 2. Tolerances — f1: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f2: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f3: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f4: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f5: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f6: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f7: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f8: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f9: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f10: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f11: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f12: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f13: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f14: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f15: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high; f16: NAFEMS’s targets are Euler-Bernoulli values (pinned-pinned and clamped-pinned arms: lambda^2/(2 pi L^2) sqrt(E I/(rho A)), lambda = pi, 3.9266, 2 pi, 7.0686), without shear deformation or rotary inertia; the Timoshenko element has both, which lowers a pinned-pinned arm by 0.10% (mode 1) and 0.41% (mode 9) in closed form, and four cubic elements per arm are 0.03% (mode 1) to 0.45% (mode 9) high; at 16 elements per arm modes 10 and 11 are 1.20% low (and with the arms’ area raised by 1e4 at the same I and mass per length every mode is within 0.002% of the target), so the -0.51% of 4 elements is that shortfall partly cancelled by the cubic mesh being up to 0.62% high
  • nafems-fv32 (benchmark): NAFEMS FV32 cantilevered tapered membrane, free vibration (hex20 plane stress layer). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test FV32 (frequencies 44.623, 130.03, 162.70, 246.05, 379.90, 391.44 Hz); as reproduced in the Abaqus 2017 Benchmarks Guide, ‘FV32: Cantilevered tapered membrane’. Tolerances — f1: targets published to five figures for 2D plane stress; a thin solid layer with a free face differs from plane stress by O((t/L)²) and the 16 × 8 quadratic mesh is converged to about 0.1%; f2: targets published to five figures for 2D plane stress; a thin solid layer with a free face differs from plane stress by O((t/L)²) and the 16 × 8 quadratic mesh is converged to about 0.1%; f3: targets published to five figures for 2D plane stress; a thin solid layer with a free face differs from plane stress by O((t/L)²) and the 16 × 8 quadratic mesh is converged to about 0.1%; f4: targets published to five figures for 2D plane stress; a thin solid layer with a free face differs from plane stress by O((t/L)²) and the 16 × 8 quadratic mesh is converged to about 0.1%; f5: targets published to five figures for 2D plane stress; a thin solid layer with a free face differs from plane stress by O((t/L)²) and the 16 × 8 quadratic mesh is converged to about 0.1%; f6: targets published to five figures for 2D plane stress; a thin solid layer with a free face differs from plane stress by O((t/L)²) and the 16 × 8 quadratic mesh is converged to about 0.1%
  • nafems-le1 (benchmark): NAFEMS LE1 elliptic membrane (hex20 plane stress layer). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE1 (target σ_yy = 92.7 MPa at D); as reproduced in the Abaqus 2017 Benchmarks Guide, ‘LE1: Plane stress elements—elliptic membrane’. Tolerances — syy_D: the target is published to three figures; plane stress modelled by a thin solid layer and the stress extrapolated to the edge add a few tenths of a percent
  • nafems-le1-plane-stress (benchmark): NAFEMS LE1 elliptic membrane with 2D plane stress elements (quad8). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE1 (target σ_yy = 92.7 MPa at D); as reproduced in the Abaqus 2017 Benchmarks Guide, ‘LE1: Plane stress elements—elliptic membrane’. Tolerances — syy_D: the target is published to three figures; the stress extrapolated to the edge on a converged mesh adds a few tenths of a percent
  • nafems-le10 (benchmark): NAFEMS LE10 thick plate under pressure (hex20). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE10 (target σ_yy = −5.38 MPa at D); as reproduced in the Abaqus 2017 Benchmarks Guide, ‘LE10: Thick plate under pressure’. Tolerances — syy_D: the target is published to three figures; at D the stress is extrapolated to a corner where the hole edge meets the loaded face, and published converged solutions scatter by 1–2% (Abaqus Benchmarks Guide fine meshes: −5.51 to −5.89)
  • nafems-le2 (benchmark): NAFEMS LE2 cylindrical shell bending patch test (MITC4 shells). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE2 (target: tangential stress 60 MPa on the outer surface at E, both load cases); the problem and target as reproduced in the Abaqus 2016 Benchmarks Guide, section 4.2.2 ‘LE2: Cylindrical shell bending patch test’, and in the ESRD StressCheck Benchmarks Guide ‘The Standard NAFEMS Benchmarks: Linear Elastic Tests’ (2018), p. 8. Tolerances — stt_E_moment: the target is the exact thin-shell value (6M/t²) and the stress is uniform over the patch; the 8 × 8 flat facets tilt the element axes by ±1.875° from the hoop direction, which moves 0.1% of it into σ_zz, and 16 × 16 is within 0.03% (see README); stt_E_pressure: the target is the exact membrane value (pR/t) and the stress is uniform over the patch; as in load case 1 the facets’ tilt and the pressure on flat facets keep 8 × 8 within 0.2%, 16 × 16 within 0.05% (see README)
  • nafems-le3 (benchmark): NAFEMS LE3 hemispherical shell with point loads (MITC4 shells). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE3 (target: radial displacement 0.185 m at A); the problem and target as reproduced in the Abaqus 2016 Benchmarks Guide, section 4.2.3 ‘LE3: Hemispherical shell with point loads’, and in the ESRD StressCheck Benchmarks Guide ‘The Standard NAFEMS Benchmarks: Linear Elastic Tests’ (2018), p. 12. Tolerances — ur_A: the target is published to three figures; the displacement under a point load on a shear-deformable shell keeps growing slowly as the mesh is refined (32 × 32 is 0.44% low, 64 × 64 0.16%; see README)
  • nafems-le5 (benchmark): NAFEMS LE5 Z-section cantilever (hex20). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE5 (target: axial stress −108 MPa at A, mid-surface); the problem and target as reproduced in the Abaqus 2016 Benchmarks Guide, section 4.2.5 ‘LE5: Z-section cantilever’, and in the ESRD StressCheck Benchmarks Guide ‘The Standard NAFEMS Benchmarks: Linear Elastic Tests’ (2018), p. 15. Tolerances — sxx_A: the target is published to three figures and comes from a thin-walled idealisation; a 3D solid model of the section converges about 1.5% beyond it (ours: −109.46 here, −109.60 on the next mesh; ESRD’s p-version solid: −109.5, see README)
  • nafems-le6 (benchmark): NAFEMS LE6 skew plate under normal pressure (MITC4 shells). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE6 (target: maximum principal stress 0.802 MPa on the lower surface at E, the centre of the plate), as reproduced in the Abaqus 2016 Benchmarks Guide, section 4.2.6 ‘LE6: Skew plate under normal pressure’, and in the ESRD StressCheck Benchmarks Guide ‘The Standard NAFEMS Benchmarks: Linear Elastic Tests’ (2018), p. 19, which also gives its converged thin-solid result, 0.820 MPa (p. 20), and notes that its thin-solid formulation can differ from the plate model behind the target (p. 22). Tolerances — s1_E: the target is published to three figures for the thin-plate model of the problem; s1_E_solid: a model that keeps transverse shear, like ESRD’s thin solid, which reports 0.820 on two meshes (0.822 with triangles); ours is 0.8197 and the next refinement moves it by 0.15% (see README)
  • nafems-le7 (benchmark): NAFEMS LE7 axisymmetric cylinder/sphere under pressure (axisymmetric quad8). Source: NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE7 (target: axial stress 25.86 MPa on the outer surface at D, R = 1.0125, Z = 1.4034), as reproduced in the ESRD StressCheck Benchmarks Guide ‘The Standard NAFEMS Benchmarks: Linear Elastic Tests’ (2018), p. 23, which also gives its converged axisymmetric solid result, 25.27 MPa (p. 24); the Abaqus 2016 Benchmarks Guide, section 4.2.7 ‘LE7: Axisymmetric cylinder/sphere under pressure’, gives the target rounded to 25.9 MPa. Tolerances — syy_D: the target is published to four figures for the thin-shell model of the vessel, and a model of the same theory converges well within 1%; syy_D_solid: the same model idealisation (axisymmetric solid) as the reference, which ESRD reports converged to under 1% on two meshes; ours moves by 0.05% on the next refinement (see README)
  • nl-cattaneo-mindlin-cylinder (theory): Cattaneo–Mindlin partial slip: a cylinder pressed on a flat, then sheared (implicit mortar contact with friction, plane strain). Source: C. Cattaneo, Sul contatto di due corpi elastici: distribuzione locale degli sforzi, Rend. Accad. Naz. Lincei 27:342–348, 434–436, 474–478, 1938; R. D. Mindlin, Compliance of elastic bodies in contact, J. Appl. Mech. 16:259–268, 1949; K. L. Johnson, Contact Mechanics, Cambridge University Press 1985, §7.2 (two-dimensional contact of cylinders under a tangential force below μP): stick zone |x| < c = a √(1 − Q/(μP)), q(x) = μp₀ √(1 − x²/a²) − μp₀ (c/a) √(1 − x²/c²) inside it and μp(x) in the slip zones c ≤ |x| ≤ a. Tolerances — slip_fraction_50: the stick zone |x| < c = a √(1 − Q/(μP)) = 0.7071 a (Johnson 1985, §7.2); the contact closes over 39 nodes h = a/20 apart, so one node more or less at an edge of the stick zone moves the share by 0.026; centre_traction_50: q = μp₀ (√(1 − x²/a²) − (c/a) √(1 − x²/c²)) in the stick zone, so q(0)/p(0) = μ(1 − c/a) at the secondary node at x = 0 (node 31); the bodies are a few half-widths deep, not half-planes, which shifts the stick zone towards the leading edge and puts the centre 2–3% above the closed form on every mesh (README); slip_fraction_75: the stick zone |x| < c = a √(1 − Q/(μP)) = 0.5000 a (Johnson 1985, §7.2); the contact closes over 39 nodes h = a/20 apart, so one node more or less at an edge of the stick zone moves the share by 0.026; centre_traction_75: q = μp₀ (√(1 − x²/a²) − (c/a) √(1 − x²/c²)) in the stick zone, so q(0)/p(0) = μ(1 − c/a) at the secondary node at x = 0 (node 31); the bodies are a few half-widths deep, not half-planes, which shifts the stick zone towards the leading edge and puts the centre 2–3% above the closed form on every mesh (README); peak_pressure_75: two bodies of one material: the shear does not change the pressure, which stays Hertz’s p₀ = 2P/(πa) (Johnson 1985, §7.2); as in nl-hertz-cylinder-plane-strain
  • nl-contact-patch (theory): Contact patch test: two blocks with non-matching meshes in uniaxial compression (implicit mortar contact). Source: The contact patch test: a contact discretisation must transmit a uniform pressure across a non-matching interface exactly; Taylor & Papadopoulos, On a patch test for contact problems in two dimensions, Nonlinear Computational Mechanics, Springer 1991, 690–702; Crisfield, Re-visiting the contact patch test, IJNME 48:435–449, 2000; passed by mortar methods: Puso & Laursen, CMAME 193:601–629, 2004. Uniaxial stress between frictionless symmetry planes is uniform in both blocks. Tolerances — small_lower_corner: small sliding is linear and its mortar integrals exact on these rectangular faces: a uniform stress is the discrete solution up to the convergence tolerance (10⁻¹⁰); small_lower_centre: as for the corner element; small_lower_base: as for the corner element; small_upper_top: as for the corner element; small_lateral: frictionless symmetry planes and a frictionless interface leave the blocks free to expand sideways; the non-matching interface must not hold them; small_pressure: the mortar multipliers are the nodal values of the contact pressure, uniform and equal to the stress across the interface; small_force: the pressure carries the whole load across the interface; finite_lower_corner: finite sliding is exact up to the geometric terms of the gaps the augmentation leaves (10⁻⁵ of the element thickness) and the default convergence tolerances; finite_lower_centre: as for the corner element; finite_lower_base: as for the corner element; finite_upper_top: as for the corner element; finite_lateral: frictionless symmetry planes and a frictionless interface leave the blocks free to expand sideways; the non-matching interface must not hold them; finite_pressure: the mortar multipliers are the nodal values of the contact pressure, uniform and equal to the stress across the interface; finite_force: the pressure carries the whole load across the interface; small_stress: the squeeze less the penetration the augmented Lagrangian leaves (up to 10⁻⁵ of the element thickness, a few 10⁻⁵ of the squeeze)
  • nl-contact-patch-axisymmetric (theory): Contact patch test, axisymmetric: two rings with non-matching edges in axial compression (implicit mortar contact). Source: The contact patch test: a contact discretisation must transmit a uniform pressure across a non-matching interface exactly; Taylor & Papadopoulos, On a patch test for contact problems in two dimensions, Nonlinear Computational Mechanics, Springer 1991, 690–702; passed by 2D mortar methods: Yang, Laursen & Meng, IJNME 62:1183–1225, 2005. Uniaxial stress between frictionless supports is uniform in both blocks. Tolerances — small_lower_corner: small sliding is linear and its edge mortar integrals exact (degree-3 Gauss on the overlaps): the uniform stress is the discrete solution up to the convergence tolerance; small_lower_far: as for the corner element; small_lower_base: as for the corner element; small_upper_top: as for the corner element; small_lateral: a frictionless interface (and symmetry plane) leaves the blocks free to expand sideways; the non-matching interface must not hold them; small_pressure: the mortar multipliers are the nodal values of the contact pressure, uniform and equal to the stress across the interface; small_force: the pressure carries the whole load across the interface (both are totals over the circumference); finite_lower_corner: finite sliding is exact up to the geometric terms of the gaps the augmentation leaves (10⁻⁵ of the element thickness) and the default convergence tolerances; finite_lower_far: as for the corner element; finite_lower_base: as for the corner element; finite_upper_top: as for the corner element; finite_lateral: a frictionless interface (and symmetry plane) leaves the blocks free to expand sideways; the non-matching interface must not hold them; finite_pressure: the mortar multipliers are the nodal values of the contact pressure, uniform and equal to the stress across the interface; finite_force: the pressure carries the whole load across the interface (both are totals over the circumference); small_stress: the squeeze less the penetration the augmented Lagrangian leaves (up to 10⁻⁵ of the element thickness)
  • nl-contact-patch-plane-strain (theory): Contact patch test in plane strain: two blocks with non-matching edges in uniaxial compression (implicit mortar contact). Source: The contact patch test: a contact discretisation must transmit a uniform pressure across a non-matching interface exactly; Taylor & Papadopoulos, On a patch test for contact problems in two dimensions, Nonlinear Computational Mechanics, Springer 1991, 690–702; passed by 2D mortar methods: Yang, Laursen & Meng, IJNME 62:1183–1225, 2005. Uniaxial stress between frictionless supports is uniform in both blocks. Tolerances — small_lower_corner: small sliding is linear and its edge mortar integrals exact (degree-3 Gauss on the overlaps): the uniform stress is the discrete solution up to the convergence tolerance; small_lower_far: as for the corner element; small_lower_base: as for the corner element; small_upper_top: as for the corner element; small_lateral: a frictionless interface (and symmetry plane) leaves the blocks free to expand sideways; the non-matching interface must not hold them; small_pressure: the mortar multipliers are the nodal values of the contact pressure, uniform and equal to the stress across the interface; small_force: the pressure carries the whole load across the interface (both are totals over the thickness); finite_lower_corner: finite sliding is exact up to the geometric terms of the gaps the augmentation leaves (10⁻⁵ of the element thickness) and the default convergence tolerances; finite_lower_far: as for the corner element; finite_lower_base: as for the corner element; finite_upper_top: as for the corner element; finite_lateral: a frictionless interface (and symmetry plane) leaves the blocks free to expand sideways; the non-matching interface must not hold them; finite_pressure: the mortar multipliers are the nodal values of the contact pressure, uniform and equal to the stress across the interface; finite_force: the pressure carries the whole load across the interface (both are totals over the thickness); small_stress: the squeeze less the penetration the augmented Lagrangian leaves (up to 10⁻⁵ of the element thickness)
  • nl-contact-patch-quadratic (theory): Contact patch test with quadratic faces: two hex20 blocks with non-matching meshes in uniaxial compression (implicit mortar contact). Source: The contact patch test: a contact discretisation must transmit a uniform pressure across a non-matching interface exactly; Taylor & Papadopoulos, On a patch test for contact problems in two dimensions, Nonlinear Computational Mechanics, Springer 1991, 690–702; Crisfield, Re-visiting the contact patch test, IJNME 48:435–449, 2000; passed by mortar methods: Puso & Laursen, CMAME 193:601–629, 2004, and with quadratic elements by a transformed multiplier basis: Puso, Laursen & Solberg, CMAME 197:555–566, 2008. Uniaxial stress between frictionless symmetry planes is uniform in both blocks. Tolerances — small_lower_corner: small sliding is linear and its mortar integrals exact on these flat quad8 faces with straight edges (their facets are the faces): a uniform stress is the discrete solution up to the convergence tolerance (10⁻¹⁰); small_lower_centre: as for the corner element; small_lower_base: as for the corner element; small_upper_top: as for the corner element; small_lateral: frictionless symmetry planes and a frictionless interface leave the blocks free to expand sideways; the non-matching interface must not hold them; small_pressure: the mortar multipliers, in the transformed basis of the quadratic faces, are the nodal values of the contact pressure, uniform and equal to the stress across the interface; the reported pressure is the node’s force in that basis over the area it carries; small_force: the pressure carries the whole load across the interface; finite_lower_corner: finite sliding is exact up to the geometric terms of the gaps the augmentation leaves (10⁻⁵ of the element thickness) and the default convergence tolerances; finite_lower_centre: as for the corner element; finite_lower_base: as for the corner element; finite_upper_top: as for the corner element; finite_lateral: frictionless symmetry planes and a frictionless interface leave the blocks free to expand sideways; the non-matching interface must not hold them; finite_pressure: the mortar multipliers, in the transformed basis of the quadratic faces, are the nodal values of the contact pressure, uniform and equal to the stress across the interface; the reported pressure is the node’s force in that basis over the area it carries; finite_force: the pressure carries the whole load across the interface; small_stress: the squeeze less the penetration the augmented Lagrangian leaves (up to 10⁻⁵ of the element thickness, a few 10⁻⁵ of the squeeze)
  • nl-cylinder-inflation (theory): Inflation of a thick neo-Hookean cylinder by a follower pressure (plane strain). Source: Finite inflation of an incompressible neo-Hookean thick-walled tube in plane strain: r² = R² + a² − A², σ_θ − σ_r = μ (λ² − λ⁻²) with λ = r/R, integrated through the wall: p = (μ/2)[(ln λ_a² − λ_a⁻²) − (ln λ_b² − λ_b⁻²)] (R. S. Rivlin, Large elastic deformations of isotropic materials VI, Phil. Trans. R. Soc. A 242:173–195, 1949; R. W. Ogden, Non-Linear Elastic Deformations, Dover 1997, §5.3.2). Tolerances — ua: the closed form is incompressible and our material nearly so (κ/μ = 1000, a volume change of order p/κ ≈ 4·10⁻⁴); hybrid hex20, 6 × 16, follow the wall’s strain gradient well inside; ub: as at the bore
  • nl-elastica-cantilever (theory): Large-deflection cantilever under a dead tip load against the elastica (solids). Source: The elastica of a cantilever under a vertical end load: K. E. Bisshopp, D. C. Drucker, Large deflection of cantilever beams, Quarterly of Applied Mathematics 3(3):272–275, 1945 (elliptic-integral solution); values computed by integrating θ″ = −(P/EI) cos θ by shooting (our own RK4, 20000 steps), agreeing with the table of K. Mattiasson, Numerical results from large deflection beam and frame problems analysed by means of elliptic integrals, IJNME 17(1):145–153, 1981, to all six digits. Tolerances — v1: hex20, 40 × 2 through the depth, L/h = 20: shear deformation (0.6 (h/L)² ≈ 0.15 % of the deflection) and the clamp’s local restraint, both absent from the elastica; u1: as δ_v; the shortening is the smaller, second-order quantity, so its relative error is about twice the deflection’s; v2: hex20, 40 × 2 through the depth, L/h = 20: shear deformation (0.6 (h/L)² ≈ 0.15 % of the deflection) and the clamp’s local restraint, both absent from the elastica; u2: as δ_v; the shortening is the smaller, second-order quantity, so its relative error is about twice the deflection’s; v5: hex20, 40 × 2 through the depth, L/h = 20: shear deformation (0.6 (h/L)² ≈ 0.15 % of the deflection) and the clamp’s local restraint, both absent from the elastica; u5: as δ_v; the shortening is the smaller, second-order quantity, so its relative error is about twice the deflection’s; v10: hex20, 40 × 2 through the depth, L/h = 20: shear deformation (0.6 (h/L)² ≈ 0.15 % of the deflection) and the clamp’s local restraint, both absent from the elastica; u10: as δ_v; the shortening is the smaller, second-order quantity, so its relative error is about twice the deflection’s
  • nl-elastica-cantilever-hex8-incompatible (theory): Large-deflection cantilever under a dead tip load against the elastica, one incompatible-mode hex8 through the depth. Source: The elastica of a cantilever under a vertical end load: K. E. Bisshopp, D. C. Drucker, Large deflection of cantilever beams, Quarterly of Applied Mathematics 3(3):272–275, 1945 (elliptic-integral solution); values computed by integrating θ″ = −(P/EI) cos θ by shooting (our own RK4, 20000 steps), agreeing with the table of K. Mattiasson, Numerical results from large deflection beam and frame problems analysed by means of elliptic integrals, IJNME 17(1):145–153, 1981, to all six digits. Tolerances — v1: incompatible-mode hex8, 40 × 1 × 1 (one element through the depth), L/h = 20: shear deformation (0.6 (h/L)² ≈ 0.15 % of the deflection) and the clamp’s local restraint, both absent from the elastica; the refinement study in the README converges to about 0.2–0.4 %; u1: as δ_v; the shortening is the smaller, second-order quantity, so its relative error is about twice the deflection’s; v2: incompatible-mode hex8, 40 × 1 × 1 (one element through the depth), L/h = 20: shear deformation (0.6 (h/L)² ≈ 0.15 % of the deflection) and the clamp’s local restraint, both absent from the elastica; the refinement study in the README converges to about 0.2–0.4 %; u2: as δ_v; the shortening is the smaller, second-order quantity, so its relative error is about twice the deflection’s; v5: incompatible-mode hex8, 40 × 1 × 1 (one element through the depth), L/h = 20: shear deformation (0.6 (h/L)² ≈ 0.15 % of the deflection) and the clamp’s local restraint, both absent from the elastica; the refinement study in the README converges to about 0.2–0.4 %; u5: as δ_v; the shortening is the smaller, second-order quantity, so its relative error is about twice the deflection’s; v10: incompatible-mode hex8, 40 × 1 × 1 (one element through the depth), L/h = 20: shear deformation (0.6 (h/L)² ≈ 0.15 % of the deflection) and the clamp’s local restraint, both absent from the elastica; the refinement study in the README converges to about 0.2–0.4 %; u10: as δ_v; the shortening is the smaller, second-order quantity, so its relative error is about twice the deflection’s
  • nl-friction-sliding-blocks (theory): Coulomb friction: a block pressed on another and slid (implicit mortar contact). Source: Coulomb’s law of dry friction: a sliding interface carries μ_k times the normal force against the slip (C. A. Coulomb, Théorie des machines simples, Mém. Math. Phys. Acad. Sci. 10:161–332, 1785; P. Wriggers, Computational Contact Mechanics, 2nd ed., Springer 2006, §5.2). Tolerances — kinetic: once the interface slips its friction is μ_k N exactly (the return map puts every slipping node’s traction on the cone); the force opposes the upper block’s motion; balance: the friction carries the whole sideways load; slipping: a sideways demand far beyond μ N slips the whole interface
  • nl-hertz-cylinder (theory): Hertz line contact: a cylinder pressed on a flat (implicit mortar contact, plane strain). Source: H. Hertz, Über die Berührung fester elastischer Körper, J. reine angew. Math. 92:156–171, 1882; K. L. Johnson, Contact Mechanics, Cambridge University Press 1985, §4.3 (two-dimensional contact of cylindrical bodies, eqs. 4.45–4.49): b = √(4PR/(πE*)), p₀ = 2P/(πb), with 1/E* = 2(1 − ν²)/E for two bodies of one material and R the cylinder’s radius on a flat. Tolerances — peak_pressure: p₀ = 2P/(πb) for the load per length P = 2265.57 N/mm, b = 0.5 mm; the contact width spans seven elements of the graded mesh; normal_force: the pressure carries the whole load; the soft springs that hold the indenter before contact take a millionth; pressure_x0296: p₀ √(1 − x²/b²) at the node; the nodal pressure (the node’s normal force over the area it carries) averages the distribution over the node’s elements; pressure_x0367: as at node 7, nearer the edge, where the elements round off the square-root fall of the pressure to zero at b; pressure_x0633: outside the contact the surfaces are apart: no pressure (an element beyond b, since the edge element carries part of the last closed node’s pressure); syy_depth: σ_z = −p₀ / √(1 + z²/b²) on the axis of a half-plane (Johnson 1985, eq. 4.49); the foundation is ten half-widths wide and deep, not a half-plane, and the stress is the nodal average of the elements around the node
  • nl-hertz-cylinder-hex20 (theory): Hertz line contact on hex20 faces: a cylinder pressed on a flat (implicit mortar contact on curved quadratic faces). Source: H. Hertz, Über die Berührung fester elastischer Körper, J. reine angew. Math. 92:156–171, 1882; K. L. Johnson, Contact Mechanics, Cambridge University Press 1985, §4.3 (two-dimensional contact of cylindrical bodies): b = √(4PR/(πE*)), p₀ = 2P/(πb), with 1/E* = 2(1 − ν²)/E for two bodies of one material and R the cylinder’s radius on a flat; outside the contact the gap h(x) = (b²/2R)[(x/b)√(x²/b² − 1) − ln(x/b + √(x²/b² − 1))], the integral of the slope √(x² − b²)/R that the elliptical pressure leaves. Tolerances — peak_pressure: p₀ = 2P/(πb) for the load per length P = 2265.57 N/mm, b = 0.5 mm; the contact width spans three or four hex20 faces of the graded mesh, and the largest nodal pressure is compared (corner and mid-side pressures alternate a little around the ellipse); normal_force: the pressure carries the whole load; the soft springs that hold the indenter before contact take a millionth; gap_x0423: within the half-width the surfaces touch: the last node before b is closed (the next node, at x = 0.514 > b, is open), so the contact’s edge lies between them, as b = 0.5 says; pressure_x0719: outside the contact there is no pressure (the nodes of the faces that hold the contact’s edge, up to x = 0.605, carry part of the last closed node’s pressure); gap_x0719: Hertz’s separation beyond b; the foundation is ten half-widths wide and deep, not a half-plane, and the coarse faces round off the contact’s edge
  • nl-hertz-cylinder-plane-strain (theory): Hertz line contact: a cylinder pressed on a flat (implicit mortar contact of 2D edges, plane strain). Source: H. Hertz, Über die Berührung fester elastischer Körper, J. reine angew. Math. 92:156–171, 1882; K. L. Johnson, Contact Mechanics, Cambridge University Press 1985, §4.3 (two-dimensional contact of cylindrical bodies, eqs. 4.45–4.49): b = √(4PR/(πE*)), p₀ = 2P/(πb), with 1/E* = 2(1 − ν²)/E for two bodies of one material and R the cylinder’s radius on a flat. Tolerances — peak_pressure: p₀ = 2P/(πb) for the load per length P = 2265.57 N/mm, b = 0.5 mm; the contact width spans seven elements of the graded mesh; normal_force: the pressure carries the whole load; the soft springs that hold the indenter before contact take a millionth; pressure_x0296: p₀ √(1 − x²/b²) at the node; the nodal pressure (the node’s normal force over the area it carries) averages the distribution over the node’s elements; pressure_x0367: as at node 7, nearer the edge, where the elements round off the square-root fall of the pressure to zero at b; pressure_x0633: outside the contact the surfaces are apart: no pressure (an element beyond b, since the edge element carries part of the last closed node’s pressure); syy_depth: σ_z = −p₀ / √(1 + z²/b²) on the axis of a half-plane (Johnson 1985, eq. 4.49); the foundation is ten half-widths wide and deep, not a half-plane, and the stress is the nodal average of the elements around the node
  • nl-hertz-cylinder-tet10 (theory): Hertz line contact on tet10 faces: a cylinder pressed on a flat (implicit mortar contact on curved quadratic faces). Source: H. Hertz, Über die Berührung fester elastischer Körper, J. reine angew. Math. 92:156–171, 1882; K. L. Johnson, Contact Mechanics, Cambridge University Press 1985, §4.3 (two-dimensional contact of cylindrical bodies): b = √(4PR/(πE*)), p₀ = 2P/(πb), with 1/E* = 2(1 − ν²)/E for two bodies of one material and R the cylinder’s radius on a flat; outside the contact the gap h(x) = (b²/2R)[(x/b)√(x²/b² − 1) − ln(x/b + √(x²/b² − 1))], the integral of the slope √(x² − b²)/R that the elliptical pressure leaves. Tolerances — peak_pressure: p₀ = 2P/(πb) for the load per length P = 2265.57 N/mm, b = 0.5 mm; the contact width spans three or four tet10 faces of the graded mesh, and the largest nodal pressure is compared (corner and mid-side pressures alternate a little around the ellipse); normal_force: the pressure carries the whole load; the soft springs that hold the indenter before contact take a millionth; gap_x0423: within the half-width the surfaces touch: the last node before b is closed (the next node, at x = 0.514 > b, is open), so the contact’s edge lies between them, as b = 0.5 says; pressure_x0719: outside the contact there is no pressure (the nodes of the faces that hold the contact’s edge, up to x = 0.605, carry part of the last closed node’s pressure); gap_x0719: Hertz’s separation beyond b; the foundation is ten half-widths wide and deep, not a half-plane, and the coarse faces round off the contact’s edge
  • nl-hybrid-incompressible (theory): Nearly incompressible hybrid block under prescribed stretch. Source: Uniaxial stress of the decoupled compressible neo-Hookean energy W = μ/2 (Ī₁ − 3) + κ/2 (J − 1)² (P. J. Flory, Trans. Faraday Soc. 57:829–838, 1961): σ = μ J^(−5/3) (λ² − I₁/3) + κ (J − 1) with the lateral stretch found so σ_yy = 0 (bisection; E = 3, ν = 0.4999: μ = 1.0000667, κ = 5000). Tolerances — sigma: a homogeneous deformation every hybrid hex8 represents exactly; the 27-element mesh makes the global mixed tangent indefinite in the first iterations (LDLᵀ): the tolerance admits the Newton tolerance and rounding; lateral: a homogeneous deformation every hybrid hex8 represents exactly; the 27-element mesh makes the global mixed tangent indefinite in the first iterations (LDLᵀ): the tolerance admits the Newton tolerance and rounding
  • nl-j2-bauschinger (theory): Finite-strain Bauschinger cycle in Lagrangian logarithmic strain. Source: Miehe, Apel and Lambrecht, CMAME 191:5383–5425 (2002), doi:10.1016/S0045-7825(02)00438-3, logarithmic-strain plasticity with Prager hardening (W. Prager, The theory of plasticity: a survey of recent achievements, Proc. Inst. Mech. Eng. 169:41–57, 1955). Uniaxial relations: E_t = E H/(E+H), tau_a = sigma_y + E_t (e_a - sigma_y/E), tau_r = tau_a - 2 sigma_y - E_t (e_a - 2 sigma_y/E), J_r = exp(tau_r/(3K)), sigma_r = tau_r/J_r, ep = (E e_a - sigma_y)/(E+H) + (E e_a - 2 sigma_y)/(E+H). Tolerances — residual_stress: Homogeneous uniaxial stress with free lateral contraction; the Kirchhoff residual must be converted to Cauchy stress with the residual elastic volume; plastic_strain: Forward and reverse plastic increments of the Prager return in logarithmic strain space
  • nl-j2-simple-shear (theory): Non-coaxial simple shear against Itskov’s published logarithmic-plasticity curve. Source: M. Itskov, On the applicability of generalized strain measures in large strain plasticity, Trends and Applications of Mathematics to Mechanics, pp. 101–113 (2005), doi:10.1007/88-470-0354-7_10, eqs. (45), (60)–(61), Fig. 1, r = 0. Rigid-perfect-plastic additive logarithmic model: tau_xy/(Y/sqrt(3)) = 2 sqrt(4 + gamma^2 + 4 asinh(gamma/2)^2)/(4 + gamma^2).. Tolerances — shear_1: The unit top face reaction equals tau_xy (J = 1). The 0.005% band covers return integration with delta gamma = 1/512 and finite elasticity Y/E = 1.25e-5; material-point tests check step and rigidity refinement toward the rigid-plastic limit.; shear_2: The unit top face reaction equals tau_xy (J = 1). The 0.005% band covers return integration with delta gamma = 1/512 and finite elasticity Y/E = 1.25e-5; material-point tests check step and rigidity refinement toward the rigid-plastic limit.; shear_4: The unit top face reaction equals tau_xy (J = 1). The 0.005% band covers return integration with delta gamma = 1/512 and finite elasticity Y/E = 1.25e-5; material-point tests check step and rigidity refinement toward the rigid-plastic limit.; shear_8: The unit top face reaction equals tau_xy (J = 1). The 0.005% band covers return integration with delta gamma = 1/512 and finite elasticity Y/E = 1.25e-5; material-point tests check step and rigidity refinement toward the rigid-plastic limit.
  • nl-j2-uniaxial (theory): Uniaxial tension of a J2 bilinear-hardening cube to large strain (implicit, finite strain). Source: J2 plasticity with linear isotropic hardening in uniaxial stress (Simo and Hughes, Computational Inelasticity, Springer 1998, §2.3) in the logarithmic strain, which Simo’s exponential return map (CMAME 99:61–112, 1992) integrates exactly on a proportional path: Kirchhoff stress τ = σ_y + E_t (ε − σ_y/E), Cauchy stress σ = τ/J with ln J = τ/(3K) (Hencky’s volume law). Tolerances — sigma: a homogeneous deformation the element represents exactly, reached on a proportional path: the tolerance only admits the Newton tolerance and rounding; plastic_strain: ε_p = (τ − σ_y)/H, as for the stress
  • nl-mooney-rivlin-modes (theory): Mooney–Rivlin block in uniaxial, equibiaxial and pure-shear tension. Source: Treloar’s homogeneous modes of rubber testing (L. R. G. Treloar, The Physics of Rubber Elasticity, 3rd ed., Oxford 1975, ch. 10) for the decoupled compressible energy W = C₁₀ (Ī₁ − 3) + C₀₁ (Ī₂ − 3) + κ/2 (J − 1)²: principal Cauchy stresses σᵢ = (λᵢ/J) ∂W/∂λᵢ with the free stretch found so the free faces carry no stress (bisection; E = 3, ν = 0.49, C₀₁ = 0.2, C₁₀ = μ/2 − C₀₁). Tolerances — uniaxial: a homogeneous deformation the hybrid hex20 represents exactly: the tolerance admits the Newton tolerance and rounding; uniaxial_lateral: a homogeneous deformation the hybrid hex20 represents exactly: the tolerance admits the Newton tolerance and rounding; equibiaxial: a homogeneous deformation the hybrid hex20 represents exactly: the tolerance admits the Newton tolerance and rounding; shear_xx: a homogeneous deformation the hybrid hex20 represents exactly: the tolerance admits the Newton tolerance and rounding; shear_yy: a homogeneous deformation the hybrid hex20 represents exactly: the tolerance admits the Newton tolerance and rounding
  • nl-mooney-rivlin-tube (theory): Inflation of a stretched Mooney–Rivlin tube (follower pressure). Source: Finite inflation and extension of an incompressible Mooney–Rivlin tube (R. S. Rivlin, Large elastic deformations of isotropic materials VI, Phil. Trans. R. Soc. A 242:173–195, 1949; R. W. Ogden, Non-Linear Elastic Deformations, Dover 1997, §5.3): at axial stretch λ_z, r² = a² + (R² − A²)/λ_z, σ_θ − σ_r = 2 (λ_θ² − λ_r²)(C₁₀ + C₀₁ λ_z²) with λ_θ = r/R, λ_r = 1/(λ_θ λ_z), integrated through the wall: p = ∫ (σ_θ − σ_r) dr/r (Simpson, 2·10⁵ intervals). Tolerances — ua: 16 × 6 hybrid hex20 around the quarter; ν = 0.4995 stands in for incompressibility (a volume change of order p/κ ≈ 10⁻³ shifts the radii by about 0.1 %), and the tube is stretched axially by its ends, which a nearly incompressible solid takes with larger pressures than the plane-strain neo-Hookean tube; ub: 0.2 % of the outer radius b = 20.616: the same volume change of order 10⁻³ moves b by about 0.03, which is 4.5 % of b − B; the incompressible kinematics r² = a² + (R² − A²)/λ_z amplify it there
  • nl-mooney-rivlin-tube-axisymmetric (theory): Inflation of a stretched Mooney–Rivlin tube (axisymmetric hybrid quad4). Source: Finite inflation and extension of an incompressible Mooney–Rivlin tube (R. S. Rivlin, Large elastic deformations of isotropic materials VI, Phil. Trans. R. Soc. A 242:173–195, 1949; R. W. Ogden, Non-Linear Elastic Deformations, Dover 1997, §5.3): at axial stretch λ_z, r² = a² + (R² − A²)/λ_z, σ_θ − σ_r = 2 (λ_θ² − λ_r²)(C₁₀ + C₀₁ λ_z²) with λ_θ = r/R, λ_r = 1/(λ_θ λ_z), integrated through the wall: p = ∫ (σ_θ − σ_r) dr/r (Simpson, 2·10⁵ intervals). Tolerances — ua: 16 × 6 hybrid hex20 around the quarter; ν = 0.4995 stands in for incompressibility (a volume change of order p/κ ≈ 10⁻³ shifts the radii by about 0.1 %), and the tube is stretched axially by its ends, which a nearly incompressible solid takes with larger pressures than the plane-strain neo-Hookean tube; ub: 0.2 % of the outer radius b = 20.616: the same volume change of order 10⁻³ moves b by about 0.03, which is 4.5 % of b − B; the incompressible kinematics r² = a² + (R² − A²)/λ_z amplify it there
  • nl-neo-hookean-uniaxial (theory): Uniaxial stretch of a neo-Hookean block to twice its length. Source: Closed form of the compressible neo-Hookean model W = μ/2 (Ī₁ − 3) + κ/2 (J − 1)² in uniaxial stress (G. A. Holzapfel, Nonlinear Solid Mechanics, Wiley 2000, §6.5, eq. 6.148 with the volumetric term of §6.4): σ_yy = μ J^(−5/3)(l² − Ī/3) + κ(J − 1) = 0 fixes the lateral stretch l, then σ_xx = μ J^(−5/3)(λ² − l²). Tolerances — sigma: a homogeneous deformation every element represents exactly: the tolerance only admits rounding and the Newton tolerance; lateral: a homogeneous deformation every element represents exactly: the tolerance only admits rounding and the Newton tolerance
  • nl-patch-hex8 (theory): Nonlinear patch test, hex8: a homogeneous finite deformation of a distorted mesh. Source: The patch test (B. M. Irons, A. Razzaque, in A. K. Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, 557–587) at finite strain: a boundary moved by x = F X makes F the solution everywhere (J. Bonet, R. D. Wood, Nonlinear Continuum Mechanics for Finite Element Analysis, 2nd ed., Cambridge 2008, §8); the neo-Hookean Cauchy stress σ = μ J^(−5/3) dev b + κ (J − 1) I of that F. Tolerances — ux: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance; uy: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance; uz: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance; sxx: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance; syy: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance; szz: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance; sxy: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance; sxz: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance; syz: a patch test is passed exactly: the tolerance admits rounding and the Newton tolerance
  • nl-patch-hex8-incompatible (theory): Nonlinear patch test, incompatible-mode hex8: a homogeneous finite deformation of a distorted mesh. Source: The patch test (B. M. Irons, A. Razzaque, in A. K. Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, 557–587) at finite strain: a boundary moved by x = F X makes F the solution everywhere (J. Bonet, R. D. Wood, Nonlinear Continuum Mechanics for Finite Element Analysis, 2nd ed., Cambridge 2008, §8); the neo-Hookean Cauchy stress σ = μ J^(−5/3) dev b + κ (J − 1) I of that F; the enhanced modes of E. L. Wilson, R. L. Taylor et al. (1973) with the det J₀/det J correction of R. L. Taylor, P. J. Beresford, E. L. Wilson, IJNME 10(6):1211–1219, 1976, at finite strain after J. C. Simo, F. Armero, Geometrically non-linear enhanced strain mixed methods and the method of incompatible modes, IJNME 33(7):1413–1449, 1992, must stay zero under a homogeneous deformation. Tolerances — ux: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes; uy: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes; uz: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes; sxx: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes; syy: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes; szz: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes; sxy: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes; sxz: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes; syz: a patch test is passed exactly, the enhanced modes staying zero: the tolerance admits rounding, the Newton tolerance and the local iteration of the modes
  • nl-rigid-rotation (theory): A quarter turn strains and stresses nothing (objectivity). Source: Objectivity of the total Lagrangian formulation and of the hyperelastic stress: a rigid motion x = R X + c gives C = I and σ = 0 whatever the rotation (Bonet & Wood 2008, §3.4 and §5.2; T. Belytschko, W. K. Liu, B. Moran, Nonlinear Finite Elements for Continua and Structures, 2nd ed., Wiley 2014, §5.5). Tolerances — ux: the inner nodes follow the rigid rotation exactly; uy: the inner nodes follow the rigid rotation exactly; uz: the inner nodes follow the rigid rotation exactly; von_mises: zero up to rounding of stresses of order E = 1000: a 90° turn leaves no strain
  • nl-thermal-expansion (theory): Free and fully constrained thermal expansion at finite strain. Source: The multiplicative split F = F_m F_θ with F_θ = (1 + α ΔT) I (V. A. Lubarda, Appl. Mech. Rev. 57(2):95–108, 2004): a free body follows F = F_θ stress-free; held on every face, F = I and F_m = ϑ⁻¹ I, so the compressible neo-Hookean material carries the pressure of its volume ratio, σ = κ (ϑ⁻³ − 1). Tolerances — free_u: a homogeneous stretch every element represents exactly; free_stress: rounding only; held_stress: a homogeneous state; E = 10, ν = 0.3 (κ = 8.3333), ϑ = 1.2
  • nl-yeoh-uniaxial (theory): Yeoh block in uniaxial tension. Source: Uniaxial tension of the decoupled compressible Yeoh energy W = C₁₀ (Ī₁ − 3) + C₂₀ (Ī₁ − 3)² + C₃₀ (Ī₁ − 3)³ + κ/2 (J − 1)² (O. H. Yeoh, Rubber Chem. Technol. 66(5):754–771, 1993): σ = (λ/J) ∂W/∂λ with the lateral stretch found so σ_yy = 0 (bisection; E = 3, ν = 0.49, C₁₀ = μ/2, C₂₀ = −0.02, C₃₀ = 0.004). Tolerances — sigma: a homogeneous deformation the hybrid hex20 represents exactly: the tolerance admits the Newton tolerance and rounding; lateral: a homogeneous deformation the hybrid hex20 represents exactly: the tolerance admits the Newton tolerance and rounding
  • octree-filleted-bracket (theory): Filleted L-bracket on the octree all-hex mesh: equilibrium, beam bending, fillet stress convergence. Source: equilibrium; Euler–Bernoulli bending of the 8 × 40 mm leg, σ = M c / I with M = F (50 − y) (S. P. Timoshenko, J. N. Goodier, Theory of Elasticity, 3rd ed., 1970, §102); grid convergence of the fillet stress against the 4 mm mesh of this case (P. J. Roache, Verification and Validation in Computational Science and Engineering, 1998, ch. 5). Tolerances — reaction_x: the reactions balance the 2 kN load to solver precision; invalid: the octree mesher returns only elements proven valid; volume: bilinear boundary faces on the R6 fillet and the two Ø8 holes, and the 1e-3 chordal tessellation they are fitted to; syy_outer: beam theory ignores the corner 5 mm below and the hole 9 mm above; the probe takes the nearest node’s extrapolated stress; syy_inner: as for the outer face; fillet_7: the coarsest mesh, within 5% of the 4 mm mesh; fillet_5: converging: within 2% of the 4 mm mesh
  • patch-hex20 (theory): Constant-stress patch test, hex20. Source: Irons and Razzaque, ‘Experience with the patch test for convergence of finite elements’, in Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, pp. 557–587; MacNeal and Harder, Finite Elements in Analysis and Design 1 (1985) 3–20, constant-stress loading, p. 14 Table 7. Tolerances — ux: a patch test is passed exactly: the tolerance only admits rounding; uy: a patch test is passed exactly: the tolerance only admits rounding; uz: a patch test is passed exactly: the tolerance only admits rounding; sxx: a patch test is passed exactly: the tolerance only admits rounding; syy: a patch test is passed exactly: the tolerance only admits rounding; szz: a patch test is passed exactly: the tolerance only admits rounding; sxy: a patch test is passed exactly: the tolerance only admits rounding (stresses of order 1)
  • patch-hex20-reduced (theory): Constant-stress patch test, hex20-reduced. Source: Irons and Razzaque, ‘Experience with the patch test for convergence of finite elements’, in Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, pp. 557–587; MacNeal and Harder, Finite Elements in Analysis and Design 1 (1985) 3–20, constant-stress loading, p. 14 Table 7. Tolerances — ux: a patch test is passed exactly: the tolerance only admits rounding; uy: a patch test is passed exactly: the tolerance only admits rounding; uz: a patch test is passed exactly: the tolerance only admits rounding; sxx: a patch test is passed exactly: the tolerance only admits rounding; syy: a patch test is passed exactly: the tolerance only admits rounding; szz: a patch test is passed exactly: the tolerance only admits rounding; sxy: a patch test is passed exactly: the tolerance only admits rounding (stresses of order 1)
  • patch-hex8 (theory): Constant-stress patch test, hex8. Source: Irons and Razzaque, ‘Experience with the patch test for convergence of finite elements’, in Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, pp. 557–587; MacNeal and Harder, Finite Elements in Analysis and Design 1 (1985) 3–20, constant-stress loading, p. 14 Table 7. Tolerances — ux: a patch test is passed exactly: the tolerance only admits rounding; uy: a patch test is passed exactly: the tolerance only admits rounding; uz: a patch test is passed exactly: the tolerance only admits rounding; sxx: a patch test is passed exactly: the tolerance only admits rounding; syy: a patch test is passed exactly: the tolerance only admits rounding; szz: a patch test is passed exactly: the tolerance only admits rounding; sxy: a patch test is passed exactly: the tolerance only admits rounding (stresses of order 1)
  • patch-hex8-incompatible (theory): Constant-stress patch test, hex8-incompatible. Source: Irons and Razzaque, ‘Experience with the patch test for convergence of finite elements’, in Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, pp. 557–587; MacNeal and Harder, Finite Elements in Analysis and Design 1 (1985) 3–20, constant-stress loading, p. 14 Table 7. Tolerances — ux: a patch test is passed exactly: the tolerance only admits rounding; uy: a patch test is passed exactly: the tolerance only admits rounding; uz: a patch test is passed exactly: the tolerance only admits rounding; sxx: a patch test is passed exactly: the tolerance only admits rounding; syy: a patch test is passed exactly: the tolerance only admits rounding; szz: a patch test is passed exactly: the tolerance only admits rounding; sxy: a patch test is passed exactly: the tolerance only admits rounding (stresses of order 1)
  • patch-tet10 (theory): Constant-stress patch test, tet10. Source: Irons and Razzaque, ‘Experience with the patch test for convergence of finite elements’, in Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, pp. 557–587; MacNeal and Harder, Finite Elements in Analysis and Design 1 (1985) 3–20, constant-stress loading, p. 14 Table 7. Tolerances — ux: a patch test is passed exactly: the tolerance only admits rounding; uy: a patch test is passed exactly: the tolerance only admits rounding; uz: a patch test is passed exactly: the tolerance only admits rounding; sxx: a patch test is passed exactly: the tolerance only admits rounding; syy: a patch test is passed exactly: the tolerance only admits rounding; szz: a patch test is passed exactly: the tolerance only admits rounding; sxy: a patch test is passed exactly: the tolerance only admits rounding (stresses of order 1)
  • patch-tet4 (theory): Constant-stress patch test, tet4. Source: Irons and Razzaque, ‘Experience with the patch test for convergence of finite elements’, in Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, pp. 557–587; MacNeal and Harder, Finite Elements in Analysis and Design 1 (1985) 3–20, constant-stress loading, p. 14 Table 7. Tolerances — ux: a patch test is passed exactly: the tolerance only admits rounding; uy: a patch test is passed exactly: the tolerance only admits rounding; uz: a patch test is passed exactly: the tolerance only admits rounding; sxx: a patch test is passed exactly: the tolerance only admits rounding; syy: a patch test is passed exactly: the tolerance only admits rounding; szz: a patch test is passed exactly: the tolerance only admits rounding; sxy: a patch test is passed exactly: the tolerance only admits rounding (stresses of order 1)
  • patch-wedge6 (theory): Constant-stress patch test, wedge6. Source: Irons and Razzaque, ‘Experience with the patch test for convergence of finite elements’, in Aziz (ed.), The Mathematical Foundations of the Finite Element Method, Academic Press 1972, pp. 557–587; MacNeal and Harder, Finite Elements in Analysis and Design 1 (1985) 3–20, constant-stress loading, p. 14 Table 7. Tolerances — ux: a patch test is passed exactly: the tolerance only admits rounding; uy: a patch test is passed exactly: the tolerance only admits rounding; uz: a patch test is passed exactly: the tolerance only admits rounding; sxx: a patch test is passed exactly: the tolerance only admits rounding; syy: a patch test is passed exactly: the tolerance only admits rounding; szz: a patch test is passed exactly: the tolerance only admits rounding; sxy: a patch test is passed exactly: the tolerance only admits rounding (stresses of order 1)
  • pinched-cylinder (benchmark): Pinched cylinder with rigid diaphragms. Source: Belytschko, Stolarski, Liu, Carpenter and Ong, ‘Stress projection for membrane and shear locking in shell finite elements’, Computer Methods in Applied Mechanics and Engineering 51 (1985) 221–258 (the shell obstacle course); reference 1.8248 × 10⁻⁵ under the load. Tolerances — u: a fixed-mesh comparison at the conventional 32 × 32 eighth mesh, the mesh the solver’s own in-code benchmark uses: the reference is the thin-shell value Belytschko et al. quote to four figures (1.8248 × 10⁻⁵), while the deflection under a point load has no mesh-converged limit in a Reissner–Mindlin (MITC4) shell, whose transverse shear force is unbounded at the load, so the value keeps rising with refinement (8 × 8, 16 × 16, 24 × 24, 32 × 32, 48 × 48 and 64 × 64 give 1.3559, 1.6942, 1.7735, 1.8038, 1.8275 and 1.8369 × 10⁻⁵, crossing the reference between 32 × 32 and 48 × 48 and staying above it); 2% is the margin the in-code benchmark gates 32 × 32 with, applied here to the same mesh (crates/solver/tests/benchmarks.rs, README)
  • pinched-hemisphere (benchmark): Hemispherical shell with an 18° hole under alternating point loads. Source: MacNeal and Harder, ‘A proposed standard set of problems to test finite element accuracy’, Finite Elements in Analysis and Design 1 (1985) 3–20, Fig. 9 (p. 9), Table 5(b) (p. 11): 0.0940 (lower bound 0.0924 from their [7]). Tolerances — u: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); the source quotes 0.0940 with a lower bound 0.0924 from their ref. [7]; on the 8 × 8 mesh it is 1.86% low (0.092253), and refinement moves it monotonically towards the reference (16 × 16 1.25%, 32 × 32 0.78%, 64 × 64 0.54% low; 4 × 4 is 7.6% low); v: the symmetric counterpart of u (the same magnitude, along −y), graded by the same source figure (MacNeal and Harder, p. 14; 0.0940, lower bound 0.0924 from their ref. [7])
  • pipe-closed-pressure (theory): Closed pipes under internal pressure: Lamé’s wall stresses, the closed-end axial stress and the thin-wall limit. Source: Lamé’s solution, Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §28; closed-end force and effective tension, C. P. Sparks, J. Energy Resources Technology 106(1):46-54, 1984. Tolerances — hoop_bore: the element evaluates Lamé’s closed form: round-off only; hoop_outside: as hoop_bore; radial_bore: as hoop_bore; axial: the two-node beam is exact for end loads and a uniform initial strain; stretch: as axial; thin_hoop: Lamé’s closed form, which the element evaluates from the pressure alone; the membrane formula p r_m/t = 100 is (t/2r_m)² = 6.25 × 10⁻⁴ below it
  • pipe-poiseuille-interpolated-walls (theory): Hagen–Poiseuille flow in a round pipe with interpolated walls (Bouzidi et al.). Source: Hagen–Poiseuille flow driven by a body force a in a pipe of radius R: u(r) = a (R² − r²) / (4 ν), u_max = a R² / (4 ν); walls by M. Bouzidi, M. Firdaouss, P. Lallemand, Phys. Fluids 13(11):3452–3459, 2001, doi:10.1063/1.1399290. Tolerances — u_max_8: interpolated walls at 8 cells per radius: measured −0.15 %, converging at second order (−0.04 % at 16; the README’s table); a third of the tolerance. Halfway walls read −5.5 % here, so the case fails if the obstacle’s links fall back to halfway bounce-back; u_max_16: interpolated walls at 16 cells per radius: measured −0.04 %, a quarter of the tolerance; halfway walls read −2.1 %
  • pipe-pressure-loop (theory): Pressurised pipe loop between two anchors: thrust, deflection and wall force. Source: closed form by Castigliano’s theorem at the loop’s elastic centre with bending, axial and shear flexibility (Timoshenko members: J. S. Przemieniecki, Theory of Matrix Structural Analysis, McGraw-Hill 1968, §5.6), the pressure acting as the free axial strain (1 − 2ν) A/E of Lamé’s solution with the closed-end force (Timoshenko and Goodier 1970, §28; C. P. Sparks, J. Energy Resources Technology 106(1):46-54, 1984). Tolerances — thrust: the two-node Timoshenko element is exact for end loads and a uniform initial strain; the thrust is 1.1e-3 of the pressure force pair it balances, which amplifies round-off by about 900; corner_x: the two-node Timoshenko element is exact for end loads and a uniform initial strain; the thrust is 1.1e-3 of the pressure force pair it balances, which amplifies round-off by about 900; corner_z: the two-node Timoshenko element is exact for end loads and a uniform initial strain; the thrust is 1.1e-3 of the pressure force pair it balances, which amplifies round-off by about 900; crown_z: the two-node Timoshenko element is exact for end loads and a uniform initial strain; the thrust is 1.1e-3 of the pressure force pair it balances, which amplifies round-off by about 900; run_wall_force: the two-node Timoshenko element is exact for end loads and a uniform initial strain; the thrust is 1.1e-3 of the pressure force pair it balances, which amplifies round-off by about 900; hoop_bore: Lamé’s closed form: the wall stresses follow from the pressure alone, so only round-off remains
  • plastic-hinge-cantilever (theory): Plastic collapse of a cantilever: the fully plastic moment at the root. Source: Limit analysis (B. G. Neal, The Plastic Methods of Structural Analysis, 3rd ed., Chapman & Hall 1977, ch. 1–2): beam theory’s plastic hinge at the root, the fully plastic moment M_p = σ_y b h²/4 of a rectangular section, collapses a cantilever of length L at P_c = M_p/L = 312.5 (b = h = 10, L = 200, σ_y = 250); a bound for the solid, whose collapse lies above it (W. Prager, P. G. Hodge, Theory of Perfectly Plastic Solids, Wiley 1951: a continuum mechanism allows no normal velocity jump, which the beam’s hinge rotation is). Tolerances — collapse_force: the solid’s collapse lies above beam theory’s hinge: refined through the depth (4 to 8 elements) and along the length (40 to 160) the force settles 3.1 % above M_p/L (322.3), so the band is that bound’s gap; the root is a symmetry plane (no rotation, free lateral contraction) held on average through a coupling, the tip pushed through another; reduced hex20, 20 × 2 × 4
  • plastic-thick-cylinder (theory): Elastic–perfectly plastic thick cylinder: plastic zone and collapse pressure. Source: Hill, The Mathematical Theory of Plasticity, Oxford 1950, ch. V §2: a von Mises cylinder in plane strain, elastically incompressible, with the plastic zone a ≤ r ≤ c under the pressure p = k (2 ln(c/a) + 1 − c²/b²), k = σ_y/√3, and the bore displacement u_a = k c²/(2 G a); collapse when c = b at p = 2k ln(b/a). Tolerances — u_bore: 20 reduced quad8 elements through the wall resolve the logarithmic plastic field and ν = 0.4999 stands in for Hill’s incompressible elasticity (0.009 % apart); u_a ∝ c², so 0.2 % on u_a is 0.1 % on the plastic radius; collapse_force: once the wall is plastic through, perfect plasticity holds the force at the collapse value (σ_θ − σ_r = 2k everywhere, σ_z the mean of the others as plastic flow dominates); the band admits the quadrature of the logarithmic field
  • power-law-poiseuille-n0.5 (theory): Plane Poiseuille flow of a power-law fluid, n = 0.5. Source: R. B. Bird, R. C. Armstrong, O. Hassager, Dynamics of Polymeric Liquids, Vol. 1: Fluid Mechanics, 2nd ed., Wiley (1987), §4.2 (the closed-form velocity of a power-law fluid between parallel plates). Tolerances — u_centre: the lattice’s discretisation error: the largest error of the three samples is 1.4e-3 of the peak velocity at 32 cells across, 5.5e-3 at 16 and 9e-4 at 64 (README); 2e-3 of the peak bounds the 32-cell error; u_quarter: the lattice’s discretisation error: the largest error of the three samples is 1.4e-3 of the peak velocity at 32 cells across, 5.5e-3 at 16 and 9e-4 at 64 (README); 2e-3 of the peak bounds the 32-cell error; u_wall: the lattice’s discretisation error: the largest error of the three samples is 1.4e-3 of the peak velocity at 32 cells across, 5.5e-3 at 16 and 9e-4 at 64 (README); 2e-3 of the peak bounds the 32-cell error
  • power-law-poiseuille-n1.5 (theory): Plane Poiseuille flow of a power-law fluid, n = 1.5. Source: R. B. Bird, R. C. Armstrong, O. Hassager, Dynamics of Polymeric Liquids, Vol. 1: Fluid Mechanics, 2nd ed., Wiley (1987), §4.2 (the closed-form velocity of a power-law fluid between parallel plates). Tolerances — u_centre: the lattice’s discretisation error: the largest error of the three samples is 1.3e-3 of the peak velocity at 32 cells across, 3.9e-3 at 16 and 4e-4 at 64 (README); 2e-3 of the peak bounds the 32-cell error; u_quarter: the lattice’s discretisation error: the largest error of the three samples is 1.3e-3 of the peak velocity at 32 cells across, 3.9e-3 at 16 and 4e-4 at 64 (README); 2e-3 of the peak bounds the 32-cell error; u_wall: the lattice’s discretisation error: the largest error of the three samples is 1.3e-3 of the peak velocity at 32 cells across, 3.9e-3 at 16 and 4e-4 at 64 (README); 2e-3 of the peak bounds the 32-cell error
  • pure-bending-coupling (theory): Pure bending through a distributing coupling. Source: Euler–Bernoulli pure bending, σ = M_y z/I, θ = ML/(EI) (exact in elasticity for ν = 0); Timoshenko and Goodier, Theory of Elasticity, 3rd ed., 1970, §102. Tolerances — sigma_top: with ν = 0 pure bending is a quadratic displacement field that hex20 represents exactly; the coupling’s nodal forces are the consistent loads of the linear traction, so the field is exact to the end face; the probe is five depths from it (Saint-Venant); rotation: the reference point follows the best-fit rigid motion of the end section, and the coupling’s nodal forces are the consistent loads of the linear traction, so the field is exact to the end face
  • radiation-lumped-cube (theory): A lumped body cooling by radiation alone: a cube from 1000 K to surroundings at 300 K and to 0 K. Source: The lumped capacitance method with radiation alone, ρ c V dT/dt = −ε σ A (T⁴ − T_sur⁴), integrated in closed form: t = ρ c V / (4 ε σ A T_sur³) {ln|(T_sur + T)/(T_sur − T)| − ln|(T_sur + T₀)/(T_sur − T₀)| + 2 [atan(T/T_sur) − atan(T₀/T_sur)]}, and t = ρ c V / (3 ε σ A) (1/T³ − 1/T₀³) for surroundings at 0 K (F. P. Incropera, D. P. DeWitt, Fundamentals of Heat and Mass Transfer, §5.3, the general lumped capacitance analysis); T(t) solved by bisection to round-off. One hex8 keeps a uniform temperature (each node’s capacity and radiating area are the same eighth), so the finite element model is the lumped body whatever its conductivity. Tolerances — t_room: the time-stepping error, second order in Δt: 0.053, 0.0133 and 0.0033 K at 80, 160 and 320 increments (README); 0.0033 K is 7.5·10⁻⁶ of T, the tolerance leaves a margin; t_space: the time-stepping error at 320 increments, 0.0037 K or 8.6·10⁻⁶ of T, and a margin
  • radiation-plate (theory): A plate cooled by radiation: alone to warm surroundings and to 0 K, and with convection. Source: The steady energy balance of a surface that radiates to large surroundings, q = ε σ (T_s⁴ − T_sur⁴), with convection q = h (T_s − T∞) + ε σ (T_s⁴ − T_sur⁴), and one-dimensional conduction through the plate (F. P. Incropera, D. P. DeWitt, Fundamentals of Heat and Mass Transfer, §1.2.3 and §1.3.1, the surface energy balance). The temperature through the plate is linear, the exact discrete solution of every hex8 mesh; the face temperature is the balance’s root (closed form without convection, bisection to round-off with it). Tolerances — t_cooled_room: exact discrete solution: the temperature is linear through the plate, which every hex8 reproduces, and the radiating face’s balance is solved to the Newton tolerance; t_heated_room: exact discrete solution: the temperature is linear through the plate, which every hex8 reproduces, and the radiating face’s balance is solved to the Newton tolerance; radiated_room: the steady energy balance: everything the heater supplies leaves by radiation; t_cooled_space: exact discrete solution: the temperature is linear through the plate, which every hex8 reproduces, and the radiating face’s balance is solved to the Newton tolerance; t_heated_space: exact discrete solution: the temperature is linear through the plate, which every hex8 reproduces, and the radiating face’s balance is solved to the Newton tolerance; t_cooled_mixed: exact discrete solution: the temperature is linear through the plate, which every hex8 reproduces, and the radiating face’s balance is solved to the Newton tolerance; radiated_mixed: the cooled face’s balance at the exact discrete temperature; the radiation’s share of the 1500 W follows T⁴; convected_mixed: the rest of the 1500 W: the face’s energy balance closes
  • radiation-slab-lattice (theory): A conducting slab on a hot plate radiating through a transparent fluid to its surroundings (lattice conjugate heat transfer). Source: Steady one-dimensional conduction through series thermal resistances with a radiating surface between them: the top cell’s balance (T₀ − T_c)/R₁ = (T_c − T₁)/R₂ + ε σ (T_c⁴ − T_sur⁴) (F. P. Incropera, D. P. DeWitt, Fundamentals of Heat and Mass Transfer, §3.1, the thermal circuit, and §1.3.1, the surface energy balance), with R₁ and R₂ the lattice’s resistances from the hot plate to the slab’s top cell and from it through the fluid to the cold plate; T_c solved by bisection to round-off. Tolerances — t_top_cell: the lattice’s discrete steady state is the series-resistance balance exactly (README), reached to round-off by the end of the run; 8 and 16 cells both match to 10⁻⁹ K; radiated: the same balance; the radiated power is 52 % of what the hot plate supplies
  • rotating-cylinder-axisymmetric (theory): Long rotating solid cylinder, axisymmetric. Source: Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §32 (long rotating cylinder, ε_z = 0). Tolerances — radial_axis: stress extrapolated to the axis, where σ_r = σ_θ: under 1% with sixteen quadratic elements across; hoop_rim: stress extrapolated to the surface: under 1%
  • rotating-disc-plane-stress (theory): Rotating disc with a central hole, plane stress. Source: Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §32 (rotating disc of uniform thickness with a hole). Tolerances — hoop_bore: stress extrapolated to the bore surface, where the a²b²/r² term is steepest: 16 radial quadratic elements graded towards the bore leave about 0.2% (8 uniform: −2.4%; 32 graded: −0.05%); radial_max: the nearest node to √(ab) is within half an element of it, where σ_r is stationary (an error of order (h/r)², under 0.5%), and nodal averaging adds a few tenths of a percent; hoop_rim: as at the bore
  • scordelis-lo-roof-shell (benchmark): Scordelis–Lo roof with shell elements. Source: MacNeal and Harder, ‘A proposed standard set of problems to test finite element accuracy’, Finite Elements in Analysis and Design 1 (1985) 3–20, Fig. 8 (p. 8), Table 5(a) (p. 11); Belytschko, Stolarski, Liu, Carpenter and Ong, ‘Stress projection for membrane and shear locking in shell finite elements’, Computer Methods in Applied Mechanics and Engineering 51 (1985) 221–258 (the shell obstacle course). Tolerances — uz: MacNeal and Harder grade a thin-shell element within 2% of the theoretical value on a prescribed coarse mesh, the grading the sibling case scordelis-lo-roof-solid records (p. 14); this case uses 16 × 16, the mesh the solver’s in-code gate test uses, and the flat MITC4 shell converges from below to the reference: 4 × 4, 8 × 8, 16 × 16, 32 × 32, 64 × 64 and 128 × 128 give 0.28459, 0.29401, 0.29901, 0.30060, 0.30118 and 0.30143, so 16 × 16 is 1.12% low and the mesh error shrinks monotonically inside the tolerance (README)
  • scordelis-lo-roof-solid (benchmark): Scordelis–Lo roof with one layer of hex20 reduced-integration solids. Source: MacNeal and Harder, ‘A proposed standard set of problems to test finite element accuracy’, Finite Elements in Analysis and Design 1 (1985) 3–20: Fig. 8 (p. 8) geometry, material and load; Table 5(a) (p. 11) reference displacement 0.3024; Belytschko et al., Computer Methods in Applied Mechanics and Engineering 51 (1985) 221–258 (shell obstacle course). Tolerances — uz: MacNeal and Harder grade an element A within 2% of the theoretical value on this prescribed coarse mesh (p. 14); MacNeal and Harder normalise by 0.3024 (the deep-shell value quoted in their [5] is 0.3086), and a solid model of R/t = 100 differs from shell theory by O(t/R)
  • shaft-torsion-axisymmetric (theory): Solid circular shaft in torsion, axisymmetric with twist (Saint-Venant). Source: Saint-Venant torsion of a circular shaft, Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, ch. 10. Tolerances — utheta_end: the bilinear element on a rectangle holds u_θ = κ r z and its 2 × 2 rule integrates the forces of τ_zθ exactly, so the result is the closed form (negative: a torque about +Y turns +X toward -Z, u_z = -r kappa y) to the round-off of the solve; tau_surface: the bilinear element on a rectangle holds u_θ = κ r z and its 2 × 2 rule integrates the forces of τ_zθ exactly, so the result is the closed form (negative: a torque about +Y turns +X toward -Z, u_z = -r kappa y) to the round-off of the solve; tau_radial: zero in the closed form; 10⁻⁶ MPa is round-off at a stress of 80 MPa
  • shaft-torsion-hollow-axisymmetric (theory): Hollow circular shaft in torsion, axisymmetric with twist (Saint-Venant). Source: Saint-Venant torsion of a circular shaft, Timoshenko and Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, ch. 10. Tolerances — utheta_end: the eight-node element with straight sides holds u_θ = κ r z and its 3 × 3 rule integrates its forces exactly: round-off; tau_mid_wall: the eight-node element with straight sides holds u_θ = κ r z and its 3 × 3 rule integrates its forces exactly: round-off
  • stefan-two-phase (theory): Two-phase Stefan problem: a liquid frozen from a cold wall (Neumann’s solution). Source: H. S. Carslaw, J. C. Jaeger, Conduction of Heat in Solids, 2nd ed., Oxford 1959, §11.2 (Neumann’s solution); λ solved from its transcendental equation. Tolerances — front: the error at this grid (+0.27 %) plus the change to the next finer grid (0.09 %): the refinement study (README); t_solid: the error at this grid (3.6·10⁻⁴) plus a margin of the same size; at 128 cells the error is below 10⁻⁵: the refinement study (README); t_liquid: the error at this grid (2.2·10⁻³, 0.15 % of the 1.5 range) plus the change to the next finer grid (1.1·10⁻³): the refinement study (README)
  • tension-coupling (theory): Uniform tension through a distributing coupling on the end face. Source: uniform tension, u = F L/(E A), σ = F/A; Timoshenko and Goodier, Theory of Elasticity, 3rd ed., 1970, ch. 1. Tolerances — rp_ux: the coupling’s forces are the consistent loads of the uniform traction, which hex20 carries exactly: round-off only; max_mises: the coupling’s forces are the consistent loads of the uniform traction, which hex20 carries exactly: round-off only
  • thin-wall-series-conduction (theory): Heat through a thin wall between two held plates: a zero-thickness sheet of conductance 0.05 between fluid layers of conductivity 0.05, 1 and 0 at the plates. Source: Series thermal resistances: steady one-dimensional conduction through the fluid layers and the sheet’s resistance 1/G, q = ΔT/(L/k_f + 1/G), each side’s temperature the held plate’s less q times its layer’s resistance (F. P. Incropera, D. P. DeWitt, Fundamentals of Heat and Mass Transfer, §3.1, the composite wall). Tolerances — q: the steady discrete profile is the exact series solution (a linear field either side of the sheet), reached to round-off after five diffusion times L²/α; t_low: the steady discrete profile is the exact series solution (a linear field either side of the sheet), reached to round-off after five diffusion times L²/α; t_high: the steady discrete profile is the exact series solution (a linear field either side of the sheet), reached to round-off after five diffusion times L²/α
  • tie-heat-series (theory): Heat through a tie: two blocks of conductivities 10 and 40 with non-matching meshes, 20 and 100 at the ends. Source: Series thermal resistances: steady one-dimensional conduction through two layers in perfect contact, T_i = (k1 T0 + k2 T1)/(k1 + k2) and q = ΔT/(L1/k1 + L2/k2) (F. P. Incropera, D. P. DeWitt, Fundamentals of Heat and Mass Transfer, §3.1, the composite wall). A linear field in each layer is the exact discrete solution, and the dual mortar tie reproduces a linear temperature across non-matching meshes. Tolerances — t_interface: exact discrete solution: linear in each block, and the tie holds the interface temperature for non-matching meshes; t_lower: exact discrete solution: linear in each block, and the tie holds the interface temperature for non-matching meshes; t_upper: exact discrete solution: linear in each block, and the tie holds the interface temperature for non-matching meshes; q_lower: the heat flow ΔT/(1/k1 + 1/k2) = 640 per unit area, −k ∂T/∂z uniform in each block; q_upper: the same heat flow crosses the tie: nothing is lost at the interface
  • tie-patch (theory): Tie patch test: two blocks with non-matching meshes tied together in uniaxial tension. Source: The patch test for mesh tying: a tie across non-matching meshes must transmit a constant stress exactly; B. I. Wohlmuth, A mortar finite element method using dual spaces for the Lagrange multiplier, SIAM J. Numer. Anal. 38(3):989–1012, 2000; M. A. Puso, A 3D mortar method for solid mechanics, IJNME 59:315–336, 2004. Uniaxial stress between frictionless symmetry planes is uniform in both blocks. Tolerances — szz_10: uniaxial stress E ε = 1000 × 0.01 is the exact discrete solution: the dual mortar conditions hold for the linear field on both meshes; szz_14: uniaxial stress E ε = 1000 × 0.01 is the exact discrete solution: the dual mortar conditions hold for the linear field on both meshes; szz_1: uniaxial stress E ε = 1000 × 0.01 is the exact discrete solution: the dual mortar conditions hold for the linear field on both meshes; szz_19: uniaxial stress E ε = 1000 × 0.01 is the exact discrete solution: the dual mortar conditions hold for the linear field on both meshes; szz_26: uniaxial stress E ε = 1000 × 0.01 is the exact discrete solution: the dual mortar conditions hold for the linear field on both meshes; sxx_14: the tie must not hold the lateral contraction of either mesh; uz_interface: the tied node follows the uniform strain field
  • tube-torsion-coupling (theory): Torsion of a tube through a kinematically coupled reference point. Source: Saint-Venant torsion of a circular tube, φ = TL/(GJ), τ = Tr/J with J = π(b⁴ − a⁴)/2; Timoshenko and Goodier, Theory of Elasticity, 3rd ed., 1970, §104. Tolerances — twist: Saint-Venant torsion of a circular tube is exact in elasticity; the rigid end coupling only stiffens a short zone near the tip; quadratic elements with 16 divisions around are within 0.1%; shear: stress extrapolated to the outer surface and averaged where two blocks meet: about 0.3% with four radial quadratic elements (two gave 1.1%)

Pending cases

Reference values already cited; each case gets its recipe when the capability it needs lands.

CaseKindProblemNeedsReference valuesSource
cylinder-channel-2d1benchmarkFlow around a cylinder, steady 2D-1 (Re = 20)lattice Boltzmann CFD (M12)drag coefficient (published interval 5.57–5.59) = 5.58; lift coefficient (interval 0.0104–0.0110) = 0.0107Schäfer and Turek, ‘Benchmark computations of laminar flow around a cylinder’, Notes on Numerical Fluid Mechanics 52 (1996) 547–566, Table 4 (reference intervals)
explicit-hertz-spherestheoryTwo elastic spheres in a head-on collision: Hertz’s force and contact duration (explicit contact)a graded sphere mesh from commands (a cubed-sphere hex mesher, or tet refinement towards a point); until then the explicit crate’s tests spheres_collide_as_hertz_says (a graded cubed-sphere quarter of each sphere, 27 648 hex8: peak force +2.3%, duration −0.4%) and its coarse twin in the main gate check this case on a mesh generated in codethe largest contact force, two steel spheres R = 10 mm (E = 210 GPa, ν = 0.3, ρ = 7.85 t/m³) meeting at 1 m/s (N) = 1005.4; the contact duration (s) = 6.0163e-5Hertz’s quasi-static impact: with R* = R/2, m* = m/2, E* = E/(2(1 − ν²)), the approach reaches δ = (15 m* v²/(16 E* √R*))^(2/5), the force (4/3) E* √R* δ^(3/2), and the contact lasts 2.9432 δ/v; Hertz, J. reine angew. Math. 92:156–171, 1882; K. L. Johnson, Contact Mechanics, Cambridge 1985, §11.4
heated-square-cylinder-channelbenchmarkHeated square cylinder in a plane channel, steady laminar forced convection (Pr = 0.7, blockage 1/8)the reference values transcribed from the paper’s tables (the paper is not open access; its numbers are not cited until they have been read from it)mean Nusselt number of the cylinder (constant wall temperature) = to be transcribed; mean Nusselt number of the front face = to be transcribed; mean Nusselt number of a side face = to be transcribed; mean Nusselt number of the rear face = to be transcribed; drag coefficient = to be transcribedA. K. Dhiman, R. P. Chhabra and V. Eswaran, ‘Flow and heat transfer across a confined square cylinder in the steady flow regime: effect of Peclet number’, Int. J. Heat Mass Transfer 48 (2005) 4598–4614, doi:10.1016/j.ijheatmasstransfer.2005.04.033 (table to be named when the values are transcribed)
lid-driven-cavity-re100benchmarkLid-driven cavity, Re = 100lattice Boltzmann CFD (M12)u/U at y = 0.4531 on the vertical centreline = -0.2109Ghia, Ghia and Shin, Journal of Computational Physics 48 (1982) 387–411, Table I (u along the vertical centreline)
nafems-le11benchmarkNAFEMS LE11 solid cylinder/taper/sphere under a temperature fieldthermal loads (M8 heat transfer)σ_zz at A = -105NAFEMS, The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990, test LE11 (target σ_zz = −105 MPa at A)
nl-cook-membranebenchmarkCook’s membrane, nearly incompressible neo-Hookean, large load (plane strain)the published finite-strain reference value, transcribed from the paper with its load and material constantsvertical displacement of the top corner C (48, 60) = to be transcribedR. D. Cook, Improved two-dimensional finite element, J. Struct. Div. ASCE 100(ST9):1851–1863, 1974 (the tapered panel (0, 0), (48, 44), (48, 60), (0, 44), clamped on x = 0, shear on x = 48); finite-strain versions with a neo-Hookean material are published by J. C. Simo, F. Armero, IJNME 33:1413–1449, 1992; the values to compare with are to be transcribed from the paper
taylor-barexperimentTaylor bar impact (copper)the measured final shapes, to be transcribed from the paper (explicit Johnson–Cook plasticity is in)final over initial length = to be transcribedWilkins and Guinan, ‘Impact of cylinders on a rigid boundary’, Journal of Applied Physics 44 (1973) 1200–1206 (final length and mushroom diameter vs impact speed)

Capability checklist (reference: Abaqus/CAE)

What an analyst does in a full CAE pre-processor, grouped by milestone, with FieldCraft’s status. Scope comes from the public documentation of Abaqus/CAE and public analyst discussion, described in our own words; nothing was taken from the product itself (AGENTS.md: no commercial products are run, no documentation text is copied). Status: done, started, planned. HEX marks items centred on hexahedral meshing, the core goal.

Where we aim to be better

#OpportunityWhy analysts want itFieldCraft approach
1Hex meshes without manual partitioningPartitioning a part into sweepable cells by hand is the most cited choreSweep and mapped meshing with automatic decomposition that proposes SolidCraft splits (M5); octree all-hex for anything else (M6)
2Undo, redo, replay, crash recoveryNo general undo; replay files are hard to reuse; corrupted model filesEvery action is a journalled command with rollback, undo and redo; autosave with recovery after a crash
3Sets that survive changesSets and loads break when geometry regenerates or is remeshedSets bind to SolidCraft’s persistent face, edge and body names and resolve after meshing (M3)
4An API that is not a bundled scripting runtimeVersion breakage, slow scripts, geometry picked by positionJSON commands over CLI, control channel and MCP
5Located diagnosticsGeneric error messagesErrors name the element, face or keyword; mesh.quality lists failing elements
6Lossless deck round tripUnsupported keywords dropped on importDeck readers keep unknown keywords and write them back (M9)
7Safe, diffable model filesBinary model databases that corrupt or lock to a version.fieldcraft: text, line-diffable definition and journal, checksummed binary mesh, versioned format tag, atomic saves with backup, autosave (M3, done)
8Geometry checked before meshingSlivers and tiny faces fail lateSurface preparation reports defects with their location (M1)
9No size caps, any solverNode limits in learning editions; one solver per toolFree, open source, three deck formats
10Clear step historyLoads and BCs propagate between steps implicitlyAn explicit step × load/BC table (M3)

Checklist

AreaCapabilityMilestoneHEXStatus
GeometryOpen SolidCraft designs, bodies, persistent face names, assemblies placedM1done
GeometryTriangle mesh import as surfaces (3MF with face tags, STL, OBJ, PLY, glTF)M1done
GeometryWeld, closed/manifold/orientation and self-intersection checks, feature edgesM1yesstarted
GeometryPartitions and datums as SolidCraft features (split body/face, construction planes)M5yesplanned
GeometryMidsurface extraction for shellsM8planned
MeshSize field: global, per face and edge seeds, bias, curvature and proximity refinementM2yesplanned
MeshFree tet meshing (tet4, tet10 with mid-side nodes on the geometry)M2started
MeshQuality metrics, certified validity, verify per setM1–M2yesdone (metrics, gate)
Mesh2D quad meshing of facesM5yesstarted (fieldcraft_mesh::quad; mesh.planar: 2D models of a polygon or a planar face, quad4/quad8/tri3/tri6, edges tagged by their neighbouring face)
MeshMapped hex of six-sided regionsM5yesdone (mesh.hex.mapped)
MeshSweep hex (extrusions, revolutions)M5yesdone (mesh.hex.sweep: multi-level extrusions, revolutions, one-to-one sweeps)
MeshAutomatic decomposition into sweepable and mappable regionsM5yesplanned
MeshConforming interfaces, tet–hex transition with pyramidsM5yesplanned
MeshOctree/grid-dual all-hex for any partM6yesplanned
MeshHex-dominant by recombination; polycubeM6yesplanned
MeshSmoothing, untangling, boundary padding, layers through thin wallsM6yesplanned
MeshMesh editing (move, merge, split, collapse, remesh region), imported orphan meshesM6yesstarted (node/element add/remove, merge coincident nodes, duplicate and crack check, renumber)
ModelSets and surfaces bound to geometry namesM3yesdone
ModelMaterials: elastic (isotropic, orthotropic), density, unit-system checkM3done
ModelMaterials: plasticity, hyperelasticity, damage, thermalM8started (von Mises plasticity: bilinear, table, Johnson–Cook; Johnson–Cook damage, erosion; plasticity in explicit and nonlinear static steps; written to Abaqus *PLASTIC, Nastran MATS1, LS-DYNA plastic materials where expressible; compressible neo-Hookean, Mooney–Rivlin and Yeoh for nonlinear steps, Abaqus *HYPERELASTIC, NEO HOOKE, MOONEY-RIVLIN, YEOH; thermal strain in nonlinear steps; two-domain Tait PVT behaviour of polymers, specific volume and density at a temperature and pressure (model.material.pvt, model.material.specific_volume), not yet used by a solver)
ModelSections: solid, shell, beam profiles; assignment by setM3done
Model2D sections: plane stress, plane strain, axisymmetric (XY plane, Y the axis); element edges in sets; centrifugal loadM4done
ModelComposite layups, material orientations, continuum shellsM8yesplanned
ModelElement formulation per region (integration, incompatible modes, hybrid) mapped per solverM3yesdone (model; per-solver mapping with the deck writers)
ModelBoundary conditions: fixed, displacement, symmetryM3done
ModelLoads: force and moment, pressure, gravity, body forceM3done
ModelReference points, kinematic and distributing couplingM3done
ModelSteps: linear static, frequency; output presetsM3done
ModelSteps: nonlinear static, explicit dynamics, heat transfer; amplitudesM7–M8, M15started (nonlinear static with or without nonlinear geometry, increments, tolerances and a load path (cyclic loading), written to Abaqus *STEP, NLGEOM and LS-DYNA implicit (the load path as LS-DYNA’s curve; refused by Abaqus for now), refused by Nastran; explicit dynamics; heat transfer; amplitudes per load planned)
InteractionTie between non-matching meshesM7done (interaction.tie: dual mortar constraints in the implicit analyses, the tie patch test; Abaqus *TIE, LS-DYNA tied contact)
InteractionContact (general and pairs), friction, automatic pair detectionM7, M10started (explicit: pairs, general and self contact, segment to segment with a penalty that keeps the time increment, Coulomb friction with exponential decay, friction on rigid walls, interaction.contact.find, Abaqus and LS-DYNA contact keywords; implicit: mortar contact pairs in nonlinear static steps by an augmented Lagrangian with Coulomb friction, self contact next)
InteractionSprings and dashpots (ground or two-point; DOF, vector or line), point masses with rotary inertiaM4done (implicit; explicit translational; all three decks with what each cannot take reported)
InteractionBolt pretension, connectorsM7planned
DecksAbaqus input writer (deck.write, flat deck; reports what Abaqus cannot express)M3done
DecksNastran bulk data writer (deck.write, SOL 101 or 103 per deck; reports what Nastran cannot express)M3done
DecksLS-DYNA keyword writer (implicit; explicit in M8)M3done (implicit static and eigenvalue; beams as resultant beams with the profile’s properties, except I and box profiles whose shear areas differ by direction)
DecksReaders keeping unknown keywordsM9planned
SolveOwn linear static and modal solver, verified against analytic solutionsM4yesstarted (solid elements: tet4, tet10, wedge6, pyramid5, hex8 (full, incompatible modes), hex20 (full, reduced), hybrid hex8, hex20 and tet10; 2D plane stress, plane strain and axisymmetric tri3, tri6, quad4 (full, incompatible modes), quad8 (full, reduced); quad4/tri3 MITC shells and Timoshenko beams with profiles, mixed with solids; rod2/rod3 trusses, point masses, rotary inertia, springs and dashpots; reference points, kinematic and distributing couplings, moments; centrifugal loads; sparse Cholesky with nested dissection, block Lanczos. The element library’s next 1D and 2D families are #1067–#1073)
SolveOwn nonlinear implicit solver: Newton–Raphson with line search and automatic increments, total Lagrangian solids and 2D elements, mixed u–p at finite strain, follower pressureM15yesstarted (solids, plane strain, axisymmetric; St Venant–Kirchhoff, neo-Hookean and J2 plasticity (Simo’s exponential return map at finite strain, radial return at small strain, consistent tangents, the return shared with explicit dynamics); verified by the elastica, tube inflation, patch and objectivity tests, uniaxial tension to large strain, Hill’s thick cylinder, a cantilever’s collapse and the Bauschinger effect; mortar contact with friction (patch test, Hertz, sliding blocks); Mooney–Rivlin and Yeoh; thermal strain at finite and small strain; a symmetric indefinite LDLᵀ factorization with inertia, Newton through indefinite tangents (hybrid elements at ν = 0.4999 under prescribed displacement); linear buckling of solids (Euler columns, Bryan’s plate) and imperfections from its modes; arc-length with critical points from the inertia (shallow-arch snap-through); shells next)
SolveOwn explicit dynamics solver (central differences, one-point hex8 with hourglass control, nodal-pressure tet4, bulk viscosity, energy balance), verified against analytic wave and impact solutionsM10yesstarted (X1 core and X2: large deformation, objective rates, J2 and Johnson–Cook plasticity, damage, erosion; X3: deformable contact and friction, verified by bar collision, sliding blocks, the contact patch test and Hertz; hyperelastic materials on the shared material point; opt-in mass scaling)
ResultsDeformed shape, contours, mode shapes, probes, reaction sumsM4done (results.* commands: deformed shape to scale, banded contours of displacement, von Mises, principal and component stresses with a legend, mode shapes with their frequencies and animation, probing a node by clicking it, reaction force and moment sums per set, stale results marked after an edit; solve.probe)
ResultsXY and path plots, cuts, display groups, free-body forces, animationM9started (solid-field path plots: typed polyline query, genuine surface picking, reference/deformed overlay, gaps and CSV; remaining postprocessing scope is separate)
ResultsReaders for public result formats (Nastran OP2, LS-DYNA d3plot, Abaqus .fil)M9planned
ResultsMesh convergence studiesM9planned
AppDesktop viewport, model tree, commands, control channelcontinuousdone
AppUndo/redo on the command journal, autosave, .fieldcraft fileM3done
AppMCP server, browser buildcontinuousplanned

Deck notes for the writers

  • Node order: the model stores Abaqus/VTK order. Nastran orders the mid-side nodes of 20-node hexes and 15-node wedges differently; LS-DYNA takes tets and wedges as degenerate hexes and triangles as degenerate quads. Every mapping is tested by the sign of the element Jacobian after writing.
  • Each format’s field widths, continuation rules, number forms and label limits are respected by the writer and checked by golden-file tests on our own examples.
  • Abaqus: the model’s node order and face numbers are Abaqus’s, so connectivity passes through; element types come from the element kind, the section and its formulation (table in crates/decks/src/abaqus.rs). The step table is bridged to Abaqus’s propagation: zero-valued boundary conditions active in every step go to the initial state, and steps restate their boundary conditions and loads with OP=NEW when the active set changes.
  • Nastran (fieldcraft_decks::nastran): entries with a real use large (16-column) fields, the rest small fields; a real is exact when its shortest round-trip form fits 16 columns, else rounded to at least ten significant digits. Linear solids map full integration to PSOLID TWO/THREE + FULL, hex20 reduced to TWO + FULL, hex8 incompatible modes to BUBBLE; one-point reduced linear solids, hybrid solids, reduced-integration or one-point shells, body forces, gravity on part of the model, orthotropic beams and rods, and orthotropic shells off planes of constant Z are reported as unsupported. Static and frequency steps need separate decks (deck.write steps).
  • LS-DYNA (fieldcraft_decks::lsdyna, deck.write {"format": "lsdyna"}): long format (20-column fields; every value with up to 13 significant digits, and 17-digit values from 0.01 to 1e17, are written exactly; the rest is rounded to at least 13 digits and counted). The 10-node tetrahedron follows the manual’s figure: mid-side nodes 8, 9, 10 on edges 2-4, 3-4, 1-4 (the model has them on 1-4, 2-4, 3-4). Incompatible modes map to ELFORM −18 (eight-point enhanced strain). Several steps are written as *CASE analyses. Refused with the item named: beam sections (not yet), body forces per volume, partial-DOF kinematic couplings, constraints on a coupled reference point, gravity on different sets or on parts of sections, hybrid other than tet4, reduced quadratic elements, materials without density, more than 10 shell integration points.
  • 2D models: Abaqus writes CPS*/CPE*/CAX* (3, 6, 4, 4R, 4I, 8, 8R) with the thickness on the *SOLID SECTION line, edge surfaces S1… and BR/BZ body forces for axisymmetric elements; Nastran writes plane stress as membranes (PSHELL with MID1 only, grids holding 3456 through GRID PS) and edge pressures as consistent FORCEs, and refuses plane strain and axisymmetric elements (their cards differ between Nastran dialects); LS-DYNA writes plane stress and plane strain (unit thickness) as *SECTION_SHELL ELFORM 12/13, one-point quad4 (reduced integration, with hourglass control) and tri3, and refuses quadratic 2D elements, full or incompatible-mode quad4 and axisymmetric sections. Centrifugal loads: Abaqus CENTRIF (ω², point, axis), Nastran RFORCE about an axis through the origin, LS-DYNA not yet.
  • Open item (LS-DYNA tet10 node order): the writer follows the manual’s figure (mid-side nodes 8, 9, 10 on edges 2-4, 3-4, 1-4), which disagrees with an earlier reading as the Abaqus order. It needs one confirmation run by a licensed user; agents never run commercial solvers.

Meshing test corpus

Generated by cargo xtask corpus; do not edit. The parts are our own: SolidCraft recipes in tests/corpus/<name>/recipe.json and analytic shapes generated in code (crates/testkit/src/corpus.rs). Each run rebuilds every part, tessellates it at a chordal tolerance of 1e-3 of its bounding-box diagonal and runs every stage on it. Times are wall clock on the machine that ran it; every other column is deterministic on one platform.

Regression gate

Each part’s results are frozen in tests/corpus/<name>/fixture.json (an analytic shape’s directory holds only its fixture), in the oracle’s format (docs/verification.md):

  • stages: every stage’s outcome, compared exactly: ok (with the method, for the hex stage), no: <kind> when the mesher refuses the part (a limit of the method today, such as no structured hex method fitting) or error: <kind>. A part that starts or stops meshing is a change either way.
  • values: the measures. Counts (tetrahedra, slivers, Steiner points, hexes, boundary vertices, genus) have a band of 0; reals (volumes, dihedral angles, radius ratios, scaled Jacobians) a band of 10⁻⁹ of their size plus 10⁻¹², and a relative difference (the enclosed volume against the exact one) 10⁻⁹. On one platform a run is deterministic bit for bit; the bands absorb only last-digit differences of the system maths library. Times are never frozen.
  • platforms: each platform the fixture was blessed on, with what it measures differently. The tessellation of curved faces differs in its last bits between macOS aarch64 and Linux x86_64 (SolidCraft’s tessellation calls the system maths library), and the tet mesher turns that into a different mesh: on curved parts the tetrahedron counts, the smallest dihedral angles and the octree’s scaled Jacobians differ, by far more than a band could allow and still gate anything. That is a determinism bug (#115); until it is fixed each platform is checked against its own results, and a part whose platforms entries are empty measures the same on both. A fix for #115 empties them.

Every tet mesh of the quality stage is also checked on the test side (crates/testkit/src/validity.rs), independently of the mesher’s gate: every tetrahedron positive; every face held by one tetrahedron (boundary) or two on opposite sides (inside); the boundary faces a closed, consistently oriented 2-manifold without a pinched vertex; no tetrahedron joined to the rest by a vertex or an edge only, and one face-connected piece per solid; the mesher’s list of boundary faces equal to the faces held once. The column mesh validity shows the result.

cargo xtask corpus and the heavy test corpus_matches_its_fixtures (CI’s heavy job, on Linux x86_64) fail when a part moves from its fixture, has none, or breaks an invariant.

Blessing

When a change moves a part on purpose, bless it and say in the pull request what moved and why that is right (more tetrahedra from a finer size field, a part that now meshes with the hex sweep). A part that stops meshing or meshes worse is a regression until shown otherwise. A broken invariant is a bug, never a fixture value: blessing does not hide it, and the run fails until the mesher is fixed.

Bless on both platforms, macOS first, then Linux x86_64 in CI. On the Mac:

cargo xtask corpus --bless <name>          # or --bless all; --jobs 4 meshes four parts at once

Push the branch, then bless the same parts on Linux x86_64 with the Corpus bless workflow (.github/workflows/corpus-bless.yml), on the runner and toolchain of CI’s heavy job. It runs cargo run --release -p fieldcraft-testkit --bin corpus -- --bless <name> --jobs N --no-write on the branch (--no-write: this page keeps the Mac’s times), lists what moved in the run’s summary and uploads the fixtures that changed as the artifact corpus-fixtures-linux-x86_64; it pushes nothing. Copy them into the worktree and fold them into the commit that moved the parts:

gh workflow run corpus-bless.yml -R tangency-labs/fieldcraft --ref <branch> -f parts='<name> <name>'  # or all; -f jobs=4
gh run list -R tangency-labs/fieldcraft --workflow corpus-bless.yml --branch <branch> --limit 1
gh run download <run-id> -R tangency-labs/fieldcraft -n corpus-fixtures-linux-x86_64 -D <dir>
cp -R <dir>/tests/corpus/. tests/corpus/

The run fails, after uploading what it blessed, when a part it did not bless moved or a tet mesh broke an invariant. A run that changed nothing uploads no artifact: the parts measure on Linux what their fixtures record.

A bless on a platform the fixture already records rewrites the fixture from that platform alone when its results moved (the other platforms’ results are stale then, and the run there fails until it is blessed there too); a bless on a platform the fixture does not record yet adds what it measures differently. Blessing a part whose results did not move changes nothing.

Results

partcategoriesbodiesfacestrianglestol. mmbuild msenclosed mm³SolidCraft mm³rel. diffexact mm³boundarygenusfeature edgescheck msCDT tetsSteinercavitiestet gateCDT msquality tetsmin dihedral °max dihedral °min radius ratioslivers CDT → meshquality gatemesh validityquality mshexhex elementshex8 min SJhex20 min SJhex msoctree hexesmin SJmean SJhex vol. diffoctree ms
bent-tubesweepable, thin-wall, genus1890680.1216964109.94159.8-1.2e-24159.8ok, 4534 vertices117224.9147461330pass7301898433.4137.20.361222 → 0passok4229sweep4640.9130.969150no: Tube: meshing failed: octree hex meshing failed after 4 builds: the core’s boundary has components of genus [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,84692
bolted-assemblyassembly, blocky32014680.11724533006.332998.92.2e-432998.9ok, 736 vertices0, 1, 12386.02120330pass651323433.1136.00.329230 → 0passok2039extrude4370.5180.518119413480.3230.9592.6e-419566
cantilever-i-beamsweepable, thin-wall11416480.2086361600.061600.0-4.4e-1561600.0ok, 826 vertices05048.13057312204 flat1111129434.2137.90.341129 → 0passok3190extrude4320.3080.308863512200.3080.977-7.9e-1470447
cooling-enclosureblocky, small-feature2126280.060484672.04672.0-5.8e-164672.0ok, 318 vertices0, 01682.7799270pass21772937.7132.90.3709 → 0passok1085extrude4111.0001.000782563440.3210.993-8.9e-1395620
cooling-heat-sinkthin-wall, blocky, sweepable13020260.06018711280.011280.09.7e-1611280.0ok, 1015 vertices058610.74275533116 flat1981022136.7137.60.32771 → 0passok3400extrude10540.9970.9975371658620.0560.9493.2e-4144030
cross-cylindersboolean, sharp1839340.08720332173.032365.8-6.0e-332365.8ok, 1969 vertices02408.9991400pass267967134.1139.20.3055676 → 0passok2731no: Cross: not supported yet: no structured hex method fits this body (extrude: cylindrical face 4 is not parallel to the direction; sweep: from face 5: linking face 0: the shared edges do not form one chain; from face 1: face 6 is reached twice (not13no: Cross: meshing failed: octree hex meshing failed after 4 builds: regions of patches 0 and 3 meet where the part has no curve; regions of patches 0 and 3 meet where the part has no curve; regions of patches 0 and 3 meet where the part has no curve;1211
filleted-bracketfillet, genus, sweepable11120020.08837732168.032144.87.2e-432144.8ok, 999 vertices22168.52827180pass109704433.8136.50.293286 → 0passok1746no: Bracket: not supported yet: no structured hex method fits this body (extrude: cylindrical face 0 is not parallel to the direction; sweep: from face 5: face 3 is parallel to the source and only part of the ring reaches it: the body ends at more than10307010.3010.9631.0e-36362
filleted-bracket-blocksfillet, genus, partitioned3018854260.088147132166.332144.86.7e-432144.8ok, 2773 vertices0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0142023.2692110801 flat23317387131.2138.60.324359 → 0passok17609blocks (30 cells, 45 shared faces)49860.7050.705700634420.1120.9081.1e-318604
i-beamsweepable, thin-wall11416480.2084361600.061600.0-3.8e-1561600.0ok, 826 vertices05048.22799228143 flat1101197736.1138.40.338146 → 0passok4124extrude4320.3080.308793512200.3080.9772.2e-1367933
loft-transitionorganic1618820.0755456303.456370.0-1.2e-3–ok, 943 vertices01564.6269800pass74881934.7138.40.364569 → 0passok1271sweep28730.1540.10945031340.2930.886-2.5e-3646
perforated-plategenus, thin-wall, sweepable13058540.144223426822.326764.22.2e-326764.2ok, 2881 vertices2494932.18111510pass2961395732.7137.60.331245 → 0passok3667extrude9980.6280.6284881853830.1200.9552.5e-345094
pinhole-blocksmall-feature, genus122169000.073170549925.249909.53.1e-449909.5ok, 8420 vertices16650453.9333041370pass102274091517.5159.50.09710869 → 0passok75168extrude52220.4130.534938no: Block: meshing failed: octree hex meshing failed after 4 builds: 4 elements fail the certified validity check; 3 elements fail the certified validity check; 1 elements fail the certified validity check; 1 elements fail the certified validity check49878
rounded-boxfillet12669040.05489523317.623340.8-9.9e-423340.8ok, 3454 vertices064220.41238790pass3592691735.1137.30.3335533 → 0passok6135no: Box: not supported yet: no structured hex method fits this body (extrude: face 0 is curved across the direction; sweep: from face 20: 12 faces are not on the sweep path; from face 23: 12 faces are not on the sweep path; revolve: face 2 is not a23762940.4690.984-1.7e-315930
shallow-groovenear-tangent, boolean183840.0758647802.547781.54.4e-447781.5ok, 194 vertices0981.947520pass16570336.0133.70.39721 → 0passok716extrude19600.9910.98627329260.3030.9205.0e-4667
sharp-wedgesharp, thin-wall, sweepable1510320.083473200.03200.0-1.4e-163200.0ok, 518 vertices02367.91289120pass56241781.4177.60.002131 → 1026passok15518extrude16740.0140.014505no: Wedge: limit reached: the part has walls 0.0104167 thick, which 3 cells across need cells of 0.00347222: 7 levels below a size of 3.30236; or 6 levels below a size of 2.53125; the limits are 4 levels (max_depth) and 500000 cells (max_elements)8
sphere-on-platenear-tangent, boolean1740720.09813869351.269509.7-2.3e-369509.7ok, 2038 vertices06110.24405192pass3761109632.9141.30.291942 → 0passok3271no: Plate: not supported yet: no structured hex method fits this body (extrude: face 6 is curved across the direction; sweep: from face 5: 1 faces are not on the sweep path; from face 0: linking face 6 has no top side; revolve: no axis to try; mapped:14435010.3190.9415.9e-327778
spline-vaseorganic1536940.106121694681.994951.3-2.8e-3–ok, 1849 vertices018210.5681400pass1811181035.9138.80.3213294 → 0passok2907sweep45540.6980.698685435510.3880.926-3.6e-37108
stepped-blockblocky, sharp1141680.0786747000.047000.0-1.5e-1647000.0ok, 84 vertices1820.9266250pass10507439.7131.10.3735 → 0passok642extrude14161.0001.000197567740.0810.9553.0e-646189
thin-ribsthin-wall, blocky12659880.11918832000.032000.03.5e-1532000.0ok, 2996 vertices0146826.6118301276782 flat4846307933.3137.30.322642 → 0passok15557extrude16590.1140.114379no: Plate: limit reached: the part has walls 0.8 thick, which 3 cells across need cells of 0.266667: 3 levels below a size of 4.76252, more than 2655508 grid cells by level 3; or 2 levels below a size of 2.4, more than 1333614 grid cells by level 2; t359
thin-wall-enclosurethin-wall, blocky11114020.10812315564.015564.0-1.1e-1415564.0ok, 703 vertices03426.2209510113pass692874331.6144.60.263533 → 0passok8881extrude17140.7070.7074343no: Enclosure: limit reached: the part has walls 1 thick, which 3 cells across need cells of 0.333333: 3 levels below a size of 4.30813, more than 3941156 grid cells by level 3; or 2 levels below a size of 3, more than 1022976 grid cells by level 2; the l251
analytic-sphereanalytic1151560.06913833400.133510.3-3.3e-333510.3ok, 2580 vertices008.9541040pass4241449133.8140.90.3241271 → 0passok4647no: Sphere: not supported yet: no structured hex method fits this body (extrude: no direction to try; sweep: no planar face to sweep from; revolve: no axis to try; mapped: not a logical cube: 1 faces and 1 edges (6 and 12 needed))1424000.5380.866-1.3e-2632
analytic-torusanalytic, genus1189040.10919837619.637899.3-7.4e-337899.3ok, 4452 vertices1017.93025830pass8422367832.9141.40.32720769 → 0passok6779revolve24750.7740.774422188150.4530.881-1.3e-23584
analytic-cylinderanalytic, sweepable1323080.04910312510.212566.4-4.5e-312566.4ok, 1156 vertices01036.0492651pass118779633.4135.10.3282392 → 0passok1368extrude32000.8500.85047724240.5360.919-1.0e-2446
analytic-pipeanalytic, genus, sweepable1432560.10421994081.494247.8-1.8e-394247.8ok, 1628 vertices12207.9482370pass188734135.8136.00.330277 → 0passok2186extrude12880.9980.998189536800.5270.944-1.6e-38997
analytic-plate-holeanalytic, genus, sweepable176760.2245898469.598429.24.1e-498429.2ok, 338 vertices11643.5988520pass30258833.8137.10.34825 → 0passok487extrude5020.6500.6281891636800.3090.9894.3e-426297

Categories

categorystressesparts
thin-wallwalls thin against the part’s size8
small-featurefeatures much smaller than the part2
filletblends between faces3
genusthrough holes (genus > 0)8
sharpsharp edges and acute dihedral angles3
near-tangentfaces meeting at a shallow angle2
booleanintersection curves from booleans3
sweepableextrusions and sweeps (one-to-one sweep meshing)10
blockyaxis-aligned blocks (polycube-friendly)6
organicfree-form, lofted or revolved spline surfaces2
assemblyseveral bodies placed by component transforms1
partitionedsplit into cells that each mesh as a mapped block (conforming multi-block hex)1
analyticclosed-form geometry for solver verification5

Parts

  • bent-tube: A 10 mm tube with a 1 mm wall, bent through R30: a thin-walled sweep along a line-arc-line path.
  • bolted-assembly: A base plate with a clamp block component placed twice, once turned 90 degrees: bodies placed by component transforms.
  • cantilever-i-beam: The 200 mm I-beam of i-beam lying along X with its web upright (Z up): a sweep along a horizontal axis, and the cantilever of the README demo.
  • cooling-enclosure: A 40 x 44 mm PCB, 2 mm thick, standing upright with a 16 x 6 x 12 mm chip on its face, as two bodies: the natural-convection cooling sample’s parts (docs/examples.md).
  • cooling-heat-sink: A 40 x 40 mm heat sink, a 3 mm base with six 1.5 mm fins 18 mm tall at a 6 mm pitch: thin, closely spaced fins on a plate (the forced-convection cooling sample, docs/examples.md).
  • cross-cylinders: Two orthogonal R10 cylinders joined: equal radii, so the intersection curves cross at two singular points.
  • filleted-bracket: An 8 mm L-bracket with an R6 inside fillet and a hole through each leg: a blend beside holes.
  • filleted-bracket-blocks: The filleted bracket split into 30 cells with SolidCraft’s Split Body (three slabs across its width, the corner halved along its diagonal, an O-grid of four cells round each hole) so that every cell is a mapped block: conforming multi-block hex meshing.
  • i-beam: A 200 mm I-beam with 3 mm flanges and a 2 mm web: a long sweepable prism with thin walls.
  • loft-transition: A 40 mm square lofted to an R15 circle 50 mm above: a ruled free-form surface between unlike sections.
  • perforated-plate: A 3 mm plate perforated by a 6 x 4 grid of 6 mm holes: genus 24 in a thin sheet.
  • pinhole-block: A 50 mm block drilled through by sixteen 0.6 mm pinholes: features 80 times smaller than the part, genus 16.
  • rounded-box: A 40 x 30 x 20 box with every edge rounded R3: cylinder and sphere blends meeting at the corners.
  • shallow-groove: A block with a 0.5 mm deep groove cut by an R30 cylinder: groove walls 10 degrees off the top face.
  • sharp-wedge: A wedge whose faces meet at under 3 degrees: a sharp edge with a needle-thin cross-section.
  • sphere-on-plate: A sphere sunk 0.1 mm into a plate: the faces meet at under 6 degrees around a 2 mm circle.
  • spline-vase: A vase revolved from a spline profile: doubly curved faces of varying curvature around a closed axis.
  • stepped-block: Three stacked blocks with a slot cut through the base: axis-aligned steps for polycube and octree meshers.
  • thin-ribs: A 4 mm plate carrying five 0.8 mm ribs 20 mm tall: thin walls standing on a thicker base.
  • thin-wall-enclosure: An 80 x 60 x 40 box shelled to 1 mm walls, open on top: thin walls over a large span.
  • analytic-sphere: Sphere r 20: curvature everywhere, no edges.
  • analytic-torus: Torus 30/8: genus 1 with doubly curved faces and no edges.
  • analytic-cylinder: Cylinder r 10, h 40: the round bar of beam and torsion checks.
  • analytic-pipe: Thick-walled pipe 20/30, length 60: the Lamé cylinder.
  • analytic-plate-hole: Plate 200 x 100 x 5 with a 20 mm hole: the Kirsch plate.

The meshing skill on the corpus and the samples

Generated by cargo xtask skill-results; do not edit. Each part is meshed by following the meshing skill with today’s commands, headless, as an agent over MCP would (crates/testkit/src/skill.rs): geometry.bodies, geometry.features, mesh.plan and geometry.check at the plan’s size, mesh.plan.apply (which meshes one cell of a mirror-symmetric body and mirrors it), and where the plan fails the skill’s fallbacks in order, mesh.hex.generate, mesh.hex.project (sphere template) and then mesh.tet.generate (tet10); the cells of a split part are joined with mesh.node.merge; then mesh.quality.mark at the skill’s limits (scaled Jacobian ≥ 0.3, edge ratio ≤ 10), mesh.node.relax round each marked element when at most 20 are marked (more is a clustered failure: the blocks are wrong, and relaxing is not the fix), mesh.quality.mark again, mesh.quality and mesh.check.duplicates. Sizes are the plan’s (1/25 of the body’s diagonal, 2 layers through a shell).

Columns: method is what meshed the part (plan (project|cells|sweep) is the skill’s target, anything else a fallback); symmetry the mirror planes mesh.plan.apply used; volume error the mesh’s volume against the geometry’s; untagged faces B-rep faces no element face is tagged with (a set on them finds nothing); marked the elements failing the limits before and after relaxing, and what relaxing changed; ¹ a tet mesh has no edge ratio: its largest aspect ratio stands in; duplicates coincident nodes and cracks; geometry.check its findings at the size; verdict pass when the minimum scaled Jacobian and the largest edge ratio meet the limits and the volume is within 1 % (pass (fallback) when a fallback meshed it). The section pictures cut each part through the middle of its longest side, marked elements red. Times are wall clock on the machine that ran it.

Results

partmethodsymmetryelementsmin SJmean SJmax edge ratio¹volume erroruntagged facesmarked → after relaxduplicatesgeometry.checktime sverdictsection
bent-tubeplan (sweep)–22272 (22272 hex8)0.9980.9981.4-2.8e-300 (not relaxed)none–3.7passy=37.500
bolted-assemblyplan (sweep), mesh.hex.generate (auto)–6272 (6272 hex8)0.5830.9393.62.0e-400 (not relaxed)8 coincident, 0 cracks–3.7passx=50.000
cantilever-i-beamplan (sweep)–61600 (61600 hex8)1.0001.0001.00.0e000 (not relaxed)none–8.5passx=100.000
cross-cylindersnone––––––––––27.2no mesh–
filleted-brackettet10–19991 (19991 tet10)0.3180.5644.1-6.8e-600 (not relaxed)none–15.1pass (fallback)x=30.000
filleted-bracket-blocksplan (sweep)–75410 (75410 hex8)0.7040.9543.53.7e-500 (not relaxed)none (after merging 2348 nodes)–6.9passx=30.000
i-beamplan (sweep)–61600 (61600 hex8)1.0001.0001.00.0e000 (not relaxed)none–4.5passz=100.000
loft-transitionplan (sweep)–2873 (2873 hex8)0.1890.9591.7-2.1e-304 → 4 (4 relaxed, 0 undone; min SJ 0.189 → 0.189, max ratio 1.7 → 1.7)none–0.9fail (SJ)z=25.000
perforated-plateplan (project)2 plane(s)8576 (8576 hex8)0.7070.8883.07.7e-400 (not relaxed)none–9.5passx=60.000
pinhole-blockplan (project)2 plane(s)40768 (40768 hex8)0.7070.9848.08.1e-500 (not relaxed)none–25.5passy=25.000
rounded-boxplan (project)2 plane(s)11520 (11520 hex8)0.7170.9734.0-4.1e-300 (not relaxed)none–8.7passx=20.000
shallow-grooveplan (sweep)–1960 (1960 hex8)0.9910.9991.12.7e-400 (not relaxed)none–0.2passx=30.000
sharp-wedgeplan (sweep)–1674 (1674 hex8)0.0140.301149.62.7e-1501524 (not relaxed)none–0.2fail (SJ, ratio)x=40.000
sphere-on-platetet10–25613 (25613 tet10)0.3350.6074.4-8.8e-500 (not relaxed)none–7.7pass (fallback)y=0.000
spline-vaseplan (sweep)–4536 (4536 hex8)0.6650.9459.9-6.6e-300 (not relaxed)none–2.3passz=-35.000
stepped-blockplan (cells)–1416 (1416 hex8)1.0001.0001.3-4.8e-1500 (not relaxed)none–1.6passx=30.000
thin-ribsplan (sweep)–301308 (301308 hex8)0.9991.0001.3-3.4e-1200 (not relaxed)none–34.7passx=50.000
thin-wall-enclosureplan (sweep)–124512 (124512 hex8)1.0001.0001.00.0e000 (not relaxed)none–13.5passx=40.000
analytic-spheremesh.hex.project (sphere)–3400 (3400 hex8)0.7280.9683.3-1.1e-200 (not relaxed)none–8.8fail (volume)z=0.000
analytic-torusplan (sweep)–48360 (48360 hex8)0.8370.9862.9-4.2e-300 (not relaxed)none–9.8passx=0.000
analytic-cylinderplan (project)–4347 (4347 hex8)0.8590.9852.4-4.9e-300 (not relaxed)none–7.3passz=20.000
analytic-pipeplan (project)–2244 (2244 hex8)0.9970.9971.3-3.3e-300 (not relaxed)none–3.6passz=30.000
analytic-plate-holeplan (project)–5856 (5856 hex8)0.9370.9963.04.3e-500 (not relaxed)none–4.7passx=100.000
crank-armplan (project)–4014 (4014 hex8)0.5780.9335.8-8.4e-400 (not relaxed)none4 short_edge, 2 sliver_face21.7passx=81.000
upright-bracketplan (sweep)–1364 (1364 hex8)0.7070.9683.12.1e-400 (not relaxed)none–0.1passx=30.000
pi5-baseplan (project)1 plane(s)29852 (29852 hex8)0.6830.9694.9-3.0e-300 (not relaxed)none8 short_edge, 4 sliver_face131.2passx=56.000
pi5-lidplan (project)–5130 (5130 hex8)0.7240.8683.9-2.9e-400 (not relaxed)none–10.5passx=56.000
cupplan (project)–1258 (1258 hex8)0.7020.9295.0-3.5e-300 (not relaxed)none–3.0passx=5.000
plain-cupmesh.hex.generate (auto)–2000 (2000 hex8)0.8200.9954.7-2.3e-300 (not relaxed)none–1.3pass (fallback)x=0.000

Why a part fails

Each earlier method’s error, in the order the skill tries them, and for a part that fails the limits the cause read from its numbers and section picture.

  • bolted-assembly (corpus: A base plate with a clamp block component placed twice, once turned 90 degrees: bodies placed by component transforms.):
    • Clamp body: mesh.plan.apply: mesh plan Plan-Clamp_body: the projected layout does not mesh: invalid input: node 3076 at [11.000000000000004, 10.0, 5.0] lies on the edge between nodes 2640 and 2715: new elements must meet the mesh face to face, with the same divisions…
    • Clamp body (Clamp:2): mesh.plan.apply: mesh plan Plan-Clamp_body__Clamp_2_: the projected layout does not mesh: invalid input: node 5884 at [66.42857142857143, 5.000000000000001, 5.0] lies on the edge between nodes 984 and 1059: new elements must meet the mesh face to face, wi…
  • cross-cylinders (corpus: Two orthogonal R10 cylinders joined: equal radii, so the intersection curves cross at two singular points.):
    • Cross: mesh.plan.apply: mesh plan Plan-Cross: the cells [“Cross”] (cuts []) do not mesh all-hex: body Cross: invalid boundary surface: 28 defects; triangles 142 and 254 are oriented inconsistently across edge 0–396 at (-15.488656021315903, 4.577998041166734, 7…
    • Cross: mesh.hex.generate: body Cross: invalid boundary surface: 28 defects; triangles 146 and 258 are oriented inconsistently across edge 0–402 at (-15.488656021315903, 4.577998041166734, 7.853092194999726); triangles 255 and 258 are oriented inconsistently across…
    • Cross: mesh.hex.project (sphere): body Cross: invalid boundary surface: 28 defects; triangles 146 and 258 are oriented inconsistently across edge 0–402 at (-15.488656021315903, 4.577998041166734, 7.853092194999726); triangles 255 and 258 are oriented inconsistently across…
    • Cross: mesh.tet.generate: invalid boundary surface: 28 defects; triangles 76 and 78 are oriented inconsistently across edge 9–230 at (-18.75000000000002, 5.634596901641276, 7.632255089815496); triangles 77 and 78 are oriented inconsistently across edge 9–232 at (-15…
    • no mesh: the boundary tessellation of the joined cylinders is invalid (inconsistent orientation at the two singular points), so every mesher refuses the body.
  • filleted-bracket (corpus: An 8 mm L-bracket with an R6 inside fillet and a hole through each leg: a blend beside holes.):
    • Bracket: mesh.plan.apply: mesh plan Plan-Bracket: the cells [“Bracket”] (cuts []) do not mesh all-hex: body Bracket: not supported yet: no structured hex method fits this body (extrude: cylindrical face 8 is not parallel to the direction; sweep: from face 1: lin…
    • Bracket: mesh.hex.generate: body Bracket: not supported yet: no structured hex method fits this body (extrude: cylindrical face 8 is not parallel to the direction; sweep: from face 1: linking face 6 has 2 boundary loops (periodic or holed linking faces are not swept…
    • Bracket: mesh.hex.project (sphere): body Bracket: meshing failed: 91 of 5104 elements are inverted, twisted or degenerate after projection (certified Jacobian; smallest corner scaled Jacobian -0.760): block 1 cell [3, 3, 0] near (12.519, 11.405, 1.604); block 1 cell [3, 4, …
  • loft-transition (corpus: A 40 mm square lofted to an R15 circle 50 mm above: a ruled free-form surface between unlike sections.):
    • fail (SJ): the lofted sides are swept one to one, and the elements where the section changes shape are skewed (min SJ 0.19). Relaxing the four marked elements did not raise it: the blocks are wrong, not the nodes (§6.3). A loft has no template yet (unmapped).
  • sharp-wedge (corpus: A wedge whose faces meet at under 3 degrees: a sharp edge with a needle-thin cross-section.):
    • fail (SJ, ratio): the wedge’s sharp edge is swept as hex, so every element tapers to it (min SJ 0.01, edge ratio 150). A column of wedge6 at the edge (§4) raises the SJ but not the ratio: any element with a corner on a 2.9° edge has sides at least 1/tan 2.9° ≈ 20 times its width there, twice the limit. The edge has to be blunted (defeatured) or the limit waived along it.
  • sphere-on-plate (corpus: A sphere sunk 0.1 mm into a plate: the faces meet at under 6 degrees around a 2 mm circle.):
    • Plate: mesh.plan.apply: mesh plan Plan-Plate: the cells [“Plate”] (cuts []) do not mesh all-hex: body Plate: not supported yet: no structured hex method fits this body (extrude: face 6 is curved across the direction; sweep: from face 0: 6 faces are not on the …
    • Plate: mesh.hex.generate: body Plate: not supported yet: no structured hex method fits this body (extrude: face 6 is curved across the direction; sweep: from face 0: 6 faces are not on the sweep path; from face 5: linking face 11 has 2 boundary loops (periodic or …
    • Plate: mesh.hex.project (sphere): body Plate: meshing failed: the mesh volume 32917.42909007507 is far from the body’s 69353.30815403847: the blocks do not cover the part (every outer block face must stand for part of its surface)
  • analytic-sphere (corpus: Sphere r 20: curvature everywhere, no edges.):
    • Sphere: mesh.plan.apply: mesh plan Plan-Sphere: the cells [“Sphere”] (cuts []) do not mesh all-hex: body Sphere: not supported yet: no structured hex method fits this body (extrude: no direction to try; sweep: no planar face to sweep from; revolve: no axis to t…
    • Sphere: mesh.hex.generate: body Sphere: not supported yet: no structured hex method fits this body (extrude: no direction to try; sweep: no planar face to sweep from; revolve: no axis to try; mapped: meshing failed: meshing failed: mesh validity gate: 8 inverted or…
    • fail (volume): no structured method takes a sphere (it has no face to sweep from or axis to revolve about), so the plan does not apply and the fallback’s sphere template meshes it at the plan’s size (2.45 mm, which keeps a sphere’s chords to 0.75 % on paper), 1.1 % short of the volume: the template’s elements at the cube’s eight corners span more of the sphere than the size. A sphere template in the plan (§3) would size its caps; hex20 (order: 2) closes it too.
  • plain-cup (the cup without its handle (#418)):
    • Cup: mesh.plan.apply: mesh plan Plan-Cup: the projected layout does not mesh: body Cup: meshing failed: the mesh volume 5012.205781249979 is far from the body’s 16760.91944296662: the blocks do not cover the part (every outer block face must stand for part o…

Parts

  • bent-tube: corpus: A 10 mm tube with a 1 mm wall, bent through R30: a thin-walled sweep along a line-arc-line path.
  • bolted-assembly: corpus: A base plate with a clamp block component placed twice, once turned 90 degrees: bodies placed by component transforms.
  • cantilever-i-beam: corpus: The 200 mm I-beam of i-beam lying along X with its web upright (Z up): a sweep along a horizontal axis, and the cantilever of the README demo.
  • cross-cylinders: corpus: Two orthogonal R10 cylinders joined: equal radii, so the intersection curves cross at two singular points.
  • filleted-bracket: corpus: An 8 mm L-bracket with an R6 inside fillet and a hole through each leg: a blend beside holes.
  • filleted-bracket-blocks: corpus: The filleted bracket split into 30 cells with SolidCraft’s Split Body (three slabs across its width, the corner halved along its diagonal, an O-grid of four cells round each hole) so that every cell is a mapped block: conforming multi-block hex meshing.
  • i-beam: corpus: A 200 mm I-beam with 3 mm flanges and a 2 mm web: a long sweepable prism with thin walls.
  • loft-transition: corpus: A 40 mm square lofted to an R15 circle 50 mm above: a ruled free-form surface between unlike sections.
  • perforated-plate: corpus: A 3 mm plate perforated by a 6 x 4 grid of 6 mm holes: genus 24 in a thin sheet.
  • pinhole-block: corpus: A 50 mm block drilled through by sixteen 0.6 mm pinholes: features 80 times smaller than the part, genus 16.
  • rounded-box: corpus: A 40 x 30 x 20 box with every edge rounded R3: cylinder and sphere blends meeting at the corners.
  • shallow-groove: corpus: A block with a 0.5 mm deep groove cut by an R30 cylinder: groove walls 10 degrees off the top face.
  • sharp-wedge: corpus: A wedge whose faces meet at under 3 degrees: a sharp edge with a needle-thin cross-section.
  • sphere-on-plate: corpus: A sphere sunk 0.1 mm into a plate: the faces meet at under 6 degrees around a 2 mm circle.
  • spline-vase: corpus: A vase revolved from a spline profile: doubly curved faces of varying curvature around a closed axis.
  • stepped-block: corpus: Three stacked blocks with a slot cut through the base: axis-aligned steps for polycube and octree meshers.
  • thin-ribs: corpus: A 4 mm plate carrying five 0.8 mm ribs 20 mm tall: thin walls standing on a thicker base.
  • thin-wall-enclosure: corpus: An 80 x 60 x 40 box shelled to 1 mm walls, open on top: thin walls over a large span.
  • analytic-sphere: corpus: Sphere r 20: curvature everywhere, no edges.
  • analytic-torus: corpus: Torus 30/8: genus 1 with doubly curved faces and no edges.
  • analytic-cylinder: corpus: Cylinder r 10, h 40: the round bar of beam and torsion checks.
  • analytic-pipe: corpus: Thick-walled pipe 20/30, length 60: the Lamé cylinder.
  • analytic-plate-hole: corpus: Plate 200 x 100 x 5 with a 20 mm hole: the Kirsch plate.
  • crank-arm: sample crank-arm: the 170 mm bicycle crank, mirror symmetric across y = 0
  • upright-bracket: samples drop-test, flow-past: the upright L-bracket
  • pi5-base: the Raspberry Pi 5 enclosure’s base: a shelled box with fillets and standoffs
  • pi5-lid: the Raspberry Pi 5 enclosure’s lid
  • cup: the cup with a handle of #418
  • plain-cup: the cup without its handle (#418)

Architecture

FieldCraft turns geometry into finite element models, writes them for the solvers engineers already use, and solves linear problems itself.

SolidCraft B-rep ──tessellate──▶ boundary surface ──▶ volume mesh ──▶ FE model ──▶ Abaqus .inp
 (solidcraft-kernel)           (welded, watertight,   tet (Delaunay)   materials,     Nastran .bdf
                                face-tagged)          hex (core goal)  sections,      LS-DYNA .k
                                                                       BCs, loads,  ──▶ own linear
                                                                       steps            solver

Crates and layers

cargo xtask layers enforces the table in xtask/src/layers.rs: a crate may depend only on crates in strictly lower layers.

LayerCrateRoleStatus
L0fieldcraft-modelSolver-neutral FE model: nodes and elements by label, their geometry tags, sets, materials, sections, couplings, BCs, loads and steps, the model check and the resolved view the writers read. Knows no file format and no geometry type.started
L0fieldcraft-parallelDeterministic data parallelism for the solvers: fixed work partitions on a rayon pool, results in block order, the thread-count setting (FIELDCRAFT_THREADS, threads); sequential in the browser. No workspace dependencies.started
L1fieldcraft-geometryThe only door to SolidCraft: opens .solidcraft designs (rebuilt from their timeline, bodies with persistent face names), B-rep bodies, measures, tessellation into a face-tagged SurfaceMesh; what FieldCraft opens follows SolidCraft’s format table (formats); triangle files (STL, OBJ, PLY, glTF through SolidCraft’s mesh readers, triangles) and face-tagged 3MF files read into the same type, as surfaces that are never volume-meshed (docs/formats/tagged-mesh.md). No SolidCraft type in its API.started
L1fieldcraft-meshSurface preparation (weld, watertightness, feature edges), robust predicates, Delaunay tetrahedralization and refinement, Voronoi-based optimization, hex meshing, quality metrics.started
L1fieldcraft-femElement kernels shared by every structural solver: the element table (tet4, tet10, wedge6, hex8 full and incompatible modes, hex20 full and reduced), shape functions, quadrature, element stiffness, consistent and lumped mass, body and pressure loads, stresses and their extrapolation, isotropic and orthotropic elasticity, the uniform-strain (one-point) hex8 and tet4 kinematics, hourglass shape vectors and element frequency bounds of the explicit solver, objective stress rates and J2/Johnson–Cook return mapping. Pure functions, no solver loop.started
L1fieldcraft-decksAbaqus input, Nastran bulk data and LS-DYNA keyword readers and writers, to and from model. Text out, no file system; deck.write saves it.started
L1fieldcraft-renderDisplay data without a GPU dependency: the visible faces, element edges and nodes of a model, the orbit camera, a CPU rasterizer for headless snapshots, geometry surfaces with their face boundaries, deformed shapes and banded contour plots of nodal results, slices, surface values and streamlines of flow fields on grids of cells, picking.started
L2fieldcraft-solverImplicit solver: assembly from the resolved model, boundary conditions, sparse direct solution, linear static and modal analysis, stresses and reactions.started
L2fieldcraft-fcmFinite cell solver: a linear static step of one body on a Cartesian background grid, with no body-fitted mesh. Integrated Legendre shape functions of degree 1 to 8 on the cells that hold material, cut cells integrated exactly from the surface’s triangles, supports imposed weakly by Nitsche’s method, cut-or-not and inside-or-outside decided by exact predicates. Uses mesh for the boundary surface and the predicates and solver for the sparse matrix, the ordering and the Cholesky factorization. A library so far: no command reaches it yet.started
L2fieldcraft-explicitExplicit dynamics: central-difference time integration with lumped mass, one-point hex8 with hourglass control, nodal-pressure tet4, bulk viscosity, rigid walls, large deformation with objective rates, plasticity, damage and erosion, energy account, histories and field frames.started
L2fieldcraft-lbmLattice Boltzmann flow solver on the CPU: D3Q19 two-relaxation-time or recursive regularized scheme, bounce-back and slip walls, Zou–He inlets and outlets, convective outlets, obstacles voxelised from the face-tagged surface with exact predicates, momentum-exchange forces per face; a D3Q7 temperature lattice carried by the flow (held temperatures, heat fluxes, adiabatic faces, Boussinesq buoyancy, the heat into every face) and conjugate heat transfer: conduction through the obstacles that conduct, coupled to it at their faces. Uses mesh for the predicates and the boundary surface.started
L3fieldcraft-fsiFluid–structure coupling between the L2 solvers (later).planned
L4fieldcraft-docThe document: geometry, mesh, model, results, history.planned
L5fieldcraft-io.fieldcraft files (docs/formats/fieldcraft.md): text model definition, binary mesh, geometry references with content hashes, the journal; atomic saves; autosave storage for crash recovery; read and write roots that confine an automation client’s file access (roots). Bytes in, bytes out; the file system only in fs, recovery and roots (in the browser, files kept in memory: memory). Result files later.started
L6fieldcraft-engineCommands (CommandSpec), Session::execute with rollback and the panic guard, scripts; every file a command names checked against the session’s roots (Session::file_access); headless pictures of the session (view: model, geometry, deformed shape and contours on the CPU rasterizer).started
L7fieldcraft-gpuThe viewport’s GPU pipelines (lit faces, wide lines, MSAA, depth) without a window toolkit, the adapter policy (FIELDCRAFT_GPU: hardware GPU, software GPU, CPU rasterizer) and offscreen pictures (fieldcraft-cli snapshot). The window draws through the same pipelines.started
L7fieldcraft-lbm-gpuThe lattice Boltzmann solver’s GPU backend: the CPU scheme’s step (TRT or regularized collision with Guo forcing, the per-link wall rules, Zou–He boundaries and convective outlets, momentum exchange, and the temperature lattice with its wall conditions, buoyancy and heat exchange, and the conducting solids with their implicit interface links) as wgpu compute shaders, driven through lbm‘s Backend trait from the flow the CPU prepared; single precision, one population buffer streamed in place (the AA pattern, docs/manual/fluid/gpu.md), deterministic per device, checked against the CPU within its tests’ tolerances; opt-in per solve (solve.fluid with backend: "gpu"). Opens its device with gpu’s adapter policy.started
L7fieldcraft-mesh-gpuProjection smoothing’s GPU device: the coloured Winslow sweeps’ interior nodes (Winslow’s update or the neighbour mean, the guarded step on the scaled Jacobian and edge ratio around the node) as a wgpu compute shader, driven colour by colour through mesh’s sweep device while the host moves the boundary nodes on the geometry; single precision about the mesh’s centre, deterministic per device, the same verdicts as the CPU’s coloured sweeps with a smallest scaled Jacobian within 0.02 of theirs; opt-in per projection (mesh.hex.project with backend: "gpu"). Opens its device with gpu’s adapter policy.started
L7fieldcraft-ui-egui, fieldcraft-mcpDesktop UI in the Craft family’s layout, drawn with SolidCraft’s UI kit (title bar with quick actions, workspace ribbon from the catalogue, browser, viewport with navigation bar and orientation gizmo, context panel, command search, status messages as view toasts and an optional status bar, the History card; native file pickers as host services, background opening and solving; results display with legend and probe; offscreen capture of the whole window) and control channel requests (docs/control-protocol.md); MCP server over stdio (docs/mcp.md): tools over engine commands, a headless session or the running app through its control channel, read and write roots.ui, mcp started
testkitfieldcraft-testkitTest tooling, a dev-dependency only: the meshing test corpus (tests/corpus/*/recipe.json, analytic shapes) and its runner (cargo xtask corpus).started
appsfieldcraft, fieldcraft-cli, fieldcraft-webDesktop, command line, browser (docs/web.md).started

Rules beyond the layer order:

  • Nothing below L7 uses egui, eframe, winit, wgpu or rfd.
  • Only fieldcraft-geometry uses solidcraft-* and solidcore*, pinned by tag in the workspace Cargo.toml (“SolidCraft pin” below). One exception (owner decision, 2026-11-10): fieldcraft-ui-egui uses SolidCraft’s UI kit and look, solidcraft-ui-kit, solidcraft-theme and solidcraft-look, with the kit’s widget registry solidcraft-ui-registry, message catalogues solidcraft-ui-text, and panel layout core solidcraft-panel-layout, and nothing else of SolidCraft’s.
  • Everything below the apps builds for wasm32-unknown-unknown.
  • fieldcraft-geometry’s non-default scripts feature builds designs from SolidCraft command scripts (script_design, through solidcraft-engine) for the test corpus; the library opens designs without it.

Opening a STEP or IGES source uses SolidCraft’s in-memory import feature in fieldcraft-geometry. SolidCraft places each product occurrence and supplies body and face identities. The original CAD file is the geometry source referenced (or embedded) by the model. Reopening a revised file goes through the usual geometry reconciliation. A native open runs on the same background job as opening a SolidCraft design.

SolidCraft pin

solidcraft-* come from https://github.com/tangency-labs/solidcraft (formerly bherbruck/solidcraft, which redirects there), pinned in the workspace Cargo.toml by tag = "v0.51.0" (SolidCraft’s release, which contains the relicence 615a4adc1f) on every SolidCraft git line: the solidcraft-* and solidcore-* crates and the patches. They must all name the same commit, so they resolve to one; Cargo.lock records it. A bare commit needs an explicit owner exception, recorded beside the pin. The pin lines and the comments there name the tag, so a repin changes them together (docs/releasing.md, “Repinning SolidCraft”). From v0.40 SolidCraft’s modelling kernel is solidcore (Apache-2.0, a Rust port of NVIDIA’s SMLib), which replaced the truck crates; SolidCraft vendors it in its repository (solidcore/). SolidCraft’s API takes and gives solidcore’s records (Vec3, Plane, Region2, …), so fieldcraft-geometry also depends on solidcore-record and solidcore-tess, from SolidCraft’s repository at the same commit: bump them together, or the build carries two copies of them whose types do not match. The desktop UI draws with SolidCraft’s UI kit (solidcraft-ui-kit, and the solidcraft-theme tokens it draws from) at the same commit, so FieldCraft is on SolidCraft’s egui line (0.37) and moves with it. SolidCraft’s [patch.crates-io] does not reach dependents; the workspace repeats the patches its desktop app needs (egui-wgpu: MSAA clamped to what the device supports, 1x on OpenGL adapters, so the 4x never fails pipeline validation at start; winit) from the same commit. solidcraft-engine comes without its default plugins feature (from v0.42, a sandboxed WebAssembly plugin host on wasmtime): FieldCraft runs command scripts and loads no plugin.

The pin decides which designs FieldCraft opens: SolidCraft’s reader migrates every older design format and refuses a newer one, and SolidCraft releases often raise the format. A design newer than the pin reads (fieldcraft_geometry::DESIGN_FORMAT) fails with “this design was saved by a newer SolidCraft (format N); this FieldCraft reads up to M. Update FieldCraft to open it” (#605: FieldCraft 0.7.0 read up to format 21, SolidCraft 0.16.2 saves 27; #655: a FieldCraft on 0.16.2 reads up to 27, SolidCraft 0.17 and 0.18 save 28; the pin after 0.40.1 reads up to 55, which SolidCraft 0.41.0 saves, and 0.42.0 saves 57; SolidCraft 0.50.0 saves 69, and the post-0.50.0 pin reads up to 70 and dropped .solvecraft from solidcraft_io::DESIGN_EXTS).

A newer pin can also name the same geometry otherwise: SolidCraft 0.16 names the pieces of a split face from their history (F9:face:4 became F9:section), so a model saved before names faces, edges and vertices the design no longer has (0.17, 0.18.1 and 0.18.2 renamed none of the corpus’s and samples’ faces, edges or vertices: #655). Opening a model or a design never lets that pass in silence (crates/engine/src/cmd/names.rs): a stale face the model’s mesh lies on is found again where the mesh’s facets tagged with it land on the new tessellation (all on one face whose area agrees, no other tag’s mesh there), its edges and vertices through the faces they separate, and every definition and mesh tag follows, after the renamed definitions are checked to read back from a file; anything else is refused. A name that still resolves but whose mesh lies on another face is reported (mismatched). The open lists each rename (renamed, and the warnings the status line shows) and marks the model changed, so it is saved deliberately; each definition still naming what the design lacks is listed (stale.references) and asked to be picked again, and a remesh says which seeds and size controls it could not apply.

SolidCraft v0.40’s kernel (solidcore) names geometry otherwise, and FieldCraft adopts its names without a migration: a full cylinder or sphere that truck made of two half faces is one face now, and many faces of split bodies carry other names (the corpus bracket’s frozen list lost 120 names and gained 114). From 2874e78 a face made from other faces names them in brackets (F3:blend:F2:side:l3|F2:side:l4 is F3:blend(F2:side:l3|F2:side:l4), F2:inner:F1:+x is F2:inner(F1:+x), and the edges and vertices that name such a face with it). Moving the pin to 88f676138 also swaps F5:bore:side:0#1 and F5:bore:side:0#2 across split cells Bracket.10 and Bracket.12 (12 edge/vertex names in filleted-bracket-blocks.txt, zero face base names lost). Opening a model saved before applies the checks above: a stale name is followed only where the model’s mesh finds its face again unambiguously (one face, its area within 5 %), and every other use is refused and listed to be picked again, never remapped by guess.

Three checks keep the pin current:

  • crates/geometry/tests/design_formats.rs opens every design in crates/geometry/tests/designs (the older fixtures and solidcraft-<version>/, each saved by that release) and checks that a later release’s copy of a recipe gives the same bodies, volumes and face names as the older one.
  • crates/geometry/tests/design_names.rs freezes every face, edge and vertex name of the split corpus bracket (tests/names/): a pin bump that renames anything shows the renames there, to bless once opening older models finds them again, or once the renames are adopted.
  • The scheduled SolidCraft compatibility workflow (.github/workflows/solidcraft-compat.yml, daily and on demand) downloads SolidCraft’s latest release, saves the same recipes with it into solidcraft-latest/ and runs those tests. Red means a SolidCraft release saves designs this FieldCraft can’t open (or opens differently): move the pin to that release, port the API changes in fieldcraft-geometry, add its designs as solidcraft-<version>/, and check the meshing corpus (cargo xtask corpus), the heavy tests and the oracle stay the same.

Meshing pipeline

  1. Boundary surface. SolidCraft tessellates each body with its analysis mesh path (solidcore_tess::mesh, not the display mesher): every face by constrained Delaunay in its own parameters to the chordal tolerance, shaped to a smallest angle of 25°, its edges sampled once so the faces share their nodes. Every triangle carries its B-rep face, so feature edges and face-based loads and BCs survive meshing. Faces of an opened design also carry SolidCraft’s persistent names (F2:side:l4, from the feature and sketch curve that made them), so a load on a named face follows it when the design is edited and opened again. Bodies of components are placed in the world through their occurrences (one body per placement), as SolidCraft displays and exports them.
  2. Surface preparation (fieldcraft-mesh::surface, mesh.surface.check). Weld the tessellation’s per-face vertex copies (at twice SolidCraft’s linear tolerance), check the surface is closed, manifold, consistently and outwardly oriented (voids inwards) and free of self-intersections (exact triangle–triangle tests), and find feature edges (face boundaries, sharp dihedral angles). Defects come back located by triangle, vertex and position.
  3. Tetrahedral meshing. Bowyer–Watson Delaunay on Shewchuk’s adaptive predicates (symbolic perturbation for degeneracies), boundary recovery by the robust constrained Delaunay method of Diazzi et al. 2023 (implicit Steiner points on indirect predicates, gift-wrapping facet recovery; fieldcraft-mesh::cdt, command mesh.tet.generate), so every boundary triangle and its B-rep face tag survives; rounding is repaired by flips (§5.1). Then the quality stage (fieldcraft-mesh::tet): a curvature-graded size field, edge-collapse coarsening, constrained Delaunay refinement with boundary points projected onto the B-rep faces and curves (exact surfaces from SolidCraft where analytic, the tessellation otherwise), ODT smoothing interleaved as in Tournois et al. 2009, the Klingner–Shewchuk 2007 improvement schedule against slivers, and tet10 with mid-edge nodes on the geometry. Every step is a checked local replacement, so the mesh stays valid throughout.
  4. Hexahedral meshing (the core). Grid-based all-hex first, the one family that meshes any input validly. fieldcraft-mesh::octree (command mesh.hex.octree): a 27-tree over the part, refined by curvature, thickness and narrow faces, balanced and cut by the 3-refinement node-marking templates (Schneiders 1996, Ito et al. 2009) into a conforming grid; the core of grid elements inside the part (exact inside test) is cleaned to a manifold boundary; the part’s patches, sharp curves and corners are mapped onto it (Gao et al. 2019); one padding layer and a pillow under each patch carry the boundary and capture every sharp curve; the foldover-free energy (Garanzha et al. 2021) with a growing fitting term moves the boundary onto the geometry while every element stays valid; the worst elements are improved, and every element is proven valid by the certified Bernstein Jacobian check (Johnen et al. 2013; Marschner et al. 2020) before the boundary quads are tagged with their B-rep faces. Where a stage fails the grid is refined there and the mesh rebuilt. The dual schemes of Livesu et al. 2021 (fewer elements, concave transitions) are the next upgrade of the transitions. Then hex-dominant by tet recombination (Pellerin et al. 2018), then polycube (DualCube labelling) for blocky parts; frame-field/integer-grid-map methods stay research.
  5. Structured hex and face meshing. Faces get all-quad meshes on shared, prescribed edge nodes (fieldcraft-mesh::quad): transfinite interpolation for four-sided faces (Gordon and Hall 1973), and for free faces a half-resolution constrained Delaunay triangulation, recombination (Lee and Lo 1994) and one uniform split that lands on the boundary nodes, then smoothing and untangling; every quad is checked with exact predicates. One SizeField trait (fieldcraft-mesh::size) sets interior sizes and edge divisions, with even counts per loop. Mapped and swept hex build on these face meshes (fieldcraft-mesh::hex, mesh.hex.generate): the B-rep topology is recovered from the face-tagged surface; a body is extruded (straight multi-level sweep: the levels’ outlines imprinted into one cross-section, cut automatically into blocks (holes apart, O-grids, cuts from concave corners and fillets chosen by the quality of the blocks they leave), regions mapped, triangle primitives, O-gridded or free-meshed, then stacked), revolved (the same in a rotating frame), swept one-to-one through rings of linking faces (least-squares affine layers, Roca and Sarrate 2010), or mapped as a logical cube (Gordon and Thiel 1982); interval assignment couples the counts of shared curves. Nodes on analytic faces (Shape::face_surfaces) are exact, hex20 mid-edge nodes go onto the faces, boundary quads carry B-rep face tags, and the result passes the certified validity gate plus tiling and fidelity checks. A body no method fits gets each method’s reason. Without geometry, mesh.block (fieldcraft-mesh::block) meshes one six-sided block from its eight corners and optional circular or elliptical edges by the same edge-based transfinite interpolation, as hex8, hex20, tet4/tet10 (Kuhn’s six tetrahedra per cell) or wedge6, with grading; blocks join where their nodes coincide, face to face (mismatched divisions or kinds are refused), and their named faces, edges and vertices become geometry tags that sets select. It meshes the analytic shapes of the verification cases.
  6. Quality. Scaled Jacobian, aspect ratio, dihedral angles; every generated mesh is checked for valid Jacobians and conserved volume before it reaches the model. Validity is one criterion shared with both solvers (fieldcraft_model::admissible_jacobian: normalized Jacobian above 1e-12): the gate proves it on the whole element, the solvers check it at their integration points, so a mesh the gate accepts is never refused by a solver.

Model definition

fieldcraft-model holds the analysis model in no solver’s vocabulary (the writers map it to element names, cards and keywords):

  • Geometry tags. Geometry is referred to by name only: a body and, inside it, the persistent name of a face, edge or vertex ({"body": "Body1", "face": "F2:top"}). A mesher tags what it makes: each element with the body (solids), face (shells) or edge (beams) it fills, each boundary element face with its geometry face, element edges with geometry edges, nodes with vertices (Model::geometry_tag, tag_element, tag_element_face, …; mesh.tag by hand). Replacing or removing an element drops its tags; a remesh clears them and writes new ones.
  • Sets are defined by geometry names, explicit labels or both, and resolve against the current mesh into sorted nodes, elements and element faces. A face name also selects the pieces a kernel splits it into (name#0, name#1). Because the definition names geometry, a remesh, or an edit of the design followed by a remesh, keeps every set, section and load in place.
  • Element faces are numbered per kind (ElementKind::faces): solids’ faces are oriented with the right-hand normal pointing out; shells have a positive and a negative side.
  • Definitions (materials, sections with their element formulation, reference points, couplings, boundary conditions, loads, steps) refer to each other by name. A reference must exist when it is made, and a definition still referred to (a load listed by a step included) cannot be deleted; what depends on the mesh is checked when the model is resolved.
  • Steps list the boundary conditions and loads active in them. Nothing propagates from one step to the next.
  • Units are a label (mm-t-s-N-MPa, …); numbers are never converted, and the check warns when a modulus, density or gravity is implausible for the chosen system.
  • Check and resolve. Model::check lists errors and warnings, each naming its item (a set member not on the mesh, an element with no section or in two, a moment on solid nodes, a missing density for a frequency step, …). Model::resolve returns what writers and the solver read besides the definitions: every set resolved (each element then lies in exactly one section’s set), the node label of every reference point, and every force, moment and traction as nodal values. It fails when the check finds an error.
  • Loads that keep their meaning on any mesh. A force or moment on a set is a total by default: split by the consistent nodal weights ∫ N_i dA of the set’s faces (Gauss quadrature on each face’s own linear or quadratic geometry), or equally over a set of nodes only. Applying it at every node is an explicit, mesh-dependent opt-in (per_node). A traction is force per area on faces. The expansion lives in resolve, so the deck writers and the solver share it.
  • Reference point labels are stored with the point: chosen from the top of the label range when it is created, so remeshing or adding nodes and points never renumbers them.
  • Files. A model deserializes by replaying its contents through the same checked methods the commands use, so a file cannot hold what commands would refuse.

Implicit solver

fieldcraft-solver solves a model’s linear static and frequency steps (solve.static, solve.frequency; solve.probe reads the stored results). Methods and papers are cited in the module docs; ADR 0001 records why the linear algebra is our own.

  1. System. Model::resolve(); each solid section’s elements take their material’s elasticity matrix and the section’s formulation (fieldcraft_fem::element::ELEMENT_TYPES, one row per element kind: tet4, tet10, wedge6, hex8, hex20); 2D sections (plane stress, plane strain, axisymmetric) take the 2D table (fieldcraft_fem::plane::PLANE_TYPES: tri3, tri6, quad4, quad8), chosen by the section kind, and the model then has two degrees of freedom per node: the 2D elements declare ElementDofs::new(DofSet::PLANE) (Ux, Uy) to the DofLayout. A 2D model lies in the XY plane (axisymmetric: x the radius, Y the axis; nodes on the axis are held radially), is loaded on element edges, and cannot mix with solids or couplings yet. Rod sections’ rod2 and rod3 elements are trusses (fieldcraft_fem::truss). Point masses, rotary inertia and springs (Resolved::masses, springs, expanded per node by the model) assemble on the unknowns their nodes are given (discrete::needs, discrete::dof_of); dashpots are ignored with a warning (no velocities in static and frequency steps). Every reference point a coupling or a discrete element uses gets six degrees of freedom (translations, rotations) after the mesh’s. Shell sections make quad4 (MITC4) and tri3 (MITC3) flat shells with a drilling rotation (fieldcraft_fem::shell; quad8 and tri6 shells are “not supported yet”), beam sections two-node Timoshenko beams with the profile’s section properties and the section’s orientation vector (fieldcraft_fem::beam); both declare ElementDofs::new(DofSet::STRUCTURAL) (system::Structural), so their nodes carry translations and rotations and the solids and trusses sharing those nodes add into the translations. Shells and beams need isotropic materials until material orientations exist, and are 3D only. The step’s boundary conditions prescribe the kinds a node carries (rotations of solid-only nodes are ignored) and a coupled point’s six directions; its loads become a load vector: forces, moments and tractions from Resolved::nodal_loads, forces and moments on coupled reference points, pressure as consistent face loads (shell faces too), gravity and body forces through the element shape functions (consistent forces and moments on shells and beams).
  2. Assembly on the node graph (one dense block per node pair: 3 × 3 for solids, 2 × 2 in 2D models, up to 6 × 6 at shell and beam nodes; elements in label order, so sums are reproducible bit for bit).
  3. Ordering and elimination (constraints). Nested dissection of the nodes by coordinate bisection. Couplings become linear constraint rows: kinematic = rigid link of each coupled translation to the point’s translation and rotation; distributing = the point follows the least-squares rigid fit of the set’s translations: over the set’s faces the L2 fit with the consistent nodal weights (Zienkiewicz, Taylor & Zhu, The Finite Element Method, 7th ed., 2013, §6.6); over a set of nodes only, equal weights. Prescribed values and rows are eliminated master–slave in a fixed order, one dependent degree of freedom per row (the coupled node or the distributing point while it is free, else the largest coefficient), giving u = T_f q + T_p u_p; the reduced matrix T_fᵀ K T_f stays symmetric positive definite (no penalty, no multipliers). Free mesh equations follow the node order, reference point equations come last. Without couplings T is a selection and the numbers are those of plain elimination, bit for bit.
  4. Static solution. Supernodal left-looking sparse Cholesky on the postordered elimination tree (the factor size is computed and capped before any value; subtrees and dense row tiles on threads with a fixed operation order, so the factor is the same on any thread count), reactions T_pᵀ (K u − f) (at nodes and at prescribed reference points, forces and moments), integration-point stresses extrapolated to the nodes and averaged, von Mises. Shells report section forces and bottom, middle and top stresses at their nodes (their top surface joins the nodal average), beams their end section forces; nodes report rotations and reaction moments. A zero pivot names the node or reference point and direction that can move freely.
  5. Frequency. Shift-invert block Lanczos (block 6, full reorthogonalization) on K − σM, σ = 0 for a supported structure and slightly negative for a free one, so rigid-body modes come out at zero; mass-normalized shapes, participation factors and effective masses.
  6. Results stay in the session per step, stamped with the session revision they were solved at; Session::result hands out only those of the current revision, so an edit makes them stale and undoing back to the solved state makes them current again.

Verification (crates/solver/tests/verification.rs, analytic only): displacement and traction patch tests for every element and formulation (exact to round-off), cantilever tip deflection against Timoshenko with convergence rates of the linear elements, Lamé’s cylinder, Kirsch’s plate with a hole (Kt → 3), cantilever and free–free beam frequencies with six rigid-body modes. crates/solver/tests/plane.rs: the 2D elements’ displacement patch tests in plane stress, plane strain and axisymmetry, uniform traction, a plane stress cantilever against Timoshenko with convergence rates, Kirsch’s plate, Lamé’s cylinder in plane strain and axisymmetric, a rotating disc (plane stress) and a rotating cylinder (axisymmetric) against Timoshenko & Goodier, masses and rigid-body modes. crates/solver/tests/couplings.rs: a block given a rigid motion through a coupled point (kinematic and distributing), clamping through a coupled point equals clamping (static and modes), tension through a distributing coupling against the equivalent pressure away from the end, pure bending by a moment through a distributing coupling, torsion of a tube by a moment on a kinematically coupled point (twist and shear stress). crates/solver/tests/one_d.rs: member forces of determinate trusses (a plane Pratt truss, a space tripod) against the method of joints, the three-bar truss, a rod3 constant-stress patch and a bar hanging under its weight, spring–mass, skew springs, the two-mass chain, a bar with a tip mass and the torsional pendulum. crates/solver/tests/structural.rs: membrane and bending patch tests of quad4 and tri3 shells in a tilted plane, the simply supported plate under pressure against Navier’s series (deflection and first frequency), cantilever beams against Timoshenko (exact) and Euler–Bernoulli frequencies, a portal frame against slope-deflection, solids continued by rods and skinned by shells. crates/solver/tests/benchmarks.rs (published reference values, tagged with their source, separate from the analytic gate): the Scordelis–Lo roof and the pinched cylinder.

Finite cell solver

fieldcraft-fcm solves a linear static step of one body on a Cartesian grid laid over it, with no volume mesh (the finite cell method of Parvizian, Düster and Rank; papers in the module docs and in docs/solvers/literature.md, Part T). It takes the welded, watertight, face-tagged boundary surface the meshers take, a material, supports and loads by face tag, a cell size and a degree, and gives displacement and stress at any point of the part, the reactions of the supported faces and the strain energy. It is a library so far: no command reaches it, and it keeps no unit, only a consistent set.

  1. Grid (grid, reach). Cubic cells over the bounding box. A cell a triangle reaches into is cut; a triangle in the plane between two cells belongs to the one on the material side. Both are signs of exact predicates (fieldcraft_mesh::predicates). Any other cell is inside or outside by its centre (inside: the winding number along a ray, with exact predicates and symbolic perturbation).
  2. Basis (legendre, space). Integrated Legendre polynomials of degree p, as the tensor product or the trunk space; the modes on a shared vertex, edge or face of the grid are one unknown. Cells outside the part carry none.
  3. Cut cells (exact, moments). The material in a cut cell is a polyhedron. Its Legendre moments are integrated over the triangles in the cell by the divergence theorem, exact for the triangulated body to rounding, and every cell matrix follows from the moments by sum factorisation. A cell whose highest corner lies on the surface is left to a quadrature that splits the cell where the surface and its edges cross, with an octree where the surface is curved (grid); Stats::exact_cells counts the others. The volume outside the part is given a small fraction of the material’s stiffness, raised and reported (Stats::fictitious) when a nearly incompressible material needs more.
  4. Supports and loads (cell). A cell face is not a face of the part, so a prescribed displacement is imposed weakly by Nitsche’s method on the face’s own triangles, with the parameter of each cell from that cell’s eigenvalue problem. Pressures, tractions and forces are integrated over the face’s triangles, gravity over the material.
  5. Solution (solve). Assembled cell by cell in a fixed order into fieldcraft-solver’s sparse matrix, ordered by its nested dissection of the cells (ordering::element_dissection) and factored by its Cholesky; the caps on cells, matrix entries and factor entries refuse a model that would not fit.

The grid is uniform, so a stressed feature needs cells of its own size everywhere, and the stress is the derivative of a cell’s polynomial, least accurate on the boundary of the part.

Verification (crates/fcm/tests): patch tests, exact but for the fictitious stiffness (patch.rs, hydrostatic.rs); Lamé’s cylinder with the measured orders of convergence, h^(p+1) in the displacement and h^p in the stress (lame.rs); NAFEMS LE1, MacNeal–Harder’s cantilevers and thick cylinder and Kirsch’s plate against their published targets, within the tolerances the oracle’s cases of the same problems have (benchmarks.rs); the stress at a hole and at the fillet of the oracle’s bracket over six positions of the grid (hole.rs, bracket.rs); every part of the meshing corpus under its own weight, for the volume and the reaction (corpus.rs).

Explicit solver

fieldcraft-explicit integrates a model’s explicit_dynamic steps in time (solve.explicit; solve.history and solve.probe read the stored histories and frames). Methods and papers are cited in the module docs and in docs/solvers/literature.md (Parts H and J). Both structural solvers number their degrees of freedom with fieldcraft_fem::DofLayout (docs/manual/structural/elements.md).

  1. System. Model::resolve(); hex8 sections with reduced integration become one-point uniform-strain hexahedra with Flanagan–Belytschko hourglass control, tet4 sections Bonet–Burton average nodal pressure tetrahedra (fieldcraft_fem::uniform holds their kinematics), rod2 and rod3 trusses (discrete). Point masses add to the lumped mass; springs and dashpots (on the previous half increment’s velocity) add internal and viscous forces and their own stable increment. Other element kinds and formulations, couplings, reference points, rotary inertia, rotational springs and moments return “not supported yet”. Masses are row-sum lumped. A zero-valued boundary condition holds a degree of freedom; a displacement value is reached at constant velocity over the step. Loads act in full from the start. The step lists initial velocities and fixed rigid planes (with friction) by set.

  2. Time step. Each element’s highest frequency is bounded in closed form (exact for a cube); the increment is the step’s scale (0.9 by default) times the smallest element increment with Wilkins’ bulk-viscosity correction, recomputed every increment. The ten controlling elements are reported; a step that would need more increments than its cap is refused before it runs.

  3. Integration. Central differences in the half-step form, elements in label order, no parallel reductions (bit-for-bit repeatable). Rigid walls and prescribed degrees of freedom are kinematic velocity constraints whose impulses are the reactions.

  4. Energy account. Kinetic, internal (stress work), hourglass, bulk viscosity, external and constraint work, and their balance; a run warns when the balance is off by more than 1% of the largest energy or the hourglass energy exceeds 10% of the internal energy.

  5. Results. Histories (energies, momentum, constraint force, chosen nodes) at the history interval and field frames (displacement, velocity, element stress and strain) at the output interval, capped in size; kept in the session like the implicit results.

  6. Large deformation and materials (X2). With nonlinear_geometry (the default) the elements are updated Lagrangian: strain and spin increments on the midpoint configuration, forces on the current one (hex8 gradients in closed form, UniformStrain::hex8_deformed). The material state (stress, back stress, strain, stiffness hourglass forces) is rotated with the Jaumann rate (Hughes–Winget) or the Green–Naghdi rate (Flanagan–Taylor), fem::rotation; materials are hypoelastic or J2 plastic (bilinear isotropic/kinematic, hardening table, Johnson–Cook with adiabatic heating) by radial return with Johnson–Cook damage, fem::plasticity. Elements whose damage reaches 1 or whose plastic strain reaches the material’s erosion strain are eroded (reported with their energy; their nodes keep mass and momentum). The energy account adds the plastic work and the eroded energy.

  7. Contact (X3). The model’s contacts (interaction.contact.*) become interfaces before the elements are built (nodes that start inside a surface are moved onto it or refused): segment-to-segment penalty contact both ways (projection, polygon clipping and quadrature over each pair of facing faces), a bucket-grid search every increment in parallel by faces, a penalty per area from the masses and the stable increment that never shortens it, and Coulomb friction by a return map at the secondary nodes; rigid walls take Coulomb impulses. The contact forces join the equations of motion beside the external ones, their work and the friction dissipation join the energy account, and each contact’s peak force, first and last contact, deepest penetration and friction are reported (docs/manual/structural/contact.md).

Verification (crates/explicit/tests/verification.rs and large_deformation.rs, analytic only): stress waves in hex8 and tet4 bars (front at c·t, σ = ρ c v, work input), a bar striking a rigid wall (contact time 2L/c, rebound speed, plateau force ρ c v₀ A), the energy balance, bit-for-bit repeatability; Dienes’ simple shear for both rates, a stressed element turned rigidly by 90°, the J2 uniaxial curve and unloading at large strain, damage failure at the fracture strain, and the Taylor bar against Taylor’s 1948 estimate; crates/explicit/tests/one_d.rs: spring–mass period, damped decay rate and period, a dashpot alone, two masses on a line spring, waves in rod2 and rod3 bars; crates/explicit/tests/contact.rs: colliding bars, sliding blocks under constant and decaying friction on a rigid wall and on a plate, the contact patch test, Hertz’s sphere impact, a free body untouched by general contact, initial penetrations and thread-count independence; in the engine (solve.rs), a cantilever’s free-vibration period against solve.frequency.

Lattice Boltzmann solver

fieldcraft-lbm solves a model’s fluid steps (solve.fluid; solve.probe reads velocity, pressure and temperature at points and wall force and heat histories). Papers are cited in the module docs and in docs/solvers/literature.md (Part I).

  1. Model. A fluid material (density; a Newtonian viscosity or a shear-dependent one — power law, Carreau–Yasuda, Cross, or Cross-WLF, which also follows the temperature — that each cell relaxes with at its own shear rate, rheology; conductivity and specific heat for heat), a fluid domain (box, cubic cell spacing, a condition on each box face: wall, moving wall, slip, velocity inlet with a uniform or parabolic profile, pressure outlet, periodic pair; obstacle bodies and moving-wall conditions on their named faces; initial velocity; body acceleration; optional thermal settings: the initial temperature, a thermal condition per box face and per named obstacle face — held temperature, heat flux or adiabatic — gravity with the expansion coefficient for buoyancy, and the obstacles that conduct heat, each with its material and power) and a fluid step (end time or steps, optional time step, frames, the collision operator, the TRT parameter Λ). Deck writers refuse fluid steps.
  2. Setup. Lattice units from the spacing, the time step and the density. Without a given time step the solver keeps the characteristic lattice velocity at 0.05 and τ ≤ 1. A lattice Mach number above 0.3, τ below 0.505 or a lattice acceleration above 0.01 is refused with the numbers and what to change; caps on cells, steps, cell updates and frame memory are checked before anything is allocated. With heat, the scalar relaxation time follows from the diffusivity k / (ρ c) in lattice units (refused below 0.505, warned above 2) and a flux on an inlet, outlet or periodic face is refused.
  3. Grid. The engine triangulates each obstacle body (or takes an imported surface) and prepares its BoundarySurface; cells whose centres have a positive winding number are solid, decided with exact orient2d/orient3d and one symbolic perturbation, so faces through cell centres and lines through edges are classified consistently.
  4. Stepping. TRT collision (or, per step, the recursive regularized collision that stays stable as τ approaches ½, docs/manual/fluid/collision.md) with Guo forcing in place; pull streaming as one shifted copy per direction with per-link rules for the cells next to walls and box faces; Zou–He on inlet and outlet layers, or on a convective outlet the unknown populations updated by a convective outflow condition and each cell held at the face’s pressure (Zou–He where the flow comes back in); a cell on the edge of two open faces belongs to one of them (velocity faces first). Wall links give the momentum exchanged with every box face and B-rep face (the face of the triangle nearest the link). A non-positive density or a lattice speed above 0.5 stops the run with an error. With heat, a D3Q7 scalar lattice (weights ¼ and ⅛, c_s² = ¼) steps after the flow on the same links: it is advected by the cell velocity and diffuses with the antisymmetric relaxation time of its two-relaxation-time collision, whose Λ_T is fixed so that its walls and steady temperatures do not depend on that time (#629); held temperatures are anti-bounce-back, adiabatic faces bounce-back, a flux is added to the bounced population; velocity inlets carry the held temperature in at the cell’s velocity, pressure outlets copy their neighbour. The heat crossing every wall link is summed per face as the flow’s force is. The temperature feeds back through a per-cell Boussinesq force −β (T − T₀) g. Conducting obstacles carry their own temperature on their cells (conduction.rs): finite-volume conduction with harmonic-mean face conductivities per axis, explicit and sub-cycled, their power spread over their cells, the heat they give a held or flux box face counted as that face’s; each D3Q7 link from the fluid into one is an anti-bounce-back at the interface temperature of the two half cells in series, and the heat it takes from the fluid goes to the solid cell, so heat is conserved to round-off; that heat is affine in the solid’s temperature and taken point-implicitly, which keeps the coupling stable for any heat capacity. A run to steady state scales the solids’ heat capacity down to the smallest the lattice allows (the steady temperatures do not depend on it). The GPU backend steps the conducting cells too (single precision, checked against the CPU). Fan and porous zones also run on the device: the same implicit half-force velocity, curve feedback before each collision, and optional zone flow/pressure histories. Zone ownership, headers, curves and the fans’ cell lists follow the flags in their buffer, keeping the storage binding count (GPU).
  5. Results. Frames of velocity, gauge pressure and (with heat) temperature per cell (single precision), force and heat histories per wall and the fluid mass, in model units, stored per step like the implicit results. Each conducting solid’s peak temperature is read from the frames (the last one when the run reached steady state, else the hottest of them) and checked against its optional temperature limit (FluidResult::components).

The regularized collision has its own analytic and benchmark checks (crates/lbm/tests/regularized.rs, and both collisions in the porous, fan, natural convection, lid-driven cavity and Schäfer–Turek cases; docs/manual/fluid/collision.md).

Verification (crates/lbm/tests/verification.rs, analytic): plane Poiseuille exact to round-off with Λ = 3/16 and second order with Λ = 1/4; Couette exact with the wall shear μU/H; Taylor–Green decay second order; Poiseuille in a staircase pipe; Stokes drag of a simple cubic sphere array against Hasimoto (1959); a parabolic-inlet, pressure-outlet channel against Poiseuille; mass conserved to round-off; bit-for-bit reproducibility. crates/lbm/tests/thermal.rs (heat): linear conduction between held plates to round-off; a flux wall against q H / k and the wall’s heat balance; an inlet temperature carried through a plug flow; a periodic blob that keeps its total and returns after one lap; (ignored, minutes) the de Vahl Davis cavity at Ra 10³ and 10⁴ against the published Nusselt numbers (both within 0.1 %). crates/lbm/tests/conjugate.rs (conjugate heat transfer): a composite wall in series to round-off (orthotropic too); a heat-generating slab at second order with its whole power reaching the plates; a heated wall under a channel flow against the conduction profile; a heated block in a channel conserving heat every step to round-off; a slow solid scaled for steady state landing on a long run’s temperatures; the heat-generating slab’s peak passing and failing limits either side of it; House, Beckermann and Smith’s cavity with a centred conducting body (conduction limit every run; Ra 10⁵, ignored: +0.5 % on 48 cells, converging at second order to −0.22 % extrapolated); Rayleigh’s square array of cylinders against the Perrins series (conducting rods within 0.3 %, insulating ones a first-order staircase error, −0.85 % on 64 cells); a low-capacity solid with strong links stable at τ_T = 0.52; a two-layer wall with a thermal contact dropping q R across it to round-off, and the heat across a contact conserved every step. crates/lbm/tests/benchmark.rs (ignored, published reference values): Schäfer–Turek 2D-1 and 2D-2, the lid-driven cavity at Re 100 (Ghia et al. 1982).

Commands

Every user-visible action is a CommandSpec in crates/engine/src/cmd/<area>.rs with a JSON form. Session::execute clones the model, runs the command under catch_unwind, and restores the model on an error or a panic; commands that changed the model are journalled, so the journal replays as a script. Each journalled command is also an undo step (the state before it): edit.undo restores that state and moves the command off the journal onto the redo stack, edit.redo puts it back, so the journal always rebuilds the current model. History is bounded by step count and by an estimate of the memory the kept states hold (oldest steps go first). Commands of kind Session (file.*, edit.*) are never journalled. file.save and file.open write and read .fieldcraft files; the desktop app autosaves unsaved work for file.recover.

Each command lists what it cannot run without (requires: an open design, geometry, a mesh, a material, a step, a result, …; crates/engine/src/requirement.rs), next to its id. A requirement is a real prerequisite, never a workflow order. Session::execute checks them first and fails without doing anything, naming each missing piece and the toolbar entry that provides it (“Needs a material — Properties › Material”). The desktop UI reads the same check (Session::availability, a few counts, evaluated every frame) to grey ribbon buttons, command search results and Solve, with the same text as their tooltip.

Test corpus

Meshers are measured on our own parts (docs/adr/0001-libraries.md, test geometry). Each part is a SolidCraft command script in tests/corpus/<name>/recipe.json (the file solidcraft-cli run takes, plus a corpus object with its categories and, when it has one, its closed-form volume) with a one-line README.md; analytic shapes (sphere, torus, cylinder, thick-walled pipe, plate with a hole) are generated in code. fieldcraft-testkit runs a recipe in SolidCraft’s engine, saves the design and opens it through open_design, the path a person’s design takes, so no geometry is stored. cargo xtask corpus (a release build of the testkit’s corpus binary) builds every part, tessellates it and runs each stage of fieldcraft_testkit::runner, writing docs/meshing/corpus.md. A mesher joins by implementing runner::Stage (its columns, the measures it freezes, and a run over the part’s tessellated surfaces) and adding itself to runner::stages(). Each part’s outcomes and measures are frozen in tests/corpus/<name>/fixture.json (fieldcraft_testkit::fixture, the oracle’s format), and every tet mesh is checked against validity invariants on the test side (fieldcraft_testkit::validity); the heavy test corpus_matches_its_fixtures makes the corpus a regression gate in CI.

Verification oracle

tests/oracle/<case>/ holds the verification and validation cases (docs/verification.md): our own model of each problem as a command recipe (recipe.json, optionally a SolidCraft design.json), its cited reference values with tolerances and reasons (expected.json), and our frozen results (fixture.json). cargo xtask oracle runs the testkit’s oracle binary (fieldcraft_testkit::oracle): one Session per case, quantities read by JSON pointer from step outputs or commands such as solve.probe {"at": [[x, y, z]]}, compared with the reference and the fixture; it writes docs/oracle.md. CI runs it as its own job.

Control protocol

fieldcraft --control PORT (or FIELDCRAFT_CONTROL_PORT=PORT) listens on 127.0.0.1:PORT for JSON lines. Each request is one line {"id": …, "method": "…", "params": {…}}; each reply is one line {"id": …, "ok": true, "result": …} or {"id": …, "ok": false, "error": "…"}. Requests are handled on the UI thread between frames; pointer and keyboard input is injected as real egui events, one pointer event per frame. The protocol has the same shape as SolidCraft’s.

fieldcraft --sample --control 7070          # or --sample cantilever | impact
{"id":1,"method":"engine.execute","params":{"command":"model.info","params":{}}}
→ {"id":1,"ok":true,"result":{"elements":{"hex8":64,"tet4":162},"nodes":199}}
{"id":2,"method":"ui.render","params":{"path":"/tmp/model.png","width":900,"height":600}}

The channel is untrusted input. A request line may be at most 16 MiB; a longer one is answered with {"ok": false, "error": "request too large"} and the connection is closed, as are connections that send eight lines that are not JSON. At most 16 connections are served at once, at most 64 queued requests run per frame so a flood cannot starve drawing, and a request the UI thread has not answered within 60 seconds gets {"ok": false, "error": "timeout"} (a solve, a mesher or an open is a job, answered when it ends however long it runs: see Jobs). Numbers are checked and clamped (drag steps, wheel lines, window size); ui.render refuses an image size out of range.

Engine

MethodParamsResult
engine.executecommand: command id, params: JSON object, wait? (default true)the command’s result; a solve, a mesher, an open or results.path sampling/export runs as a job
job.status—job: the running job (title, command, elapsed seconds, progress {step: {name, index, count}, stage, done, total}, fraction 0–1 when bounded, line as the window shows it), or null
job.wait—the running job’s result when it ends (null job when none runs)
job.cancel—cancels the job (cancelled: what it was): its solver or mesher stops at its next increment, time step, supernode or refinement pass and what it made is dropped; the model stays as it was and every request waiting for it gets {"ok": false, "cancelled": true}
engine.scriptcommands: [{command, params}, …]stops at the first error; journal: commands that changed the model so far
engine.commands—every command: id, label, params (the parameter documentation), schema (its parameters as JSON Schema) and requires (what the session must hold before it runs: design, geometry, nodes, mesh, analysable, material, step, result, …; engine.execute of a command missing one fails without doing anything, naming each missing piece and its toolbar entry)

Commands never open forms or file pickers when run this way. fieldcraft-cli commands prints the same registry. file.sample {name} opens a sample (parts, cantilever, impact) and solve.run {} solves every step; the Results workspace comes up when a result appears (a static step with its contours on the undeformed shape: results.deformed {} shows the deformed shape). The ribbon follows the commands run here, as it does for scripts, MCP, the command search and the browser: a command that changes the model or the results display brings the tab where its toolbar entry lives (Mesh for mesh.*, Properties, Steps, Loads & BCs… for model.*, Solve, Results), as a click there would. Queries (model.check, mesh.quality…) and the Tools tab’s commands (files, undo, model.info) leave the ribbon where it is.

UI

MethodParamsNotes
ui.inspect—view settings (ui), hosted workspace panels (panels: sorted array of {id, visible, has_content, host, zone, rect, active_title, native_supported}), camera, viewport rect (points), renderer (gpu/cpu) and adapter, open command form, file_picker (whether a native chooser is pending), the status message, node and element counts, the results display (results: what the results.* commands reply: view, stale, contour range, modes), the probed node (probe), solve (the title bar’s Solve: enabled, and unavailable as ui.toolbar’s entries give it, listing everything solve.run misses), busy (the background job: a file or sample opening, a solve, a mesher run from its form by a click on OK), job (that job as job.status gives it), prompt ({"unsaved": path}, {"design": path} (a design of another part opened over a meshed or defined model), "recover", "samples"), recent (recent files), updates (docs/updates.md: automatic, checked_at, skip, available (a newer version the status bar offers), busy, staged, unsupported; null when the run does not check), selected (the browser’s selected definition {kind, name}, or seed {kind: "seed", edge} or {kind: "seed", face}), browser (each top-level browser node as the tree draws it: [{node, shown, state, tip, add}]. shown says whether the tree draws the node: once it holds items or the workflow reaches its stage (every stage before it done), with Interactions and Fluid Domains once a step exists. A hidden node’s commands stay on the ribbon and in the command search. state is the mark drawn beside the node: done (every stage it needs done), next, blocked (⚠: its command cannot run yet, and tip says what it needs and where), outdated, or null when there is no mark (a node that is no setup stage, one whose next stage is still ahead of time, or one not drawn). tip is its hover. add lists its drawn ghost rows {stage, label, command, status}, none for a node not drawn, and a ghost row’s region is layout’s browser/add/<stage>. The full checklist, drawn or not, stays in model.check’s progress), nav (the left-drag mode), layout (each region of the window drawn last frame as [x, y, w, h] in points: app_bar, ribbon (the band the ribbon’s cards take under the app bar), ribbon:card, ribbon:search (the closed command search at the end of the ribbon’s tab row), workspace_switcher, document_tab, app_bar:<action>, app_bar:donate and app_bar:discord (the community pills before Report a bug, while Preferences show them; a click opens the page in the browser only when it comes from the window, never from ui.click, which leaves the link in the status), app_bar:donate:hide and app_bar:discord:hide (each pill’s ×, which hides it and is remembered), browser, viewport, nav_bar, nav_bar:<slot> (orbit, pan, zoom, fit, home, visual_style, display), axis_view, selection_bar, legend (while results are shown), context (the right cards together), context:form, context:refused, context:properties, context:seed, context:mesh, context:results, context:reply (each card while shown; up to three at once: the transient card (a command form or refusal), the active Inspector card (reply, selection’s properties, seed, or mesh), and Results), timeline (the History card), toast (the status message, while shown), start_page (the start page, while it is up in the workspace’s place: at launch with nothing to open and from the application bar’s Home), start:<entry> (its rail and tiles: back, start, new, open, recover, settings, crash_reports, report_bug, tile:new, tile:open, tile:design, tile:mesh, tile:deck; samples open with file.sample), status_bar (while Settings shows it), toolbar_dropdown, palette), version
ui.setany view setting: style (shaded_edges, shaded, wireframe), show_nodes, show_geometry, show_mesh, show_loads (boundary condition and load symbols), show_interactions (reference points, couplings, contact and tie surfaces, rigid walls), symbol_size (the setup symbols’ size on screen in points, 6–48, at any zoom), result_symbols (the shown step’s setup symbols over a results plot; off by default), result_extremes (markers at a contour’s largest and smallest value), perspective, dark, show_tree (the browser), browser_width (the browser card’s width in points, finite within 170–620; values outside range are an error), browser_collapsed (folded to its header), browser_float (translucent over the view), browser_eye_left (each row’s eye beside its fold arrow instead of at its end; the four remembered per user), show_timeline, nav_preset (the mouse navigation: fieldcraft, fusion, solidworks, inventor, alias, tinkercad, openscad; an unknown id acts as fieldcraft) and reverse_zoom (both remembered per user), workspace (prepare, model, analysis, results), tab (the toolbar tab: geometry, mesh, properties, assembly, steps, loads, interactions, solve, results, tools; a tab of another workspace brings that workspace), palette (the command search open), menu (the open menu: file, help, workspace, view, more, or a panel’s drop-down as <tab>/<panel> such as mesh/Tet; null closes it)an unknown setting or value is an error; returns the settings
ui.reset_layout—resets workspace panels to their default zones, sizes and visibility (Browser open on the left, History open at the bottom, opaque browser), as View › Reset Layout and Preferences › General › Reset Layout do, and saves preferences; returns {ui, panels}
ui.viewview: front, back, left, right, top, bottom, iso, home (iso and fit), fitevery view frames the model as drawn (the deformed shape included; the setup’s symbols keep their size on screen and are not framed) in the part of the viewport the overlays (layout’s legend, selection_bar, axis_view, nav_bar) leave free; fit keeps the direction of view. Opening another model, sample or design frames it in the home view (the same design opened again after an edit keeps the camera), and results that come up with part of the model out of sight are framed. Returns the camera
ui.camerayaw, pitch (degrees), distance? (in the display units’ length, like target’s point), target?, fit?, fov? (degrees)turns the camera to any orientation about its target (with target, [x, y, z] or {"center_of": "mass" | "bbox", "bodies"?} as MCP screenshot’s camera (docs/mcp.md), it moves to look at that target from distance, from the distance that fits the targeted bodies with fit, or from the one that keeps the whole model in view from every side; fov sets the perspective, 0 orthographic): yaw about Z (0 looks along +Y, the front view; −45 is the iso view’s, −90 the right view’s), pitch the elevation above the XY plane; distance moves the eye (the zoom of an orthographic view). Angles must be finite and the distance above 0: the yaw is wrapped, the pitch clamped to ±90 and the distance to 1 µm–10⁹ m; anything else is an error. A sequence of calls orbits smoothly. Returns the camera (ui.inspect’s: angles in radians, distance and target in the display units)
ui.pathpicking? bool, clear? bool, at? [x,y] in window pointsThe Path Plot editor’s genuine viewport surface-pick action; changes the local draft only. picking: true enables clicks, clear empties draft vertices, and at reaches the same ray/triangle-to-reference-FE mapping as a pointer click (also on deformed/curved faces). Replies with typed params, point count, picking and added; a miss has added: false. Sampling/export uses the ordinary results.path engine command. No native file picker is opened. ui.inspect.path_plot reports this draft.
ui.toolbar—the ribbon: workspace, workspaces, tab, tabs (the workspace’s), menu (the open menu), panels (each panel label’s menu key and rect), and every catalogue entry (docs/features.md) with id, label, tab, panel, command (null while coming soon), more (its related commands), coming_soon (the milestone, or null), enabled (false while coming soon or while its command misses what it needs), unavailable (null, or what its command misses: reason, the tooltip’s lines such as “Needs a material — Properties › Material”, and missing, each with requirement, what, provider (the command that provides it) and place (its toolbar entry)), fit — full (a button), collapsed (its panel is one button), more (its panel is in the » menu) or menu (in its panel’s drop-down) — and rect (screen points, last frame, on the shown tab; for menu entries the row while the drop-down is open)
ui.startcommand: a command or toolbar entry idlike a click on the toolbar, a drop-down row or a search result: a command without parameters runs, one with parameters opens its form in the context panel; an entry that is coming soon is an error naming its milestone. Never opens a native file picker: file entries (open, save as, write deck) open their command’s form
ui.selectkind (set, material, section, step, boundary_condition, load, reference_point, coupling, contact, tie, fluid_domain), name; nothing to deselectselects a definition as a browser click does; its properties (with Edit and Delete) show in the context panel
ui.select (viewport)any of filter, box_mode, mode, clear, at, box, geometry, nodes, elements, faces (and no kind)changes the viewport’s selection (see Selection); returns ui.selection’s reply
ui.selection—the viewport’s selection: filter, box_mode (box selection on), count, capped, summary, items, params (the selection as a set’s members), hover (what a click would pick under the pointer)
ui.promptanswer: for unsaved save, discard or cancel; for design new (a new model with the design), keep (the design over the current model) or cancel; for replace_mesh replace (runs the form, replacing the mesh) or cancel (the form stays open); for delete (the item menu’s Delete… or the Delete key: {delete: question, kind, name, users, allowed, deactivate}) delete (with a datum’s partitions when it has any; answered not allowed: … when allowed is false, the prompt staying up), deactivate (when deactivate names it: a boundary condition or load in use is switched off in its steps and the prompt asks again, now to delete) or cancel/close; for recover recover (with id from file.recovery.list) or close; for samples open (with name) or close; for crashed (the start after a crash: {crashed: [reports]}) report (opens Report a Bug for the newest) or close; for crash_reports (Help › Crash Reports…, or ui.start diagnostics.crash_reports: {crash_reports: [reports]}) report (with id: opens Report a Bug for it), delete (with id), delete_all or close; for report_bug ({report_bug: draft}) set (any of title, observed, share_session, include_model; replies with the draft) or close — the browser opens only from a click (docs/crash-reports.md); for consent (the first run’s question about anonymous usage) share or decline; for update (a downloaded and verified update: {update: state}) restart (saves or asks about unsaved changes first, then closes the window to install) or later (installs when the app quits)answers the window’s question (ui.inspect’s prompt)
ui.settingspage? (general, privacy, updates), set? (any of units (a preset such as "m-kg-s-N-Pa" or {"preset", "overrides"}, docs/units.md), language (system, en, fr, he, ko (desktop only); iw is read as he), history_dock (top, bottom), usage_sharing, usage_automation, update_check, update_skip (a version, "" for none), browser_float, browser_eye_left, status_bar), press? (ok, cancel (puts back what the window found), apply, defaults (the page shown))opens Settings (the kit’s Preferences window) or acts on it as its pages and footer do; replies {open, page, apply_pending, usage_available, updates_available, values} (also ui.inspect’s settings)
ui.itemkind (body, surface, or a definition kind as ui.select takes it, datum, partition), name, action: edit, rename, suppress/unsuppress (a datum or partition), hide, show, isolate, show_all, delete, or activate/deactivate with stepan item menu’s entry, as a right click on the item and a click on the entry: runs the same command (rename opens the model.rename form filled in; delete opens the delete prompt, answered with ui.prompt)
ui.dialogparams? (JSON object, fills the form), use_selection?, run?, submit?, cancel?drives the open command form, in that order; use_selection is the form’s Target row (see Selection); run returns the command’s result and closes the form on success; submit is the form’s OK button: a mesher that would replace a body’s mesh first asks (prompt replace_mesh, with the question and what else goes: sets listing the old labels, solved results), and meshers run in the background (busy); a form opened by another form’s Create … button (a reference field with nothing to pick) goes back to that form on run (with the new item picked) or cancel
ui.clickx, y (screen points), button?: left/right/middle, shift?, ctrl?, alt?, double?real pointer input; in the viewport a click selects what is under it (Shift adds, Ctrl/Cmd adds or removes, a click on nothing clears the selection), and on a results plot a plain click probes the nearest node of the face under it instead (solve.probe; ui.inspect shows the values; Shift or Ctrl/Cmd still selects, drawn as an outline over the contours); with the Relax Nodes form open (mesh.node.relax) a click on the mesh places its sphere of influence instead (Alt + wheel sizes it)
ui.movex, y
ui.dragx0, y0, x1, y1, button?, shift?, ctrl?, steps? (1–200)press, move, release: in the viewport the drag does what the navigation preset (ui.set {nav_preset}) binds; by default a left drag orbits about the model point under the press, or the centre of what is drawn from empty space (with box selection on, it selects the visible nodes, element faces or elements in the box; Ctrl + left from empty space still orbits), a right or middle drag (or Shift + left) pans
ui.scrollx, y, delta? (wheel lines, −100–100; positive zooms in)zooms toward the model point under x, y (the point at the target’s depth over empty space), by the same factor per line in orthographic and perspective views; ui.set {reverse_zoom} turns it the other way
ui.keykey (egui key name, Enter, Escape…), cmd?, shift?F over the viewport frames the model; Escape clears the selection (and then cancels an open form)
ui.texttexttyped text (into the focused field)
ui.droppaths: 1–16 file pathsdrops the files on the window: the next frame opens them as a drop from the file manager does, and as a file picked in the Open dialog does (a .fieldcraft model, a SolidCraft design, a CAD file (STEP, IGES; FreeCAD and Rhino in native builds), a triangle mesh (3MF, STL, OBJ, PLY, glTF), or a .msh orphan mesh, the list following SolidCraft’s format table (fieldcraft_geometry::formats); ui.inspect’s busy while they open). The native picker cannot be driven over the channel; this is the same route
ui.worldToScreenpoints: [[x, y, z]…] (at most 1000, in the display units)screen points in the viewport drawn last frame (null when not on screen)
ui.resizewidth, heightwindow inner size in points (a maximized window is restored first)
ui.fullscreenon? (default true)into or out of full screen; on macOS the title bar’s left group moves into the traffic lights’ room while there are none
ui.screenshotpath?PNG of the window, taken a few frames later; waits for a presented frame; when none comes within 8 seconds (a hidden window, a locked screen) it answers with ui.capture’s offscreen picture ("offscreen": true). Without path: fieldcraft-shot.png in the temporary folder
ui.capturepath?, width?, height? (points; default the window’s), scale? (pixels per point, 0.5–4; default the window’s)PNG of the whole window (title bar, ribbon, open menus and search, in-window panels, forms and the viewport) drawn offscreen, without fade-in animations: the UI pass runs in a separate egui context and is rasterised on the CPU, so it works with the window hidden, minimised or the screen locked. Panels popped out to secondary native OS windows are omitted from the single-window capture while ui.inspect.panels continues to report them and saved panel preferences are left untouched. At most 8192 pixels a side and 16 megapixels. Without path: fieldcraft-shot.png in the temporary folder
ui.renderpath, width? (default 1280), height? (default 800): whole pixels, each 1–8192 and at most 16 megapixels in all; scale? (pixels per point, 0.5–4, default the window’s)CPU render of the model with the current camera, view settings and selection highlight (no window or GPU needed). Symbols, lines and nodes are sized in points, so a render at the window’s device resolution matches the window. A size out of range, or a scene over 20 million primitives, is an error
app.quit—closes the window

Selection

The viewport’s selection belongs to the window, not the model: there is no engine command for it, and nothing about it is saved or journalled. What is selected is kept in the model’s persistent terms, so it reads as a set definition: geometry by name ({"body", "face"}, or edge, vertex, or the body alone; a face picked on the mesh is named through the mesh’s geometry tags, so it stays selected through a remesh) and the mesh by label (nodes, elements, element faces as {"element", "face"}). Labels the model no longer has drop out after an edit.

ui.select on the viewport takes, in this order:

  • filter: what a pick selects: faces, edges, vertices, bodies (geometry), nodes, element_faces, elements (the mesh). The selection bar at the top of the viewport shows it.
  • box_mode: true or false turns box selection on or off (a left drag draws the box).
  • mode: how the items change the selection: replace (default), add, remove, toggle.
  • clear: true: empty the selection first.
  • geometry, nodes, elements, faces: items by name and label, as model.set.create takes them (at most 100 000 in each list; labels from 1).
  • at: [x, y] in window points: pick there as a click does, with the filter (nothing under the point selects nothing; with replace it clears the selection).
  • box: [x0, y0, x1, y1] in window points: the visible nodes, element faces or elements inside the box (other filters refuse a box). Faces in front hide what is behind them.

A selection holds at most 100 000 items; past that it is cut and capped is true. Picking runs on the CPU against the triangles the viewport draws (on the GPU too), with a watertight ray–triangle test: the nearest face wins, nodes, vertices and edges are the nearest on screen within a few pixels that are not hidden, and ties go to the lower index, so the same pick gives the same answer every time.

Command forms that apply to part of the model have a Target row with Use selection (ui.dialog {"use_selection": true}): model.set.create and model.set.edit take the selection as members; model.boundary_condition.*, model.load.*, model.section.* and model.coupling.* get a set made from it (model.set.create, named after the definition: Clamp-set, then Clamp-set-2…) in target: {"set"} or set. A right click in the viewport offers Create set from selection, which opens model.set.create’s form filled in.

{"id":1,"method":"ui.view","params":{"view":"right"}}
{"id":2,"method":"ui.select","params":{"filter":"element_faces","box":[300,120,1100,700]}}
→ {"id":2,"ok":true,"result":{"count":8,"params":{"faces":[{"element":20,"face":4},…]},…}}
{"id":3,"method":"ui.start","params":{"command":"model.set.create"}}
{"id":4,"method":"ui.dialog","params":{"params":{"name":"end"},"use_selection":true,"run":true}}

Files

User clicks (title bar File menu, toolbar entries, Cmd/Ctrl+O, S, Shift+S), drops on the window and files named on the command line go through native file pickers and open in the background (ui.inspect’s busy); commands sent here take their paths as parameters and run at once (file.open, file.save_as, geometry.open, geometry.import.mesh, deck.write).

Jobs

engine.execute of a solve (solve.run, solve.static, solve.nonlinear, solve.heat, solve.frequency, solve.buckle, solve.explicit, solve.fluid) or a mesher (mesh.tet.generate, mesh.hex.*, mesh.node.relax, mesh.plan.apply, mesh.cells) or a partition (geometry.partition) or an open (file.open, file.recover, file.sample, geometry.open, geometry.import.mesh) runs it off the window thread, as the Solve button, a mesher form’s OK and the Samples window do: the window keeps drawing its progress (step, stage and count, elapsed time) with Cancel. The reply is the command’s result when it ends, however long that takes; with "wait": false it is {"job": n} at once, and job.status, job.wait and job.cancel follow it. Cancel (the button or job.cancel) interrupts the running command: every solver and mesher checks for it at its natural points (increments and Newton iterations, time steps, fluid steps, Lanczos blocks, the factorization’s supernodes, the tet mesher’s refinement and improvement passes, the hex meshers’ attempts) and stops with cancelled, leaving the model unchanged. One job runs at a time; another long command meanwhile is refused, naming the job. The MCP server’s solve and mesh tools wait for the reply.

Heated flow results

A solved fluid step with temperature in every saved frame offers temperature in the Results field list and through results.contour, results.slice, results.surface and results.streamlines ({"field":"temperature"}). Slices and obstacle surfaces sample fluid-cell temperature; streamline colours sample temperature along the velocity traces. The legend and existing solve.probe use the model’s temperature scale, without conversion. An isothermal step hides the field and rejects an explicit request with an explanation. The frame slider and results.frame select the field’s time, including the initial frame.

results.surface {"field":"wall_heat_flux","frame":10} shows the signed heat received by each obstacle face divided by that face’s complete tessellated geometric area. Positive values heat the wall; a hot wall heating the fluid is negative. This is a face average, not a resolved local distribution. The legend uses the model’s consistent power/area unit: for mm–tonne–second it is mW/mm² (not W/mm²); other systems follow their own units.

Wall heat uses the recorded face-group histories, linearly interpolated at the shown frame only between recorded times. The initial frame precedes the history and remains uncoloured; no heat is invented or extrapolated. Recorded adiabatic faces are zero. Unrecorded/imported faces remain in their own colour. The command reply includes wall_heat.faces with body, face, area, power and flux (null when unavailable), plus the sign and sampling convention. This surface-only field suppresses the slice and leaves streamlines plain; selecting a cell field restores the saved slice settings. results.contour also selects the wall field and controls its bands/range. The desktop and headless picture use the same mapping and palette.

The .fieldcraft file (format fieldcraft/4)

A .fieldcraft file holds one model: its definition, its mesh, the geometry it is built on, the commands that built it and, unless a save leaves them out, its solved results. It is written and read by fieldcraft-io (write, read; bytes in, bytes out, so the browser build uses the same code) and by the commands file.save, file.save_as and file.open.

Package

The file is a ZIP package of four parts, then the optional ones, in this order, all stored uncompressed (so any unzip tool reads them: unzip -p bracket.fieldcraft model.json):

PartContent
fieldcraft.jsonManifest: format ("fieldcraft/4", Versions), generator ("FieldCraft 0.7.0"), geometry, view (left out when empty), run (left out when empty), and parts: the byte size and SHA-256 of each other part.
model.jsonThe model definition, every quantity in SI (docs/units.md): its display units (display_units, left out when the model has none of its own), sets, materials, sections, reference points, couplings, boundary conditions, loads, steps, datum planes, axes and points, and the partitions that cut the geometry (in order; applied again when the design is opened). Pretty-printed JSON with a fixed key order (maps sorted by name), so a change shows as a line diff. Its form is the model’s own JSON form, which commands take as parameters.
mesh.binNodes, elements and geometry tags, binary (below).
journal.jsonThe commands that built the model, {"units": system, "commands": [{"command": id, "params": {...}}, ...]}, one command per line, as they were typed: units names the display system their bare numbers are in (a number typed in another system carries its unit, {"value", "unit"}); a migrated journal also names model_units, the system its model-level numbers were in. It is a script fieldcraft-cli run replays (a plain list of commands is a script in the session’s units).
geometry/<file>Optional: a copy of a geometry file the model is built on, when the file was saved with its geometry embedded (below).
results.binOptional: every solved step’s latest result, with the hash of the definition it was solved from (below). file.save writes it unless given results: false.

The same model gives the same bytes on every platform: entry times are fixed (1980-01-01), permissions are fixed, and every map is written in sorted order. To diff two versions with git, add *.fieldcraft diff=fieldcraft to .gitattributes and git config diff.fieldcraft.textconv "unzip -p"; the definition and the journal show line by line, the mesh part as binary.

Geometry

"geometry": {
  "design": {"path": "plate.solidcraft", "sha256": "…"},
  "meshes": [{"path": "/parts/tet.3mf", "sha256": "…"}, {"path": "part.stl", "sha256": "…", "unit": "in"}]
}

design is the SolidCraft design (geometry.open), meshes the triangle files (geometry.import.mesh) in import order. Each records the SHA-256 of the bytes that were opened. A mesh read in a unit of its own (geometry.import.mesh’s unit, for files that state none) records that unit’s symbol in unit (format 4), and is read in it again; without unit it is read in millimetres. Paths inside the model file’s folder are stored relative to it (with /), others absolute. Opening the model opens each file again: a missing, unreadable or changed file (its hash differs) is reported as a warning and the model still opens; sets bind to geometry names, so a remesh brings the mesh in line with a changed design. A geometry file that could not be opened keeps its reference, so saving again does not lose it.

A file can also carry a copy of each geometry file (file.save/file.save_as with "geometry": "embed", File › Save With Geometry Embedded): each is a part geometry/<file name> and its reference names it, {"path": "plate.solidcraft", "sha256": "…", "embedded": "geometry/plate.solidcraft"}. The reference stays the source: the copy is opened only when the file it names cannot be read (missing, unreadable or outside the folders an automation client may read), with a warning saying so; a file that changed is still opened from its path, as without a copy. A model opened from such a file is saved with its geometry embedded again unless a save says "geometry": "refer". References are the default: a packed file holds the design and meshes themselves, so whoever gets it gets the geometry too (file.save’s reply lists what a file holds in contents). A content shared by several references is one part; the copies are checked like every part, must be the content their reference’s SHA-256 names, and each part must be the copy of a reference (no other part is accepted); a part is at most 512 MiB.

view is view state, not part of the definition: the items the viewport hides (view.hide, view.isolate), as {"hidden": [{"kind": "datum", "name": "Sym"}, …]} with kind one of body, surface, datum, boundary_condition, load, reference_point, coupling.

view also keeps the saved result views (view.save) and the one shown when the model was saved, which opening it shows again (once its step has a result, from results.bin or a solve):

"view": {
  "views": [{"name": "Cutaway", "units": "mm-t-s-N-MPa",
             "camera": {"yaw": -70, "pitch": 18, "fit": true},
             "results": {"step": "Flow", "frame": 10,
                         "contour": {"field": "temperature", "bands": 12, "range": {"min": 25, "max": 45}},
                         "slice": {"axis": "x", "position": 14.9},
                         "surface": {"show": false},
                         "streamlines": {"show": true, "count": 64, "max_steps": 4000}}}],
  "current": "Cutaway"
}

Each part is the parameters of the command that sets it: camera is ui.camera‘s (and the MCP screenshot tool’s), deformed, contour, slice, surface and streamlines are those results.* commands’ (without step), mode and frame the number results.modes and results.frame take. units names the system their bare numbers are in, as a journal’s header does: they are read in it whatever the model is shown in. Showing a view (view.restore, or opening the file) runs those commands in turn and aims the app’s viewport (or the next MCP picture) at the camera; what no longer applies (a field the step has not) comes back as a warning. At most 1000 views, names 1 to 64 characters; current names one of them. The view state is outside the definition: it is not in model.json and not in a result’s definition hash.

view keeps the renders too (results.render.save): how a saved view becomes a clip.

"renders": [{"name": "Airflow clip", "view": "Cutaway", "step": "Flow", "frames": "all",
             "fps": 12, "hold": {"each": 2, "last": 16}, "size": [1280, 720],
             "caption": "AIO radiator · fan air through the channels", "legend": true,
             "time_label": true, "format": "png-sequence"}]

view names a saved view; step the step whose frames play (the view’s when left out); frames is "all" or [from, to] (from 0, inclusive); each picture shows for hold.each frames of the clip and the last for hold.last, at fps (1 to 120); size is the picture in pixels (16 to 4096 a side), with a caption bar under it when there is a caption, a legend or a time_label. Left out, a field takes these defaults: all frames, 12 fps, holds of 1, 1280 × 720, legend and time label on. results.export.animation {"render", "path"} draws it offscreen, picture by picture, with the host’s GPU pipeline (the CPU rasterizer without one), and writes the pictures beside path as <stem>_00000.png, <stem>_00001.png, … (each repeated for its hold); the only format is png-sequence: FieldCraft bundles no video encoder, and the reply’s ffmpeg is the command line that encodes the sequence as path (an .mp4 or .gif). At most 1000 renders, each starting from a saved view (a view a render uses is not deleted).

run keeps each step’s preferred run settings (solve.settings), a preference outside the definition (not in model.json, not in a result’s definition hash):

"run": {"Flow": {"backend": "gpu", "fallback": "cpu"}}

backend is gpu or cpu, fallback (cpu, or left out to refuse) what a GPU preference does on a machine with no suitable GPU: solve.fluid and solve.run without a backend of their own follow the preference, falling back with a notice in the reply (and the Solve dialog’s note). A machine overrides every preference with FIELDCRAFT_SOLVE_BACKEND=cpu|gpu, a call with its own backend. Only fluid steps choose a backend today; settings of steps the model no longer has are not saved.

mesh.bin

Little-endian:

"MCMESH02"                                    magic (the mesh encoding's version is 02: coordinates in metres)
u64 nodes, u64 elements, u64 entities, u64 tagged elements, u64 tagged nodes
nodes      × { u32 label, f64 x, f64 y, f64 z }             labels strictly ascending
elements   × { u32 label, u8 kind, u32 node × n(kind) }     labels strictly ascending
entities   × { u8 kind (0 body, 1 face, 2 edge, 3 vertex),
               u16 length, body name, [u16 length, entity name] unless a body }   UTF-8
tagged elements × { u32 element, u32 region (0xFFFFFFFF none),
                    u8 n, n × { u8 face, u32 tag }, u8 n, n × { u8 edge, u32 tag } }
tagged nodes × { u32 node, u32 tag }

Element kind codes: 1 rod2, 2 beam2, 3 tri3, 4 tri6, 5 quad4, 6 quad8, 7 tet4, 8 tet10, 9 wedge6, 10 hex8, 11 hex20, 12 rod3, 13 pyramid5. Node order is the model’s (Abaqus/VTK). A tag indexes the entity list, which lists each geometry entity once. Coordinates keep every bit (signed zero included).

results.bin

The results part keeps what each solved step’s solver reported, so a model opens showing its results without solving again (results.contour, results.frame, results.slice, results.streamlines, solve.probe and the rest work at once). Little-endian:

"MCRSLT06"                     magic (the results encoding's version is 06)
u32 steps
steps × { u64 length, step name (UTF-8),
          32 bytes: SHA-256 of the definition it was solved from,
          u8 kind (0 static, 1 frequency or buckling, 2 heat transfer, 3 explicit dynamic, 4 fluid,
                   5 cavity),
          u64 length, the result }                                     names ascending

Kind 1 holds a frequency step’s result with a last field, buckling, that is empty for a frequency step and holds what the eigenproblem found (negative load factors, shift) for a buckling step, whose modes’ eigenvalues are load factors. In memory they are two result types, a frequency result and a buckling result: reading splits kind 1 by that field, so a file written before the buckling result had a type of its own opens its buckling steps as buckling results, and a file written now keeps the layout older versions read (the version in the magic did not change).

The result is the solver’s own, every number in SI and every bit kept: a static step’s displacements, rotations, reactions, nodal, element and integration point stresses, shell and beam forces, reference points, contacts, and a nonlinear step’s increments with a frame per converged increment (its displacements, reactions, nodal stresses and contact states); a frequency or buckling step’s modes; a heat transfer step’s temperature frames, fluxes and heat flows; an explicit step’s field frames, histories, energies, contacts and eroded elements; a fluid step’s lattice (origin, spacing and cells), its cell fields per frame (velocity, pressure, temperature, and a density where the result carries one), wall forces, heat and fan and porous zone histories, run statistics and steady-state monitors. It is written in a compact binary encoding (fieldcraft_io::codec): fixed-width numbers, a u64 count before a list or text, one byte before an optional value and before each field of a structure, a u32 before a variant. The encoding follows the order of the solvers’ result types, so it has a version of its own in the magic: a change to the bytes they encode to is a new version. A file whose results are of another version opens without them, with a warning to solve again: results are what solving gives again, the definition is not. Fluid results include their solve-time density and optional specific heat as regular fields. Port mass and sensible-heat transport therefore use the properties of the saved run even if the model’s material is edited later. Version 04 adds these fields; earlier results encodings open without results and keep the model definition. Version 06 adds a fluid frame’s per-cell density (results read from a compressible solver; empty otherwise). A file with an earlier results encoding opens without its results: solve again.

The definition hash is the SHA-256 of what solving the step reads (the mesh, the definitions the step uses and the step itself, as their JSON) and of the hashes of the geometry files the model is built on. On opening, a result whose hash is the model’s is current; any other is kept and shown as stale, with a warning (file.open’s results lists each step with stale), and an edit that brings the model back to its definition makes it current again. Editing the model marks results stale as it does in a session. A solve is an unsaved change, since the file keeps results; autosaves, crash reports and bug reports keep none.

Reading a file safely

Every file is treated as hostile:

  • The file is at most 8 GiB; the manifest, definition and journal parts at most 256 MiB each. No allocation is larger than the input.
  • Only the parts the manifest lists, each once: the four, and results.bin and geometry/<file> parts when they are listed (format 3 and later; older formats list exactly the four). The ZIP CRC and the manifest’s size and SHA-256 are checked for every part.
  • The format is read first, before anything else in the file: a later fieldcraft/N is refused as a version error naming the program that wrote it, any value that is not fieldcraft/<N> as not a FieldCraft file. Unknown fields are errors (after migration).
  • mesh.bin: counts are capped (50 million nodes and elements, one million entities) and checked against the bytes present before anything is read; labels must ascend; unknown kinds and trailing bytes are refused.
  • results.bin: at most 10 000 steps; every length and count is checked against the bytes left before anything is read for it (each element takes at least one byte, so nothing is allocated beyond a small multiple of the part); unknown kinds, malformed values and trailing bytes are refused; every result is checked before it is used: its step name, ascending node and element labels, per node, element and cell arrays the lengths of what they follow, a fluid grid of 1 to 2³² − 1 cells with a finite origin and a positive spacing. A file is at most 8 GiB in all; a save that would write more is refused, naming results: false.
  • The model is rebuilt through the same checked methods commands use: names, references, finite coordinates within ±1e9, element connectivity, tag dimensions. A file cannot hold what commands would refuse.

Versions and migration

format is fieldcraft/<N>, N an integer that grows by one with every change to what a file holds or how it is encoded. A part with an encoding of its own carries that encoding’s version too: mesh.bin starts with MCMESH02; a new mesh encoding is a new magic, brought in by a new format.

FormatWritten byChange
fieldcraft/1FieldCraft 0.4.0 to 0.7.0the first format
fieldcraft/2FieldCraft after 0.7.0versioning and migration; the parts hold the same as format 1
fieldcraft/3FieldCraft after 0.7.0SI storage (#579): model.json in SI with display_units in place of units, mesh.bin MCMESH02 (coordinates in metres), the journal with a header naming its units. Step 2 → 3 scales by the file’s declared units (unspecified as mm-t-s-N-MPa) with its own frozen field map and MCMESH01 codec; the journal’s numbers are kept as typed. Before its first release it also gained optional parts and fields, each absent in a file without it (so every format 3 file written before them reads as it did): results.bin (#644), saved views (#645) and renders (#646) in view, embedded geometry parts (#647), run in the manifest (#648), and shear-dependent fluid viscosity in a material’s fluid (power_law, carreau_yasuda, cross, cross_wlf, #156).
fieldcraft/4FieldCraft after 0.8.1an imported mesh’s optional unit (#1049): the length unit a unitless mesh file (STL, OBJ, PLY) was read in. A format 3 file has none, which means millimetres, so step 3 → 4 changes only the tag. Format 3 was released (0.8.0), so the field comes with a new format: FieldCraft 0.8 refuses a file that may carry it with its “update FieldCraft” message rather than an unknown-field error.

Format 3 was not yet written by a release when its optional parts were added, and every addition is optional (absent means what a file without it always meant), so they are part of format 3 rather than a format 4 with a step that would only change the tag: no released FieldCraft reads format 3, and every format 3 file opens unchanged.

FieldCraft reads every format up to its own. A file of a later one is refused, before anything else in it is read, with a message naming what wrote it: “this model was made by FieldCraft 0.9.0 (format 4); FieldCraft 0.8.0 reads formats up to 3. Update FieldCraft to open it.”

An older file is migrated as it is read (fieldcraft-io, migrate.rs). The package is checked as it is on disk (the four parts, their sizes and SHA-256); then the JSON parts are parsed as plain JSON, mesh.bin kept as bytes, and the steps N → N+1 run in order up to the current format; only then are the parts read into the model, with every check a current file gets.

  • A step is a pure function of the parts: the same file always gives the same model.
  • A step is never edited once a release has written its format. Files that went through it are out there and later steps build on its output; a mistake is fixed by a new step and a new format.
  • Every released format keeps fixtures: real files written by every release that wrote it, one folder per release (crates/io/tests/formats/v<N>/<version>/, never edited; format 1 has 0.4.0, 0.5.0, 0.6.0 and 0.7.0), each with what that release’s own reader gave for it. The tests open every one and check that the current reader gives that record, changed only as the migration steps say (compared as raw JSON), that each step does only what it says on the real files, and that saving the migrated model and reading it again gives the same model and the same bytes.

Saving

file.save writes the bytes to a temporary file beside the target, flushes it, keeps the old file as <file>.bak, renames the new file over the target and flushes the folder: a crash at any moment leaves the old file or the new one. A path that exists and is not a regular file is refused.

Opening a file never writes anything, whatever its format. A model opened from an older format is marked as migrated (migrated_from in file.open’s reply; the document tab shows “(from format N)”), and so is work recovered from an autosave of one. A save replaces a file only when there is none or it is positively a model of the current format; anything else (an older model it was migrated from, a later one, a damaged one or one whose manifest cannot be read, or any other file a Save As picks) is first copied beside it, flushed to disk: <stem>.v<N>.fieldcraft (bracket.v1.fieldcraft) for a model of format N, <stem>.backup.<ext> for anything else. The reply reports it as backup. The copy never replaces a file: when the name is taken, the next free one is used (bracket.v1-2.fieldcraft, …), and when no copy can be made the save is refused and the original stays as it was. Later saves replace <file>.bak as always, but not the copy. The browser build saves by download, which replaces nothing, so it keeps no copy.

Nothing else FieldCraft writes where a user points it (decks, STL, VTU and CSV exports, XY tables, pictures from the control channel, MCP and fieldcraft-cli snapshot) replaces a FieldCraft model or a SolidCraft design: a target that is one, by its extension or by its content, is refused with “choose another file name” (fieldcraft_io::fs::write_output).

Autosave and recovery

The desktop app autosaves every 30 seconds while there are unsaved changes, into the recovery folder: FIELDCRAFT_RECOVERY_DIR when set; else, in runs driven by automation (--control, FIELDCRAFT_CONTROL_PORT) and on CI (CI set), a temporary folder (fieldcraft-automation/recovery in the system’s temporary folder, beside that run’s recent files and preferences), so they never add to the user’s recoveries; else FieldCraft/recovery in the per-user data folder. An entry is <id>.fieldcraft, <id>.json (the model’s own path, time, counts) and <id>.lock, held while the app runs. Saving (or undoing back to the saved state) drops the autosave. An autosave is written only into the recovery folder, never over the model’s own file. After a crash, the next launch reports the entries; file.recovery.list lists them newest first, file.recover opens one as unsaved work under its original path, and file.recovery.discard deletes one or all of them (File › Recover… shows each with its name, age and counts, with Recover, Discard and Discard all).

Entries prune themselves: each launch deletes left-behind entries older than 14 days, and those whose model’s own file was saved after the autosave (the file’s modification time is later than the entry’s). Entries of running apps are never touched.

Face-tagged meshes (3MF with B-rep face tags)

Besides opening a SolidCraft design or a CAD file, geometry can enter FieldCraft as a triangulated boundary surface written by another program, with each triangle tagged by the B-rep face it lies on. FieldCraft reads it into a SurfaceMesh (fieldcraft_geometry::tagged_mesh, command geometry.import.mesh) without involving the kernel.

An imported surface is triangles without a B-rep: it is shown, used for reference and as a fluid obstacle (its face tags name the faces whose wall forces and heat are reported), and mesh.surface.check checks it, but it is never volume-meshed. mesh.tet.generate, mesh.hex.generate, mesh.hex.sweep, mesh.hex.mapped, mesh.hex.octree, mesh.hex.project and mesh.cells need a design body and refuse a surface, tags or not, naming its file and the way out: open the CAD file it came from (#1049). geometry.stitch closes its gaps under a tolerance, so that it bounds a solid as an obstacle needs.

Other triangle files

STL, OBJ, PLY and glTF files import through the same command, read by SolidCraft’s mesh readers (fieldcraft_geometry::triangles); which extensions these are comes from SolidCraft’s format table (fieldcraft_geometry::formats). Each mesh in the file becomes one surface with one face.

  • Units. STL, OBJ and PLY state no unit: they are read in the command’s unit (millimetres by default), as is a 3MF whose model states none. The unit is kept with the model (format 4), so opening it again reads the file alike. A 3MF that states its unit, and glTF (metres by its specification), are read in their own, and a unit for them is refused. The reply gives the unit read in and the bounding box’s size in the display units, which is what shows a file read in the wrong unit.
  • STL. A binary STL has no signature, so its size is its check: exactly 84 + 50·n bytes for the n triangles its header gives. Anything else that is not ASCII STL (it starts with solid and has facets) is refused, as is an ASCII facet without exactly three vertices, a file cut off inside a facet, and any coordinate SolidCraft’s reader would leave out (not finite, or not below 10⁹): a facet left out would leave the surface open where the file is damaged.
  • Left out. SolidCraft’s readers leave bad OBJ lines, PLY faces and glTF parts or placements past their caps out with only a warning; FieldCraft refuses such a file, naming what was left out. Warnings that leave no geometry out (a glTF’s textures, skins and animations) are passed on in the reply.
  • Limits. SolidCraft’s readers cap the file size and the vertex and triangle counts, the result is held to the limits below, and the call runs under SolidCraft’s panic guard, so a damaged file is an error.

The format is SolidCraft’s

SolidCraft defines and writes the format (File → Export 3MF with Face Tags, file.export with format: "3mf-tagged"). The specification is docs/formats/3mf-face-tags.md in the SolidCraft repository. In short:

  • The file is an ordinary 3MF Core 1.3 package.
  • Each <triangle> carries ft:face (its 0-based B-rep face index), and each <object> carries ft:faces (its face count).
  • The namespace is https://github.com/bherbruck/solidcraft/formats/3mf-face-tags/2026/10 (version 1). It is not listed in requiredextensions.
  • Coordinates are written in shortest round-trip f64 form, so they read back exactly.
  • Within an object, either every triangle is tagged or none is.

FieldCraft follows that specification and does not extend it. Because the format is 3MF, untagged 3MF from any other program goes through the same reader, with one face per object.

What FieldCraft’s reader does

  • Surfaces. Every build item becomes one TaggedSurface: a SurfaceMesh with its name and face count. Lengths are converted to millimetres from unit. The surface is named after its object, or Mesh<n> when the object is unnamed.
  • Transforms. An item’s transform is applied, and a mirroring transform reverses the winding. A singular transform (one that flattens the object) is refused. Components are not read yet; the reader returns an error that says so.
  • Tags.
    • Tags are matched by namespace URI, not by prefix.
    • An untagged object becomes one face (tag 0), and an unknown face-tag namespace reads as untagged.
    • An object that mixes tagged and untagged triangles is rejected, as is any tag not below ft:faces.
  • Limits. All input is treated as untrusted:
    • The file is at most 512 MB and must be a regular file, read through the virtual file system.
    • Each part is at most 1 GB uncompressed, in at most 10 000 zip entries.
    • At most 20 million vertices and 20 million triangles, counted over every placement.
    • At most 10 000 build items, and XML nesting at most 256 deep.
    • Coordinates must be finite and within ±10⁹ mm (fieldcraft_model::MAX_COORD), both as read and once placed.
    • Every vertex index must exist.
  • Errors. Any violation is an error that names the problem. Nothing panics.

Features

Generated from the capability catalogue (crates/engine/src/catalogue.rs) by cargo run -p fieldcraft-cli -- features > docs/features.md; a test fails when it is out of date. Every entry is a toolbar button. Ready entries run their command; coming soon entries are shown greyed with the roadmap milestone that brings them (ROADMAP.md). Scripts, the command line, the control channel and AI agents over MCP (docs/mcp.md) run the same commands.

103 ready, 27 coming soon.

Geometry

PanelCapabilityStatusCommand
ImportOpen Design — Open a SolidCraft design or CAD file (STEP, IGES, FreeCAD, Rhino) with named faces and placed bodiesreadygeometry.open
ImportTriangle Mesh — Read a triangle surface (3MF, STL, OBJ, PLY, glTF)readygeometry.import.mesh
InspectBodies — List the open design’s bodies, volumes and named faces, edges and verticesreadygeometry.bodies, geometry.centre, geometry.features
InspectTessellate — Tessellate a body into a face-tagged boundary surfacereadygeometry.tessellate
InspectCheck Geometry — Short edges, small and sliver faces and near faces against the element size, locatedreadygeometry.check
InspectCheck Surface — Weld, closed, manifold, orientation and self-intersection checks; feature edgesreadymesh.surface.check
PrepareDatum Plane — A datum plane: principal plane and offset, three points or datum points, point and normal, normal to an axisreadygeometry.datum, (geometry.datum.edit), (geometry.datum.delete), (geometry.datum.suppress)
PrepareDatum Axis — A datum axis: principal axis, two points or datum points, point and directionreadygeometry.datum.axis, (geometry.datum.axis.edit)
PrepareDatum Point — A datum point: coordinates, a mesh vertex, along an edge, a face’s centre, an axis through a planereadygeometry.datum.point, (geometry.datum.point.edit)
PreparePartition — Cut bodies into cells by a datum plane; the two faces of each cut are paired by namereadygeometry.partition, (geometry.partition.delete), (geometry.partition.suppress)
PrepareMerge Faces — Mesh adjacent faces as one (virtual topology): a fillet in pieces, a face split by an imprint; the B-rep is unchangedreadygeometry.faces.merge, (geometry.faces.merge.delete)
PrepareAbsorb Faces — Absorb tiny and sliver faces into a neighbour for meshing, one picked or every one Check Geometry foundreadygeometry.face.absorb
PrepareSplit Face — Split a face along a datum plane for meshing only: two faces on its surface, the cut an edge between themreadygeometry.face.split, (geometry.face.split.delete)
PrepareDefeature — Take small holes, fillets, chamfers and bosses out for meshing, from a proposal list with each one on or offreadygeometry.defeature, geometry.defeature.propose, (geometry.defeature.delete)
PrepareStitch — Close an imported surface’s gaps under a tolerance: open points welded, T-junctions splitreadygeometry.stitch, (geometry.stitch.delete)
PrepareMidsurface — Extract midsurfaces of thin parts for shell meshescoming soon (M8)

Mesh

PanelCapabilityStatusCommand
SizeGlobal Size — One element size for the whole partcoming soon (M2)
SizeSeed Edges — Element counts or sizes per design edge, or on every edge of a face, with bias and an exact, minimum or free constraint; the meshers honour themreadymesh.seed.edge, mesh.seed.face, mesh.seed.clear, mesh.seed.list
SizeLocal Size — Element size on faces or bodies, in a box or in a sphere, growing away at a set rate; every mesher honours itreadymesh.size.set, mesh.size.growth, mesh.size.clear, mesh.size.list
SizeCurvature — Refine by curvature and proximitycoming soon (M2)
TetTet Mesh — Quality tet4 or tet10 mesh of a body to a size: refined, smoothed and improved, boundary on the B-rep faces, faces taggedreadymesh.tet.generate
TetQuadratic — Second-order elements with mid-side nodes on the geometrycoming soon (M2)
TetDelaunay Points — Delaunay tetrahedralization of a point list (debugging aid)readymesh.delaunay.points
2D2D Mesh — Quad or triangle mesh of a planar face or polygon in the XY plane for plane stress, plane strain and axisymmetric models; edges taggedreadymesh.planar
Structured HexQuad Faces — All-quad meshes of faces on shared edge nodescoming soon (M5)
Structured HexHex Mesh — Structured hex mesh of a body: automatic, or extruded, swept, revolved or mapped (the Method drop-down)readymesh.hex.generate, (mesh.hex.sweep), (mesh.hex.mapped)
Structured HexPartitioned Mesh — One mesh of a partitioned part, a method per cell (hex, tet, or all hex as conforming blocks); cells joined across partitions, tet cells to hex cells through conforming pyramidsreadymesh.cells, (mesh.hex.blocks)
Structured HexExtrude to Surface — Hex layers from a meshed or planar section up to a curved target surface, following the side facesreadymesh.hex.extrude
Structured HexMesh Plan — A hex-meshing plan from the features that built a body (sweeps, blocks, O-grids, layers, imprints, copies); saved, editable, applied with the structured meshersreadymesh.plan, mesh.plan.apply, mesh.plan.delete
Structured HexMesh Block — A mapped block of hex, wedge or quad elements between corner points; projection blocking (a block topology projected onto the part)readymesh.block, mesh.hex.project
Structured HexDecompose — Find sweepable and mappable regions of 3D parts (extruded cross-sections are already cut into blocks by Hex Mesh)coming soon (M5)
Automatic HexOctree Hex — Unstructured all-hex mesh of any part: adaptive grid, boundary layers on every sharp edge, untangled and proven validreadymesh.hex.octree
Automatic HexHex-Dominant — Hex-dominant mesh by recombining tetscoming soon (M6)
Automatic HexPolycube — Polycube hex mesh of blocky partscoming soon (M6)
ImproveSmooth — Smooth node positions, keeping every element validcoming soon (M6)
ImproveUntangle — Repair inverted elementscoming soon (M6)
ImproveLayers — Boundary padding and layers through thin wallscoming soon (M6)
ImproveRelax Nodes — Relax the nodes inside a sphere to fix spikes and slivers; surface nodes slide on the geometry; kept as a field to apply again after a remeshreadymesh.node.relax, mesh.node.relax.apply, mesh.node.relax.delete
ImproveMove Nodes — Drag nodes of the mesh, the nodes round them following by a falloff or harmonically, on the geometry; the original drawn as a ghost and the elements coloured by how their quality changesreadymesh.node.move
EditNode — Add a nodereadymesh.node.add, mesh.node.remove
EditElement — Add an element on existing nodesreadymesh.element.add, mesh.element.remove, mesh.clear
EditMirror Mesh — Mirror a body’s mesh across a plane, joined on the plane (mesh half a symmetric part)readymesh.mirror
EditMerge Nodes — Merge coincident nodes, keeping sets, loads and boundary conditions on the survivors; check for duplicates and cracks, renumberreadymesh.node.merge, mesh.check.duplicates, mesh.renumber
EditRemesh Region — Remesh a region in place; split and collapse elementscoming soon (M6)
EditOrphan Mesh — Import a mesh without geometry (Gmsh MSH 4.1)readymesh.import.orphan
VerifyQuality — Quality metrics and the certified validity check, failing elements listedreadymesh.quality
VerifyMark Bad Elements — Mark the elements below quality limits as a set, located and drawn in the marker colourreadymesh.quality.mark
VerifyVerify Set — Quality metrics and the certified validity check of one set’s elements, the worst listedreadymesh.verify
VerifyExport STL — Write the mesh’s outer surface (or a set’s faces) as binary STLreadymesh.export.stl
VerifyTag Geometry — Tag elements, faces, edges and nodes with the geometry they meshreadymesh.tag, mesh.tag.clear

Properties

PanelCapabilityStatusCommand
MaterialsMaterial — Elastic (isotropic, orthotropic) material with density; neo-Hookean hyperelasticity for nonlinear steps; Tait PVT behaviour; latent heat for a fluid that melts and freezesreadymodel.material.create, model.material.edit, model.material.delete, model.material.pvt, model.material.specific_volume, model.material.phase_change, model.material.library.add, model.material.library.list
MaterialsPlasticity — Von Mises plasticity: bilinear, hardening table or Johnson–Cookreadymodel.material.plasticity
MaterialsHyperelastic — A rubber-like material for nonlinear steps: neo-Hookean, Mooney–Rivlin or Yeoh on the isotropic constantsreadymodel.material.create {"hyperelastic":{"type":"neo_hookean"}}
MaterialsDamage — Johnson–Cook damage and element erosionreadymodel.material.damage
MaterialsThermal — A material with conductivity, specific heat and expansion, for heat transfer and thermal stressreadymodel.material.create {"thermal":{}}
MaterialsElectromagnetic — A material’s relative permittivity and permeability, for cavity stepsreadymodel.material.create {"elastic":null,"electromagnetic":{}}
MaterialsEquation of State — Polynomial, ideal gas, Mie–Grüneisen, JWL and tabulated equations of statecoming soon (M11)
SectionsSection — Solid, shell, beam, rod or 2D (plane stress, plane strain, axisymmetric) section assigned to a set, with its element formulationreadymodel.section.create, model.section.edit, model.section.delete
SectionsComposite — Composite layups and continuum shellscoming soon (M8)
SectionsOrientation — Material orientationscoming soon (M8)
SetsSet — A set of nodes, elements and faces, or of named geometry that survives remeshingreadymodel.set.create, model.set.edit, model.set.delete, model.set.resolve
ModelUnits — The units the model is shown and typed inreadymodel.units

Assembly

PanelCapabilityStatusCommand
InstancesInstances — Part instances placed from SolidCraft occurrencescoming soon (M7)

Steps

PanelCapabilityStatusCommand
StepsStep — A linear or nonlinear static, frequency, heat or explicit step with its outputreadymodel.step.create, model.step.edit, model.step.delete
StepsActivate — Choose which loads and boundary conditions act in a stepreadymodel.step.activate
StepsStep Table — The step by load and boundary condition tablereadymodel.activity
ProceduresAmplitude — Time and frequency amplitudescoming soon (M7)
ProceduresNonlinear — A nonlinear static step: large deformation, increments and load pathsreadymodel.step.create {"procedure":{"type":"nonlinear_static"}}
ProceduresExplicit — An explicit dynamic step: impact and fast transients by central differencesreadymodel.step.create {"procedure":{"type":"explicit_dynamic"}}
ProceduresCavity — The resonant modes of an electromagnetic cavity inside its conductors, with each mode’s quality factor when a conductor has finite conductivityreadymodel.step.create {"procedure":{"type":"cavity"}}
ProceduresHeat Transfer — A steady or transient heat transfer stepreadymodel.step.create {"procedure":{"type":"heat_transfer"}}

Loads & BCs

PanelCapabilityStatusCommand
Boundary ConditionsBoundary Condition — Fixed, displacement or symmetry condition on a set or reference pointreadymodel.boundary_condition.create, model.boundary_condition.edit, model.boundary_condition.delete, model.boundary_condition.symmetry
LoadsLoad — Force, moment, pressure, traction, gravity or body force; initial temperature and residual stress mapped from another analysisreadymodel.load.create, model.load.edit, model.load.delete, model.initial_field.map, model.initial_field.delete
FlowFluid Domain — The box of fluid cells, its fluid, and the obstacle bodies voxelised from their face-tagged surfacesreadymodel.fluid_domain.create, model.fluid_domain.edit, model.fluid_domain.delete
FlowInlet & Outlet — Velocity inlets, pressure outlets, walls, moving and slip walls, symmetry planes, periodic faces; held temperatures, heat fluxes and adiabatic faces; conducting solids’ temperature limitsreadymodel.fluid_domain.boundary, model.fluid_domain.thermal_boundary, model.fluid_domain.limit, model.fluid_domain.absorbing_layer

Interactions

PanelCapabilityStatusCommand
ConstraintsReference Point — A reference point for couplings, loads and boundary conditionsreadymodel.reference_point.create, model.reference_point.edit, model.reference_point.delete
ConstraintsCoupling — Kinematic or distributing coupling of a set to a reference pointreadymodel.coupling.create, model.coupling.edit, model.coupling.delete
ConstraintsTie — Tie non-matching meshes together (dual mortar constraints)readyinteraction.tie, interaction.tie.edit, interaction.tie.delete
ContactGeneral Contact — Contact between everything that may touch, or self contact of a surface, with friction (explicit dynamics and nonlinear static steps)readyinteraction.contact.general, interaction.contact.edit, interaction.contact.delete
ContactContact Pair — Contact between two surfaces: with friction in explicit dynamics, mortar contact with friction in nonlinear static stepsreadyinteraction.contact.pair
ContactFind Contacts — Find the parts of the mesh that touch, and make contact pairs of themreadyinteraction.contact.find
ContactRigid Wall — A fixed rigid plane a set’s nodes cannot pass, with friction, in an explicit dynamics stepreadyinteraction.rigid_wall, interaction.rigid_wall.edit, interaction.rigid_wall.delete
ConnectorsBolt Load — Bolt pretensioncoming soon (M7)
ConnectorsSpring — Spring or dashpot to the ground or between two points, along a direction or their linereadymodel.spring.create, model.spring.edit, model.spring.delete
ConnectorsPoint Mass — Point mass and rotary inertia at nodes or a reference pointreadymodel.mass.create, model.mass.edit, model.mass.delete
ConnectorsConnector — Connector elements between pointscoming soon (M7)
CoupledFSI Interface — The fluid–structure interfacecoming soon (M13)

Solve

PanelCapabilityStatusCommand
RunSolve — Solve every step in order and show the resultsreadysolve.run
CheckCheck Model — Name every missing or bad definition before writing or solvingreadymodel.check
DecksAbaqus Input — Write an Abaqus input file (.inp)readydeck.write {"format":"abaqus"}
DecksNastran Deck — Write Nastran bulk data (SOL 101, 103)readydeck.write {"format":"nastran"}
DecksLS-DYNA Deck — Write an LS-DYNA keyword filereadydeck.write {"format":"lsdyna"}
DecksOpenFOAM Case — Write a fluid step as an OpenFOAM case directory, for running it in OpenFOAM (snappyHexMesh, pimpleFoam or, for a gas, rhoCentralFoam, an Allrun script)readydeck.openfoam
DecksRead Deck — Read an Abaqus input deck’s model data and the current writer’s linear history: mesh, sets, materials, sections, static/frequency/buckling steps, boundary conditions and concentrated loads; unread keywords are listed, not keptreadydeck.read
ImplicitStatic — Linear static (or coupled temperature–displacement) solve of a step with FieldCraft’s own solver; nonlinear static, buckling and heat transfer in the drop-downreadysolve.static, solve.nonlinear, solve.buckle, solve.heat
ImplicitFrequency — Natural frequencies and mode shapes of a frequency stepreadysolve.frequency
ImplicitCavity — Resonant modes of an electromagnetic cavity step on Nédélec edge elementsreadysolve.cavity
ExplicitExplicit — Transient dynamics of an explicit step by central differences (contact and erosion coming in M10)readysolve.explicit
ExplicitBlast & Impact — EOS-driven fluids with fluid–structure contact (ALE or SPH)coming soon (M14)
FluidsLattice Boltzmann — Lattice Boltzmann flow of a fluid step on the CPU or a GPU, with wall forces, and the heat it carriesreadysolve.fluid, solve.settings, solve.outlet_reflection
FluidsFluid–Structure — Coupled fluid and structure solvecoming soon (M13)

Results

PanelCapabilityStatusCommand
DisplayDeformed — The deformed shape of a solved step, to scalereadyresults.deformed, results.clear
DisplayContours — Contours of displacement and stress, with a legendreadyresults.contour
DisplayMode Shapes — Mode shapes and frequencies of a frequency stepreadyresults.modes
DisplayAnimate — Animate the deformed shape, a mode or an explicit step’s framesreadyresults.animate, results.frame
QueryProbe — Displacement, rotation, reaction and stress at nodes, element section forces, a mode shape, or an explicit field frame (or click the model)readysolve.probe, solve.history
QueryReactions — Reaction force and moment sums per setreadyresults.reactions, results.export.csv
QueryFluid Measurements — Saved-frame face averages, flow, heat rates and pressure drop, with CSVreadyresults.fluid.measure
QueryLinearize — Membrane, bending and peak stresses along a path through a wall (ASME VIII-2 Annex 5-A)readyresults.linearize
QueryFree Body — Free-body forces across a cutcoming soon (M9)
PlotsXY Plot — Plot a quantity against the load factor, time or modereadyresults.xy
PlotsPath Plot — Interpolate a solid nodal field along a reference-coordinate path, with CSV exportreadyresults.path
PlotsCut — Section cuts through the modelcoming soon (M9)
PlotsDisplay Group — Show and hide parts of the modelcoming soon (M9)
PlotsStreamlines — A fluid step’s velocity, pressure or temperature on slices and obstacles, speed or temperature along streamlines, and signed wall heat per areareadyresults.streamlines, results.slice, results.surface
FilesExport VTU — Write a solved step as VTK unstructured grids for ParaViewreadyresults.export.vtu, results.export.animation, results.render.save, results.render.delete
FilesOpenFOAM Results — Read the results of an OpenFOAM case written from a fluid step, as the step’s results for viewingreadyresults.openfoam
FilesRead Results — Read results in public formatscoming soon (M9)
FilesConvergence — Mesh convergence studiescoming soon (M9)

Tools

PanelCapabilityStatusCommand
ModelModel Info — Node and element counts and the model summaryreadymodel.info, model.rename
FileOpen Model — Open a .fieldcraft modelreadyfile.open, file.new
FileSamples — Open a sample model, ready to solvereadyfile.sample
FileSave — Save the model to its .fieldcraft filereadyfile.save
FileSave As — Save the model to a new .fieldcraft filereadyfile.save_as
FileRecover — Open a model autosaved by an app that crashed or closed with unsaved changesreadyfile.recover, file.recovery.list, file.recovery.discard
ViewShow All — Show every item hidden in the viewport (hide, show and isolate items from the browser)readyview.show_all, view.save, view.restore, view.delete, view.list, view.image.save, (view.hide), (view.show), (view.isolate)
ViewSection View — Cut the model by a plane and close the cut: the mesh sliced with its field on the plane, the design’s bodies capped in their coloursreadyview.section, view.style
HistoryUndo — Undo the last command that changed the modelreadyedit.undo
HistoryRedo — Redo the command undone lastreadyedit.redo
HelpReport a Bug — Draft a GitHub bug report with the version, the OS and the last error; you review it, and nothing is sent until you submit itreadydiagnostics.bug_report, diagnostics.crash_reports, diagnostics.crash_report, diagnostics.crash_reports.delete, app.update.check

Units inventory (#579)

The state before SI storage, kept as the map the conversion followed; docs/units.md describes how units work now.

Every place a dimensional number enters or leaves FieldCraft today, the unit it is assumed to be in, and where the SI conversion goes. Today nothing converts: every stored f64 means “whatever consistent system the user chose”, labelled by model.units (UnitSystem, crates/model/src/units/mod.rs). The SI table that later steps convert through is crates/model/src/units/ (Quantity, Unit, DisplaySystem). Risky marks an implicit assumption, a hard-coded factor or a missing dimension.

Model storage (crates/model/src): all bare f64, no unit tag

Conversion goes at the command/file boundary; storage becomes SI.

WhereFieldsQuantity
lib.rsunits: UnitSystem (serde default unspecified); MAX_COORD = 1e9 “model units”label; length
mesh.rs, datums.rs, constraints.rs, relaxations.rs, mesh_plans.rsnode/datum/reference point xyz, plan centre/radius/size/tolerancelength
sizes.rs, seeds.rs, virtual_faces.rs, tie.rssize regions, seed sizes, tolerances, position_tolerancelength (bias, growth: dimensionless)
materials.rsyoung, shear, hyperelastic c01/c20/c30, yield_stress, hardening_modulus, hardening table stress, JC a/bpressure
poisson, strains, JC n/c/m, taylor_quinney, damage d1–d5dimensionless
JC reference_strain_ratefrequency (1/s)
JC room/melt temperature, thermal reference_temperaturetemperature (absolute)
conductivity, specific_heat, expansionconductivity, specific heat, expansion (1/ΔT)
phase change latent_heat, solidus, liquidusspecific energy, temperature (absolute)
density; fluid viscosity (doc: “1e-9 MPa·s for water”)density; dynamic viscosity
pvt.rsTait b1, b7; b2; b3; b4, b8; b5; b6; b9 (#159)specific volume (m³/kg); specific volume per temperature (m³/(kg·K)); pressure; expansion (1/ΔT); temperature (absolute); temperature per pressure (K/Pa); inverse pressure (1/Pa) — the four new quantities follow the display system’s volume, mass, pressure and temperature step (units/display.rs)
sections.rsprofile dims, shell thickness/offset, 2D thickness, arealength, area
loads.rsforce, moment, traction, pressure, gravity, body force, centrifugal ω/point, surface flux, film, sink, heat source power, temperatureforce, moment, pressure, acceleration, force/volume, angular velocity, heat flux, HTC, temperature, heat generation
bcs.rsdisplacement [Option<f64>; 6] (3 lengths + 3 rotations rad), temperaturelength, angle, temperature
steps.rsfrequency min/max_hz, buckle shift, end_time/increments/intervals, initial velocity, rigid wall point, hourglass/bulk viscosity coefs, heat theta/initial_temperature, imperfection scale, displacement controlfrequency, time, velocity, length, temperature (coefs dimensionless)
contact.rsμ static/kinetic, penalty_scale; decay (time per length)dimensionless; s/m
discrete.rspoint mass, inertia, spring stiffness, dashpot coefficientmass, mass·length², stiffness, damping
fluids.rswall/inlet velocity, pressure, thermal temperature/flux, initial temperature, gravity, β, domain min/max/spacing/tolerance, a conducting solid’s power, a thermal contact’s resistance or layer thickness and conductivityvelocity, pressure, temperature, heat flux, acceleration, expansion, length, power, thermal contact resistance, thermal conductivity

Risky: units missing in a file means unspecified, so a migration cannot know the system of old files without one; the step cache key includes units.

Commands and forms (crates/engine/src/cmd, schema.rs, cmd/forms.rs)

Definition commands (model.{material,section,load,boundary_condition,…}.{create,edit}) deserialize JSON straight into the model structs (cmd/define.rs), so every number is a bare f64. Each form field carries a Dim (schema.rs:299-418); Dim::unit(system) only builds a label. Conversion goes where the form value is read: Field → Quantity and ValueInput::to_si.

Risky:

  • Dim::Millimetre is a fixed “mm” for meshing and geometry commands (tet/hex size, tolerances, datums, hex project, defeature, mesh plan, geometry check), while the same quantities in mesh editing commands (node add/move/relax, seeds, size regions, block, mirror, planar, stitch) are Dim::Length and follow the system. One physical quantity, two assumptions. Resolved: Dim::Millimetre is gone; every length is Dim::Length and follows the display system, the geometry frame converting at the command boundary (docs/units.md). Journals from before SI storage keep their millimetres through a frozen table.
  • Missing dimensions: load heat_source power (forms.rs:561, really W/m³), frequency shift (forms.rs:2024, really 1/s²), contact decay (forms.rs:1015, s/m), JC reference strain rate (forms.rs:137, 1/s).
  • Dim::Temperature has no unit; Dim::Expansion is fixed “1/K” while temperatures are unlabelled.
  • JSON Schema (schema.rs:1260-1365, list_commands, fieldcraft-cli commands --json, MCP) emits only x-dimension names and none for vectors and number_or_auto (forces, positions, gravity, velocities lose their dimension).
  • Help/defaults assume mm-t-s: forms.rs:520 (gravity −9810), define.rs:98 (210000, 7.85e-9), define.rs:291; samples engine/src/sample.rs:362 GRAVITY = 9810.0 and aluminium 70000 / 2.7e-9.
  • model.units (cmd/model.rs:39-54) only sets the label; it warns about mm geometry only while a design is open.

UI display (crates/ui-egui)

Forms (form.rs) label through Field::unit_label/help_text; descriptions (describe.rs), replies (reply.rs), results panel and probes (results_panel.rs, lib.rs probe_rows) through Quantity::unit(system). Display conversion goes here (Quantity::format with the display system). Risky: literal “mm”, “mm²”, “mm³” in reply.rs:398, 708, 720, 723, 770 and feature_graph.rs:52-257.

Results (crates/engine/src/results.rs, flow.rs, cmd/xy.rs, cmd/results.rs)

Field::quantity() maps fields to the engine’s Quantity (Length, Stress, Force, Moment, Mass, Time, Velocity, Temperature, Energy, HeatFlow, HeatFlux); Quantity::unit builds the label, with per-system strings for energy/power/flux. Reactions and probe replies are numbers only; contour replies carry "unit". Risky: temperature is always "°C or K" (also in in-lbf-s); ContactGap (a length) maps to None. Conversion: results stay SI; legends and replies format.

Files

FormatTodayConversion
.fieldcraft (crates/io, FORMAT = "fieldcraft/1")model.json numbers as entered plus "units"; mesh.bin raw coordinatesscale to SI once on open by the declared system. Risky: FieldCraft has no pending-format mechanism (only the FORMAT const and its refusal); SI storage needs a format version step. Files with unspecified need a rule (assume mm-t-s-N-MPa, since geometry is mm).
Abaqus / Nastran / LS-DYNA (crates/decks, write only)unit label in a comment onlywrite in a chosen consistent system (DisplaySystem factors). Risky: no Nastran PARAM,WTMASS, no LS-DYNA *CONTROL_UNITS; there are no deck readers yet.
SolidCraft geometry (crates/geometry)“lengths are millimetres” (lib.rs:16, 96)×1e-3 once at import
3MF (geometry/src/tagged_mesh.rs:151-161)the one real conversion outside the table: micron/mm/cm/inch/foot/metre → mm; writes unit="millimeter"move factors to the table, convert to m
STEPno import exists—
STL export (io/src/stl.rs)raw coordinateswrite in the display length (STL has no unit field)
VTU/PVD (io/src/vtk.rs)no unit metadataadd units in field data
CSV (cmd/results.rs:1023-1075)bare headers; reply has "units"units in headers (fx [N])

CLI and MCP

crates/mcp/src/server.rs:26-27 instructions: “unit-consistent and never converts … use mm-t-s-N-MPa”; tools.rs:105 example model.units; screenshot distance “in model units”. The CLI adds no units itself (commands schema as above). Replies switch to values with units.

Solvers

  • LBM (crates/lbm/src/setup.rs): lattice units Δx = Δt = ρ₀ = 1; ν, velocities, accelerations, pressure, force, heat scale through h, dt, ρ, c. Self-consistent in any system, no fixed factors; unchanged by SI storage. Temperatures pass unscaled (only differences matter).
  • Implicit, explicit, fem: no unit literals; thermal strain uses α(T − T_ref), Johnson–Cook uses room/melt in one scale: correct in kelvin. No 273.15 or Stefan–Boltzmann anywhere (radiation would need absolute kelvin, which SI storage gives).

Literal factors

cargo xtask unit-factors lists float literals equal to common factors outside the table: 548 today (mesh 187, engine 175, geometry 34, render 33, fem 25, …). Almost all are tolerances, limits or bytes→MB; the real conversions are the 3MF table and the mm-t-s sample constants.

Implicit “geometry in mm”

Mesh coordinates come from mm geometry whatever model.units says: an m-kg-s or in-lbf-s model reads mm numbers as metres or inches; the only guard is the model.units warning. SI storage fixes this at the import boundary. MAX_COORD is “1e9 model units” in code, “±10⁹ mm” in docs/formats/tagged-mesh.md:45.

Releasing FieldCraft

Releases are deliberate. Development lands on develop, the trunk; main holds released code only. Fast-forwarding main to the chosen, verified develop commit builds every package and creates a draft GitHub Release; a maintainer verifies the draft and publishes it. Pushes to develop and tags never start a release, and nothing bumps the version automatically; the one thing published without a maintainer is the nightly pre-release of develop (Nightly builds). The workflow is .github/workflows/release.yml; the packaging scripts are in packaging/ and run the same way on a developer machine.

What a release contains

PlatformFilesScript
macOS 11+, Apple silicon (aarch64; no Intel build since 0.8.0)fieldcraft-<v>-macos-aarch64.dmg (FieldCraft.app, including Contents/MacOS/fieldcraft-cli, on a drag-to-Applications image), fieldcraft-cli-<v>-macos-aarch64.zippackaging/macos/package.sh
Linux x86_64, glibc 2.35+fieldcraft-<v>-linux-x86_64.tar.gz (bin/, share/), fieldcraft-<v>-linux-x86_64.AppImage, fieldcraft_<v>_amd64.deb (Debian, Ubuntu 22.04+), fieldcraft-<v>.x86_64.rpm (Fedora, RHEL, openSUSE)packaging/linux/package.sh
Linux x86_64 Flatpakfieldcraft-<v>-linux-x86_64.flatpak: built from source with flatpak-builder on the freedesktop runtime (org.freedesktop.Platform 26.08, Rust from the rust-stable SDK extension), offline against the crates cargo vendor fetched; the job installs it and runs both programs. Not yet attached to the release (Flatpak repository)packaging/linux/flatpak-bundle.sh, manifest packaging/linux/flatpak/io.github.tangencylabs.fieldcraft.yml
Windows x64fieldcraft-<v>-windows-x64.zip (fieldcraft.exe, fieldcraft-cli.exe)packaging/windows/package.ps1

Plus SHA256SUMS.txt, its signature SHA256SUMS.txt.minisig (below), and the notes from .github/release-notes.md followed by GitHub’s generated list of changes. Every package carries README.md, LICENSE-MIT, LICENSE-APACHE, NOTICE and THIRD-PARTY-LICENSES.txt (on macOS in FieldCraft.app/Contents/Resources/Licenses). THIRD-PARTY-LICENSES.txt is not committed: each packaging job runs cargo xtask licences first, which fails when a shipped crate names no licence and carries no licence file, and the release attaches the file on its own too. Which licences a dependency may have is [licenses] in deny.toml, which CI checks on every pull request (cargo deny check licenses). The application id is io.github.tangencylabs.fieldcraft: the macOS bundle id, the Linux .desktop entry and icon name, and the window’s Wayland app_id / X11 class. The icons come from assets/app-icon: icon.icns and Assets.car (macOS 26 and later) in the app bundle, icon.ico embedded in fieldcraft.exe (apps/fieldcraft/build.rs), the iconset PNGs as the Linux hicolor icons.

Up to 0.7.x the id was io.github.jyviko.fieldcraft. An installed 0.7.x macOS app updates only to an app signed with that id, so it refuses the first release with the new one: that release’s notes must tell macOS users to download the dmg once by hand; from there the app updates itself again. The updater accepts both ids (ACCEPTED_BUNDLE_IDS in crates/update/src/install.rs). On Linux a .deb or .rpm upgrade replaces the old desktop entry and icons; pins or favourites made with the old desktop id are lost.

The .deb and .rpm are built by cargo-deb and cargo-generate-rpm (versions pinned in release.yml) from the same stripped release binaries as the tar.gz, with the same files under /usr (/usr/bin, the desktop entry, the hicolor icons, the licences in /usr/share/doc/fieldcraft); their metadata and file lists are in apps/fieldcraft/Cargo.toml. The binaries link only glibc; the windowing, GPU and file-dialog libraries they open at run time are listed as dependencies by hand (Debian package names, RPM soname capabilities). A pre-release 0.2.0-rc.1 is versioned 0.2.0~rc.1 inside the packages so it sorts before 0.2.0; the file names keep the release version. The Linux job compares both file lists with the tar.gz, runs lintian, and installs the packages in Ubuntu 22.04 and Fedora containers to run fieldcraft-cli --version.

Signing

macOS. When the repository has the secrets below, the app, the dmg and the CLI are signed with a Developer ID (hardened runtime, packaging/macos/entitlements.plist) and notarized, and the tickets are stapled. Without them the build is ad-hoc signed, which runs on Apple silicon but which Gatekeeper blocks on first launch until the user right-clicks › Open; a run warns about it, and the release notes say which of the two the draft contains.

SecretWhat it is
APPLE_CERTIFICATEThe “Developer ID Application” certificate with its private key, exported as .p12 and base64-encoded (base64 -i cert.p12 | pbcopy)
APPLE_CERTIFICATE_PASSWORDThe .p12’s password
KEYCHAIN_PASSWORDOptional: the temporary CI keychain’s password (random when unset)
APPLE_IDThe Apple ID used for notarization
APPLE_PASSWORDAn app-specific password for that Apple ID (appleid.apple.com › Sign-In and Security)
APPLE_TEAM_IDThe 10-character team id of the Developer ID

Add them to the release environment (Where the secrets live) with gh secret set <NAME> --env release -R tangency-labs/fieldcraft. With the certificate but without the three notarization secrets the app is signed and not notarized. A dmg made locally with packaging/macos/package.sh is ad-hoc signed unless MACOS_SIGN_IDENTITY names an identity in the keychain.

The release key (updates). The app installs a release only when SHA256SUMS.txt is signed with the FieldCraft release key (updates.md): an Ed25519 key in minisign’s format. Its public half is built into the app (fieldcraft_update::PUBLIC_KEY in crates/update/src/lib.rs):

untrusted comment: minisign public key: FEF410EFEF5BAB21
RWQhq1vv7xD0/uAOt8fqERP1hP+1UCM9U9QHTDYTYytWKiuedTkT7Lgr

The secret half is the release environment secret FIELDCRAFT_SIGNING_KEY: the whole secret key file (two lines), made without a password. With it, the release job signs SHA256SUMS.txt with rsign2 (pinned in release.yml), checks the signature against the public key in the source, and uploads SHA256SUMS.txt.minisig. Without it the draft is built unsigned, the run warns, and the notes say the app cannot install that release itself (users download it from the page). Anyone can check a release by hand with minisign -Vm SHA256SUMS.txt -P RWQhq1vv7xD0/uAOt8fqERP1hP+1UCM9U9QHTDYTYytWKiuedTkT7Lgr.

Setting it up, once:

cargo install --locked rsign2 --version 0.6.7
rsign generate -W -p fieldcraft-release.pub -s fieldcraft-release.key   # -W: no password
gh secret set FIELDCRAFT_SIGNING_KEY --env release -R tangency-labs/fieldcraft < fieldcraft-release.key

Keep an offline copy of the secret key file (a password manager, an encrypted backup) and delete it from the working machine. Never commit it.

Rotating it (a key that leaked, or a planned change): generate a new pair, put the new public key into PUBLIC_KEY and the block above, re-sign crates/update/tests/data/SHA256SUMS.txt with it (rsign sign -W -s <new key> -x crates/update/tests/data/SHA256SUMS.txt.minisig crates/update/tests/data/SHA256SUMS.txt, which a test checks), release that version, and only then replace the secret. Copies that still carry the old public key cannot verify releases signed with the new one: they still show the update, but Install refuses it (“not signed by the FieldCraft release key”), and a download from the release page brings the new key. If the old key leaked, also delete the secret at once (releases go out unsigned until the new one is in place) and say so in the next release notes.

Linux and Windows builds are not signed; the checksums are the integrity check. On Windows SmartScreen warns about an unsigned download (More info › Run anyway) until a code-signing certificate is added.

Usage analytics key

The release builds (macOS, Linux and Windows jobs) build in the PostHog project key from the release environment secret POSTHOG_KEY as FIELDCRAFT_POSTHOG_KEY (privacy.md). Without the secret the builds ask nothing and send nothing, as local, fork and dry-run builds do. The web build on Pages gets the key only when it runs from main: its build job then runs in the release environment (the deploy job already uses github-pages, and a job has one environment).

Where the secrets live

Every release secret (the APPLE_* secrets, KEYCHAIN_PASSWORD, FIELDCRAFT_SIGNING_KEY, POSTHOG_KEY, FLATPAK_GPG_KEY) is a secret of the GitHub Environment release, whose deployment branches allow main and develop (develop for the nightlies only). Repository secrets are readable by any workflow a writer can run on any branch; environment secrets reach only jobs that name the environment and run from an allowed branch, so a contributor with write access cannot read the signing keys from a branch of their own. The jobs that read them (release.yml’s macos, linux, flatpak, windows and release jobs, pages.yml’s build job) ask for release only on main and, in release.yml, for a nightly: the version job’s environment output decides once for all five (release when github.ref is main, or when the run is a workflow_run of CI’s scheduled run; Nightly builds says why that is sound and what it costs), and pages.yml asks on main only (environment: ${{ github.ref == 'refs/heads/main' && 'release' || '' }}). Elsewhere the name is empty, the job runs in no environment, sees no secrets and builds unsigned. FLATPAK_GPG_KEY reaches only pages.yml’s flatpak job, which runs on main only and builds no code (Flatpak repository). .github/CODEOWNERS keeps the workflows, packaging and updater under the owner’s review.

Moving them from repository secrets, once (the owner; each value comes from its own source file, never the shell history):

for n in APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD KEYCHAIN_PASSWORD APPLE_ID APPLE_PASSWORD \
         APPLE_TEAM_ID FIELDCRAFT_SIGNING_KEY POSTHOG_KEY; do
  gh secret set "$n" --env release -R tangency-labs/fieldcraft < "$n.txt"
done
gh secret list --env release -R tangency-labs/fieldcraft     # all eight listed
# After a release run on main has signed with them:
for n in APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD KEYCHAIN_PASSWORD APPLE_ID APPLE_PASSWORD \
         APPLE_TEAM_ID FIELDCRAFT_SIGNING_KEY POSTHOG_KEY; do
  gh secret delete "$n" -R tangency-labs/fieldcraft
done

Choose and prepare the version

  1. Look at the previous published release (gh release list -R tangency-labs/fieldcraft) and the changes since it, and choose one version for the batch: a patch for compatible fixes; a minor for new capabilities, and while on 0.x also for breaking changes (say what breaks in the notes); -rc.N for a release candidate. 1.0 is the owner’s decision.
  2. Set [workspace.package] version in the root Cargo.toml and run cargo update --workspace --offline, which changes only the workspace crates’ versions in Cargo.lock. Land it on develop through a pull request like any change, and let CI on develop pass. Note the commit to release.

Build the draft

git fetch origin
git push origin <commit>:main      # fast-forward main to the verified develop commit

main holds released code only: it moves only by fast-forwarding to a verified develop commit (a maintainer push; the branch is protected), never by merges, rewrites or force-pushes. The run first verifies the commit with everything CI has (see below); then it builds the three platforms; when all succeed, the last job checks that every file is there, writes SHA256SUMS.txt and the notes, and creates the draft FieldCraft v<version> targeting the pushed commit. Pushing main again with the same version rebuilds and replaces the draft’s files (its notes are kept). The job refuses a version whose tag exists or whose release is already published: bump the version instead.

What CI runs when

WhenWhat runs
Push to developplan takes the newest develop commit whose CI run passed as the base and runs cargo xtask affected --base <it>. cargo xtask ci --affected <base>: fmt, assets, layers, unit-factors (always, whole tree), then clippy and the tests of the changed crates and every crate that depends on them, and the wasm check when one of them builds for wasm. heavy (cargo xtask test --heavy) and oracle run only when the change reaches the solvers or the oracle (solver), or everything. A newer push cancels the run before it; the next one tests everything since the last green run, so nothing is skipped.
Change to Cargo.toml, Cargo.lock, the toolchain, xtask/ or .github/Everything: the full gate, heavy and oracle (everything).
Pull request (ours, a fork’s once the maintainer approves the run, or Dependabot’s; not a draft)The same plan against the pull request’s merge base: the gate, and heavy and oracle when the change reaches the solvers or everything, on Blacksmith runners only (never the self-hosted runner). A new push cancels the pull request’s previous run; the merge runs its own plan on develop.
Nightly (03:23 UTC) and gh workflow run CI --ref <branch>Everything: the full cargo xtask ci, heavy and oracle on Linux, the oracle with its nightly cases (manual runs add the macOS oracle).
Weekly (Sunday)The oracle on macOS.
Daily (06:07 UTC) and gh workflow run solidcraft-compat.ymlSolidCraft compatibility: SolidCraft’s latest release saves the design test recipes and fieldcraft-geometry’s design tests open them (docs/architecture.md, “SolidCraft pin”).
Nightly (05:43 UTC) and gh workflow run solidcraft-canary.yml --ref <branch> [-f tag=<tag>]SolidCraft canary (solidcraft-canary.yml): rewrites the SolidCraft pins to SolidCraft’s newest nightly tag (or the tag input) in the runner’s checkout only, runs cargo update -p for the solidcraft crates, then fieldcraft-geometry’s tests with the scripts feature, fieldcraft-ui-egui’s library tests, cargo deny check licenses bans and the meshing corpus check. A scheduled run on develop opens, updates or closes the one issue labelled solidcraft-canary (on a failure: the failing step’s log tail); a manual run writes its verdict to its run summary only. Two jobs: the check job on Blacksmith, 60 minutes at most, holds no write token and commits nothing; the report job checks out nothing and holds issues: write (SolidCraft canary).
gh workflow run corpus-bless.yml --ref <branch> -f parts=<names>Corpus bless: blesses the named meshing corpus parts on Linux x86_64 (the heavy job’s runner and toolchain) and uploads the fixtures that changed as an artifact; it pushes nothing (docs/meshing/corpus.md, “Blessing”).
Nightly (release.yml, when CI’s nightly run on develop completes)The packaging jobs and the release job, which publishes the nightly pre-release; no verify jobs, since the CI run that started it passed them (Nightly builds). Every other completed CI run on develop starts a release.yml run whose jobs are all skipped.
Release (release.yml, push to main and dry runs)verify-ci (full cargo xtask ci), verify-heavy, and verify-oracle on Linux and macOS, in parallel with the packaging jobs (macOS aarch64, Linux, Flatpak, Windows), which only upload workflow artifacts. The release job, the only one that signs SHA256SUMS.txt or creates/updates the draft, needs every verify and packaging job but Flatpak, which is not yet part of the release: a failing verify means no draft and no signature. The verify jobs restore develop’s CI caches (shared keys); only main saves release caches. A run takes about as long as its slowest job, ~30 min with warm caches (the macOS package; it was ~55–60 min when packaging waited for verify).

cargo xtask affected --base <rev> [--head <rev>] prints the plan for any range, e.g. what a commit needs: cargo xtask affected --base <sha>^ --head <sha>. A file outside every crate (tests/oracle/…, assets/…) belongs to the crates whose sources name its top-level directory; solver is set when the affected crates include the oracle’s (fieldcraft-testkit) or one with #[ignore]d heavy tests.

CI has no hardware GPU. cargo xtask ci runs the GPU suites (fieldcraft-lbm-gpu’s verification, fieldcraft-mesh-gpu’s agreement, the drawing tests) on lavapipe, Mesa’s software Vulkan, with FIELDCRAFT_GPU=software FIELDCRAFT_REQUIRE_GPU=1, so a missing adapter fails instead of skipping (lavapipe’s own crash, #638, showed up this way). The heavy job runs with FIELDCRAFT_GPU=cpu on Blacksmith: the GPU throughput benchmark needs a 131 MB buffer and lavapipe allows 128 MB. Bugs of real GPUs and their drivers (NVIDIA device loss #636, Windows DX12 #588, Metal) show up on none of these, so a change to crates/gpu or crates/lbm-gpu says in its pull request which real GPU it ran on (as #641 and #651 did).

SolidCraft canary

FieldCraft’s pins name a SolidCraft release tag (tag = "v0.42.0" in Cargo.toml, on every solidcraft-* and solidcore-* line and the two patches; docs/architecture.md, “SolidCraft pin”). The canary (.github/workflows/solidcraft-canary.yml) builds against SolidCraft’s newest nightly every night, so drift shows the day it lands instead of in one big repin.

  • What it changes. Only the runner’s checkout: each SolidCraft tag line is rewritten to the tag under test, then cargo update -p moves the solidcraft crates. Nothing is committed or pushed. The check job’s checkout keeps no token, and the code it builds runs in a VM that holds no write token. Only the report job, which runs no repository code, holds issues: write.
  • What it runs. cargo test --profile ci -p fieldcraft-geometry --features scripts (the design format and name tests among them), cargo test --profile ci -p fieldcraft-ui-egui --lib, cargo deny check licenses bans, and cargo test --profile ci -p fieldcraft-testkit --lib -- runner::tests::corpus_matches_its_fixtures --ignored.
  • When it goes red. The first failing or cancelled step (a timeout included) decides the report. A failure at or before tag resolution is a setup failure, titled “SolidCraft canary setup failed: ”; any later one is titled “SolidCraft canary: breaks FieldCraft”. Either carries the step’s log tail. A green scheduled run afterwards comments on the issue and closes it.
  • Try a tag. gh workflow run solidcraft-canary.yml -R tangency-labs/fieldcraft --ref <branch> -f tag=<tag> (a release such as v0.50.0, or a nightly); empty means the newest nightly.

Repinning SolidCraft

A repin is a pull request that moves the tag:

  1. Pick the tag the canary passes, or the release that supersedes it, and check it exists: git ls-remote --tags https://github.com/tangency-labs/solidcraft refs/tags/<tag>.
  2. Set tag = "<tag>" on every SolidCraft line of the workspace Cargo.toml (the 14 lines the canary rewrites); they must all name the same tag. Refresh Cargo.lock for the solidcraft crates.
  3. Adapt fieldcraft-geometry and the UI crate to the API changes until the build and the canary’s checks pass. Update the version named in docs/architecture.md (“SolidCraft pin”).
  4. Designs: a release that raises the design format must still be read, since the pin decides which designs FieldCraft opens. Add its saved designs as crates/geometry/tests/designs/solidcraft-<version>/ as the SolidCraft compatibility workflow describes.
  5. Meshing corpus: bless on macOS first, then Linux x86_64 in CI, as docs/meshing/corpus.md (“Blessing”) says. Re-bless only the parts whose results moved on purpose, and say in the pull request what moved and why.
  6. The heavy tests and the oracle must stay as they are; a moved fixture is a finding to explain, never a value to tune (AGENTS.md).
  7. Patch crates: a repin that adds SolidCraft patch crates (under [patch.crates-io]) adds them to the pin check (the tag lines the canary rewrites) and to the cargo update -p list in .github/workflows/solidcraft-canary.yml, or the canary would test an old copy of them.

Verify and publish

Publishing is a maintainer’s call; an agent preparing a release stops at the draft.

  1. Check the run succeeded for the intended commit and the draft targets it (gh release view v<version> -R tangency-labs/fieldcraft).
  2. Download the assets into an empty folder (gh release download v<version> -R tangency-labs/fieldcraft), run shasum -a 256 -c SHA256SUMS.txt, check the signature (minisign -Vm SHA256SUMS.txt -P <the public key above>, or rsign verify -P …), and check every platform’s files are there.
  3. Smoke-test what you can run: open the dmg, drag the app to Applications, launch it with --sample cantilever; run fieldcraft-cli --version from the zip or tar.gz; on Linux run the AppImage, or install the .deb (sudo apt install ./fieldcraft_<v>_amd64.deb) or .rpm (sudo dnf install ./fieldcraft-<v>.x86_64.rpm); on Windows unzip and start fieldcraft.exe. Look at the run’s logs for the platforms you could not try (each job checks its own package).
  4. Edit the notes: what is new, fixes, breaking changes, known limitations. Keep the install and signing paragraphs; never claim signing the notes don’t state.
  5. Publish: gh release edit v<version> -R tangency-labs/fieldcraft --draft=false --latest (a release candidate: --draft=false --prerelease --latest=false). Publishing creates the tag at the draft’s commit; never push release tags by hand.
  6. Once releases carry the Flatpak bundle, check the Flatpak repository took it: the Flatpak repository run starts a Pages run on main, whose Install from the Flatpak repository job installs the new version from Pages and runs it (Flatpak repository).

Nightly builds

A nightly is a pre-release of develop, for trying what is coming before it is released.

  • When. CI’s nightly run on develop (ci.yml, 03:23 UTC: the full cargo xtask ci, the heavy tests and the oracle) starts release.yml when it completes (its workflow_run trigger), so a nightly follows that run however long it takes and builds the commit it tested. A passing rerun of a failed CI nightly starts it again.
  • Skipped (the run’s summary says why, and nothing is built) when CI’s run, or its gate, heavy or oracle job, did not pass (a red develop); when the run is the weekly macOS-oracle run (Sunday 04:41 UTC); and when its commit is already the newest nightly’s (develop has not moved). packaging/nightly.sh decide makes the call.
  • What. The release’s packaging jobs build version <MAJOR.MINOR.PATCH>-nightly.<YYYYMMDD>.<run>.<attempt> (MAJOR.MINOR.PATCH from develop’s Cargo.toml, the date in UTC, this run’s number and attempt); the verify jobs do not run again, since the CI run passed them. The binaries report that version (fieldcraft --version, Help, crash reports) and each packaging job checks they do. The release job writes and signs SHA256SUMS.txt, then publishes the pre-release FieldCraft v<version> (nightly) (--prerelease --latest=false, so releases/latest and the Download buttons keep pointing at the latest release, and the Flatpak repository ignores it). Its notes say it is a nightly and which CI run verified it, followed by .github/release-notes.md and the changes since the newest published release, nightly or not.
  • Kept: the newest NIGHTLY_KEEP (7) published nightlies; the same job deletes older ones with their tags (packaging/nightly.sh prune). Only published pre-releases whose tag has the nightly form are listed, so a release or a release candidate is never deleted.
  • Signed and notarized like releases. The macOS app is signed with the Developer ID and notarized, SHA256SUMS.txt is signed with the release key, and so FieldCraft installed from a nightly updates itself (updates.md). The packaging and release jobs of a nightly run in the release environment, which is why develop is one of its deployment branches. That is sound because a workflow_run run always executes the workflow file of the default branch, develop, which changes only through reviewed pull requests, and because CI has a scheduled run only on that branch of this repository: a pull request, a fork’s included, starts a CI run whose event is pull_request, whatever its branch is called, and release.yml runs nothing for it.
  • The cost. With develop allowed, any job of a workflow on develop that names release can read every release secret, the update-signing key that every installed FieldCraft trusts included. Only release.yml names it, through its version job’s environment output behind the condition above, and .github/CODEOWNERS keeps the workflows under the owner’s review; a pull request that adds environment: release anywhere else, or widens that condition, must be refused.
  • Opting in: download a nightly from the nightly pre-releases; from then on that install is offered newer nightlies and newer releases (updates.md).

A nightly cannot be started by hand: gh workflow run release.yml --ref <branch> is a dry run (Dry runs), unsigned, and publishes nothing. To build tonight’s nightly again, rerun its release.yml run (gh run rerun <id> -R tangency-labs/fieldcraft).

Flatpak repository

Pages serves a Flatpak repository with the latest published release (not pre-releases) at https://tangency-labs.github.io/fieldcraft/flatpak/, next to the book and the web app, once releases carry the bundle (below; until then the site has no repository). Users will install and update FieldCraft with:

flatpak install --user https://tangency-labs.github.io/fieldcraft/flatpak/fieldcraft.flatpakref
flatpak update --user

(fieldcraft.flatpakref adds the remote fieldcraft; the freedesktop runtime comes from Flathub. fieldcraft.flatpakrepo adds the remote alone.) How it is made:

  • release.yml builds fieldcraft-<v>-linux-x86_64.flatpak (packaging/linux/flatpak-bundle.sh). Not yet in the release: the job runs on every release run and dry run and uploads the bundle as the flatpak-x86_64 workflow artifact, but the release job neither waits for it nor attaches it. Once a dry run (gh workflow run release.yml --ref <branch> on a branch of this repository) has built it, a follow-up change adds flatpak to the release job’s needs, renames its artifact into release-*, adds the file to the set (so it is in SHA256SUMS.txt) and adds the install lines to the release notes and the README.
  • Every Pages deploy (pages.yml on main) runs packaging/flatpak-site.sh in its own flatpak job, the only one that gets FLATPAK_GPG_KEY: a fresh runner with Ubuntu’s flatpak, ostree and minisign, no Rust toolchain and nothing from the book or web build (which runs crates.io build scripts). deploy adds its output to the site artifact of the build job. When the flatpak job fails, the book and the web app still deploy, without /flatpak/ (the run warns), so the repository is missing until the next good run. The script downloads the latest published release’s bundle, checks SHA256SUMS.txt.minisig with the release key the app is built with (so a release without FIELDCRAFT_SIGNING_KEY gets no repository) and the bundle against SHA256SUMS.txt, imports it into a new OSTree repository under flatpak/repo and writes the .flatpakrepo, the .flatpakref and an index page. Each deploy holds exactly one release, so a docs-only deploy keeps the current one, and the size stays that of one release. Releases from before the Flatpak have no bundle, and the site then has no repository.
  • Publishing a release starts flatpak-pages.yml, which runs pages.yml on main again when the release is the latest. A release event runs on its tag, and only main may deploy Pages. A release published by a workflow’s GITHUB_TOKEN starts no workflows; a maintainer publishing it (on the page, or gh release edit as above) does.
  • After a deploy that publishing (or a manual run) started, pages.yml’s flatpak-check job waits until Pages serves the new release (its cache keeps files up to 10 minutes), installs FieldCraft from the .flatpakref on a clean runner and runs both programs.

To put a chosen published release in (going back after a bad release, say): gh workflow run pages.yml -R tangency-labs/fieldcraft --ref main -f release_tag=v<version>.

Signing (optional). With the release environment secret FLATPAK_GPG_KEY (an ASCII-armored GPG secret key without a passphrase), the commits and the repository summary are signed and the .flatpakrepo and .flatpakref carry the public key, so clients verify what they download. Without it the repository is unsigned (the run warns): clients add it with GPG verification off and rely on HTTPS. Setting it up, once (the owner):

export GNUPGHOME="$(mktemp -d)"
gpg --batch --passphrase '' --quick-gen-key "FieldCraft Flatpak repository" rsa4096 sign never
gpg --batch --armor --export-secret-keys | gh secret set FLATPAK_GPG_KEY --env release -R tangency-labs/fieldcraft

Keep an offline copy of the key and delete $GNUPGHOME. Remotes added before the key existed stay unsigned until users add the repository again (flatpak remote-delete --user fieldcraft, then install from the .flatpakref); the same goes for a new key after a rotation.

Dry runs

gh workflow run release.yml -R tangency-labs/fieldcraft --ref <branch> runs the verify jobs and builds every package in parallel, and uploads them with the notes as the release-assets artifact of the run, without creating a release. -f draft=true creates or updates the draft, and is accepted on main only. Locally, packaging/macos/package.sh --arch aarch64 (or x86_64, universal) and packaging/linux/package.sh write to dist/release/ (the .deb and .rpm need cargo install --locked cargo-deb cargo-generate-rpm at the versions in release.yml; --formats "tar appimage" skips them).

ADR 0001: Libraries and licences

Status: accepted (2026-10-13)

Context

FieldCraft is MIT OR Apache-2.0. Everything it links must allow that, and the meshing and solver algorithms, where the obvious open-source implementations are GPL-family, must come from papers.

Decision

Geometry: SolidCraft, as git dependencies pinned by commit (solidcraft-kernel, solidcraft-geom, solidcraft-doc, solidcraft-io; MIT OR Apache-2.0, built on the Apache-2.0 truck crates until v0.30 and on solidcore, an Apache-2.0 Rust port of NVIDIA’s SMLib, from v0.40, with its solidcore-record geometry records from the copy SolidCraft vendors). SolidCraft is the primary geometry source: FieldCraft opens SolidCraft designs and meshes from SolidCraft’s tessellation, and reads face-tagged meshes SolidCraft exports. Other CAD exchange files (STEP, which SolidCraft’s kernel already reads) can be added as secondary inputs through the same crate. Only fieldcraft-geometry may depend on SolidCraft.

Desktop UI: SolidCraft’s UI kit (solidcraft-ui-kit and the solidcraft-theme token contract it draws from; same pinned commit, MIT OR Apache-2.0 from 615a4adc1f on, see below). Decided 2026-11-10 (owner): the desktop UI draws its windows, confirmations, menus, form rows, fields and buttons with the kit instead of FieldCraft’s adapted copies of SolidCraft’s widgets, so the two apps share one implementation and FieldCraft follows SolidCraft’s egui line. FieldCraft installs its own tokens (its teal accent on SolidCraft’s chrome) and keeps what is its own: the viewport, mesh, element, results and setup colours. fieldcraft-ui-egui is the only crate that may use them (cargo xtask layers); it uses nothing else of SolidCraft’s. The kit builds for wasm32-unknown-unknown, so the browser app keeps the same UI. craft-ui (storytold/craft-libs), used before for tabs, icon buttons and widget states, is no longer a dependency. Updated 2026-11-29 (owner approval, #1164): fieldcraft-ui-egui may also use solidcraft-panel-layout (MIT OR Apache-2.0, same pinned commit) for workspace panel layout and persistence alongside solidcraft-ui-kit::panel_runtime.

SolidCraft’s UI code is MIT OR Apache-2.0; its brand artwork is used by written permission. From SolidCraft 615a4adc1f (2026-11-26) on, solidcraft-ui-kit, solidcraft-theme and solidcraft-icon-svg are dual-licensed MIT OR Apache-2.0 like the rest of the workspace, so they need no permission and no deny.toml exception. The SolidCraft Brand and Interface Licence now covers only the SolidCraft name, logo, app icon, brand kit and the icon artwork (the SVG masters) shipped in solidcraft-look; solidcraft-look’s code is MIT OR Apache-2.0, and its licence expression names the brand and font parts ((MIT OR Apache-2.0) AND LicenseRef-SolidCraft-Brand AND OFL-1.1). The permission for that artwork: requested 2026-11-10 by FieldCraft’s owner (GitHub jyviko) for FieldCraft to link and distribute solidcraft-look, and approved by SolidCraft’s maintainer bherbruck in https://github.com/tangency-labs/fieldcraft/pull/872. FieldCraft does not ship the brand artwork, name or logo without it. deny.toml accepts the brand licence for solidcraft-look only (a LicenseRef-SolidCraft-Brand clarification and exception), never in its global allow list; any other crate under that licence needs its own recorded permission before FieldCraft depends on it. FieldCraft does not use solidcraft-look yet: whether it draws SolidCraft’s icons and themes or its own is still the owner’s decision.

Meshing: our own, implemented from published papers (docs/meshing/literature.md). Robust predicates follow Shewchuk’s adaptive-precision arithmetic (the paper; his reference predicates.c is public domain). A permissive crate may be adopted instead after review; record it here. Decided 2026-10-13: our own implementation, fieldcraft_mesh::predicates, written from Shewchuk 1997, Devillers–Teillaud 2011 and Attene 2020 (no unsafe, deterministic, wasm-safe, a validated coordinate domain instead of Shewchuk’s overflow/underflow caveat, and indirect predicates that robust lacks). robust (georust, MIT OR Apache-2.0) and num-bigint / num-rational / num-traits (MIT OR Apache-2.0) are dev-dependencies only: differential test oracles, never linked into FieldCraft.

Linear algebra: our own. Decided 2026-10-13 (implicit solver task): fieldcraft-solver has its own sparse symmetric storage, nested-dissection ordering (George 1973, by coordinate bisection), up-looking sparse Cholesky (Davis 2006, elimination trees per Liu 1990) and shift-invert block Lanczos with full reorthogonalization (Ericsson–Ruhe 1980, Grimes–Lewis–Simon 1994) on a Householder + implicit-QR dense eigensolver (Golub–Van Loan). faer (MIT) was the alternative and is faster on large problems, but it selects SIMD kernels by CPU feature at run time (AVX2, AVX-512, NEON), which changes floating-point reduction order between machines and breaks the bit-for-bit determinism rule; it is also a large dependency tree for the browser build. Our code is sequential with a fixed operation order, unsafe-free and wasm-safe, and its factor size is known (and capped) before any value is computed. Cost if this is wrong: large models (beyond a few hundred thousand equations) factor slower than they could; the remedy is a supernodal factorization of our own, or faer behind the same Factor interface with a stated tolerance instead of bit-identity, as the GPU exception already does. Updated 2026-10-13 (CPU parallelism task): the factorization is now our own supernodal left-looking Cholesky (Liu–Ng–Peyton 1993 fundamental supernodes on a postordered elimination tree, Ng–Peyton 1993, Rothberg–Gupta 1994), multithreaded with a fixed operation order (below). Its rounding differs from the old up-looking factor in the last digits; every oracle fixture stays within its band.

Complex scalars: num-complex (MIT OR Apache-2.0). Decided 2026-11-22 (RFC 0001 phase 1, #881): the sparse matrix and the LDLᵀ factor are generic over a scalar trait, implemented for f64 and num_complex::Complex64, for the complex-symmetric systems of a harmonic response (K − ω²M + iωC): every step transposes and never conjugates. num-complex is pure Rust with no unsafe, builds for wasm, and adds no reduction order of its own (sums stay in the fixed order of the f64 kernels). Rejected: a hand-written complex type (a second arithmetic to verify for no gain) and faer (see above).

Threads: rayon (MIT OR Apache-2.0), in fieldcraft-parallel only (an L0 crate with no workspace dependencies; decided 2026-10-13). The solvers keep the bit-for-bit rule on any number of threads by construction: work is cut into blocks whose sizes are constants of the algorithm, never derived from the thread count; each floating-point value is computed by one task in an order fixed by the input; results come back in block order and every sum over blocks or elements (nodal forces, assembly, wall forces, energies) runs on one thread in the order the sequential algorithm used. No float atomics, no reduce whose tree depends on work stealing: rayon decides only when a block runs. std::thread::scope was the alternative and needs no dependency, but it spawns threads per parallel region; the explicit solver enters several regions per time increment (10⁵–10⁷ increments), so a persistent pool is needed, and writing our own would re-implement rayon’s. rayon was already in the shipped dependency tree (THIRD-PARTY-LICENSES.txt unchanged). In the browser build (wasm32) the crate does not depend on rayon and runs the same blocks one after another, with the same results. The thread count is a session and solve.* parameter (threads, 1–256) whose default is FIELDCRAFT_THREADS or the available cores. Cost if this is wrong: rayon’s pool is a process-wide resource and nested pools add latency; replacing it touches only fieldcraft-parallel.

Machine memory: sysinfo (MIT), in fieldcraft-engine only, desktop and CLI builds (not the browser), with only its system feature, for the physical memory (decided 2026-10-21, #650). It bounds how far a fluid solve’s memory caps may be raised: half the physical memory, or on Linux half the root cgroup’s limit when that is lower (a container’s). std has no such query; the alternatives were our own per-platform code (/proc/meminfo on Linux is plain Rust, but macOS and Windows need sysctl and GlobalMemoryStatusEx through FFI, which unsafe_code = "forbid" rules out) or a crate built on C code. Cost if this is wrong: the bound is a little off on some platform, and the remedy stays inside fieldcraft_engine::machine.

Installed fonts: fontdb (MIT), in fieldcraft-ui-egui only, desktop builds (not the browser), without its fontconfig and memmap features (decided 2026-11-25, #991). A character none of the interface’s faces has (a file, folder or body named in Japanese, Korean or Chinese) is drawn with an installed font that has it: the fonts are listed once on a thread, and an egui font provider answers each missing character (crates/ui-egui/src/fonts.rs, adapted from SolidCraft’s). Shipping a CJK face costs several megabytes per script; eframe’s system_fonts feature (egui_system_font_provider) does the same through the systems’ own fallback but adds seven crates, and fontdb adds two (fontdb, tinyvec; ttf-parser and slotmap were already in the tree). Without fontconfig it reads the font folders, not fontconfig’s settings. The characters a face has are read with skrifa, egui’s own font reader (already in the tree), so a face is offered only for what egui will find in it. Cost if this is wrong: such text depends on the machine’s fonts, and the remedy stays inside fonts.rs.

Allowed: MIT, BSD-2/3, Apache-2.0, ISC, Zlib, Unicode, MPL-2.0 (as an unmodified dependency), CC0 and public domain.

Rejected — never read, copy or link:

ProjectLicenceWould have offered
TetGenAGPL-3.0constrained Delaunay tetrahedralization
CGALGPL-3.0 / LGPL-3.0Delaunay, mesh generation
GmshGPL-2.0+tet and hex meshing
NetgenLGPL-2.1tet meshing
CalculiXGPL-2.0implicit solver, Abaqus-like input
Code_AsterGPL-3.0implicit solver
OpenRadiossAGPL-3.0explicit solver
ElmerGPL-2.0 / LGPL-2.1multiphysics solver
FreeFEM, SalomeLGPLFE libraries, pre-processing
Palabos, OpenLB, waLBerla, lbmpy, VirtualFluids, TCLBAGPL / GPLlattice Boltzmann (implement from the papers)
OpenFOAM, SU2, 4C, DualSPHysics, preCICEGPL / LGPLCFD, FSI coupling, SPH
FluidX3Dnon-commercial onlyGPU lattice Boltzmann
LULESHno licenceexplicit hydrodynamics proxy
OpenCASCADELGPL-2.1B-rep kernel
Attene’s CDT, Indirect_Predicates, VolumeMesherGPL / LGPLrobust CDT, indirect predicates (implement from the papers)
TetWild (original), Evocube, robustPolycube, ultimaille, invertible-mapsGPL-3.0 / AGPL-3.0tet meshing, polycube, injective maps
libHexEx, libHexHex, QGP3D, MC3D, CoMISo, GraphiteGPLinteger-grid-map hex extraction, quantization
Shewchuk’s Trianglenon-commercial only2D meshing
geogram third_party/tetgen, third_party/triangle and their wrappersAGPL / non-commercial(the rest of geogram is BSD-3 and readable)
libigl copyleft/ modulesGPL(libigl core is MPL-2.0 and readable)
OpenVolumeMesh, CGoGNbelieved LGPL, unverifiedtreat as forbidden until checked

deal.II is now dual-licensed Apache-2.0 (with LLVM exception) or LGPL, so it is readable under its Apache-2.0 option. Readable solver references (re-implement from the papers): STLBM (MIT), XLB, lettuce, pylbm, Laghos, MFEM, IBAMR, the Kratos core, MUI, FEBio, SPHinXsys, SPlisHSPlasH, fenris; full table in docs/solvers/literature.md.

Repositories without a licence are all rights reserved: never read them (for example Gao 2019’s octree hex code, LoopyCuts). Readable references for the meshing work (re-implement from the paper, note anything adapted in ATTRIBUTION.md): Shewchuk’s predicates.c (public domain), georust/robust (Apache-2.0), geogram (BSD-3, exclusions above), fTetWild (MPL-2.0), CinoLib, Gen-Adapt-Ref, HexaLab, robust_hex_dominant_meshing (MIT), quartet (ISC). The full table with sources is in docs/meshing/literature.md.

Test geometry follows the same rule as test data: nothing produced with a commercial CAD or CAE product. That excludes ABC (Onshape), MAMBO (files from commercial translators) and the HexMe models that come from ABC, GrabCAD or Siemens NX; HexMe’s Gmsh-made models are allowed (CC-BY-4.0). Thingi10K is not used either (owner decision 2026-10-13: authoring tools unrecorded). The test corpus is our own: parts built with SolidCraft (scripts or designs authored in SolidCraft, committed as their recipes so the geometry is regenerated, not stored) and analytic shapes. Recipes are SolidCraft command scripts run through solidcraft-engine (same pinned commit), a dependency of fieldcraft-geometry only behind its non-default scripts feature, which the test tooling (fieldcraft-testkit) enables; the shipped library opens designs without it.

Commercial products (Abaqus, Nastran, LS-DYNA, LS-PrePost, HyperMesh, ANSA, Femap, Patran, ANSYS) are never run or scripted, and their input files, text and figures are never copied. Deck formats come from the vendors’ public reference manuals, described in our own words with our own examples. Published numerical results (benchmark and verification manuals) may serve as cited reference values for our own models of the same problems (owner decision 2026-10-13; docs/verification.md).

Consequences

  • The tet and hex meshers are significant original work; the literature survey decides the order and the methods.
  • SolidCraft and FieldCraft move together: bumping the pinned commit bumps solidcore-record (from SolidCraft’s repository) and the repeated [patch.crates-io] entries in the same commit. The pin is a SolidCraft release tag’s commit or, when FieldCraft needs a change not yet released, a commit on SolidCraft’s main branch (owner exception 2026-11-27, bare commit until the next tag), and a scheduled check opens designs saved by SolidCraft’s latest release, so a release that saves a design format the pin can’t read is caught before users meet it (docs/architecture.md, “SolidCraft pin”).

RFC 0001: High-frequency electromagnetics

  • Status: proposed, open for comment
  • Discussion: #971
  • Scope: time-harmonic Maxwell (frequency domain) on tetrahedral meshes: cavity eigenmodes, driven problems with waveguide and lumped ports, S-parameters, radiation and scattering
  • Out of scope here: time-domain EM (FDTD, DGTD), low-frequency magnetostatics and eddy currents (ROADMAP M19 “low-frequency electromagnetics”, a later RFC), fast integral-equation methods, and coupled EM–thermal–structural analysis (once this lands, it becomes a coupling through the existing heat solver)

This RFC proposes how electromagnetics fits FieldCraft’s existing layers, what it reuses, what it adds, and how it is verified. It is a plan to comment on; the decisions marked Open are the owner’s.

1. What we solve

The vector wave equation for the electric field E, at angular frequency ω:

∇ × (μᵣ⁻¹ ∇ × E) − k₀² εᵣ E = −j k₀ Z₀ J, k₀ = ω √(μ₀ε₀)

with complex, possibly anisotropic εᵣ and μᵣ (losses, PML). The weak form in H(curl) gives

  • eigenmodes (lossless cavity): K e = k² M e, K and M real symmetric, M positive definite, K positive semi-definite;
  • driven problems: (K − k₀² M + j k₀ B) e = f, complex symmetric (A = Aᵀ, not Hermitian) when the materials are reciprocal.

Theory: J.-M. Jin, The Finite Element Method in Electromagnetics, 3rd ed., Wiley 2014; P. Monk, Finite Element Methods for Maxwell’s Equations, Oxford 2003.

2. What exists today, and what it means for EM

PieceTodayFor EM
Unknowns (fem::dof)Nodal only: a DofKind per node, numbered node by node in label orderNeeds unknowns on edges (and on faces at second order)
Matrix (solver::sparse::Csr)f64 valuesNeeds complex values
Direct solvers (solver::cholesky, solver::ldlt)Supernodal Cholesky and LDLᵀ with bounded Bunch–Kaufman pivoting, multithreaded, fixed operation orderReused: LDLᵀ for indefinite real systems as is; its numeric kernels made generic for complex-symmetric, and Symbolic gives up the matrix values it holds (§8.3)
Ordering (solver::ordering)Geometric nested dissection on a coordinate per unknownGeneralised from nodes to entities (nodes, edges, faces), with a point per entity: the edge midpoint, the face centroid (§8.2)
Eigen (solver::eigen)Shifted block Lanczos, K φ = λ M φ, M inner product, full reorthogonalizationReused unchanged for cavity modes and for port modes
Constraints (solver::constraints)Prescribed values and linear constraint rows, eliminated from the systemPEC (tangential E = 0) is a prescribed value on boundary edges; periodic boundaries are constraint rows
Geometry map (fem::basis)Isoparametric map, Jacobians on every tet familyReused for the covariant Piola map of edge elements
Results, jobs, cancellation, determinism (fieldcraft-parallel)In placeReused
UI resultsContours, mode animation, path plotComplex fields fit contours and animation; S-parameters, Smith chart and patterns need new panels

No iterative solver exists. Direct factorization covers small and medium models (a few million unknowns within the memory caps the solvers already enforce).

3. Proposal

3.1 Edge degrees of freedom

Extend DofLayout so a degree of freedom belongs to a mesh entity: a node (today), an edge or a face. Edges and faces are numbered after the nodes, in a fixed order derived from sorted vertex labels, so the same mesh always gives the same numbering (the determinism rule).

  • Orientation: an edge runs from its lower to its higher global vertex label, and a face is its sorted vertex triple. Each element builds its basis on its vertices sorted by global label, so its functions are the global ones and assembly needs no signs; a sign per entity is not enough for the second-order face functions (§8.1). Sign conventions are the main source of silent errors in edge elements, so they get their own unit tests (a constant curl field reproduced exactly, the tangential continuity across shared faces).
  • Elements: Nédélec first kind on tetrahedra (J.-C. Nédélec, Mixed finite elements in ℝ³, Numer. Math. 35:315–341, 1980): first order (6 edge unknowns, Whitney forms) and second order (hierarchical, 20 unknowns; J. P. Webb, Hierarchal vector basis functions of arbitrary order for triangular and tetrahedral finite elements, IEEE Trans. Antennas Propag. 47(8):1244–1253, 1999). Curved (quadratic-geometry) tets through the covariant Piola map.

Open: a separate EdgeLayout beside DofLayout, or one layout keyed by entity. The proposal is one layout, because constraints, results and the control channel then see a single numbering.

3.2 Complex arithmetic

Make Csr, assembly and the LDLᵀ numeric phase generic over a scalar trait implemented for f64 and a complex type. The symbolic phase (elimination tree, supernodes, column counts) depends only on the pattern and is shared once Symbolic no longer holds the matrix values (§8.3). inertia() stays on the f64 instance: it has no meaning for a complex-symmetric matrix.

  • Complex-symmetric factorization uses the transpose, not the conjugate transpose: A = L D Lᵀ with the same bounded Bunch–Kaufman pivot search on |aᵢⱼ|.
  • The f64 path must stay bit-for-bit identical: the oracle fixtures prove it.
  • Open: a hand-written complex type in fieldcraft-fem or the num-complex crate (MIT/Apache-2.0). The proposal is num-complex, recorded in docs/adr/0001-libraries.md.

3.3 Eigenmodes

A cavity step reuses solver::eigen as it is. The curl–curl operator has a large null space (every gradient field has k² = 0). With a shift σ between 0 and the first cutoff, K − σM is indefinite, so the step factors it with LDLᵀ. The null-space modes map to θ = −1/σ, which outranks every mode above 2σ, so the step keeps every Lanczos iterate M-orthogonal to the discrete gradients from the first cavity case (§8.4). The LDLᵀ inertia (a Sturm count) gives how many modes lie below a frequency once the null space’s dimension is subtracted, one more for each separate conductor beyond the first (§8.4).

3.4 Ports, boundaries and sources

  • PEC and PMC: prescribed tangential E (PEC) and the natural condition (PMC). An edge is held when a PEC face contains it, never because both its end nodes lie on PEC (§8.2).
  • Waveguide ports: a 2D eigenproblem on the port face (edge elements on triangles, the same Lanczos) gives the modal fields and propagation constants. A modal boundary condition excites and absorbs them (Jin 2014, ch. 8).
  • Lumped ports: a gap source with a reference impedance.
  • Open boundaries: a first-order absorbing boundary condition, then a PML as an anisotropic material (Z. S. Sacks, D. M. Kingsland, R. Lee, J.-F. Lee, A perfectly matched anisotropic absorber for use as an absorbing boundary condition, IEEE Trans. Antennas Propag. 43(12):1460–1463, 1995).
  • Periodic (Floquet) boundaries: constraint rows with a phase, for unit cells.

3.5 Post-processing (commands first, panels second)

Every view reads its numbers from a command, so scripts, MCP and exports get exactly what the UI draws.

  • results.sparameters — S-matrix per frequency, reference impedances, Touchstone export
  • results.far_field — near-to-far-field transformation on a closed surface (equivalence principle; C. A. Balanis, Antenna Theory, 4th ed., Wiley 2016, ch. 12): gain, directivity, RCS, polarization
  • results.port_modes — cutoff, propagation constant and impedance per mode
  • Complex nodal or element fields: magnitude, real and imaginary parts, phase at a chosen angle

UI, on SolidCraft’s UI kit like every panel:

  • complex contours and an ωt animation through the existing contour and animation path;
  • an S-parameter chart (magnitude in dB, phase);
  • a Smith chart;
  • radiation patterns: polar cuts and a 3D pattern in the viewport.

3.6 Commands and model

The usual pattern, each a CommandSpec with tests:

  • model.material.create gains εᵣ, μᵣ and σ (with loss tangent)
  • model.boundary_condition.create gains pec, pmc, absorbing, periodic
  • model.port.create (waveguide and lumped)
  • model.step.create gains em_eigen and em_driven (a frequency list or sweep)
  • solve.em

Units go through crates/model/src/units (SI stored, display units at the boundaries).

4. Verification

Each case is our own model, built from its published description, compared with theory, measured data or a published benchmark, and frozen as an oracle fixture (docs/verification.md).

CaseReferenceChecks
Rectangular cavity TE₁₀₁ and higher modesD. M. Pozar, Microwave Engineering, 4th ed., Wiley 2012, §6.4Resonant frequencies; no spurious modes; convergence order of first- vs second-order elements
Partially dielectric-filled cavityJin 2014Frequencies from the transcendental equation
WR-90 waveguide sectionPozar 2012 §3.3β of TE₁₀; |S₂₁| = 1, S₁₁ ≈ 0 for a matched line
Dielectric slab in a waveguidePozar 2012, ch. 2–3S₁₁ and S₂₁ against the closed-form transmission-line result
Coaxial linePozar 2012 §3.5Characteristic impedance
PEC sphere scatteringMie series (J. A. Stratton, Electromagnetic Theory, McGraw-Hill 1941, §9.25)Bistatic RCS; PML reflection
Half-wave dipoleBalanis 2016 §4.6Pattern, directivity 1.64, input impedance ≈ 73 + j42.5 Ω

Cheap cases run in the trunk gate; sweeps and convergence studies are heavy.

5. Plan

Each phase lands as reviewed pull requests with its tests and its verification cases.

PhaseWorkProposed owner
0This RFC agreed; open questions decidedMaintainer and EM contributor
1Entity-keyed DofLayout (edges, faces); scalar-generic Csr, assembly and LDLᵀ; f64 path bit-identicalCore
2Nédélec elements (order 1, then 2); PEC; cavity eigen step; cavity casesEM contributor
3Complex driven step; waveguide and lumped ports; S-parameters; waveguide casesEM contributor
4Absorbing boundary and PML; far field; sphere and dipole casesEM contributor
5UI: complex contours and animation, S-parameter chart, Smith chart, radiation patternsCore and EM contributor
LaterPeriodic boundaries, iterative solver with an auxiliary-space preconditioner for large models (R. Hiptmair, J. Xu, Nodal auxiliary space preconditioning in H(curl) and H(div) spaces, SIAM J. Numer. Anal. 45(6):2483–2509, 2007), EM–thermal coupling—

6. Rules that apply (from AGENTS.md)

  • Methods come from the cited papers and textbooks; no code from other EM codes is read, ported or adapted, and GPL/LGPL/AGPL code is never read.
  • Results are verified against theory, measurement and published benchmarks, never against another solver’s output.
  • No panics; every iteration and size is bounded; input-derived numbers are checked.
  • Deterministic results on CPU, bit for bit.
  • Everything is a command; the UI, scripts, CLI and MCP reach the same commands.

7. Open questions

  1. One entity-keyed DofLayout, or a separate edge layout (§3.1)?
  2. num-complex or our own complex type (§3.2)?
  3. Explicit null-space projection in the eigen step (§3.3)? Decided: yes, from the first cavity case (§8.4).
  4. First-order only for the first release, or first and second order together?
  5. Which first application drives the priorities: filters and waveguide components (ports and S-parameters first) or antennas (PML and far field first)?

8. Notes on phase 1 from the phases 2–4 side

What the edge elements, ports and eigen step will ask of phase 1, written before it starts so the layout and the factor do not have to be reopened later. Each note is argued from the theory cited and from the code as it is on develop; the decisions stay the owner’s.

In short, four things change what phase 1 builds:

  1. The layout hands an element its vertices’ sort order, not a sign per entity (§8.1).
  2. The matrix pattern and the ordering work on entities (nodes, edges, faces), not on nodes (§8.2).
  3. Symbolic gives up the matrix values it holds, and inertia() stays on the real scalar only (§8.3).
  4. The layout can give the discrete gradient (each node’s edges with orientation), for the null space of the eigen step and as a test of the numbering (§8.2, §8.4).

The rest is detail for whoever implements them.

8.1 Orientation: sort the element’s vertices, and a sign is not enough for faces

§3.1 gives each local edge a sign ±1 against the global edge and says face unknowns “use the same rule”. For edges that is right. For the second-order face functions it is not sufficient:

  • A face with sorted vertices i < j < k carries two functions, λᵢ w_jk and λⱼ w_ki, with w_ab = λ_a ∇λ_b − λ_b ∇λ_a (Webb 1999). The third cyclic one is dependent on them: λᵢ w_jk + λⱼ w_ki + λₖ w_ij = 0. An element that sees the face in another vertex order therefore holds a pair that is a 2 × 2 combination of the global pair, not ±1 times it. An example: a face with global vertices 3, 7, 9 has the global functions λ₃ w₇₉ and λ₇ w₉₃. A tetrahedron that lists the face as 7, 9, 3 and takes “the first two” in its own order gets λ₇ w₉₃ and λ₉ w₃₇. The first is the second global function; the second is neither global function nor its negative, it is −(λ₃ w₇₉ + λ₇ w₉₃). No choice of two signs joins the two tetrahedra.
  • The second function of an edge, ∇(λ_a λ_b), is symmetric in a and b: it takes no sign, while the Whitney function of the same edge does.

The simplest way to make both come out right is to build the edge-element basis on the element’s vertices sorted by global label: every local edge then runs low to high, every local face is its sorted triple, the element’s functions are the global ones, and assembly needs no signs and no 2 × 2 blocks. The costs are small and local to the element:

  • the sorted tetrahedron may be left-handed, so gradients take the signed Jacobian determinant and volumes its magnitude;
  • ElementKind::edges() cannot be the local edge table (Tet4 lists (2, 0)); the EM element keeps its own table over the sorted corners;
  • the 2 × 2 combination is still needed in one place, periodic boundaries (Later), where a face is tied to an image whose vertex order the mesh does not control.

So the layout should hand an element its vertices’ sort permutation (or the entities in sorted order) rather than a sign per entity. The tests §3.1 names (a constant-curl field reproduced, tangential continuity across a shared face) should run at second order on a face shared by two tets that see it in different vertex orders, which is where a sign-only rule fails.

8.2 What the layout should carry

  • Global edge and face tables of the tetrahedra. The analysis mesh has none today (only the meshers do), so phase 1 creates them; sorted vertex labels as §3.1 says.
  • Functions per entity, by kind. Edge: one (order 1) or two (order 2); face: none or two. The layout should say which slot of an edge is the Whitney function and which the gradient: the null space (§8.4) and the Hiptmair–Xu preconditioner (Later) both split the space that way. Sizing the layout for order 2 from the start costs nothing at order 1 (open question 4).
  • Boundary lookup by face. PEC, ports and absorbing boundaries are given on element faces (ElementFace); each needs its global face and that face’s three edges. An edge is held when a face that contains it is PEC. Today’s boundary conditions resolve to node sets, and a node-based rule (“both end nodes are on the wall”) is wrong: an interior edge that spans a corner between two walls has both nodes on PEC and is not itself on it.
  • The discrete gradient: for each node, its edges with orientation (φ_b − φ_a on edge a → b), and at order 2 one column per edge gradient function. This is the matrix G of §8.4; it is also the cheapest strong test of the numbering, because K G = 0 to rounding (curl grad = 0) fails for any orientation or incidence error.
  • Nodal and edge unknowns in one system. The port-mode problem of §3.4 on a general cross-section has transverse edge unknowns and a nodal longitudinal one on the same triangles (J.-F. Lee, D.-K. Sun, Z. J. Cendes, Full-wave analysis of dielectric waveguides using tangential vector finite elements, IEEE Trans. Microwave Theory Tech. 39(8):1262–1271, 1991). This supports the proposal of one entity-keyed layout (open question 1).
  • Entities without unknowns, and unknowns on part of the mesh: held (PEC) edges and faces, and regions that carry no field.
  • Pattern and ordering by entity. §2 says the ordering is reused unchanged with the edge midpoint. Today ordering::fill_reducing_order orders nodes (analysis::pattern passes mesh.xyz and the NodeGraph), and Csr is built from node blocks. Phase 1 therefore generalises the graph from nodes to entities (two entities adjacent when an element holds both), with a point per entity: the edge midpoint, the face centroid. An entity’s unknowns stay contiguous, as a node’s are now.

8.3 The complex-symmetric factor

  • Transpose, never conjugate, everywhere: not only in L D Lᵀ but in every inner product the generic code forms (the solves, iterative refinement’s residual, the reduction Tᵀ A T). A test on a matrix whose symmetric and Hermitian parts differ catches a stray conjugate; a real test matrix cannot.
  • Pivot comparisons on the modulus, the 2 × 2 test included.
  • Inertia is a real-scalar notion. Sylvester’s law does not hold for a complex-symmetric matrix, so inertia() belongs to the f64 instance only and the scalar trait should not promise it.
  • Keep the pivot tolerance relative to the row, as PIVOT_TOLERANCE is now. EM meshes are strongly graded (toward conductor edges, in thin substrates), element matrices then differ by many orders of magnitude, and a threshold against the whole matrix’s norm misjudges every small element’s pivots (the reason for equilibration: A. van der Sluis, Condition numbers and equilibration of matrices, Numer. Math. 14:14–23, 1969).
  • Symbolic holds values today (a: Lower, the permuted matrix). “The symbolic phase is shared unchanged” (§3.2) needs those moved out of it, or Symbolic made generic too.
  • Later, not phase 1: periodic boundaries with a phase reduce to Tᴴ A T, which is not complex-symmetric, so they will need another factor (Hermitian LDLᴴ or LU) and complex coefficients in constraints::Row.

8.4 The eigen step and the null space (open question 3)

My answer to open question 3 is yes, from the first cavity case, for two reasons.

  • The null space is large and sits at the other end of the shifted spectrum. Its dimension is the number of free nodes (plus the free edges at order 2), about a seventh of the unknowns of a first-order tetrahedral mesh. Under the shift σ > 0 all of it maps to θ = −1/σ, of the same magnitude as the wanted θ = 1/(k² − σ) of the modes near the shift, and with multiplicity in the thousands. A block Lanczos with full reorthogonalisation keeps finding further copies of a multiple extreme eigenvalue, so the basis fills with gradients as more modes or modes farther above the shift are asked for. Keeping every iterate M-orthogonal to the gradients, x ← x − G (Gᵀ M G)⁻¹ Gᵀ M x, removes them (P. Arbenz, R. Geus, Multilevel preconditioned iterative eigensolvers for Maxwell eigenvalue problems, Appl. Numer. Math. 54(2):107–121, 2005); Gᵀ M G is a sparse, positive definite nodal matrix, factored once by the Cholesky factor FieldCraft has. It fits eigen::Operator as a projection after solve.
  • The Sturm count needs the null space’s exact dimension. The inertia of K − σM counts the null space among the eigenvalues below σ, so “how many modes lie below a frequency” (§3.3) is the negative count minus dim ker. With PEC walls the kernel is spanned by the gradients of the free nodes’ functions, the edge gradients of the free edges at order 2, and one more for each separate conductor beyond the first (the potential that is constant on that conductor: the sum of its nodes’ gradients). A cavity with a conductor that touches no wall (a floating post, a centre conductor held by a dielectric) has one of these. G should hold them as columns, or the count is off by the number of extra conductors and those fields return as modes at k = 0.

The frequency step today factors with Cholesky and a zero or negative shift; the cavity step is the first to use Lanczos on an LDLᵀ factor with a positive shift (buckling factors that way already), so Eigenpairs.negative will hold the modes below the shift and must not be discarded.

8.5 Results

Not phase 1: the normal field jumps at a material interface, so EM field results will be element-nodal rather than one averaged value per node. Worth leaving room for where the result types gain complex values.

RFC 0002: Port WARP3D’s fracture capabilities

  • Status: proposed, open for comment. Decided: FieldCraft ports; WARP3D does not run beside it as a sidecar solver (§6).
  • Discussion: first raised in #946
  • Scope: port WARP3D’s fracture and nonlinear-material capabilities to Rust, with its LGPL and non-free parts replaced by our own code

1. Summary

FieldCraft ports WARP3D’s fracture and nonlinear-material capabilities to Rust. Every part of WARP3D that is LGPL, non-free or proprietary is left behind and replaced with FieldCraft’s own code, written from the published papers. This RFC records the proposal, the licence audit behind it, and what each replaced part becomes.

2. Before any port lands

This port is an exception to two rules, and both must change first:

  • AGENTS.md, “No code from other apps”. It forbids porting code from any other CAE or solver app, whatever its licence. AGENTS.md says the rule changes in the Tangency Labs FieldCraft maintainer guide, section 1. That guide and AGENTS.md need an exception naming WARP3D’s NCSA-licensed code.
  • deny.toml and ATTRIBUTION.md. The NCSA licence is permissive, but deny.toml does not list it yet. ATTRIBUTION.md needs a row for the ported code: what it is, the NCSA notice, and the WARP3D version it came from.

Rules the port keeps:

  • The source is Fortran; the port is Rust. It is translated into FieldCraft’s own crates and conventions. It follows the “Never crash” rules, SI units through crates/model/src/units, and determinism through fieldcraft-parallel. No Fortran is linked.
  • Agents never read GPL or LGPL code. Before any file is ported, a licence pass reads only the header of every file in the WARP3D tree. It lists the NCSA files to port and the GPL, LGPL or unclear files to replace. An agent stops at the header of any non-NCSA file and never reads past it.
  • Results are verified against standards (docs/verification.md). Each ported capability gets its oracle cases from theory, published experiments and standard benchmarks, never by comparing against WARP3D’s output.

3. What gets replaced

What WARP3D usesLicenceReplaced withEffort
Kopp 3x3 symmetric eigen-solver (gtmat1.f)LGPLfem::dense::symmetric_eigen (cyclic Jacobi, Golub & Van Loan §8.5)none, exists
hypre 2.7.0b (iterative solvers, AMG)LGPL-2.1 (Apache-2.0 OR MIT only from 2.17.0, 2019-07-10)our own PCG and AMG, from the papersPCG about 1 week, AMG 3–4 weeks
MUMPS (direct solver)CeCILL-C (LGPL-like)our own supernodal Cholesky (Ng & Peyton 1994)none (a speed check above 1M DOF)
METIS 4.0.3 (graph partitioning and ordering)free only for education and research at non-profits and US government agencies; no redistribution without approvalour own nested-dissection ordering (crates/solver/src/ordering.rs)none
Intel MKL (Pardiso)proprietaryour own Choleskynone
NASA VSS (sparse solver)needs NASA’s written approval; export-restrictedour own Choleskynone
any other non-NCSA file found by the licence pass—written from the paper it implementsper file

METIS 5.1.0 is Apache-2.0, but some GKlib files are LGPL-2.1+, so it is not linked either. Multilevel partitioning is published (Karypis & Kumar 1998) and can be written in Rust.

4. Graph ordering and parallel factorisation (what we already have)

  • crates/solver/src/ordering.rs orders by nested dissection.
    • Separators come from coordinate bisection, or from the graph alone (George & Liu 1978), with deterministic tie-breaks.
    • Fill and time per ordering are measured.
  • crates/solver/src/cholesky.rs builds the elimination tree (Liu) and fundamental supernodes (Liu, Ng & Peyton 1993), and factors left-looking (Ng & Peyton 1994).
    • Disjoint subtrees of the supernodal tree factor concurrently.
    • Large supernodes split into row tiles.
    • All of it runs through fieldcraft-parallel, so results are bit-identical whatever the thread count.
  • Open contribution: multilevel graph separators, to cut fill and balance the subtrees.
    • Coarsen, partition, then refine with Kernighan–Lin or Fiduccia–Mattheyses.
    • Later, partitioning for distributed or iterative solves.
    • Both must stay deterministic and come from papers.

5. Port order

  1. Licence pass over the WARP3D tree (headers only), plus the AGENTS.md, maintainer-guide, deny.toml and ATTRIBUTION.md changes above.
  2. The crack definition, model.crack.create, with its crack-front ordering (§6.2).
  3. Domain-integral J on linear-elastic solids, checked on CT and SENB specimens and the semi-elliptical surface crack (§6.3).
  4. Deformation plasticity, and J with it.
  5. Interaction-integral K and T-stress.
  6. Cohesive elements.
  7. Gurson with element extinction.
  8. Chaboche kinematic hardening and Norton creep.

Each step ships with its manual page and its oracle cases, and cites the papers the WARP3D routines implement.

6. The deck and sidecar proposal, and what the port takes from it

A contribution proposed running WARP3D beside FieldCraft: FieldCraft writes a WARP3D input deck, runs the WARP3D binary (solve.static with backend: "warp3d"), and reads its result files back (results.read). FieldCraft does not take that route.

6.1 Why the port, not a sidecar

  • One solver path. Every result FieldCraft shows comes from its own solver, verified against standards and frozen as oracle fixtures. A sidecar’s results depend on an outside binary and its version, which our CI cannot pin or check.
  • Determinism and the browser. Our solvers give the same result bit for bit on every platform and build for wasm. Starting a process does neither.
  • Nothing to install. Users get fracture mechanics in the app they downloaded, on macOS, Linux, Windows and in the browser.
  • backend already has a meaning. On solve commands it chooses CPU, threads or GPU for our own solvers, not another program.

So there is no backend: "warp3d", no runner that starts WARP3D, and no reader for WARP3D’s result files.

6.2 What carries over

The deck work solved problems the port has too, and these parts become FieldCraft’s own:

  • The crack is a model definition, not a parameter of one command: model.crack.create with

    • the front: a node set, ordered or not, which FieldCraft chains into an open path or a closed loop, taking the hex20 mid-side nodes along;
    • the crack-plane normal, or inferred from the symmetry conditions on the front;
    • symmetric for a half model (the energy on both crack faces);
    • the number of rings of the integration domains;
    • the weighting along the front: pointwise (a value at every station, tent functions inside and ramps at open ends) or front_average (one value for the whole front).

    The domain-integral step, the UI, the model check and any deck export all read this one definition.

  • The domain integral and its weighting come from the papers, never from WARP3D’s routines: C. F. Shih, B. Moran, T. Nakamura, Energy release rate along a three-dimensional crack front in a thermally stressed body, Int. J. Fracture 30:79–102, 1986; B. Moran, C. F. Shih, A general treatment of crack tip contour integrals, Int. J. Fracture 35:295–310, 1987. For the interaction integral and T-stress: T. Nakamura, D. M. Parks, Determination of elastic T-stress along three-dimensional crack fronts using an interaction integral, Int. J. Solids Struct. 29(13):1597–1611, 1992; M. Gosz, J. Dolbow, B. Moran, Domain integral formulation for stress intensity factor computation along curved three-dimensional interface cracks, Int. J. Solids Struct. 35(15):1763–1783, 1998.

  • Crack-face pressure is an ordinary surface load on the crack faces. Inside FieldCraft no face renumbering is needed.

  • Tet fronts are refused with a clear message until the integral supports them.

  • Results: J, K_I, K_II, K_III and T at every station, per ring, in the session’s results; solve.probe reads them, and a results panel plots them along the front (as the path plot does).

6.3 Verification

The semi-elliptical surface crack in a plate under crack-face pressure is a good first 3D case. It becomes an oracle case on our own model, built in SolidCraft from the published description:

  • the reference values are the published ones: X. Wang, R. Bell, Eng. Fract. Mech. 71(9):1477–1496, 2004 (its tables for the surface crack), and I. S. Raju, J. C. Newman, Stress-intensity factors for a wide range of semi-elliptical surface cracks in finite-thickness plates, Eng. Fract. Mech. 11(4):817–829, 1979;
  • WARP3D’s verification inputs and meshes (verification/test87 and the like) are not copied, and the numbers WARP3D’s own scripts check (driver.inp) are not references: they are another solver’s output.

6.4 A WARP3D deck export

Writing a WARP3D input deck, as FieldCraft writes Abaqus, Nastran and LS-DYNA decks, stays possible as an export for people who run WARP3D themselves: deck.write with format: "warp3d", in crates/decks, written from WARP3D’s public user manual, reading the crack from model.crack.create. It is not part of the port and FieldCraft does not run what it writes. Whether to take it is open (§7).

7. Open questions

  • Is this the order the owner wants?
  • Should the iterative solvers (PCG, AMG) come before fracture?
  • Take the WARP3D deck export (§6.4) now, later, or not at all?

RFC 0003: Lattice Boltzmann LES, where it stands and what comes next

  • Status: proposed; the LBM-LES work is parked as of 2026-11-26. Nothing in this RFC is decided.
  • Discussion: #785 (tracking), with its sub-issues
  • Scope: large-eddy simulation on the lattice Boltzmann solver (fieldcraft-lbm, fieldcraft-lbm-gpu): bluff bodies, wall-modelled channels, the collision near τ = ½, grid refinement and absorbing layers. Laminar flow, heat, the GPU backend and the OpenFOAM export are outside it; what of those is verified is in What works.

1. Summary

FieldCraft’s LES has every ingredient the published LBM-LES successes use except the resolution: the hybrid recursive regularised collision with Vreman’s model and dynamic σ (Jacob, Malaspinas & Sagaut 2018), interpolated walls, a two-step force, an inlet ramp, a matched wall model. On the uniform grids that run in minutes to an hour on the GB10 (12–32 cells per diameter, 16–32 per channel half-height) no bluff body and no wall-modelled channel meets a published reference within 5 %. The four blockers, in the order they cost accuracy: resolution (no refinement yet), the start-up and its instability, the collision’s linear instability near τ = ½, and wall models whose matching height the grids cannot place where Kawai & Larsson put it. Refinement is half designed and partly built (#1107). This RFC records the numbers, the options with their costs, a recommended order and the decisions the owner must make before the work resumes.

2. Where it stands (numbers)

All bluff-body numbers are single realisations on unconverged grids, block intervals of one run; none is an acceptance run. References: circular cylinder at Re 3900, C_d 0.99 ± 0.05 (experiment), 1.04 (LES), St 0.215 (Kravchenko & Moin 2000); square cylinder at Re 22 000, C_d ≈ 2.1, St 0.132 (Lyn et al. 1995), 2.18 (Trias et al. 2015 DNS); channel, Lee & Moser 2015.

2.1 Bluff bodies

RunSetupC_dAgainst the referenceRecord
#787 originalcylinder, 16 cells per D, free stream everywhere, staircase, one-step force1.354 ± 0.040+37 %#787
expert probesame, at rest on the body, halfway1.260 ± 0.012+27 %verification.md, “Bluff-body LES”
expert probesame, interpolated walls1.113 ± 0.012+12 %same
expert probesame, 24 cells per D1.067 ± 0.019+8 %same
#1106 rerun (PR #1147)HRR dynamic σ + Vreman, interpolated, at rest + ramp 2.5 T₀, 16 cells1.827 ± 0.073+85 %; St 0.057 against 0.215PR #1147
#1106 rerunHRR σ 0.99 + Vreman, sameunstable at 3.6 D/U (lattice speed 0.547)—PR #1147
#1109 rerun (PR #1149)HRR σ 0.99 + Smagorinsky, 12 cells, uniform start, two-step force1.799 ± 0.018+82 %PR #1149
#1109 rerunsame, dynamic σ1.620 ± 0.043+64 %PR #1149
#1109 rerunsame, Musker wall model−0.026 ± 0.064, not stationary—PR #1149
square, expert probe16 cells, at rest, two-step force1.81 ± 0.07−14 %verification.md
square, #1106 rerunHRR dynamic σ + Vreman, ramp2.176 ± 0.088+4 % (Lyn); St 0.057 against 0.132PR #1147
square, #1106 rerunσ 0.99 + Vreman, rampunstable at 3.2 D/U—PR #1147
#1110 noise study (PR #1148)cylinder, HRR + Smagorinsky, halfway, ramp; 16 and 32 cells, U_lat 0.05 and 0.10all four diverge, 12–73 D/Uno noise statisticPR #1148

Reproduction on develop (2026-11-26, GB10, #1106 comment; Smagorinsky C 0.1, σ 0.99, no ramp, 16 cells per D, span 3.125 D, 100–200 D/U):

startC_d ± 95 %StL_r/D
at rest on the body, no cross-flow wave1.437 ± 0.0090.2500.60
at rest on the body, a 1 % cross-flow wave (the probe’s start)1.113 ± 0.0120.2202.1
caserampresult
cylinder, Vreman 0.18, σ 0.992.5 T₀unstable at 3.6 D/U (lattice speed 0.547)
cylinder, Smagorinsky 0.1, σ 0.992.5 T₀unstable at 137 D/U (lattice speed 0.685)
square, Vreman, σ 0.992.5 T₀unstable at 3.2 D/U (lattice speed 0.538)
cylinder, Vreman, σ 0.99nonestable to 240 D/U, C_d 1.422, St 0.243

What this settles and what it leaves:

  • The recorded 1.113 is start-sensitive, not a regression. It reproduces to the digit with the probe’s 1 % cross-flow wave; without the wave the same setup gives 1.437 (+29 %). INFERRED, not checked: the seed decides whether the wake goes three-dimensional on a 16-cell grid. The #1109 baseline (1.80, uniform start) equals the old one-cell-span value, consistent with a wake that stays two-dimensional (INFERRED, not checked).
  • The dynamic-σ rows are not results yet. Their 0.057 lift peak has odd harmonics at 0.171 and 0.293 and a lift range of ±5; it is not a shedding frequency, and the cylinder’s 1.827 is not explained.
  • The ramp destabilises fixed σ 0.99 while the inlet is still near zero. Without the ramp the same run is stable to 240 D/U. Cause not found; reproducer on the GB10 (about 13 s to the failure): FIELDCRAFT_BLUFF_CASE='r:shape=cylinder,sgs=vreman,cs=0.18,sigma=0.99,ramp=2.5,start=5,end=40' with the ignored test bluff_body_les_rerun (PR #1147).
  • The #1110 divergences are not explained. Amplifying a 10⁻² departure by 100 takes ln 100 / rate steps: about 1.5 × 10⁵ at the slowest linear rate where these cases run (3e-5 per step), about 2.3 × 10⁴ at the fastest (2e-4). The #1110 runs diverged in 3 800 to 25 700 steps, one of them during its ramp, with lattice speeds above 0.5 near the body. So the linear mode cannot be ruled out at the fastest rate; a nonlinear, start-up-driven blow-up is the other candidate (INFERRED, not tested).

2.2 Wall-modelled channels

Wall treatmentGridC_f against Lee & MoserRecord
none (halfway bounce-back), Re_τ 100016 cells per δ+173 to +261 %verification.md
Malaspinas & Sagaut (musker)16, 32−51 to −74 %, still driftingsame
Han, Ooka & Kikumoto (spalding_bounce)16, 32−46, −49 %same
Han’s wall, law sampled at rows 3–6 (probe)16, 24, 32+5.8, +5.4, +5.1 %same
spalding_bounce_matched, bounded run, 8 cells, 2 + 2 δ/u_τ8U_b⁺ 19.792 against 19.990 (−1.0 %)heavy job, #1121
spalding_bounce_matched, GPU, full protocol, Re_τ 100016, 24, 32−2.85, −6.73, −8.71 %; time cap, inconclusivePR #1151
same, Re_τ 200016, 24, 32−1.83, −5.88, −8.47 %; time capPR #1151
same, Re_τ 520016, 24, 32refused: τ 0.50004–0.50008 below the bound 0.5001PR #1151
Han’s wall at A20, hybrid collision—−52 to −55 % (MRT row void)verification.md, #1057

The matched wall’s C_f error grows with resolution at both Reynolds numbers, and the worst row above the sample height has U⁺ +5.6 to +7.1 % above Lee & Moser (+5.58 % at Re_τ 2000, 16 cells, to +7.11 % at Re_τ 1000, 32 cells; PR #1151). Every grid has h_wm/δ above Kawai & Larsson’s 0.1 (4 cells are 0.25δ, 0.167δ, 0.125δ). The cause is not isolated.

2.3 What is verified and holds

The force budget closes per step to 2–3 × 10⁻¹⁴; CPU and GPU agree to 7 × 10⁻⁵ % on the laminar control; the Smagorinsky term has no factor-of-two error (#785 “Checked and found consistent”). The HRR, Vreman and dynamic σ implementations were read against Jacob et al. 2018 equation by equation by the #785 expert, with the differences already stated in crates/lbm/src/hrr.rs’s docs (unverified here: that reading is in the maintainer’s notes, not in the repository). The inlet ramp matches the one-dimensional characteristics solution within 0.13 % (#1134). These are not in question.

3. What blocks published-accuracy bluff bodies

3.1 Resolution and refinement

The published LBM-LES of the cylinder at Re 3900 that the #785 expert read use D/Δx ≈ 80 at the wall through nested levels (Spinelli et al. 2023; Jacob et al. 2018, D/80 with 10 M points; as read by the expert, not re-checked here). FieldCraft runs 12–24 on one uniform grid. At 16 cells the separating shear layers sit on one or two cells.

A uniform grid of 80 cells per D in the 24 D × 12 D × 4 D box is 24 · 12 · 4 · 80³ = 5.9 × 10⁸ cells. On the GB10 (computed, not run):

  • Memory: 76 bytes of populations per cell in place plus 12 of velocity for the hybrid collision (GPU backend) is about 52 GB, inside the GB10’s 128 GB of unified memory. But the population state lives in one storage buffer (gpu.md, Limitations), and its 4.5 × 10¹⁰ bytes are ten times the 4 294 967 292-byte limit per buffer the backend reports (gpu.md, worked example). It cannot run until #699 splits the buffer.
  • Time: at lattice speed 0.05 one D/U is 80 / 0.05 = 1 600 steps; 150 D/U (ramp, transient, averaging) is 2.4 × 10⁵ steps, 1.4 × 10¹⁴ cell updates. At the bluff-body throughput measured on the GB10 (0.56 G updates/s, HRR + Smagorinsky, #1107 design §4) that is 2.5 × 10⁵ s, about 70 hours; at the 773 M/s of the periodic HRR + Vreman benchmark (gpu.md) about 50 hours.
  • Refined (finest box 4 D × 3 D × 4 D at D/80, about 25 M cells, the design’s estimate): about 5 hours.

So uniform D/80 becomes possible once #699 lands, at 50–70 GB10-hours a run; refinement brings it to about 5, which is what makes a resolution study (D/40, D/80) affordable.

State of #1107 (its hand-off comment of 2026-11-26 carries the design and the PR plan):

  • Decided by the owner (2026-11-25/26): scheme C (cell-centred, reconstructed; Qi, Klimach & Roller 2019), regularised ghosts for RR/HRR and full rescaled ghosts for TRT, one nested box per level, coupling stencil B (eight sources), absorbing layers of Xu & Sagaut 2013 type II with a required reflection R.
  • Built: PR #1150, the absorbing layer’s model and command (commit 1 of 2); the collision term is the open second commit. Levels in the model and setup: built, uncommitted, branch lbm-1107-refine (not pushed).
  • Not built: two-level coupling (briefed, ungated), many levels with HRR and LES across interfaces, refined runs in solve.fluid, the GPU, the D/Δx 40 and 80 cylinder.
  • Measured in the design’s prototypes (numpy, not in the repository; #1107): the Couette check confirms the derived rescaling τ_f/(2τ_c); Qi’s printed form gives a 15 % stress jump. Regularised ghosts put TRT Poiseuille 5.6e-3 off, so TRT keeps full ghosts.

3.2 The start

A start with the free stream inside the body sends an acoustic transient that never leaves the box (force rms 3.7 against 0.41 from rest, +4 % on the mean; the square went unstable at 161 D/U). The ramp (#1118) removes the inlet’s pulse (C_p rms 20.19 → 0.049 at 2.5 T₀). With the ramp, the stream-function start at rest on the body has lattice speeds above the inlet’s near the body, and every fixed-σ run and all four #1110 runs diverge.

3.3 The collision near τ = ½

The regularised and hybrid collisions are linearly unstable in a stream below τ⁺ ≈ 0.52 (von Neumann maps over 14 directions, k on a π/32 grid; numbers in #1154). At the default lattice speed 0.05 each collision has its own bound, and with τ⁺ − ½ = 3 U N / Re at Re 3900:

  • regularised (σ 1): τ⁺ ≥ 0.502, which needs N ≈ 52 cells per D;
  • hybrid (σ 0.99): τ⁺ ≥ 0.5005, met from N ≈ 13 cells per D.

The hybrid cylinder on 16 cells runs at τ⁺ 0.5006, just inside its bound; a regularised run there is not. MIN_TAU_TURBULENT 0.5001 admits both. A refinement hierarchy makes it worse on the coarse levels: at D/80 and speed 0.05 the finest τ⁺ − ½ is 3 · 0.05 · 80 / 3900 = 3.1 × 10⁻³, and with five levels the coarsest is 2⁻⁴ of it, 1.9 × 10⁻⁴, below the hybrid’s bound at that speed (INFERRED from the maps; #1107 design §4). Density fields stay at ρ ±7–17 % in the runs that complete.

3.4 Wall models

Bluff bodies at Re 3900 need no wall model at D/80 (y⁺ ≤ 1 at the wall, published). Wall models matter for higher Re and for channels and plates. The first-node forms of the papers carry half the drag or less (C_f −46 to −74 %, §2.2); sampling three or more rows up gives +5 %; the matched wall at 4 cells is inconclusive at the time cap (not passed), with an error that grows with the grid (§2.2). Wall models on interpolated walls (#927) and on obstacles (Han stack #1046–#1048) wait on this.

4. Options and costs

Effort is agent-hours (builder and expert work, reviews included) plus GB10 hours; the GB10 is borrowed.

#OptionWhat it buysEffortCost if it is the wrong call
AThe start and the ramp: find why the 2.5 T₀ ramp destabilises fixed σ 0.99 with the inlet near zero (13 s reproducer); fix a seeded start the product documents (the 1 % cross-flow wave moves C_d from 1.437 to 1.113); explain the dynamic-σ rows’ 0.057 peakruns that complete with the ramp; a C_d that does not hang on an undocumented seed; the baseline every later step needsM: 8–12 agent-h, 3–5 GB10-hnone: every later bluff-body number depends on it
B#1110’s 2 × 2 noise split rerun on the start A settlesthe regularised instability’s share of the ρ ±7–17 % noise against under-resolutionS: 3–4 agent-h, 2 GB10-hnone beyond its GB10 time
C#785 step 6: warn (recommended by the expert) or refuse below the stream-stability boundusers are told when the run is inside the unstable regionS: 2–3 agent-h, no GPUwarn: noisy runs keep completing, flagged; refuse: at Re 3900 the regularised collision needs about 52 cells per D (bound 0.502), the hybrid σ 0.99 about 13 (bound 0.5005)
DFinish #1107 on the CPU: layer term (PR #1150 commit 2), levels setup, two-level coupling, many levels with HRR and LES, refined solve.fluidthe route to 80 cells per DL: 40–60 agent-h, no GPU until the enda scheme combination (Qi + Schukmann + Xu–Sagaut + Bouzidi) that is ours in composition fails a check; each PR’s bars catch it before the next
E#1107 on the GPU (two buffers per level; AA is not compatible, Schornbaum & Rüde §4.1)the D/Δx 80 run in hours rather than daysL: 20–30 agent-h, 4–6 GB10-h of parity runsa second implementation to keep in step
FThe D/Δx 40 and 80 cylinder (#1107 PR 8)the acceptance run against experiment (C_d 0.99 ± 0.05, St 0.215)S agent work; GB10 ≈ 20 min at D/40, ≈ 5 h at D/80 refined (#1107 design §4, INFERRED from 0.56 G updates/s); uniform D/80 needs #699 and 50–70 hthe bar must be signed before the run, from experiment: C_d 0.99 ± 0.05, St 0.215 (Kravchenko & Moin 2000 and the experiments they cite)
GMatched wall: isolate the C_f trend (CPU run of one GPU grid; h_wm fixed in outer units at ≥ 40 cells per δ; Re_τ 5200 at ≥ 42 cells per δ)knows whether the trend is the model, the height or f32M: 6–8 agent-h, 6–10 GB10-h (32 cells took 3 464 s; 42 cells ≈ 2.9 h per Re_τ, estimated as N⁴ from that)keeps a wall model whose error grows with the grid
HA collision stable near τ = ½ (cumulant on D3Q27, Geier et al. 2015)removes 3.3 at its root; the published alternative to HRRL: 60+ agent-h, new latticethe largest change; D3Q27 costs 42 % more memory and traffic
IStop LES at what works and document the limitsthe team moves on; the manual states the measured errors (done by #1104/#1116)noneusers who need bluff-body drag at high Re go elsewhere
  1. A (the start and the ramp) first: no later bluff-body number means anything while C_d moves 29 % with an undocumented seed and the ramp kills fixed-σ runs. It uses the drivers already written (PR #1147, #1149).
  2. C, the warning, at the same time: two hours, and it stops silent noisy runs.
  3. B, #1110’s 2 × 2 rerun on that start.
  4. D, refinement on the CPU, in the design’s PR order: layer term, levels, two-level coupling, many levels with HRR, refined solve.fluid. Each PR’s bars are fixed in the design before it runs.
  5. F at D/Δx 40 on the CPU or a GPU port of the uniform-grid parts, then E and F at D/Δx 80.
  6. G in parallel with D (different crate areas, GB10 time only between D’s milestones).
  7. H only if F at D/Δx 40 shows the coarse levels going unstable (design §4).

Merging the measurement PRs (#1147, #1148, #1149, #1151) before any of this keeps the numbers on develop. They change no solver code.

6. Decisions the owner must make

  1. #785 step 6: warn (expert’s recommendation) or refuse below the stream-stability bound, and at which speed (the characteristic one, known at setup).
  2. The start for bluff-body LES: whether the product seeds a cross-flow wave (and how it is stated: the 1 % seed is the probe’s choice, not a cited value), once A has found why the ramp destabilises fixed σ.
  3. The D/Δx 80 run’s bar and GB10 time: the tolerance, set from experiment (C_d 0.99 ± 0.05, St 0.215: Kravchenko & Moin 2000 and the experiments they cite; never other solvers’ spread), and the ≈ 5 h of a borrowed box.
  4. The matched wall’s fate if G confirms the trend: keep it with a warning, change the sample height rule, or withdraw it.
  5. #1117’s laminar slip (a(4Δx)²/(2ν) at the on-node wall): accept or veto.
  6. Contributor SA wall-layer stack (#1130–#1132): the method choices listed in #1016’s hand-off comment (row-5 cutoff derived from #1130’s reference; the harmonic rule derived from Chapman–Enskog or dropped; the thermal path documented).
  7. Whether to resume LES at all (option I) before the work now ahead of it, such as M24 (polymer melt and creeping flows, ROADMAP.md), which was queued to start after LES.
  8. M4’s four forks (#1158), outside CFD but parked with it: F1 what “M4 done” covers; F4 the formulations of #1068, #1071 and #1073; F5 the input form of a temperature that varies in space (#1074); F6C a drilling membrane for the twisted beam (#1077).

7. Hand-off issues

Every unfinished item has an issue with its branch, numbers, next step and effort (labels area:cfd, paused; help wanted where no GPU box or owner decision is needed):

IssueItemEffort
#785tracking, with the step table—
#1153the start seed (1.113 / 1.437) and the ramp with fixed σM, 3–5 GB10-h
#1154step 6, warn or refuse (owner)S
#1106bluff-body reruns, closes with PR #1147S
#1109#788 rows after the two-step force, PR #1149S, 2 GB10-h
#1110noise split, PR #1148S, 2 GB10-h
#1108matched wall on the GPU, Re_τ 5200, the C_f trend, PR #1151M, 6–10 GB10-h
#1107refinement and absorbing layers, PR #1150L, 6–8 GB10-h
#1057the A20 GPU table after #1117S, 4–6 GB10-h
#1155one definition for the WGSL and native constantsS
#1156the GB10 segfault in concurrent_solves_on_the_shared_device_read_backS–M
#1157encode checks fluid results onlyS
#1094one compressible case on OpenFOAM v2406, by a personS
#1016, PR #1128the contributor’s SA wall-layer stack (#1130–#1132) and trace relaxationM; S
#1158M4’s owner forks F1, F4, F5, F6Cper element

8. References

  • Jacob, Malaspinas & Sagaut, J. Turbul. 19:1051, 2018, doi:10.1080/14685248.2018.1540879.
  • Kawai & Larsson, Phys. Fluids 24:015105, 2012.
  • Kravchenko & Moin, Phys. Fluids 12:403, 2000, doi:10.1063/1.870318.
  • Lee & Moser, J. Fluid Mech. 774:395, 2015, doi:10.1017/jfm.2015.268.
  • Lyn, Einav, Rodi & Park, J. Fluid Mech. 304:285, 1995, doi:10.1017/S0022112095004435.
  • Malaspinas & Sagaut, J. Comput. Phys. 275:25, 2014, doi:10.1016/j.jcp.2014.06.020.
  • Qi, Klimach & Roller, Comput. Math. Appl. 2019 (arXiv 1601.06984).
  • Schornbaum & Rüde, SIAM J. Sci. Comput. 38:C96, 2016 (arXiv 1508.07982).
  • Spinelli, Horstmann, Masilamani, Soni, Klimach, Stück & Roller, HPC performance study of different collision models using the Lattice Boltzmann solver Musubi, Comput. Fluids 255:105833, 2023, doi:10.1016/j.compfluid.2023.105833 (HRR and cumulant on the cylinder at Re 3900).
  • Xu & Sagaut, J. Comput. Phys. 245:14, 2013 (arXiv 1203.6350).
  • Geier, Schönherr, Pasquali & Krafczyk, Comput. Math. Appl. 70:507, 2015 (cumulant collision).
  • Trias, Gorobets & Oliva, Comput. Fluids 123:87, 2015, doi:10.1016/j.compfluid.2015.09.013.

Solver literature survey for FieldCraft: explicit dynamics, equations of state, lattice Boltzmann, FSI

Compiled 2026-10-13. Scope: three new solver families on top of the planned implicit linear solver (M6): (A) an explicit Lagrangian finite element solver of the LS-DYNA / Abaqus-Explicit class, (B) equations of state for that solver’s shock and detonation work, (C) a lattice Boltzmann CFD solver of the Palabos class, (D) fluid–structure interaction coupling them, and (E) the alternatives (finite volume, SPH) and GPU compute in pure Rust. The plan is at the end (Part F).

How this was verified

  • DOIs. Every DOI below resolved through the DOI handle API (doi.org/api/handles/<doi> → responseCode 1), and its first author, year, title and venue were checked against Crossref metadata. Volume and page numbers are from memory and were not each checked; title, first author, year and venue were. Four DOIs I had from memory were wrong and were corrected from Crossref search before inclusion:
    • Flanagan–Belytschko 1984 eigenvalue paper is 10.1115/1.3167594 (…598 is an unrelated crack paper).
    • Johnson–Stryk 1987 eroding interface is 10.1016/0734-743X(87)90057-1.
    • He–Luo 1997 incompressible LBM is 10.1023/B:JOSS.0000015179.12689.e4 (10.1007/BF02732106 is a plant-biology paper).
    • Belytschko–Lin 1987 erosion is 10.1016/0734-743X(87)90033-9.
  • Other URLs returned HTTP 200 on 2026-10-13 unless marked. Items without a DOI or working URL are marked (unverified).
  • Licences come from GitHub/GitLab licence metadata (api.github.com/repos/<r>, GitLab ?license=true), the repository’s LICENSE/COPYING file header, or a README licence sentence when the API reported nothing. No source code was opened. Where the API said NOASSERTION, the first lines of the licence file decided it.
  • No section numbers are given: I did not read the PDFs for this survey, so I give none rather than guess.

Licence legend for associated code

StatusMeaning
READ OKMIT, BSD, Apache-2.0, ISC, MPL-2.0, public domain. May be read for reference; still re-implement from the paper and record anything adapted in ATTRIBUTION.md.
FORBIDDENGPL, LGPL or AGPL, or a non-commercial / research-only licence. Do not open.
NO LICENCENo licence found in metadata: all rights reserved. Do not open.

Associated code bases (licence from metadata only)

CodeWhat it isLicence (source)Status
Palabos gitlab.com/unigespc/palabosLBM frameworkAGPL-3.0 (GitLab API)FORBIDDEN
OpenLB gitlab.com/openlb/releaseLBM frameworkGPL-2.0+ (GitLab API)FORBIDDEN
waLBerla i10git.cs.fau.de/walberla/walberlaLBM frameworkGPL-3.0 (GitLab API)FORBIDDEN
lbmpy i10git.cs.fau.de/pycodegen/lbmpyLBM code generator (cumulant, MRT)GPL-3.0+ (GitLab API)FORBIDDEN
VirtualFluids git.rz.tu-bs.de/irmb/VirtualFluidscumulant LBM (Geier/Krafczyk group)GPL-3.0 (GitLab API)FORBIDDEN
TCLB CFD-GO/TCLBGPU LBMGPL-3.0FORBIDDEN
HemeLB hemelb-codes/hemelbsparse-geometry LBMLGPL-3.0FORBIDDEN
Sailfish sailfish-team/sailfishGPU LBMLGPL-3 (README; API: none)FORBIDDEN
FluidX3D ProjectPhysX/FluidX3DGPU LBM, esoteric pullcustom: “public research, education or personal use” (LICENSE.md)FORBIDDEN (non-commercial)
ESPResSo espressomd/espressoMD + LBMGPL-3.0FORBIDDEN
OpenFOAM OpenFOAM/OpenFOAM-devFV CFDGPL (COPYING)FORBIDDEN
SU2 su2code/SU2FV CFDLGPL-2.1 (LICENSE.md)FORBIDDEN
FluidityFE/FV CFDLGPL-2.1FORBIDDEN
OpenRadiossexplicit FEAGPL-3.0 (ADR 0001; GitHub mirrors report AGPL-3.0; the OpenRadioss/OpenRadioss repo URL returned 404 today)FORBIDDEN
preCICE precice/precicepartitioned coupling, IQN, RBF mappingLGPL-3.0FORBIDDEN
4C (ex-BACI) 4C-multiphysics/4CFSI, Aitken (Küttler–Wall group)LGPL-3.0FORBIDDEN
MOOSE idaholab/moosemultiphysics FELGPL-2.1FORBIDDEN
FEniCS FEniCS/dolfinxFE libraryLGPL-3.0FORBIDDEN
deal.II dealii/dealiiFE librarynow Apache-2.0 WITH LLVM-exception and LGPL-2.1 (LICENSE.md)FORBIDDEN by ADR 0001 (it lists deal.II as LGPL). The relicensing is an owner decision; until the ADR changes, don’t open.
DualSPHysics DualSPHysics/DualSPHysicsGPU SPHLGPL-2.1FORBIDDEN
IB2d nickabattista/IB2d2D immersed boundaryGPL-3.0FORBIDDEN
CalculiX, Code_Aster, Elmerimplicit FEGPL family (ADR 0001)FORBIDDEN
STLBM gitlab.com/unigehpfs/stlbmLatt et al. 2021 portable C++ LBM (AA-pattern, BGK/TRT/regularized)MIT (GitLab API)READ OK — the one readable code by Palabos’s authors
XLB Autodesk/XLBdifferentiable LBM (JAX/Warp)Apache-2.0 (LICENSE)READ OK
lettuce lettucecfd/lettucePyTorch LBMMITREAD OK
pylbm pylbm/pylbmLBM schemes generatorBSD-3 (“New BSD”, LICENSE)READ OK
Ludwig ludwig-cf/ludwigLBM complex fluidsBSD-3-style (LICENSE: redistribution conditions)READ OK
Laghos CEED/Laghoshigh-order Lagrangian hydro, artificial viscosityBSD-2-ClauseREAD OK
MFEM mfem/mfemFE libraryBSD-3-ClauseREAD OK
LULESH LLNL/LULESHLagrangian hydro proxy app (one-point hex + hourglass)none in metadata, no licence file, README has no licence sentenceNO LICENCE (until a licence file is confirmed; do not open)
Kratos KratosMultiphysics/Kratosmultiphysics incl. FSI, IQN, mappingBSD-style (kratos/license.txt: “Redistribution … permitted”; per-application licences may differ)READ OK for the core; check each application folder’s own licence file first
IBAMR IBAMR/IBAMRimmersed boundary (Peskin family)BSD-3-style (COPYRIGHT file)READ OK
MUI MxUI/MUImultiscale coupling interface, RBFApache-2.0 (GitHub API; README says dual GPL/Apache, take Apache)READ OK
FEBio febiosoftware/FEBiononlinear implicit FE, FSIMITREAD OK
WARP3D rhdodds/warp3dnonlinear implicit FENCSA/MIT-style (LICENSE)READ OK
SPlisHSPlasH InteractiveComputerGraphics/SPlisHSPlasHSPH fluidsMITREAD OK
SPHinXsys Xiangyu-Hu/SPHinXsysSPH multiphysics incl. FSIApache-2.0READ OK
PySPH pypr/pysphSPHBSD-3-style (LICENSE.txt)READ OK
Cabana ECP-copa/Cabanaparticle toolkitBSD-3-ClauseREAD OK
Nek5000spectral-element CFDBSD-3-style (LICENSE)READ OK
fenris InteractiveComputerGraphics/fenrisRust FE libraryApache-2.0READ OK
wgpu gfx-rs/wgpuRust WebGPUMIT OR Apache-2.0READ OK, dependency candidate
rust-gpu Rust-GPU/rust-gpuRust → SPIR-VMIT OR Apache-2.0 (API: Apache-2.0)READ OK
faer sarah-quinones/faer-rsRust dense/sparse LAMITREAD OK

Part A: Explicit finite element dynamics

A1. Time integration and stability

A1.1 Belytschko, Liu, Moran, Elkhodary. Nonlinear Finite Elements for Continua and Structures, 2nd ed., Wiley 2014. Verdict: build on (the spine of the explicit solver).

  • Links. ISBN 978-1-118-63270-3; publisher page https://www.wiley.com/en-us/Nonlinear+Finite+Elements+for+Continua+and+Structures%2C+2nd+Edition-p-9781118632703 (200). No DOI checked.
  • Relevant chapters (by topic; chapter numbers from memory of the 2nd edition, check before citing in module docs): updated Lagrangian formulation and the internal-force loop; explicit central difference with the “flowchart” for one step, energy balance check, critical time step and element eigenvalue bounds; constitutive models (hypoelastic–plastic, objective rates: Jaumann, Truesdell, Green–Naghdi); element technology (one-point quadrature, hourglass control, B-bar, assumed strain, shells including Belytschko–Lin–Tsay); contact-impact (penalty, Lagrange multipliers, explicit contact algorithms); stability (linearised stability, energy method).
  • Method. Central difference in the half-step form: v^{n+1/2} = v^{n-1/2} + Δt^n M⁻¹(f_ext − f_int)^n, x^{n+1} = x^n + Δt^{n+1/2} v^{n+1/2}, with a diagonal (lumped) mass so each step is a gather of element internal forces and a nodal division. Stable for Δt ≤ 2/ω_max (with damping ratio ξ: Δt ≤ (2/ω_max)(√(1+ξ²) − ξ)). ω_max is bounded by the largest element eigenvalue (element eigenvalue inequality), giving Δt = α · min_e L_e / c_e with a safety factor α ≈ 0.9 and c = √((λ+2μ)/ρ) for solids.
  • Solves. Everything in Part A; the book is the integration framework all the papers below plug into.
  • Limits. Conditionally stable; cost ∝ (number of elements) × (end time / Δt), and Δt is set by the smallest or stiffest element anywhere in the model. One distorted sliver element sets the step for the whole model.
  • Complexity. The core loop is small (≈1–2k lines); everything hard is in elements, materials and contact.
  • Code. None.

A1.2 Courant, Friedrichs, Lewy 1928. Verdict: reference (the CFL condition).

  • Citation. R. Courant, K. Friedrichs, H. Lewy. Über die partiellen Differenzengleichungen der mathematischen Physik. Math. Ann. 100:32–74, 1928. DOI 10.1007/BF01448839.
  • Use. The origin of Δt ≤ L/c; cite for the explicit FE and LBM time-step rules.

A1.3 Flanagan & Belytschko 1984, eigenvalues and stable time steps. Verdict: build on.

  • Citation. D. P. Flanagan, T. Belytschko. Eigenvalues and Stable Time Steps for the Uniform Strain Hexahedron and Quadrilateral. J. Appl. Mech. 51(1):35–40, 1984. DOI 10.1115/1.3167594.
  • Method. Closed-form upper bound on the maximum eigenvalue of the one-point hexahedron/quadrilateral in terms of its gradient vectors b_iI and volume; it yields a characteristic length that is tighter and cheaper than “shortest edge” and is exact for a cube.
  • Solves. The per-element critical time step for the element in A2.1. Tets and shells use their own lengths (tet: volume / largest face area times a factor; shell: area / longest diagonal or side).
  • Limits. A bound per element, so it is conservative; nodal estimates (below) can be larger.
  • Complexity. Low.
  • Note on nodal estimates. Nodal time-step estimates (from nodal mass and an assembled nodal stiffness bound) give larger stable steps on graded meshes. I found no single verified primary paper to cite for them; treat as “reference later” and keep the element estimate as the guaranteed-stable default. (unverified)

A1.4 Lumped mass. Verdict: build on. Row-sum lumping for linear elements (hex8, tet4, quad4, tri3), which is positive; for quadratic elements row-sum gives zero or negative corner masses, so use HRZ (diagonal scaling) lumping or avoid quadratic elements in explicit (the usual choice). Source: A1.1 book; Hughes, The Finite Element Method (Dover 2000, no DOI) for HRZ. (book, unverified page)

A1.5 Olovsson, Simonsson, Unosson 2005, selective mass scaling. Verdict: build on (after plain mass scaling).

  • Citation. L. Olovsson, K. Simonsson, M. Unosson. Selective mass scaling for explicit finite element analyses. IJNME 63(10):1436–1445, 2005. DOI 10.1002/nme.1293.
  • Method. Conventional mass scaling adds nodal mass to small elements until each reaches a target Δt (adds inertia to rigid-body modes too, so it changes the dynamics). Selective mass scaling adds a non-diagonal mass term that leaves translational (rigid-body) inertia unchanged and lowers only the high frequencies, at the cost of a cheap iterative solve per step.
  • Solves. Quasi-static and thin-structure explicit runs whose step is limited by a few small elements.
  • Limits. Conventional scaling must report the added mass (% of total) — silent mass scaling is a classic source of wrong answers. Selective scaling needs a solve each step (CG on a well-conditioned system).
  • Complexity. Conventional: trivial. Selective: moderate.
  • Code. None.

A2. Solid element technology

A2.1 Flanagan & Belytschko 1981, uniform strain hexahedron with orthogonal hourglass control. Verdict: build on (the default solid element).

  • Citation. D. P. Flanagan, T. Belytschko. A uniform strain hexahedron and quadrilateral with orthogonal hourglass control. IJNME 17(5):679–706, 1981. DOI 10.1002/nme.1620170504.
  • Method. One-point integration with the mean (volume-averaged) gradient operator, so the element passes the patch test and costs one stress update per step. The four hourglass modes per direction are made orthogonal to the linear velocity field (the γ vectors), and a viscous or stiffness-type hourglass resisting force with a user coefficient (≈0.05–0.15) suppresses them without touching constant-strain modes.
  • Solves. Fast, lock-free (under one-point integration) hex8 for impact and crash.
  • Limits. Hourglass coefficient is a tuning knob; stiffness hourglass is too stiff in bending on coarse meshes, viscous hourglass lets hourglass energy grow in long runs. Monitor hourglass energy against internal energy (rule of thumb < 10%) and report it.
  • Complexity. Moderate (≈500 lines for the element with both hourglass types).
  • Code. LULESH implements this element but has NO LICENCE in its metadata: don’t open. Laghos (BSD-2) is a high-order hydro and does not use this element.

A2.2 Belytschko, Ong, Liu, Kennedy 1984, hourglass control in linear and nonlinear problems. Verdict: reference.

  • Citation. CMAME 43(3):251–276, 1984. DOI 10.1016/0045-7825(84)90067-7.
  • Method. Unifies hourglass control as stabilisation of the one-point element, gives the stabilisation parameters and their consistency for nonlinear problems.
  • Use. Background for choosing coefficients; read with A2.1.

A2.3 Belytschko & Bindeman 1993, assumed strain stabilisation of the hex8. Verdict: build on (second solid formulation).

  • Citation. T. Belytschko, L. P. Bindeman. Assumed strain stabilization of the eight node hexahedral element. CMAME 105(2):225–260, 1993. DOI 10.1016/0045-7825(93)90124-G.
  • Method. Derive the hourglass (stabilisation) forces from an assumed-strain field instead of an arbitrary coefficient, so the stabilisation stiffness is physical: correct bending with one element through the thickness, no shear locking, and an incompressible variant that avoids volumetric locking. Co-rotational frame.
  • Solves. Coarse-mesh bending accuracy that A2.1 lacks, without a tuning coefficient.
  • Limits. Physical stabilisation is elastic: it uses the elastic moduli (or a tangent estimate) in plasticity, so it is approximate in large plastic flow.
  • Complexity. Moderate–high.

A2.4 Puso 2000, enhanced assumed strain physically stabilised hexahedron. Verdict: reference (later upgrade over A2.3).

  • Citation. M. A. Puso. A highly efficient enhanced assumed strain physically stabilized hexahedral element. IJNME 49(8):1029–1064, 2000. DOI 10.1002/1097-0207(20001120)49:8<1029::AID-NME990>3.0.CO;2-3.
  • Method. Takes Taylor-expanded EAS (Simo–Rifai) stabilisation to one-point integration; better on distorted (trapezoidal) meshes than Belytschko–Bindeman, still ≈ one-point cost.
  • Limits. More algebra; same elastic-stabilisation caveat.
  • Complexity. High.

A2.5 Simo & Rifai 1990, enhanced assumed strain. Verdict: reference (implicit solver first).

  • Citation. IJNME 29(8):1595–1638, 1990. DOI 10.1002/nme.1620290802.
  • Use. EAS hex8 for the implicit solver (M6); background for A2.4. Static condensation per element is awkward in explicit.

A2.6 Selective / reduced integration and B-bar. Verdict: build on (fully integrated hex8 option).

  • Citations.
    • D. S. Malkus, T. J. R. Hughes. Mixed finite element methods — reduced and selective integration techniques: a unification of concepts. CMAME 15(1):63–81, 1978. DOI 10.1016/0045-7825(78)90005-1.
    • T. J. R. Hughes. Generalization of selective integration procedures to anisotropic and nonlinear media. IJNME 15(9):1413–1418, 1980. DOI 10.1002/nme.1620150914.
  • Method. Integrate the deviatoric part at 2×2×2 points and the volumetric part at one point (B-bar: replace the dilatational part of B with its element mean). No hourglass modes, no volumetric locking.
  • Limits. Eight stress updates per element (≈4–8× the cost of A2.1) and shear locking in bending.
  • Complexity. Low given the implicit solver’s hex8.
  • Shared with M6. The implicit solver needs exactly this element; write it once in a shared crate (Part F).

A2.7 Bonet & Burton 1998, average nodal pressure tetrahedron. Verdict: build on (explicit on tets before hexes exist).

  • Citations.
    • J. Bonet, A. J. Burton. A simple average nodal pressure tetrahedral element for incompressible and nearly incompressible dynamic explicit applications. Commun. Numer. Methods Eng. 14(5):437–449, 1998. DOI 10.1002/(SICI)1099-0887(199805)14:5<437::AID-CNM162>3.0.CO;2-W.
    • J. Bonet, H. Marriott, O. Hassan. An averaged nodal deformation gradient linear tetrahedral element for large strain explicit dynamic applications. CNME 17:551–561, 2001. DOI 10.1002/cnm.429.
  • Method. Linear tet with the volumetric strain (pressure) averaged over the elements sharing a node, which removes the volumetric locking of tet4 in nearly incompressible (plastic, rubber) flow. The 2001 paper averages the whole deformation gradient.
  • Solves. Explicit on the tet meshes M2 delivers before the hex mesher (M3) exists.
  • Limits. Known pressure-checkerboard/spurious low-energy modes in some settings (nodal-integration family); needs a small stabilisation. Plain tet4 must be offered only with a warning for plasticity.
  • Complexity. Low–moderate (a nodal gather pass per step).

A3. Shell elements

A3.1 Belytschko, Lin, Tsay 1984, explicit shells (BLT). Verdict: build on (default shell).

  • Citation. T. Belytschko, J. I. Lin, C.-S. Tsay. Explicit algorithms for the nonlinear dynamics of shells. CMAME 42(2):225–251, 1984. DOI 10.1016/0045-7825(84)90026-4.
  • Method. Four-node quadrilateral with one in-plane integration point, Mindlin plate kinematics in a co-rotational local frame, several through-thickness points for plasticity, and hourglass control. Cost is a small multiple of a solid element’s per thickness point. The workhorse of crash simulation.
  • Limits. Fails the patch test for warped elements (the co-rotational flat-element assumption); hourglass control again; poor for strongly warped geometry.
  • Complexity. Moderate.

A3.2 Belytschko, Wong, Chiang 1992, advances in one-point quadrature shells. Verdict: build on (warping fix for BLT).

  • Citation. CMAME 96(1):93–107, 1992. DOI 10.1016/0045-7825(92)90100-X.
  • Method. Corrections to BLT for warped geometry (and physical hourglass stabilisation), at little extra cost.

A3.3 Hughes & Liu 1981, degenerated continuum shells. Verdict: reference (second shell, later).

  • Citation. T. J. R. Hughes, W. K. Liu. Nonlinear finite element analysis of shells: Part I. Three-dimensional shells. CMAME 26(3):331–362, 1981. DOI 10.1016/0045-7825(81)90121-3.
  • Method. Shell derived from a 3D solid by constraining fibres (degenerated continuum); handles warping naturally and thickness change, about 2–4× the cost of BLT with one in-plane point.
  • Use. Accuracy option once BLT is verified.

A4. Large deformation constitutive integration

A4.1 Simo & Hughes, Computational Inelasticity, Springer 1998. Verdict: build on.

  • Links. DOI 10.1007/b98904.
  • Method. Return mapping (closest point projection) for J2 plasticity; radial return for von Mises with isotropic/kinematic hardening is closed form for linear hardening and a scalar Newton iteration for nonlinear hardening; incrementally objective integration of hypoelastic–plastic models (rotate stress to the configuration at the midstep, update, rotate back); consistent tangents (needed by implicit only).
  • Solves. The stress update at every integration point.
  • Limits. Radial return in explicit is unconditionally stable but first-order accurate in the strain increment; fine since explicit steps are tiny.
  • Complexity. Low for J2 radial return; moderate for the objective integration.

A4.2 Krieg & Krieg 1977, accuracy of radial return. Verdict: reference. J. Press. Vessel Technol. 99(4):510–515, 1977. DOI 10.1115/1.3454568. Shows radial return is accurate for the elastic–perfectly plastic model; the standard justification.

A4.3 Hughes & Winget 1980, incrementally objective integration. Verdict: build on.

  • Citation. IJNME 15(12):1862–1867, 1980. DOI 10.1002/nme.1620151210.
  • Method. Rotate the stress with the incremental rotation from the midpoint velocity gradient (a Cayley transform of the spin increment), so a rigid rotation leaves the stress exact. This is the Jaumann-rate update most explicit codes use.
  • Complexity. Low.

A4.4 Dienes 1979, rotation and stress rate. Verdict: build on (as a verification case).

  • Citation. J. K. Dienes. On the analysis of rotation and stress rate in deforming bodies. Acta Mech. 32:217–232, 1979. DOI 10.1007/BF01379008.
  • Method. Simple shear of a hypoelastic material: the Jaumann rate gives an oscillating shear stress (unphysical), the Green–Naghdi rate a monotonic one. Both have closed-form solutions.
  • Use. Analytic verification of the stress-rate implementation (exactly the kind of test the project wants).

A4.5 Flanagan & Taylor 1987, Green–Naghdi stress integration. Verdict: build on (second rate).

  • Citation. D. P. Flanagan, L. M. Taylor. An accurate numerical algorithm for stress integration with finite rotations. CMAME 62(3):305–320, 1987. DOI 10.1016/0045-7825(87)90065-X.
  • Method. Integrates the rotation of the polar decomposition incrementally (no full polar decomposition each step) and updates stress in the unrotated frame: Green–Naghdi rate at low cost. Used by the PRONTO family.
  • Limits. Drift in the rotation over very long runs (re-orthonormalise).

A5. Contact

A5.1 Hallquist, Goudreau, Benson 1985, sliding interfaces with contact-impact. Verdict: build on.

  • Citation. CMAME 51(1–3):107–137, 1985. DOI 10.1016/0045-7825(85)90030-1.
  • Method. Node-to-segment penalty contact for explicit: each slave node finds its nearest master segment, a penetration produces a penalty force with stiffness scaled from the segment’s bulk modulus, area and volume (so it does not reduce the stable step), symmetric (two-pass) treatment, Coulomb friction with a trial-force return, incremental search tracking the previous master segment. This is the original DYNA3D contact.
  • Solves. General impact between deformable bodies.
  • Limits. Penalty contact allows small penetration and can be noisy; node-to-segment fails at segment edges and corners (snagging, nodes slipping through when the search loses track); initial penetrations must be removed or reported; very soft-against-stiff pairs need soft-constraint penalty (scale on nodal mass/Δt²).
  • Complexity. Moderate for the force; high for robust search.

A5.2 Benson & Hallquist 1990, single-surface contact. Verdict: build on (self-contact for buckling).

  • Citation. CMAME 78(2):141–163, 1990. DOI 10.1016/0045-7825(90)90098-7.
  • Method. Self-contact of one surface (folding shells) with bucket-sort global search; no master/slave pairs needed.
  • Solves. Crush and post-buckling.

A5.3 Belytschko & Neal 1991, pinball contact. Verdict: build on (simplest robust option first).

  • Citation. T. Belytschko, M. O. Neal. Contact-impact by the pinball algorithm with penalty and Lagrangian methods. IJNME 31(3):547–572, 1991. DOI 10.1002/nme.1620310309.
  • Method. Embed spheres (“pinballs”) in surface elements; contact is sphere–sphere overlap, which is trivial and vectorises; penalty or Lagrange multiplier enforcement; hierarchical pinballs refine near contact.
  • Solves. Robust contact detection without the edge/corner cases of node-to-segment; ideal for erosion (A7) where the surface keeps changing.
  • Limits. Contact surface is lumpy; accuracy of the contact pressure is low.
  • Complexity. Low.

A5.4 Contact search: Oldenburg & Nilsson 1994 position code; Yang & Laursen 2006 BVH. Verdict: build on (BVH).

  • Citations.
    • M. Oldenburg, L. Nilsson. The position code algorithm for contact searching. IJNME 37(3):359–386, 1994. DOI 10.1002/nme.1620370302.
    • B. Yang, T. A. Laursen. A contact searching algorithm including bounding volume trees applied to finite sliding mortar formulations. Comput. Mech. 41:189–205, 2008 (online 2006). DOI 10.1007/s00466-006-0116-z.
  • Method. Global search finds candidate pairs: bucket/position-code sorting into a spatial grid (O(n log n), good for uniform meshes), or a bounding-volume hierarchy refitted each step and rebuilt occasionally (robust to non-uniform meshes and large motion). Local search then computes the closest point on the candidate segment.
  • Choice. A BVH with AABBs inflated by v·Δt·k and refitting, deterministic in build order. The mesher already needs spatial indexing; share it if its API fits.
  • Complexity. Moderate.

A5.5 Books: Wriggers; Laursen; Hughes et al. 1976. Verdict: reference.

  • P. Wriggers. Computational Contact Mechanics, 2nd ed., Springer 2006. DOI 10.1007/978-3-540-32609-0.
  • T. A. Laursen. Computational Contact and Impact Mechanics, Springer 2003. DOI 10.1007/978-3-662-04864-1.
  • T. J. R. Hughes et al. A finite element method for a class of contact-impact problems. CMAME 8(3):249–276, 1976. DOI 10.1016/0045-7825(76)90018-9. (The impact–release conditions; analytic bar-impact test.)
  • Use: mortar/segment-to-segment contact for the implicit solver later; theory of penalty regularisation.

A6. Johnson–Cook plasticity and damage

A6.1 Johnson & Cook 1983 (strength) and 1985 (fracture). Verdict: build on.

  • Citations.
    • G. R. Johnson, W. H. Cook. A constitutive model and data for metals subjected to large strains, high strain rates and high temperatures. Proc. 7th Int. Symp. on Ballistics, The Hague, 541–547, 1983. No DOI; (unverified) — conference proceedings, not online through Crossref.
    • G. R. Johnson, W. H. Cook. Fracture characteristics of three metals subjected to various strains, strain rates, temperatures and pressures. Eng. Fract. Mech. 21(1):31–48, 1985. DOI 10.1016/0013-7944(85)90052-9.
  • Method. Flow stress σ_y = (A + B ε_p^n)(1 + C ln ε̇*)(1 − T*^m), a multiplicative split of hardening, rate and thermal softening (homologous temperature T*; adiabatic heating from plastic work with a Taylor–Quinney factor). Fracture strain ε_f = (D1 + D2 e^{D3 σ*})(1 + D4 ln ε̇*)(1 + D5 T*) with stress triaxiality σ*; damage D = Σ Δε_p / ε_f accumulates and the point fails at D = 1.
  • Solves. Metals under impact, machining, ballistics.
  • Limits. Rate term ln ε̇* is singular at ε̇* → 0 (clamp at 1); T* outside [0, 1] must be clamped; radial return with rate dependence needs a scalar Newton iteration (bounded). Fracture is mesh-dependent without regularisation. Parameter sets are taken from published papers (the 1983/1985 tables), never from a commercial material library.
  • Complexity. Low on top of A4.1.

A7. Element erosion

A7.1 Johnson & Stryk 1987; Belytschko & Lin 1987. Verdict: build on (simple erosion), reference (eroding contact).

  • Citations.
    • G. R. Johnson, R. A. Stryk. Eroding interface and improved tetrahedral element algorithms for high-velocity impact computations in three dimensions. Int. J. Impact Eng. 5:411–421, 1987. DOI 10.1016/0734-743X(87)90057-1.
    • T. Belytschko, J. I. Lin. A three-dimensional impact-penetration algorithm with erosion. Int. J. Impact Eng. 5:111–127, 1987. DOI 10.1016/0734-743X(87)90033-9.
  • Method. Delete an element when a criterion is met (damage D = 1, effective plastic strain, minimum Δt); keep its nodal mass and momentum (optionally as free particles); rebuild the exposed contact surface so the projectile keeps contacting interior faces.
  • Limits. Not mass/energy conservative unless the eroded energy is accounted for (report it); results depend on the erosion threshold. Contact surface update is the hard part.
  • Complexity. Low for deletion, moderate for the surface update.

A8. Artificial bulk viscosity and shock capturing

A8.1 von Neumann & Richtmyer 1950. Verdict: build on.

  • Citation. J. von Neumann, R. D. Richtmyer. A Method for the Numerical Calculation of Hydrodynamic Shocks. J. Appl. Phys. 21(3):232–237, 1950. DOI 10.1063/1.1699639.
  • Method. Add a pressure q (only in compression) quadratic in the velocity jump across the element, spreading shocks over a few elements so the Rankine–Hugoniot jump is reached without oscillation.

A8.2 Wilkins 1980, artificial viscosity in multidimensions. Verdict: build on.

  • Citation. M. L. Wilkins. Use of artificial viscosity in multidimensional fluid dynamic calculations. J. Comput. Phys. 36(3):281–303, 1980. DOI 10.1016/0021-9991(80)90161-8.
  • Method. The combined form used by explicit FE codes: q = ρ L (C_q L (ε̇_kk)² − C_l c ε̇_kk) for ε̇_kk < 0, with a quadratic (C_q ≈ 1.5) and a linear (C_l ≈ 0.06) term; the stable step becomes Δt = L / (Q + √(Q² + c²)), Q = C_l c + C_q L |ε̇_kk|. Default on in every explicit solid element: without it, impact runs ring.
  • Limits. Smears shocks over 3–4 elements; spurious heating in shockless compression (wall heating, see Noh).

A8.3 Caramana, Shashkov, Whalen 1998. Verdict: reference (later, for hydro).

  • Citation. JCP 144(1):70–97, 1998. DOI 10.1006/jcph.1998.5989.
  • Method. Edge-based tensor viscosity with limiters for multidimensional Lagrangian hydro; avoids spurious viscosity in uniform compression and preserves symmetry.
  • Code. Laghos (BSD-2) has related high-order viscosities: READ OK.

A9. Hydrocode references

A9.1 Wilkins, Computer Simulation of Dynamic Phenomena, Springer 1999. Verdict: build on (hydro side of the explicit solver).

  • Links. DOI 10.1007/978-3-662-03885-7.
  • Method. The HEMP lineage: staggered Lagrangian grid, the stress/energy update order, artificial viscosity, elastic–plastic flow with a pressure from an EOS and a deviator from a hypoelastic law with radial return, energy equation coupling, programmed-burn detonation, sliding interfaces; with many worked impact problems.
  • Complexity. Moderate, and the order of operations is exactly what the explicit step needs.

A9.2 Benson 1992, Lagrangian and Eulerian hydrocodes. Verdict: build on (survey and design reference).

  • Citation. D. J. Benson. Computational methods in Lagrangian and Eulerian hydrocodes. CMAME 99(2–3):235–394, 1992. DOI 10.1016/0045-7825(92)90042-I.
  • Method. 160-page survey: Lagrangian step, artificial viscosity, EOS coupling and the energy update, Eulerian and ALE advection (operator split: Lagrangian step then remap), mixed-material cells, interface reconstruction.
  • Use. The map for whether and how to add ALE/Eulerian multi-material (blast, fluids with EOS). Read before designing anything Eulerian.

A9.3 Benson 1989, simple ALE. Verdict: reference (later). CMAME 72(3):305–350, 1989. DOI 10.1016/0045-7825(89)90003-0. An operator-split ALE added to a Lagrangian FE code with a donor-cell/van Leer advection pass.

A10. Verification problems (analytic or published experimental, no commercial results)

CaseReferenceExpected value
Elastic wave in a bar (step load on a free or fixed end)d’Alembert; A1.1 bookWave front at x = c t, c = √(E/ρ) (rod) or √((λ+2μ)/ρ) (constrained); stress σ = ρ c v; reflection doubling at a fixed end. Measures dispersion/overshoot of the element and q.
Elastic bar impact on a rigid wallHughes et al. 1976Contact duration 2L/c, release velocity equal and opposite (energy conserved).
Patch test, rigid rotationA2.1, A4.3Constant strain reproduced; zero stress after a 90° rigid rotation.
Simple shear, hypoelasticDienes 1979Closed-form shear stress for Jaumann (oscillating) and Green–Naghdi rates.
Uniaxial J2 / Johnson–Cook at constant rateA4.1, A6.1Closed-form flow curve from the model’s own equations.
Cantilever free vibrationEuler–Bernoulli / M6 modal solverPeriod from the analytic first frequency; cross-check with the implicit modal solver.
Energy balanceA1.1KE + IE + hourglass + contact + eroded − W_ext constant within 1%.
Taylor bar impactG. I. Taylor 1948, Proc. R. Soc. A 194:289–299, DOI 10.1098/rspa.1948.0081; M. L. Wilkins, M. W. Guinan 1973, J. Appl. Phys. 44(3):1200–1206, DOI 10.1063/1.1662328Taylor’s 1D estimate is analytic (final length ratio vs ρv²/σ_y). Wilkins–Guinan experimental final lengths are published experiments: allowed by the “no commercial data” rule, but owner decision whether experiment-derived expected values may enter the reference suite.
Sod, Noh, Sedov (hydro)Sod 1978 JCP 27(1):1–31, DOI 10.1016/0021-9991(78)90023-2; Noh 1987 JCP 72(1):78–120, DOI 10.1016/0021-9991(87)90074-XExact Riemann solution; Noh’s exact post-shock density 64 (spherical, γ=5/3); Sedov self-similar solution. Tests q and EOS coupling.

Part B: Equations of state

All EOS models below give pressure p(ρ, e) (e: specific internal energy, or energy per reference volume E); the deviatoric stress comes from the strength model (A4/A6). Every EOS in the solver needs: finite-input checks, the sound speed c² = (∂p/∂ρ)_s = (∂p/∂ρ)_e + (p/ρ²)(∂p/∂e)_ρ (for Δt and q), a tension cut-off, and a guard on compression singularities.

B1. Mie–Grüneisen with a linear Us–up Hugoniot. Verdict: build on.

  • Citations.
    • R. G. McQueen, S. P. Marsh, J. W. Taylor, J. N. Fritz, W. J. Carter. The equation of state of solids from shock wave studies. In High-Velocity Impact Phenomena (R. Kinslow, ed.), Academic Press 1970, 293–417. DOI 10.1016/B978-0-12-408950-1.50012-4.
    • M. A. Meyers. Dynamic Behavior of Materials. Wiley 1994. DOI 10.1002/9780470172278. (Textbook derivation of Rankine–Hugoniot and Mie–Grüneisen.)
  • Method. The Hugoniot U_s = c_0 + s u_p and Rankine–Hugoniot give, with η = 1 − ρ_0/ρ, p_H = ρ_0 c_0² η / (1 − s η)² and e_H = p_H η / (2ρ_0); off the Hugoniot, p = p_H + Γ ρ (e − e_H) with Γ ρ = Γ_0 ρ_0 (or Γ = Γ_0 + a η). Quadratic/cubic Hugoniot fits extend it.
  • Solves. Metals and water/polymers under shock (impact, penetration, underwater explosion water).
  • Limits. Singular at η = 1/s (guard: error or cap, never NaN); tension branch needs a separate form (linear p = ρ_0 c_0² η) and a spall cut-off; invalid near phase transitions and in expansion to vapour.
  • Complexity. Low.

B2. JWL for detonation products. Verdict: build on.

  • Citations.
    • E. L. Lee, H. C. Hornig, J. W. Kury. Adiabatic Expansion of High Explosive Detonation Products. LLNL report UCRL-50422, 1968. DOI 10.2172/4783904 (OSTI).
    • B. M. Dobratz. LLNL explosives handbook: properties of chemical explosives and explosive simulants. UCRL-52997, 1981. DOI 10.2172/6530310 (published JWL parameter sets).
  • Method. p = A(1 − ω/(R_1 V)) e^{−R_1 V} + B(1 − ω/(R_2 V)) e^{−R_2 V} + ω E / V, V = relative volume, E = energy per initial volume; fitted to cylinder-test expansion. Used with programmed burn: each element’s lighting time = distance from the detonation point / detonation speed D, a burn fraction ramps the pressure in (Wilkins A9.1 describes this).
  • Solves. High-explosive products; with B1 water, underwater explosion; with an Eulerian/ALE or SPH carrier, blast.
  • Limits. Programmed burn ignores shock initiation and shadowing (needs a ray/eikonal lighting time around obstacles); in a Lagrangian mesh the products’ expansion tangles the mesh quickly, so practical blast needs ALE/Eulerian (A9.2/A9.3) or SPH (E2).
  • Complexity. Low for the EOS; programmed burn moderate.

B3. Ideal gas / gamma law, polynomial, stiffened gas. Verdict: build on.

  • Ideal gas p = (γ − 1) ρ e. Linear polynomial p = C_0 + C_1 μ + C_2 μ² + C_3 μ³ + (C_4 + C_5 μ + C_6 μ²) E, μ = ρ/ρ_0 − 1 (a general form that contains ideal gas and linear elastic as special cases; a hydrocode convention, described in A9.2 — write our own description). Stiffened gas p = (γ − 1) ρ e − γ p_∞: O. Le Métayer, J. Massoni, R. Saurel, Int. J. Therm. Sci. 43(3):265–276, 2004, DOI 10.1016/j.ijthermalsci.2003.09.002 (French title in Crossref).
  • Limits. Polynomial may give negative sound speed in tension for arbitrary coefficients: validate c² > 0 over the admissible range at model check time.
  • Complexity. Trivial.

B4. Tabulated EOS. Verdict: build on (simple bilinear table), reference (SESAME-class).

  • Method. p(ρ, e) (or p(ρ, T), e(ρ, T)) on a rectilinear grid with bilinear or monotone bicubic interpolation; for a 1D compaction table p(ε_v) with unloading slopes (porous materials, soils).
  • Limits. Thermodynamic consistency (positive c², convexity) is not guaranteed by the user’s table: check at model-check time and report the bad cells. The LANL SESAME tables carry their own distribution terms: do not bundle any.
  • Reference. R. Menikoff, B. J. Plohr. The Riemann problem for fluid flow of real materials. Rev. Mod. Phys. 61(1):75–130, 1989. DOI 10.1103/RevModPhys.61.75 — convexity (fundamental derivative) conditions an EOS must meet for well-posed shocks.

B5. Tillotson. Verdict: reference (later; for hypervelocity impact).

  • Citations.
    • J. H. Tillotson. Metallic equations of state for hypervelocity impact. General Atomic report GA-3216, 1962. (unverified: no DOI or OSTI record found by API search).
    • A. L. Brundage. Implementation of Tillotson Equation of State for Hypervelocity Impact of Metals, Geologic Materials, and Liquids. Procedia Eng. 58:461–470, 2013. DOI 10.1016/j.proeng.2013.05.053.
  • Method. Separate forms for compressed, cold-expanded and hot-expanded (vapour) states with an interpolation region between incipient and complete vaporisation energies.
  • Limits. The region switch is discontinuous in published forms; Brundage documents the fix. Needed only for hypervelocity (> ~5 km/s) work.
  • Complexity. Low–moderate.

B6. Energy equation coupling and pressure–energy iteration. Verdict: build on (A9.1, A9.2).

  • Method. Per element, per step: e^{n+1} = e^n − ((p^{n+1} + p^n)/2 + q) ΔV/m + (deviatoric work)/m. Since p^{n+1} depends on e^{n+1}, the update is implicit. For EOS linear in energy (p = f(ρ) + g(ρ) e: ideal gas, polynomial, Mie–Grüneisen, JWL) it is solved in closed form; for tabulated or Tillotson, a bounded scalar fixed-point or Newton iteration (≤ 10 iterations, report non-convergence).
  • Limits. Energy conservation of the whole scheme depends on using the same ΔV for work and volume change, and on adding q-work to e (shock heating).

B7. Shock capturing. Lagrangian explicit captures shocks with artificial viscosity (A8). Godunov/Riemann-solver shock capturing belongs to Eulerian finite volume (E1); not needed for the Lagrangian solver.

B8. Polymer PVT: the modified two-domain Tait equation. Verdict: build on (implemented, #159: crates/model/src/pvt.rs, stored and evaluated, not yet used by a solver). Added 2026-10-28; the DOIs below were checked against the DOI handle API and Crossref, as above.

  • Citations.
    • R. Y. Chang, C. H. Chen, K. S. Su. Modifying the Tait equation with cooling-rate effects to predict the pressure–volume–temperature behaviors of amorphous polymers: modeling and experiments. Polym. Eng. Sci. 36(13):1789–1795, 1996. DOI 10.1002/pen.10574.
    • T. Willerer, T. Brinkmann, K. Drechsler. Development and Application of a Cooling Rate Dependent PVT Model for Injection Molding Simulation of Semi Crystalline Thermoplastics. Polymers 16(22):3194, 2024. DOI 10.3390/polym16223194 (open access; eqs. 1–9 write the form out with the role of each coefficient; its Table 1 is a fitted set, its measurements are shown only as figures).
    • E. J. Padilha Júnior, R. de P. Soares, N. S. M. Cardozo. Analysis of equations of state for polymers. Polímeros 25(3):277–288, 2015. DOI 10.1590/0104-1428.1621 (open access; Tables 2 and 3 give two-domain Tait coefficients with standard errors for twelve polymers, among them PS and iPP, fitted to the measurements of the two papers below; Table 4 the mean relative deviation of the fit). Neither open-access source states a measured (T, p, v) point as a number: Padilha Júnior et al. list only the data sources, ranges and point counts (Table 1), and Willerer et al. show their measurements as figures and give no fit deviation. A coefficient-only case would check the equation against itself, so the validation case waits for the measured tables below (checked 2026-10-29).
  • Measured data (sources for a validation case; not open access).
    • P. Zoller, D. J. Walsh. Standard Pressure–Volume–Temperature Data for Polymers. Technomic, 1995; later CRC Press (tables of measured specific volume for many polymers). No DOI; (unverified).
    • Y. Sato, Y. Yamasaki, S. Takishima, H. Masuoka. Precise measurement of the PVT of polypropylene and polycarbonate up to 330 °C and 200 MPa. J. Appl. Polym. Sci. 66(1):141–150, 1997. DOI 10.1002/(SICI)1097-4628(19971003)66:1<141::AID-APP17>3.0.CO;2-4.
    • L. A. Utracki. Pressure–volume–temperature of molten and glassy polymers. J. Polym. Sci. B Polym. Phys. 45(3):270–285, 2007. DOI 10.1002/polb.21031.
  • Method. v(T, p) = v0(T) [1 − C ln(1 + p/B(T))] + vt(T, p), C = 0.0894; v0 = b1 + b2 (T − b5), B = b3 exp(−b4 (T − b5)) with separate melt and solid coefficients split at T_t(p) = b5 + b6 p; vt = b7 exp(b8 (T − b5) − b9 p) in the solid of a semi-crystalline polymer, 0 otherwise.
  • Solves. The density of a polymer at the temperature and pressure of a state: packing and shrinkage in moulding, thermal and pressure-dependent density in later coupled work.
  • Limits. One cooling rate per coefficient set (Willerer et al. and Chang et al. add the rate); the bracket turns negative far beyond the fitted pressure range (refused, never NaN); the step at T_t is a fit, not a model of crystallisation kinetics.
  • Complexity. Trivial.

Part C: Lattice Boltzmann method

C1. Foundations

C1.1 Chen & Doolen 1998. Verdict: reference (orientation).

  • Citation. S. Chen, G. D. Doolen. Lattice Boltzmann method for fluid flows. Annu. Rev. Fluid Mech. 30:329–364, 1998. DOI 10.1146/annurev.fluid.30.1.329.
  • Method. Review: from lattice-gas automata to BGK LBM, Chapman–Enskog recovery of Navier–Stokes, boundary conditions, multiphase and thermal extensions.

C1.2 Krüger, Kusumaatmaja, Kuzmin, Shardt, Silva, Viggen. The Lattice Boltzmann Method: Principles and Practice, Springer 2017. Verdict: build on (the spine of the LBM solver).

  • Links. DOI 10.1007/978-3-319-44649-3.
  • Content used. Velocity sets (D2Q9, D3Q15/19/27) and equilibria; Chapman–Enskog; unit conversion and the choice of lattice parameters; stream-collide algorithm; BGK, TRT and MRT; bounce-back, interpolated bounce-back, Zou–He and other boundary conditions; forces (Guo); stability and accuracy analysis; sound waves. The book has companion example code on its site: licence not checked — do not open until checked.
  • Method in one line. f_i(x + c_i Δt, t + Δt) = f_i(x, t) + Ω_i(f); density and momentum are moments of f; viscosity ν = c_s² (τ − ½) Δt with c_s² = 1/3 in lattice units.
  • Limits (general, LBM): weakly compressible — the error is O(Ma²), so lattice velocity u_lat ≲ 0.1 (Ma ≲ 0.17); τ → ½ (high Re on a coarse grid) destabilises BGK; uniform Cartesian grid, so curved walls are staircased unless interpolated BCs are used; acoustic time step Δt ∝ Δx (acoustic scaling) or ∝ Δx² (diffusive scaling) makes incompressible low-speed flows costly.
  • Complexity. BGK D3Q19 with bounce-back on a uniform grid: ≈1k lines. Everything production-grade (refinement, turbulence, BCs, GPU) is the real work.

C1.3 Bhatnagar, Gross, Krook 1954; Qian, d’Humières, Lallemand 1992. Verdict: build on (BGK as the first collision).

  • P. L. Bhatnagar, E. P. Gross, M. Krook. Phys. Rev. 94(3):511–525, 1954. DOI 10.1103/PhysRev.94.511.
  • Y. H. Qian, D. d’Humières, P. Lallemand. Lattice BGK Models for Navier-Stokes Equation. EPL 17(6):479, 1992. DOI 10.1209/0295-5075/17/6/001.
  • Method. Single relaxation toward a second-order Hermite equilibrium; the DnQm lattices.
  • Limits. Viscosity-dependent wall location with bounce-back; unstable at low viscosity.

C1.4 He & Luo 1997, incompressible LBM. Verdict: reference. J. Stat. Phys. 88:927–944, 1997. DOI 10.1023/B:JOSS.0000015179.12689.e4. An equilibrium that removes O(Ma²) compressibility error in steady flows; useful for steady validation.

C1.5 Sterling & Chen 1996; Lallemand & Luo 2000 — stability. Verdict: reference.

  • J. D. Sterling, S. Chen. Stability Analysis of Lattice Boltzmann Methods. JCP 123(1):196–206, 1996. DOI 10.1006/jcph.1996.0016.
  • P. Lallemand, L.-S. Luo. Theory of the lattice Boltzmann method: Dispersion, dissipation, isotropy, Galilean invariance, and stability. PRE 61:6546–6562, 2000. DOI 10.1103/PhysRevE.61.6546.
  • Use. Linear stability (von Neumann) analysis of BGK/MRT; the source for the stable (u, τ) region and the case for MRT. Lallemand & Luo (Sec. 6, Fig. 2) find BGK unstable above V ≈ 0.07 at 1/τ = 1.99 (τ ≈ 0.5025), worst for sound along the flow; their stable MRT relaxes the odd moments fast (1.92).
  • Also. F. Wissocq, P. Sagaut, J.-F. Boussuge, An extended spectral analysis of the lattice Boltzmann method: modal interactions and stability issues, J. Comput. Phys. 380:311–333, 2019. DOI 10.1016/j.jcp.2018.12.015. The same linearisation about a uniform mean flow (App. B.2), all wavevector directions; BGK’s instability arises from collisions of non-hydrodynamic with acoustic/shear modes as the Mach number rises (Sec. 5), on oblique waves rather than along the flow. No TRT.
  • Used as. crates/lbm/tests/trt_stability.rs applies this analysis to D3Q19 TRT about #820’s uniform stream (U = 0.05 along x, 16³ modes): with Λ = 3/16 growing modes for τ⁺ ≤ 0.502, none from 0.5025; at τ⁺ = 0.5005 stable only to U = 0.01, or with Λ ≤ 1e-5. About an oblique stream (#1063) it is stable up to a lattice speed of 5.6 (τ⁺ − ½) at the smallest oblique onset found, a cell Reynolds number of 16.8 (setup::TRT_STREAM_LIMIT; 6.18 along (1, 1, 0)). Wissocq & Sagaut (J. Comput. Phys., 2022, article 110858, Sec. 7.8) analyse TRT along x only. No published TRT boundary covers these cases; the analysis and its numbers are ours. crates/lbm/tests/mrt_stability.rs applies it to the MRT collision (C2.1) at rest and about streams at lattice Mach 0.1 and 0.2: the source of mrt::MIN_VISCOSITY.

C1.6 Guo, Zheng, Shi 2002, forcing. Verdict: build on. PRE 65:046308, 2002. DOI 10.1103/PhysRevE.65.046308. The second-order body-force scheme every IB-LBM coupling (D2) needs.

C2. Collision operators

C2.1 d’Humières et al. 2002, MRT in 3D. Verdict: build on (second collision).

  • Citation. D. d’Humières, I. Ginzburg, M. Krafczyk, P. Lallemand, L.-S. Luo. Multiple-relaxation-time lattice Boltzmann models in three dimensions. Phil. Trans. R. Soc. A 360(1792):437–451, 2002. DOI 10.1098/rsta.2001.0955.
  • Method. Collide in moment space with a separate relaxation rate per moment group (D3Q15/D3Q19 matrices given); free rates damp non-hydrodynamic modes, raising stability and fixing the wall location.
  • Limits. Still loses stability at very high Re; parameters need care. The paper’s own linear analysis bounds the viscosity from below: “ν > 2.54 × 10⁻³” at speeds up to 0.19 with its optimised equilibria (appendix A). With the single-relaxation-time-equivalent equilibria FieldCraft uses, our analysis (crates/lbm/tests/mrt_stability.rs) finds the state of rest unstable below a lattice viscosity of 1.1801 × 10⁻³ (τ 0.50354), 1.2295 × 10⁻³ at lattice Mach 0.1; a step below it is refused. P. Nathen, D. Gaudlitz, M. J. Krause, N. A. Adams, On the stability and accuracy of the BGK, MRT and RLB Boltzmann schemes for the simulation of turbulent flows, Commun. Comput. Phys. 23:846–876, 2018, DOI 10.4208/cicp.OA-2016-0229, report an unphysical state of this MRT in channels at Re_τ 395 and 590; our Han et al. channel showed grid-scale noise for the reason above (docs/manual/fluid/les.md), which we had first put down to under-resolution.
  • Complexity. Low–moderate (a constant 19×19 transform).
  • As implemented (crates/lbm/src/mrt.rs, collision: "mrt", #664): D3Q19, the 19 orthogonal moments built from their integer polynomials in c (so independent of the direction order), the inverse as the transpose over the squared norms; the single-relaxation-time-equivalent equilibria with j·j/ρ, and the rates Malaspinas & Sagaut (C5.4) use: 1.19, 1.4 (energy square and quartic modes), 1.2 (energy flux), 1.98 (cubic modes), the viscous rate on the five stresses, set per cell by Smagorinsky’s model or the wall model; Guo’s force as (I − S/2) of its moments. Verified by Poiseuille and Taylor–Green (second order), Couette, and Smagorinsky Couette’s closed form.

C2.2 Ginzburg, Verhaeghe, d’Humières 2008, TRT. Verdict: build on (default over BGK).

  • Citation. Commun. Comput. Phys. 3(2):427–478, 2008. DOI 10.4208/cicp.2008.v3.p427.
  • Method. Two relaxation rates (symmetric/antisymmetric parts); the “magic parameter” Λ = 3/16 puts the bounce-back wall exactly halfway and makes the solution viscosity-independent in steady flow. BGK cost, much of MRT’s benefit.
  • GPU arithmetic. The shifted populations’ rest direction closes the sum of the rounded post-collision opposite pairs to the incoming density deviation. This enforces TRT’s conserved zeroth moment to f32 summation accuracy after relaxation (Guo’s force has zero mass moment); closing only the equilibria still allowed an f32 mass drift on NVIDIA (#906).
  • Also. I. Ginzburg, F. Verhaeghe, D. d’Humières, Study of simple hydrodynamic solutions with the two-relaxation-times lattice Boltzmann scheme, Commun. Comput. Phys. 3(3):519–581, 2008. DOI 10.4208/cicp.2008.v3.p519. Eq. 2.29 gives the effective Poiseuille width of halfway bounce-back, H_eff² = H² + (16Λ − 3)/3: the cost of any Λ ≠ 3/16, e.g. of a near-BGK Λ chosen for bulk stability close to τ⁺ = ½ (#820).
  • Complexity. Low.

C2.3 Geier et al. 2015, cumulant LBM. Verdict: build on (high-Re collision, D3Q27).

  • Citations.
    • M. Geier, M. Schönherr, A. Pasquali, M. Krafczyk. The cumulant lattice Boltzmann equation in three dimensions: Theory and validation. Comput. Math. Appl. 70(4):507–547, 2015. DOI 10.1016/j.camwa.2015.05.001.
    • M. Geier, A. Pasquali, M. Schönherr. Parametrization of the cumulant lattice Boltzmann method for fourth order accurate diffusion part I. JCP 348:862–888, 2017. DOI 10.1016/j.jcp.2017.05.040.
  • Method. Relax statistically independent cumulants (computed via a central-moment chain transform on D3Q27); Galilean invariant and very stable; the 2017 parametrisation chooses the free rates so the scheme is fourth-order accurate in diffusion, and acts as an implicit LES at high Re without an explicit sub-grid model.
  • Limits. D3Q27 (27 populations: ≈40% more memory and bandwidth than D3Q19); the transform is long (hundreds of flops) but bandwidth, not flops, limits LBM; a limiter is needed for under-resolved flows.
  • Complexity. Moderate–high (careful transcription of the transforms; test each against the moment definitions).
  • Code. VirtualFluids and lbmpy implement it: both GPL-3.0, FORBIDDEN. Implement from the paper.

C2.4 Regularised and recursive-regularised collision. Verdict: built (recursive regularised on D3Q19, collision: "regularized", #557; docs/manual/fluid/collision.md).

  • Citations.
    • J. Latt, B. Chopard. Lattice Boltzmann method with regularized pre-collision distribution functions. Math. Comput. Simul. 72(2–6):165–168, 2006. DOI 10.1016/j.matcom.2006.05.017.
    • O. Malaspinas. Increasing stability and accuracy of the lattice Boltzmann scheme: recursivity and regularization. arXiv:1505.06900, 2015. https://arxiv.org/abs/1505.06900 (200). (A preprint, not on Crossref: the implementation cites Coreixas et al. 2017 for the recursive form.)
    • C. Coreixas, G. Wissocq, G. Puigt, J.-F. Boussuge, P. Sagaut. Recursive regularization step for high-order lattice Boltzmann methods. PRE 96:033306, 2017. DOI 10.1103/PhysRevE.96.033306.
    • C. Coreixas, B. Chopard, J. Latt. Comprehensive comparison of collision models in the lattice Boltzmann framework: Theory and investigations. PRE 100:033305, 2019. DOI 10.1103/PhysRevE.100.033305.
  • Method. Before collision, project the non-equilibrium part onto its second-order Hermite component (regularised), or reconstruct higher-order Hermite coefficients recursively from it (recursive regularised): filters the ghost modes that destabilise BGK. Coreixas 2019 compares BGK, MRT (raw/central/Hermite moments), cumulant, regularised and recursive-regularised on the same linear stability and benchmark cases — the paper to pick the operator with.
  • Limits. Regularised adds numerical dissipation; RR is near-cumulant in stability on D3Q19/27.
  • Code. STLBM (MIT) has BGK/TRT/regularised kernels: READ OK.

C2.4a Hybrid recursive regularised collision (HRR). Verdict: built on the CPU (collision: "hrr", sigma; crates/lbm/src/hrr.rs, docs/manual/fluid/collision.md); the GPU refuses it for now.

  • Citations.
    • J. Jacob, O. Malaspinas, P. Sagaut. A new hybrid recursive regularised Bhatnagar–Gross–Krook collision model for Lattice Boltzmann method-based large eddy simulation. J. Turbul. 19:1051–1076, 2018. DOI 10.1080/14685248.2018.1540879.
    • Y. Feng, P. Boivin, J. Jacob, P. Sagaut. Hybrid recursive regularized thermal lattice Boltzmann model for high subsonic compressible flows. J. Comput. Phys. 394:82–99, 2019. DOI 10.1016/j.jcp.2019.05.031 (the stencil variant).
  • Method. The recursive regularised collision (C2.4, their RR-BGK) with the second-order non-equilibrium flux replaced by P̃ = σ P + (1 − σ)(−2 ρ c_s² τ S^FD) (their eq. 31), S^FD from second-order centred finite differences of the velocity; the third-order part rebuilt recursively from P̃. The finite differences’ error is a bi-Laplacian hyperviscosity, to leading order ν_σ = (1 − σ)/(6σ) Δx² c_s² τ (eq. 47), which stabilises under-resolved large-eddy simulation; σ may be set per cell from a subgrid model’s dissipation (their eqs. 48–51, “dynamic”). Feng et al. 2019 compute the gradients with an isotropic stencil weighted by the lattice weights.
  • Limits. Eq. 47 is the continuous model’s: the exact linear analysis of the discrete scheme (ours, tests/hrr.rs) gives a k⁴ damping that depends on τ̄ (larger than eq. 47’s near τ̄ = ½, none at τ̄ = 1, negative above). The paper states no wall treatment of S^FD; it uses one-sided first-order differences at grid-refinement interfaces.
  • As implemented. D3Q19 on the CPU, from the paper alone (no code read). τ is read as the cell’s discrete τ̄ = 1/ω (with Smagorinsky’s eddy viscosity or the wall model’s rate when they act), which keeps ν exactly as k → 0; the centred stencil of the paper (Feng et al.’s isotropic one not implemented); one-sided first-order differences next to any non-fluid neighbour or non-periodic face, 0 with neither neighbour; σ = 0.99 by default, σ = 1 is regularized bit for bit. Dynamic σ (eqs. 48–50) with Vreman’s (C5.1a) or Smagorinsky’s ν_t (Hou’s, from the implicit rate): σ = 1/(1 + 6 L_VK² ν_t/ν), the continuous c_s² τ of eq. 47 read as ν, |∇²u| from the 7-point Laplacian (an axis with a missing neighbour contributes nothing), ν_t then not in τ (their case 4), σ = 1 at wall-model cells; refused without a turbulence model. Verified against the exact decay of a shear wave (within 1 %, measured within 1e-6) and eq. 47 at k Δx = 2π/64.

C2.5 Velocity sets. D3Q19 for laminar and moderate Re (cheapest isotropic-enough set); D3Q27 for cumulant and wall-bounded turbulence. Kang & Hassan 2013 show D3Q19 artefacts in wall-bounded turbulence: S. K. Kang, Y. A. Hassan, JCP 232(1):100–117, 2013, DOI 10.1016/j.jcp.2012.07.023. Verdict: reference.

C3. Boundary conditions

C3.1 Bounce-back; Ladd 1994 moving walls. Verdict: build on.

  • A. J. C. Ladd. Numerical simulations of particulate suspensions via a discretized Boltzmann equation. Part 1. JFM 271:285–309, 1994. DOI 10.1017/S0022112094001771.
  • Method. Halfway bounce-back reflects populations crossing a wall link: second-order for a wall halfway between nodes, staircase otherwise. Ladd adds the moving-wall momentum term (−2 w_i ρ c_i·u_w / c_s²) and the momentum-exchange force on the body, which is how LBM computes drag/lift and FSI loads with bounce-back.
  • Complexity. Low.

C3.2 Bouzidi, Firdaouss, Lallemand 2001, interpolated bounce-back. Verdict: build on.

  • Citation. Phys. Fluids 13(11):3452–3459, 2001. DOI 10.1063/1.1399290.
  • Method. For each wall link, the fraction q ∈ [0, 1] of the link inside the fluid; linear or quadratic interpolation of the reflected population, second-order for curved walls.
  • Needs from meshing. q comes from ray–triangle intersection of the lattice link with the face-tagged boundary surface — robust predicates (fieldcraft-mesh) give the inside/outside decision; q itself is a constructed value.
  • Limits. Not mass conservative. Both interpolations are bounded on the whole of [0, 1] (at q = 0 they return the next node’s population), so q takes no floor (#1059); the small-fraction trouble Mei, Luo & Shyy report belongs to the Filippova–Hänel weighting.
  • Also. R. Mei, L.-S. Luo, W. Shyy, JCP 155(2):307–330, 1999, DOI 10.1006/jcph.1999.6334 — the alternative curved-boundary scheme. Reference.
  • Built (#732). walls: "interpolated" on the fluid step (default "halfway"), CPU and GPU: the linear interpolation at every link into an obstacle (crates/lbm/src/flow.rs, bouzidi), with Ladd’s moving-wall term added as P. Lallemand, L.-S. Luo, JCP 184(2):406–421, 2003, DOI 10.1016/S0021-9991(02)00022-0, write it, and the momentum exchange in the wall’s frame (Y. Wen, Z. Zhou, C. Shu, H. Ho, J. Fan, JCP 266:161–170, 2014, DOI 10.1016/j.jcp.2014.02.018). q is the nearest crossing of the link with the obstacle’s triangles by exact orient3d tests, or with the face’s exact curved surface where it has one (crates/lbm/src/voxel.rs, link_fraction), taken in [0, 1] (no floor since #1059). A link with q < ½ and no second fluid cell behind it, or with no crossing, keeps halfway bounce-back and is counted in a warning. Box faces, the temperature lattice and conducting interfaces stay halfway (#631). Refused with a wall model and a free surface. The quadratic variant is not built.
  • Measured (crates/lbm/tests/interpolated.rs, interpolated_couette.rs; TRT, Λ = 3/16, τ = 1): round pipe 4–16 cells per radius, L2 fitted order halfway 1.01, interpolated 1.65 (4.9e-3 against 2.0e-4 at 32 cells); plane channel with its walls 0–0.8 of a cell off the cell faces, worst error order 0.95 against 1.99; annular Couette with a sliding rod, 6–48 cells per radius, order 1.16 against 1.92 and the rod’s drag within 0.11 %; #798’s periodic sphere array at R = 3 cells, Hasimoto’s K +11.66 % halfway against −1.64 % interpolated. The linear scheme’s wall moves with τ (I. Ginzburg, D. d’Humières, Phys. Rev. E 68:066614, 2003, DOI 10.1103/PhysRevE.68.066614): the same sphere reads +0.72 % at τ = 0.6 and −9.65 % at τ = 3, while halfway TRT walls do not move with τ.

C3.3 Zou & He 1997, pressure and velocity BCs. Verdict: build on (inlet/outlet).

  • Citation. Phys. Fluids 9(6):1591–1598, 1997. DOI 10.1063/1.869307.
  • Method. Unknown incoming populations from the prescribed velocity (or density) plus bounce-back of the non-equilibrium part normal to the boundary.
  • Limits. Defined for flat, axis-aligned boundaries; corners need special treatment; unstable at high Re outlets — use regularised or convective/sponge outlets there.
  • D3Q19. M. Hecht, J. Harting, Implementation of on-site velocity boundary conditions for D3Q19 lattice Boltzmann simulations, J. Stat. Mech. 2010, P01018. DOI 10.1088/1742-5468/2010/01/P01018 (erratum J. Stat. Mech. 2013, E02001, DOI 10.1088/1742-5468/2013/02/E02001). The transverse-momentum correction that carries Zou–He’s bounce-back to D3Q19; with it, the base closure of every FieldCraft velocity inlet.

C3.3a Guo, Zheng & Shi 2002, non-equilibrium extrapolation. Verdict: build on (uniform-pressure outlets).

  • Citation. Z. Guo, C. Zheng, B. Shi, Non-equilibrium extrapolation method for velocity and pressure boundary conditions in the lattice Boltzmann method, Chinese Physics 11:366–374 (2002). DOI 10.1088/1009-1963/11/4/310.
  • Used as. crates/lbm/src/outlet.rs and the GPU pressure-preparation pass extrapolate the inner non-equilibrium populations and normal velocity while prescribing boundary density and zero tangential velocity. Implementation is independent, from the published method; no solver code was used. Constant-flow sweeps and the pressure-channel controls test the closure.
  • Also used as. The TRT velocity-inlet correction (crates/lbm/src/inlet.rs, #820) takes the equilibrium/non-equilibrium split from it, but extrapolates only the non-equilibrium stress trace (2 trace(inner1) − trace(inner2)) and, through C3.3b, the high-frequency part of the density residual; the five deviatoric stress components and the prescribed velocity stay Zou–He’s. This selective combination is our own, not the paper’s closure.

C3.3b Shapiro 1970, selective smoothing filters. Verdict: build on (TRT inlet density residual, #820).

  • Citation. R. Shapiro, Smoothing, filtering, and boundary effects, Reviews of Geophysics 8(2):359–387 (1970). DOI 10.1029/RG008i002p00359.
  • Also. R. Shapiro, Linear filtering, Math. Comp. 29(132):1094–1097 (1975). DOI 10.1090/S0025-5718-1975-0389356-X: the order-2n operator in general, which removes the two-cell wave and, among such operators, damps every other wave least without a phase shift.
  • Method. Repeated three-point smoothing combined into high-order filters whose response is one at zero wavenumber and zero at the two-cell wave; the n = 2 (fourth-order) one is [−1, 4, 10, 4, −1]/16, with response 1 − sin⁴(k/2).
  • Used as. crates/lbm/src/inlet.rs and the GPU inlet_apply (on residuals staged by inlet_prepare) apply I − S₁S₂ (S along each tangential axis, periodic sides wrapped, wall sides reflected) to the inlet’s density extrapolation residual only, so the alternating boundary mode is removed while the slowly varying density, where extrapolating outright made long acoustic waves unstable, keeps Zou–He’s value. Never applied to the bulk flow or the imposed velocity.

C3.3c Velocity inlets tried for #820 and not adopted. Verdict: reference.

  • J. Latt, B. Chopard, O. Malaspinas, M. Deville, A. Michler, Straight velocity boundaries in the lattice Boltzmann method, Phys. Rev. E 77:056703, 2008. DOI 10.1103/PhysRevE.77.056703. The regularised reconstruction from the prescribed velocity and the non-equilibrium stress.
  • Characteristic inlets: J. Izquierdo, N. Fueyo, Characteristic nonreflecting boundary conditions for open boundaries in lattice Boltzmann methods, Phys. Rev. E 78:046707, 2008. DOI 10.1103/PhysRevE.78.046707 (D2Q9 MRT; LODI amplitudes with a pressure relaxation, velocity bounce-back); S. Heubes, A. Bartel, M. Ehrhardt, Characteristic boundary conditions in the lattice Boltzmann method for fluid and gas dynamics, J. Comput. Appl. Math. 262:51–61, 2014. DOI 10.1016/j.cam.2013.09.019 (D2Q9 BGK; LODI density and velocity, then equilibrium or extrapolated non-equilibrium populations).
  • Tried as. On the #820 box at τ⁺ = 0.5005, U = 0.05, Smagorinsky 0.1: a LODI boundary density (outgoing amplitude from one-sided interior differences, the velocity held, a pressure relaxation of 0–0.5 per step) with velocity bounce-back, equilibrium, extrapolated or regularised populations; also the Latt et al. inlet, plain equilibrium and full non-equilibrium extrapolation. With Λ = 3/16 every one went unstable; with a near-BGK Λ (bulk stable) they failed or kept departures of 1e-3–1e-2 against a 1e-6 seed. None was shown near τ = ½ in its paper. From τ⁺ = 0.505 to 0.52 (no turbulence model, Λ = 3/16) the LODI inlet fails at every τ⁺, with bounce-back (steps 1 150–22 000) or regularised populations (300–11 500), and Latt et al.’s below 0.52 (400–1 000); the comparison table is in docs/verification.md. The adopted inlet (C3.3e) is FieldCraft’s own and completed 30 000 steps at each tested τ⁺ (0.505, 0.507, 0.51 and 0.52).

C3.3d Selective filters and absorbing layers in LBM, considered for #820. Verdict: reference.

  • D. Ricot, S. Marié, P. Sagaut, C. Bailly, Lattice Boltzmann method with selective viscosity filter, J. Comput. Phys. 228(12):4478–4490, 2009. DOI 10.1016/j.jcp.2009.03.030. The LBM precedent for a selective spatial filter (3- to 9-point stencils) that removes the high-wavenumber modes von Neumann analysis finds unstable while leaving large scales alone; it filters the flow itself (the populations, the macroscopic fields or the collision), which changes the effective viscosity at high wavenumbers everywhere.
  • H. Xu, P. Sagaut, Analysis of the absorbing layers for the weakly-compressible lattice Boltzmann methods, J. Comput. Phys. 245:14–42, 2013. DOI 10.1016/j.jcp.2013.02.051; A. Najafi-Yazdi, L. Mongeau, An absorbing boundary condition for the lattice Boltzmann method based on the perfectly matched layer, Comput. Fluids 68:203–218, 2012. DOI 10.1016/j.compfluid.2012.07.017. Sponge and PML layers that absorb outgoing acoustic waves over a band of cells next to the boundary.
  • Why not used for #820. The #820 mode is born in the inlet’s own closure (its density/kinetic coupling, see C3.3e), with the two-cell wavelength along the inlet plane; it is not an outgoing wave that reflects. A sponge or PML damps waves crossing a layer of cells but leaves the closure that feeds the mode as it is, and it changes the flow (and the domain) in that layer; Ricot et al.’s filter would act on the bulk, which #820 rules out (collision and viscosity stay as set). FieldCraft takes Ricot et al.’s idea, a selective filter that removes only the unstable high-wavenumber part, and applies it to the inlet’s density residual alone. Neither absorbing layer was implemented and measured.

C3.3e The TRT velocity inlet (#820): FieldCraft’s own combination. Verdict: build on (own method).

  • Parts. Base closure: Zou & He 1997 with Hecht & Harting 2010 (C3.3). Extrapolation: Guo, Zheng & Shi 2002’s equilibrium/non-equilibrium split and two-point extrapolation (C3.3a), of the non-equilibrium stress trace and the density only. Filter: Shapiro’s n = 2 operator (C3.3b) as I − S₁S₂ on the density residual 2ρ₁ − ρ₂ − ρ_ZH, after Ricot et al. 2009’s idea of filtering only the unstable high wavenumbers (C3.3d).
  • What is new. The cited inflow conditions do not filter the density of the inlet reconstruction this way; the combination, and restricting it to the trace and the density residual, is ours. Each part alone, and full extrapolation, failed while it was built (module docs of crates/lbm/src/inlet.rs).
  • Consistency. Each tangential filter pass is symmetric with unit row sums, so the density correction sums to zero over the face. This preserves Zou–He’s net mass flux when the prescribed normal velocity is uniform; for a varying profile the flux correction is Σ δρᵢ u_n,ᵢ, which need not vanish. The equilibrium correction carries momentum δρ u, while the trace term carries no mass or momentum, so the prescribed velocity is exact; the five deviatoric stresses are untouched. Tested: the_density_correction_adds_no_mass_over_a_face, correction_preserves_velocity_and_deviatoric_stress (inlet.rs) and a_duct_with_the_corrected_inlet_balances_its_mass_at_steady_state (tests/inlet_slip.rs). Poiseuille converges at second order, as with Zou–He (docs/verification.md).
  • Tested range. On the 16³ slip box at Mach 0.087, Λ = 3/16, without a turbulence model, checkerboard and broadband seeds stay bounded for 30 000 steps at τ⁺ = 0.505, 0.507, 0.51 and 0.52 (docs/verification.md). These finite-grid checks are not a general stability proof. The setup warns below 0.505 (C1.5).

C3.4 Orlanski 1976, convective outflow condition. Verdict: build on (convective outlets, #599).

  • Citation. I. Orlanski, A simple boundary condition for unbounded hyperbolic flows, J. Comput. Phys. 21(3):251–269, 1976 (DOI not checked).
  • Method. At an open boundary every quantity obeys ∂φ/∂t + U ∂φ/∂n = 0, discretised upwind and implicitly in time, φ_N^{t+1} = (φ_N^t + λ φ_{N−1}^{t+1}) / (1 + λ), λ = U Δt/Δx; Orlanski estimates U from the interior, others prescribe it. For lattice Boltzmann it is applied to the unknown populations: Q. Lou, Z. Guo, B. Shi, PRE 87:063301, 2013; Z. Yang, Comput. Math. Appl. 65(2):160–171, 2013 (DOIs not checked).
  • Used as. Outflow::Convective on a pressure face: the unknown populations convected with the cell’s own outward speed, the cell then held at the face’s density (w_q δρ on every population, the momentum unchanged), Zou–He where the flow comes back in (fieldcraft_lbm::outlet).
  • Limits. Holding each cell at the face’s pressure still reflects part of a strong vortex’s pressure field; a characteristic (non-reflecting) outlet would pass it.

C3.5 Poinsot & Lele 1992, characteristic (LODI) boundary conditions. Verdict: build on (characteristic outlets, #904).

  • Citation. T. J. Poinsot, S. K. Lele, Boundary conditions for direct simulations of compressible viscous flows, J. Comput. Phys. 101:104–129, 1992. DOI 10.1016/0021-9991(92)90046-2.
  • Method. At a subsonic outlet the wave leaving the domain is computed from the interior, and the wave entering it is prescribed; a partially non-reflecting outlet sets the incoming wave to a relaxation of the pressure towards its target, L₁ = K (p − p∞), K = σ (1 − M²) c / L.
  • Used as. Outflow::Characteristic on a pressure face (Flow::characteristic_outlet): the linearised balance in density units advances each outlet cell’s density and normal velocity, without the 1 − M² factor, and the cell takes the Guo, Zheng & Shi closure (C3.3a) at that state. Implementation is independent, from the paper.
  • Reflection. L. Selle, F. Nicoud, T. Poinsot, Actual impedance of nonreflecting boundary conditions: implications for computation of resonators, AIAA J. 42(5):958–964, 2004, derive the relaxed outlet’s R(ω) = −1/(1 − 2iω/K), so |R| = K/√(K² + 4ω²): a one-pole low-pass of rate K/2 on a fully reflected wave. The oracle case characteristic-outlet-reflection checks that response in time. σ. D. H. Rudy, J. C. Strikwerda, A nonreflecting outflow boundary condition for subsonic Navier–Stokes calculations, J. Comput. Phys. 36:55–70, 1980 (σ ≈ 0.25, the default).
  • Limits. One-dimensional along the face’s normal (no transverse terms); through the relaxation, waves slower than about K / 2 come back (|R| → 1 as ω → 0); besides it, the closure reflects directly 0.23 % of an incident pulse’s peak at σ 0.25, 0.5 and 1.0. Where the flow comes back in, the outflow treatment is kept (a subsonic inflow needs more prescribed waves).

C4. Grid refinement

C4.1 Filippova & Hänel 1998; Dupuis & Chopard 2003. Verdict: build on (Dupuis–Chopard cell-vertex refinement).

  • O. Filippova, D. Hänel. Grid Refinement for Lattice-BGK Models. JCP 147(1):219–228, 1998. DOI 10.1006/jcph.1998.6089.
  • A. Dupuis, B. Chopard. Theory and applications of an alternative lattice Boltzmann grid refinement algorithm. PRE 67:066707, 2003. DOI 10.1103/PhysRevE.67.066707.
  • Method. Nested grids at ratio 2 with time-step ratio 2 (acoustic scaling); τ rescaled per level to keep ν; populations at the interface are rescaled non-equilibrium parts with spatial and temporal interpolation from the coarse level.
  • Limits. Interface artefacts (spurious acoustic reflections); mass conservation not exact in the vertex scheme.

C4.2 Rohde et al. 2006, mass-conservative cell-centred refinement. Verdict: build on (with the octree).

  • Citation. M. Rohde, D. Kandhai, J. J. Derksen, H. E. A. van den Akker. A generic, mass conservative local grid refinement technique for lattice-Boltzmann schemes. IJNMF 51(4):439–468, 2006. DOI 10.1002/fld.1140.
  • Method. Volumetric (cell-centred) formulation: a coarse cell is split into 8 fine cells, populations are distributed homogeneously (explode) and gathered (coalesce) across levels; exactly mass conservative and naturally fits an octree with 2:1 balance.
  • Fit. The M3 octree (2:1-balanced, adapted to the surface) is the same data structure. Reuse it.

C4.3 Lagrava et al. 2012. Verdict: reference. JCP 231(14):4808–4822, 2012. DOI 10.1016/j.jcp.2012.03.015. Multi-domain refinement with filtering of the coarse-to-fine transfer (the Palabos approach; the paper is fine to read, the code is AGPL).

C5. Turbulence

C5.1 Smagorinsky LES in LBM: Smagorinsky 1963; Hou et al. 1995; Krafczyk, Tölke, Luo 2003. Verdict: build on.

  • J. Smagorinsky. Mon. Weather Rev. 91(3):99–164, 1963. DOI 10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2.
  • S. Hou, J. Sterling, S. Chen, G. D. Doolen. A lattice Boltzmann subgrid model for high Reynolds number flows. Fields Inst. Commun. 6:151–166, 1996 (Crossref year 1995). DOI 10.1090/fic/006/12.
  • M. Krafczyk, J. Tölke, L.-S. Luo. Large-eddy simulations with a multiple-relaxation-time LBE model. Int. J. Mod. Phys. B 17:33–39, 2003. DOI 10.1142/S0217979203017059.
  • Method. The strain rate is local in LBM (from the non-equilibrium second moment), so ν_t = (C_s Δ)² |S| is computed without finite differences and enters as a local τ. Cheap and local.
  • Limits. Smagorinsky is over-dissipative near walls (needs damping or a wall model) and in transition.
  • As implemented (crates/lbm/src/turbulence.rs, #663/#664): Hou et al.’s closed-form local τ from the non-equilibrium flux P = Π^neq + ½(uF + Fu) of Guo’s forcing, in both the regularised and the two-relaxation-time collision (τ⁻ follows τ⁺, keeping Λ); with heat, the turbulent diffusivity α_t = ν_t / Pr_t adds to each cell’s τ_T. Opt-in Van Driest damping of the length scale near no-slip walls (C5.3; on the GPU too: Spalding’s u_τ per wall cell and the damped constant per cell in f32). The GPU backend (crates/lbm-gpu/src/lbm.wgsl, #665) runs the same closed form in f32 behind an override constant, so with the model off its kernels and results are bit-for-bit the earlier ones; the cell’s ν_t reaches the scalar lattice through the moments buffer’s spare component (no new buffer). Measured on an RTX 4070 Laptop GPU, 128³: within ±2.3 % of the model-off throughput with or without heat (the step is memory-bound).

C5.1a Vreman 2004’s eddy viscosity. Verdict: built on the CPU (turbulence: {"type": "vreman"}; crates/lbm/src/vreman.rs, docs/manual/fluid/turbulence.md); the GPU refuses it for now.

  • A. W. Vreman. An eddy-viscosity subgrid-scale model for turbulent shear flow: Algebraic theory and applications. Phys. Fluids 16(10):3670–3681, 2004. DOI 10.1063/1.1785131 (read from the author’s copy, vremanresearch.nl).
  • J. Jacob, O. Malaspinas, P. Sagaut, J. Turbul. 19:1051–1076, 2018 (C2.4a), §5: the model in a lattice Boltzmann large-eddy simulation, Δ = Δx on cubic cells, c = 2.5 C_s² with C_s = 0.18, ν_t added to τ (their eq. 60).
  • Method. ν_t = c √(B_β / α:α) (eqs. 5–8), α_ij = ∂_i u_j, β = Σ_m Δ_m² α_mi α_mj, B_β the second invariant of β, c ≈ 2.5 C_s² (C_s = 0.17 gives c = 0.07, §II). B_β vanishes for exactly the thirteen locally laminar flow types (and their rotations of axes) whose theoretical subgrid dissipation is zero (§II, Appendix), so ν_t is zero in laminar shear and at a no-slip wall without damping, and positive without clipping.
  • As implemented. From the paper alone (no code read). With Δ_m = Δx, B_β is computed as the sum of the squared 2 × 2 minors of α (Cauchy–Binet; the same as eq. 8, never negative, and exactly 0 for a gradient with one nonzero row or column). α from the hybrid collision’s finite differences (centred, one-sided next to a non-fluid cell or a non-periodic face, 0 with neither neighbour), of velocities from a pass before the collision: explicit, unlike Hou’s implicit Smagorinsky. τ̄ = 3 (ν + ν_t) + ½ for every collision (TRT: τ⁻ follows keeping Λ; MRT: the five stresses); wall-model cells keep the wall rate; α_t = ν_t / Pr_t with heat. The step gives C_s (constant).
  • Note. A rigid rotation has a rank-two gradient and gets ν_t = c Δx² |Ω| / √2: the paper’s “rotations” are rotations of the coordinate axes, under which the zero set is invariant, not rotational flows.

C5.3 Van Driest 1956 wall damping, with Spalding’s law of the wall for u_τ. Verdict: build on.

  • E. R. Van Driest. On turbulent flow near a wall. J. Aeronaut. Sci. 23(11):1007–1011, 1956. DOI 10.2514/8.3713.
  • D. B. Spalding. A single formula for the “law of the wall”. J. Appl. Mech. 28(3):455–458, 1961. DOI 10.1115/1.3641728.
  • P. Moin, J. Kim. Numerical investigation of turbulent channel flow. JFM 118:341–377, 1982. DOI 10.1017/S0022112082001116 (Smagorinsky with Van Driest damping in a channel LES).
  • P.-E. Danielsson. Euclidean distance mapping. Comput. Graph. Image Process. 14(3):227–248, 1980. DOI 10.1016/0146-664X(80)90054-4 (vector propagation of the nearest wall point).
  • Method. The mixing length l = C Δ (1 − exp(−y⁺/A⁺)), A⁺ = 26, so the eddy viscosity vanishes like y⁺² at the wall instead of peaking there.
  • As implemented (crates/lbm/src/wall.rs, #664): opt-in (van_driest: A⁺). Each fluid cell with a no-slip bounce-back link takes the wall point halfway along it; the other cells take the nearest wall point by vector propagation over 26 neighbours (exact for plane walls). Before each collision each wall cell’s u_τ is solved from Spalding’s law (κ = 0.4, B = 5.5) with its speed parallel to the wall, relative to the wall, and its distance; every cell is damped with its wall point’s u_τ.
  • Limits. One wall point per cell (the nearest), the spreading does not cross periodic faces, and on coarse grids the first cell’s u_τ is only as good as Spalding’s law at its y⁺.

C5.4 Wall model: Malaspinas & Sagaut 2014’s first-node reconstruction, with Musker’s profile. Verdict: build on.

  • O. Malaspinas, P. Sagaut. Wall model for large-eddy simulation based on the lattice Boltzmann method. J. Comput. Phys. 275:25–40, 2014. DOI 10.1016/j.jcp.2014.06.020 (C5.2).
  • U. Piomelli, E. Balaras. Wall-layer models for large-eddy simulations. Annu. Rev. Fluid Mech. 34:349–374, 2002. DOI 10.1146/annurev.fluid.34.082901.144919.
  • S. Kawai, J. Larsson. Wall-modeling in large eddy simulation: length scales, grid resolution, and accuracy. Phys. Fluids 24:015105, 2012. DOI 10.1063/1.3678331 (where to sample the wall model’s velocity).
  • A. J. Musker. Explicit expression for the smooth wall velocity distribution in a turbulent boundary layer. AIAA J. 17(6):655–657, 1979. DOI 10.2514/3.61193 (the profile, with the constants Malaspinas & Sagaut print).
  • As implemented (crates/lbm/src/wall.rs, wall_model: "musker", #664): before each collision the second cell’s velocity gives u_τ through the wall law; the first cell’s velocity is set from the law, its density and regularised non-equilibrium stress come from its known populations (the unknown ones mirrored), all its populations are rebuilt, and it relaxes with ν plus a Van Driest mixing-length eddy viscosity (κ 0.384, A⁺ 26).
  • Deviations from the paper. The regularised or TRT collision where MRT (C2.1) is not chosen; moving walls taken relative to their velocity; the reported wall force is the bounce-back’s momentum exchange, not the modelled stress.
  • Reproduced (2026-10-27). The paper’s Re_τ 950 channel reproduces its Table 1 E within 8 % and its C_f by the model’s u_τ within 4.22 % of Dean, but the drag the flow carries is 14–17 % below Dean (docs/manual/fluid/les.md). The paper reports C_f from the model’s u_τ, which does not show this.
  • Earlier attempt, withdrawn. Imposing τ_w through the first cell’s own viscosity (ν_w = u_τ² y / U) went unstable on every channel grid at Re_τ 550 and 1000: it replaced the eddy viscosity that held those cells stable.

C5.5 Wall-modelled LES since 2012: imposing the stress, and the eddy viscosity below the matching height (survey 2026-10-27). Verdict: reference.

  • Why. Malaspinas & Sagaut (C5.4) impose a velocity on the first cell and carries 14–17 % too little drag. Imposing the stress closes that gap by construction, but in our runs the first two or three cells then come out slow and the skin friction moves with the matching height. The papers below are what the field does about each part.
  • Stress imposition in LBM.
    • H. Asmuth, C. F. Janßen, H. Olivares-Espinosa, S. Ivanell. Wall-modeled lattice Boltzmann large-eddy simulation of neutral atmospheric boundary layers. Phys. Fluids 33:105111, 2021. DOI 10.1063/5.0065701. A slip bounce-back that carries the modelled stress; the first node’s velocity is under-predicted at every resolution, and an SGS model whose ν_t vanishes at the wall gives large near-wall gradients, possibly reversed wall velocities.
    • Y. Kuwata, K. Suga. Wall-modeled large eddy simulation of turbulent heat transfer by the lattice Boltzmann method. J. Comput. Phys. 433:110186, 2021. DOI 10.1016/j.jcp.2021.110186. Specular reflection with a body force carrying the wall stress.
    • M. Han, R. Ooka, H. Kikumoto. A wall function approach in lattice Boltzmann method: algorithm and validation using turbulent channel flow. Fluid Dyn. Res. 53:045506, 2021. DOI 10.1088/1873-7005/ac1782. An on-node bounce-back whose diagonals into the fluid are the specular images of the incoming ones plus Spalding’s stress at the node one cell above (their eq. 14). The half cell’s body force (½ ρ a) goes to the wall: the term their momentum equation leaves unstated; the balance is S. B. Pope, Turbulent Flows, Cambridge University Press 2000, doi 10.1017/CBO9780511840531, the balance of mean forces. spalding_bounce implements eq. 14 as stated (CPU; crates/lbm/src/bounce.rs, the paper’s Table A-1 numbering mapped to ours by velocity vector). spalding_bounce_halfway (method two as run so far) is our halfway variant, not their scheme: the wall half a cell outside the outermost cells, specular reflection there, each wall cell’s own stress at half a cell taken off its inward diagonals after streaming; with the halfway variant their channel is not reproduced with their MRT at C_s 0.1 (docs/verification.md).
    • None of these reports the carried skin friction within 5 % on 20–30 cells per δ.
  • Wall law of the one-equation model.
    • P. R. Spalart, S. R. Allmaras. A one-equation turbulence model for aerodynamic flows. AIAA Paper 92-0439, 1992, DOI 10.2514/6.1992-439; La Recherche Aérospatiale 1:5–21, 1994. Its sections “Near-wall region, high Reynolds number” (c_w1 = c_b1/κ² + (1 + c_b2)/σ balances the log layer) and “Near-wall region, finite Reynolds number” (eqs. 7–9: χ = κ y⁺ and S̃ = u_τ/(κy) all the way to the wall, eq. 9 in equilibrium down to d = 0) make χ = κ y⁺ an exact solution of the steady equation in a constant-stress layer; spalart_allmaras_bounce (crates/lbm/src/sa_law.rs) takes that layer’s velocity profile, integrated in closed form, as the on-node wall’s law, and sets ν̃ = κ u_τ y at the first interior node.
  • Velocity imposition in LBM. A. Pasquali, M. Geier, M. Krafczyk, Near-wall treatment for the simulation of turbulent flow by the cumulant lattice Boltzmann method, Comput. Math. Appl. 79:195–212, 2020, DOI 10.1016/j.camwa.2017.11.022, and M. Haussmann et al., Comput. Math. Appl. 78:3285–3302, 2019, DOI 10.1016/j.camwa.2019.04.033, drive the channel with the model’s u_τ and normalise by it. Neither reports the carried drag beside it.
  • Removing the log-layer mismatch (finite volume).
    • Kawai & Larsson 2012 (C5.4): sample the wall model at the third cell or above, and converge by refining at fixed h/δ.
    • X. I. A. Yang, G. I. Park, P. Moin. Log-layer mismatch and modeling of the fluctuating wall stress in wall-modeled large-eddy simulations. Phys. Rev. Fluids 2:104601, 2017. DOI 10.1103/PhysRevFluids.2.104601. A time filter on the wall model’s input.
    • H. J. Bae, A. Lozano-Durán, S. T. Bose, P. Moin. Dynamic slip wall model for large-eddy simulation. J. Fluid Mech. 859:400–432, 2019. DOI 10.1017/jfm.2018.838. The SGS eddy viscosity kept non-zero at the wall.
    • R. DeLeon, I. Senocak. The role of bulk eddy-viscosity variation on the log-layer mismatch observed in wall-modeled large-eddy simulations. arXiv:1712.08035, 2017. A near-wall mixing length with the bulk held: C_f error from 14.1 % to 2.5 % at Re_τ 2000.
    • H.-C. Liu, C.-X. Xu, W.-X. Huang. A total-shear-stress-conserved wall model for large-eddy simulation of high-Reynolds number wall turbulence. arXiv:2411.12402, 2024 (preprint). The eddy viscosity in the first cells set from the total-stress balance; wall stress within 4 % of DNS for Re_τ 550–4200.
    • S. T. Bose, G. I. Park. Wall-modeled large-eddy simulation for complex turbulent flows. Annu. Rev. Fluid Mech. 50:535–561, 2018. DOI 10.1146/annurev-fluid-122316-045241. Review.
  • Common thread. Every approach that reaches the 5 % class gives the cells between the wall and the matching height a modelled stress that carries what the resolved field cannot.

C5.2 Malaspinas & Sagaut 2012, 2014 — consistent SGS and wall models. Verdict: reference (wall model later).

  • Consistent subgrid scale modelling for lattice Boltzmann methods. JFM 700:514–542, 2012. DOI 10.1017/jfm.2012.155.
  • Wall model for large-eddy simulation based on the lattice Boltzmann method. JCP 275:25–40, 2014. DOI 10.1016/j.jcp.2014.06.020.
  • Method. Derives the SGS closure consistently from the filtered LB equation; the wall model imposes a log-law (Musker profile) wall shear stress through a regularised BC at the first off-wall node.
  • Use. Wall-modelled LES is what makes industrial-Re external flow tractable; it comes after laminar validation.

C6. Memory layouts and GPU

C6.1 Bailey et al. 2009, AA pattern. Verdict: build on.

  • Citation. P. Bailey, J. Myre, S. D. C. Walsh, D. J. Lilja, M. O. Saar. Accelerating Lattice Boltzmann Fluid Flow Simulations Using Graphics Processors. ICPP 2009, 550–557. DOI 10.1109/ICPP.2009.38.
  • Method. One population array updated in place by alternating two kernels (even step: read/write own cell reversed; odd step: read/write neighbours), halving memory against the two-array (A–B) scheme with no extra traffic.
  • Limits. Even/odd steps have different index maps; boundaries must be written for both.

C6.2 Geier & Schönherr 2017, esoteric twist. Verdict: reference (alternative to AA).

  • Citation. Esoteric Twist: An Efficient in-Place Streaming Algorithmus for the Lattice Boltzmann Method on Massively Parallel Hardware. Computation 5(2):19, 2017. DOI 10.3390/computation5020019.
  • Method. In-place streaming with a single kernel by storing populations at “twisted” locations (each cell owns the populations pointing in negative directions of itself and its neighbours), with pointer swaps instead of alternating kernels; works on sparse/block grids.
  • Also. Lehmann 2022, Esoteric Pull and Esoteric Push, Computation 10(6):92, DOI 10.3390/computation10060092: simpler variants. The paper is open access and readable; its author’s code (FluidX3D) is non-commercial: FORBIDDEN.
  • Wittmann et al. 2013, Comparison of different propagation steps for lattice Boltzmann methods, Comput. Math. Appl. 65(6):924–935, DOI 10.1016/j.camwa.2012.05.002: measured comparison of A–B, AA, esoteric twist and others on CPUs. Reference.

C6.3 Tölke & Krafczyk 2008; Latt et al. 2021. Verdict: reference.

  • J. Tölke, M. Krafczyk. TeraFLOP computing on a desktop PC with GPUs for 3D CFD. Int. J. Comput. Fluid Dyn. 22(7):443–456, 2008. DOI 10.1080/10618560802238275. (DOI resolves; publisher page 403 to a script.)
  • J. Latt, C. Coreixas, J. Beny. Cross-platform programming model for many-core lattice Boltzmann simulations. PLoS ONE 16(4):e0250306, 2021. DOI 10.1371/journal.pone.0250306. Code STLBM: MIT, READ OK — the best readable reference for data layouts (AoS vs SoA, AA) with measured performance.
  • J. Latt et al. Palabos: Parallel Lattice Boltzmann Solver. Comput. Math. Appl. 81:334–350, 2021. DOI 10.1016/j.camwa.2020.03.022. Paper: read for architecture (block-structured multi-block, data processors). Code: AGPL, FORBIDDEN.

Cost model. LBM is memory-bound: a D3Q19 update moves 2 × 19 populations. In f32 that is 152 B/cell/step, so a 500 GB/s GPU tops out near 3 G cell-updates/s and a 50 GB/s CPU near 0.3 G (half in f64). Memory: AA-pattern D3Q19 f32 ≈ 80 B/cell (with flags): 10⁸ cells ≈ 8 GB. These numbers decide the GPU question (E3).

C7. Free-surface LBM

C7.1 Körner et al. 2005; Thürey 2007; Thürey & Rüde 2009. Verdict: reference (a later milestone).

  • C. Körner, M. Thies, T. Hofmann, N. Thürey, U. Rüde. Lattice Boltzmann Model for Free Surface Flow for Modeling Foaming. J. Stat. Phys. 121:179–196, 2005. DOI 10.1007/s10955-005-8879-8.
  • N. Thürey. Physically based animation of free surface flows with the lattice Boltzmann method. PhD thesis, FAU Erlangen-Nürnberg, 2007. PDF https://www10.cs.fau.de/publications/dissertations/Diss_2007-Thuerey.pdf (200, application/pdf; title page not machine-checked).
  • N. Thürey, U. Rüde. Stable free surface flows with the lattice Boltzmann method on adaptively coarsened grids. Comput. Vis. Sci. (Crossref issue year 2008; volume/pages not checked). DOI 10.1007/s00791-008-0090-4.
  • Method. Volume-of-fluid-like cell types (fluid, interface, gas) with a fill level; missing populations at the interface reconstructed from the gas pressure; mass exchange through links; cell conversion with flag propagation.
  • Solves. Sloshing, slamming, filling — the FSI cases engineers ask for with water.
  • Limits. Single-phase (gas pressure only); mass loss without care; many special cases in cell conversion.
  • Complexity. High.

C8. Validation cases

CaseReferenceExpected
Poiseuille channel/pipeanalyticparabolic profile; second-order convergence with halfway BB (TRT magic Λ gives exact steady result)
Couette, Womersleyanalyticlinear profile; Womersley oscillatory solution
Taylor–Green vortex (decay)analyticexp(−2νk²t) decay; measures viscosity and order
Lid-driven cavity Re 100–1000U. Ghia, K. N. Ghia, C. T. Shin, JCP 48(3):387–411, 1982, DOI 10.1016/0021-9991(82)90058-4published numerical reference values (not analytic: owner decision, same as Taylor bar)
Flow past a cylinder 2D-1/2D-2/3DM. Schäfer, S. Turek, Benchmark computations of laminar flow around a cylinder, NNFM 52:547–566, 1996, DOI 10.1007/978-3-322-89849-4_39; LBM results: J. Geller et al., Comput. Fluids 35:888–897, 2006, DOI 10.1016/j.compfluid.2005.08.009drag/lift coefficient intervals and Strouhal number given by the benchmark (published numerical reference)
Sphere Stokes draganalyticF = 6πμRU (with confinement correction)
Differentially heated cavity Ra 10³–10⁶G. de Vahl Davis, Natural convection of air in a square cavity: a bench mark numerical solution, Int. J. Numer. Meth. Fluids 3:249–264, 1983hot-wall Nusselt numbers (published numerical reference)
Cavity with a centred conducting body (conjugate)J. M. House, C. Beckermann, T. F. Smith, Effect of a centered conducting body on natural convection heat transfer in an enclosure, Numer. Heat Transfer A 18(2):213–225, 1990, DOI 10.1080/10407789008944791hot-wall Nusselt numbers at Ra 10⁵ for conductivity ratios 0.2, 1, 5, and the conduction limit (Table 3; published numerical reference)
Vented cavity with a passive conducting cylinder (conjugate, curved interface)M. M. Rahman, M. A. Alim, S. Saha, M. K. Chowdhury, Mixed Convection in a Vented Square Cavity with a Heat Conducting Horizontal Solid Circular Cylinder, J. Naval Architecture and Marine Engineering 5(2):37–46, 2008, DOI 10.3329/jname.v5i2.2504heated right-wall mean Nu at Re = 100, Pr = 0.71, Ri = 1, D/L = 0.2 and ks/kf = 5 (Table 1; published numerical reference); short slot passages are an explicit model difference, and the mean-temperature integration domain is ambiguous
Square array of cylinders, conduction (conjugate, curved interfaces)W. T. Perrins, D. R. McKenzie, R. C. McPhedran, Transport properties of regular arrays of cylinders, Proc. R. Soc. Lond. A 369:207–225, 1979; the coefficients from the lattice sums of Y. A. Godin, J. Math. Phys. 53:063703, 2012effective conductivity series at a given area fraction (analytic, truncated series); Keller’s reciprocity k(κ) k(1/κ) = 1

C9. Heat: the scalar lattice and conjugate heat transfer, as implemented

  • Temperature lattice. D3Q7 passive scalar on the flow’s links, equilibrium linear in u (T. Krüger et al., The Lattice Boltzmann Method: Principles and Practice, Springer 2017, ch. 8), two relaxation times with Λ_T fixed (I. Ginzburg, Adv. Water Resour. 28:1171, 2005: the antisymmetric rate sets the diffusivity, and with Λ_T fixed the steady solution and its anti-bounce-back walls do not depend on it; #629); its velocity-dependent numerical diffusion −(τ_T − ½) u² (B. Chopard, J.-L. Falcone, J. Latt, Eur. Phys. J. Special Topics 171:245–249, 2009) bounds the lattice speed of a heat problem. Held temperatures by anti-bounce-back, fluxes added to the bounced population.
  • Conduction in solids. Cell-centred finite volumes on the lattice’s cells with the harmonic mean of the two cells’ conductivities on each face (S. V. Patankar, Numerical Heat Transfer and Fluid Flow, Hemisphere 1980, ch. 4), explicit and sub-cycled under its stability limit (fieldcraft_lbm::conduction).
  • Fluid–solid interface. Each scalar link into a conducting cell is an anti-bounce-back at the temperature that equalises the conductive fluxes of the two half cells, and the heat it takes is given to the solid cell: continuity of temperature and flux with heat conserved to round-off. The link’s heat is affine in the solid’s temperature, so the solid takes it point-implicitly (an explicit link needs Σ 2 w_q k_s / (k_s + k_f) < ρ c / (ρ c)_f, which a corner cell of aluminium in water breaks). Interface conditions for the thermal lattice equation, conjugate ones among them: L. Li, R. Mei, J. F. Klausner, Boundary conditions for thermal lattice Boltzmann equation method, J. Comput. Phys. 237:366–395, 2013.
  • Thermal contacts. A paste, pad or gap filler between two conducting solids is not resolved: its resistance per area adds in series with the two half cells on every face between the bodies’ cells, g = 1 / (1/(2 k_a) + 1/(2 k_b) + R (ρ c)_f Δx / Δt) in lattice units (the contact resistance of a composite wall’s series circuit: F. P. Incropera, D. P. DeWitt, T. L. Bergman, A. S. Lavine, Fundamentals of Heat and Mass Transfer, 7th ed., Wiley 2011, §3.1.4). Both cells see the same conductance, so heat is conserved, and a resistance only lowers it, so the sub-cycling limit holds. Between a solid and the fluid there is none yet.
  • Thin walls. A zero-thickness sheet on a lattice face: halfway bounce-back on each side for the flow (C3.1), and on the scalar lattice an anti-bounce-back on each side whose two surface temperatures obey Fourier’s law through the sheet’s conductance G (the same series circuit, Incropera et al. §3.1): the two crossing populations exchange H = (a − b) G / (G + 1/8), conserved face by face and unconditionally stable (fieldcraft_lbm::baffle; #836).
  • Limits. Staircase interfaces (cell faces, not the true surface): curved interfaces lose accuracy, which cut cells with the flux on the true surface recover; a steady run scales the solids’ heat capacity, so its transient is not physical.
  • Melting and freezing. The total-enthalpy lattice of R. Huang, H. Wu, P. Cheng, A new lattice Boltzmann model for solid–liquid phase change, Int. J. Heat Mass Transfer 59:295–301, 2013: the scalar lattice carries E = T + (L/c) f_l, its rest equilibrium shifted by E − T, so the latent heat needs no source term and no iteration (the enthalpy method, V. R. Voller, Numer. Heat Transfer B 17:155, 1990). The flow stops in frozen cells by the enthalpy–porosity Carman–Kozeny resistance of V. R. Voller, C. Prakash, Int. J. Heat Mass Transfer 30:1709, 1987, taken implicitly as Guo and Zhao’s porous force. Verified against Neumann’s two-phase Stefan solution (H. S. Carslaw, J. C. Jaeger, Conduction of Heat in Solids, 2nd ed., 1959, §11.2). The front is diffuse over a cell, so the flow along it converges at first order; an immersed or partial bounce-back front (Huang & Wu, J. Comput. Phys. 294:346, 2015) would sharpen it.

C10. Shear-dependent (generalised Newtonian) viscosity, as implemented

Verdict: built on the CPU (crates/lbm/src/rheology.rs, the models in fieldcraft_model::Fluid, #156); the GPU, turbulence models and porous zones refuse it for now.

  • Local shear rate. The non-equilibrium momentum flux carries the strain rate, P ≈ −2 ρ c_s² τ S (Krüger et al. 2017, C1.2, §4.1 and §6.3), so γ̇ = |P| / (√2 ρ c_s² τ) with no finite differences. J. Boyd, J. Buick, S. Green. A second-order accurate lattice Boltzmann non-Newtonian flow model. J. Phys. A: Math. Gen. 39(46):14241–14247, 2006. DOI 10.1088/0305-4470/39/46/001: the shear rate from the same moments, second order in power-law channel flow.
  • Bounded relaxation time. S. Gabbanelli, G. Drazer, J. Koplik. Lattice Boltzmann method for non-Newtonian (power-law) fluids. PRE 72:046312, 2005. DOI 10.1103/PhysRevE.72.046312: τ held within a stable range (a shear-thinning fluid at rest otherwise reaches an unbounded viscosity). We hold each cell’s τ⁺ in [0.505, 5], count the clamped cells and report them; a fluid floored at every shear rate is refused.
  • The cell’s τ. τ and γ̇ depend on each other, but σ = τ γ̇ = 3 |P| / (√2 ρ) is known, so each cell solves τ − ½ − 3 ν(σ/τ) = 0, which has one root because the shear stress η(γ̇) γ̇ grows with γ̇ for every model here. Regula falsi with the Illinois modification, bracketed by the τ range and capped at 64 iterations: M. Dowell, P. Jarratt. A modified regula falsi method for computing the root of an equation. BIT 11(2):168–174, 1971. DOI 10.1007/BF01934364. With a constant viscosity the first step lands on the Newtonian τ, so the Newtonian limits match the Newtonian solver bit for bit.
  • Models. Power law; Carreau–Yasuda (P. J. Carreau, Trans. Soc. Rheol. 16(1):99–127, 1972, DOI 10.1122/1.549276; K. Yasuda, R. C. Armstrong, R. E. Cohen, Rheol. Acta 20:163–178, 1981, DOI 10.1007/BF01513059); Cross (M. M. Cross, J. Colloid Sci. 20(5):417–437, 1965, DOI 10.1016/0095-8522(65)90022-X); Cross-WLF for polymer melts, which reads each cell’s temperature from the scalar lattice: C. A. Hieber, S. F. Shen. A finite-element/finite-difference simulation of the injection-molding filling process. J. Non-Newtonian Fluid Mech. 7(1):1–32, 1980. DOI 10.1016/0377-0257(80)85012-9, with the shift of M. L. Williams, R. F. Landel, J. D. Ferry, J. Am. Chem. Soc. 77(14):3701–3707, 1955. DOI 10.1021/ja01619a008. The closed form of power-law Poiseuille flow: R. B. Bird, R. C. Armstrong, O. Hassager, Dynamics of Polymeric Liquids vol. 1, 2nd ed., Wiley 1987, ch. 4.
  • Verification. Theory only so far: power-law Poiseuille flow against its closed form (n = 0.5 and 1.5, tests/oracle/power-law-poiseuille-*), the Newtonian limits and Carreau–Yasuda’s plateaus. A published benchmark or experiment with tabulated channel or pipe data is still open.

Part D: Fluid–structure interaction

D1. Immersed boundary

D1.1 Peskin 2002. Verdict: build on.

  • Citation. C. S. Peskin. The immersed boundary method. Acta Numerica 11:479–517, 2002. DOI 10.1017/S0962492902000077.
  • Method. The structure is a Lagrangian set of points on a fixed Eulerian fluid grid; regularised delta functions (2-, 3-, 4-point kernels with stated moment conditions) spread structure forces to the grid and interpolate fluid velocity back. No body-fitted fluid mesh, so arbitrarily large motion is free.
  • Limits. The interface is smeared over ~2 cells (first-order near the wall); force is computed from the structure’s constitutive law (classic) which brings a stiff time-step restriction for stiff structures.
  • Code. IBAMR (BSD-3-style): READ OK. IB2d (GPL-3.0): FORBIDDEN.

D1.2 Mittal & Iaccarino 2005; Uhlmann 2005. Verdict: reference / build on.

  • R. Mittal, G. Iaccarino. Immersed boundary methods. Annu. Rev. Fluid Mech. 37:239–261, 2005. DOI 10.1146/annurev.fluid.37.061903.175743. (Review: continuous vs discrete forcing, sharp-interface methods.)
  • M. Uhlmann. An immersed boundary method with direct forcing for the simulation of particulate flows. JCP 209(2):448–476, 2005. DOI 10.1016/j.jcp.2005.03.017. Direct forcing: the force is whatever makes the interpolated fluid velocity equal the structure velocity, so no stiff spring. Build on.

D1.3 Feng & Michaelides 2004; Wu & Shu 2009 — IB-LBM. Verdict: build on (Wu–Shu).

  • Z.-G. Feng, E. E. Michaelides. The immersed boundary-lattice Boltzmann method for solving fluid–particles interaction problems. JCP 195(2):602–628, 2004. DOI 10.1016/j.jcp.2003.10.013.
  • J. Wu, C. Shu. Implicit velocity correction-based immersed boundary-lattice Boltzmann method and its applications. JCP 228(6):1963–1979, 2009. DOI 10.1016/j.jcp.2008.11.019.
  • Method. Feng–Michaelides: penalty (feedback) forcing in LBM via a body-force term. Wu–Shu: treat the velocity correction at all Lagrangian points implicitly — one small linear system per step (matrix of delta-kernel overlaps) — so the no-slip condition is satisfied exactly at the markers with no penetration.
  • Limits. Wu–Shu solves a dense-ish system in the number of markers each step (factor once for rigid bodies, re-solve for deforming ones; use CG). Smeared interface, so wall shear is first-order.

D1.4 Momentum-exchange bounce-back for moving bodies (Ladd C3.1, Bouzidi C3.2) is the sharp-interface alternative to IB in LBM: cells are uncovered/covered as the body moves (refill rule needed). Verdict: reference — IB is simpler with a deforming FE surface; bounce-back is better for rigid or slowly deforming walls.

D2. LBM coupled to finite elements

D2.1 Kollmannsberger et al. 2009. Verdict: reference. S. Kollmannsberger, S. Geller, A. Düster, J. Tölke, C. Sorger, M. Krafczyk, E. Rank. Fixed-grid fluid–structure interaction in two dimensions based on a partitioned Lattice Boltzmann and p-FEM approach. IJNME 79(7):817–845, 2009. DOI 10.1002/nme.2581. Partitioned implicit coupling (structure solved implicitly with high-order p-FEM) with interpolated bounce-back on a fixed LBM grid; includes Turek–Hron-type validation.

D2.2 De Rosis et al. 2013/2014. Verdict: reference. A. De Rosis, G. Falcucci, S. Ubertini, F. Ubertini. A coupled lattice Boltzmann-finite element approach for two-dimensional fluid–structure interaction. Comput. Fluids 86:558–568, 2013. DOI 10.1016/j.compfluid.2013.08.004. Explicit-in-time staggered LBM–FE coupling for flexible plates.

D2.3 Li & Favier 2017. Verdict: build on (closest to our design). Z. Li, J. Favier. A non-staggered coupling of finite element and lattice Boltzmann methods via an immersed boundary scheme for fluid-structure interaction. Comput. Fluids 143:90–102, 2017. DOI 10.1016/j.compfluid.2016.11.008. IB-LBM fluid coupled to a nonlinear FE structure with synchronous time stepping; validated on flexible-flag benchmarks.

D2.4 Owen, Leonardi, Feng 2011. Verdict: reference. IJNME 87(1–5):66–95, 2011 (online 2010). DOI 10.1002/nme.2985. LBM with immersed moving boundaries (partial-volume bounce-back) coupled to explicit discrete/finite elements — evidence that explicit structure + LBM with subcycling works.

D3. Partitioned coupling and stability

D3.1 Causin, Gerbeau, Nobile 2005, added mass. Verdict: build on (as the design constraint).

  • Citation. P. Causin, J.-F. Gerbeau, F. Nobile. Added-mass effect in the design of partitioned algorithms for fluid–structure problems. CMAME 194(42–44):4506–4527, 2005. DOI 10.1016/j.cma.2004.12.005.
  • Result. For incompressible flow, explicit (loosely coupled) partitioned schemes are unconditionally unstable when the structure-to-fluid mass ratio falls below a geometry-dependent threshold — and refining Δt makes it worse. Strongly coupled (iterated) schemes converge only with relaxation whose required strength grows as the mass ratio drops.
  • Consequence. Light structures in water (membranes, valves, Turek–Hron FSI3 with ρ_s/ρ_f = 1) need strong coupling with IQN (D3.3). Heavy structures (steel plates in water, anything in air) work loosely coupled.
  • Also: C. Förster, W. A. Wall, E. Ramm, CMAME 196(7):1278–1293, 2007, DOI 10.1016/j.cma.2006.09.002 — the same instability for sequential staggered coupling, and why predictors don’t cure it. Reference.
  • Serino, Banks, Henshaw, Schwendeman 2019, A stable added-mass partitioned (AMP) algorithm for elastic solids and incompressible flow, JCP 399:108923, DOI 10.1016/j.jcp.2019.108923: Robin-type interface conditions derived from the solid’s characteristics give a stable loosely coupled scheme even for light solids. Reference (research; promising for explicit solids, whose characteristic impedance is cheap).

D3.2 Küttler & Wall 2008, Aitken relaxation. Verdict: build on (first strong coupling).

  • Citation. U. Küttler, W. A. Wall. Fixed-point fluid–structure interaction solvers with dynamic relaxation. Comput. Mech. 43:61–72, 2008. DOI 10.1007/s00466-008-0255-5.
  • Method. Fixed-point (Dirichlet–Neumann) iteration on the interface displacement with Aitken’s Δ² dynamic relaxation factor computed from the last two residuals; also steepest-descent variants.
  • Limits. Convergence degrades with strong added mass; still the cheapest robust starting point.
  • Complexity. Low (≈100 lines).
  • Code. 4C (LGPL-3.0): FORBIDDEN.

D3.3 Degroote, Bathe, Vierendeels 2009, IQN-ILS. Verdict: build on (production strong coupling).

  • Citation. J. Degroote, K.-J. Bathe, J. Vierendeels. Performance of a new partitioned procedure versus a monolithic procedure in fluid–structure interaction. Comput. Struct. 87(11–12):793–801, 2009. DOI 10.1016/j.compstruc.2008.11.013.
  • Method. Interface quasi-Newton with an approximate inverse Jacobian from least squares on the differences of previous residuals and outputs (black-box: needs only the two solvers’ input/output); within ~5–10 iterations even for strong added mass; competitive with monolithic.
  • Limits. The least-squares system becomes ill-conditioned as columns accumulate: filter (Haelterman et al. 2016, Comput. Struct. 171:9–17, DOI 10.1016/j.compstruc.2016.04.001, build on) and reuse columns from earlier steps with care.
  • Complexity. Low–moderate (QR updates on a tall skinny matrix).
  • Code. preCICE (LGPL-3.0) FORBIDDEN; Kratos core (BSD-style) READ OK — check the CoSimulation application’s own licence file first.

D3.4 Farhat et al. 2010, explicit–explicit staggered for compressible FSI. Verdict: reference (the explicit–explicit path).

  • Citation. C. Farhat, A. Rallu, K. Wang, T. Belytschko. Robust and provably second-order explicit–explicit and implicit–explicit staggered time-integrators for highly non-linear compressible fluid–structure interaction problems. IJNME 84(1):73–107, 2010. DOI 10.1002/nme.2883.
  • Method. Staggered schemes with a carefully placed fluid/structure time offset that are second-order and stable for compressible flow + explicit structure (the added-mass problem is far milder for compressible fluids).
  • Use. LBM is a weakly compressible explicit scheme; this is the closest analysis for explicit LBM + explicit FE.

D4. ALE

D4.1 Donea et al. 2004; Hughes, Liu, Zimmermann 1981. Verdict: reference (not first).

  • J. Donea, A. Huerta, J.-Ph. Ponthot, A. Rodríguez-Ferran. Arbitrary Lagrangian–Eulerian methods. Encyclopedia of Computational Mechanics, Wiley 2004. DOI 10.1002/0470091355.ecm009.
  • T. J. R. Hughes, W. K. Liu, T. K. Zimmermann. Lagrangian-Eulerian finite element formulation for incompressible viscous flows. CMAME 29(3):329–349, 1981. DOI 10.1016/0045-7825(81)90049-9.
  • Method. The mesh moves with an arbitrary velocity: Lagrangian at the FSI interface, Eulerian far away, with mesh smoothing and the convective term relative to mesh motion; geometric conservation law.
  • Why not first. LBM is fixed-grid; ALE needs a body-fitted, moving fluid mesh and a FV/FE fluid solver. ALE in the explicit solver (A9.3) is a different use (multi-material hydro) and comes after Lagrangian.

D5. Interface data transfer

D5.1 de Boer, van Zuijlen, Bijl 2007; Farhat, Lesoinne, Le Tallec 1998. Verdict: build on.

  • A. de Boer, A. H. van Zuijlen, H. Bijl. Review of coupling methods for non-matching meshes. CMAME 196(8):1515–1525, 2007. DOI 10.1016/j.cma.2006.03.017.
  • C. Farhat, M. Lesoinne, P. Le Tallec. Load and motion transfer algorithms for fluid/structure interaction problems with non-matching discrete interfaces. CMAME 157(1–2):95–114, 1998. DOI 10.1016/S0045-7825(97)00216-8.
  • Method. Nearest neighbour, nearest projection (project each fluid point onto the structural surface and use the element’s shape functions), and RBF; conservative transfer: if displacements map with H (u_f = H u_s) then forces map with Hᵀ (f_s = Hᵀ f_f), which conserves energy over the interface.
  • Use. With IB-LBM the Lagrangian markers are the structural surface nodes (or quadrature points of its faces), so mapping reduces to the IB kernel plus Hᵀ. Projection mapping is needed only for body-fitted coupling.

D5.2 Beckert & Wendland 2001, RBF. Verdict: reference (needed only for non-IB couplings). Aerosp. Sci. Technol. 5(2):125–134, 2001. DOI 10.1016/S1270-9638(00)01087-7. Compactly supported Wendland RBF interpolation for mesh-free interface mapping.

D6. Verification

CaseReferenceExpected
Turek–Hron FSI1/FSI2/FSI3S. Turek, J. Hron, Proposal for numerical benchmarking of fluid-structure interaction between an elastic object and laminar incompressible flow, in Fluid-Structure Interaction, LNCSE 53:371–385, Springer 2006, DOI 10.1007/3-540-34596-5_15Tip displacement amplitude/frequency, drag/lift (published numerical reference values). FSI1 steady; FSI2 large periodic motion (ρ_s/ρ_f = 10); FSI3 strong added mass (ρ_s/ρ_f = 1) — the IQN test.
Rigid cylinder in a fluid, added-mass coefficientpotential flow (analytic)C_a = 1 for a circular cylinder; tests the coupling’s inertia, not just loads
1D piston / elastic slab on a fluid columnanalyticlinear acoustic–structure solution; checks energy conservation of the transfer
Sphere settling (terminal velocity, Stokes regime)analyticU = 2(ρ_s − ρ_f) g R² / (9μ) with wall correction

Part E: Alternatives and GPU compute

E1. Finite-volume CFD (SIMPLE/PISO). Verdict: reference (not first).

  • S. V. Patankar, D. B. Spalding. A calculation procedure for heat, mass and momentum transfer in three-dimensional parabolic flows. Int. J. Heat Mass Transf. 15(10):1787–1806, 1972. DOI 10.1016/0017-9310(72)90054-3.
  • R. I. Issa. Solution of the implicitly discretised fluid flow equations by operator-splitting. JCP 62(1):40–65, 1986. DOI 10.1016/0021-9991(86)90099-9.
  • C. M. Rhie, W. L. Chow. AIAA J. 21(11):1525–1532, 1983. DOI 10.2514/3.8284. (Collocated-grid pressure–velocity coupling.)
  • J. H. Ferziger, M. Perić, R. L. Street. Computational Methods for Fluid Dynamics, 4th ed., Springer 2020. DOI 10.1007/978-3-319-99693-6.
  • Why LBM first anyway. FV needs a body-fitted (polyhedral or hex-dominant) fluid mesh, a pressure Poisson solve (algebraic multigrid in pure Rust: real work) and turbulence-model wall functions tuned to y+; its robustness lives in the mesh quality, which is exactly what our meshers will be judged on. LBM needs only a voxel/octree grid from the surface (no fluid volume mesh to fail), is explicit and local (trivially parallel, GPU-friendly, wasm-friendly), and its FSI with IB needs no mesh motion. LBM is the right first fluid solver for incompressible, low-Mach, transient flow around complex geometry. FV is the right choice for steady RANS at high Re, compressible high-Mach flow and heat transfer with conjugate solids, none of which LBM does well. If wrong: if owners mostly want steady internal flows with pressure drop at high Re (pipes, manifolds), LBM spends hours of transient time-stepping to reach a steady state that a SIMPLE solver reaches in minutes; that is the trigger to add FV.

E2. SPH for fluids and impact. Verdict: reference (a later, separate path for fragmentation and blast).

  • J. J. Monaghan. Smoothed particle hydrodynamics. Rep. Prog. Phys. 68(8):1703–1759, 2005. DOI 10.1088/0034-4885/68/8/R01.
  • L. D. Libersky, A. G. Petschek, T. C. Carney, J. R. Hipp, F. A. Allahdadi. High Strain Lagrangian Hydrodynamics. JCP 109(1):67–75, 1993. DOI 10.1006/jcph.1993.1199. (SPH with material strength.)
  • J. W. Swegle, D. L. Hicks, S. W. Attaway. Smoothed Particle Hydrodynamics Stability Analysis. JCP 116(1):123–134, 1995. DOI 10.1006/jcph.1995.1010. (The tensile instability.)
  • G. R. Johnson, R. A. Stryk, S. R. Beissel. SPH for high velocity impact computations. CMAME 139:347–373, 1996. DOI 10.1016/S0045-7825(96)01089-4.
  • S. W. Attaway, M. W. Heinstein, J. W. Swegle. Coupling of smooth particle hydrodynamics with the finite element method. Nucl. Eng. Des. 150:199–205, 1994. DOI 10.1016/0029-5493(94)90136-8.
  • C. Antoci, M. Gallati, S. Sibilla. Numerical simulation of fluid–structure interaction by SPH. Comput. Struct. 85(11–14):879–890, 2007. DOI 10.1016/j.compstruc.2007.01.002.
  • Assessment. SPH shares the explicit solver’s whole stack (time step, EOS, Johnson–Cook, artificial viscosity, contact via the same penalty), so it slots into fieldcraft-explicit as another discretisation — the natural home for hypervelocity impact, fragmentation and blast with JWL, which LBM cannot do. As a general fluid solver it is noisy (pressure), needs many particles for accuracy and has the tensile instability; LBM beats it for viscous low-Mach flow. Code: SPHinXsys (Apache-2.0), SPlisHSPlasH (MIT), PySPH (BSD-3-style), Cabana (BSD-3): READ OK; DualSPHysics (LGPL-2.1): FORBIDDEN.

E3. GPU compute in pure Rust. Verdict: CPU first for both solvers; wgpu compute for LBM second; explicit FE on GPU only on evidence.

  • Stack. wgpu (MIT OR Apache-2.0) compute pipelines with WGSL shaders. The API we call is safe Rust, so unsafe_code = "forbid" in our crates holds (wgpu’s own internals use unsafe, as every dependency on the OS does). rust-gpu (Rust → SPIR-V) would let kernels be written in Rust, but it needs a pinned nightly toolchain to build shaders: reject for now, revisit when it builds on stable.
  • Precision. WGSL (https://www.w3.org/TR/WGSL/, 200) has no f64 type; wgpu exposes Features::SHADER_F64 (https://docs.rs/wgpu/latest/wgpu/struct.Features.html, 200) only on native backends that support it, and not on Metal or the browser. So GPU kernels are f32. For LBM that is standard (store f_i − w_i to recover precision). For explicit FE, f32 is workable for stresses and velocities (single precision is common in explicit codes) but coordinates/displacements over long runs need f64 accumulation; that rules out a naive GPU port.
  • Layering. xtask/src/layers.rs lists wgpu in UI_CRATES: nothing below L5 may depend on it. A GPU backend therefore needs either an owner decision to allow wgpu in a dedicated compute crate below L5 (headless compute is not UI), or a fieldcraft-gpu crate at L5 that implements a backend trait the L1 solver crates define. I recommend the second (no rule change): the solver crate defines a LatticeBackend trait and a CPU implementation; the GPU implementation lives at L5. Owner decision either way.
  • Determinism. The project requires bit-identical output on every platform. GPU f32 results differ from CPU and between vendors (FMA contraction, transcendental precision). LBM kernels are per-cell with no reductions, so a GPU run is deterministic on one device, but not equal to the CPU. Explicit FE assembly on GPU needs scatter-add with float atomics, which is order-dependent (non-deterministic even on one device) unless assembly is a gather over a node-to-element list. The rule needs an explicit exception: CPU path is the bit-identical reference; GPU results are deterministic per device and verified against CPU to a tolerance. Owner decision.
  • CPU parallelism. rayon (MIT OR Apache-2.0) over cell blocks (LBM) and element blocks with a deterministic gather assembly (explicit FE) is deterministic by construction. On wasm32-unknown-unknown there are no threads by default: rayon must be behind a feature, with a serial fallback (same results).
  • Browser. WebGPU’s default limits (128 MiB per storage binding, 256 MiB per buffer, unless the adapter grants more) cap a browser LBM domain at roughly 1.5 M D3Q19 cells per buffer unless populations are split across buffers. Fine for demos, not for production. (limits from memory of the WebGPU spec; check the adapter’s reported limits at run time, never assume)
  • Feasibility verdict. LBM on wgpu: high feasibility, 10–30× over a multi-core CPU on a discrete GPU since it is bandwidth-bound and kernels are simple. Explicit FE on wgpu: feasible for hex8 one-point + J2 (a single kernel) but contact search, erosion and shells make it a large porting effort; LS-DYNA-class codes remain CPU/MPI-first for good reasons. Do it last, and only if profiling shows the element loop dominates.

Part F: Plan (opinionated)

F1. Strategic call

Build explicit FE first, LBM second, FSI third. Explicit FE reuses the M6 element and material work, runs on the tet meshes M2 produces (Bonet–Burton) before hexes exist, writes the same LS-DYNA keyword concepts M5 targets, and its verification is analytic. LBM is independent of everything except the octree (M3) and is the best place to spend GPU effort. FSI needs both to be verified first; a coupling bug on top of an unverified solver is undiagnosable.

One correction to the brief: LBM + EOS is not a pairing. LBM is a weakly compressible, low-Mach method; EOS matters for shocks, detonations and blast, which LBM cannot represent. EOS-driven fluids (water under underwater explosion, detonation products, air blast) belong to the explicit solver (Lagrangian first, then ALE/Eulerian per Benson 1992 or SPH). The LBM–explicit FSI covers low-Mach problems: flexible structures in flow, valves, sloshing, slamming with free-surface LBM. If the owner’s motivating use cases are blast/impact on structures, the order changes: explicit FE → EOS → SPH or ALE multi-material, and LBM drops a step.

F2. Crate layout

Current layers: L0 model → L1 geometry, mesh, solver, decks, render → L2 doc → L3 io → L4 engine → L5. Implicit and explicit share element kinematics (shape functions, quadrature, B-matrices, hex8/tet4/quad4), materials (elastic, J2, Johnson–Cook) and EOS. Two L1 crates cannot depend on each other, and FSI depends on both solvers. So:

LayerCrateContents
L0fieldcraft-model+ materials, EOS, sections/formulations, explicit and fluid steps, contact, fluid domains, coupling interfaces (F3)
L1fieldcraft-fem (new)element kernels (shape functions, quadrature, B/B-bar, one-point hex with FB hourglass and Belytschko–Bindeman stabilisation, Bonet–Burton tet, BLT shell), constitutive updates (hypoelastic, objective rates, J2 radial return, Johnson–Cook, damage), EOS evaluation. Pure functions over model types; no solver loop.
L2fieldcraft-lbm (new)lattices, collision operators, BCs, voxelisation from the face-tagged surface and the octree from mesh*, stepping on CPU, momentum-exchange forces, IB kernels; a backend trait for GPU
L2fieldcraft-solver (moved up from L1)implicit linear static/modal (M6), later nonlinear implicit; uses fem
L2fieldcraft-explicit (new)central-difference driver, time step, mass scaling, q, contact (search + penalty), erosion, energy accounting, output; uses fem (and later SPH)
L3fieldcraft-fsi (new)IB coupling, interface mapping, Aitken/IQN-ILS, subcycling, coupled step driver; uses explicit, solver, lbm
L4…doc, io, engine, then L5+ shifts up by tworesults (time histories, field frames) in doc/io
L5+fieldcraft-gpu (new, with the UI layer or an owner-approved compute layer)wgpu implementations of the solver backend traits

* fieldcraft-lbm needs the octree and predicates from fieldcraft-mesh (L1), so it sits at L2. lbm at L2 next to solver and explicit (it may then use mesh’s octree and predicates), and fem at L1. That is one coherent rule: L1 = geometry and math kernels, L2 = solvers, L3 = coupling.

Cost of this being wrong: renumbering the layer table is a mechanical edit to xtask/src/layers.rs and docs/architecture.md; the risk is churn, not breakage. The alternative (one fieldcraft-solver crate with implicit/explicit/lbm/fsi modules) needs no layer change, but a 50k-line crate compiles slowly and lets the LBM depend on FE internals by accident. If the owner prefers no renumbering, take the single-crate option and enforce module boundaries with pub(crate) discipline. This layout change is an owner decision.

F3. Solver-neutral model extensions in fieldcraft-model

  • Materials (named, unit-consistent, no product numbering): density; isotropic elastic; J2 plasticity with isotropic/kinematic hardening (bilinear, power law, table); Johnson–Cook strength (A, B, n, C, m, ε̇₀, T_room, T_melt, specific heat, Taylor–Quinney); damage (JC D1–D5); failure/erosion criteria; Newtonian fluid (ρ, μ).
  • EOS as a separate attachable record: ideal_gas{γ}, polynomial{c0..c6}, mie_gruneisen{c0, s1[,s2,s3], γ0, a}, jwl{A, B, R1, R2, ω, e0, D, p_cj}, tillotson{…}, tabulated{…}; a material with an EOS takes its pressure from it and only the deviatoric part from the strength model.
  • Sections / formulations: solid formulation enum (one_point_hourglass{kind, coeff}, assumed_strain, selective_reduced, full, nodal_pressure_tet), shell sections (thickness, integration points, BLT/Hughes–Liu).
  • Steps: explicit_dynamic{end_time, dt_scale (default 0.9), mass_scaling: none | target_dt, output_interval}, fluid{end_time or steps, lattice, collision, les}, coupled{explicit/implicit structure, fluid, scheme: loose | aitken | iqn_ils, tolerances, max_iters}. Every iterative or time-marching step carries caps (max steps, max iterations, max cells) per the never-crash rules.
  • Loads/conditions: initial velocity, prescribed motion, rigid walls, gravity, detonation points with lighting times.
  • Contact: surface pairs and self-contact on face sets, penalty scale, friction, search interval.
  • Fluid domain: bounding box, base spacing, refinement regions (by distance to named faces), boundary conditions on box faces (velocity inlet, pressure outlet, slip/no-slip) and on named geometry faces (wall, moving wall); fluid material.
  • Coupling interface: named structural face set ↔ fluid domain.
  • Output requests: history (energies, reaction forces, contact forces, probe points) and field frames.

All of these must map to the LS-DYNA keyword and Abaqus input concepts M5 writes, described in our own words.

F4. Milestones

#MilestoneNeeds from meshingVerification (analytic first)
X0fieldcraft-fem extraction with M6: hex8/tet4 kinematics, elastic and J2 updates, shared with the implicit solverM2 tets, generated boxespatch tests, J2 uniaxial curve, rigid rotation
X1Explicit core: central difference, lumped mass, element Δt (FB 1984), one-point hex8 + FB hourglass, Bonet–Burton tet4, artificial viscosity, energy accounting, prescribed BCs, initial velocity, history outputstructured hex8 boxes generated in code (no M3 needed), M2 tetsbar wave (front position and amplitude), bar–rigid wall contact time 2L/c, energy balance, cantilever period vs M6 modal
X2Large deformation materials: Hughes–Winget Jaumann, Flanagan–Taylor Green–Naghdi, J2 radial return, Johnson–Cook strength + damage, erosionsameDienes simple shear (both rates, closed form), Taylor bar (Taylor 1948 analytic estimate; experimental comparison only if the owner allows)
X3Contact: BVH global search, node-to-segment penalty two-pass + friction, pinball for eroding surfaces, rigid wallssurface extraction of volume meshes (have it)two bars colliding (momentum exchange, analytic), block sliding with friction on a slope (analytic), Hertz sphere-on-plane at low speed (analytic contact time and force)
X4EOS: polynomial, ideal gas, Mie–Grüneisen, JWL + programmed burn, energy couplinghex8 strongly preferred (tets smear shocks) — M3 octree hex1D shock in Mie–Grüneisen material vs Rankine–Hugoniot with U_s = c0 + s u_p, Sod, Noh, Sedov (Lagrangian 1D/axisymmetric)
X5Shells: BLT + Belytschko–Wong–Chiang warping, self-contact (Benson–Hallquist)quad4 surface meshes (a quad-dominant surface mesher is not yet on the roadmap — gap)plate free vibration (analytic), cylinder crush (energy only)
L1LBM core on CPU: D3Q19, TRT, halfway bounce-back, Zou–He, uniform grid from voxelising the face-tagged surface with exact predicates, momentum-exchange forcesvoxelisation (inside/outside with mesh predicates); no volume meshPoiseuille (2nd order), Couette, Taylor–Green decay, sphere Stokes drag
L2Accuracy and range: Bouzidi interpolated walls (link fractions from ray–triangle tests), regularised/RR and cumulant D3Q27, Smagorinsky LES, Schäfer–Turek, cavitylink-surface intersectionsSchäfer–Turek 2D-1/2D-2/3D (published numerical bounds, owner sign-off), Womersley
L3Octree refinement: Rohde cell-centred on the M3 2:1 octree; then wgpu backend at L5 (AA pattern)M3 octree (shared data structure)refinement across a channel (Poiseuille exact across levels, mass conservation to round-off), GPU-vs-CPU tolerance check
F1FSI loose: IB-LBM (Wu–Shu) with markers on the structure’s surface nodes, explicit FE structure with subcycling, conservative Hᵀ force transferstructural surface of a hex/tet meshrigid cylinder added-mass C_a = 1, settling sphere, Turek–Hron FSI1
F2FSI strong: Aitken, then IQN-ILS with filtering; implicit (M6 linear dynamic) structure as well as explicitsameTurek–Hron FSI2 and FSI3
F3Free-surface LBM (Körner/Thürey) with FSIsamedam break front position (published experiment — owner sign-off), hydrostatic column (analytic)

Time-step mismatch, concretely. Steel structure (c ≈ 5,900 m/s) with 1 mm elements: Δt_s ≈ 1.7×10⁻⁷ s. Water LBM at 1 mm spacing with lattice velocity 0.1 for a 1 m/s flow: Δt_f = 0.1·Δx/u = 10⁻⁴ s. The structure needs ~600 substeps per fluid step: subcycle the structure (cheap, it is a thin interface region) or apply mass scaling with reported added mass. For soft structures (Turek–Hron), the implicit structure solver with one step per fluid step is the better pairing — this is why FSI should support both structure solvers.

F5. Biggest risks, and what happens if wrong

  1. Hourglass and contact robustness, not the time integrator, decide whether people trust the explicit solver. If hourglass control is weak, coarse-mesh results look plausible and are wrong; if contact misses penetrations, runs explode at hour 3. Mitigation: hourglass and contact energies reported every run with thresholds that warn; contact verification cases from day one; a crash-report replay path for solver blow-ups.
  2. Silent mass scaling and time step collapse. One bad element sets Δt for the whole model. Mitigation: report the ten controlling elements and the added mass; mesh-quality gate before a run. If wrong, users see runs that never finish rather than wrong answers — annoying, not dangerous.
  3. Determinism vs GPU vs parallelism. The determinism rule and GPU f32 are in direct conflict (E3). If no exception is agreed, the GPU work cannot ship; if the exception is too loose, regression tests flake. Decide before L3.
  4. Added-mass instability in FSI. Loose coupling will diverge for light structures in water no matter how small the step (Causin 2005). If F1 ships only loose coupling, the first realistic marine/biomedical case fails; F2 (IQN) must follow immediately, and the loose scheme must detect divergence (interface energy growth) and stop with an error.
  5. LBM at industrial Reynolds numbers. Laminar validation is easy; turbulent external flow needs D3Q27 cumulant or RR, LES, wall models and refinement before results are useful. If underestimated, the LBM looks like a toy for a year. Budget L2–L3 as the main LBM work, not L1.
  6. Scope creep toward LS-DYNA’s material library. LS-DYNA has hundreds of materials; each is a paper. Ship elastic, J2, Johnson–Cook, a hyperelastic rubber, a crushable foam, and EOS; add on demand. Never mirror any product’s material numbering in the model — only in the deck writer’s mapping.
  7. Expected-value policy. Taylor bar, cavity, Schäfer–Turek, Turek–Hron, dam break all compare with published experiments or published numerical references, not closed forms. The project rule says expected values are analytic. Owner decision: allow published, non-commercial reference values for benchmarks (I recommend yes, tagged as “benchmark”, kept separate from the analytic suite).
  8. Quad shell meshing is missing from the roadmap. X5 needs quad-dominant surface meshes; without them shells run on tri3 (BLT has a triangular variant, less accurate). Flag for the roadmap.

Part G: Implicit solver (M4), as implemented

The papers and books fieldcraft-fem and fieldcraft-solver are written from (cited again in the module docs):

  • Elements: O. C. Zienkiewicz, R. L. Taylor, J. Z. Zhu, The Finite Element Method: Its Basis and Fundamentals, 7th ed., 2013; T. J. R. Hughes, The Finite Element Method, Dover 2000.
  • Incompatible modes: Wilson, Taylor, Doherty, Ghaboussi 1973; R. L. Taylor, P. J. Beresford, E. L. Wilson, IJNME 10(6):1211–1219, 1976 (the det J₀/det J correction that passes the patch test).
  • Tetrahedron quadrature: A. H. Stroud, Approximate Calculation of Multiple Integrals, 1971 (conical product rules).
  • Mass lumping: E. Hinton, T. Rock, O. C. Zienkiewicz, Earthquake Eng. Struct. Dyn. 4(3):245–249, 1976.
  • Stress extrapolation: E. Hinton, J. S. Campbell, IJNME 8(3):461–480, 1974.
  • Principal stresses (results display): O. K. Smith, Eigenvalues of a symmetric 3 × 3 matrix, Commun. ACM 4(4):168, 1961 (closed form).
  • Ordering: A. George, SIAM J. Numer. Anal. 10(2):345–363, 1973; H. D. Simon, Computing Systems in Engineering 2:135–148, 1991.
  • Sparse Cholesky: T. A. Davis, Direct Methods for Sparse Linear Systems, SIAM 2006; J. W. H. Liu, SIAM J. Matrix Anal. Appl. 11(1):134–172, 1990; supernodes: J. W. H. Liu, E. G. Ng, B. W. Peyton, SIAM J. Matrix Anal. Appl. 14(1):242–252, 1993; the compressed graph of indistinguishable unknowns (the symbolic analysis by blocks of three): C. Ashcraft, SIAM J. Sci. Comput. 16(6):1404–1411, 1995; left-looking supernodal factorization: E. Ng, B. W. Peyton, SIAM J. Sci. Comput. 14(5):1034–1056, 1993; parallel block factorization: E. Rothberg, A. Gupta, SIAM J. Sci. Comput. 15(6):1413–1439, 1994.
  • Eigenvalues: T. Ericsson, A. Ruhe, Math. Comp. 35(152):1251–1268, 1980; R. G. Grimes, J. G. Lewis, H. D. Simon, SIAM J. Matrix Anal. Appl. 15(1):228–272, 1994; B. N. Parlett, The Symmetric Eigenvalue Problem, SIAM 1998; G. H. Golub, C. F. Van Loan, Matrix Computations, 4th ed., 2013.
  • 2D elements (plane stress, plane strain, axisymmetric): Zienkiewicz, Taylor & Zhu 2013, ch. 6 and §6.6; Hughes 2000, §2.7 and §3.5. Quad4 incompatible modes (QM6): Wilson et al. 1973 and Taylor, Beresford & Wilson 1976 as for hex8; in axisymmetric elements the modes’ strain operator is shifted by its volume mean, the patch-test correction of E. L. Wilson and A. Ibrahimbegovic, Use of incompatible displacement modes for the calculation of element stiffnesses or stresses, Finite Elements in Analysis and Design 7(3):229–241, 1990. Rotating discs and cylinders for verification: S. Timoshenko, J. N. Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, §32.
  • Wedge6: the linear triangle times the linear interval; the symmetric three-point triangle rule (Zienkiewicz, Taylor & Zhu 2013, table 6.3) times two-point Gauss–Legendre.
  • Couplings and constraint elimination: rigid links and master–slave elimination by transformation, R. D. Cook, D. S. Malkus, M. E. Plesha, R. J. Witt, Concepts and Applications of Finite Element Analysis, 4th ed., Wiley 2002, §9.2, and C. A. Felippa, Introduction to Finite Element Methods, ch. 8 (University of Colorado lecture notes); automatic choice of the dependent degree of freedom, J. F. Abel, M. S. Shephard, IJNME 14(3):464–467, 1979; the distributing (interpolation) constraint as a least-squares rigid fit with loads spread by virtual work, G. H. K. Heirman, W. Desmet, Multibody Syst. Dyn. 24(2):219–234, 2010, with the consistent (L2) weights over the set’s faces from O. C. Zienkiewicz, R. L. Taylor, J. Z. Zhu, The Finite Element Method, 7th ed., 2013, §6.6; the reduced matrix product T_fᵀ K T_f row by row, F. G. Gustavson, ACM TOMS 4(3):250–269, 1978.
  • Trusses and discrete elements: the isoparametric bar along its arc, R. D. Cook, D. S. Malkus, M. E. Plesha, R. J. Witt, Concepts and Applications of Finite Element Analysis, 4th ed., Wiley 2002, §3.6 and §6.2, and Hughes 2000, §1.10; springs k [n nᵀ, −n nᵀ; −n nᵀ, n nᵀ], Cook et al. 2002, §2.2 and §2.10; HRZ lumping as above. Verified against the method of joints (statically determinate trusses), the three-bar truss, the hanging bar, √(k/m), the two-mass chain and the torsional pendulum √(k_t/J).
  • Shells: E. N. Dvorkin, K.-J. Bathe, A continuum mechanics based four-node shell element for general nonlinear analysis, Engineering Computations 1(1):77–88, 1984 (MITC4 shear tying); K.-J. Bathe, E. N. Dvorkin, IJNME 21(2):367–383, 1985 (the flat-plate form); P.-S. Lee, K.-J. Bathe, Development of MITC isotropic triangular shell finite elements, Computers & Structures 82(11–13):945–962, 2004 (MITC3); T. J. R. Hughes, F. Brezzi, On drilling degrees of freedom, CMAME 72(1):105–121, 1989 (drilling penalty); facet shells, O. C. Zienkiewicz, R. L. Taylor, D. D. Fox, The Finite Element Method for Solid and Structural Mechanics, 7th ed., 2014, ch. 9–10.
  • Beams: J. S. Przemieniecki, Theory of Matrix Structural Analysis, McGraw-Hill 1968, §5.6; Z. Friedman, J. B. Kosmatka, Computers & Structures 47(3):473–481, 1993 (interdependent Timoshenko interpolation); G. R. Cowper, J. Appl. Mech. 33(2):335–340, 1966 (shear coefficients); S. P. Timoshenko, J. N. Goodier, Theory of Elasticity, 3rd ed., 1970, §109 (torsion of a rectangle); W. D. Pilkey, Analysis and Design of Elastic Beams, Wiley 2002 (thin-walled shear areas and torsion).
  • Shell benchmarks (published values, tagged, not the analytic gate): Scordelis–Lo roof 0.3024 (MacNeal & Harder 1985); pinched cylinder 1.8248 · 10⁻⁵ (T. Belytschko, H. Stolarski, W. K. Liu, N. Carpenter, J. S.-J. Ong, CMAME 51(1–3):221–258, 1985). Plate: S. Timoshenko, S. Woinowsky-Krieger, Theory of Plates and Shells, 2nd ed., 1959, §30 (Navier).
  • Verification: R. H. MacNeal, R. L. Harder, A proposed standard set of problems to test finite element accuracy, Finite Elem. Anal. Des. 1(1):3–20, 1985 (patch tests); Lamé, Kirsch, Timoshenko and Euler–Bernoulli closed forms; Saint-Venant’s principle (tension through a coupling), pure bending σ = M z / I, torsion of a circular tube φ = T L / (G J), τ = T r / J.

Part H: Explicit solver core (X1), as implemented

The papers and books fieldcraft-explicit and fieldcraft_fem::uniform are written from (cited again in the module docs):

  • Time integration, energy balance, element eigenvalue inequality: T. Belytschko, W. K. Liu, B. Moran, K. Elkhodary, Nonlinear Finite Elements for Continua and Structures, 2nd ed., Wiley 2014 (ch. 6: central differences in the half-step form with variable increments, the energy balance check, the critical time step).
  • One-point hexahedron and hourglass control: D. P. Flanagan, T. Belytschko, IJNME 17(5):679–706, 1981 (integrated gradients b, mean strain, the γ hourglass shape vectors orthogonal to linear fields, viscous and stiffness resisting forces). Our scaling of the coefficient with ρ, c and the element size is our own: κ is the fraction of critical damping (viscous) or the squared frequency ratio (stiffness) of a cube’s hourglass modes at 2c/h.
  • Element frequency bound: in the spirit of D. P. Flanagan, T. Belytschko, J. Appl. Mech. 51(1):35–40, 1984; we bound uᵀKu ≤ (k/V) λ_max(Σ b bᵀ) ‖u‖² with k = max(3λ + 2μ, 2μ) (isotropic) or 2 λ_max(D), which is exact for a cube; the 3 × 3 eigenvalue in closed form after O. K. Smith, Commun. ACM 4(4):168, 1961.
  • Average nodal pressure tetrahedron: J. Bonet, A. J. Burton, Commun. Numer. Methods Eng. 14(5):437–449, 1998.
  • Bulk viscosity and its time-step correction: J. von Neumann, R. D. Richtmyer, J. Appl. Phys. 21(3):232–237, 1950; M. L. Wilkins, J. Comput. Phys. 36(3):281–303, 1980.
  • Springs and dashpots: lagged-velocity damping and the damped stable increment Δt ≤ (2/ω)(√(1 + ξ²) − ξ), Belytschko et al. 2014, §6.2–6.3; Gershgorin’s bound on M^{-1/2} K M^{-1/2} per degree of freedom. Verified against the damped oscillator’s decay e^{−ξωt} and period 2π/ω_d.
  • Rigid walls as kinematic velocity constraints: T. J. R. Hughes, R. L. Taylor, J. L. Sackman, A. Curnier, W. Kanoknukulchai, CMAME 8(3):249–276, 1976.
  • Verification: d’Alembert’s solution of the 1D wave equation (front at c t, σ = ρ c v), the elastic bar impact on a rigid wall (contact 2L/c, rebound at the impact speed; Hughes et al. 1976), Euler–Bernoulli and the implicit modal solver for the cantilever period. The one-point element keeps 1 − 1/n² of the bending energy with n elements through the depth, which predicts its period with viscous hourglass control to 0.03%.

Part I: Lattice Boltzmann core (M12, plan L1), as implemented

fieldcraft-lbm is written from these papers and the book (cited again in its module docs). No lattice Boltzmann package’s code was opened.

  • Lattice, equilibrium, units, stream–collide, bounce-back, forcing and boundary conditions: Krüger et al. 2017 (C1.2); D3Q19 from Qian, d’Humières & Lallemand 1992 (C1.3).
  • Collision: two relaxation times, Ginzburg, Verhaeghe & d’Humières 2008 (C2.2). The parameter Λ = (τ⁺ − ½)(τ⁻ − ½) is the step’s magic (default 3/16: walls exactly halfway).
  • Body force: Guo, Zheng & Shi 2002 (C1.6), split into the symmetric and antisymmetric parts relaxed with τ⁺ and τ⁻.
  • Walls: halfway bounce-back, Ladd’s moving-wall term and momentum exchange (Ladd 1994, C3.1); momentum exchange also after R. Mei, D. Yu, W. Shyy, L.-S. Luo, Force evaluation in the lattice Boltzmann method involving curved geometry, PRE 65:041203, 2002 (DOI not checked).
  • Inlets and outlets: Zou & He 1997 (C3.3), with the D3Q19 transverse-momentum correction of Hecht & Harting 2010 (C3.3); the TRT velocity-inlet correction, FieldCraft’s own after Guo, Zheng & Shi 2002 and Shapiro 1970 (C3.3e); convective outlets after Orlanski 1976 (C3.4).
  • Stability limits (Mach ≤ 0.3, τ⁺ ≥ 0.505, runtime speed ≤ 0.5): Sterling & Chen 1996 and Lallemand & Luo 2000 (C1.5) for the shrinking stable region as τ → ½.
  • Voxelisation: Shewchuk’s exact orient2d/orient3d (fieldcraft_mesh::predicates) with a symbolic perturbation after H. Edelsbrunner, E. P. Mücke, Simulation of Simplicity, ACM TOG 9(1):66–104, 1990; link faces by nearest triangle, C. Ericson, Real-Time Collision Detection, Morgan Kaufmann 2005, §5.1.5.
  • Verification: analytic Poiseuille, Couette and Taylor–Green solutions (C8); the Stokes drag of a simple cubic array of spheres, H. Hasimoto, On the periodic fundamental solutions of the Stokes equations and their application to viscous flow past a cubic array of spheres, JFM 5(2):317–328, 1959, with the higher terms of A. S. Sangani, A. Acrivos, Int. J. Multiphase Flow 8(4):343–360, 1982 (DOIs not checked). Benchmark (published numerical reference values, tagged, not part of the analytic gate): Schäfer & Turek 1996, 2D-1 (C8).

Part J: Large deformation and inelastic materials (X2), as implemented

The papers and books fieldcraft_fem::{rotation, plasticity} and fieldcraft-explicit’s X2 update are written from (cited again in the module docs):

  • Updated Lagrangian one-point elements, strain increments on the midpoint configuration: T. Belytschko, W. K. Liu, B. Moran, K. Elkhodary, Nonlinear Finite Elements for Continua and Structures, 2nd ed., Wiley 2014 (ch. 4–6); the closed-form integrated gradients b = ∂V/∂x of the hexahedron, D. P. Flanagan, T. Belytschko, IJNME 17(5):679–706, 1981 (we tabulate the 24 coefficients of the volume form and check them against their exact integration).
  • Jaumann rate, incrementally objective: T. J. R. Hughes, J. Winget, IJNME 15(12):1862–1867, 1980 (Cayley rotation of the midpoint spin increment; a rigid rotation of any size is exact).
  • Green–Naghdi rate: D. P. Flanagan, L. M. Taylor, CMAME 62(3):305–320, 1987 (incremental polar rotation from V̇ = L V − V Ω; we solve [(tr V) I − V] x = axial(D V − V D) and integrate V with the midpoint rule).
  • Radial return for J2 with isotropic and linear kinematic (Prager) hardening: J. C. Simo, T. J. R. Hughes, Computational Inelasticity, Springer 1998, §3.3; R. D. Krieg, D. B. Krieg, J. Press. Vessel Technol. 99(4):510–515, 1977.
  • Johnson–Cook flow stress (rate clamped at ε̇* ≥ 1, T* in [0, 1], adiabatic heating with a Taylor–Quinney fraction) and fracture strain D1–D5 with D = Σ Δε_p/ε_f: G. R. Johnson, W. H. Cook 1983 (7th Int. Symp. Ballistics) and Eng. Fract. Mech. 21(1):31–48, 1985. The fracture strain is floored at 10⁻⁶ (our choice).
  • Erosion: G. R. Johnson, R. A. Stryk, Int. J. Impact Eng. 5:411–421, 1987; T. Belytschko, J. I. Lin, ibid. 5:111–127, 1987 (delete, keep nodal mass and momentum, report the energy).
  • Verification: J. K. Dienes, Acta Mech. 32:217–232, 1979 (simple shear, closed forms for both rates); G. I. Taylor, Proc. R. Soc. A 194:289–299, 1948 (the yield stress from the final length and undeformed length of a flat-ended projectile). Published experimental Taylor-bar lengths (Wilkins & Guinan 1973) are not used: that needs the owner’s sign-off for a tagged benchmark suite.

Part K: Heat transfer and thermal stress, as implemented

  • Conduction. Galerkin form of ρc Ṫ = ∇·(k∇T) + Q with surface flux and convection: O. C. Zienkiewicz, R. L. Taylor, J. Z. Zhu, The Finite Element Method: Its Basis and Fundamentals, 7th ed., Butterworth-Heinemann 2013, §3.2; T. J. R. Hughes, The Finite Element Method, Dover 2000, ch. 1. Kernels in fieldcraft_fem::heat, solver in fieldcraft_solver::heat.
  • Time integration. The generalized trapezoidal (θ) family, unconditionally stable for θ ≥ ½ (Hughes 2000, §8.2): backward Euler (θ = 1, the default) and Crank–Nicolson (θ = ½).
  • Thermal strain. Initial-strain load ∫ Bᵀ D ε_th dV and stress D(ε − ε_th) (Zienkiewicz, Taylor & Zhu 2013, §6.2.3); incompatible modes condensed with the same load.
  • Coupled temperature–displacement. One-way coupling (temperature strains the solid) solved in turn, which is the exact monolithic solution of linear quasi-static thermoelasticity without thermoelastic dissipation (B. A. Boley, J. H. Weiner, Theory of Thermal Stresses, Wiley 1960, ch. 1).
  • Verification (crates/solver/tests/thermal.rs, analytic): steady slab conduction, a slab with a heat source and convection or flux (quadratic profile), radial conduction through a thick cylinder (T ∝ ln r), the semi-infinite solid T = erfc(x / 2√(κt)) (H. S. Carslaw, J. C. Jaeger, Conduction of Heat in Solids, 2nd ed., Oxford 1959, §2.4), free and constrained thermal expansion (σ = −EαΔT), the bimetal strip (S. Timoshenko, Analysis of bi-metal thermostats, J. Opt. Soc. Am. 11(3):233–255, 1925), and the coupled step against the heat step followed by the static step.

Part L: Hybrid (mixed u–p) solids, as implemented

  • Perturbed-Lagrangian u–p formulation with element-wise condensed discontinuous pressure: T. J. R. Hughes, The Finite Element Method, Dover 2000, §4.3–4.5 (B-bar and mean dilatation as the constant-pressure case); J. C. Nagtegaal, D. M. Parks, J. R. Rice, CMAME 4(2):153–177, 1974 (locking of displacement elements near incompressibility).
  • Pressure spaces and the inf-sup condition: F. Brezzi, M. Fortin, Mixed and Hybrid Finite Element Methods, Springer 1991, ch. VI; K.-J. Bathe, Finite Element Procedures, 2nd ed., 2014, §4.5 (Q2–P1disc and P2–P0 stable, Q1–P0 checkerboard-prone, P1–P0 locks).
  • Verification (crates/solver/tests/hybrid.rs, analytic): a block in uniaxial strain at ν = 0.4999 (exact), Lamé’s thick cylinder in plane strain at ν = 0.4999 (hex20 1e-5, tet10 1e-3, hex8 3e-3 relative error in the bore displacement, where the displacement hex8 is 80 % too stiff). Cook’s membrane is a published benchmark, not part of the analytic gate.

Part M: Nonlinear static analysis (finite strain), as implemented

  • Total Lagrangian formulation written with spatial quantities (Kirchhoff stress, spatial tangent, current gradients): J. Bonet, R. D. Wood, Nonlinear Continuum Mechanics for Finite Element Analysis, 2nd ed., Cambridge 2008, ch. 5–9; G. A. Holzapfel, Nonlinear Solid Mechanics, Wiley 2000, §6.6 (the isochoric–volumetric split and its tangents); K.-J. Bathe, Finite Element Procedures, 2nd ed., 2014, §6.3; T. Belytschko, W. K. Liu, B. Moran, K. Elkhodary, Nonlinear Finite Elements for Continua and Structures, 2nd ed., Wiley 2014, ch. 4–6.
  • Decoupled neo-Hookean energy: P. J. Flory, Trans. Faraday Soc. 57:829–838, 1961.
  • Mixed u–p at finite strain: J. C. Simo, R. L. Taylor, K. S. Pister, CMAME 51:177–208, 1985; mean dilatation: J. C. Nagtegaal, D. M. Parks, J. R. Rice, CMAME 4:153–177, 1974.
  • Incompatible modes at finite strain as enhanced assumed strain (the enhanced deformation gradient, the modes condensed per element, the consistent tangent): J. C. Simo, F. Armero, IJNME 33:1413–1449, 1992, with the det J₀/det J mapping of R. L. Taylor, P. J. Beresford, E. L. Wilson, IJNME 10(6):1211–1219, 1976. Their hourglassing in compression: P. Wriggers, S. Reese, CMAME 135:201–209, 1996; the published stabilisations, not implemented (an hourglass check on the element’s hourglass modes, the parent patterns less their linear part by Flanagan & Belytschko’s integrated gradients, stops the step instead): S. Glaser, F. Armero, Eng. Comput. 14(7):759–791, 1997; S. Reese, P. Wriggers, B. D. Reddy, Comput. Struct. 75(3):291–304, 2000.
  • Follower pressure and its load stiffness: K. Schweizerhof, E. Ramm, Comput. Struct. 18(6):1099–1114, 1984.
  • Newton–Raphson, line search and convergence criteria: M. A. Crisfield, Non-linear Finite Element Analysis of Solids and Structures, vol. 1, Wiley 1991, ch. 9; K.-J. Bathe, A. P. Cimento, CMAME 22:59–85, 1980.
  • Symmetric eigen-decomposition for the logarithmic strain: G. H. Golub, C. F. Van Loan, Matrix Computations, 4th ed., Johns Hopkins 2013, §8.5 (cyclic Jacobi).
  • Verification references: the elastica, K. E. Bisshopp, D. C. Drucker, Q. Appl. Math. 3(3):272–275, 1945, with K. Mattiasson, IJNME 17(1):145–153, 1981; Cook’s membrane (pending its transcribed finite-strain values), R. D. Cook, J. Struct. Div. ASCE 100(ST9):1851–1863, 1974, and J. C. Simo, F. Armero, IJNME 33:1413–1449, 1992; tube inflation, R. S. Rivlin, Phil. Trans. R. Soc. A 242:173–195, 1949, and R. W. Ogden, Non-Linear Elastic Deformations, Dover 1997.

Part N: Implicit plasticity (finite and small strain), as implemented

  • Multiplicative J2 plasticity with a Hencky elastic energy and the exponential return map in the principal logarithmic strains, which keeps the classical radial return of the infinitesimal theory: J. C. Simo, Algorithms for static and dynamic multiplicative plasticity that preserve the classical return mapping schemes of the infinitesimal theory, CMAME 99(1):61–112, 1992, DOI 10.1016/0045-7825(92)90123-2; J. C. Simo, T. J. R. Hughes, Computational Inelasticity, Springer 1998, ch. 9.
  • The radial return (shared with explicit dynamics) and its consistent tangent K I⊗I + 2Gθ ℙ − 2Gθ̄ n⊗n: Simo & Hughes 1998, §3.3, Box 3.2 (A4.1); J. C. Simo, R. L. Taylor, Consistent tangent operators for rate-independent elastoplasticity, CMAME 48(1):101–118, 1985, DOI 10.1016/0045-7825(85)90070-2.
  • The derivative of the matrix logarithm by divided differences (Daleckii–Krein), smooth through equal stretches: R. Bhatia, Matrix Analysis, Springer 1997, §V.3.
  • Kinematic hardening at finite strain: additive plasticity in the Lagrangian logarithmic strain space, C. Miehe, N. Apel, M. Lambrecht, Anisotropic additive plasticity in the logarithmic strain space: modular kinematic formulation and implementation based on incremental minimization principles for standard materials, CMAME 191(47–48):5383–5425, 2002, DOI 10.1016/S0045-7825(02)00438-3. E = ½ log(FᵀF), with its conjugate stress and consistent tangent mapped by the first and second Fréchet derivatives of log; symmetric spectral divided differences retain their repeated-root limits. The isotropic multiplicative path remains separate.
  • Prager’s linear kinematic hardening: W. Prager, The theory of plasticity: a survey of recent achievements, Proc. Inst. Mech. Eng. 169:41–57, 1955.
  • Non-coaxial verification: M. Itskov, On the applicability of generalized strain measures in large strain plasticity, in Trends and Applications of Mathematics to Mechanics, pp. 101–113, 2005, DOI 10.1007/88-470-0354-7_10, equation (60), Figure 1 (r = 0): the independent rigid-perfect-plastic simple-shear curve, checked by nl-j2-simple-shear. This logarithmic response decreases at large shear; it is not the constant shear response of multiplicative perfect plasticity.
  • Verification references: the thick cylinder’s plastic zone and collapse pressure, R. Hill, The Mathematical Theory of Plasticity, Oxford 1950, ch. V; the cantilever’s plastic hinge, B. G. Neal, The Plastic Methods of Structural Analysis, 3rd ed., Chapman & Hall 1977, and the continuum’s velocity fields, W. Prager, P. G. Hodge, Theory of Perfectly Plastic Solids, Wiley 1951.

Part O: Polynomial hyperelasticity and thermal strain in nonlinear steps, as implemented

  • Decoupled invariant-based hyperelasticity, the fictitious stress and elasticity and their projection: G. A. Holzapfel, Nonlinear Solid Mechanics, Wiley 2000, §6.4–6.6 (eqs. 6.168, 6.193).
  • Mooney–Rivlin: M. Mooney, A theory of large elastic deformation, J. Appl. Phys. 11(9):582–592, 1940; R. S. Rivlin, Large elastic deformations of isotropic materials IV, Phil. Trans. R. Soc. A 241:379–397, 1948. Yeoh: O. H. Yeoh, Some forms of the strain energy function for rubber, Rubber Chem. Technol. 66(5):754–771, 1993.
  • The homogeneous modes of rubber testing: L. R. G. Treloar, The Physics of Rubber Elasticity, 3rd ed., Oxford 1975, ch. 10; the inflation and extension of a tube: R. S. Rivlin, Phil. Trans. R. Soc. A 242:173–195, 1949, and R. W. Ogden, Non-Linear Elastic Deformations, Dover 1997, §5.3.
  • Thermal strain by the multiplicative split F = F_m F_θ: V. A. Lubarda, Constitutive theories based on the multiplicative decomposition of deformation gradient: thermoelasticity, elastoplasticity, and biomechanics, Appl. Mech. Rev. 57(2):95–108, 2004.

Part P: Symmetric indefinite factorization, linear buckling and arc-length, as implemented

  • Symmetric indefinite pivoting: J. R. Bunch, L. Kaufman, Some stable methods for calculating inertia and solving symmetric linear systems, Math. Comp. 31(137):163–179, 1977; the bounded (rook) search, C. Ashcraft, R. G. Grimes, J. G. Lewis, Accurate symmetric indefinite linear equation solvers, SIAM J. Matrix Anal. Appl. 20(2):513–561, 1998; the panel’s partial factorization of LAPACK’s dsytrf, E. Anderson et al., LAPACK Users’ Guide, 3rd ed., SIAM 1999.
  • Pivoting within supernodes on a static structure: O. Schenk, K. Gärtner, On fast factorization pivoting methods for sparse symmetric indefinite systems, Electron. Trans. Numer. Anal. 23:158–179, 2006. Delayed pivots (the multifrontal alternative, not used: it changes the structure as it goes): I. S. Duff, J. K. Reid, The multifrontal solution of indefinite sparse symmetric linear equations, ACM TOMS 9(3):302–325, 1983; J. W. H. Liu, The multifrontal method for sparse matrix solution: theory and practice, SIAM Review 34(1):82–109, 1992.
  • Arc-length: E. Riks, An incremental approach to the solution of snapping and buckling problems, Int. J. Solids Struct. 15(7):529–551, 1979; M. A. Crisfield, A fast incremental/iterative solution procedure that handles “snap-through”, Computers & Structures 13:55–62, 1981; E. Ramm, Strategies for tracing the nonlinear response near limit points, in Nonlinear Finite Element Analysis in Structural Mechanics, Springer 1981, 63–89; the predictor’s sign, M. Feng, D. Perić, D. R. J. Owen, Computers & Structures 58(3):479–485, 1996. Snap-through of a shallow sinusoidal arch: Y. C. Fung, A. Kaplan, NACA TN 2840, 1952; Timoshenko & Gere 1961, §7.6.
  • Iterative refinement: N. J. Higham, Accuracy and Stability of Numerical Algorithms, 2nd ed., SIAM 2002, §12.2.
  • Linear buckling and the initial-stress stiffness: K.-J. Bathe, Finite Element Procedures, 2nd ed., 2014, §6.8.2; the buckling spectral transformations in the K inner product: R. G. Grimes, J. G. Lewis, H. D. Simon, SIAM J. Matrix Anal. Appl. 15(1):228–272, 1994, §3; Euler’s columns with Engesser’s shear correction: S. P. Timoshenko, J. M. Gere, Theory of Elastic Stability, 2nd ed., McGraw-Hill 1961, §2.1, §2.17.

Part Q: Contact and friction (explicit), as implemented

The papers and books fieldcraft_fem::contact and fieldcraft_explicit::contact are written from (cited again in the module docs); docs/manual/structural/contact.md describes the formulation.

  • Closest point on a triangle by its Voronoi regions: C. Ericson, Real-Time Collision Detection, Morgan Kaufmann 2005, §5.1.5; on a bilinear quadrilateral by Newton’s method on the stationarity conditions, projected on the parameter square: the local search of node-to-segment contact, J. O. Hallquist, G. L. Goudreau, D. J. Benson, CMAME 51:107–137, 1985 (A5.1), and P. Wriggers, Computational Contact Mechanics, 2nd ed., Springer 2006, §4.1.
  • Global search by bucket sorting into a uniform grid: D. J. Benson, J. O. Hallquist, CMAME 78:141–163, 1990 (A5.2). We chose a grid over the BVH of A5.4: one pass per increment, memory bounded by caps whatever the mesh, candidates in face order (determinism); the cell grows when a few huge faces would blow the entry cap.
  • Segment-to-segment integration (projection on the secondary face’s plane, clipping, sub-triangle quadrature): M. A. Puso, T. A. Laursen, A mortar segment-to-segment contact method for large deformation solid mechanics, CMAME 193:601–629, 2004; with the penalty applied at the integration points, K. A. Fischer, P. Wriggers, Comput. Mech. 36:226–244, 2005; polygon clipping, I. E. Sutherland, G. W. Hodgman, Commun. ACM 17(1):32–42, 1974. Chosen over node-to-segment because the latter fails the contact patch test on non-matching meshes (R. L. Taylor, P. Papadopoulos, in Nonlinear Computational Mechanics, Springer 1991, 690–702; M. A. Crisfield, IJNME 48:435–449, 2000), which our first node-to-segment version showed too (12% spread of σ_zz in the patch test, 0.1% now).
  • Penalty from the masses and the stable increment (the “soft constraint” idea: J. O. Hallquist, LS-DYNA Theory Manual, LSTC 2006, the contact chapter’s soft-constraint option; the bound is ours: Gershgorin’s row sums of the integrated contact stiffness with the node’s directional area, added to the element frequencies by Weyl’s inequality).
  • Friction by a regularised (penalty) return map: P. Wriggers, Computational Contact Mechanics, §5.2 and §10.3; J. C. Simo, T. A. Laursen, Comput. Struct. 42(1):97–116, 1992; rate-dependent coefficients reviewed by J. T. Oden, J. A. C. Martins, CMAME 52:527–634, 1985. The exponential decay μ = μ_k + (μ_s − μ_k) e^{−d γ̇} is the form the LS-DYNA and Abaqus manuals document, so the decks carry it unchanged.
  • Kinematic rigid walls with Coulomb impulses: T. J. R. Hughes et al., CMAME 8(3):249–276, 1976 (A5.5), the tangential impulse capped at μ times the normal one.
  • Verification: the impact of equal bars, K. F. Graff, Wave Motion in Elastic Solids, Dover 1991, §2.1–2.3, and W. Johnson, Impact Strength of Materials, Arnold 1972, §1.6; Hertz’s impact of spheres, H. Hertz, J. reine angew. Math. 92:156–171, 1882, and K. L. Johnson, Contact Mechanics, Cambridge 1985, §11.4; the sliding block, any dynamics text (J. L. Meriam, L. G. Kraige, Engineering Mechanics: Dynamics, §3/5).

Part R: Contact in nonlinear static steps (M7), as implemented

The papers fieldcraft_fem::mortar, fieldcraft_fem::dual and fieldcraft_solver::contact are written from (cited again in the module docs); docs/manual/structural/contact.md describes the formulation.

  • Mortar contact, segment to segment, with nodal weighted gaps and the pressure interpolated by the non-mortar side’s shape functions: M. A. Puso, T. A. Laursen, A mortar segment-to-segment contact method for large deformation solid mechanics, CMAME 193:601–629, 2004; T. W. McDevitt, T. A. Laursen, A mortar-finite element formulation for frictional contact problems, IJNME 48:1525–1547, 2000; the segmentation (projection on the non-mortar plane, clipping, integration cells) and the linearisation it needs, A. Popp, M. W. Gee, W. A. Wall, A finite deformation mortar contact formulation using a primal–dual active set strategy, IJNME 79:1354–1391, 2009. Chosen over two-pass node-to-surface because mortar passes the contact patch test on non-matching meshes (R. L. Taylor, P. Papadopoulos 1991; M. A. Crisfield 2000, as in Part Q).
  • The consistent tangent by automatic differentiation of the mortar integrals rather than by hand: J. Lengiewicz, J. Korelc, S. Stupkiewicz, Automation of finite element formulations for large deformation contact problems, IJNME 85:1252–1279, 2011; forward-mode (truncated Taylor) arithmetic, A. Griewank, A. Walther, Evaluating Derivatives, 2nd ed., SIAM 2008.
  • Augmented Lagrangian with Uzawa updates after each converged increment: J. C. Simo, T. A. Laursen, An augmented Lagrangian treatment of contact problems involving friction, Comput. Struct. 42(1):97–116, 1992; P. Wriggers, Computational Contact Mechanics, 2nd ed., Springer 2006, ch. 6 and 10; T. A. Laursen, Computational Contact and Impact Mechanics, Springer 2003.
  • Friction: the regularised Coulomb return map at the nodes, J. C. Simo, T. A. Laursen 1992 and P. Wriggers 2006, §5.2 (as in Part Q), on the mortar slip in its rate form (the weighted relative motion projected on the tangent plane), T. W. McDevitt, T. A. Laursen 2000 and M. A. Puso, T. A. Laursen, A mortar segment-to-segment frictional contact method for large deformations, CMAME 193:4891–4913, 2004; C. A. Coulomb’s law, Théorie des machines simples, 1785. The tangent is symmetrised like the follower pressure’s (the non-symmetric coupling to the pressure is left out; the residual is exact).
  • Ties by dual mortar constraints: B. I. Wohlmuth, A mortar finite element method using dual spaces for the Lagrange multiplier, SIAM J. Numer. Anal. 38(3):989–1012, 2000; A. Popp, B. I. Wohlmuth, M. W. Gee, W. A. Wall, Dual quadratic mortar finite element methods for 3D finite deformation contact, SIAM J. Sci. Comput. 34(4):B421–B446, 2012; mesh tying in solid mechanics, M. A. Puso, A 3D mortar method for solid mechanics, IJNME 59:315–336, 2004.
  • The active set inside Newton (the max() of the regularised pressure, a semismooth Newton method): P. Alart, A. Curnier, A mixed formulation for frictional contact problems prone to Newton like solution methods, CMAME 92:353–375, 1991; Popp et al. 2009.
  • Integration of the overlap cells: J. Radon’s seven-point degree-5 rule on triangles (A. H. Stroud, Approximate Calculation of Multiple Integrals, Prentice-Hall 1971, T2:5-1).
  • Verification: Hertz’s contact of cylinders and spheres, H. Hertz, J. reine angew. Math. 92:156–171, 1882; K. L. Johnson, Contact Mechanics, Cambridge 1985, §4.2–4.3 (eqs. 4.45–4.49 for the line contact’s pressure and subsurface stresses).

Part S: Initial fields mapped from another analysis (#160), as implemented

The sources fieldcraft_fem::transfer, Solid::initial_stress_load and fieldcraft_model::initial are written from (cited again in the module docs); docs/manual/structural/linear-static.md (“Initial fields”) describes the formulation. DOI and ISBNs checked on 2026-10-29 (doi.org handle API, Crossref, Open Library).

  • Field transfer. Consistent (pointwise) interpolation: each target node takes the source element’s shape-function interpolation at the point it lies at, which reproduces every field the source’s shape functions reproduce. A. de Boer, A. H. van Zuijlen, H. Bijl, Review of coupling methods for non-matching meshes, Comput. Methods Appl. Mech. Engrg. 196(8):1515–1525, 2007, §2.1, DOI 10.1016/j.cma.2006.03.017. The point is located by Newton’s method on the isoparametric map x(ξ) (O. C. Zienkiewicz, R. L. Taylor, J. Z. Zhu, The Finite Element Method: Its Basis and Fundamentals, 7th ed., Butterworth-Heinemann 2013, ISBN 978-1-85617-633-0, §6.5).
  • Initial stress and initial temperature. The initial-stress load −∫ Bᵀ σ₀ dV with σ = D (ε − ε_th) + σ₀, and the thermal strain α (T − T₀) measured from the initial temperature, as initial-strain and initial-stress terms of the displacement formulation: Zienkiewicz, Taylor & Zhu 2013, §6.2.3 (as for the thermal strain of Part K).
  • Verification (crates/solver/tests/initial.rs, oracle cases initial-temperature-beam and initial-stress-beam, analytic): a strain linear in the coordinates is compatible, so a free body releases it without stress (S. P. Timoshenko, J. N. Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill 1970, ISBN 0-07-064720-8, §150): a beam ejected with a temperature linear through its depth bends stress-free to the curvature α dT₀/dz, a linear residual stress s (2z/H − 1) is released into the curvature 2 s/(E H), and a self-equilibrated residual stress held by the supports moves nothing.

Part T: Finite cell method on a background grid, as implemented

The sources fieldcraft-fcm and fieldcraft_solver::ordering::element_dissection are written from (cited again in the module docs); docs/architecture.md (“Finite cell solver”) describes the pipeline. Every DOI below resolved at Crossref on 2026-11-27 and its first author, year, title and venue were checked against the metadata there; the books have no DOI and are cited by title, edition and publisher.

  • The method. Embed the part in a Cartesian grid of cells, put higher-order shape functions on the cells that hold material and integrate the weak form over the part only, with a small stiffness in the rest of a cut cell: J. Parvizian, A. Düster, E. Rank, Finite cell method: h- and p-extension for embedded domain problems in solid mechanics, Comput. Mech. 41(1):121–133, 2007, DOI 10.1007/s00466-007-0173-y; in three dimensions, with the octree of a cut cell, A. Düster, J. Parvizian, Z. Yang, E. Rank, The finite cell method for three-dimensional problems of solid mechanics, Comput. Methods Appl. Mech. Engrg. 197(45–48):3768–3782, 2008, DOI 10.1016/j.cma.2008.02.036.
  • Shape functions. Integrated Legendre polynomials, the tensor product and the trunk space of the hexahedron: B. Szabó, I. Babuška, Finite Element Analysis, Wiley 1991. Cell matrices from the Legendre moments of the material by sum factorisation: S. A. Orszag, Spectral methods for problems in complex geometries, J. Comput. Phys. 37(1):70–92, 1980, DOI 10.1016/0021-9991(80)90005-4; J. M. Melenk, K. Gerdes, C. Schwab, Fully discrete hp-finite elements: fast quadrature, Comput. Methods Appl. Mech. Engrg. 190(32–33):4339–4364, 2001, DOI 10.1016/S0045-7825(00)00322-4.
  • Cut cells integrated from their triangles. The moments of a polyhedron reduced to its faces and their edges by the divergence theorem: B. Mirtich, Fast and accurate computation of polyhedral mass properties, J. Graphics Tools 1(2):31–50, 1996, DOI 10.1080/10867651.1996.10487458; for cells cut by an interface, Y. Sudhakar, J. P. Moitinho de Almeida, W. A. Wall, An accurate, robust, and easy-to-implement method for integration over arbitrary polyhedra: application to embedded interface methods, J. Comput. Phys. 273:393–415, 2014, DOI 10.1016/j.jcp.2014.05.019. Coincidences (a face of the part in a grid plane, a corner on a plane) by symbolic perturbation: H. Edelsbrunner, E. P. Mücke, Simulation of simplicity: a technique to cope with degenerate cases in geometric algorithms, ACM Trans. Graph. 9(1):66–104, 1990, DOI 10.1145/77635.77639.
  • Which cells are cut. A triangle and the inside of a box by the separating axis theorem (S. Gottschalk, M. C. Lin, D. Manocha, OBBTree: a hierarchical structure for rapid interference detection, SIGGRAPH 1996, pp. 171–180, DOI 10.1145/237170.237244; T. Akenine-Möller, Fast 3D triangle-box overlap testing, J. Graphics Tools 6(1):29–33, 2001, DOI 10.1080/10867651.2001.10487535), each of its thirteen directions decided by a comparison of coordinates or the sign of an adaptive precision predicate (J. R. Shewchuk, Adaptive precision floating-point arithmetic and fast robust geometric predicates, Discrete Comput. Geom. 18(3):305–363, 1997, DOI 10.1007/PL00009321). The pieces of a triangle in the cells by I. E. Sutherland, G. W. Hodgman, Reentrant polygon clipping, Commun. ACM 17(1):32–42, 1974, DOI 10.1145/360767.360802.
  • Supports. Imposed weakly: J. Nitsche, Über ein Variationsprinzip zur Lösung von Dirichlet-Problemen bei Verwendung von Teilräumen, die keinen Randbedingungen unterworfen sind, Abh. Math. Sem. Univ. Hamburg 36(1):9–15, 1971, DOI 10.1007/BF02995904; for finite cells, M. Ruess, D. Schillinger, Y. Bazilevs, V. Varduhn, E. Rank, Weakly enforced essential boundary conditions for NURBS-embedded and trimmed NURBS geometries on the basis of the finite cell method, Int. J. Numer. Meth. Engng 95(10):811–846, 2013, DOI 10.1002/nme.4522. The parameter of a cell is twice the largest eigenvalue of the cell’s traction matrix against its stiffness, computed and not chosen: A. Embar, J. Dolbow, I. Harari, Imposing Dirichlet boundary conditions with Nitsche’s method and spline-based finite elements, Int. J. Numer. Meth. Engng 83(7):877–898, 2010, DOI 10.1002/nme.2863; that it grows without bound in a cell that holds a sliver of the face, F. de Prenter, C. Lehrenfeld, A. Massing, A note on the stability parameter in Nitsche’s method for unfitted boundary value problems, Comput. Math. Appl. 75(12):4322–4336, 2018, DOI 10.1016/j.camwa.2018.03.032. The surface quadrature of a triangle: M. G. Duffy, Quadrature over a pyramid or cube of integrands with a singularity at a vertex, SIAM J. Numer. Anal. 19(6):1260–1262, 1982, DOI 10.1137/0719090.
  • Ordering. Nested dissection of the cells, the separator the unknowns two halves share: A. George, Nested dissection of a regular finite element mesh, SIAM J. Numer. Anal. 10(2):345–363, 1973, DOI 10.1137/0710032; from the elements upward, as the direct solvers of hp finite elements order, M. Paszyński, D. Pardo, C. Torres-Verdín, L. Demkowicz, V. Calo, A parallel direct solver for the self-adaptive hp Finite Element Method, J. Parallel Distrib. Comput. 70(3):270–281, 2010, DOI 10.1016/j.jpdc.2009.09.007; the balance of a cut, R. J. Lipton, R. E. Tarjan, A separator theorem for planar graphs, SIAM J. Appl. Math. 36(2):177–189, 1979, DOI 10.1137/0136016, and R. J. Lipton, D. J. Rose, R. E. Tarjan, Generalized nested dissection, SIAM J. Numer. Anal. 16(2):346–358, 1979, DOI 10.1137/0716027.
  • Verification (crates/fcm/tests). The orders of convergence the tests measure on Lamé’s cylinder, h^(p+1) in the displacement and h^p in the stress, are those of halving the cells at a fixed degree p on a smooth solution (Szabó & Babuška 1991) and hold on cut cells: M. Dauge, A. Düster, E. Rank, Theoretical and numerical investigation of the finite cell method, J. Sci. Comput. 65(3):1039–1064, 2015, DOI 10.1007/s10915-015-9997-3; with supports by Nitsche’s method, E. Burman, P. Hansbo, Fictitious domain finite element methods using cut elements: II. A stabilized Nitsche method, Appl. Numer. Math. 62(4):328–341, 2012, DOI 10.1016/j.apnum.2011.01.008. The targets of the standard problems are those of the oracle’s cases (docs/verification.md): Lamé’s and Kirsch’s closed forms, NAFEMS LE1, MacNeal–Harder.

Volume meshing literature survey for FieldCraft (tet → hex)

Compiled 2026-10-13. Scope: watertight triangulated B-rep tessellation in, then (1) tetrahedral mesh by Delaunay methods with Voronoi/ODT improvement, then (2) all-hex and hex-dominant meshes.

How this was verified

  • DOIs. Every DOI below resolved through the DOI handle API (doi.org/api/handles/<doi> → responseCode 1). Each title, first author, year and venue was also checked against Crossref metadata. One wrong DOI was caught and fixed: 10.1145/276884.276889 is Amenta’s Voronoi filtering, and Shewchuk’s SoCG’98 paper is .276894.
  • Other URLs (author PDFs, arXiv, project pages, repos) returned HTTP 200 on 2026-10-13. Two exceptions: cs.nyu.edu/~yixinhu/tetwild.pdf (403) and zenodo.org/record/6642020 (403 to a scripted client, though the Zenodo REST API returned the record). Neither is used as a primary link; I cite the DOI instead.
  • Section numbers were read from the PDFs for: Shewchuk 1997, 1998, 2002; Klingner–Shewchuk; Labelle–Shewchuk; Diazzi 2021 and 2023; fTetWild; Attene 2020; Livesu 2021; Garanzha 2021; Pietroni survey; HexMe; DualCube. For any other paper I give no section number rather than guess one.
  • Licences come from GitHub/GitLab licence metadata, LICENSE files or README licence statements. I read no source code. “none” means the repo has no licence, which makes it all-rights-reserved: treat it as unreadable for a clean-room project, same as GPL.

Licence legend for associated code

StatusMeaning
READ OKPermissive (MIT, BSD, Apache-2.0, ISC, MPL-2.0 file-level, public domain). May be read for reference. Still re-implement from the paper.
FORBIDDENGPL, LGPL or AGPL. Do not open.
NO LICENCEAll rights reserved. Do not open.

Part A: Tetrahedral meshing

A0. Robust predicates and exactness (foundation for everything)

A0.1 Shewchuk 1997, adaptive-precision predicates. Verdict: build on.

  • Citation. J. R. Shewchuk. Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates. Discrete & Computational Geometry 18(3):305–363, 1997.
  • Links. DOI 10.1007/PL00009321. PDF: https://people.eecs.berkeley.edu/~jrs/papers/robustr.pdf
  • Method. Floating-point expansions (non-overlapping sums of doubles) with error-free transforms:
    • Two-Sum and Fast-Two-Sum (§2.3).
    • Expansion-Sum / Fast-Expansion-Sum (§2.4).
    • Two-Product with Dekker splitting (§2.5).
    • Scale-Expansion (§2.6).
    • Compression (§2.7).
    • Adaptive evaluation (§3): compute the determinant in plain doubles with a certified error bound. Escalate through increasingly exact stages only when the sign is uncertain.
  • Predicates. orient2d, orient3d, incircle and insphere, each with stage-wise error bounds (§4.2). §5 lists caveats: overflow, underflow, and the assumption of round-to-even IEEE arithmetic.
  • Problem solved. Exact sign of the core Delaunay predicates at near-double speed.
  • Robustness. Exact for inputs in double precision. It does not handle constructed points such as intersections or Steiner points; that is what A0.3 is for. It does not resolve true degeneracies (cospherical points); that is what A0.2 is for.
  • Complexity. Low to moderate: about 1–2k lines. The error-bound constants must be derived exactly as in the paper.
  • Code.
    • predicates.c at https://www.cs.cmu.edu/~quake/robust.html is public domain (the page says so explicitly): READ OK. The same page notes that Triangle is copyrighted and not public domain; don’t read it.
    • Rust port georust/robust (Apache-2.0, https://github.com/georust/robust): READ OK. Useful as a differential test oracle.
  • Why. Every downstream algorithm (Bowyer–Watson, CDT, refinement, octree/surface classification) assumes exact orient3d and insphere.

A0.2 Symbolic perturbation (Simulation of Simplicity). Verdict: build on.

  • Citations.
    • H. Edelsbrunner, E. P. Mücke. Simulation of Simplicity: a technique to cope with degenerate cases in geometric algorithms. ACM TOG 9(1):66–104, 1990. DOI 10.1145/77635.77639.
    • O. Devillers, M. Teillaud. Perturbations for Delaunay and weighted Delaunay 3D triangulations. CGTA 44(3):160–168, 2011. DOI 10.1016/j.comgeo.2010.09.010.
  • Method. When insphere is exactly zero, break the tie with a consistent symbolic perturbation. Devillers–Teillaud give a perturbation for insphere that needs only orient3d evaluations on sorted point indices. That is much simpler than general SoS.
  • Problem solved. Cospherical and coplanar inputs, which are ubiquitous in CAD tessellations (grids, cylinders, regular polygons). The Delaunay triangulation stays unique and the Bowyer–Watson cavity stays a star-shaped ball.
  • Complexity. Low, given A0.1.
  • Code. No code was read.

A0.3 Attene 2020, indirect predicates. Verdict: build on (from the paper only).

  • Citation. M. Attene. Indirect Predicates for Geometric Constructions. Computer-Aided Design 126:102856, 2020.
  • Links. DOI 10.1016/j.cad.2020.102856. arXiv: https://arxiv.org/abs/2105.09772
  • Method. Represent constructed points implicitly, never rounding them:
    • LPI: line–plane intersection.
    • TPI: three-plane intersection.
    • LNC: point on a segment.
  • Evaluation. Predicates on implicit points are expanded symbolically into homogeneous polynomials. They are then evaluated with a three-level filter (§5):
    • static/semi-static floating-point filter (§5.1);
    • interval arithmetic (§5.2);
    • exact expansions (§5.3).
  • The paper also covers caching (§5.4) and generating predicate code automatically from a description (§6).
  • Problem solved. Exact predicates on Steiner and intersection points without rational or bignum arithmetic. This is the enabling trick of A2.3 and A2.4.
  • Robustness. Exact. The cost grows with the “depth” of the construction, so the method is designed for one level of implicit points defined by explicit inputs.
  • Complexity. Moderate: about 3–5k lines, mostly generated. Write a small Rust code generator, as the paper does.
  • Code. MarcoAttene/Indirect_Predicates is LGPL-2.1: FORBIDDEN.
  • Reference alternative. Lévy’s PCK (next entry) is BSD.

A0.4 Lévy 2016, Predicate Construction Kit (PCK). Verdict: reference.

  • Citation. B. Lévy. Robustness and efficiency of geometric programs: The Predicate Construction Kit (PCK). Computer-Aided Design 72:3–12, 2016. DOI 10.1016/j.cad.2015.10.004.
  • Method. A code generator from a predicate formula to:
    • a semi-static filter;
    • an exact expansion fallback;
    • SoS for degenerate cases.
  • It is used in geogram’s Delaunay and restricted-Voronoi code.
  • Code. BrunoLevy/geogram is BSD-3-Clause (LICENSE file): READ OK, with one caveat. geogram vendors third_party/tetgen (AGPL) and third_party/triangle (non-free), and has wrappers delaunay/delaunay_tetgen.* and delaunay/delaunay_triangle.*. Never open those. Geogram’s own delaunay_3d.cpp, parallel_delaunay_3d.cpp, voronoi/RVD*.cpp, CVT.cpp and its numerics/PCK files are BSD.
  • Verdict reason. It is the best permissively licensed reference for a production Delaunay + RVD + predicate stack.

A0.5 Boundary surface preparation (implemented in fieldcraft-mesh::surface). Verdict: BUILD ON.

  • Guigue and Devillers 2003. P. Guigue, O. Devillers. Fast and Robust Triangle–Triangle Overlap Test Using Orientation Predicates. Journal of Graphics Tools 8(1):25–32, 2003. Triangle overlap decided from orient3d / orient2d signs alone, so it is exact on the A0.1 predicates. We use the equivalent edge–triangle reduction (two closed triangles meet exactly when an edge of one meets the other) and add the cases of triangles that share a vertex or an edge, which may meet only there.
  • Ericson 2005. C. Ericson. Real-Time Collision Detection. Morgan Kaufmann, 2005, ch. 6. Bounding volume hierarchies: top-down median-split construction and the self-collision traversal that pairs the triangles to test.
  • Jacobson, Kavan, Sorkine-Hornung 2013. Robust Inside-Outside Segmentation using Generalized Winding Numbers. ACM TOG 32(4):33, 2013. DOI 10.1145/2461912.2461916. The winding number of a vertex of one shell with respect to another tells nesting, so voids must face inwards.
  • van Oosterom and Strackee 1983. The Solid Angle of a Plane Triangle. IEEE Trans. Biomed. Eng. 30(2):125–126, 1983. DOI 10.1109/TBME.1983.325207. The triangle solid angle the winding number sums.

A0.6 Edge winding of a finished mesh (implemented in fieldcraft-mesh::tet::winding). Verdict: BUILD ON.

  • Hormann and Agathos 2001. K. Hormann, A. Agathos. The Point in Polygon Problem for Arbitrary Polygons. Computational Geometry 20(3):131–144, 2001. DOI 10.1016/S0925-7721(01)00012-8. The winding number of a closed polygon about a point is the signed count of its edges that cross a ray from it, each edge counted on a half-open interval. Round a tetrahedral mesh’s edge, the link of positive tetrahedra is such a polygon (each tetrahedron one step of less than half a turn); the gate counts the steps that cross the half-plane through one link vertex with exact orient3d signs (A0.1): one for an interior edge, none for a boundary edge.

A1. Delaunay construction

A1.1 Bowyer 1981 / Watson 1981, incremental cavity insertion. Verdict: build on.

  • Citations.
    • A. Bowyer. Computing Dirichlet tessellations. The Computer Journal 24(2):162–166, 1981. DOI 10.1093/comjnl/24.2.162.
    • D. F. Watson. Computing the n-dimensional Delaunay tessellation with application to Voronoi polytopes. The Computer Journal 24(2):167–172, 1981. DOI 10.1093/comjnl/24.2.167.
  • Method. Insert a point, find all tetrahedra whose circumsphere contains it (the cavity), delete them, and star the cavity boundary to the new point.
  • Robustness. With exact insphere/orient3d (A0.1) and SoS (A0.2) the cavity is always a star-shaped ball and the method never fails. With floating-point predicates it corrupts the mesh on degenerate CAD input.
  • Complexity. Low for the core. Practical speed needs:
    • BRIO insertion order: N. Amenta, S. Choi, G. Rote, Incremental constructions con BRIO, SoCG 2003, 211–219, DOI 10.1145/777792.777824. Use it together with Hilbert/Morton sorting.
    • Visibility or straight walking for point location: O. Devillers, S. Pion, M. Teillaud, Walking in a triangulation, IJFCS 13(2):181–199, 2002, DOI 10.1142/S0129054102001047.
    • A compact tet-adjacency array.
    • Termination of the visibility walk in a Delaunay triangulation: H. Edelsbrunner, An acyclicity theorem for cell complexes in d dimensions, Combinatorica 10(3):251–260, 1990, DOI 10.1007/BF02122779.
    • Hilbert index: J. Skilling, Programming the Hilbert curve, AIP Conf. Proc. 707:381–387, 2004, DOI 10.1063/1.1751381.
  • Code. For a permissive reference, see geogram delaunay_3d.cpp (BSD).
  • Implemented in fieldcraft-mesh::delaunay (ghost vertex for the hull, Devillers–Teillaud perturbation for cospherical points, exact verifier).

A1.2 Marot, Pellerin, Remacle 2019, “One machine, one minute, three billion tetrahedra”. Verdict: reference (later).

  • Citation. IJNME 117(9):967–990, 2019. DOI 10.1002/nme.5987.
  • Method. Parallel Delaunay kernel: domain partitioning on a space-filling curve, lock-free cavity work, cache-friendly data layout.
  • Use. Only once single-threaded correctness is nailed down.
  • Code. HXT lives inside Gmsh (GPL): FORBIDDEN.

A2. Boundary recovery: constrained or conforming Delaunay

A2.1 Shewchuk 2002, CDTs and provably good boundary recovery. Verdict: build on (theory).

  • Citation. J. R. Shewchuk. Constrained Delaunay Tetrahedralizations and Provably Good Boundary Recovery. Proc. 11th International Meshing Roundtable, 2002.
  • Links. No DOI exists. PDF: https://people.eecs.berkeley.edu/~jrs/papers/cdtbasic.pdf
  • Method. A PLC does not always have a CDT. If every segment is strongly Delaunay, a CDT exists. The paper protects edges by splitting them (§3 Edge Protection, §5 Provably Good Edge Protection) until this holds. Then it builds the CDT (§6), for example by incremental facet insertion (§7).
  • Problem solved. The existence theory behind every practical CDT code.
  • Robustness. Proven termination and existence. The provable protection inserts more Steiner points than needed.
  • Complexity. Medium.
  • Companion papers.
    • Shewchuk, General-dimensional constrained Delaunay and constrained regular triangulations I, DCG 39:580–637, 2008. DOI 10.1007/s00454-008-9060-3. PDF: https://people.eecs.berkeley.edu/~jrs/papers/cdtj1.pdf
    • Shewchuk, Updating and constructing CDTs by flips (SoCG 2003). PDF: https://people.eecs.berkeley.edu/~jrs/papers/cdtflip.pdf

A2.2 Si and Gärtner 2005; Si 2010; Si 2015; Shewchuk and Si 2014. Verdict: reference (papers only; TetGen is AGPL).

  • Citations.
    • H. Si, K. Gärtner. Meshing Piecewise Linear Complexes by Constrained Delaunay Tetrahedralizations. IMR 14, 147–163, 2005. DOI 10.1007/3-540-29090-7_9.
    • H. Si. Constrained Delaunay tetrahedral mesh generation and refinement. Finite Elements in Analysis and Design 46(1–2):33–46, 2010. DOI 10.1016/j.finel.2009.06.017.
    • H. Si. TetGen, a Delaunay-based quality tetrahedral mesh generator. ACM TOMS 41(2):11, 2015. DOI 10.1145/2629697.
    • J. R. Shewchuk, H. Si. Incrementally constructing and updating constrained Delaunay tetrahedralizations with finite-precision coordinates. Engineering with Computers 30:253–269, 2014. DOI 10.1007/s00366-013-0331-0. PDF (IMR’12 version): https://people.eecs.berkeley.edu/~jrs/papers/cdtupdate.pdf
  • Method.
    1. Delaunay tetrahedralization of the vertices.
    2. Segment recovery, with Steiner points placed using a protecting-ball rule that needs far fewer points than Shewchuk 2002.
    3. Face recovery by cavity retriangulation.
    4. Optional quality refinement (radius–edge bound) under the CDT.
  • Limitations.
    • Steiner points are rounded to doubles, which needs tolerances and can fail.
    • Diazzi et al. 2023 §3.5 (“Possible failures in tetgen”) also show a theoretical gap: cavity expansion can fail even in exact arithmetic (their Fig. 4).
  • Code. TetGen is AGPL: FORBIDDEN. Read the papers only.

A2.3 Diazzi, Panozzo, Vaxman, Attene 2023, robust CDT. Verdict: BUILD ON. This is the recommended boundary-recovery algorithm.

  • Citation. L. Diazzi, D. Panozzo, A. Vaxman, M. Attene. Constrained Delaunay Tetrahedrization: A Robust and Practical Approach. ACM TOG 42(6):181 (SIGGRAPH Asia), 2023.
  • Links. DOI 10.1145/3618352. arXiv: https://arxiv.org/abs/2309.09805
  • Method. Si–Gärtner’s pipeline with every Steiner point represented implicitly with indirect predicates (A0.3), so no geometric tolerance is ever needed.
    • Background, §3:
      • §3.1 problem statement;
      • §3.2 PLC characteristics;
      • §3.3 segment recovery;
      • §3.4 face recovery;
      • §3.5 TetGen failure modes.
    • Algorithm, §4:
      • §4.1 why exact rational numbers are not enough;
      • §4.2 rational Steiner points;
      • §4.3 implicit Steiner points (§4.3.1 indirect orient3d/inSphere);
      • §4.4 a modified gift-wrapping algorithm that replaces Si’s cavity expansion where that can fail;
      • §4.5 interior/exterior labelling;
      • §4.6 the full algorithm.
    • Rounding, §5.1: output can be rounded to floating-point coordinates afterwards.
  • Results. 100% success on the 4,408 valid Thingi10K models. The output conforms exactly to the input. It is parameter-free.
  • Problem solved. Exact boundary conformity, which CAE needs for face groups, contact pairs, shared interfaces between parts and boundary-condition tagging, together with a termination guarantee.
  • Limitations.
    • The input must be a valid PLC (no self-intersections). Fine for a B-rep tessellator that guarantees watertight, non-self-intersecting output. Otherwise run A2.4 or A2.5 first.
    • Rounding to doubles “almost always” stays valid but is not guaranteed. Keep implicit points through the quality phase, or round with a validity check.
    • Steiner counts can be large on nasty inputs. The paper notes about 9% of models needing over 50k.
  • Complexity. High: about 8–12k lines of Rust including the predicate generator. It is the single most valuable investment in the tet pipeline.
  • Code. MarcoAttene/CDT is GPL, or LGPL by build option (README): FORBIDDEN.
  • Implemented in fieldcraft-mesh::cdt from the paper only, with these choices:
    • Steiner points are LNC points (§4.3) on the original segment, a + t (b − a) with t a double; the in-sphere test on them is exact (interval filter, then exact dyadic integers) and perturbed with the same lexicographic lift as the Delaunay step, so Bowyer–Watson insertion of Steiner points stays consistent with it.
    • Facet recovery uses the modified gift-wrapping (§4.4) for every cavity, not only after Si’s cavity expansion fails: it is the always-correct path, and Si’s expansion is a speed-up. Condition (ii) is an exact proper-intersection test of closed simplices (separating plane through three of the vertices, then recursion into the contact plane), which handles the coplanar configurations of CAD tessellations; recovered facets inside a cavity stay constraints.
    • Reference points (§3.3) are searched among the tetrahedra whose boxes meet the missing subsegment’s box (they contain the tetrahedra the subsegment crosses); on the corpus this picks the same point as searching the whole diametral ball.
    • Rounding (§5.1): the flips of §5.1 run on the rounded coordinates (cdt::repair), decided by exact orient3d on the doubles: every tetrahedron that rounding (or nearly cospherical input) leaves flat, inverted or below FieldCraft’s validity criterion is targeted by edge removal and multi-face removal that never touch a segment, and a flat tetrahedron lying on one input triangle is deleted. What survives (a flat tetrahedron spanning two nearly coplanar input triangles: 1–65 per part on 7 corpus parts) is counted by the gate and removed by the quality stage, whose boundary is the B-rep faces rather than the input triangles.

A2.4 Diazzi and Attene 2021, convex polyhedral meshing. Verdict: reference.

  • Citation. L. Diazzi, M. Attene. Convex polyhedral meshing for robust solid modeling. ACM TOG 40(6):259, 2021.
  • Links. DOI 10.1145/3478513.3480564. arXiv: https://arxiv.org/abs/2109.14434
  • Method.
    1. Delaunay of the vertices.
    2. Map tets to the constraints they intersect (§3.3).
    3. Binary space partition of the tets by constraint planes, with implicit points (§3.4).
    4. Virtual constraints (§3.5).
    5. Identify constrained facets (§3.6).
    6. Partition cells into inside/outside (§3.7).
  • Output. A convex polyhedral mesh that conforms exactly even to self-intersecting input. It can be tetrahedralized afterwards.
  • Use for us. A repair path for dirty B-reps: overlapping faces, booleans, imported STEP/STL with intersections.
  • Code. MarcoAttene/VolumeMesher is GPL-3: FORBIDDEN.

A2.5 Hu et al. 2018, TetWild; Hu et al. 2020, fTetWild (envelope approach). Verdict: reference; use as a fallback design for dirty input.

  • Citations.
    • Y. Hu, Q. Zhou, X. Gao, A. Jacobson, D. Zorin, D. Panozzo. Tetrahedral Meshing in the Wild. ACM TOG 37(4):60, 2018. DOI 10.1145/3197517.3201353.
    • Y. Hu, T. Schneider, B. Wang, D. Zorin, D. Panozzo. Fast Tetrahedral Meshing in the Wild. ACM TOG 39(4):117, 2020. DOI 10.1145/3386569.3392385. arXiv: https://arxiv.org/abs/1908.03581
  • Method. The input surface may move within an ε-envelope:
    • §3.2 envelope test;
    • §3.3 preprocessing;
    • §3.4 incremental triangle insertion into a floating-point tet mesh. Each insertion is rejected if it would create an inverted tet;
    • §3.5 AMIPS-driven split/collapse/swap/smooth improvement that never leaves the envelope.
  • Results. fTetWild guarantees a valid floating-point output (TetWild produced rational coordinates that may invert after rounding). It meshes 98.7% of Thingi10K in under 2 minutes.
  • Limitations.
    • fTetWild does not guarantee every input triangle is in the output.
    • The output surface only approximates the input. Sharp features and face IDs must be re-projected.
    • That is acceptable for “meshes in the wild” but awkward for CAE, where face groups must match B-rep faces exactly.
  • Complexity. High.
  • Code.
    • wildmeshing/fTetWild is MPL-2.0: READ OK (its own src/; it pulls in geogram and libigl).
    • Original Yixin-Hu/TetWild is GPL-3.0 per GitHub metadata: FORBIDDEN.
    • wildmeshing/wildmeshing-toolkit is MIT: READ OK.

A2.6 Cherchi, Livesu, Scateni, Attene 2020, mesh arrangements. Verdict: reference (needed only for self-intersecting input).

  • Citation. Fast and robust mesh arrangements using floating-point arithmetic. ACM TOG 39(6):250, 2020. DOI 10.1145/3414685.3417818.
  • Method. Resolves all self-intersections of a triangle soup with indirect predicates.
  • Code. mlivesu/InteractiveAndRobustMeshBooleans is MIT per GitHub, a related later work. Caution: check whether it bundles Attene’s LGPL predicate headers before opening any file.

A3. Quality: Delaunay refinement, ODT/CVT, sliver removal

A3.1 Shewchuk 1998, tetrahedral Delaunay refinement; thesis 1997. Verdict: build on.

  • Citation. J. R. Shewchuk. Tetrahedral Mesh Generation by Delaunay Refinement. SoCG 1998, 86–95.

  • Links.

    • DOI 10.1145/276884.276894.
    • PDF: https://people.eecs.berkeley.edu/~jrs/papers/delref3d.pdf
    • Thesis: https://www.cs.cmu.edu/~quake-papers/delaunay-refinement.pdf
  • Method. Insert the circumcentres of tets whose radius–edge ratio exceeds B. Encroached subsegments are split first, then encroached subfacets.

  • Guarantee. Termination with B = 2 when input angles are at least 90°.

  • Limitations. It bounds radius–edge ratio, not dihedral angles. Slivers survive, so pair it with A3.3–A3.6. Small input angles, common in CAD, need the CDT-based variants: Si 2010 (A2.2), and Shewchuk & Si, SoCG 2014, DOI 10.1145/2582112.2582138.

  • Complexity. Medium, on top of A2.3.

  • Code. None read.

  • Implemented in fieldcraft-mesh::tet::refine: circumcentres of tetrahedra whose radius–edge ratio exceeds B = 2 (when their circumradius is at least half the local size) or whose circumradius exceeds 0.75 of the local size; a circumcentre outside the domain or inside a boundary face’s diametral sphere splits that face instead (at its circumcentre when inside it, else at its longest edge’s midpoint, a feature edge split when that edge is one), every boundary point projected onto its B-rep face or curve. Small input angles are handled by bounds rather than Si’s theory: faces below half the local size are not split, no vertex closer than 0.05 of the size to another, a tetrahedron whose point could not go in is not retried, caps on insertions and tetrahedra. Before refinement, edge collapse coarsens the boundary recovery’s dense Steiner points (X. Li, M. S. Shephard, M. W. Beall, 3D anisotropic mesh adaptation by mesh modification, CMAME 194(48–49):4915–4950, 2005). A collapse keeps the link condition (T. K. Dey, H. Edelsbrunner, S. Guha, D. V. Nekhayev, Topology preserving edge contraction, Publ. Inst. Math. (Beograd) (N.S.) 66(80):23–45, 1999), the boundary coned to one extra vertex as in the paper, so it never lays an edge or face onto one the mesh has.

A3.2 Cheng, Dey, Shewchuk, Delaunay Mesh Generation (CRC, 2012). Verdict: reference (the textbook).

  • Links. DOI 10.1201/b12987.
  • Use. The consolidated treatment of 3D refinement, small-angle handling and sliver theory. Buy it. Its chapters on smooth surfaces and piecewise-smooth complexes insert ridge (feature-curve) vertices on the exact curve. fieldcraft-mesh::tet follows that for its feature curves (A3.2a).

A3.2a Boivin and Ollivier-Gooch 2002, refinement on curved boundaries. Verdict: build on (curve splits).

  • Citation. C. Boivin, C. Ollivier-Gooch, Guaranteed-quality triangular mesh generation for domains with curved boundaries, IJNME 55(10):1185–1213, 2002. DOI 10.1002/nme.542.
  • Method. Ruppert-style Delaunay refinement whose boundary is curved: an encroached boundary segment is split at a point of the true curve, not of its chord, and the encroachment and quality guarantees are kept for curves discretized finely enough.
  • Use in FieldCraft. fieldcraft-mesh::tet (refinement, ODT smoothing and improvement) places every feature-curve vertex on the exact curve from its insertion on, wherever both faces’ exact surfaces are known (#674). Placed on the tessellation’s chord, a curve refined below the facet size left its vertices up to the chord’s sag off the curve, with the faces beside them meshed around that, and the final snap could not move them out without flattening elements. Face vertices stay on the tessellation until the final snap: projected onto the exact surfaces during improvement, vertices on both sides of a blend’s tangent edge come out too close to flat to separate.

A3.3 Alliez, Cohen-Steiner, Yvinec, Desbrun 2005, Variational Tetrahedral Meshing. Verdict: build on (ODT smoothing).

  • Citation. ACM TOG 24(3):617–625, 2005. DOI 10.1145/1073204.1073238.
  • Method. Minimize the ODT energy: the L1 error between the paraboloid and its piecewise-linear interpolant. Alternate between:
    • moving each interior vertex to the volume-weighted average of its incident tets’ circumcentres (closed form);
    • re-Delaunaying the connectivity.
  • Findings. ODT outperforms CVT for tet quality. Results improve with a sizing field.
  • Limitations.
    • Boundary vertices need special handling, and the paper’s boundary treatment is the weak point.
    • Slivers remain at the end. The paper uses a final perturbation/exudation pass.
  • Complexity. Low to moderate, given a Delaunay kernel.

A3.4 Chen and Xu 2004; Chen and Holst 2011, Optimal Delaunay Triangulations. Verdict: build on (theory and update formulas).

  • Citations.
    • L. Chen, J. Xu. Optimal Delaunay triangulations. J. Computational Mathematics 22(2):299–308, 2004. No DOI. Publisher page: https://ojs.global-sci.org/index.php/JCM/article/view/11631. Author page with PDF link: https://www.math.uci.edu/~chenlong/CX2004.html
    • L. Chen, M. Holst. Efficient mesh optimization schemes based on Optimal Delaunay Triangulations. CMAME 200(9–12):967–984, 2011. DOI 10.1016/j.cma.2010.11.007.
  • Method. The Delaunay triangulation minimizes the interpolation error of ‖x‖² over all triangulations of a point set. Chen–Holst give the exact and approximate vertex-update rules (ODT smoothing), including a boundary-aware variant.
  • Complexity. Low.

A3.5 Tournois, Wormser, Alliez, Desbrun 2009, Delaunay refinement interleaved with optimization. Verdict: build on (the overall schedule).

  • Citation. Interleaving Delaunay Refinement and Optimization for Practical Isotropic Tetrahedron Mesh Generation. ACM TOG 28(3):75, 2009. DOI 10.1145/1531326.1531381.

  • Method. Alternate Delaunay refinement and ODT/NODT smoothing. The refinement uses the radius–edge and boundary criteria. NODT is a Natural ODT variant for boundary vertices. Finish with sliver perturbation and exudation.

  • Results. Minimum dihedral angles are substantially better than refinement alone.

  • Problem solved. The practical recipe used by CGAL Mesh_3-style generators.

  • Complexity. Moderate.

  • Code. CGAL is GPL: FORBIDDEN. This paper is the readable source of the scheme.

  • Implemented in fieldcraft-mesh::tet::smooth as the density-weighted ODT update (Chen–Xu, Alliez et al.; weight h⁻³), interleaved with refinement in three rounds as in A3.5; boundary vertices move in their face’s tangent plane and are projected back onto the B-rep face, curve vertices move along their curve, corners stay. A move is kept when every tetrahedron stays positive and its star’s worst quality stays above min(old worst, sin 17.5°). Tetrahedra whose circumcentre is further than their longest edge from their centroid contribute their centroid instead.

A3.6 Klingner and Shewchuk 2007, Aggressive Tetrahedral Mesh Improvement. Verdict: BUILD ON (final sliver-removal stage).

  • Citation. B. M. Klingner, J. R. Shewchuk. IMR 16, 3–23, 2007.
  • Links. DOI 10.1007/978-3-540-75103-8_1. PDF: https://people.eecs.berkeley.edu/~jrs/papers/aggress.pdf
  • Method.
    • §2: quality measures. Use volume–length, or the minimum sine of dihedral angles.
    • §3, operations:
      • §3.1 optimization-based smoothing with an active-set method on the worst quality;
      • §3.2 edge removal;
      • §3.3 multi-face removal;
      • §3.4 vertex insertion;
      • §3.5 composites.
    • §4.2: hill-climbing schedule that accepts only operations improving the local minimum quality.
  • Results. Dihedral angles are usually between 31° and 149°, or 23°–136° with another objective.
  • Problem solved. Kills slivers that ODT and refinement leave behind. Works on any valid tet mesh.
  • Robustness. Monotone in worst quality, so it never makes the mesh worse.
  • Limitations. Slow. Boundary vertices are constrained.
  • Complexity. Moderate: edge removal requires Shewchuk’s dynamic programming over the edge ring. PDF: https://people.eecs.berkeley.edu/~jrs/papers/edge.pdf, not separately verified.
  • Code. The Stellar code’s licence was not verified, so it is not read.
  • Implemented in fieldcraft-mesh::tet::{ops, improve} from the two papers: Klincsek’s dynamic programming for edge removal (interior edges; boundary edges of one flat B-rep face end in a 2-2 flip; the triangulation never takes an edge the mesh has elsewhere, else a boundary vertex with three faces round it is flipped onto a face the mesh has), multi-face removal grown greedily over the sandwiched faces, nonsmooth optimization smoothing (active set, smallest vector of the convex hull of the active gradients, line search; gradients by central differences; a boundary vertex moves only while none of its faces turns by more than 30° or crosses another boundary face), and the composite vertex insertion with rollback (barycentres of boundary faces, of the tetrahedron, midpoints of boundary edges, and a point inside off a flat boundary edge). Deviations: the inserted vertex takes the Delaunay cavity rather than the optimal cut of §3.4; each pass smooths and flips the tetrahedra below sin 40° and inserts only when the worst did not improve; passes and the insertion list are capped. Objective: the smaller of the minimum dihedral sine and the scaled Jacobian at the worst corner weighted so that a Jacobian of 0.3 counts as a 30° dihedral angle: the sine misses needles (every dihedral angle fine, one corner nearly flat; Shewchuk 2002); the scaled Jacobian analysts check (Knupp 2001, B6.6) catches them, and with the weight it decides only near that limit. Every operation is a checked replacement of a region (positive by exact orient3d, faces matched with opposite orientation, removed vertices fully inside, no face or edge it makes held by a tetrahedron outside it, its new boundary faces meeting the rest of the boundary only in shared vertices by the exact triangle test of the surface checks, found through a grid of the boundary faces), so the mesh is valid after each step: two sheets of a thin run-out, hundredths of a millimetre apart, are not pushed through each other.

A3.7 Cheng, Dey, Edelsbrunner, Facello, Teng 2000, Sliver exudation. Verdict: reference.

  • Citation. J. ACM 47(5):883–904, 2000. DOI 10.1145/355483.355487.
  • Method. Assign weights to vertices so the weighted Delaunay triangulation contains no slivers. This gives a provable but tiny dihedral bound.
  • Use. Klingner–Shewchuk dominates it in practice. Useful as a cheap pass inside the A3.5 schedule.

A3.8 Labelle and Shewchuk 2007, Isosurface stuffing. Verdict: reference (useful only for organic, smooth domains).

  • Citation. ACM TOG 26(3):57, 2007.
  • Links. DOI 10.1145/1276377.1276448. PDF: https://people.eecs.berkeley.edu/~jrs/papers/stuffing.pdf
  • Method. BCC lattice plus snapping and warping with stencils (§3). It has guaranteed dihedral bounds (§4).
  • Limitations. It does not preserve sharp features, so it is wrong for CAD.
  • Code. crawforddoran/quartet is ISC: READ OK. Do not read alecjacobson/isostuffer (LGPL-3).

A4. Voronoi-based: CVT, restricted Voronoi diagrams, Lp-CVT

A4.1 Du, Faber, Gunzburger 1999; Du and Wang 2003. Verdict: reference.

  • Citations.
    • Centroidal Voronoi Tessellations: Applications and Algorithms. SIAM Review 41(4):637–676, 1999. DOI 10.1137/S0036144599352836.
    • Q. Du, D. Wang. Tetrahedral mesh generation and optimization based on centroidal Voronoi tessellations. IJNME 56(9):1355–1373, 2003. DOI 10.1002/nme.616.
  • Method. Lloyd relaxation toward a CVT. The dual Delaunay triangulation gives well-shaped tets apart from slivers.
  • Assessment. Alliez 2005 shows ODT beats CVT for tet quality, so CVT is not our tet smoother.

A4.2 Liu, Wang, Lévy, Sun, Yan, Lu, Yang 2009, CVT energy smoothness and quasi-Newton. Verdict: build on (the CVT solver).

  • Citation. ACM TOG 28(4):101, 2009. DOI 10.1145/1559755.1559758.
  • Method. The CVT energy is C². Minimize it with L-BFGS instead of Lloyd for an order-of-magnitude speedup.

A4.3 Yan, Lévy, Liu, Sun, Wang 2009 (restricted Voronoi diagram); Yan et al. 2013 (clipped Voronoi diagram). Verdict: build on (the RVD and clipped-VD kernel).

  • Citations.
    • Yan et al. Isotropic Remeshing with Fast and Exact Computation of Restricted Voronoi Diagram. CGF 28(5):1445–1454, 2009. DOI 10.1111/j.1467-8659.2009.01521.x.
    • D.-M. Yan, W. Wang, B. Lévy, Y. Liu. Efficient computation of clipped Voronoi diagram for mesh generation. CAD 45(4):843–852, 2013. DOI 10.1016/j.cad.2011.09.004.
  • Method. Compute the Voronoi diagram restricted to a surface (or clipped by a volume). Propagate over triangles and clip each against the bisector half-spaces of the nearest seeds (Sutherland–Hodgman).
  • Problem solved. The integration domain for surface remeshing and for CVT/Lp-CVT inside a closed volume.
  • Robustness. Exact with PCK-style predicates (geogram).
  • Complexity. Moderate.
  • Code. geogram voronoi/RVD*.cpp (BSD): READ OK.

A4.4 Lévy and Liu 2010, Lp Centroidal Voronoi Tessellation. Verdict: reference (hex-dominant point placement, superseded for that purpose by Sokolov 2016).

  • Citation. B. Lévy, Y. Liu. Lp Centroidal Voronoi Tessellation and its Applications. ACM TOG 29(4):119, 2010. DOI 10.1145/1778765.1778856.
  • Method. Replace the L2 CVT energy with an Lp norm in a local frame (anisotropy tensor). As p grows, Voronoi cells become cubes aligned to a field. Feature constraints come from integrating over the RVD of the surface and its sharp edges.
  • Use. Produces cube-like point sets for hex-dominant meshing.
  • Limitations. Non-convex energy. Needs a smooth frame field.

Part B: Hexahedral meshing

B0. Survey and benchmark (read first)

B0.1 Pietroni et al. 2022, survey. Verdict: reference (required reading).

  • Citation. N. Pietroni, M. Campen, A. Sheffer, G. Cherchi, D. Bommes, X. Gao, R. Scateni, F. Ledoux, J.-F. Remacle, M. Livesu. Hex-Mesh Generation and Processing: a Survey. ACM TOG 42(2):16, 2022.
  • Links. DOI 10.1145/3554920. arXiv: https://arxiv.org/abs/2202.12670
  • Structure.
    • §2.5 integer-grid maps;
    • §4.6 grid-based;
    • §4.7 polycube;
    • §4.8 frame fields;
    • §4.9 hex-dominant;
    • §5 topological operators;
    • §6 geometric optimization;
    • §8 open problems;
    • §9 resources.
  • Key quote (§4.6). Grid-based methods “really stand out in terms of robustness. To date, they are the only fully automatic methods capable of successfully hex-meshing any input shape… they are the only automatic methods currently implemented in professional software.” It also notes their cost: orientation dependence, intricate high-valence singular structure, and no coarse block structure.
  • §8.1. Frame-field methods are “limited to rather simple shapes” fully automatically. No characterization of hex-meshable fields exists. Polycube graph characterization is limited to 3-connected graphs and, in the Eppstein–Mumford form, genus 0.

B0.2 Beaufort, Reberol, Kalmykov, Liu, Ledoux, Bommes 2022, Hex Me If You Can (HexMe). Verdict: reference (benchmark, with a provenance caveat in C).

  • Citation. CGF 41(5):125–134 (SGP), 2022.
  • Links.
  • Contents. 189 tet meshes from 63 CAD models in three categories: simple, nasty and industrial. Each comes with feature tags.
  • Baseline result. A state-of-the-art frame-field → IGM → HexEx pipeline meshes all features correctly on only 19 of 189. On nasty and industrial shapes about half the meshes preserve under 1–8% of surfaces.
  • Why it matters. This is the evidence that frame-field methods are not production-ready for CAD.

B1. Grid / octree-based (robust family)

B1.1 Schneiders 1996. Verdict: reference (historical).

  • Citation. R. Schneiders. A grid-based algorithm for the generation of hexahedral element meshes. Engineering with Computers 12:168–177, 1996. DOI 10.1007/BF01198732.
  • Method. An octree with templates resolves hanging nodes (3-refinement). The boundary layer is projected onto the surface.

B1.2 Zhang and Bajaj 2006. Verdict: reference.

  • Citation. Adaptive and quality quadrilateral/hexahedral meshing from volumetric data. CMAME 195:942–960, 2006. DOI 10.1016/j.cma.2005.02.016.
  • Method. Dual contouring on an octree with templates, followed by quality improvement.

B1.3 Maréchal 2009, octree-based all-hex with sharp features. Verdict: reference (feature handling ideas).

  • Citation. L. Maréchal. Advances in Octree-Based All-Hexahedral Mesh Generation: Handling Sharp Features. IMR 18, 65–84, 2009. DOI 10.1007/978-3-642-04319-2_5.
  • Method. A 2-refinement octree. Hanging nodes are removed by dualization with flat transition schemes. Sharp features are captured by snapping dual vertices and by padding.
  • Significance. The basis of commercial octree hex meshers.
  • Limitation. The scheme set is incomplete: Livesu 2021 shows it misses some transitions.

B1.4 Gao, Shen, Panozzo 2019, Feature Preserving Octree-Based Hexahedral Meshing. Verdict: reference (pipeline design).

  • Citation. CGF 38(5):135–149 (SGP), 2019. DOI 10.1111/cgf.13795.
  • Pipeline.
    1. Octree refinement driven by surface approximation.
    2. Dual-based hex extraction.
    3. Feature-preserving surface projection.
    4. Padding.
    5. Global optimization that maximizes the minimum scaled Jacobian while fitting features.
  • Results. The authors report high robustness on a large dataset.
  • Code. gaoxifeng/Feature-Preserving-Octree-Hex-Meshing has NO LICENCE: do not read.

B1.5 Livesu, Pitzalis, Cherchi 2021, Optimal Dual Schemes for Adaptive Grid Based Hexmeshing. Verdict: BUILD ON (the core of the first hex mesher).

  • Citation. ACM TOG 41(2):15, 2022 (online 2021).
  • Links. DOI 10.1145/3494456. arXiv: https://arxiv.org/abs/2103.07745
  • Method, part 1.
    • Enumerates all transitions dual methods must handle (§4: §4.1 convex, §4.2 concave, §4.3 around corners).
    • Shows prior schemes miss some of them.
    • Gives the minimal scheme set with the simplest singular structure (§5).
  • Method, part 2.
    • Extends support from strongly to weakly balanced grids (§6; discussion in §7.1). Coarser meshes for the same accuracy.
    • Compares with Gao 2019 and Maréchal 2009 (§7.2).
    • Spells out the implementation details that earlier papers left implicit.
  • Robustness. Combinatorially complete for balanced grids, so the dual is always all-hex. Geometry (projection/padding/untangling) is outside the paper’s scope.
  • Limitations.
    • Most grid methods do not guarantee the output keeps the input’s genus or component count (survey §4.6).
    • Sharp features need a separate projection and optimization stage.
  • Complexity. Moderate: the schemes are tables plus a balancing pass.
  • Code. Integrated into mlivesu/cinolib, MIT (paper p. 2 and §8): READ OK. Do not open cinolib’s optional TetGen/Triangle wrappers if present.

B1.6 Pitzalis, Livesu, Cherchi, Gobbetti, Scateni 2021, Generalized Adaptive Refinement. Verdict: build on (refinement and balancing stage).

  • Citation. ACM TOG 40(6):257, 2021. DOI 10.1145/3478513.3480508.
  • Method. Generalizes balanced adaptive refinement so it works on any input hex mesh, not just a regular grid, with conforming templates and no dualization.
  • Use. Lets us refine a coarse aligned hex mesh, for example polycube output, as well as an octree.
  • Code. cg3hci/Gen-Adapt-Ref-for-Hexmeshing is MIT: READ OK.
  • Finding (2026-10). The reference pipeline chooses transition vertices with an integer linear program (Gurobi) and installs CinoLib’s schemes by heuristics that are retried with other parameters when they fail; neither was adopted (see B1.10).

B1.7 Schneiders, Algorithms for quadrilateral and hexahedral mesh generation (VKI lecture notes, 2000), §5. Verdict: built on (the transition templates of fieldcraft-mesh::octree).

  • Link. https://www.robertschneiders.de/papers/vki.pdf (author’s copy).
  • Method. 3-refinement driven by nodal marks: an element is split by the template of its marked corners, and faces split by their own marks only, so the refinement is conforming.
  • Limit (stated there). The 2D templates of the original set make some 3D mark patterns impossible: a hexahedron with seven marked corners has 51 boundary quads, an odd number, so no hexahedral mesh of it exists (Mitchell’s parity condition). Concave refined regions therefore need their concave cells refined. The fix is a modified edge rule (an edge with a marked end splits in three) with buffer layers in the face templates.
  • Finding (#85, 2026-10). Read in full (§5.3, Fig. 57–61). Under the modified rule the 256 mark patterns fall into 14 classes of split edges; the faces are plain, one-corner (5 quads), three-edge (template 2a, 10 quads) or full 3 × 3, so parity never fails and seven marks are the 27-split. The six-mark cell (a concave edge) is given only as a sketch (“the two trapezoidal faces become a dangling face”). Working it through: its two 2a faces both fold their three columns into the one unsplit edge, the cell corner there has five surface quads, and in the sheet structure the chord through the two trapezoids must cross a transverse sheet twice, so every hexahedral filling folds a sheet back on itself near that edge. No construction with usable quality was found, so the rule was not adopted.

B1.8 Ito, Shih, Soni 2009, Octree-based reasonable-quality hexahedral mesh generation using a new set of refinement templates. Verdict: reference.

  • Citation. IJNME 77(13):1809–1833, 2009. Templates for concave edges of the refined region (paper not obtained; cited after Tong and Zhang 2025).

B1.9 Tong, Halilaj, Zhang 2024, HybridOctree_Hex. Verdict: reference (buffer-zone rule adopted).

  • Citation. H. Tong, E. Halilaj, Y. J. Zhang, HybridOctree_Hex: Hybrid octree-based adaptive all-hexahedral mesh generation with Jacobian control, arXiv 2401.05984, 2024.
  • Method. Dual of a strongly balanced, paired octree with five templates (a 13-hexahedron frustum per transition face plus four transition-edge templates); a core cleared at the boundary so that the normals of the quads around each core boundary vertex lie in one half-space, then a buffer layer projected onto the surface and optimised.
  • Code. CMU-CBML/HybridOctree_Hex is BSD-3-Clause: READ OK (hard-coded template geometry, not adopted).

B1.10 Tong, Zhang 2025, MCHex. Verdict: reference (next boundary stage to evaluate).

  • Citation. H. Tong, Y. J. Zhang, MCHex: Marching cubes based adaptive hexahedral mesh generation with guaranteed positive Jacobian, arXiv 2511.02064, 2025.
  • Method. The same 3-refinement templates (B1.7); the boundary cells are cut by marching cubes on a signed distance field, every cut cell’s pieces are 3-regular polyhedra, and their midpoint subdivision gives hexahedra with a proven positive Jacobian (Bernstein coefficients) and a boundary that is pillowed by construction; 17 of the 31 cube cases are refined locally first.
  • Limits (stated there). Sharp edges and corners are lost (marching cubes smooths them), and the convex-only transitions over-refine. FieldCraft keeps the core-padding-pillow boundary with feature capture for CAD parts; MCHex’s cut cells are the candidate for organic shapes.

Implemented (fieldcraft-mesh::octree, mesh.hex.octree, 2026-10). B1.7 templates on a 27-tree refined by curvature, thickness and narrow faces; a core cleared by the B1.9 rule; the feature map of B1.4 (patches first); padding plus a pillow per patch (B1.4 §3.4); the B6.4 energy with a fitting term (B1.4 §3.5); the certified check of B6.6 with local repair. The dual schemes of B1.5 were not adopted (B1.6 finding); concave refined regions are closed by refinement (B1.7 limit), so curvature refines one level only. Since #85 the levels and root size are chosen before the grid is built, from the thinnest wall (measured to a facing wall only: a ray that leaves through the face beyond a convex edge measures how near the edge it started, not a wall) and the narrowest patch; a part beyond the levels or cells allowed fails at once with the numbers.

Quality rebuild in fieldcraft-mesh::octree (extends published work, #536). An extension of B1.4 §3.3, which refines and rebuilds only where a stage fails. What is FieldCraft’s own, measured on the meshing corpus (docs/meshing/corpus.md): a valid mesh with an element under a scaled Jacobian of 0.1 is also rebuilt, with the leaves around every element under 0.2 split once more, within the same attempt and growth caps; a rebuild is kept only while it raises the smallest scaled Jacobian, and once a valid mesh is in hand a failed rebuild returns it. The cells to split are ordered newest build first and, within a build, poorest element first; where the closed grid would pass the leaf cap, the largest prefix of them that fits (found by bisection) is used. That ordering and the budget are also our own; no paper prescribes them.


B2. Polycube maps

B2.1 Tarini, Hormann, Cignoni, Montani 2004, PolyCube-Maps. Verdict: reference (the concept).

B2.2 Gregson, Sheffer, Zhang 2011, All-hex mesh generation via volumetric polycube deformation. Verdict: reference.

  • Citation. CGF 30(5):1407–1416, 2011. DOI 10.1111/j.1467-8659.2011.02015.x.
  • Method. Rotation-driven volumetric deformation toward axis-aligned normals, then labelling, then hex sampling.
  • Limitation. Heuristic cleanup of invalid labellings.

B2.3 Livesu, Vining, Sheffer, Gregson, Scateni 2013, PolyCut. Verdict: reference.

  • Citation. ACM TOG 32(6):171, 2013. DOI 10.1145/2508363.2508388.
  • Links. Project: https://www.cs.ubc.ca/labs/imager/tr/2013/polycut/
  • Method. Graph-cut labelling with monotonicity. Applies the Eppstein–Mumford validity conditions.
  • Limitation. Not guaranteed to converge to a valid polycube (survey §4.7).

B2.4 Huang et al. 2014 (ℓ1 polycube); Fang et al. 2016 (closed-form induced polycube); Fu et al. 2016. Verdict: reference.

  • Citations.
    • Huang, Jiang, Shi, Tong, Bao, Desbrun. ℓ1-Based Construction of Polycube Maps from Complex Shapes. ACM TOG 33(3):25, 2014. DOI 10.1145/2602141.
    • Fang, Xu, Bao, Huang. All-hex meshing using closed-form induced polycube. ACM TOG 35(4):124, 2016. DOI 10.1145/2897824.2925957.
    • Fu, Bai, Liu. Efficient volumetric PolyCube-map construction. CGF 35(7):97–106, 2016. DOI 10.1111/cgf.13007.
  • Method. Deformation-based polycube construction with different energies.
  • Limitation. They “seldom converge to a topologically consistent polyhedron” without a valid guiding labelling (survey §4.7).

B2.5 Guo, Liu, Yan, Liu 2020, Cut-enhanced PolyCube-maps. Verdict: reference.

  • Citation. Cut-enhanced PolyCube-maps for feature-aware all-hex meshing. ACM TOG 39(4):106, 2020. DOI 10.1145/3386569.3392378.
  • Method. Interior cuts let polycubes align to features that a plain polycube cannot.

B2.6 Dumery, Protais, Mestrallet, Bourcier, Ledoux 2022, Evocube. Verdict: reference.

  • Citation. Evocube: a Genetic Labelling Framework for Polycube-Maps. CGF 41(6):467–479, 2022.
  • Links. DOI 10.1111/cgf.14649. arXiv: https://arxiv.org/abs/2205.00738
  • Method. Genetic search over labellings, scored by validity and distortion. Slow, and still with no guarantee.
  • Code. LIHPC-Computational-Geometry/evocube is GPL-3: FORBIDDEN.

B2.7 Protais, Reberol, Ray, Corman, Ledoux, Sokolov 2022, Robust Quantization for Polycube Maps. Verdict: build on (when polycube is built).

  • Citation. CAD 150:103321, 2022. DOI 10.1016/j.cad.2022.103321.
  • Method. Robust integer quantization of a polycube map’s chart sizes. Guarantees a valid hex layout from a valid labelling.
  • Code. fprotais/robustPolycube is AGPL-3: FORBIDDEN.

B2.8 Mandad, Chen, Bommes, Campen 2022, Intrinsic Mixed-Integer Polycubes. Verdict: reference.

B2.9 Snoep, Speckmann, Verbeek 2025, DualCube. Verdict: BUILD ON (when polycube is built). The first labelling method with a validity guarantee.

  • Citation. Robust Construction of Polycube Segmentations via Dual Loops. CGF 44(5):e70195 (SGP), 2025.
  • Links. DOI 10.1111/cgf.70195. arXiv: https://arxiv.org/abs/2402.00652
  • Method.
    • Work in the dual loop structure of a polycube. §3 gives the dual structure, its characterization and the valid modifications.
    • §4: start from a trivial polycube of the right genus, then iteratively add loops (§4.1) while keeping validity. Primalize into a segmentation (§4.2) and optimize the loop structure (§4.3).
    • §5.2 covers hex meshing.
  • Guarantee. “Guaranteed to return a valid polycube segmentation for 3D models of any genus.” It is valid at every iteration, so it can be stopped at any time.
  • Limitations. Quality and feature alignment trade against complexity. Feature preservation is weaker than with feature-driven labellings.
  • Companion. Polycubes via Dual Loops, arXiv https://arxiv.org/abs/2410.16865 (2024): the dual-loop characterization for arbitrary genus.
  • Code. The repo named in search results (maximsnoep/polycube-layouts-via-iterative-dual-loops) returned 404. Licence unknown.

B3. Frame fields and integer-grid maps (IGM)

B3.1 Nieser, Reitebuch, Polthier 2011, CubeCover. Verdict: reference (defines the IGM pipeline).

  • Citation. CubeCover – Parameterization of 3D Volumes. CGF 30(5):1397–1406, 2011. DOI 10.1111/j.1467-8659.2011.02014.x.
  • Method. Frame field → seamless volumetric parametrization whose integer iso-surfaces form hexes. It is the 3D analogue of Bommes, Zimmer, Kobbelt, Mixed-integer quadrangulation, ACM TOG 28(3):77, 2009, DOI 10.1145/1531326.1531383.

B3.2 Huang, Tong, Wei, Bao 2011, Boundary aligned smooth 3D cross-frame field. Verdict: reference.

  • Citation. ACM TOG 30(6):143, 2011. DOI 10.1145/2070781.2024177.
  • Method. Spherical-harmonic (SH) frame representation, which removes the octahedral-symmetry ambiguity.

B3.3 Li, Liu, Xu, Wang, Guo 2012, All-hex meshing using singularity-restricted field. Verdict: reference.

  • Citation. ACM TOG 31(6):177, 2012. DOI 10.1145/2366145.2366196.
  • Method. Local operations repair singularity graphs to be hex-meshable.

B3.4 Ray, Sokolov, Lévy 2016, Practical 3D frame field generation. Verdict: build on (only if the frame-field family is pursued).

  • Citation. ACM TOG 35(6):233, 2016. DOI 10.1145/2980179.2982408.
  • Method. SH-based smoothing with local Euler-angle optimization and boundary alignment. Fast and simple.

B3.5 Solomon, Vaxman, Bommes 2017, Boundary element octahedral fields. Verdict: reference.

B3.6 Liu, Zhang, Chien, Solomon, Bommes 2018, Singularity-constrained octahedral fields. Verdict: reference.

  • Citation. ACM TOG 37(4):93, 2018. DOI 10.1145/3197517.3201344.
  • Method. Enumerates local meshability conditions for valence-3 and valence-5 singular edges. Computes a field conforming to a given singularity graph.
  • Limitation. The singular graph is user- or heuristic-supplied.

B3.7 Corman and Crane 2019, Symmetric Moving Frames. Verdict: reference.

  • Citation. ACM TOG 38(4):87, 2019. DOI 10.1145/3306346.3323029.
  • Links. PDF: https://www.cs.cmu.edu/~kmcrane/Projects/SymmetricMovingFrames/paper.pdf
  • Method. Cartan’s moving frames. Frame fields with prescribed singularity graph and non-orthogonal frames, obtained as connection 1-forms with integrability constraints.

B3.8 Palmer, Bommes, Solomon 2020, Algebraic representations for volumetric frame fields. Verdict: reference.

  • Citation. ACM TOG 39(2):16, 2020.
  • Links. DOI 10.1145/3366786. arXiv: https://arxiv.org/abs/1908.05411
  • Method. Octahedral and odeco frames as varieties. Manifold-optimization (MBO-style) field computation. Supports non-orthogonal frames.

B3.9 Lyon, Bommes, Kobbelt 2016, HexEx; Kohler, Heistermann, Bommes 2025, HexHex. Verdict: reference (needed only for the frame-field family).

  • Citations.
    • HexEx: Robust Hexahedral Mesh Extraction. ACM TOG 35(4):123, 2016. DOI 10.1145/2897824.2925976.
    • HexHex: Highspeed Extraction of Hexahedral Meshes. ACM TOG 44(4), 2025. DOI 10.1145/3730940. Project: https://cgg.unibe.ch/publications/hexhex/
  • Method. Extract the hex mesh from an IGM, tolerating some defects (HexEx). HexHex assumes a locally injective map and is unconditionally robust, with about 30× speedup through a propeller data structure and conservative rasterization.
  • Code.
    • libHexEx is GPLv3 (RWTH page): FORBIDDEN.
    • cgg-bern/libHexHex LICENSE is GPL (header plus GPL.txt): FORBIDDEN.

B3.10 Brückler, Bommes, Campen: 3D motorcycle complex (CGF 2022), QGP3D (TOG 2022), cell-complex collapsing (TOG 2023), Integer-Sheet-Pump (CGF 2024). Verdict: reference.

  • Citations.
    • DOI 10.1111/cgf.14470: The 3D Motorcycle Complex for Structured Volume Decomposition, CGF 41(2):221–235.
    • DOI 10.1145/3528223.3530123: Volume parametrization quantization for hexahedral meshing, TOG 41(4):60.
    • DOI 10.1145/3618384: Collapsing Embedded Cell Complexes for Safer Hexahedral Meshing, TOG 42(6):205.
    • DOI 10.1111/cgf.15131: Integer-Sheet-Pump Quantization, CGF 43(5).
  • Method. Robust quantization of seamless volume maps into valid IGMs through the motorcycle complex.
  • Code. QGP3D, MC3D, TrulySeamless3D and C4HexMeshing are all GPL-3: FORBIDDEN.

B3.11 Liu and Bommes 2023, Locally Meshable Frame Fields. Verdict: reference (best current evidence of the family’s state).

  • Citation. ACM TOG 42(4), 2023. DOI 10.1145/3592457.
  • Result. Raises the valid-IGM success rate on HexMe “from 2% to 58%” (project page abstract). Local meshability is necessary but not sufficient.
  • Code. No code link on the project page.

B3.12 Nigolian, Campen, Bommes 2023, Expansion Cones. Verdict: reference (injective volumetric maps).

  • Citation. ACM TOG 42(4), 2023. DOI 10.1145/3592421.
  • Use. Relevant for polycube maps too.

B4. Loop- and sweep-based block decomposition

B4.1 Livesu, Pietroni, Puppo, Sheffer, Cignoni 2020, LoopyCuts. Verdict: reference.

  • Citation. LoopyCuts: Practical Feature-Preserving Block Decomposition for Strongly Hex-Dominant Meshing. ACM TOG 39(4):121, 2020. DOI 10.1145/3386569.3392472.
  • Method. Trace field-aligned surface loops, cut the volume along them into simple blocks, then mesh the blocks.
  • Guarantee. Strongly hex-dominant output, not all-hex.
  • Fit. Good for CAD with features.
  • Complexity. High.
  • Code. mlivesu/LoopyCuts has NO LICENCE: do not read.

B4.2 Reberol, Verhetsel, Henrotte, Bommes, Remacle 2023, all-hex boundary layers. Verdict: reference (CFD boundary layers later).

  • Citation. Robust Topological Construction of All-hexahedral Boundary Layer Meshes. ACM TOMS 49(1), 2023. DOI 10.1145/3577196.

B5. Hex-dominant via tet recombination or aligned points

B5.1 Meshkat and Talmor 2000. Verdict: reference.

B5.2 Yamakawa and Shimada 2003, rectangular-solid cell packing. Verdict: reference.

  • Citation. IJNME 57(15):2099–2129, 2003. DOI 10.1002/nme.754.
  • Method. Pack cells to place hex-friendly points, then recombine.

B5.3 Baudouin, Remacle, Marchandise, Henrotte, Geuzaine 2014, frontal hex-dominant. Verdict: reference.

  • Citation. Adv. Model. Simul. Eng. Sci. 1:8, 2014. DOI 10.1186/2213-7467-1-8.
  • Method. Frontal point insertion along a cross field, Delaunay of the points, then recombination.

B5.4 Botella, Lévy, Caumon 2016, tet recombination. Verdict: reference.

  • Citation. Indirect unstructured hex-dominant mesh generation using tetrahedra recombination. Comput. Geosci. 20(3):437–451, 2016. DOI 10.1007/s10596-015-9484-9.

B5.5 Sokolov, Ray, Untereiner, Lévy 2016, Hexahedral-Dominant Meshing. Verdict: reference (strong candidate for the hex-dominant product).

  • Citation. ACM TOG 35(5):157, 2016. DOI 10.1145/2930662.
  • Method.
    1. Frame field.
    2. Global parametrization, tolerating defects.
    3. Point set from the integer iso-values.
    4. Delaunay of the points.
    5. Recombine tets into hexes.
    6. Fill the rest with tets, prisms and pyramids.
  • Result. Robust hex-dominant output even where the parametrization is defective.
  • Code. Graphite is GPL-2: FORBIDDEN.

B5.6 Gao, Jakob, Tarini, Panozzo 2017, field-guided polyhedral agglomeration. Verdict: reference.

  • Citation. ACM TOG 36(4):114, 2017. DOI 10.1145/3072959.3073676.
  • Method. Instant-Meshes-style position field in 3D, giving a polyhedral, mostly-hex mesh.
  • Code. gaoxifeng/robust_hex_dominant_meshing is MIT: READ OK.

B5.7 Pellerin, Johnen, Verhetsel, Remacle 2018, vertex-based tet-to-hex identification. Verdict: build on (the recombination step).

  • Citation. Identifying combinations of tetrahedra into hexahedra: a vertex based strategy. CAD 105:1–10, 2018. DOI 10.1016/j.cad.2018.05.004.
  • Method. Enumerate all potential hexes in a tet mesh exhaustively from vertex neighbourhoods. This is faster and complete compared with pattern-matching on tet groups. A selection step (maximum compatible set) then follows.
  • Fit. Reuses our tet pipeline directly.
  • Code. Implemented in Gmsh (GPL): FORBIDDEN.

B5.8 Verhetsel, Pellerin, Remacle 2019, hexahedrizations of small quadrangulations. Verdict: skip for now (research).

  • Citation. Finding hexahedrizations for small quadrangulations of the sphere. ACM TOG 38(4):53, 2019. DOI 10.1145/3306346.3323017.

B6. Hex quality improvement and untangling

B6.1 Livesu, Sheffer, Vining, Tarini 2015, edge-cone rectification. Verdict: reference.

  • Citation. Practical hex-mesh optimization via edge-cone rectification. ACM TOG 34(4):141, 2015. DOI 10.1145/2766905.
  • Method. Local-global optimization that makes each corner’s edge cone well-shaped. It fixes inverted elements, with surface constraints.

B6.2 Xu, Gao, Chen 2018, edge-angle optimization. Verdict: reference.

  • Citation. Hexahedral mesh quality improvement via edge-angle optimization. Computers & Graphics 70:17–27, 2018. DOI 10.1016/j.cag.2017.07.002.
  • Note. This is the “Xu et al. 2018” hex improvement and untangling paper.

B6.3 Marschner, Palmer, Zhang, Solomon 2020, sum-of-squares hex repair. Verdict: reference.

  • Citation. Hexahedral Mesh Repair via Sum-of-Squares Relaxation. CGF 39(5):133–147, 2020. DOI 10.1111/cgf.14074.
  • Method. Polynomial (SOS) relaxation of the trilinear-hex Jacobian positivity. It certifies validity of the trilinear element, not just its corners.
  • Assessment. Heavy machinery, since it needs an SDP solver. Reference for the validity check: corner Jacobians are insufficient for trilinear hexes.

B6.4 Garanzha, Kaporin, Kudryavtseva, Protais, Ray, Sokolov 2021, Foldover-free maps in 50 lines of code. Verdict: BUILD ON (the untangler for every hex family and for polycube/IGM maps).

  • Citation. ACM TOG 40(4):102, 2021.
  • Links. DOI 10.1145/3450626.3459847. arXiv: https://arxiv.org/abs/2102.03069
  • Method.
    • §2.1: a variational barrier energy, with χ-regularization of det J.
    • §2.2: penalty method. ε_k is driven to zero (§4.2).
    • §2.3: L-BFGS resolution scheme.
  • Result. Untangles meshes reliably and is simple to implement. The paper reports it on a large benchmark (§3.1).
  • Code. ssloy/invertible-maps is AGPL-3: FORBIDDEN. The paper itself is enough, by design.

B6.5 Visualization and metrics. Verdict: reference.

  • HexaLab (MIT, https://github.com/mlivesu/HexaLab, https://www.hexalab.net) is READ OK. It is a hex quality viewer whose metrics match the literature’s.

B6.6 Element validity and quality metrics (implemented in fieldcraft-mesh::quality). Verdict: BUILD ON.

  • Johnen, Remacle, Geuzaine 2013. Geometrical validity of curvilinear finite elements. J. Comput. Phys. 233:359–372, 2013. The Jacobian determinant in Bernstein form is bounded by its coefficients, equals them at the vertices and converges under subdivision: a proof of det J > 0 on the whole element. We use it for every solid kind, including the trilinear hex whose corner Jacobians do not certify it (B6.3). (The paper’s authors also wrote Gmsh code, which stays forbidden; the paper is enough.)
  • Shewchuk 2002. What is a good linear finite element? Interpolation, conditioning, anisotropy, and quality measures. Unpublished preprint, https://people.eecs.berkeley.edu/~jrs/papers/elemj.pdf. Tet dihedral angles, radius ratio and aspect ratio; with Klingner–Shewchuk’s volume–length measure (A3.6).
  • Knupp 2001. Algebraic mesh quality metrics. SIAM J. Sci. Comput. 23(1):193–218. Corner-Jacobian scaled Jacobian and shape metrics for hexes, wedges and quads.

B7. Planar quadrilateral meshing

Shell (curved-face) quad meshing — advancing front in (u,v) with a cross field, recombination and cleanup — is surveyed separately in shell-quad-literature.md.

(implemented in fieldcraft-mesh::quad)

The face meshers under mapped and swept hex meshing and shell meshing. All quads on prescribed boundary nodes, so faces sharing an edge share its nodes. DOIs below were checked through doi.org/api/handles and Crossref on 2026-10-13; papers without a DOI are cited by venue only.

B7.1 Gordon and Hall 1973, transfinite interpolation. Verdict: BUILD ON (mapped meshing).

  • Citation. W. J. Gordon, C. A. Hall. Construction of curvilinear co-ordinate systems and applications to mesh generation. IJNME 7(4):461–477, 1973. DOI 10.1002/nme.1620070405.
  • Use. The bilinearly blended Coons map of a four-sided region, dimension-generic (quad::transfinite_grid), with arc-length blending parameters for unequal spacing on opposite sides.

B7.2 Free all-quad: the methods compared.

  • Paving. T. D. Blacker, M. B. Stephenson. Paving: a new approach to automated quadrilateral mesh generation. IJNME 32(4):811–847, 1991. DOI 10.1002/nme.1620320410. Verdict: reference. Best boundary rows; front collisions are its failure mode.
  • Q-Morph. S. J. Owen, M. L. Staten, S. A. Canann, S. Saigal. Q-Morph: an indirect approach to advancing front quad meshing. IJNME 44(9):1317–1340, 1999. DOI 10.1002/(SICI)1097-0207(19990330)44:9<1317::AID-NME532>3.0.CO;2-N. Verdict: reference (upgrade path for boundary alignment). Front states, side-edge recovery by swaps, seam closing.
  • Blossom-Quad. J.-F. Remacle, J. Lambrechts, B. Seny, E. Marchandise, A. Johnen, C. Geuzaine. Blossom-Quad: a non-uniform quadrilateral mesh generator using a minimum-cost perfect-matching algorithm. IJNME 89(9):1102–1119, 2012. DOI 10.1002/nme.3279. Verdict: reference (upgrade path for the matching). Paper only: the implementation lives in Gmsh, which is GPL and forbidden.
  • Recombination and split. C. K. Lee, S. H. Lo. A new scheme for the generation of a graded quadrilateral mesh. Computers & Structures 52(5):847–857, 1994. DOI 10.1016/0045-7949(94)90070-1. Verdict: BUILD ON. Triangles merged into quads, then every element split once, which makes the mesh all-quad whatever the merge found. The split topology is that of E. Catmull, J. Clark, CAD 10(6):350–355, 1978, DOI 10.1016/0010-4485(78)90110-0.
  • Why the split method. All-quad by construction given an even point count per loop; robustness is that of the constrained Delaunay triangulation (exists for every valid input; exact predicates); low implementation risk. Its cost is irregular nodes and 120° corners in triangle-born quads, reduced by smoothing. The reasoning in full is in the quad module docs.

B7.3 Planar constrained Delaunay triangulation and refinement. Verdict: BUILD ON.

  • A. Bowyer, Computing Dirichlet tessellations, Comput. J. 24(2):162–166, 1981, DOI 10.1093/comjnl/24.2.162; D. F. Watson, Computing the n-dimensional Delaunay tessellation…, Comput. J. 24(2):167–172, 1981, DOI 10.1093/comjnl/24.2.167.
  • S. W. Sloan. A fast algorithm for generating constrained Delaunay triangulations. Computers & Structures 47(3):441–450, 1993. DOI 10.1016/0045-7949(93)90239-A. Edge recovery by flipping.
  • J. Ruppert. A Delaunay refinement algorithm for quality 2-dimensional mesh generation. J. Algorithms 18(3):548–585, 1995. DOI 10.1006/jagm.1995.1021; J. R. Shewchuk, Delaunay refinement algorithms for triangular mesh generation, CGTA 22:21–74, 2002, DOI 10.1016/S0925-7721(01)00047-5. Used without segment splitting (boundary nodes are prescribed).

B7.3a Free triangle meshes on prescribed boundary nodes (free_tri_mesh, used by mesh.planar for tri3/tri6 2D models): the same constrained Delaunay triangulation of the full resolution loops, refined to the size by circumcentre insertion that never splits a boundary segment (J. Ruppert, A Delaunay refinement algorithm for quality 2-dimensional mesh generation, J. Algorithms 18(3):548–585, 1995, without segment splitting, so the boundary nodes stay the input points), Steiner points kept half the local spacing from the boundary.

B7.4 Smoothing and untangling of the quads. Verdict: BUILD ON.

  • L. A. Freitag. On combining Laplacian and optimization-based mesh smoothing techniques. AMD-Vol. 220, ASME 1997; S. A. Canann, J. R. Tristano, M. L. Staten, An approach to combined Laplacian and optimization-based smoothing for triangular, quadrilateral, and quad-dominant meshes, IMR 1998. Laplacian moves kept only when the worst element does not get worse.
  • L. A. Freitag, P. Plassmann. Local optimization-based simplicial mesh untangling and improvement. IJNME 49(1–2):109–125, 2000. DOI 10.1002/1097-0207(20000910/20)49:1/2<109::AID-NME925>3.0.CO;2-U. Untangling by maximizing the smallest (linear) corner area.

B7.5 Quadrilateral quality. Verdict: BUILD ON.

  • Knupp 2001 (B6.6) for the scaled Jacobian. J. Robinson, CRE method of element testing and the Jacobian shape parameters, Eng. Comput. 4(2):113–118, 1987, for aspect ratio and skew from the principal axes. Planar validity is exact: a planar bilinear quad’s Jacobian is affine in each reference coordinate, so four exact orient2d corner tests decide it.

B7a. Node relaxation of a finished mesh (implemented in fieldcraft-mesh::relax, mesh.node.relax)

  • Method. Smart Laplacian (S. Canann, J. Tristano, M. Staten, An approach to combined Laplacian and optimization-based smoothing for triangular, quadrilateral, and quad-dominant meshes, IMR 1998; L. Freitag 1997 above): a node’s weighted step toward the centroid of its edge neighbours is kept only when the worst element around it does not get worse and no element inverts, halved otherwise. Then one step up the gradient of the worst element’s quality (the active max–min element of Freitag and Ollivier-Gooch, IJNME 40, 1997; P. Knupp, IJNME 48, 2000), kept only when it raises the worst. Quality is the scaled Jacobian of crate::quality; validity its certified check.
  • Surface nodes in UV. A node on a B-rep face moves in the face’s own parameters (the displacement resolved on the surface’s coordinate directions, then the surface evaluated there), so it stays exactly on an analytic face; free-form faces fall back to projection onto the face’s tessellation (SolidCraft’s kernel exposes the analytic surfaces only). Nodes on a B-rep edge slide along it; vertex nodes are held; partition cut faces are not geometry, so their nodes move freely.
  • Relaxation fields. What a relaxation did is kept as the relaxed region’s cells before and after; a later mesh takes the displacement at each node’s parametric coordinates in the old cell holding it (barycentric or trilinear shape functions), slides it onto its face or edge, undoes any move that would invert an element, and smooths once (mesh.node.relax.apply, or reapply after every remesh).
  • Strong mode ("mode": "strong", fieldcraft-mesh::relax::morph). A mesh morph round the bad elements (scaled Jacobian below below): their movable corner nodes are grouped into clusters (nodes within the reach of each other, from a fixed-radius grid query); per cluster, the bad nodes first move to better places by a few sweeps of their own optimisation with the rest held (a central-difference gradient step with backtracking on Σ SJ⁻¹⁶ + ½ ln²(V/V₀) over their elements, an invalid element costing far more than any valid one), then that displacement is carried to every node within the reach by harmonic interpolation: the graph Laplacian of the element edges solved (Gauss–Seidel) with the bad nodes’ displacements and zero at held nodes and beyond the reach. Face nodes go back on their face (UV), edge and vertex nodes are held, nodes outside the reach do not move. A cluster’s morph is kept, at full or a halved scale, only when no more elements are invalid, the worst element it touches is no worse, the smooth objective Σ (1/SJ − 1)² there drops, and no element gets longer than the longest was; rounds repeat while any cluster is kept. The result never has a lower smallest SJ than the start.

B8. Mapped and swept hexahedral meshing (implemented in fieldcraft-mesh::hex)

mesh.hex.generate (and mesh.hex.sweep, mesh.hex.mapped, mesh.hex.blocks). Every method below is implemented from its paper; no code was read. DOIs marked “checked” were confirmed on 2026-10-13 through a repository record or the publisher; the others are cited by venue only.

B8.1 Blacker 1996, the Cooper tool. Verdict: BUILD ON (sweep recognition).

  • Citation. T. D. Blacker. The Cooper tool. Proc. 5th International Meshing Roundtable, 1996, pp. 13–29.
  • Use. Source, target and linking faces from B-rep topology: rings of logically rectangular linking faces followed from the source loops until they close on one target (hex::sweep). A closed (periodic) face the kernel gives whole, such as a cylinder’s side in one piece, takes part through its seam: the seam bounds the face on both sides, so its loop is the bottom chain, the seam, the top chain and the seam back, a logically rectangular linking face whose two sides are one edge (hex::brep, the kernel’s seams kept as edges from a face to itself); a torus in one face gets the level of its revolution from its meridian seam (hex::layered).

B8.2 Lai, Benzley, White 2000, many-to-many sweeping. Verdict: BUILD ON (multi-level extrusions).

  • Citation. M. Lai, S. Benzley, D. White. Automated hexahedral mesh generation by generalized multiple source to multiple target sweeping. IJNME 49(1–2):261–275, 2000.
  • Use. Imprinting every level’s outline into one projection plane so each region of the arrangement is a one-to-one column (hex::layered, hex::arrangement); here done in a straight or rotating frame, with the regions’ fill decided by the generalized winding number (Jacobson et al. 2013).

B8.3 Knupp 1998, next-generation sweep tool. Verdict: BUILD ON (residual correction).

  • Citation. P. M. Knupp. Next-generation sweep tool: a method for generating all-hex meshes on two-and-one-half dimensional geometries. Proc. 7th International Meshing Roundtable, 1998, pp. 505–513.
  • Use. The boundary residual of each layer’s map interpolated into the interior.

B8.4 Roca and Sarrate 2010, least-squares sweeping. Verdict: BUILD ON (inner nodes).

  • Citation. X. Roca, J. Sarrate. An automatic and general least-squares projection procedure for sweep meshing. Engineering with Computers 26(4):391–406, 2010. DOI 10.1007/s00366-009-0172-z (checked, repository record). Conference version: Proc. 15th IMR, 2006, pp. 487–506.
  • Use. Each layer’s interior nodes from the source mesh by the least-squares affine map of the source ring onto the layer’s ring (hex::sweep::Affine). Related: Roca, Sarrate, Huerta, A new least-squares approximation of affine mappings for sweep algorithms, Eng. Comput. 26(3):327–337, 2010.

B8.5 Interval assignment: Tam and Armstrong 1993; Mitchell 1997/2021. Verdict: BUILD ON.

  • Citations. T. K. H. Tam, C. G. Armstrong. Finite element mesh control by integer programming. IJNME 36:2581–2605, 1993. S. A. Mitchell. High fidelity interval assignment. Proc. 6th IMR, 1997 (IJCGA 10(4):399–415, 2000). S. A. Mitchell. Incremental interval assignment by integer linear algebra. International Meshing Roundtable 2021 (Zenodo 5559025); extended in Computer-Aided Design 158:103485, 2023.
  • Use. Division counts of all curves together: side equalities of mapped faces and linking faces, even (or multiple-of-four) loop sums, minimum loop sums, and dominance (Σ_A ≥ Σ_B + d: a side of a triangle primitive shorter than the other two together). hex::interval uses incremental repair from the rounded goals with increments only, chosen by squared relative error; it is bounded and reports an infeasible system instead of looping. Mitchell’s integer-linear-algebra solver (Hermite normal form plus nullspace improvement) is the upgrade if the increment-only scheme proves too coarse. A curve’s goal is its length in units of the size field, raised to a floor from the curve’s chordal deviation: the geometric size map of a curve (P. J. Frey, P.-L. George, Mesh Generation: Application to Finite Elements, 2nd ed., Wiley–ISTE, 2008), where a piece of radius ρ whose chord stays within the tolerance δ turns by at most 2 acos(1 − δ / ρ) (the angle whose sagitta is δ), so a curve gets ∫ dθ / (2 acos(1 − δ / ρ)) divisions (size::curve_divisions), with δ the chordal tolerance the boundary was tessellated with: the mesh strays from a curve no further than its tessellation, a large circle gets many divisions and a small fillet few. No piece turns by more than a quarter turn, so a whole circle in one edge keeps at least four (the sides of an O-grid’s block). The floor is a minimum of the assignment (hex::curve_goal).

B8.6 Whiteley, White, Benzley, Blacker 1996, submapping. Verdict: BUILD ON (vertex classification).

  • Citation. M. Whiteley, D. White, S. Benzley, T. Blacker. Two and three-quarter dimensional meshing facilitators. Engineering with Computers 12:144–154, 1996.
  • Use. Corners by interior angle (≤ 135° end, ≥ 225° reflex); cross-section regions are cut from their reflex corners to the boundary (B8.6b), which decomposes rectilinear sections into rectangles (an explicit form of submapping’s virtual decomposition), then mapped.

B8.6a Midpoint subdivision: Tam and Armstrong 1991; Li, Armstrong, McKeag 1997. Verdict: BUILD ON (triangle primitive).

  • Citations. T. K. H. Tam, C. G. Armstrong. 2D finite element mesh generation by medial axis subdivision. Advances in Engineering Software 13(5–6):313–324, 1991. T. S. Li, C. G. Armstrong, R. M. McKeag. Quad mesh generation for k-sided faces and hex mesh generation for trivalent polyhedra. Finite Elements in Analysis and Design 26(4):279–301, 1997.
  • Use. A cross-section region with three corners (a fillet’s quarter disk, a pocket corner cut off by a partition) is split by lines from a centre to one node on each side into three mapped blocks (hex::region, scheme Triangle): side k of n_k divisions splits into the counts of the two lines that end beside it, so each line has m_k = (n_{k+1} + n_{k+2} − n_k)/2 (an even loop, each side shorter than the other two together). The centre is the mean of the split nodes; the interior is then smoothed (quad::smooth) and every quadrilateral checked; a fold falls back to the free mesher.

B8.6b Automatic cross-section decomposition (medial-axis subdivision). Verdict: BUILD ON (blocks of 2.5D bodies).

  • Citations. Tam and Armstrong 1991 (B8.6a): a region is subdivided at its concave features and the branches of its medial axis into simple primitives. Li, Armstrong, McKeag 1997 (B8.6a): the primitives. Whiteley et al. 1996 (B8.6): vertex classification.
  • Use. hex::decompose cuts the regions of a multi-level sweep’s cross-section that no structured scheme fits into blocks, before interval assignment (B8.5), so the cuts are curves of the arrangement and their counts are assigned with the rest; nothing reaches the model. Per region: several holes are separated by lines across the gaps between neighbouring holes; a piece with one hole gets an O-grid, the layout (lines from the outer corners towards the hole or along their bisectors, from the hole’s corners, or along four directions from the hole) chosen by the score of its pieces; pieces without holes are cut by a two-ply search over lines from concave corners and fillets (bisector, edge extensions, normals of strongly turning curves) and convex corners’ bisectors. In place of the medial axis’s geometric rules each candidate is scored by meshing its pieces with their schemes (the smallest corner scaled Jacobian), preferring fewer free pieces, then less shortfall from 0.9, then fewer pieces. A region’s blocks are kept when fair (≥ 0.5) or no worse than its free mesh; cuts never end inside a seeded curve.

B8.7 Gordon and Thiel 1982, trivariate transfinite interpolation. Verdict: BUILD ON (mapped blocks).

  • Citation. W. J. Gordon, L. C. Thiel. Transfinite mappings and their application to grid generation. Applied Mathematics and Computation 10–11:171–233, 1982.
  • Use. Interior nodes of a logical cube from its six face grids (hex::mapped).

B8.8 Multi-block meshing of partitioned parts. Verdict: BUILD ON (conforming cells).

  • Citations. J. F. Thompson, B. K. Soni, N. P. Weatherill (eds.). Handbook of Grid Generation. CRC Press, 1999, ch. 3 (transfinite and algebraic grids) and ch. 13 (multiblock grids). A. Sheffer, M. Bercovier, T. Blacker, J. Clements. Virtual topology operators for meshing. IJCGA 10(3):309–331, 2000.
  • Use. hex::cells (mesh.hex.blocks): cells that meet face to face, each a logical cube after smoothly meeting faces are joined into composite faces (virtual topology); vertices, edges and faces shared by identity; interval assignment over all cells (B8.5); each edge divided once, each face’s transfinite grid made once and used by both cells; edges that leave a curved face graded from the spacing along it with a growth of 1.2 per element; interiors by B8.7. The merged mesh is checked for free internal faces.

B8.9 Support. Generalized winding number for the inside test (A. Jacobson, L. Kavan, O. Sorkine-Hornung, Robust inside-outside segmentation using generalized winding numbers, ACM TOG 32(4):33, 2013; solid angle of a triangle: Van Oosterom and Strackee 1983); closest point on a triangle (C. Ericson, Real-Time Collision Detection, 2005, §5.1.5).

B9. Projection blocking (implemented in fieldcraft-mesh::project)

A block topology is laid over the part and projected onto its B-rep instead of cutting the geometry into sweepable cells (the block-structured projection method as publicly described: blocks in index space, carved, outer faces projected onto surfaces, edges onto curves, vertices onto points, then smoothed). No code, manual or text of any commercial mesher was read.

  • Transfinite interpolation places face and interior nodes from projected edges and faces: W. J. Gordon, C. A. Hall, Construction of curvilinear co-ordinate systems and applications to mesh generation, IJNME 7(4):461–477, 1973; W. J. Gordon, L. C. Thiel, Transfinite mappings and their application to grid generation, Appl. Math. Comput. 10–11:171–233, 1982.
  • Elliptic smoothing: A. M. Winslow, Numerical solution of the quasilinear Poisson equation in a nonuniform triangle mesh, J. Comput. Phys. 2:149–172, 1967; J. F. Thompson, Z. U. A. Warsi, C. W. Mastin, Numerical Grid Generation: Foundations and Applications, North-Holland 1985 (ch. 6, the three-dimensional equations and their point iteration).
  • Control functions: P. D. Thomas, J. F. Middlecoff, Direct control of the grid point distribution in meshes generated by elliptic equations, AIAA J. 18(6):652–656, 1980 (one- dimensional form, evaluated on the algebraic grid).
  • Curve and corner projection: Newton’s method on the tangent planes of the two (three) surfaces, falling back to alternating projections (von Neumann) where they meet tangentially.
  • Worst-element repair: compass search on the local smallest scaled Jacobian (optimization- based smoothing, L. A. Freitag, C. Ollivier-Gooch, IJNME 40:3979–4002, 1997; metric: P. M. Knupp, SIAM J. Sci. Comput. 23(1):193–218, 2001).
  • Ring-and-pillow layout of a mesh plan (mesh.plan, #455): a swept body whose section is at an angle to the axes (a crank arm) is blocked as an annulus round each boss’s hole and a carved grid over the rest, with a layer of blocks inserted between the grid’s boundary and the walls it faces: pillowing, S. A. Mitchell, T. J. Tautges, Pillowing doublets: refining a mesh to ensure that faces share at most one edge, Proc. 4th International Meshing Roundtable, 231–240, 1995, here between a carved grid and the geometry, as the grid-based method projects its boundary layer onto the surface (B1.1, Schneiders 1996).

B10. Extrusion up to a surface (implemented in fieldcraft-mesh::hex::extrude_to, mesh.hex.extrude)

A quad section is carried along straight per-node paths and its last layer ends on target B-rep faces, so a region need not be sweepable between two parallel faces.

  • Path ends: Newton’s method on the tangent plane of the target’s closest point (the trimmed projection of B9), one step exact on a plane; side-face corners by alternating projections (J. von Neumann, Functional Operators, vol. II, Princeton 1950, ch. 13).
  • Interior nodes: straight paths plus the boundary’s displacement onto the side faces, interpolated by inverse-distance weights: the boundary-residual correction of P. M. Knupp, Next-generation sweep tool: a method for generating all-hex meshes on two-and-one-half dimensional geometries, Proc. 7th International Meshing Roundtable, 1998 (as in B8’s sweep); D. Shepard, A two-dimensional interpolation function for irregularly-spaced data, Proc. ACM National Conference 1968.
  • Layer grading: geometric progression of thicknesses (last over first = bias).

B11. Hex–tet transitions and decomposition proposals (implemented in fieldcraft-mesh::transition, mesh.cells, mesh.plan)

  • Pyramid transition layer: a pyramid on each quadrilateral of a hex mesh’s interface with a tetrahedral region, its apex inside the region, so tetrahedra share its triangular sides: S. J. Owen, S. A. Canann, S. Saigal, Pyramid elements for maintaining tetrahedra to hexahedra conformability, AMD Vol. 220, Trends in Unstructured Mesh Generation, ASME 1997, 123–129. The tet mesher keeps the pyramids’ sides as frozen boundary faces (A3’s refinement and improvement refuse to change them).
  • Pyramid element: L. Bedrosian, Shape functions and integration formulas for three-dimensional finite element analysis, IJNME 35(1):95–108, 1992 (rational functions, a collapsed Gauss rule).
  • Decomposition into sweepable cells: cutting a part so most of it sweeps and a remainder goes to a free mesher, as in T. D. Blacker, The Cooper Tool, Proc. 5th International Meshing Roundtable, 13–29, 1996 (B4, B8); here the remainder is the box round the features the provenance plan does not map.

Part C: Datasets and benchmarks

DatasetContentLicenceUsable for FieldCraft?
Thingi10K: Zhou & Jacobson 2016, arXiv https://arxiv.org/abs/1605.04797; site https://ten-thousand-models.appspot.com; tooling https://github.com/Thingi10K/Thingi10K10,000 STL meshes. 45% self-intersecting, 50% non-solid. The 4,408 “valid” subset is the standard tet-meshing robustness benchmark (fTetWild, Diazzi 2023).Tooling Apache-2.0. Each model has its own licence (10 licences, including CC-BY-NC and GPL). Filter by the license field.Conditionally. Use CC-BY / CC0 / public-domain models for robustness testing. Provenance risk: Thingiverse records no authoring tool, and many uploads were modelled in commercial CAD. Under the “no test data produced with commercial CAD products” rule this is an owner decision.
HexMe: DOI 10.5281/zenodo.6642020, https://hexme.algohex.eu189 tet meshes from 63 CAD models, with feature tags.Dataset CC-BY-4.0. The source models come from the ABC dataset (Onshape terms), GrabCAD (GrabCAD terms), MAMBO (Apache-2.0), and models made with Gmsh and Siemens NX (the paper’s own statement).Only a filtered subset. The ABC/Onshape, GrabCAD and Siemens NX models are produced with commercial CAD: exclude them. Gmsh-authored ones are acceptable as data.
MAMBO: https://gitlab.com/franck.ledoux/mamboSTEP models: basic, simple, medium. Designed for hex block-meshing evaluation.Apache-2.0Risky. The STEP headers I sampled say 'Spatial InterOp 3D' as originating system and authors 'Cubit 15.2' / 'MGX'. These are commercial or closed tools. Treat as commercial-CAD-produced unless the owner rules otherwise.
ABC: Koch et al., CVPR 2019, DOI 10.1109/CVPR.2019.00983, arXiv https://arxiv.org/abs/1812.06216, https://deep-geometry.github.io/abc-dataset/1M CAD models (B-rep and meshes).“Copyright of the CAD models is owned by their creators”, under Onshape Terms of Use. The models come from Onshape.No. Produced with a commercial CAD product, and the licence is not open. Skip.

Recommendation for test data. Build FieldCraft’s own corpus:

  • Generated cases. Parametric primitives plus booleans from our own kernel:
    • cubes and cylinders with holes;
    • fillets;
    • thin walls;
    • multi-material interfaces;
    • genus-n plates;
    • a “nasty” series modelled on HexMe’s categories by description, not by copying its models.
  • Analytic cases. Sphere and torus volumes, with exact volumes for checks.
  • Robustness stress. The CC-licensed Thingi10K subset, if the owner approves.
  • Hex-meshing claims. Report results on our own corpus. Report the HexMe Gmsh-authored subset separately.

Step 1: Robust predicates (weeks 1–3)

  1. Shewchuk adaptive orient2d, orient3d, incircle and insphere (A0.1, §2–§4).
    • Port the expansion primitives from the paper.
    • Use predicates.c (public domain) and georust/robust (Apache-2.0) only as differential oracles in tests.
  2. Devillers–Teillaud symbolic perturbation for insphere (A0.2).
  3. Indirect predicates for LPI/TPI implicit points (A0.3, §4–§5). Use a small build-time code generator that emits a floating-point filter, an interval filter and an expansion fallback. Model it on PCK (A0.4, BSD-readable). Do not use Attene’s LGPL code.
  4. Tests. Exhaustive near-degenerate fuzzing against an exact rational reference (num-rational / BigInt in tests only).

If wrong. Every later stage inherits silent topological corruption. This is the one stage where “almost right” is fatal.

Step 2: Delaunay plus boundary recovery (weeks 3–12)

  1. Bowyer–Watson with BRIO and Hilbert order, straight walking, and a compact adjacency array (A1.1).
  2. Boundary recovery: implement Diazzi et al. 2023 (A2.3).
    • Si–Gärtner segment recovery (§3.3) and face recovery (§3.4).
    • Implicit Steiner points (§4.3).
    • The gift-wrapping fallback (§4.4), which is mandatory: it closes the theoretical gap in TetGen.
    • Inside/outside labelling (§4.5).
    • Why CDT over the envelope approach. The B-rep tessellator gives a watertight, non-self-intersecting PLC. CAE needs exact face conformity: B-rep face IDs on boundary triangles, shared interfaces in assemblies, contact surfaces. CDT preserves this by construction. fTetWild (A2.5) does not preserve all input triangles.
  3. Keep fTetWild’s design (MPL-2.0, readable) as the documented fallback for imported dirty geometry. Do not build it now. Convex polyhedral meshing (A2.4) is the alternative if exact conformity on self-intersecting input is ever required.

If wrong. If the tessellator emits self-intersections (common at tolerant B-rep edges), the CDT rejects the input.

  • Mitigation. Run an exact self-intersection check before CDT.
  • Then route to repair. Use the arrangement method (A2.6), or the fTetWild path once it exists.

Step 3: Quality (weeks 12–18)

  1. Constrained Delaunay refinement with a radius–edge bound of about 2 and a sizing field (A3.1, A2.2/Si 2010 for small input angles).
  2. Interleave with ODT vertex smoothing following Tournois 2009 (A3.5). Use the Chen–Holst update formulas (A3.4) and keep boundary vertices on their B-rep faces.
  3. Final pass: the Klingner–Shewchuk schedule (A3.6, §3–§4.2). Smoothing, edge removal, multi-face removal and vertex insertion, monotone in worst quality.
  4. Targets. Report min/max dihedral angles and an FE quality metric. Use Shewchuk’s What is a good linear element?, PDF https://people.eecs.berkeley.edu/~jrs/papers/elemj.pdf, for the metric choice.
  5. CVT/RVD (A4.2–A4.3). Build only for surface remeshing and for Lp-CVT if needed later. Not for tet smoothing, where ODT is better.

If wrong. ODT alone leaves boundary slivers, which can make FE results wrong. Step 3.3 is the guard. Do not ship without it.

Step 4: Hex meshing. Build the grid/octree dual family first.

Order.

  1. (a) Octree dual all-hex. Livesu 2021 schemes (B1.5) with Pitzalis 2021 refinement (B1.6). Then the Gao 2019 stage list (B1.4): feature projection, padding layer, and global min-scaled-Jacobian optimization. Use the Garanzha 2021 untangler (B6.4) for any inverted elements. Validate with the Marschner 2020 insight (B6.3) that corner Jacobians do not certify trilinear hexes; use a subdivided or Bernstein Jacobian check.
  2. (b) Hex-dominant by recombination. Frame-field-aligned point placement:
    • Ray 2016 field (B3.4);
    • frontal or Sokolov-style points (B5.3/B5.5);
    • our own Delaunay;
    • Pellerin 2018 vertex-based hex identification (B5.7) and selection;
    • pyramids, prisms and tets for the rest. This reuses all of steps 1–3.
  3. (c) Polycube for blocky CAD parts.
    • DualCube labelling (B2.9): guaranteed valid.
    • Volumetric map with an injective solve (B6.4).
    • Robust quantization (B2.7, from the paper only).
    • Pitzalis refinement (B1.6) for grading.
  4. (d) Frame-field/IGM all-hex last, as R&D. All mature implementations are GPL. HexMe shows 19/189 fully correct outputs, and the best 2023 method reaches 58% valid IGMs.

Why octree first.

  • It is the only family with a robustness guarantee on arbitrary input (survey §4.6, quoted in B0.1).
  • It is the only family shipped in professional automatic hex meshers.
  • Every component has a permissive reference: CinoLib MIT for the dual schemes, Gen-Adapt-Ref MIT for refinement, geogram BSD.
  • A CAE customer gets a valid all-hex mesh for any part on day one, which polycube and frame-field methods cannot promise.

Risks per family.

FamilyMain riskMitigation
Octree dualPoor element quality at the boundary (low scaled Jacobian near concave features); orientation dependence; high element count; edges where more than 3 faces meet; genus not guaranteed (survey §4.6).Padding layer. Feature-aware projection plus global optimization (B1.4). Align the octree to the part’s principal axes. Weakly balanced grids (B1.5 §6) reduce element count. A topology check rejects genus changes.
Hex-dominant recombinationSolvers must support pyramids and prisms; hex ratio is often only 60–90%; pyramids hurt accuracy.Check the solver targets (Abaqus/Nastran element libraries support mixed meshes). Report the hex ratio honestly.
PolycubeHigh distortion on organic or highly non-axis-aligned parts; features at oblique angles are lost; the injective volumetric map can fail.Use only when the labelling distortion score is acceptable; otherwise fall back to octree. The Garanzha untangler handles the map.
Frame-field IGMLow success rate on CAD (HexMe, Liu & Bommes 2023); mixed-integer solves; all reference code is GPL.Treat as R&D. Keep it out of the critical path.

If the octree-first call is wrong. Customers wanting high-quality structured hex for thin-walled or extruded parts would find octree meshes too unstructured. The answer then is sweeping and block decomposition (LoopyCuts-style, B4.1), not frame fields. That family is not covered in depth here and would need a follow-up survey on sweeping and multi-sweeping.


Licence summary of associated code (metadata only; no source read)

Repo / codeLicenceStatus
Shewchuk predicates.cPublic domainREAD OK
Shewchuk TriangleProprietary (non-commercial)FORBIDDEN
georust/robustApache-2.0 (GitHub metadata)READ OK
BrunoLevy/geogramBSD-3, except third_party/tetgen (AGPL), third_party/triangle and the delaunay_tetgen/triangle wrappersREAD OK, with exclusions
wildmeshing/fTetWildMPL-2.0READ OK
wildmeshing/wildmeshing-toolkitMITREAD OK
Yixin-Hu/TetWildGPL-3.0FORBIDDEN
TetGenAGPLFORBIDDEN
CGAL, Gmsh (incl. HXT, recombination), NetgenGPL / LGPLFORBIDDEN
MarcoAttene/CDT, Delaunay3DGPL, or LGPL by optionFORBIDDEN
MarcoAttene/Indirect_PredicatesLGPL-2.1FORBIDDEN
MarcoAttene/VolumeMesherGPL-3FORBIDDEN
libigl/libiglMPL-2.0 core; GPL copyleft/ modules (GitHub reports GPL-3 because both licence files exist)Core READ OK; copyleft/ FORBIDDEN
mlivesu/cinolibMITREAD OK
cg3hci/Gen-Adapt-Ref-for-HexmeshingMITREAD OK
mlivesu/HexaLabMITREAD OK
crawforddoran/quartet (isosurface stuffing)ISCREAD OK
alecjacobson/isostufferLGPL-3FORBIDDEN
gaoxifeng/robust_hex_dominant_meshingMITREAD OK
gaoxifeng/Feature-Preserving-Octree-Hex-MeshingnoneNO LICENCE
mlivesu/LoopyCutsnoneNO LICENCE
LIHPC-Computational-Geometry/evocubeGPL-3FORBIDDEN
LIHPC-Computational-Geometry/dds-hexmeshing (HexMe-related workflow)MITREAD OK
fprotais/robustPolycube, ultimaille, marchinghexAGPL-3FORBIDDEN
ssloy/invertible-maps (foldover-free)AGPL-3FORBIDDEN
libHexEx (RWTH)GPLv3FORBIDDEN
cgg-bern/libHexHexGPLFORBIDDEN
HendrikBrueckler/QGP3D, MC3D, TrulySeamless3D, C4HexMeshingGPL-3FORBIDDEN
mlivesu/CoMISo (mixed-integer solver fork)GPL-3FORBIDDEN
Graphite (BrunoLevy/GraphiteThree)GPL-2FORBIDDEN
OpenVolumeMesh, CGoGNNot checked in this pass. Believed LGPL.Treat as FORBIDDEN until verified

Unverified items

  • Stellar (Klingner’s mesh improvement code): licence not checked.
  • https://people.eecs.berkeley.edu/~jrs/papers/edge.pdf: listed on Shewchuk’s page but not fetched.
  • The DualCube code repo: 404 at the name given in search results.
  • The HexMe workflow repo URL: not stated in the paper. dds-hexmeshing is a related LIHPC repo, not confirmed as the HexMe workflow.

Shell meshing literature survey for FieldCraft: quad and quad-dominant meshes of curved B-rep faces

Compiled 2026-10-13. Scope: all-quad and quad-dominant surface meshes of the curved faces (planes, cylinders, cones, spheres, tori, NURBS) of SolidCraft parts, meshed in each face’s (u,v) parameter space with metric correction and conforming across shared B-rep edges, for shell analysis (MITC4-class shells now, continuum shells on swept hexes in M8). This extends docs/meshing/literature.md §B7, which compared paving, Q-Morph and Blossom-Quad for planar faces only and chose CDT → greedy recombination → Catmull–Clark split (fieldcraft-mesh::quad).

Same format as docs/meshing/literature.md: per paper, citation, DOI/URL, method, problem solved, robustness/limits, complexity, code + licence, verdict. Part P is the opinionated plan.

How this was verified

  • DOIs. Every DOI below returned responseCode 1 from doi.org/api/handles/<doi> on 2026-10-13, and its title, authors, year, venue, volume and pages were checked against Crossref metadata. ACM TOG article numbers are omitted because Crossref does not carry them. Items without a DOI (Meshing Roundtable papers before 2007, preprints) are cited by venue with a URL that returned HTTP 200 on the same day, or are listed under “Unverified items”.
  • Read depth (stated per entry as Read:). full = I read the paper (PDF). abstract = abstract and metadata only. metadata = title/venue only; the method line is then the paper’s well-established content as cited by later papers, and I give no numbers or section numbers for it. Numbers quoted are from papers marked full.
  • Licences come from GitHub licence metadata and LICENSE/README files only. No source code was opened. Legend as in literature.md: READ OK (MIT, BSD, Apache-2.0, MPL-2.0), FORBIDDEN (GPL, LGPL, AGPL), NO LICENCE (all rights reserved; treat as forbidden). “BSD-3+” means BSD-3-Clause plus the “enhancements” paragraph (still permissive).
  • Commercial-product rule. Several reference papers validate on ABC (Onshape) or MAMBO (STEP files whose headers name commercial tools); see literature.md Part C. We cite their published numbers as evidence of the method’s state, never use their data.

Corrections found in passing

  1. docs/meshing/literature.md B7.2 cites A new scheme for the generation of a graded quadrilateral mesh (C&S 52(5), 1994) as “D. T. Lee, S. H. Lo”. Crossref gives C. K. Lee and S. H. Lo (C. K. Lee is the same author as S2.4 below). Fix the citation there.
  2. The task brief names “Lyon et al. QEx 2016”. QEx is Ebke, Bommes, Campen, Kobbelt 2013 (S7.6); Lyon, Bommes, Kobbelt 2016 is HexEx (volumetric, literature.md B3.9).

S0. Surveys and books (read first)

S0.1 Bommes, Lévy, Pietroni, Puppo, Silva, Tarini, Zorin 2013, Quad-mesh generation and processing: a survey. Verdict: reference (read first for the graphics side).

  • Citation. CGF 32(6):51–76, 2013. DOI 10.1111/cgf.12014. Read: metadata.
  • Use. Taxonomy of field-guided, parametrization-based, Voronoi/patch and remeshing methods; the vocabulary (cross field, singularity, integer-grid map, base complex) used in S4–S7.

S0.2 Campen 2017, Partitioning surfaces into quadrilateral patches: a survey. Verdict: reference.

  • Citation. CGF 36(8):567–588, 2017. DOI 10.1111/cgf.13153. Read: metadata.
  • Use. Layouts and block decompositions (S8), motorcycle graphs (S7.5).

S0.3 Frey and George 2008, Mesh Generation (2nd ed.); Lo 2014, Finite Element Mesh Generation. Verdict: reference (engineering side).

  • Citations. P. J. Frey, P.-L. George, ISTE/Wiley 2008, DOI 10.1002/9780470611166. S. H. Lo, CRC Press 2014, DOI 10.1201/b17713. Read: metadata.
  • Use. Parametric-surface meshing with the first fundamental form, metric Delaunay kernels, advancing front on surfaces, quad conversion. Lo is the author of S2.3–S2.4.

S0.4 Vaxman, Campen, Diamanti, Panozzo, Bommes, Hildebrandt, Ben-Chen 2016, Directional field synthesis, design, and processing. Verdict: reference (cross fields, S4).


S1. Direct advancing front of quadrilaterals (paving family)

S1.1 Blacker and Stephenson 1991, Paving. Verdict: reference (do not build).

  • Citation. T. D. Blacker, M. B. Stephenson. Paving: a new approach to automated quadrilateral mesh generation. IJNME 32(4):811–847, 1991. DOI 10.1002/nme.1620320410. Read: metadata (well known).
  • Method. Rows of quads are laid from the boundary inward. Front nodes are classified by their interior angle (row end, side, corner, reversal); rows are adjusted (wedges, tucks) for size changes; small angles are seamed; colliding fronts are detected by intersection tests and connected; the last void (six nodes or fewer) is closed by templates; then cleanup and smoothing.
  • Solves. Excellent boundary-parallel rows, few irregular nodes near the boundary: what analysts want around holes and edges.
  • Limits. Front collision and intersection handling is the failure mode, and each case is a special case. Every operation decides on floating-point geometry with no background structure to fall back on.
  • Complexity. High implementation complexity; intersection tests dominate run time.
  • Code. Implemented in Sandia CUBIT (not open source). None readable.

S1.2 Cass, Benzley, Meyers, Blacker 1996, Generalized 3-D paving. Verdict: reference.

  • Citation. Generalized 3-D paving: an automated quadrilateral surface mesh generation algorithm. IJNME 39(9):1475–1489, 1996. DOI 10.1002/(SICI)1097-0207(19960515)39:9<1475::AID-NME913>3.0.CO;2-W. Read: metadata.
  • Method. Paving directly on 3D surfaces: front directions from surface normals and tangents, every new node projected onto the surface, collision tests in 3D.
  • Relevance. The 3D alternative to meshing in (u,v). It avoids parametrization distortion but pays with projections and 3D intersection tests; in (u,v) the same tests become exact 2D predicates.

S1.3 White and Kinney 1997, Redesign of the paving algorithm. Verdict: reference.

  • Citation. D. R. White, P. Kinney. Redesign of the paving algorithm: robustness enhancements through element by element meshing. Proc. 6th International Meshing Roundtable, pp. 323–335, 1997. No DOI; the citation and page range are as listed in Sandia’s CUBIT reference list (not fetched as PDF). Read: metadata.
  • Method. Elements added one at a time instead of whole rows, which simplifies the bookkeeping and the collision cases.
  • Relevance. Even the paving authors’ group moved away from row-at-a-time logic for robustness.

S1.4 Staten, Owen, Blacker 2005, Unconstrained paving and plastering. Verdict: reference.

  • Citations. IMR 14 (2005) pp. 399–416, DOI 10.1007/3-540-29090-7_24; journal version (plastering) IJNME 81(2):135–171, 2010, DOI 10.1002/nme.2679. Read: metadata.
  • Method. The front bounds an unmeshed geometric void first; elements are formed later. It addresses collision by deferring connectivity.
  • Relevance. Historical: it shows the collision problem was still open for the direct family in 2005–2010.

S1.5 Ollivier-Gooch et al. 2025, Entire domain advancing-layer meshing. Part 1: two-dimensional and surface meshing. Verdict: watch.

  • Citation. SSRN preprint, 2025. DOI 10.2139/ssrn.5802502 (Crossref lists first author Ollivier-Gooch). Read: metadata only; not peer reviewed.
  • Relevance. A current advancing-layer approach covering whole surfaces, related to boundary-layer quads (a UBC thesis, “EDAMSurf”, is in the same line). Re-check when published.

S2. Indirect advancing front (Q-Morph and the Lo / Lee school)

S2.1 Owen, Staten, Canann, Saigal 1999, Q-Morph. Verdict: reference (the ideas we keep: front states, layer order, side-edge choice; the implementation we don’t build first).

  • Citation. Q-Morph: an indirect approach to advancing front quad meshing. IJNME 44(9):1317–1340, 1999. DOI 10.1002/(SICI)1097-0207(19990330)44:9<1317::AID-NME532>3.0.CO;2-N. Read: metadata (well known; IMR 1998 version: Advancing front quadrilateral meshing using triangle transformations).
  • Method. Start from a triangulation. Front edges carry a state (how many of the two side edges exist). For each front edge, choose side edges (an existing front edge when the angle allows, otherwise the triangle edge closest to the bisector, made by swaps or splits), recover the top edge by edge swaps, delete the enclosed triangles to form a quad, smooth locally, update the front. Fronts are processed layer by layer; seams close small angles; transition splits handle size changes.
  • Solves. Paving-quality boundary rows with collision handled by the background triangulation: opposing fronts meet in triangles that are always there.
  • Limits. Many cases (state transitions, edge recovery failing, odd closure leaving a triangle). On surfaces it inherits the triangulation’s quality and needs the recovery swaps to be valid on the surface.
  • Complexity. O(n) local operations after the triangulation; high implementation complexity.
  • Code. CUBIT (closed). Gmsh is not involved. None readable.

S2.2 Owen and Saigal 2000, Surface mesh sizing control. Verdict: build on (size field on faces).

S2.3 Lo 1989; Lau, Lo, Lee 1997; Lo and Lau 1998: quadrilaterals over curved surfaces. Verdict: reference.

  • Citations.
    • S. H. Lo. Generating quadrilateral elements on plane and over curved surfaces. C&S 31(3):421–426, 1989. DOI 10.1016/0045-7949(89)90389-1.
    • T. S. Lau, S. H. Lo, C. K. Lee. Generation of quadrilateral mesh over analytical curved surfaces. FEAD 27(3):251–272, 1997. DOI 10.1016/S0168-874X(97)00015-2.
    • S. H. Lo, T. S. Lau. Mesh generation over curved surfaces with explicit control on discretization error. Eng. Comput. 15(3):357–373, 1998. DOI 10.1108/02644409810208516.
    • Read: metadata for all three.
  • Method. Lo’s line: advancing-front triangulation then merging into quads, carried onto curved surfaces through their parametrization; the 1998 paper sizes elements by chordal (discretization) error.
  • Use. Engineering precedent for exactly our problem (quads on analytic and parametric surfaces). The chordal-error sizing is P3.3’s curvature term.

S2.4 C. K. Lee: metric advancing front on surfaces; indirect anisotropic quads. Verdict: build on (metric formulation); reference (algorithms).

  • Citations.
    • C. K. Lee, S. H. Lo. A new scheme for the generation of a graded quadrilateral mesh. C&S 52(5):847–857, 1994. DOI 10.1016/0045-7949(94)90070-1 (already the basis of quad::free).
    • C. K. Lee, R. E. Hobbs. Automatic adaptive finite element mesh generation over rational B-spline surfaces. C&S 69(5):577–608, 1998. DOI 10.1016/S0045-7949(98)80096-5.
    • C. K. Lee. Automatic adaptive mesh generation using metric advancing front approach. Eng. Comput. 16(2):230–263, 1999. DOI 10.1108/02644409910257494.
    • C. K. Lee. Automatic metric 3D surface mesh generation using subdivision surface geometrical model, Parts 1–2. IJNME 56(11):1593–1614 and 1615–1646, 2003. DOIs 10.1002/nme.630, 10.1002/nme.631.
    • Y. K. Lee, C. K. Lee. A new indirect anisotropic quadrilateral mesh generation scheme with enhanced local mesh smoothing procedures. IJNME 58(2):277–300, 2003. DOI 10.1002/nme.771.
    • Read: metadata for all.
  • Method. Advancing front in the (u,v) domain where every length is measured in a Riemannian metric built from the surface’s first fundamental form and the target size; then triangle merging into quads, with anisotropic (stretched) quads from an anisotropic metric.
  • Use. The metric-in-(u,v) formulation of P3.2 is this one (and Tristano 1998, S3.1).

S2.5 Zhu, Zienkiewicz, Hinton, Wu 1991; Johnston, Sullivan, Kwasnik 1991: early indirect methods. Verdict: reference.

  • Citations. Zhu et al., A new approach to the development of automatic quadrilateral mesh generation, IJNME 32(4):849–866, 1991, DOI 10.1002/nme.1620320411. Johnston et al., Automatic conversion of triangular finite element meshes to quadrilateral elements, IJNME 31(1):67–84, 1991, DOI 10.1002/nme.1620310105. Read: metadata.
  • Method. Zhu: advancing-front triangles generated in pairs and merged as the front advances (a precursor of Q-Morph’s “front of quads over triangles”). Johnston: post-hoc conversion of a triangulation by merging and splitting.

S2.6 Pellenard, Orbay, Chen, Sohan, Kwok, Tristano 2014, QMCF: Q-Morph cross field-driven quad-dominant meshing. Verdict: reference (closest published match to “Q-Morph + cross field”).

  • Citation. Procedia Engineering 82:338–350, 2014 (IMR 23). DOI 10.1016/j.proeng.2014.10.395. Open access (CC BY-NC-ND). Read: abstract (via search snippets; the publisher page refused a scripted client).
  • Method. Input: a triangulation of CAD surfaces and a size field. A cross field from principal curvature directions and boundary constraints steers Q-Morph: new front edges follow the cross field instead of growing orthogonally from the previous front, and fronts may start at interior points. Output is quad-dominant.
  • Relevance. Industrial authors (one of them co-wrote the 1998 parametric-space paper S3.1). Evidence that the 2010s path for Q-Morph was “add a cross field”, and that the result was quad-dominant, not all-quad, without a further step. No quantitative robustness data seen.

S3. Meshing in parameter space with a metric (the surface substrate)

S3.1 Tristano, Owen, Canann 1998, Advancing front surface mesh generation in parametric space using a Riemannian surface definition. Verdict: build on.

S3.2 Borouchaki, George, Hecht, Laug, Saltel 1997, Delaunay mesh generation governed by metric specifications. Verdict: build on (only if non-conformal parametrizations need an anisotropic Delaunay kernel).

  • Citation. Part I: FEAD 25(1–2):61–83, 1997, DOI 10.1016/S0168-874X(96)00057-1; Part II: FEAD 25:85–109, DOI 10.1016/S0168-874X(96)00065-0. Read: metadata.
  • Method. The Delaunay criterion evaluated in a local metric (anisotropic Bowyer–Watson cavity).
  • Caveat for FieldCraft. A metric in-circle test is not an exact predicate of the input coordinates; it may only decide point placement and which flip to try, never validity. Validity stays an exact orient2d sign in (u,v) (see P3.5).

S3.3 Borouchaki, Laug, George 2000, Parametric surface meshing using a combined advancing-front generalized-Delaunay approach. Verdict: reference.

S3.4 Rebay 1993, Efficient unstructured mesh generation by means of Delaunay triangulation and Bowyer–Watson algorithm. Verdict: build on (the frontal-Delaunay loop).

  • Citation. JCP 106(1):125–138, 1993. DOI 10.1006/jcph.1993.1097. Read: metadata.
  • Method. Triangles classified as resolved / active (front) / waiting; a new point is placed to make an ideal triangle on the front edge of the worst active triangle, inserted with Bowyer–Watson. A valid triangulation exists at every step, so fronts never “collide”: they meet inside a triangulation.
  • Use. The loop of S5.1 and of our P3.4. The existing quad::cdt already has Bowyer–Watson.

S3.5 Cuillière 1998, An adaptive method for the automatic triangulation of 3D parametric surfaces. Verdict: reference.

S3.6 Remacle and Geuzaine 2022, Gmsh’s approach to robust mesh generation of surfaces with irregular parametrizations. Verdict: build on (pole handling). Paper only (Gmsh is GPL).

  • Citation. In Mesh Generation and Adaptation, SEMA SIMAI Springer Series 30, pp. 95–112, 2022. DOI 10.1007/978-3-030-92540-6_5. IMR 2019 version (HTTP 200): https://www.internationalmeshingroundtable.com/assets/papers/2019/23-Remacle.pdf. Read: abstract.
  • Problem. Singular parametrizations from CAD (sphere poles, cone apexes, surfaces of revolution touching their axis): one boundary edge of the (u,v) domain maps to one 3D point.
  • Method. Triangles at the singular point are treated as trapezoids with one collapsed edge.
  • Use. Directly relevant: SolidCraft spheres and revolved faces have poles. For an all-quad mesh, the elements at a pole become degenerate quads; P3.1 gives our handling (chart switch) and this is the reference for the alternative.

S3.7 Remacle et al. 2010; Marchandise et al. 2011, 2012; Beaufort, Geuzaine, Remacle 2020: reparametrization. Verdict: reference (fallback chart for faces whose native parametrization is unusable). Papers only.

  • Citations. Remacle, Geuzaine, Compère, Marchandise, High-quality surface remeshing using harmonic maps, IJNME 83(4):403–425, 2010, DOI 10.1002/nme.2824. Marchandise, Remacle, Geuzaine, Optimal parametrizations for surface remeshing, Eng. Comput. 30(3):383–402, 2014 (online 2012), DOI 10.1007/s00366-012-0309-3. Beaufort, Geuzaine, Remacle, Automatic surface mesh generation for discrete models – a complete and automatic pipeline based on reparameterization, JCP 417:109575, 2020, DOI 10.1016/j.jcp.2020.109575, arXiv https://arxiv.org/abs/2001.02542. Read: abstract (2020).
  • Method (2020). Split a triangulation into patches, give each a one-to-one discrete parametrization (mean-value coordinates; proved one-to-one iff every parametric triangle has positive area), then mesh in that chart.
  • Use. The fallback chart (P3.1) when a face has no usable native (u,v): the face’s tessellation from BoundarySurface gets a discrete chart. The one-to-one check is an exact orient2d per triangle. Floater, Mean value coordinates, CAGD 20(1):19–27, 2003, DOI 10.1016/S0167-8396(03)00002-5.

S3.8 Chae, Park, Choi 2006, Mesh generation on poorly parameterized free-form surfaces. Verdict: reference (risk evidence).

  • Citation. Proc. IMechE B 220(2):295–306, 2006. DOI 10.1243/095440506X77634. Also Chae and Kwon, Quadrilateral mesh generation on trimmed NURBS surfaces, KSME Int. J. 15(5):592–601, 2001 (KoreaScience page HTTP 200: https://koreascience.or.kr/article/JAKO200111920737275.page). Read: abstract.
  • Problem. NURBS with bad parametrization (uneven knots, near-degenerate derivatives) make (u,v) meshers fail or produce ill-conditioned meshes; their fix is to regenerate the surface.

S4. Cross fields (orientation for alignment)

S4.1 Knöppel, Crane, Pinkall, Schröder 2013, Globally optimal direction fields. Verdict: build on (field computation on curved faces).

  • Citation. ACM TOG 32(4), 2013. DOI 10.1145/2461912.2462005. Read: metadata.
  • Method. The smoothest n-direction field (n = 4 for crosses) on a triangulated surface from one sparse linear solve (or a small eigenproblem) of a connection Laplacian; boundary alignment as a constraint. Handles curvature correctly through the discrete connection.
  • Code. geometry-central (nmwsharp/geometry-central) is MIT: READ OK (it implements this paper).
  • Why this one. One linear solve, no mixed-integer step; the connection makes it correct on curved faces where a plain (u,v) angle field is not.

S4.2 Remacle et al. 2013 (cross field part), Beaufort et al. 2017, Viertel and Osting 2019: Ginzburg–Landau / harmonic cross fields. Verdict: reference (the CAD-meshing variant of S4.1).

  • Citations. Beaufort, Lambrechts, Henrotte, Geuzaine, Remacle, Computing cross fields: a PDE approach based on the Ginzburg–Landau theory, Procedia Eng. 203:219–231, 2017, DOI 10.1016/j.proeng.2017.09.799. Viertel, Osting, An approach to quad meshing based on harmonic cross-valued maps and the Ginzburg–Landau theory, SISC 41(1):A452–A479, 2019, DOI 10.1137/17M1142703. Read: metadata.
  • Method. Represent the cross by (cos 4θ, sin 4θ); solve Laplace with boundary-aligned Dirichlet data (Remacle 2013, S5.1: two Laplace solves, valid as-is only for conformal charts), or relax the unit-norm constraint with a Ginzburg–Landau penalty and alternate diffusion and normalization (the MBO-style scheme that Reberol 2021, S5.4, uses per CAD face on edges with Crouzeix–Raviart interpolation).

S4.3 Ray, Vallet, Li, Lévy 2008; Palacios and Zhang 2007: N-symmetry field design. Verdict: reference.

  • Citations. Ray et al., ACM TOG 27(2), 2008, DOI 10.1145/1356682.1356683. Palacios, Zhang, Rotational symmetry field design on surfaces, ACM TOG 26(3), 2007 (DOI not re-checked; see Unverified).

S4.4 Panozzo, Puppo, Tarini, Sorkine-Hornung 2014, Frame fields; Jiang et al. 2015, metric customization; Desobry et al. 2021, non-orthogonal frame fields. Verdict: reference (anisotropic shells later).

  • Citations. ACM TOG 33(4), 2014, DOI 10.1145/2601097.2601179. Jiang, Fang, Huang, Bao, Tong, Desbrun, ACM TOG 34(4), 2015, DOI 10.1145/2766927. Desobry, Coudert-Osmont, Corman, Ray, Sokolov, CAD 139:103081, 2021, DOI 10.1016/j.cad.2021.103081. Read: metadata.
  • Use. Anisotropic and non-orthogonal frames (stretched quads along fillets and stiffener runs). Not needed for isotropic shells v1.

S4.5 Dielen et al. 2021; Dong et al. 2025 (NeurCross): learned cross fields. Verdict: ignore for now.

  • Citations. CGF 40(5):181–191, 2021, DOI 10.1111/cgf.14366; ACM TOG 44(4), 2025, DOI 10.1145/3731159. No determinism or robustness guarantee; trained on third-party data.

S5. Cross-field-guided frontal point insertion (the modern “marching front”)

S5.1 Remacle, Henrotte, Carrier-Baudouin, Béchet, Marchandise, Geuzaine, Mouton 2013, A frontal Delaunay quad mesh generator using the L∞ norm (“Delquad”). Verdict: BUILD ON (core of the point placement). Paper only: implementation is in Gmsh (GPL).

  • Citation. IJNME 94(5):494–512, 2013. DOI 10.1002/nme.4458. Preprint (HTTP 200): http://gmsh.info/doc/preprints/gmsh_quad2_preprint.pdf. Read: full (preprint; numbers below are the preprint’s and may differ slightly in the journal version).
  • Method.
    • §2: meshing in (u,v) with the metric tensor M = [S_u·S_u, S_u·S_v; S_v·S_u, S_v·S_v]; for a conformal parametrization the (u,v) size is δ’(u) = δ(x(u)) |det M|^(−1/4). Non-conformal faces are reparametrized (§2 says so explicitly).
    • §3: cross field by two Laplace solves for cos 4θ, sin 4θ with boundary-aligned Dirichlet data.
    • §4–§5: frontal-Delaunay (Rebay, S3.4) in which sizes and the “ideal” new point are measured in the L∞ norm in the local cross-field frame. A right isosceles triangle is equilateral in L∞, so the triangulation is made of nearly right triangles aligned with the field, with √3/2 ≈ 0.866 times the vertices of an equilateral one (the measured ratio was 0.87). Fronts are processed layer by layer. Connection uses the ordinary L2 Delaunay kernel (§5: the L∞ and L2 Delaunay triangulations differed by 5 flips on their example).
    • §7: recombination with Blossom-Quad (S6.2).
  • Results (preprint). Car hood (18 Bézier faces): Delquad + Blossom gives mean quad quality 0.90, worst 0.37, 81% of vertices of valence 4, versus 0.77 / 0.37 / 71% for an ordinary frontal triangulation recombined the same way (Fig. 17). Mechanical part, 114 faces, 66,998 quads in 40 s including cross fields and reparametrization: mean 0.95, worst 0.1, 91% valence-4 (§8.1). Quality measure (§6.1): η = max(1 − (2/π)·max_k |π/2 − α_k|, 0).
  • Robustness. Inherits Delaunay’s “a valid mesh exists at every step”: no front collision cases.
  • Limits. Conformal-parametrization assumption; recombination may leave triangles unless a perfect matching exists; irregular vertices where fronts meet (§7).
  • Complexity. Same as frontal-Delaunay triangulation, O(n log n); “tens of thousands of elements a minute” (§1) in 2010-era hardware.
  • Why it matters here. It is a marching front, but one whose collisions cannot fail, and it is a small change to machinery FieldCraft already has (Bowyer–Watson, constrained recovery, recombination).

S5.2 Georgiadis, Beaufort, Lambrechts, Remacle 2017, High quality mesh generation using cross and asterisk fields. Verdict: reference.

  • Citation. arXiv https://arxiv.org/abs/1706.02236, 2017. Read: abstract.
  • Method. Points generated by an advancing front along the cross field using only the background mesh, multi-threaded; right-angled triangulations recombined with Blossom-Quad, with a right-triangle quality criterion relative to the local cross.

S5.3 Pellenard et al. 2014, QMCF. See S2.6 (the Q-Morph route to the same goal).

S5.4 Reberol, Georgiadis, Remacle 2021, Quasi-structured quadrilateral meshing in Gmsh: a robust pipeline for complex CAD models. Verdict: BUILD ON (the pipeline shape and the cleanup). Paper only (Gmsh is GPL).

  • Citation. arXiv https://arxiv.org/abs/2103.04652, 2021 (no journal version found in Crossref/DBLP). Read: full (HTML version).
  • Pipeline (§1.1). (1) scaled cross field per CAD face on an initial triangulation (§3: MBO-style heat diffusion + normalization, multi-level, boundary-aligned Dirichlet; conformal scaling H from min ∫|∇H − ∇⊥θ|², size h = e^H); (2) global size map from prescribed sizes, small CAD features and the cross-field scaling (§4); (3) mesh CAD curves under topological constraints (§4.3); (4) mesh simple faces matching predefined patterns (§6.1.2); (5) remaining faces: frontal point insertion along the scaled cross field with a Delaunay kernel, greedy recombination (not Blossom) by quad quality weighted by alignment, merges accepted while SICN > 0.1, then midpoint subdivision (quad → 4, triangle → 3) with snapping to the CAD surface and revert on negative quality (§5); smoothing in (u,v) (§5.3); (6) topology changes to remove irregular vertices that do not match cross-field singularities: local disk quadrangulations (§6.3, valence-driven, interior valence 3–5) and cavity remeshing with predefined patterns (§6.2). Every operation is reverted when it invalidates or degrades elements.
  • Results (§7, Table 1). MAMBO 114 models: min SICN 0.53, mean 0.98, irregular vertices 1.24% → 0.27%, 9.6 s + 4.6 s; all 114 valid. ABC 1000 random “not too simple” models: min SICN 0.44, mean 0.96, irregular 2.2% → 0.74%; 988/1000 valid (2 tangled, 10 Delaunay-insertion or resource failures); median whole pipeline 18 s single-threaded.
  • Limits (§8, and in text). Irregular vertices left by curve quantization cannot be removed within one face; slow on faces over 100k vertices; acute corners (< 45°) need artificial singularities; size-map vs cross-field compatibility “still open”.
  • Why it matters here. Strongest published evidence on CAD B-reps for any automatic all-quad method, and it uses the same tri → recombine → split guarantee FieldCraft already ships, with better point placement in front of it and cleanup behind it. It is the template for P.
  • Data caveat. Both datasets are excluded for our own tests (see literature.md Part C); we cite the numbers only.

S5.5 Tchon and Camarero 2006; Lévy and Liu 2010; Ekelschot et al. 2018: L∞/Lp point optimization for quad-dominant meshes. Verdict: reference.

  • Citations. Tchon, Camarero, Quad-dominant mesh adaptation using specialized simplicial optimization, IMR 15, pp. 21–38, DOI 10.1007/978-3-540-34958-7_2. Lévy, Liu, Lp centroidal Voronoi tessellation and its applications, ACM TOG 29(4), 2010, DOI 10.1145/1778765.1778856 (geogram, BSD-3 core: READ OK). Ekelschot, Ceze, Garai, Murman, Robust metric aligned quad-dominant meshing using Lp centroidal Voronoi tessellation, AIAA SciTech 2018, DOI 10.2514/6.2018-1501. Read: metadata.
  • Relevance. Global smoothing alternatives to frontal placement. S5.1 reports Tchon 84% quads and 101 s for 972 quads, Lévy 322 s for ~1000 elements (preprint §1): far slower than frontal insertion.

S6. Triangle-to-quad conversion

S6.1 Lee and Lo 1994 + Catmull–Clark split (shipped in quad::free). See literature.md B7.2. Verdict: BUILD ON (keep as the all-quad guarantee).

  • The split halves the size: points are placed at 2h and the final mesh is at h. Reberol 2021 (S5.4) uses the same split (“midpoint subdivision”) after a frontal, aligned point placement and reports the cleanup removes most of the irregular vertices it introduces.

S6.2 Remacle et al. 2012, Blossom-Quad. Verdict: reference (optional upgrade of the matching). Paper only.

  • Citation. IJNME 89(9):1102–1119, 2012. DOI 10.1002/nme.3279. Read: metadata.
  • Note. Reberol 2021 replaced Blossom with a greedy, alignment-weighted matching followed by the split, which removes the “perfect matching may not exist” failure and the cubic-time matching. That supports keeping FieldCraft’s greedy matching.

S6.3 Ramaswami, Ramos, Toussaint 1998, Converting triangulations to quadrangulations. Verdict: reference (theory).


S7. Global parametrization and field-aligned remeshing (graphics family)

Common property: they remesh a triangle mesh into quads aligned with a field. None natively takes prescribed boundary nodes shared with neighbouring faces or parts, which is what conformity across B-rep edges needs.

S7.1 Kälberer, Nieser, Polthier 2007, QuadCover. Verdict: reference.

  • Citation. CGF 26(3):375–384, 2007. DOI 10.1111/j.1467-8659.2007.01060.x.
  • Method. Branched-covering parametrization from a cross field (curvature-aligned); integer grid lines give quads.
  • Code. No official open-source implementation found; Polthier group’s JavaView is not open source.

S7.2 Ray, Li, Lévy, Sheffer, Alliez 2006, Periodic global parameterization. Verdict: reference.

S7.3 Bommes, Zimmer, Kobbelt 2009, Mixed-integer quadrangulation (MIQ). Verdict: reference.

  • Citation. ACM TOG 28(3), 2009. DOI 10.1145/1531326.1531383.
  • Method. Cross field with integer period jumps, then a seamless parametrization by greedy mixed-integer rounding; feature curves become integer iso-lines.
  • Limits. Greedy rounding can produce degenerate or folded charts; needs QEx (S7.6) to extract.
  • Code. libigl copyleft/comiso (CoMISo, GPL: FORBIDDEN). libigl core is MPL-2.0 (READ OK) but GitHub reports GPL-3.0 for the repo because both licence files exist.

S7.4 Bommes, Campen, Ebke, Alliez, Kobbelt 2013, Integer-grid maps for reliable quad meshing; Myles, Pietroni, Zorin 2014, Robust field-aligned global parametrization. Verdict: reference.

S7.5 Campen, Bommes, Kobbelt 2015, Quantized global parametrization; Campen and Zorin 2017; Lyon, Campen, Kobbelt 2021; Heistermann, Warnett, Bommes 2023; Coudert-Osmont et al. 2023. Verdict: reference (quantization is the robust part of this family now).

  • Citations.
    • Campen, Bommes, Kobbelt, ACM TOG 34(6), 2015, DOI 10.1145/2816795.2818140 (motorcycle-graph T-mesh, valid IGM by construction).
    • Campen, Zorin, Similarity maps and field-guided T-splines: a perfect couple, ACM TOG 36(4), 2017, DOI 10.1145/3072959.3073647.
    • Campen, Shen, Zhou, Zorin, Seamless parametrization with arbitrary cones for arbitrary genus, ACM TOG 39(1), 2019, DOI 10.1145/3360511.
    • Lyon, Campen, Kobbelt, Quad layouts via constrained T-mesh quantization, CGF 40(2):305–314, 2021, DOI 10.1111/cgf.142634; Simpler quad layouts using relaxed singularities, CGF 40(5):169–180, 2021, DOI 10.1111/cgf.14365.
    • Heistermann, Warnett, Bommes, Min-deviation-flow in bi-directed graphs for T-mesh quantization, ACM TOG 42(4), 2023, DOI 10.1145/3592437.
    • Coudert-Osmont, Desobry, Heistermann, Bommes, Ray, Sokolov, Quad mesh quantization without a T-mesh, CGF 43(1), 2024 (issue dated 2023 online), DOI 10.1111/cgf.14928. Read: abstract (operates on a decimated surface instead of a T-mesh; “easier to implement and to adapt to constraints such as free boundaries, complex feature curves”).
  • Code. cgg-bern/libsatsuma (BiMDF solvers) MIT: READ OK; cgg-bern/quadwild-bimdf GPL-3.0: FORBIDDEN.

S7.6 Ebke, Bommes, Campen, Kobbelt 2013, QEx: robust quad mesh extraction. Verdict: reference.

S7.7 Lyon, Campen, Bommes, Kobbelt 2019, Parametrization quantization with free boundaries for trimmed quad meshing. Verdict: reference (relevant to trimmed faces, wrong output type).

  • Citation. ACM TOG 38(4), 2019. DOI 10.1145/3306346.3323019.
  • Relevance. Quad meshes trimmed by the boundary (quads cut by trimming curves, not aligned to it). For FE we need boundary-conforming elements with shared boundary nodes, so this is not a direct fit.

S7.8 Jakob, Tarini, Panozzo, Sorkine-Hornung 2015, Instant field-aligned meshes. Verdict: reference.

  • Citation. ACM TOG 34(6), 2015. DOI 10.1145/2816795.2818078.
  • Method. Local smoothing of an orientation field and a position field (both with 4-RoSy / lattice symmetry), then extraction. Very fast, quad-dominant, may leave non-quad faces and defects.
  • Code. wjakob/instant-meshes BSD-3+: READ OK.

S7.9 Huang, Zhou, Nießner, Shewchuk, Guibas 2018, QuadriFlow. Verdict: reference.

  • Citation. CGF 37(5):147–160, 2018. DOI 10.1111/cgf.13498.
  • Method. Instant-Meshes-style fields with singularity reduction by min-cost flow plus a SAT step for orientation/position consistency.
  • Code. hjwdzh/QuadriFlow BSD-3+: READ OK; bundled 3rd/MapleCOMSPS_LRB (SAT solver) and lemon have their own licences, not checked: do not open those directories.

S7.10 Pietroni, Nuvoli, Alderighi, Cignoni, Tarini 2021, Reliable feature-line driven quad-remeshing (QuadWild). Verdict: reference.

  • Citation. ACM TOG 40(4), 2021. DOI 10.1145/3450626.3459941. PDF (author copy): https://vcg-legacy.isti.cnr.it/Publications/2021/PNACT21/ReliableQuad.pdf. Read: abstract.
  • Method. Field-traced patch layout respecting feature lines, patches quantized by an ILP, each patch quadrangulated. Reported failure rate < 0.5% over Thingi10K.
  • Code. nicopietroni/quadwild GPL-3.0: FORBIDDEN (depends on vcglib, also GPL-3.0).
  • Relevance. The most robust remesher in this family, but a remesher of triangle meshes; boundary nodes are not prescribed.

S7.11 Alliez et al. 2003; Marinov and Kobbelt 2006; Zhang et al. 2010: curvature-line and wave-based quad-dominant remeshing. Verdict: reference.


S8. Layouts, block decomposition and mapped/submapped faces

S8.1 Tam and Armstrong 1991, medial axis subdivision; Fogg, Armstrong, Robinson 2015, multiblock decompositions of surfaces. Verdict: reference (structured shells later).

  • Citations. Adv. Eng. Softw. 13(5–6):313–324, 1991, DOI 10.1016/0961-3552(91)90035-3. IJNME 101(13):965–991, 2015, DOI 10.1002/nme.4825.
  • Relevance. The Belfast group’s route for shell structures: decompose into four-sided blocks, map each.

S8.2 Whiteley, White, Benzley, Blacker 1996, submapping; Ruiz-Gironés and Sarrate 2010. Verdict: BUILD ON (mapped faces first).

  • Citations. Two and three-quarter dimensional meshing facilitators, Eng. Comput. 12:144–154, 1996, DOI 10.1007/BF01198730. Generation of structured meshes in multiply connected surfaces using submapping, Adv. Eng. Softw. 41(2):379–387, 2010, DOI 10.1016/j.advengsoft.2009.06.009. Read: metadata.
  • Use. Many SolidCraft faces are four-sided in (u,v) (cylinder walls, fillets, extrusion sides). TFI (quad::tfi) in (u,v) with metric-aware boundary spacing gives perfect quads there; Reberol 2021 step 4 does the same with “patterns”. Submapping extends this to faces with corners at multiples of 90°.

S8.3 Kowalski, Ledoux, Frey 2013; Jezdimirović et al. 2021: PDE- and singularity-driven partitions. Verdict: reference.

S8.4 Bunin 2008, A continuum theory for unstructured mesh generation in two dimensions. Verdict: reference (theory of where singularities must go).


S9. Quality improvement: topological cleanup, smoothing, untangling

S9.1 Kinney 1997, CleanUp: improving quadrilateral finite element meshes. Verdict: BUILD ON (operation catalogue).

  • Citation. P. Kinney, Proc. 6th International Meshing Roundtable, pp. 437–447, 1997. PDF (HTTP 200): https://people.eecs.berkeley.edu/~jrs/meshpapers/Kinney.pdf. Read: abstract.
  • Method. Heuristic connectivity cleanup (node valence), boundary and flange patterns, shape and size cleanup; used behind paving in CUBIT.

S9.2 Canann, Muthukrishnan, Phillips 1998, Topological improvement procedures for quadrilateral finite element meshes. Verdict: BUILD ON.

  • Citation. Eng. Comput. 14(2):168–177, 1998. DOI 10.1007/BF01213591. Read: metadata.
  • Method. Local operations (doublet removal, diagonal collapse/flip, edge swap, boundary-specific operations) to drive valences toward 4 (interior) and to the ideal boundary valence.

S9.3 Reberol 2021 disk quadrangulations (S5.4 §6.3); Bommes, Lempfer, Kobbelt 2011, global structure optimization; Verma and Suresh 2015/2017. Verdict: BUILD ON (Reberol’s local operator); reference (others).

  • Citations. Bommes et al., CGF 30(2):375–384, 2011, DOI 10.1111/j.1467-8659.2011.01868.x. Verma, Suresh, A robust combinatorial approach to reduce singularities in quadrilateral meshes, Procedia Eng. 124:252–264, 2015, DOI 10.1016/j.proeng.2015.10.137; CAD 85:99–110, 2017, DOI 10.1016/j.cad.2016.07.008. Read: metadata (Bommes, Verma).
  • Why Reberol’s operator. It is a single generic operation (replace a cavity by the best enumerated disk quadrangulation by an irregularity score, revert if quality drops), not a catalogue of special cases, and it has the published CAD-scale evidence (S5.4).

S9.4 Daniels, Silva, Shepherd, Cohen 2008; Tarini et al. 2010: quad mesh simplification; Shepherd et al. 2010: adaptive coarsening. Verdict: reference.

S9.5 Zhou and Shimada 2000, An angle-based approach to two-dimensional mesh smoothing. Verdict: BUILD ON (cheap smoother for quads).

  • Citation. Proc. 9th International Meshing Roundtable, pp. 373–384, 2000. PDF (HTTP 200): https://www.andrew.cmu.edu/user/shimada/papers/00-imr-zhou.pdf. Read: abstract.
  • Method. Move each node to equalize adjacent angles; fewer inversions than Laplacian, much cheaper than optimization. On a surface: run in the tangent plane, map back through (u,v).
  • Related: Xu, Newman, An angle-based optimization approach for 2D finite element mesh smoothing, FEAD 42(13):1150–1164, 2006, DOI 10.1016/j.finel.2006.01.016.

S9.6 Escobar, Montero, Montenegro, Rodríguez 2005/2006, smoothing surface triangulations on a local parametric space; Ruiz-Gironés et al. 2015, simultaneous untangling and smoothing of quads and hexes. Verdict: BUILD ON (worst-element optimization and untangling on surfaces).

  • Citations. IJNME 66:740–760, 2006 (online 2005), DOI 10.1002/nme.1584. Adv. Eng. Softw. 80:12–24, 2015, DOI 10.1016/j.advengsoft.2014.09.021. Read: metadata.
  • Use. Extends the planar Freitag–Plassmann untangling already in quad::smooth to nodes that move in (u,v) while quality is measured on the surface. Garanzha et al. 2021 (literature.md B6.4, DOI 10.1145/3450626.3459847) is the global alternative.

S10. Element quality for shells

S10.1 Knupp 2001, Algebraic mesh quality metrics. Verdict: BUILD ON (scaled Jacobian, shape; already used).

S10.2 Robinson 1987, Some new distortion measures for quadrilaterals; Yuan, Huang, Pian 1994. Verdict: BUILD ON (warp and taper for non-planar quads).

  • Citations. FEAD 3(3):183–197, 1987, DOI 10.1016/0168-874X(87)90023-0. Yuan et al., Inverse mapping and distortion measures for quadrilaterals with curved boundaries, IJNME 37(5):861–875, 1994, DOI 10.1002/nme.1620370510.
  • Use. A quad on a curved face is not planar. MITC4 accepts warped quads but the error grows with warp, so warp angle joins the report.

S10.3 Dvorkin and Bathe 1984 (MITC4); Bathe, Iosilevich, Chapelle 2000, An evaluation of the MITC shell elements; Chapelle and Bathe 2011. Verdict: reference (what the mesh must serve).

  • Citations. Eng. Comput. 1(1):77–88, 1984, DOI 10.1108/eb023562. C&S 75(1):1–30, 2000, DOI 10.1016/S0045-7949(99)00214-X. The Finite Element Analysis of Shells – Fundamentals, 2nd ed., Springer 2011, DOI 10.1007/978-3-642-16408-8.
  • Use. Bathe et al. 2000 evaluate MITC elements on distorted meshes; that is the model for our “free mesh vs structured mesh” convergence comparison in P5.

S11. Through-thickness: swept quads for continuum shells

S11.1 Staten, Canann, Owen 1999, BMSweep; Roca and Sarrate 2010, least-squares projection for sweeping. Verdict: BUILD ON (M5/M8 sweep).

  • Citations. Eng. Comput. 15(3):212–218, 1999, DOI 10.1007/s003660050016. Eng. Comput. 26(4):391–406, 2010, DOI 10.1007/s00366-009-0172-z. Read: metadata.
  • Use. A thin-walled solid: mesh the source skin with the shell quad mesher, sweep to the target skin (one-to-one sweep), side faces mapped by TFI with n layers. The source and target must share the source’s topology, so the target is not meshed independently.

S11.2 Hauptmann and Schweizerhof 1998; Vu-Quoc and Tan 2003: solid-shell elements. Verdict: reference (the element on top, M8).

S11.3 Robinson, Armstrong, Fairey 2011, Automated mixed dimensional modelling from 2D and 3D CAD models. Verdict: reference (midsurface, M8).


S12. Shell benchmarks (verification of mesh + element)

BenchmarkSourceUse
Scordelis–Lo roof, pinched cylinder with rigid diaphragms, pinched hemisphere with 18° hole, twisted beam, patch tests on distorted elementsMacNeal, Harder, A proposed standard set of problems to test finite element accuracy, FEAD 1(1):3–20, 1985, DOI 10.1016/0168-874X(85)90003-4; Belytschko, Stolarski, Liu, Carpenter, Ong, Stress projection for membrane and shear locking in shell finite elements, CMAME 51(1–3):221–258, 1985, DOI 10.1016/0045-7825(85)90035-0 (the “shell obstacle course”)Linear statics; mesh convergence on our free meshes vs the published reference values
Geometrically nonlinear shell setSze, Liu, Lo, FEAD 40(11):1551–1569, 2004, DOI 10.1016/j.finel.2003.11.001 (Crossref also holds a duplicate DOI 10.1016/S0168-874X(03)00218-X for the same paper)Later (nonlinear steps)

Reference values as commonly quoted (confirm from the source PDFs before freezing a fixture): Scordelis–Lo midside free-edge vertical displacement 0.3024 (obstacle course; MacNeal–Harder quote 0.3086); pinched cylinder displacement under the load 1.8248×10⁻⁵ (E = 3×10⁶, P = 1); pinched hemisphere 0.094.


S13. Guaranteed-quality theory and other all-quad methods

S13.1 Liang, Ebeida, Zhang 2010; Bishop 2016; Rushdi et al. 2017. Verdict: reference.

  • Citations. Liang et al., Guaranteed-quality all-quadrilateral mesh generation with feature preservation, CMAME 199(29–32):2072–2083, 2010, DOI 10.1016/j.cma.2010.03.007 (quadtree, angle bounds; IMR 18 version DOI 10.1007/978-3-642-04319-2_4). Bishop, Quadrilateral meshes for PSLGs, DCG 56(1):1–42, 2016, DOI 10.1007/s00454-016-9771-9. Rushdi, Mitchell, Mahmoud, Bajaj, Ebeida, All-quad meshing without cleanup, CAD 85:83–98, 2017, DOI 10.1016/j.cad.2016.07.009. Read: metadata.
  • Relevance. Provable angle bounds, but quadtree orientation artefacts at the boundary (S5.1 Fig. 2 shows the 45°-rotated boundary quads) and no boundary rows: wrong trade for shells.

S13.2 Sarrate and Huerta 2000, Efficient unstructured quadrilateral mesh generation. Verdict: reference.

S13.3 Learning-based quad meshing (Pan et al. 2023; Tong et al. 2023). Verdict: ignore.

S13.4 Owen and Saigal 2000, H-Morph. Verdict: reference (the hex analogue of Q-Morph). IJNME 49(1–2):289–312, 2000, DOI 10.1002/1097-0207(20000910/20)49:1/2<289::AID-NME934>3.0.CO;2-L.


Where the field is today versus 2000s paving/Q-Morph

  • 2000s: direct paving and Q-Morph gave the best boundary rows; robustness came from heuristics plus CleanUp (Kinney) and topological operations (Canann), and fronts colliding in odd configurations was the standing failure mode. Surface meshing was done in (u,v) with a first-fundamental-form metric (Tristano; Lee; Borouchaki–Laug–George).
  • 2010s: orientation moved from “whatever the front does” to an explicit cross field computed first (Remacle 2013 Laplace; Knöppel 2013; Ginzburg–Landau 2017–2019). Fronts became frontal point insertion over a Delaunay kernel (Delquad), so collisions cannot fail, and recombination became the all-quad step (Blossom-Quad; or greedy matching + split). In graphics, global parametrization (MIQ → IGM → QGP) matured, but with mixed-integer solves and GPL code, and as remeshers of triangle meshes.
  • 2020s: the robust CAD pipeline is Reberol 2021: aligned frontal points → recombination → midpoint split (all-quad guarantee) → singularity-aware topological cleanup with quality-monotone reverts. Published: 100% valid on 114 MAMBO models, 98.8% on 1000 ABC models, 0.27–0.74% irregular vertices, min SICN 0.44–0.53. Quantization research (Lyon 2021, Heistermann 2023, Coudert-Osmont 2023) targets block-structured layouts; QuadWild (< 0.5% failures on Thingi10K) is the most robust triangle-mesh remesher. Q-Morph-with-a-cross-field exists (QMCF 2014) but I found no evidence it outperforms the frontal-Delaunay route, and nothing new on direct paving beyond preprints.

P1. Position

I agree with a cross-field-guided advancing front in (u,v) with a metric and topological cleanup, with one change: the front advances points over a Delaunay triangulation (frontal-Delaunay in the cross-field L∞ norm, Remacle 2013), not quads (paving) and not triangle-to-quad transformations (Q-Morph). All-quad comes from the recombination + split FieldCraft already ships, and cleanup follows Reberol 2021.

Reasons:

  1. Closure cannot fail. A frontal-Delaunay front always sits inside a valid constrained triangulation, so colliding fronts meet in triangles. Paving’s collision cases and Q-Morph’s edge-recovery and odd-closure cases do not exist. On the docs’ own terms (robustness outranks features), this decides it.
  2. Alignment comes from the field, not the front. Boundary-aligned Dirichlet data on the cross field gives the boundary-parallel rows analysts want from paving, and the field keeps them coherent where fronts meet.
  3. It reuses what exists. quad::cdt (Bowyer–Watson, Sloan recovery, exact predicates), greedy recombination, the Catmull–Clark split, smoothing and the exact validity gate all stay. The new parts are the chart/metric layer, the cross field, the point placement rule, and cleanup.
  4. It has the best published CAD evidence (S5.4).

What I would not build: direct paving (S1); Q-Morph as the first implementation (S2.1; keep as a possible later point-placement alternative on the same triangulation, see P7); global-parametrization remeshers as the primary shell mesher (S7: no prescribed boundary nodes, mixed-integer solves, mostly GPL code).

P2. Pipeline

For each B-rep face set to be shell-meshed (a sheet body, or chosen faces of a solid):

  1. Edges first, once, in 3D (exists): divide each B-rep edge with the shared SizeField (size::divide_polyline); both faces get the same nodes, so conformity across shared edges holds by construction.
  2. Global loop parity (new): every face loop needs an even node count for the split. Each edge lies on two loops (closed shell) or one (free edge). Choosing which edges get ±1 division so that all loops are even at least cost is a minimum T-join on the face-adjacency graph (Edmonds and Johnson, Matching, Euler tours and the Chinese postman, Math. Prog. 5:88–124, 1973, DOI 10.1007/BF01580113). It is always feasible on a closed shell (the sum of all loop counts is twice the edge total). A greedy shortest-path pairing of odd loops is enough to start; size::loop_divisions stays the single-loop case.
  3. Chart per face (new, P3.1): native (u,v) when regular; otherwise a chart switch.
  4. Mapped faces first (exists, extend): faces with four corners in (u,v) and compatible opposite counts get TFI in (u,v) with metric-aware spacing (S8.2). Cylinder walls, extrusion sides and fillets are mostly this case and come out perfect.
  5. Free faces (new, P3.4): boundary-aligned cross field → frontal-Delaunay L∞ point placement at 2h → CDT → greedy recombination weighted by alignment → split → on-surface smoothing.
  6. Cleanup (new, P3.6): disk-quadrangulation cavities and Canann/Kinney local operations, quality-monotone, bounded.
  7. Gate (exists, extend): exact validity in (u,v); 3D quality report; error, never a tangled mesh.

P3. Components

P3.1 Chart abstraction (fieldcraft-mesh::surface_mesh::chart or a new shell module; trait in mesh, implementation in geometry, wired in engine, so mesh does not depend on geometry): eval(u,v) → [f64;3], derivs(u,v) → (S_u, S_v) (second derivatives for curvature sizing), project(p, hint) → (u,v), the face’s loops as 3D node chains with their (u,v), periodicity and singular points. Native charts come from SolidCraft’s kernel surfaces (truck’s parametric surfaces already have parameter search, used in 5 SolidCraft kernel files); this needs a new public face-surface API in solidcraft-kernel, exposed through fieldcraft-geometry without leaking SolidCraft types. Handling:

  • Periodic faces (cylinder, torus, revolved): the seam edge appears twice in the loop; give its nodes u = 0 on one side and u = period on the other (unwrap by continuity along the loop). The domain becomes simply connected; seam nodes are the same 3D nodes, so conformity across the seam holds.
  • Poles (sphere, cone apex, revolved curve touching the axis): switch chart. Mesh a cap around the pole in an orthographic tangent-plane projection (valid for a cap within a hemisphere), the rest in native (u,v); or, simpler and general, use a discrete chart (S3.7) for the whole face. Remacle–Geuzaine 2022 (S3.6) is the reference if we keep native (u,v) at poles instead.
  • Bad parametrizations (S3.8: near-zero |S_u × S_v| inside the face, extreme metric ratios): the same discrete-chart fallback on the face’s tessellation, which BoundarySurface already provides.
  • Faces from a tagged 3MF (no B-rep surface): discrete chart only; new nodes projected onto the tessellation.

P3.2 Metric. M(u,v) = JᵀJ / h(S(u,v))² with J = [S_u S_v] (S3.1, S2.4). Edge lengths in the metric by the same midpoint quadrature size.rs uses. For planes, cylinders and cones away from the apex, JᵀJ is constant or nearly so after an affine rescale of (u,v); do that rescale first, which removes most anisotropy before any metric code runs.

P3.3 Size field. Keep SizeField (isotropic, 3D point in, length out). Add a curvature cap h ≤ ρ_min·θ_max (θ_max: turning angle per element, chordal-error form h = √(8ρδ) from Lo–Lau 1998) and a proximity cap (Owen–Saigal 2000), combined by min with the user field and graded (|∇h| ≤ β). Principal curvatures come from the chart’s second fundamental form. The cross field’s conformal scaling (Reberol §3–§4) is a later refinement.

P3.4 Frontal point placement. Rebay’s loop (S3.4) in (u,v): initial CDT of the half-resolution boundary (as quad::free does now), triangles classified resolved/active/waiting by the L∞ circumradius measured in the local cross frame and the metric (Remacle 2013 §5, generalized from det M^(1/4) to the full metric by mapping the 3D tangent cross through J⁻¹), new point on the L∞ bisector of the active front edge, inserted by Bowyer–Watson, layer by layer. Target size 2h (the split halves it). The Delaunay kernel stays the exact Euclidean in-circle in the affinely rescaled (u,v) (Remacle 2013 §5 found L2 and L∞ kernels nearly identical); the metric only decides where points go.

P3.5 Validity. In (u,v), exact orient2d on every element (exists). Given a chart with det J > 0 in the face, a mesh valid in (u,v) maps to a non-folded surface mesh. Quality (scaled Jacobian, angles, warp, aspect) is measured on the 3D quad: corner Jacobians against the surface normal at the corner.

P3.6 Cleanup and smoothing. Reberol §6.3 disk quadrangulations (enumerate small disk quadrangulations of a cavity around an irregular vertex, pick the minimum irregularity score, accept only if the minimum quality does not drop) plus Canann 1998 doublet/diagonal operations for boundary cases. Then smoothing: constrained Laplacian (exists) → angle-based (Zhou–Shimada) → worst-element optimization with untangling (Escobar / Ruiz-Gironés), nodes moving in (u,v), objective in 3D. Every loop bounded, with a “stopped early” report (AGENTS.md).

P3.7 Linear algebra placement. The cross field needs a sparse symmetric solve per face (a few thousand to a few hundred thousand unknowns). mesh is L1 and cannot use solver (L2). Either a small CG with Jacobi preconditioning inside mesh (enough for a Laplace-type system, deterministic), or move a minimal sparse CG into model (L0). I recommend the first: a 200-line deterministic CG local to the cross-field module.

P3.8 Output. A quad (and, for quad-dominant mode, quad + triangle) surface mesh with the B-rep face id on every element, B-rep edge ids on boundary node chains, and the existing node-ordering convention, so sets and surfaces “bound to SolidCraft face, edge, vertex and body names” (M3) resolve the same way they do for solids. Quad-dominant mode is the same pipeline without the split (points at h, recombination only): useful when the user prefers fewer elements and accepts some triangles.

P4. What “done” looks like

Quality targets on our own corpus, measured on the 3D elements (each reported per mesh and frozen as fixtures once met):

MetricHard gate (mesh rejected or region flagged)Target
Validityevery quad valid in (u,v) (exact) and every 3D corner Jacobian > 0—
Conformityevery B-rep edge’s node chain identical in both faces; interior edges shared by exactly 2 elements—
Min corner angle≥ 20° except at CAD corners whose input angle is smaller≥ 30° everywhere; ≥ 99% of quads with all angles in [45°, 135°]
Max corner angle≤ 160°≤ 150°
Scaled Jacobian (Knupp, min over corners)> 0.1min ≥ 0.4, mean ≥ 0.9 (Reberol reports min SICN 0.44–0.53, mean 0.96–0.98)
Warp angle (Robinson)≤ 30°≤ 10° (driven by the curvature size cap)
Irregular interior vertices—≤ 2% after cleanup (Reberol 0.27–0.74%; Delquad before cleanup 9–19%)
Size efficiency τ (Remacle §6.2)—≥ 85%
Determinismbit-identical mesh across platforms and thread counts—
Robustnessevery face of the corpus meshes or returns a located error; no panic under hostile parameters≥ 99% of corpus faces mesh without fallback

Baseline first: run the current tri → quad split, ported to (u,v) (P6 step 2), over the corpus and record the same table. The new placement and cleanup have to beat it on irregular vertices and min angle, or they do not ship.

P5. Verification

  1. Chart tests (theory): round-trip eval/project on plane, cylinder, cone, sphere, torus and a SolidCraft NURBS face; seam unwrapping; pole detection; metric equals the analytic first fundamental form.
  2. Mesh invariants (theory): conformity across shared edges, Euler characteristic per face and per shell, every node on its face (distance to S(u,v) zero by construction; to the true surface within kernel tolerance for discrete charts), face tags complete.
  3. Corpus (our own SolidCraft recipes, per AGENTS.md): plates with holes and slots, filleted brackets, bosses and ribs, cylinders and cones with cut-outs, spheres and domes (poles), tori, revolved pressure-vessel heads, lofted/freeform NURBS skins, thin-walled boxes; a hostile series (tiny edges, sliver faces, near- degenerate parametrizations, acute corners). Report the P4 table per part.
  4. Shell FE convergence (published benchmarks, S12): Scordelis–Lo roof, pinched cylinder, pinched hemisphere, each built in SolidCraft from the published description and meshed by our free mesher, not a structured grid, at 4–5 refinement levels. Acceptance: converges to the reference within the stated tolerance, and at the two finest levels the free-mesh error is at most 1.5× the error of a structured mapped mesh with the same node count (the structured mesh comes from our TFI). The 1.5× is a proposed threshold to be confirmed by the owner. Plus the MacNeal–Harder distorted-element patch tests on the element itself.
  5. Continuum shells (M8): swept thin-walled parts, stack-direction check, through-thickness layer count, same convergence protocol with the hemisphere and cylinder built as solids.

P6. Order of work

  1. Chart API in solidcraft-kernel (public face-surface evaluation and parameter search) and fieldcraft-geometry (trait implementation, seams, poles). Done when the P5.1 tests pass.
  2. Port the shipped free mesher to (u,v) + metric: half-resolution CDT and Ruppert refinement in the rescaled (u,v) with metric sizing, recombination, split, smoothing with 3D objective. This gives all-quad conforming meshes on curved faces early, and is the baseline.
  3. Loop parity (T-join) and curvature/proximity size field.
  4. Mapped faces in (u,v) (TFI, then submapping).
  5. Cross field (Knöppel-style connection Laplacian with boundary alignment, local CG) and frontal L∞ placement with alignment-weighted recombination.
  6. Cleanup (disk quadrangulations, Canann operations) and on-surface smoothing/untangling.
  7. Verification suite (P5.3–P5.4) and fixtures; then sweep to continuum shells (M8).

P7. Risks and what happens if wrong

RiskEffectMitigation
Native parametrizations worse than expected (poles, seams, uneven NURBS knots)Bad metric, folded charts, failures on real partsChart switch to discrete charts (S3.7) built on the existing tessellation; exact one-to-one check per chart
SolidCraft kernel cannot expose surfaces cleanly (cross-repo change)Step 1 blocksDiscrete charts on the tessellation from day one work for every face (with projection onto the tessellation); native charts improve accuracy later
Split halves the resolution: features thinner than ~2h cannot be resolvedErrors on thin slots and sliversExisting error path (“chords cross”); local refinement of the size field; quad-dominant mode without the split
Cross-field singularities placed poorly on small CAD featuresExtra irregular verticesCleanup; Reberol’s small-feature size map; accept and report
Boundary quantization (edge counts) fixes irregular vertices that no in-face operation can remove (Reberol §8)Irregular count plateaus above targetMake the T-join edge-count choice alignment-aware later (count changes along cross-field-parallel edges are cheaper)
Metric in-circle or L∞ computations are not exactNon-determinism or invalid meshes if used for decisionsOnly placement uses floats; every topological decision is an exact predicate; validity gate is exact

If the call is wrong, the two ways are: (a) frontal L∞ placement does not beat the ported split baseline enough to justify itself on engineering parts; or (b) analysts want stricter boundary rows than a cross field yields. Cost is bounded either way: the chart/metric layer, loop parity, size field, mapped faces, cleanup and verification (steps 1–4, 6–7) are needed by every candidate method; only step 5 changes. For (a), keep the baseline placement and invest in cleanup. For (b), implement Q-Morph’s front transformation (S2.1, with QMCF’s field steering, S2.6) as an alternative placement on the same triangulation and compare on the same corpus. The failure to avoid is building direct paving: its collision cases are where the 2000s methods failed, and nothing since has made them safe.


Licence summary of associated code (metadata only; no source read)

Repo / codeLicence (as reported)Status
Gmsh (Delquad, Blossom-Quad, quasi-structured quad pipeline, reparametrization)GPLFORBIDDEN
nicopietroni/quadwildGPL-3.0FORBIDDEN
cgg-bern/quadwild-bimdfGPL-3.0FORBIDDEN
cgg-bern/libsatsuma (BiMDF solvers)MITREAD OK
cnr-isti-vclab/vcglib, cnr-isti-vclab/meshlabGPL-3.0FORBIDDEN
hjwdzh/QuadriFlowBSD-3-Clause + enhancements paragraph (LICENSE.txt); bundled 3rd/ deps not checkedREAD OK (top-level code only)
wjakob/instant-meshesBSD-3-Clause + enhancements paragraph (LICENSE.txt); ext/ deps not checkedREAD OK (top-level code only)
hcebke/libQExGPL-3.0FORBIDDEN
libiglMPL-2.0 core; include/igl/copyleft/ (CoMISo/MIQ, CGAL, TetGen wrappers) GPL; GitHub reports GPL-3.0Core READ OK; copyleft/ FORBIDDEN
CoMISoGPL-3FORBIDDEN
avaxman/Directionalno licence file in the repo root, no GitHub licence metadataNO LICENCE
nmwsharp/geometry-central (Knöppel 2013 fields)MITREAD OK
pmp-library/pmp-libraryMITREAD OK
mlivesu/cinolibMITREAD OK
BrunoLevy/geogramBSD-3 except third_party/ (see literature.md)READ OK with exclusions
GeometryCollective/boundary-first-flattening (conformal parametrization)MITREAD OK
wildmeshing/TriWildMPL-2.0READ OK
alecjacobson/gptoolboxApache-2.0READ OK
MmgTools/mmg (surface remeshing)LGPL (README; COPYING.LESSER)FORBIDDEN
QuadCover, MIQ (original), QGP, Lyon 2019/2021, QMCF, Q-Morph, pavingno public code found—

Unverified items

  • White and Kinney 1997 (S1.3): no DOI and no PDF fetched; pages 323–335 from Sandia’s CUBIT reference list.
  • Staten and Canann 1997, Post refinement element shape improvement for quadrilateral meshes, AMD-Vol. 220: not cited above for that reason.
  • Palacios and Zhang 2007 (S4.3): DOI not re-checked.
  • QMCF (S2.6): read from abstract snippets only; the ScienceDirect and ResearchGate pages returned 403.
  • Ollivier-Gooch et al. 2025 (S1.5): SSRN preprint; only title and DOI verified.
  • Remacle 2013 (S5.1): numbers are from the 2010 preprint; the journal version was not read.
  • Benchmark reference values (S12): commonly quoted values; confirm from MacNeal–Harder 1985 and Belytschko et al. 1985 before freezing fixtures.
  • https://pages.cs.wisc.edu/~csverma/jaal.pdf (Verma’s Jaal all-quad generator) returned 404; not used.
  • The UBC EDAMSurf thesis (advancing-layer surface meshing) was seen in search results only.

Eulerian solids on the lattice: the reference map technique

Research notes for issue #594: solids described on a fixed grid (the lattice the LB fluid already uses) instead of a separate FEM mesh, and the lattice Boltzmann coupling of such solids (LBRMT). This page is our own summary, written from the papers listed at the end; the papers themselves are kept locally and never committed. The prototype that follows these notes is crates/eulerian (solid only, 2D plane strain), with crates/eulerian-gpu for its deep interior on a GPU; fluid coupling is a later step. The prototype’s code is not on develop: it is research code with no command, kept on the research branch of PR #597 until fluid–structure coupling needs it, so the crates/eulerian… paths, tests and examples named below refer to that branch. This page keeps the results.

Summary

  • The published scheme is biased at loaded surfaces (§8). Its blurred surface makes the Lamé cylinder 10.9 % too stiff with ten nodes across the wall, and the cause is the linear extrapolation of the reference map into the band, not the blur width: with the exact map prescribed there the error is +0.30 %. Its static answer also depends on the relaxation damping (−7.5 % to −20.7 % for γ × 0.5 to × 4), because band nodes integrate a velocity they never act on.
  • Mapped cut cells remove the bias (§10) and are the default surface: momentum only in the body’s cut control volumes, the traction imposed on the curved surface, the deformation gradient near it from a surface-fitted map. Lamé u_r(a) within 0.023 % at h = 1 (the hoop stress at the bore within 1.4 %), Kirsch RMS 0.53 % of 3S at h = 0.5, second order on stresses, independent of damping and viscosity. A ghost-value fill (§9) gets second order too but is less accurate and slower per step; it and the blurred surface stay only as options for the comparison studies.
  • Statics no longer need relaxation (§11): Newton–Krylov with a geometric multigrid preconditioner solves the mapped equilibrium in O(n) with GMRES counts flat in h, about 430 times faster than dynamic relaxation at h = 0.125 (1.55 s against 661 s for the Lamé cylinder). It is still about 200 times slower than FieldCraft’s FEM for a solid alone.
  • Local refinement near the surface (§12) works (nested levels, refluxing to round-off momentum, second-order subcycling) but pays modestly: at equal surface accuracy 1.9–6.7 times fewer node updates and 0.8–2.4 times less CPU, and only for one or two levels, because the interior error stays at the coarse spacing.
  • Threads and a GPU (§13): the step is deterministic on any thread count (bit for bit), but scales only 2.1–3.3 times on 8–10 cores because the surface work and the full-grid scans around it dominate. On the GPU the deep interior runs at 1.7–2.0 × 10⁹ node updates/s, 70–80 times ten CPU threads, accurate in single precision once the stress is formed from small quantities; with the surface still on the CPU the hybrid step gains at most about 12 %, and nothing on the smallest grid (1 % slower in the table’s run).
  • What blocks FSI (§15): the surface work on the CPU, and the time step of a stiff solid, hundreds of times below the lattice’s; then the line-search stalls of the static solve after topology changes, and everything in 3D.

1. The idea

A Lagrangian solver follows material points. The reference map technique (RMT) does the opposite: every grid point x stores the reference (undeformed) position ξ(x, t) of the material that sits at x now. ξ is the inverse of the motion χ(X, t), and it is carried along with the material, so it obeys the pure advection equation

∂ξ/∂t + (v · ∇) ξ = 0.

Its spatial gradient is the inverse deformation gradient, so

F = (∇ξ)⁻¹,   J = det F,   ρ = ρ₀ / J,

and any finite-strain constitutive law σ = σ(F) (hyperelastic, or with internal variables stored and advected beside ξ) gives the Cauchy stress at every grid point. The velocity follows from the Eulerian momentum balance

ρ (∂v/∂t + (v · ∇) v) = ∇ · σ + ρ b.

Everything lives on one fixed grid: no mesh, no remeshing, no Lagrangian markers. Displacement boundary conditions are natural (the boundary’s ξ is the boundary’s reference position), and a pre-strained state is just a non-identity initial ξ. Unlike Eulerian methods that advect F itself, F stays compatible (it is a gradient), so no curl constraint has to be enforced.

The price: ξ is only defined where material is, the boundary of the solid is not on the grid, and the stress needs a derivative of ξ, so every stencil that touches the boundary needs values of ξ outside the solid.

2. Tracking the solid region

  • Kamrin, Rycroft & Nave (2012) use a level set φ whose zero contour is the deformed boundary, with a sharp-interface treatment: values just outside the body are extrapolated linearly along grid lines from inside values and the boundary condition, and points that cross into the body during a step are given values by interpolation along the normal. Cut cells smaller than about a tenth of a cell are handled the same way.
  • Valkov, Rycroft & Kamrin (2015) observe that the boundary is already encoded in ξ: if φ₀(X) is a signed distance to the body in the reference configuration, φ(x) = φ₀(ξ(x)) marks the deformed body without advecting a separate level set. The incompressible RMT (Rycroft, Wu, Yu & Kamrin 2020) and the LBRMT use this and reinitialise φ₀(ξ) to a signed distance in a narrow band each step (straddling points by a bicubic interpolant and Newton iterations, the rest by fast marching).
  • From Valkov et al. (2015) on, the interface is blurred: a smoothed Heaviside H_ε(φ) over a transition zone of half-width ε (one to two cells) mixes solid and fluid stress and density, σ = H σ_f + (1 − H) σ_s, ρ = H ρ_f + (1 − H) ρ_s. Interface jump conditions are then satisfied implicitly in the zone rather than by explicit ghost-value fixes; only ξ is extrapolated (two scalar fields per step instead of the twenty of the sharp-interface method, by the authors’ count).

3. Extrapolating ξ: the hard part

The solid stress is needed wherever H < 1, which includes the outer half of the blur zone (0 < φ < ε), and its finite differences reach one more cell; ξ must therefore exist in a band of a few cells outside the solid. ξ there is not advected (that region behaves like fluid and would shear without bound, making the solid stress meaningless); it is rebuilt from the solid each step.

  • Sharp-interface RMT (2012): linear extrapolation along grid lines and PDE-based extension (Aslam 2004) of every needed field — many fields, and the papers report that accumulated extrapolation error could destabilise the interface (pressure spikes when points enter the solid).
  • Valkov et al. (2015) introduce a constrained extrapolation that enforces physical and smoothness requirements on the extrapolated map.
  • Rycroft et al. (2020) and the LBRMT replace this by a local least-squares fit: for each outside point, in order of increasing distance (2020: increasing φ; LBRMT: layer by layer outwards), fit a linear map ξ ≈ A x + c to all known values within a square window (half-width 3 in 2020, 2 in the LBRMT), weighted by distance, widening the window when the fit is degenerate (collinear points). The averaging blurs ξ far from the interface, which the authors argue is harmless because only the first cells matter, and it damps high-frequency noise.

Why it is hard: the extrapolated ξ decides (a) the stress in the blur zone, hence the traction the surface carries, (b) where the interface is next step (φ₀(ξ) at the band points), so material entering a cell gets an extrapolated, not an advected, reference position, and (c) the deformation gradient computed across the interface. A linear fit is exact for homogeneous deformation and first-order wrong where the strain varies, and it is the main source of the first-order error near the boundary that the blurred methods show. Points where the fit is degenerate (thin features, corners, two bodies touching) need special handling.

4. Numerical schemes in the papers

Kamrin, Rycroft & Nave 2012Valkov et al. 2015Rycroft et al. 2020 (IncRMT)Sun & Rycroft 2025 (LBRMT)
fluidcompressible, explicitcompressible Navier–Stokes, explicitincompressible, projection (Chorin), MAC + FE projections, multigridLB, D2Q9 BGK, Guo forcing
solid lawgeneral hyperelastic, plane straincompressible neo-Hookeanincompressible neo-Hookean (deviatoric)incompressible neo-Hookean (deviatoric)
gridv, ξ at cell corners; F, σ at cell centresv, ξ corners, σ centrescell-centred fields, stress on cell edgesLB nodes; F, σ on half-edges
advectionWENO (Liu, Osher & Chan 1994)second-order upwinded ENOsecond-order explicit Godunov scheme with Colella’s limited slopessecond-order one-sided upwind differences
timeEuler step inside TVD RK3 (Shu & Osher 1988)explicitsecond order (projection)LB step
interfacesharp, level set, extrapolationblurred, φ = φ₀(ξ), one extrapolationblurred, least-squares extrapolation, reinitialised φas IncRMT, blur zone + extrapolation zone of width ≥ 1.5Δx + 2ε
stabilisationsolid viscosityartificial viscosityartificial viscosity μ_e = κ ρ_s c_s h in the solid (κ = 0.4)the LB fluid’s own viscosity acts inside the solid

Common points:

  • Stress stencil. The deformation gradient is evaluated on cell edges (or centres) from compact differences of ξ: on a vertical edge ∂ξ/∂x from the two nodes it joins, ∂ξ/∂y as the average of the four transverse differences; the stress divergence at a node is then the difference of the edge stresses. This is compact (a 3 × 3 node stencil) and avoids the odd–even decoupling of a wide centred stencil.
  • CFL. Explicit, limited by the solid wave speed: Δt ≲ α h / c with c = √(G/ρ) (shear) in the incompressible papers, the P-wave speed for compressible solids, plus the viscous limits Δt ≲ ρ h² / (2 μ (1 + q) d) of the fluid and the artificial viscosity.
  • Statics are reached by relaxation: add damping (viscosity) and run the dynamics to rest (2012, §6.2: the washer, the flower). A good initial guess for ξ (a pre-strained map that already satisfies the boundary displacements) shortens the relaxation.
  • Verification in the 2012 paper: a finite-strain travelling wave in a periodic domain (second-order convergence of ξ, v and stress), the Levinson–Burgess washer under finite rotation (closed form), uniform motion of a pre-deformed disk (exact to round-off because every field is linear). The incompressible paper’s FSI tests converge at about order 1.8 in the L1 and L2 norms, with the largest errors at the interface (the blur zone alters the equations over a width O(h)) and first order in L∞ at the corners of a square solid.

5. How the LBRMT couples to the lattice

Sun & Rycroft (J. Comput. Phys. 2025; preprint 2024; Sun’s 2020 master’s thesis is an earlier version of the method) put both phases on the D2Q9 lattice with one velocity field:

  1. Advect ξ inside the solid (φ < 0) with the LB velocity; extrapolate ξ layer by layer into the extrapolation zone; relabel nodes with φ = φ₀(ξ).
  2. Compute the solid’s deviatoric stress on half-edges from ∇ξ, then the force density F = ∇ · [(1 − H_ε(φ)) τ_s] + (1 − H_ε) f_ext,s + H_ε f_ext,f.
  3. Hand F to the LB collision as an external force with Guo’s forcing (and the half-force velocity correction). The fluid stress is never computed explicitly: it is in the LB populations, and it also acts inside the solid, where it serves as the stabilising viscosity the IncRMT added by hand.
  4. A “smooth flux correction” keeps the solid–fluid density difference: the equilibrium is shifted by the target density field ρ_t = H ρ_f + (1 − H) ρ_s, moving the excess flux back onto the rest population so mass and momentum stay conserved.

No interface mesh, no force spreading between Lagrangian and Eulerian points, no coupling iteration; multi-body contact is a repulsive stress between overlapping blur zones (a separate ξ field per body). Validation: a deformable disk in a lid-driven cavity against published results, rotating and settling solids, suspensions mixing.

For FieldCraft this maps onto crates/lbm (D3Q19 TRT with Guo forcing already): the solid supplies a force density per lattice cell, the lattice supplies the velocity; the prototype keeps velocity and ξ at grid nodes for that reason.

6. Open problems (ours and the papers’)

  • Accuracy at the boundary. The blurred interface is formally first order at the interface (O(h) zone); the free surface sits somewhere in a zone ±ε wide, and ξ in that zone is extrapolated. Stresses at the surface (the numbers an analyst wants, e.g. the hoop stress at a bore) are the least accurate. §8 measures the bias; §10 removes it.
  • Extrapolation robustness: thin parts a cell or two thick, sharp corners, near-contact, points that enter the solid with an extrapolated reference position.
  • Mixing / large distortion. ξ keeps the link to the reference configuration, so extreme shearing (stirring) degrades ∇ξ; the 2012 paper suggests periodic reinitialisation of ξ with a stored F.
  • Level-set reinitialisation cost and robustness (the IncRMT falls back to a first-order method when Newton fails).
  • Stability relies on artificial viscosity or the LB viscosity; the solid’s damping is then tied to grid or fluid parameters.
  • Stiff solids. The explicit step is set by the solid’s wave speed; for engineering metals in a slow flow, c_solid ≫ flow speed and the solid dominates the step count. The LBRMT’s examples use soft solids (G comparable with fluid stresses).
  • Incompressible vs compressible. The LB fluid is weakly compressible; the LBRMT’s solid is incompressible neo-Hookean with the pressure from the lattice. A compressible solid on the lattice needs its volumetric stress in F.
  • 3D is direct in principle (3 × 3 ∇ξ, D3Q19) but the band and extrapolation cost grow with the surface.
  • Cost vs FEM for a solid alone: an RMT grid resolves the whole bounding box and needs a dynamic relaxation to reach a static answer; it is not a substitute for the FEM solver for statics, only a route to FSI with large solid motion. §11 replaces the relaxation by a static solve; the FEM still wins.

7. The prototype and its verification

crates/eulerian (fieldcraft-eulerian, layer 2, no command yet): 2D plane strain on a regular grid, f64, deterministic on any number of threads (§13), no panics, capped sizes and step counts. This section describes the first version, which follows the published scheme with its blurred surface (Boundary::Blurred). The default surface is now the mapped one of §10; the blurred one stays for the comparison studies.

  • Nodes carry ζ = ξ − x (periodic when the motion is) and v — the nodes a lattice will share.
  • F on cell edges from compact differences; ∇·σ at nodes from the four edges.
  • Blurred surface (ε = 1.5 h, the smoothed Heaviside of the 2020 paper); outside the body a prescribed ambient stress (0 for a free surface, −p I in a pressurised bore, any field), so surface tractions are σ_ambient·n with no surface tracking.
  • φ = φ₀(ξ) (Valkov et al.), band of four 8-neighbour rings rebuilt each step by a weighted linear least-squares fit using only earlier rings (independent of node order, mirror symmetric). Band nodes with φ < 0 become solid (material entering a cell).
  • Second-order one-sided upwind advection (first order next to unknown nodes); central differences in time (v at half steps), Δt = 0.4 h / c_P; artificial viscosity μ_e = κ ρ c_P h (κ = 0.1 by default); implicit mass-proportional damping for statics.
  • Compressible neo-Hookean (Bonet & Wood) and small-strain linear elasticity.
  • Later additions: the decoupled neo-Hookean of FieldCraft’s FEM (μ/2 (Ī₁ − 3) + κ/2 (J − 1)²) for finite-strain comparisons, and a body force per unit volume.

Verification (crates/eulerian/tests/verification.rs):

checkreferenceresolutionresulttolerance
rigid translation, body crossing > 5 cellsξ = x − vt, σ = 0h = 0.05ξ, v exact to 1e-11, ‖σ‖ < 1e-81e-11 / 1e-8
rigid rotation by π/4 (prescribed velocity)ξ = R(−θ)x, σ = 0h = 0.05 / 0.025max ‖ξ error‖ 4.7e-4 → 2.4e-4; max ‖σ‖/μ 3.4e-3 → 1.7e-3 (first order: the explicit update of ξ)< 2e-3, ratio < 0.6
uniaxial stretch s = 1.25, neo-Hookeanσxx = μ(s²−1)/s + λ ln s/s, σyy = λ ln s/sh = 0.05exact to 1e-9 relative, block stays at rest1e-9
simple shear γ = 0.3, neo-Hookeanσxx = μγ², σxy = μγ, σyy = 0h = 0.05exact to 1e-9, at rest1e-9
free block under traction T, T/E = 1e-4εxx = T(1−ν²)/E, εyy = −Tν(1+ν)/Eh = 0.1linear: 9.0992e-5 / −3.9002e-5 (exact 9.1e-5 / −3.9e-5); neo-Hookean within 5.2e-5 relative1e-4 / 5e-4
P-wave, periodic standing wave√((λ+2μ)/ρ) = 11.602416 / 32 nodes per wavelength11.5395 / 11.5867 (−0.54 % / −0.14 %, second order)1 % / 0.25 %, ratio < 0.35
S-wave√(μ/ρ) = 6.201716 / 326.1638 / 6.1922 (−0.61 % / −0.15 %)same
thick cylinder, plane strain (a = 10, b = 20, p = 100, E = 210000, ν = 0.3)Lamé; FieldCraft FEM (quad8, oracle lame-cylinder-plane-strain) u_r(a) = 0.0090793h = 1 / 0.5 (10 / 20 nodes across the wall)u_r(a) 0.008088 / 0.008789 (−10.9 % / −3.2 %); u_r(15) −11.2 % / −3.3 %; σθ(15) 81.9 / 89.3 vs 92.6 (−11.6 % / −3.5 %)15 % / 4 %, ratio < 0.4

u_r(a) is evaluated from a fit u_r = A r + B/r over the nodes with φ < −2h; the FEM gets the same number to 3e-6 on a 8 × 16 quad8 quarter. The checks except the Lamé ones now run with the blurred and the ghost-filled surfaces (§9). The rigid motions, patch tests and wave speeds also run with the mapped surface (tests/mapped.rs, §10).

Where it falls short:

  • The free surface. Homogeneous states are exact (linear fields are reproduced by every stencil and by the extrapolation). With a curved surface and a strain gradient across it, the blur zone makes the ring too stiff: −11 % with ten nodes across the wall, −3.2 % with twenty (observed order ≈ 1.8, as the incompressible paper reports for its FSI tests). A wider blur is stiffer (ε = 1.0 h: −8.5 %; 2.5 h: −16.8 % at h = 1). Stresses at the surface itself are not usable; the numbers above are a node layer or more inside. §8 finds the cause.
  • Extrapolation is linear: first-order wrong where the strain varies, and its fit needs three non-collinear nodes, so features thinner than about two cells are not represented.
  • Statics by relaxation. The cylinder takes 1200 steps (2601 nodes) at h = 1 and about 4000 steps (10201 nodes) at h = 0.5 to come to rest; the FEM solves the same problem with one sparse factorisation of under a thousand unknowns, more accurately. For a solid alone the RMT is not competitive with the FEM; its case is FSI with large solid motion on the fluid’s grid.
  • Rotation is transported with a first-order time error (explicit update of ξ with the current ∇ξ); second order in time would need a predictor–corrector or an RK stage.
  • Not done: 3D, contact between bodies, prescribed moving boundaries, the incompressible law the LBRMT uses, the LB coupling (step 3).

8. Why the blurred surface is biased

Two suspects: the blur itself (the boundary condition spread over a band 2ε wide) and the band’s ζ, a linear extrapolation that continues the interior strain past the surface. The blur_diagnosis example separates them on the Lamé cylinder (neo-Hookean, p = 100; errors of u_r(a) from the fit over φ < −2h, relative), with two switches the solid keeps for this: Solid::set_exterior_map prescribes the exact Lamé ζ in the band instead of extrapolating it, and Boundary::BlurredBody integrates the momentum only at the body’s nodes (φ < 0) with v extrapolated into the band (“sm” in the study notes).

band ζmomentum atε / hκγ ×h = 1h = 0.5h = 0.25
extrapolatedφ < ε (published)1.50.11−10.9 %−3.17 %−0.85 %
exactφ < ε1.50.11+0.30 %+0.11 %– (unstable)
extrapolatedφ < 01.50.11−39.1 %−24.2 %−13.8 %
exactφ < 01.50.11+0.31 %+0.088 %+0.017 %
exactφ < ε1.0 / 2.00.11+0.15 % / +0.53 %+0.075 % / +0.18 %
extrapolatedφ < ε1.0 / 2.00.11−8.5 % / −13.9 %−2.3 % / −4.5 %
extrapolatedφ < ε1.501−39.2 %−24.2 %
extrapolatedφ < ε1.50.10.5 / 2 / 4−7.5 % / −15.4 % / −20.7 %
exactφ < 01.50.10.5 / 2 / 4+0.31 % / +0.31 % / +0.31 %

What this shows:

  • The extrapolation is the bias. With the exact ζ in the band the published scheme is within 0.3 % at h = 1; the blur width alone costs a few tenths of a percent (+0.15 / +0.30 / +0.53 % for ε = 1.0 / 1.5 / 2.0 h).
  • The published −10.9 % is a cancellation. The band nodes with 0 < φ < ε integrate momentum, but their ζ is overwritten by the extrapolation every step, so they never come to rest, and the artificial viscosity turns their velocity into a surface stress that offsets part of the extrapolation error. Without the band’s momentum (φ < 0), or without the viscosity, the true extrapolation error shows: −39 % at h = 1, order 0.4–1.0.
  • The static answer depends on the damping used to reach it: −7.5 % to −20.7 % for γ × 0.5 to × 4 at h = 1, and on κ. With the momentum in the body and the exact band, both drop out.
  • Measured and dropped (not committed): quadratic least-squares extrapolation (−3.7 % at h = 1, +0.16 % at h = 0.25, but noisy and divergent without viscosity), harmonic extensions (worse and unstable), other blur kernels (none removes the bias; the best with the exact band gives +0.10 % at h = 1), averaging over grid rotations (the angular spread also comes from the extrapolation).

A flat face isolates the same effect without curvature or staircase (a slab |x| < L under a body force, σxx falling linearly to zero at the faces): the blurred surface puts the face at an effective position off by a fixed fraction of h that depends mostly on where the face cuts the grid, so the stress error is O(1) · (dσ/dn) · h, first order.

ε / hface θ h past a node: 00.250.50.75
blurred, effective face shift δ / h1.0+0.06+0.25+0.82+2.51
1.5+0.13+0.30+0.66+1.47
2.5+0.24+0.39+0.63+1.01
blurred, σxx error at the last node / (ρ g h)1.50.820.911.211.98

δ / h is the same at h = 1, 0.5 and 0.25 (0.658 h at θ = 0.5, ε = 1.5 h): first order.

So a sharp surface needs two things: the traction imposed where the surface is, by the solid’s own stress (no blending), and no stress computed from extrapolated ζ.

9. A sharp boundary by ghost values (kept for comparison)

Boundary::Ghost (crates/eulerian/src/sharp.rs) was the first sharp surface. It is kept as an option for the comparison studies; §10’s mapped cut cells replace it.

Momentum is integrated at the body’s nodes only; every edge with a body node at either end uses the solid stress alone (no blending); the first 8-neighbour ring of nodes outside (the ghosts) gets ζ from a local constrained least-squares fit: a polynomial ζ(d) per component fitted to the body nodes in a 7 × 7 (cubic) or 5 × 5 (quadratic) window, subject to the two equations [σ(G₀) + C:(∇ζ − G₀)]·n = σ_ambient·n at the surface point nearest the ghost (the stress linearised about the previous fit, C by differences of the material law; two passes, so the traction is exact at equilibrium for any law). The surface point is the projection d ← d − φ∇φ/|∇φ|² onto φ₀(x + ζ(x)) = 0; the normal is ∇φ there. Outer band layers stay linear (they only feed φ and the upwind advection).

Rules for the hard cases:

  • small cut cells: nothing divides by the cut distance, so a surface arbitrarily close to a node gives a regular system;
  • a surface that comes to rest on a node: body nodes leave at φ ≥ 0, band nodes enter only at φ < −h/10 (without this hysteresis the finite-strain cylinder rang forever, 8 bore nodes flipping in and out); a ghost may therefore lie up to h/10 inside, and the projection runs from either side;
  • fits the data barely determine (the inside of a convex corner): the KKT system is equilibrated and a pivot below 1e-6 refuses the fit; then the quadratic, then a linear fit with the same traction, then the plain extrapolation (counted; zero in every case below);
  • other things measured and dropped: other fit weights (no change: the error is truncation), extra traction rows at the window’s edge crossings (doubled the error: they over-constrain the fit’s gradient), the quadratic fit (exact for linear stress, but 3–5 times the cubic’s error at a curved surface).

Stability: with no artificial viscosity (κ = 0) a growing surface mode appears after a few thousand steps in the cylinder, at any time step (CFL 0.4 and 0.2 alike): the closure is not symmetric. κ = 0.02–0.1 damps it, with or without the relaxation damping, and the static answer does not depend on κ or γ.

Verification (linear elastic at strain 1e-6 unless noted; examples/boundary_study.rs). The slab of §8 is exact to the relaxation tolerance wherever its faces cut the grid (effective face shift −7e-7 to −6e-6 h). Lamé cylinder (a = 10, b = 20; relative errors; σ at the bore extrapolated from the three nearest nodes on y = 0):

hblurred u_r(a)orderghost quadratic u_r(a)orderghost cubic u_r(a)ordercubic σθ(15)cubic σrr(a)/p (−1)cubic σθ(a)
2−2.61e-1–−1.07e-1–−1.42e-1–−1.33e-1−0.838−1.80e-1
1−1.12e-11.22−3.69e-21.54−2.57e-22.47−2.71e-2−0.986−4.61e-2
0.5−3.45e-21.70−1.11e-21.73−4.01e-32.68−5.32e-3−1.0015−1.01e-2
0.25−1.01e-21.78−3.12e-31.83−6.29e-42.67−1.25e-3−1.0011−2.15e-3
0.125−2.75e-31.87−7.64e-42.03−5.89e-53.42+6.6e-5−1.0004−4.14e-4

The maximum nodal stress error of the cubic fit converges at order 2.2 (1.5e-2 p at h = 0.5). The blurred surface’s σrr at the bore is −0.03 / −0.46 / −0.72 / −0.86 / −0.93 p for h = 2 … 0.125; the ghost fill reaches −p within 0.2 % from h = 0.5.

Kirsch hole (a = 5 in a disc R = 20 with the Kirsch traction on r = R, so the finite domain is exact; σθ at the hole edge extrapolated along the axis):

hblurred σθ(a, 90°)/S (3)σθ(a, 0°)/S (−1)ghost quadraticghost cubic
12.184−0.2543.169−1.3383.166−1.321
0.52.693−0.6683.056−1.1113.010−1.054
0.252.938−0.8973.020−1.0362.997−1.007
0.1253.002−0.9723.006−1.0112.998−1.000

The blurred value at 90° crosses 3 S on its way from below (+0.05 % at h = 0.125 is a coincidence: its error around the hole oscillates between −0.02 S and +0.07 S at h = 0.25, against ±0.02 S for the cubic fit). Maximum nodal stress error: blurred 0.135 S, cubic 5.4e-3 S at h = 0.125.

Rotating annulus (a = 10, b = 20, free surfaces, centrifugal body force, closed form u = C₁ r + C₂/r − K r³; non-harmonic):

hblurred u_r(a)σθ(a)ghost cubic u_r(a)σθ(a)max σ error / σθ(a)
1−7.8e-2−2.3e-2−1.96e-2−2.8e-22.5e-2
0.5−2.4e-2+1.8e-2−3.0e-3−6.2e-35.6e-3
0.25−6.8e-3+1.9e-2−4.8e-4−1.3e-31.2e-3

(orders of the ghost fill 2.7 / 2.2 / 2.2; the blurred σθ(a) does not converge). The static answer no longer depends on the damping: u_r(a) at h = 1 equal to 2e-5 for γ × 0.5 and × 4 (blurred: −7.9 % against −20.9 %).

Finite strain: neo-Hookean cylinder. The decoupled neo-Hookean law of FieldCraft’s FEM (μ, κ from E = 210000, ν = 0.3), bore pressure p = 8000 (p/E = 0.038; the linear solution scaled to it is u_r(a)/a = 7.3 %, the nonlinear one 8.2 %), applied in ten increments. Reference: FieldCraft’s FEM, nonlinear static with follower pressure, plane-strain quad8 quarter, converged by refinement (16 × 32 → 32 × 64: u_r(a) 0.815032 → 0.815032, σθ at r = 15 in the deformed body 8777.3 → 8777.5).

u_r(a)σθ(r = 15)σθ at the boreσrr at the bore
linear Lamé scaled to p0.726740713333−8000
FEM 32 × 640.8150328777.514700−7998
ghost, h = 20.6440711411548−7188
ghost, h = 10.7924847113972−8151
ghost, h = 0.50.8108871414558−8040
ghost, h = 0.250.8144876514677−8009
ghost, h = 0.1250.81499 (−4.7e-5)8777.914697−8004
Richardson (0.5, 0.25, 0.125)0.81510 (order 2.7)8782.5 (order 1.95)14701 (order 2.6)

The blurred surface folds (det ∇ξ < 0) during the load ramp at every resolution at p = 8000 and at p = 4000, and at some resolutions at p = 2000–3000.

Cost (Apple M4 Max, release build, one thread per run, cylinder, linear):

hnodesblurred stepsms/stepwall sghost stepsms/stepwall sghost u_r(a) error
210897800.150.112001.11.31.4e-1
1280918600.350.621402.34.92.6e-2
0.5864942400.933.943004.820.54.0e-3
0.252992978202.922.4912010.696.56.3e-4
0.125110889164809.81611722034.45915.9e-5

A profile at h = 0.25: ghost fits 65 %, grid neighbour lookups 12 %, the linear band fill 11 %, edge stresses and momentum 6 %. Steps to rest grow as 1/h, so a static answer by relaxation costs O(h⁻³) in 2D: 10³–10⁵ times the FEM, which reaches u_r(a) within 6e-3 on 1 × 2 quad8 elements, 6e-4 on 2 × 4 and 4e-5 on 4 × 8 (121 nodes; σθ(15) within 8e-4), each in about 1 ms, and the finite-strain case in 0.04–0.9 s (8 × 16 to 32 × 64).

10. Mapped cut cells (the default surface)

Boundary::Mapped (crates/eulerian/src/{cut,mapped}.rs) is the default surface. It removes both causes of §8: no blending, no stress from extrapolated ξ, momentum only inside the body.

  • Control volumes. A node inside the body (φ < 0) carries momentum for the solid part of its dual cell. The surface in each cut grid cell is a quadratic curve through its two edge crossings and a third point on φ₀(ξ) = 0 above the chord. Areas, centroids, the solid pieces of the faces and the surface pieces of each quarter cell come from Green’s theorem over that curve (three Gauss points per side, exact for it), so every control volume closes exactly and a constant stress puts no net force on any cut cell. The lumped mass is ρ times the true solid area. Solid in the dual cell of an outside node is shared between the inside neighbours across the surface along x and along y, with smooth weights in |∂φ/∂x| against |∂φ/∂y|; its net force and mass go with it. A control volume below a quarter of h² would join its deepest inside neighbour (never needed in the cases below).
  • Fluxes. Faces between full cells keep the compact interior stencil. Faces next to a cut cell integrate σ(F)·n with two Gauss points on each solid piece; on the curved side the flux is the prescribed traction σ_ambient·n with the curve’s line Jacobian.
  • The deformation gradient near the surface comes from a surface-fitted map. Where a grid line along axis d crosses the surface (up to about 72° from the normal) there is a surface point with its own value ξ_S. Between neighbouring lines, T(u, η) = (x_d′ = (l + u) h, x_d = Y(u) − σ η h) maps the unit square onto a cell whose side η = 0 is the surface, Y(u) the crossings interpolated with the same Lagrange shape functions in u as the field; ζ(u, η) = Σ L_l(u) p_l(η), p_l quadratic through ξ_S and the two inside nodes on line l; ∇ζ = (∂ζ/∂u, ∂ζ/∂η) T′⁻¹ and F = (I + ∇ζ)⁻¹. Near the diagonal both families of lines give a map and the two are blended smoothly.
  • Surface values satisfy σ(F)·n = t at every surface point: Newton on the conditions of each chain of points along the surface, banded finite-difference Jacobian, LU with partial pivoting, warm-started from the previous step (two or three iterations).
  • The band is still filled by the linear least-squares extrapolation, but only the ξ advection (upwind neighbours) and the crossing positions use it.

Three things the first version got wrong and the final one fixes: a discrete choice that can flip between steps makes the force discontinuous and the explicit scheme chatters instead of coming to rest (the family of lines chosen at 45°, the inside node that takes an outside node’s solid); Gauss–Seidel along the surface diverges at the ends of a family of lines on a tight curve (hence the banded Newton); the cut state must belong to the configuration it is used with (it is rebuilt at the end of each step).

Verification (crates/eulerian/tests/mapped.rs, and the rmt_cases example for the studies; same cases and metrics as before, u_r(a) from the fit over φ < −2h):

checkresult
uniaxial stretch 1.25, simple shear 0.3 (neo-Hookean disc held by the matching ambient stress)exact to 1e-9 at every node and surface point, at rest
rigid translation of a disc across the gridexact to round-off; the surface map amplifies it where the surface passes very close to a node (1/s weights): v to 5e-10, σ to 4e-9 (blurred: 1e-11)
rigid rotation of a free disc by 90° (dynamic)‖σ‖/μ 3.0e-3 (the centrifugal response ρω²R²/μ = 6.5e-3), ξ within 2e-3
P- and S-wave speeds (no surface)the plain stencil: same as §7

Lamé cylinder, |u_r(a) error| (%):

hblurredblur + exact ξ in band (§8)mapped, p = 100 neo-Hookeanmapped, small strain (load × 0.01)
230.3–0.850.99
110.90.310.1540.023
0.53.170.0880.1810.0004
0.250.850.0170.1840.0018
0.1250.11–0.1850.0016

The mapped error at p = 100 levels at +0.18 %: that is the finite-strain answer (the pressure acts on the expanded bore, u is measured at the current position), not a discretisation error; with the load cut a hundredfold it falls to 0.0018 %, the same floor scaled. Below h = 0.5 the small-strain error sits on that floor, so the order is read off the stresses: the worst σθ over the bore surface points (small strain) is 6.7, 1.4, 0.32, 0.082, 0.026 % for h = 2 … 0.125 (orders 2.3, 2.2, 2.0, 1.7). Rotating disc (ρω² = 0.5, both surfaces free): u_r(a) small strain −6.9, −0.015, +0.003, +0.002, +0.001 %; worst bore σθ 4.2, 0.89, 0.20, 0.052, 0.017 % (blurred u_r(a): −47, −7.6, −2.2, −0.54, −0.04 %). Kirsch hole (a = 5 in a disc of radius 20 with the exact traction outside): RMS error of σθ around the hole edge 3.4, 3.7, 0.53, 0.12, 0.027 % of 3S (orders 2.8, 2.2, 2.1 from h = 1); σθ(a, 90°) within 0.04 % of 3S from h = 0.5; the blurred surface’s worst node next to the hole is 30, 18, 6.2, 3.6, 2.1 % off.

  • Damping no longer moves the answer: u_r(a) at h = 0.5 is 0.00022 / 0.00036 / 0.00041 % for γ × 0.5 / 1 / 4 (blurred: −1.9 / −3.2 / −7.7 %), nor does the artificial viscosity (κ = 0.02: +0.150 % against +0.154 % at h = 1; blurred −22.6 % against −10.9 %).
  • The band decides nothing measurable: 2, 4 or 6 extrapolation layers give identical results; prescribing the exact ξ there moves u_r(a) by 0.004 % (h = 1) and 0.015 % (0.5).
  • Time step. With κ = 0.02 (so the viscous limit does not cap Δt) the mapped scheme relaxes up to Δt = 0.7 h/c_P at h = 1 and 0.8 at 0.5, the blurred one up to 0.8; the default 0.4 has margin. The largest eigenvalue of the mapped operator is 0.22–0.26 of the explicit limit at 0.4. The operator is not symmetric near the surface (asymmetry 0.17 of its largest entry at h = 1); its complex eigenvalues grow by up to 0.5 % per step without damping, so undamped dynamics need the artificial viscosity (κ = 0.1 suffices; the blurred scheme without it diverges at t = 0.5).
  • Cost per step on one core (Lamé; blurred / mapped, ms): h = 2: 0.10 / 0.66; 1: 0.31 / 1.5; 0.5: 1.0 / 3.5; 0.25: 3.6 / 9.0; 0.125: 13.8 / 26.6. The cut cells (≈ 0.9 ms at h = 0.5) and the surface solve (≈ 0.6 ms) grow with the surface, about × 2.2 and × 1.5 per halving of h; the rest is the interior’s O(n) work, so the ratio falls from 6.6 to 1.9.

The three surfaces side by side (small strain; the blurred and ghost columns from §9’s study at strain 1e-6, the mapped one from this section’s at load × 0.01; per-step costs from the two studies’ own runs on one core):

hblurredghost fill (cubic)mapped
Lamé u_r(a) error1−11.2 %−2.57 %0.023 %
0.5−3.45 %−0.40 %0.0004 %
0.25−1.01 %−0.063 %0.0018 % (floor)
Kirsch σθ(a, 90°)/S (exact 3)0.52.6933.010within 0.04 % of 3
0.252.9382.997within 0.04 % of 3
rotating disc u_r(a) error1−7.8 %−1.96 %−0.015 %
0.5−2.4 %−0.30 %+0.003 %
static answer, γ × 0.5 against × 41 / 0.5−7.9 / −20.9 % (h = 1)equal to 2e-5 (h = 1)0.00022 / 0.00041 % (h = 0.5)
order of the surface stressnone (σθ(a) does not converge)2.22.0–2.3
ms per step, h = 0.1259.8–13.834.426.6

11. Statics without relaxation: Newton–Krylov with multigrid

Dynamic relaxation needs a number of steps that grows as 1/h (the explicit step is bounded by h/c_P while the slowest mode’s period is fixed), so its cost is O(n h⁻¹) = O(h⁻³) on n grid nodes: 661 s of CPU for the Lamé cylinder at h = 0.125. Solid::solve_static (crates/eulerian/src/{statics,multigrid}.rs) solves the equilibrium of the mapped boundary directly. In statics the reference map is the inverse motion, ξ(x) = X(x); nothing is advected.

The problem. Unknowns: ζ = ξ − x at the body nodes that hold a control volume (a merged node moves with the node it joined). Residual R(ζ): the net force on every control volume of §10 (face fluxes of σ(F), the traction on the curved surface, the body force) at a load factor λ, with the surface values ζ_S solved from their traction conditions and the band refilled from the body inside every evaluation. R = 0 is exactly the rest state of the dynamic scheme.

The body depends on the unknown. {φ₀(ξ) < 0} moves while Newton converges, so the unknown set and the cut structure change. Each linearisation and its line search hold the topology: the node kinds, which surface points carry values and how they are matched, the merged control volumes. With it held, crossings, areas, normals and surface values move continuously with ζ. A trial step that moves the surface across a node is judged on the rebuilt topology (a node that entered the body starts from its extrapolated ζ); the topology is also re-derived at every converged state, and convergence counts only when the two agree. The load is ramped by a load factor with a secant predictor; an increment whose Newton fails (line search below 1/64) is halved. The structure that depends only on the node kinds (cut-cell list, crossing edges, full-cell areas, face list, the band fill as a linear map) is built once per topology; a held evaluation recomputes only the near-surface geometry.

Rigid motions. The four bodies are free in the plane. The equilibrium the relaxation reaches is R ∈ span(MΦ) (Φ: two translations and the rotation about the centre of mass; M: lumped masses), because the discrete net load drives a rigid drift. The solver measures QR with Q = I − MΦ(ΦᵀMΦ)⁻¹Φᵀ (inertia relief) and keeps updates free of rigid motion with P = I − Φ(ΦᵀMΦ)⁻¹ΦᵀM, so GMRES solves the consistent singular system QJP δ = −QR.

Jacobian: matrix-free (JFNK). J v ≈ (R(ζ + εv) − R(ζ))/ε with ε‖v‖∞ = 10⁻⁷ h. The residual contains an implicit solve (the surface values), root finds (crossings, arc midpoints) and least-squares fits (the band); an analytic Jacobian would have to differentiate all of them, the surface values through the implicit function theorem, and follow every change of the discretisation. The difference quotient is the exact Jacobian’s action at one residual evaluation per Krylov iteration, so Newton keeps its quadratic convergence; only the preconditioner needs a matrix, and an approximate one does. Krylov: restarted GMRES(60), right preconditioned (the operator is not symmetric near the surface), Eisenstat–Walker forcing (choice 2, η ≤ 10⁻²). Converged when ‖QR‖∞ ≤ 10⁻⁹ times the larger of the largest external force on a control volume and the largest force through a face.

Preconditioner. A geometric V-cycle on Galerkin coarse operators A_{l+1} = Pᵀ A_l P over the grid hierarchy (every second node), point-block Gauss–Seidel (2 sweeps forward before, 2 backward after), a dense LU on the coarsest level (≤ 400 nodes) bordered with the rigid motions. Coarsening rule at the cut cells: a coarse node is a coarse unknown when the fine node on it is a fine unknown, plus, for a fine unknown left without one among its bilinear parents, its parent of largest weight; each fine unknown interpolates from the parents it has, weights renormalised. Constants are reproduced everywhere, linear fields exactly in the interior and to O(h) at the surface, and P has full column rank. (Taking every parent of a fine unknown keeps linear fields exact but makes P rank deficient where several coarse nodes outside the body parent only the same cut-cell node: the first version’s Galerkin operator had a fourth null vector and its coarse LU failed.) Geometric multigrid works at the cut cells; neither AMG nor ILU was needed. The fine matrix A₀ is a ghost-cell approximation of the Jacobian, assembled in O(n) without a residual evaluation: every face with solid on it carries the tangent of its compact-stencil flux (∂f/∂(∇ζ) by differences of the constitutive law) times its solid fraction, ζ at band nodes expanded through the band fill, and each dual cell’s rows go to the control volumes holding its solid with their shares. Away from the surface that is the exact Jacobian; at the surface it ignores the cut geometry, the surface map and the surface values. The alternative implemented beside it probes the rows near the surface (2 s² residual evaluations perturbing one colour of unknowns at a time, s = 5 or 7, interior rows from the tangent). It is closer at the surface but costs 50–100 evaluations per build, and the ghost cells give the same iteration counts (table below), so they are the default.

Reuse. The hierarchy is kept while the topology is unchanged, across Newton steps and load increments, and rebuilt when it is stale (GMRES needs more than twice the iterations it took when fresh). The factorised banded Jacobian of every surface chain is kept the same way, and the surface solve inside each residual evaluation becomes a chord iteration (refactorised when it contracts slowly). A kept hierarchy adapted to a changed topology (unknowns matched by node, new ones on their probed diagonal blocks) cost 45–225 GMRES iterations instead of about 20 even for 12–19 new nodes, growing with 1/h, so a topology change always rebuilds; with the ghost-cell matrix a rebuild is cheap.

Verification (static against relaxed; relaxed with the §10 settings and tolerance, then compared node by node; “non-rigid” removes the best-fit rigid motion of the difference, which the free relaxed body accumulates):

casehmax |ξ_static − ξ_relaxed|non-rigidrigid driftmax |u|body nodes differing
Lamé2 / 1 / 0.5 / 0.252.7e-7 / 7.7e-7 / 1.8e-6 / 5.8e-72.6e-7 / 7.7e-7 / 1.8e-6 / 5.3e-7≤ 2e-89.1e-30
rotating disc2 / 1 / 0.5 / 0.254.3e-7 / 7.6e-7 / 1.8e-6 / 1.0e-62.6e-7 / 7.6e-7 / 1.8e-6 / 1.0e-6≤ 2e-77.7e-30
Kirsch2 / 1 / 0.5 / 0.253.4e-7 / 7.8e-6 / 8.4e-6 / 9.8e-81.4e-7 / 1.6e-7 / 7.8e-8 / 8.7e-8up to 6e-61.0e-20
neo-Hookean, p = 800022.0e-29.9e-41.1e-2, turn 4.4e-40.790

The differences fall with the relaxation’s tolerance (Lamé, h = 1: 7.7e-7, 1.1e-7, 3.9e-9 for the tolerance × 1, 0.1, 0.01), so the static solution is the relaxation’s limit; the tests (crates/eulerian/tests/statics.rs) check Lamé at h = 1 against a relaxation ten times tighter than §10’s (max |Δu| below 10⁻⁴ of max |u|) and a finite homogeneous stretch to 10⁻⁹.

Neo-Hookean cylinder (decoupled law, p = 8000, FEM u_r(a) = 0.815032), static solve:

h10.50.250.1250.0625
u_r(a)0.8117360.8143040.8148690.8149950.815024
error−4.0e-3−8.9e-4−2.0e-4−4.5e-5−9.8e-6

(observed order 2.1–2.2). The static/relaxed comparison of this case exists only at h = 2, and it is weak there: the relaxed body turned rigidly by 4.4e-4 rad and moved 1.1e-2, and a body turned on the grid has a discrete equilibrium that differs by about the discretisation error (the non-rigid difference, 1.3e-3 of u, is of that size at h = 2). The ramped relaxation (ten increments, at most 300 000 steps each) took 303 240 steps at h = 2 and had not finished at h = 1 after more than 20 min of CPU, so the finer grids are unverified against it; the static answers converge to the FEM’s at second order instead.

Iterations (one core, CPU s; N Newton steps; K GMRES iterations, mean and largest per step):

hnodesLamé N / Kdisc N / KKirsch N / KNH N / K (increments)
26763 / 16, 253 / 17, 254 / 11, 1510 / 14, 26 (3)
126014 / 13, 234 / 13, 213 / 15, 2111 / 9, 20 (3)
0.5102013 / 15, 223 / 15, 203 / 14, 2112 / 10, 20 (3)
0.25404013 / 15, 233 / 12, 203 / 14, 2217 / 10, 24 (4)
0.1251608013 / 13, 183 / 14, 203 / 13, 1920 / 10, 23 (4 + 1 failed)
0.06256416014 / 12, 223 / 15, 223 / 11, 1827 / 9, 19 (5 + 2 failed)

GMRES iterations to 10⁻⁸ on the first Newton system (Lamé; the other cases with the ghost-cell matrix within 20–28 at every h):

h210.50.250.1250.0625
unknown nodes23692837561504460288241264
multigrid, ghost-cell matrix (default)242026232425
multigrid, probed matrix, s = 5152119262731
multigrid, probed matrix, s = 7141817171821
probed matrix as the operator (the V-cycle alone)112017222225
no preconditioner1813607563107––

GMRES counts per Newton step are h-independent, and so are the Newton counts of the linear-load cases; the neo-Hookean cylinder’s total grows (10 → 27) because finer grids see more topology changes and failed increments during the ramp (about 5 Newton steps per accepted increment throughout). With the probed matrix the counts creep up with s = 5 (its lumping of the surface coupling) and much less with s = 7; the V-cycle alone on its own matrix creeps up slowly too (11 → 25), mostly from the coarse levels at the surface (a W-cycle gave 14, 14, 19 at h = 1, 0.25, 0.0625; stopping the coarsening at about 240 instead of 60 nodes took h = 0.0625 from 28 to 25).

Cost (CPU s, one core, Apple M4 Max with other jobs running; the relaxation is the §10 driver to its default tolerance):

hLamé staticrelaxationratiodisc staticrelaxationKirsch staticrelaxationNH static
20.040.85210.050.920.040.780.13
10.093.6400.104.40.093.90.24
0.50.1816.3910.2017.70.2021.90.61
0.250.561021820.461050.54–2.5
0.1251.556614261.60–1.62–9.4
0.06256.2–5.6–5.0–37

The static cost is O(n) = O(h⁻²): × 2.8 and × 4.0 per halving for Lamé, × 3.8 and × 4.0 for the neo-Hookean cylinder from h = 0.25; the relaxation is × 6.3 to × 6.5 per halving, O(h^−2.7) here (steps ∝ h⁻¹ times O(n) per step, the surface work making up the rest). The FEM still wins by orders of magnitude: the quad8 quarter reaches u_r(a) within 4e-5 on 4 × 8 elements in about 1 ms; the static RMT matches that at h = 0.5 (§10’s small-strain error) in 0.18 s, about 200 × the FEM, and the bore stress to 0.3 % only from h = 0.25. The neo-Hookean cylinder takes the FEM 0.04–0.9 s (8 × 16 to 32 × 64); the static RMT 9.4 s at h = 0.125 for −4.5e-5.

Reuse, measured. Keeping the surface chains’ factorisations cuts the chain factorisations 15–20 × and the traction evaluations 4–5 ×, about halving the cut-and-surface stage of an evaluation; with the ghost-cell matrix, keeping the hierarchy saves one build of two or three. Together they change the total by up to 20 % (Lamé h = 0.125: 1.40 s rebuilding everything, 1.28 keeping the hierarchy, 1.46 keeping the LUs, 1.50 keeping both; the neo-Hookean cylinder: 10.6, 10.2, 11.9, 9.1 s); the spread between runs of a different Newton path is as large. With the probed matrix (50 evaluations per build) keeping the hierarchy matters: Lamé 0.60 / 1.60 / 5.38 s rebuilding against 0.46 / 1.32 / 4.01 s keeping it at h = 0.5 / 0.25 / 0.125 (−25 %), the neo-Hookean cylinder 6.1 / 10.4 / 63.8 s against 3.7 / 7.9 s at h = 0.5 / 0.25 (−25 to −40 %). The ghost-cell matrix made that reuse mostly unnecessary.

Where the time goes (share of the solve at h = 0.125 / 0.0625): face forces (the interior’s compact fluxes and the surface map at the cut faces) 26–37 %; V-cycles 15–24 %; the ghost-cell assembly and multigrid setup 15–24 %; the cut cells and surface solve 6–16 %, falling with h; topology rebuilds 4–8 % (16 % for the neo-Hookean cylinder, whose bore moves 6.5 cells at h = 0.125 and changes the topology 12–16 times); the rest is GMRES orthogonalisation and vector work. Every residual evaluation costs O(n) (interior fluxes) plus O(h⁻¹) with a large constant (the surface map, the cut cells, the surface solve), and a solve takes 40–60 of them for the linear cases and 120–310 for the neo-Hookean cylinder.

Where it falls short:

  • Not faster than the FEM. The cost order is now that of the FEM’s iterative solvers, but the constant is not: a residual evaluation does the cut geometry, the surface solve and the surface map, and a solve needs 40–300 of them. For a solid alone the FEM remains the tool; the static solve matters for the RMT inside a fluid grid (an initial equilibrium, quasi-static loading, an implicit solid step) and as a fast verification path.
  • Finite strain. The surface sweeps over nodes during the load ramp, so the topology changes every few Newton steps (16 times at h = 0.0625) and each change rebuilds the preconditioner. Right after such a change the line search sometimes stalls (step below 1/64 with ‖QR‖ flat), most likely at surface points a node only just behind the surface (depth s → 0, map weights ∝ 1/s); the increment is then halved (1–2 failures per solve at h ≤ 0.125). A surface stencil that skips nodes too close to the surface would remove it, but changes the discretisation.
  • The neo-Hookean cylinder is verified against the FEM, not against the relaxation, below h = 2 (the ramped relaxation did not finish at h = 1); the three linear-load cases are verified against it to h = 0.25.
  • Multigrid at the surface is good, not perfect: the V-cycle alone creeps from 11 to 25 iterations over 1000 × more unknowns; GMRES absorbs it.
  • Not done: 3D, a held (Dirichlet) part beside the free bodies (supported, untested here beyond the code path).

12. Local refinement near the surface

The mapped surface is second order, but on a uniform grid its accuracy costs the same resolution everywhere. crates/eulerian/src/refine.rs refines a band around φ = 0 instead: a quadtree stored level by level, each level a sparse uniform lattice (Grid::sparse: only the active nodes are stored and walked, so the whole Solid and the mapped boundary run on a level unchanged), the surface on the finest level only.

  • Regions. The finest region is the cells of level L − 1 within band (default 6) finest cells of φ = 0, each split in four. Every coarser region contains the next one dilated by two of its own cells (proper nesting, which implies the 2:1 balance across edges and corners). A level assembles only its leaf cells (those not refined further); the base level keeps only the cells touching the body.
  • Roles. On level l a node is interior (all its cells are leaves here), a master (on the interface with level l − 1, at a coarse position; updated here), hanging (on that interface between two masters), a ghost (two layers outside the region), or held (on the interface with level l + 1, or under it in a buffer of two cells; copied from there).
  • Hanging nodes. Value: cubic along the interface through the two masters and the next nodes on the line (quadratic at a corner). Mass and force: half to each master. With the half-faces of the cells this keeps a constant stress free of net force (the patch test) for any interpolation exact on linear fields; linear values (the transpose of the sharing) give an O(h²) value error and a first-order stress error in the next cells (1.2 % at h₀ = 1 next to the interface against 0.29 % with cubic values).
  • Ghosts. Biquadratic in the coarser level’s advanced nodes and this level’s masters (a one-sided 3 × 3 window where the centred one reaches under the finer level), linear in time between the coarse states before and after its step.
  • Fluxes and the register. Each half-face of a leaf carries the flux between two of its corners, so every flux is computed once and given to both sides. A dual face that the interface halves is integrated over the leaf’s half with the midpoint rule (the stress a quarter cell from the edge, ¾ of the edge’s plus ¼ of the parallel edge’s). The force of the coarse leaves on an interface node, and their solid area, complete the finer level’s master there (the flux register): summed over every degree of freedom of every level, the impulses of the internal fluxes cancel to round-off (coarse_fine_fluxes_conserve_momentum: 1e-16 of Σ|impulse|).
  • Time. Berger–Oliger subcycling: a step of level l, then two of level l + 1 with Δt/2, then the finer values copied onto the held nodes (velocities averaged over the two substeps, which puts them at the coarse half step). With leapfrog, the coarse kick at tⁿ stands for [tⁿ − Δt/2, tⁿ + Δt/2] and the fine kicks for [tⁿ − Δt/4, tⁿ + 3Δt/4]; holding Fⁿ in the register through both substeps lags the coupling by a quarter coarse step, a first-order error that a P wave shows as a reflection ∝ h/λ. The register is extrapolated to each fine kick, Fⁿ + s(Fⁿ − Fⁿ⁻¹); the extra impulse, (Δt/4)(Fⁿ − Fⁿ⁻¹) per step, telescopes (momentum in transit between the levels’ clocks) and is reported by the audit.
  • Statics. Hierarchy::residual evaluates the composite equilibrium residual (all levels at one time, ghosts and held nodes made consistent, the registers added): the operator a static solver needs, independent of the time loop.
  • Regridding. Hierarchy::regrid (or every N coarse steps) re-flags from the current surface and moves ζ by interpolation from the finest old level holding each point (exact for linear maps) and v by the overlap of old and new control volumes, rasterised on quarter cells of the finer of the two hierarchies (every piece of old mass finds new nodes; Σ m v is kept for full cells; the cut cells next to the surface are rebuilt with the new band and move in the eighth digit).

Verification (crates/eulerian/tests/refine.rs; studies examples/refine_cases.rs and examples/refine_wave.rs):

checkresult
patch tests: uniaxial stretch 1.25, simple shear 0.3, neo-Hookean disc, 1 and 2 levelscomposite residual ≤ 1.1e-13 at every degree of freedom; at rest after 60 steps; σ exact to 1e-7 at every node of every level and at the surface
no refinementthe hierarchy on one level equals the mapped solid on the full grid to 1e-15
control volumesthe composite solid area equals the uniform finest grid’s to 1e-12
momentumΣ impulses over all degrees of freedom of a free, stressed body, 2 levels subcycled: 1e-16 of Σ|impulse| per coarse step (after the register’s in-transit part)
rigid translation of a disc through 30 regrids (2 levels)ξ to 6e-15, v to 2e-12, σ to 1.4e-11
regridevery piece of old mass finds new nodes; Σ m v changes by 1.2e-8 (the rebuilt cut cells)

A P wave across a refined strip (periodic box, Gaussian pulse of half-width w coarse cells, linear elastic, κ = 0; reflected amplitude in % of the incident one, entry / exit):

w1 level2 levels3 levels1 level, register held at Fⁿ
21.5 / 171.3 / 141.2 / 142.7 / 18
40.43 / 0.430.49 / 0.500.44 / 0.451.25 / 1.46
80.11 / 0.110.13 / 0.130.13 / 0.130.55 / 0.58
160.027 / 0.0270.033 / 0.0330.035 / 0.0350.27 / 0.27

Second order in h/w (first order with the held register); every level at the finest Δt gives 0.57, 0.15, 0.037 % (1 level), so the subcycled coupling reflects no more than the spatial one. At w = 2 the pulse is not resolved on the coarse grid and what the fine grid carries cannot leave it (17 % at the exit).

Stability. Without artificial viscosity the coupled operator has slowly growing modes: the pulse’s amplitude reaches 80 × (1 level, after 5–7 trips round the box) to 300 × (2 levels) and saturates there; every level at the finest Δt grows too (10–40 × in 40 trips), so it is the spatial coupling, not the subcycling. The ghost-cell coupling is conservative but not variational (a fine stencil reads interpolated coarse values whose reaction no coarse node receives), as the mapped surface already is (§10: its eigenvalues grow by 0.5 % per step without damping). κ = 0.01 (1 level) and κ = 0.02 (2 and 3 levels) keep 40 trips decaying; the default κ = 0.1 has a wide margin. The explicit step with κ = 0.1 relaxes the refined Lamé cylinder at Δt = 0.6 h/c_P (the viscous cap is 0.625); with κ = 0.02 it relaxes at 0.5 and diverges at 0.6 (late, t = 40) and 0.7, where the uniform mapped scheme still relaxes.

Statics. Linear elastic, load × 0.01 (strain 1e-5), relaxed until the deformation speed stays below 1e-6 of its scale for a full period 2π b/c_P (a single mode passes through zero velocity everywhere at once, and stopping at the first quiet check left the free disc’s displacements 10 × less accurate). Errors in % of σθ(a) exact (Lamé, disc) or 3S (Kirsch). Surface: the worst σθ at the bore’s surface points (Kirsch: RMS of σθ around the hole); interior: the worst nodal stress component at nodes with a + 3 < r < b − 3. CPU on one core of a shared, heavily loaded machine (indicative only).

gridfinest hLamé surfaceinteriorKirsch surfaceinteriordisc surfaceinteriorupdates (Lamé)CPU s (Lamé)
uniform11.4030.4763.6510.6980.8940.3162.78e+066
uniform0.50.3160.1320.5350.1940.2010.0862.31e+0730
uniform0.250.0820.0350.1190.0510.0520.0231.84e+08158
uniform0.1250.0270.0100.0270.0130.0170.0061.47e+09794
uniform0.06250.0090.0030.0070.0030.0060.0021.18e+104299
h₀ = 1, 1 level0.50.2280.5600.5270.4550.1530.4021.70e+0730
h₀ = 1, 2 levels0.250.0740.7790.1150.4590.0300.6207.36e+07142
h₀ = 1, 3 levels0.1250.1090.7310.0560.4590.0500.3152.98e+08544
h₀ = 0.5, 1 level0.250.0580.1510.1200.1640.0390.1018.05e+07141
h₀ = 0.5, 2 levels0.1250.0400.1490.0380.1680.0210.0993.05e+08544
h₀ = 0.5, 3 levels0.06250.0760.1540.0430.1650.0400.1021.21e+092066
  • The surface reaches the uniform finest-grid accuracy while it is above the coarse floor, and then stops: at h₀ = 0.5 two levels give 0.040 / 0.038 / 0.021 % (Lamé / Kirsch / disc), uniform h = 0.125 0.027 / 0.027 / 0.017 %; a third level gives 0.076 / 0.043 / 0.040 %. At h₀ = 1 the Lamé and disc surfaces stall at the second level (0.074 → 0.109 %, 0.030 → 0.050 %); Kirsch still gains at the third (0.115 → 0.056 %). The surface stress is set by the whole wall’s equilibrium, and the coarse interior’s error reaches it: around the Kirsch hole the refined runs carry a smooth cos 2θ offset of 0.05 % (h₀ = 1) and 0.025 % (h₀ = 0.5) on top of the point-to-point scatter of the finest grid.
  • The interior keeps the error of h₀: 0.15 / 0.17 / 0.10 % at h₀ = 0.5 for every number of levels (uniform h₀ = 0.5: 0.13 / 0.19 / 0.086 %), against 0.0095 / 0.013 / 0.006 % on the uniform h = 0.125 grid and 0.003 / 0.003 / 0.002 % at 0.0625. At h₀ = 1 the refined bands fill most of the 10 mm wall and the interior maximum (0.7 %) sits on level-1 nodes next to the level-0 interface, about 1.5 × the coarse grid’s own error. The payoff therefore exists only where the interior error at h₀ is below the target: for these cases h₀ = 0.5 holds 0.1–0.2 % in the interior, so refinement pays for a surface target between about 0.04 % and that level, and not below.

Cost in node updates (a degree of freedom advanced by one step of its level) to rest, and in CPU time:

gridfinest hupdates, uniform same h / refined (Lamé, Kirsch, disc)CPU, sameuniform updates at the refined surface error / refinedCPU, same
h₀ = 1, 1 level0.51.4, 1.8, 1.41.0, 1.0, 1.02.2, 1.9, 2.11.5, 1.1, 1.4
h₀ = 1, 2 levels0.252.5, 3.7, 2.51.1, 1.3, 1.13.0, 3.9, 6.71.3, 1.4, 2.4
h₀ = 1, 3 levels0.1254.9, 7.5, 5.01.5, 1.8, 1.50.4, 2.7, 0.70.2, 0.8, 0.3
h₀ = 0.5, 1 level0.252.3, 3.0, 2.31.1, 1.3, 1.14.4, 3.0, 3.81.9, 1.3, 1.7
h₀ = 0.5, 2 levels0.1254.8, 7.0, 4.81.5, 1.8, 1.52.3, 4.4, 3.20.8, 1.2, 1.1
h₀ = 0.5, 3 levels0.06259.7, 14.6, 9.82.1, 2.7, 2.10.2, 1.0, 0.20.1, 0.3, 0.1

At the same finest h the refined surface error is 0.6–1.0 × the uniform one with one level (and two at h₀ = 1), 1.3–1.5 × with two levels on h₀ = 0.5, and 2–9 × once it has stalled; the interior error is 2–77 × the uniform one (it is h₀’s).

An estimate made before it was built (two levels near both surfaces on h₀ = 0.5, a band of ±4 fine cells: about 6e4 node updates per coarse step against 4.4e5 for a uniform h = 0.125 grid, roughly 7 ×) holds for the count: Lamé at h₀ = 0.5 with two levels makes 5.0e4 updates per coarse step, the uniform h = 0.125 grid 2.4e5 (its 60300 degrees of freedom, not the 110889 nodes of the box), 4.8 × at the same finest h (Kirsch 7.0 ×). At equal surface accuracy the saving in updates is 1.9–6.7 × before the stall and below 1 after it. In CPU time it is 0.8–2.4 × before the stall: the hierarchy walks 3–4 active nodes per degree of freedom on the refined levels (level 2: 31584 active for 10972 degrees of freedom; level 1: 14320 for 1884: the outer half of the band, ghosts, hanging and held nodes, the covered buffers), and every per-node loop of the mapped solid (band fill, cut build, fluxes) visits them; per active node-step it costs the same as the uniform grid (0.56–0.76 µs). A narrower band (4 finest cells instead of 6) cuts 23 % of the updates but doubles the Kirsch surface error (RMS 0.069 % against 0.038 %).

Where it falls short:

  • The interior error stays at h₀, so local refinement cannot reach a uniform accuracy target cheaper unless h₀ already meets it, and the surface stalls after one or two levels, at a floor set by the coarse interior (about 0.04 % here at h₀ = 0.5).
  • CPU savings are small (≤ 2.4 ×) because inactive-but-walked nodes dominate the refined levels; skipping frozen and empty nodes in the solid’s per-node loops, and not activating the outside of the body beyond the band, would bring the CPU ratio towards the update ratio.
  • The coupling needs artificial viscosity (κ ≥ 0.02) for long undamped dynamics, and the stable Δt with little viscosity is somewhat lower than on a uniform grid.
  • Static answers still come from dynamic relaxation with Δt set by the finest level’s subcycles; for statics the composite residual (Hierarchy::residual) is the operator the Newton–Krylov solver of §11 should use, and its multigrid could reuse the levels.
  • Not done: regridding a body that moves more than the band between regrids (the transfer needs the old band to hold the new surface), refinement on criteria other than the distance to the surface, 3D.

13. Threads and the GPU

Threads. Every loop of the explicit step over nodes, cells, faces and surface points runs on fieldcraft-parallel’s pool (map_indexed: results written in place, at least a fixed grain of indices per task). Each value is computed by the operations of the sequential loop and every sum a node gathers (face fluxes in face order, dual-cell areas in the order of their cells, the shares of control volumes and forces) is formed in the sequential scatter’s order, so the step gives the sequential numbers bit for bit on any thread count (tests/threads.rs: 1, 2 and 7 threads, mapped, blurred and ghost-filled; checked also against checksums of the sequential code for the static solve and the refined hierarchy). The surface chains are solved one after another; within a chain the residuals and the Jacobian’s columns run in parallel.

One explicit step of the Lamé cylinder by phase (examples/rmt_profile.rs; Apple M4 Max, ms, one thread):

hnodesinterior facesmapped facessurface forcesmomentumadvectionbandcut cellssurface pointsNewtonstep
0.1251608016.13.73.03.20.95.27.90.52.633.1
0.062564160123.88.311.611.82.816.232.41.24.7112.7

Speed-up of the whole step over one thread (10 performance and 4 efficiency cores):

threads2481014
h = 0.1251.531.892.122.031.95
h = 0.06251.722.643.343.313.23

The pure stencil phases scale 6–7 × on 8 threads (interior faces, advection), the surface ones barely: the Newton chains not at all, the mapped faces and surface points 1–2 ×, and the band and cut-cell scans, which walk the whole grid to find the few nodes near the surface, 1.6–2.3 × and 2.5–3.9 ×. These measurements were made on the mapped step before it was merged with the static solve’s held-topology structures; the merged step gives the same numbers bit for bit and costs about 18 % more per step (38–39 against 32–33 ms at h = 0.125 on one thread, measured back to back): the static solve’s per-topology structure, its face list with the compact stencils’ nodes, is rebuilt every explicit step.

The deep interior on the GPU (crates/eulerian-gpu, layer 7, research only). Far from the surface the mapped step is a pure stencil on full cells (the compact edge stress, the momentum of a full control volume, the upwind advection of ζ). Solid::set_remote lets a device take the solid nodes more than six rings inside (CPU_RINGS: the band’s extrapolation windows, the surface map and the cut cells’ corners need the CPU’s own values that deep); GpuSolid steps them in a wgpu compute shader while the CPU steps everything else at the same time, and each step exchanges the values within two rings of the seam. With no surface (a periodic wave) every node is on the device and steps go in chunks of 64 without exchange.

Single precision needs care: the stress formed as written loses the strain to cancellation (F ≈ I). The shader forms it from small quantities: H = F − I = −F G with G = ∇ζ, B − I = H + Hᵀ + H Hᵀ, ln J = −log1p(tr G + det G) by its series. Lamé cylinder at h = 0.25 after 8000 steps, largest stress difference from the CPU (double precision) over p, and the largest stress error against the closed form over the nodes 2h inside:

load (strain)GPU, stable stressGPU, stress as writtenerror vs closed form: CPU / stable / as written
p = 100 (1e-3)7.7e-63.1e-45.25e-3 / 5.25e-3 / 5.30e-3
p = 1 (1e-5)1.2e-52.9e-21.49e-3 / 1.49e-3 / 2.89e-2

The device’s error is two to three orders below the discretisation error (tests/agreement.rs: a periodic shear wave, the pressurised ring, a disc translating across the grid while the split follows it, against the CPU; skipped without an adapter unless FIELDCRAFT_REQUIRE_GPU=1).

Throughput (examples/rmt_gpu.rs; Apple M4 Max; ms per step):

shear wave, nodes4096163846553626214410485763686400
CPU, 1 thread0.843.313.355.9240846
CPU, 10 threads0.781.83.111.039.4150
GPU, every node0.0340.0410.0630.150.531.92
GPU, 10⁹ node updates/s0.120.401.01.72.01.9

The interior stencil runs 70–80 × faster on the GPU than on ten CPU threads from a quarter of a million nodes up, at 1.7–2.0 × 10⁹ node updates per second (the lattice Boltzmann GPU backend on the same machine: 0.87–1.31 × 10⁹ D3Q19 cell updates per second).

With a surface it does not pay yet. Lamé cylinder, ten CPU threads (ms per step):

hnodesnodes on the GPUCPU aloneGPU interior + CPU surfaceCPU part of itwait for the GPU
0.254040173648.48.58.30.05
0.1251608014492817.916.616.40.07
0.062564160121054436.232.932.50.12
0.03125256320190362093.583.782.90.24

The device finishes long before the CPU (the wait is under 0.3 ms), so the hybrid step is the CPU’s surface work: 1 % slower than the CPU alone at h = 0.25 in the table’s run (1 % faster in a second), 2–7 %, 8–9 % and 10–13 % faster at h = 0.125, 0.0625 and 0.03125 over the two runs. Marking the deep interior remote leaves the CPU step at 16–17 / 33–35 ms on ten threads (h = 0.125 / 0.0625), the same as with every node on the CPU (16.3 / 34.1): what remains are the band, the cut cells and the faces next to the surface, and the full-grid scans that find them (widening the grid around the same cylinder from 160801 to 1442401 nodes takes the CPU step from 16 to 41 ms with or without the remote interior).

What it would take, in order: active-node lists and persistent buffers so the CPU’s work scales with the surface rather than the grid; the cut cells and mapped faces on the device; the surface chains last (their Newton is sequential along a chain).

14. Coupling to the lattice, and the momentum risk

In the blurred LBRMT the fluid stress never appears: the solid’s force density ∇·[(1 − H) τ_s] goes to the LB collision, and momentum is conserved because the force density is the divergence of one stress field (the edge sums telescope). With a sharp solid surface the solid needs the fluid’s traction σ_f·n on the surface: the pressure from the density and the viscous stress from the non-equilibrium moments (σ’_f = −(1 − 1/(2τ)) Π^neq, local at every lattice node), at the surface’s Gauss points; that is the ambient stress field the mapped surface integrates now (Solid::set_ambient_field). The fluid must then see the solid as a moving wall. The risk is momentum: the solid’s momentum change is the balance of its own control volumes, and the fluid’s comes from its own boundary scheme; if the two compute the exchanged force separately they differ by a truncation error, a free body drifts and the total momentum is not conserved to round-off as in the blend. The cut cells hold what a conservative coupling needs: the exact solid fraction of every cell (the input of partially saturated cells, Noble & Torczynski 1998) and the surface pieces of every cut cell (the links a momentum exchange crosses, Ladd 1994; Aidun et al. 1998). Computing the exchanged force once and applying it to both sides makes the coupling conservative by construction. Not measured here (no fluid yet).

15. What still falls short

  • For a solid alone the FEM wins. The static solve (§11) is about 200 times slower than FieldCraft’s FEM at equal accuracy (0.18 s against about 1 ms for the Lamé cylinder). The RMT’s case is FSI with large solid motion on the fluid’s grid, not structural analysis.
  • FSI blockers.
    • The surface is on the CPU. The deep interior runs at GPU speed (§13), but the surface work (band, cut cells, surface map, Newton chains) and the full-grid scans that find it set the step; a lattice on the GPU with a solid surface on the CPU would wait on the CPU every step.
    • Stiff solids. The explicit solid step is bounded by 0.4 h/c_P, while the LBM steps at the lattice’s own (low-Mach) speed scale: for an engineering metal in a slow flow the solid’s stable step is hundreds of times below the lattice’s (about 700 times in the estimate made for the GPU study). A soft solid (the LBRMT’s examples) avoids it; a stiff one needs an implicit or subcycled solid step (the static solve’s Newton–Krylov machinery is the starting point) or a rigid-body treatment.
  • Line-search stalls after topology changes in the finite-strain static solve (§11): the increment is halved 1–2 times per solve at h ≤ 0.125, most likely at surface points a node only just behind the surface.
  • Refinement pays modestly (§12): the interior error stays at the coarse spacing.
  • The ghost-filled and mapped surfaces are not symmetric and need artificial viscosity (κ ≥ 0.02–0.1) for long undamped dynamics.
  • Not done: 3D; contact between bodies; prescribed moving boundaries; the incompressible law the LBRMT uses; thin features below about two cells; the LB coupling itself.

A literature search (Crossref and the open literature to October 2026, about 110 papers) found the following. It is a search, not a proof: some relevant texts could not be read (the Valkov MIT thesis, Lin’s Harvard thesis, both Lara & Kamrin CMAME papers on RMT contact, the full text of Richter 2013), and they may contradict the claims below.

Closest published methods.

  • Sharp traction on Cartesian grids, small strain: cut-cell finite volumes with the traction integrated over the true boundary segment (Theillard et al. 2013) and ghost points with σ·n = t imposed at the closest boundary point plus geometric multigrid (Coco et al. 2014), both second order in displacement. They are the closest analogues of the mapped cut cells and the static solve, at small strain. The explicit simplified interface method (Lombard & Piraux 2004/2006) builds the interface condition into a least-squares extension and keeps second order only with extension order ≥ 3, as our ghost fill found for its cubic fit.
  • Finite-strain Eulerian solids with sharp interfaces (the Godunov line of Barton, Drikakis, Pullin; Gorsse, Iollo & Milcent’s backward characteristics, which are the reference map) impose interface conditions through Riemann ghost states but report no interface order.
  • Fully Eulerian FSI: the finite element line (Dunne 2006; Richter & Wick 2010; Richter 2013; Frei & Richter 2014) defines the solid by the Initial Point Set, which is the reference map under another name, and solves it implicitly by Newton with multigrid; it reaches optimal order only by fitting the interface (locally modified parametric elements, the closest precedent for our surface-fitted map). The finite-difference line (Sugiyama et al. 2011; the RMT papers of Kamrin, Rycroft, Jain, Lin, Wang, Sun) is explicit with a blended band and first order at the interface: Sugiyama et al. measure it against an exact solution, the LBRMT reports about 1.4 in self-convergence, Wang et al. 2022 show second order only towards the model with a frozen blur width.
  • Unfitted finite elements: merged control volumes ≈ aggregated unfitted FEM (Badia et al. 2018); the ghost-cell preconditioner matrix ≈ in spirit the ghost penalty (Burman 2010); cut-cell-aware coarsening ≈ immersed multigrid with Schwarz smoothers (de Prenter et al. 2020); the shifted boundary method (Main & Scovazzi 2018; Atallah et al. 2021) is the strongest alternative to cut cells, optimal for linear elasticity, with no finite-strain version found.
  • Static equilibrium in the inverse motion on body-fitted meshes: Govindjee & Mihalic 1996.
  • GPU: no GPU implementation of the RMT, the LBRMT, the full-Eulerian method or a Godunov Eulerian solid was found; the only GPU Eulerian solids are unvalidated graphics papers (Levin et al. 2011; Fan et al. 2013).

What appears new (hedged).

  1. The stiffness bias of the linear least-squares extrapolation of ξ, measured against an analytic static solution (§8). The ingredients are published (first-order ξ in the band, Valkov et al. 2015; a grid-independent det F error of about 14 % in the band, Jain et al. 2019; second order only towards the frozen-blur model, Wang et al. 2022), but we found no paper linking them to a stiffness error, and every published extrapolation test uses an affine ξ, for which a linear fit is exact. The Valkov thesis is the most likely place for an earlier static test.
  2. The dependence of a blurred RMT’s static answer on the damping, through band nodes that integrate momentum while their ξ is overwritten (§8). Not found.
  3. An implicit static RMT: Newton–Krylov with geometric multigrid and h-independent iteration counts (§11). New for the RMT as far as we can tell, but not the first implicit Eulerian solid (Richter & Wick 2010; Richter 2013) nor the first static solve in the inverse motion (Govindjee & Mihalic 1996).
  4. A measured second-order surface stress for a finite-strain reference-map solid with sharp traction on a fixed grid (§10, §11). The individual techniques have precedents (above); their combination in an RMT with the traction on the true surface, and the measured order at finite strain, appear unreported.
  5. Verification against exact solutions instead of self-convergence: the blurred RMT is −11 % at ten nodes across a wall while its self-convergence looks healthy. Wang et al. 2022’s frozen-blur appendix comes closest to saying so.
  6. An RMT solid on a GPU (§13), with the caveat that only its deep interior runs there.

17. Next steps

In order of payoff for the goal (FSI with large solid motion on the GPU lattice):

  1. The LB coupling (step 3 of #594): monolithic and conservative through the cut-cell data (§14): partially saturated cells driven by the cut cells’ solid fractions, or a momentum exchange on the cut links with covered and uncovered nodes accounted for (Wen et al. 2014’s Galilean-invariant form for moving walls), one velocity field as in the LBRMT. Risk: how a sharp solid traction and a one-cell-diffuse PSM force agree at second order is unproven; the fallback is LBRMT-style forcing on the true solid fraction (first order, still conservative).
  2. The stiff-solid time step: an implicit or subcycled solid step built on the static solve’s Newton–Krylov and multigrid, or a rigid-body limit for very stiff parts (Wang et al. 2022’s projection; Millet & Liberge 2026).
  3. The surface on the GPU: active-node lists so the CPU’s work scales with the surface; the cut cells and mapped faces on the device; then the chains. A head-to-head with the shifted boundary method (whole-cell stencils, no cut integration, no chains) is the alternative if the chains do not port.
  4. A condition-built, higher-order extension at the surface (in the spirit of Lombard & Piraux and Coco et al.): the traction built into a quadratic or cubic fit replacing the 1/s weights near nodes just behind the surface, to remove the line-search stalls of §11 and give a band accurate for dynamics. Schwarz-patch smoothing (de Prenter et al. 2020) for the V-cycle’s creep.
  5. 3D once the coupling works in 2D.

Papers

All read from the open-access versions listed; journal details checked against the published DOI records (Crossref) where marked.

  1. K. Kamrin, J.-C. Nave, An Eulerian approach to the simulation of deformable solids: Application to finite-strain elasticity, arXiv:0901.3799 (2009). https://arxiv.org/abs/0901.3799 — the first RMT paper (journal version not checked).
  2. K. Kamrin, C. H. Rycroft, J.-C. Nave, Reference map technique for finite-strain elasticity and fluid–solid interaction, J. Mech. Phys. Solids 60(11):1952–1969 (2012). doi:10.1016/j.jmps.2012.06.003 (verified). Read from the author copy https://www.math.mcgill.ca/jcnave/papers/elasticity.pdf.
  3. B. Valkov, C. H. Rycroft, K. Kamrin, Eulerian method for multiphase interactions of soft solid bodies in fluids, J. Appl. Mech. 82(4):041011 (2015). doi:10.1115/1.4029765 (verified). Preprint arXiv:1409.6183, titled Eulerian method for fluid–structure interaction and submerged solid–solid contact problems.
  4. C. H. Rycroft, C.-H. Wu, Y. Yu, K. Kamrin, Reference map technique for incompressible fluid–structure interaction, J. Fluid Mech. 898:A9 (2020). doi:10.1017/jfm.2020.353 (verified). Preprint arXiv:1810.03015.
  5. Y. Sun, C. H. Rycroft, A fully-integrated lattice Boltzmann method for fluid–structure interaction, J. Comput. Phys. 526:113774 (2025). doi:10.1016/j.jcp.2025.113774 (verified). Read from the preprint arXiv:2402.12696 (2024), https://arxiv.org/abs/2402.12696; section and equation numbers cited in the code are the preprint’s.
  6. Y. Sun, A lattice Boltzmann implementation of the reference map technique, master’s thesis, Harvard University (2020). https://people.math.wisc.edu/~chr/publish/2020_Sun.pdf.

For the sharp boundaries (§9, §10), journal records checked against Crossref (metadata only; the methods were written from the equations, these are pointers to the established ideas, not sources of code or text):

  1. R. Mittal, H. Dong, M. Bozkurttas, F. M. Najjar, A. Vargas, A. von Loebbecke, A versatile sharp interface immersed boundary method for incompressible flows with complex boundaries, J. Comput. Phys. 227(10):4825–4852 (2008). doi:10.1016/j.jcp.2008.01.028 (verified): ghost cells with the boundary condition at the boundary intercept.
  2. P. T. Barton, D. Drikakis, An Eulerian method for multi-component problems in non-linear elasticity with sliding interfaces, J. Comput. Phys. 229(15):5518–5540 (2010). doi:10.1016/j.jcp.2010.04.012 (record verified; its ghost-fluid treatment not checked).
  3. T. D. Aslam, A partial differential equation approach to multidimensional extrapolation, J. Comput. Phys. 193(1):349–355 (2004). doi:10.1016/j.jcp.2003.08.001 (verified).
  4. H. Johansen, P. Colella, A Cartesian grid embedded boundary method for Poisson’s equation on irregular domains, J. Comput. Phys. 147(1):60–85 (1998). doi:10.1006/jcph.1998.5965 (verified): conservative cut cells.
  5. C. S. Peskin, The immersed boundary method, Acta Numerica 11:479–517 (2002). doi:10.1017/S0962492902000077 (verified).

Related work (§16; DOIs checked on Crossref by the literature search; read in full where open copies existed, else from abstracts):

  1. M. Theillard, L. Djodom, J. Vié, F. Gibou, A second-order sharp numerical method for solving the linear elasticity equations on irregular domains and adaptive grids – Application to shape optimization, J. Comput. Phys. 233:430–448 (2013). doi:10.1016/j.jcp.2012.09.002.
  2. A. Coco, G. Currenti, C. Del Negro, G. Russo, A second order finite-difference ghost-point method for elasticity problems on unbounded domains with applications to volcanology, Commun. Comput. Phys. 16(4):983–1009 (2014). doi:10.4208/cicp.210713.010414a.
  3. B. Lombard, J. Piraux, Numerical treatment of two-dimensional interfaces for acoustic and elastic waves, J. Comput. Phys. 195(1):90–116 (2004). doi:10.1016/j.jcp.2003.09.024.
  4. S. Jain, K. Kamrin, A. Mani, A conservative and non-dissipative Eulerian formulation for the simulation of soft solids in fluids, J. Comput. Phys. 399:108922 (2019). doi:10.1016/j.jcp.2019.108922.
  5. Y. Lin, N. Derr, C. Rycroft, Eulerian simulation of complex suspensions and biolocomotion in three dimensions, Proc. Natl. Acad. Sci. 119:e2105338118 (2022). doi:10.1073/pnas.2105338118.
  6. X. Wang, K. Kamrin, C. Rycroft, An incompressible Eulerian method for fluid–structure interaction with mixed soft and rigid solids, Phys. Fluids 34:033604 (2022). doi:10.1063/5.0082233.
  7. K. Sugiyama, S. Ii, S. Takeuchi, S. Takagi, Y. Matsumoto, A full Eulerian finite difference approach for solving fluid–structure coupling problems, J. Comput. Phys. 230(3):596–627 (2011). doi:10.1016/j.jcp.2010.09.032.
  8. T. Richter, T. Wick, Finite elements for fluid–structure interaction in ALE and fully Eulerian coordinates, Comput. Methods Appl. Mech. Eng. 199:2633–2642 (2010). doi:10.1016/j.cma.2010.04.016.
  9. T. Richter, A fully Eulerian formulation for fluid–structure-interaction problems, J. Comput. Phys. 233:227–240 (2013). doi:10.1016/j.jcp.2012.08.047.
  10. S. Frei, T. Richter, A locally modified parametric finite element method for interface problems, SIAM J. Numer. Anal. 52(5):2315–2334 (2014). doi:10.1137/130919489.
  11. S. Govindjee, P. Mihalic, Computational methods for inverse finite elastostatics, Comput. Methods Appl. Mech. Eng. 136:47–57 (1996). doi:10.1016/0045-7825(96)01045-6.
  12. S. Badia, F. Verdugo, A. Martín, The aggregated unfitted finite element method for elliptic problems, Comput. Methods Appl. Mech. Eng. 336:533–553 (2018). doi:10.1016/j.cma.2018.03.022.
  13. E. Burman, Ghost penalty, C. R. Math. 348:1217–1220 (2010). doi:10.1016/j.crma.2010.10.006.
  14. F. de Prenter, C. Verhoosel, E. van Brummelen, J. Evans, C. Messe, J. Benzaken, K. Maute, Multigrid solvers for immersed finite element methods and immersed isogeometric analysis, Comput. Mech. 65:807–838 (2020). doi:10.1007/s00466-019-01796-y.
  15. A. Main, G. Scovazzi, The shifted boundary method for embedded domain computations. Part I: Poisson and Stokes problems, J. Comput. Phys. 372:972–995 (2018). doi:10.1016/j.jcp.2017.10.026.
  16. N. Atallah, C. Canuto, G. Scovazzi, The shifted boundary method for solid mechanics, Int. J. Numer. Methods Eng. 122(20):5935–5970 (2021). doi:10.1002/nme.6779.
  17. D. Noble, J. Torczynski, A lattice-Boltzmann method for partially saturated computational cells, Int. J. Mod. Phys. C 9(8):1189–1201 (1998). doi:10.1142/s0129183198001084.
  18. A. Ladd, Numerical simulations of particulate suspensions via a discretized Boltzmann equation. Part 1. Theoretical foundation, J. Fluid Mech. 271:285–309 (1994). doi:10.1017/s0022112094001771.
  19. C. Aidun, Y. Lu, E. Ding, Direct analysis of particulate suspensions with inertia using the discrete Boltzmann equation, J. Fluid Mech. 373:287–311 (1998). doi:10.1017/s0022112098002493.
  20. B. Wen, C. Zhang, Y. Tu, C. Wang, H. Fang, Galilean invariant fluid–solid interfacial dynamics in lattice Boltzmann simulations, J. Comput. Phys. 266:161–170 (2014). doi:10.1016/j.jcp.2014.02.018.
  21. D. Levin, J. Litven, G. Jones, S. Sueda, D. Pai, Eulerian solid simulation with contact, ACM Trans. Graph. 30(4) (2011). doi:10.1145/2010324.1964931.
  22. Y. Fan, J. Litven, D. Levin, D. Pai, Eulerian-on-Lagrangian simulation, ACM Trans. Graph. 32(3) (2013). doi:10.1145/2487228.2487230.
  23. T. Millet, E. Liberge, A monolithic lattice Boltzmann–fictitious domain method for particle sedimentation, Results Eng. 30:110942 (2026). doi:10.1016/j.rineng.2026.110942.

Background cited by these papers and used in the prototype: J. Bonet, R. D. Wood, Nonlinear Continuum Mechanics for Finite Element Analysis, 2nd ed., Cambridge 2008 (the compressible neo-Hookean law σ = (μ/J)(B − I) + (λ ln J / J) I); T. D. Aslam, A partial differential equation approach to multidimensional extrapolation, J. Comput. Phys. 193(1):349–355 (2004).