Repository navigation
Mallard 0.5.0
Mallard 0.5.0 makes finite-rate chemistry fast on GPUs and makes TENO-E robust on stretched cells.
Chemistry on GPUs
- Team-per-cell kernels (#119): from 16 species, each cell is integrated by a warp, with a sparse LU from 30 species and cells ordered by cost; small mechanisms keep one thread per cell. The choice is fixed per mechanism and build, so results stay independent of the rank count, the queue order and restarts. On an A100 (reactor benchmark, cells per second at dt = 1e-8 s):
| Mechanism | 0.4.0 | 0.5.0 |
|---|---|---|
| h2o2 | 6.75M | 6.53M |
| GRI-3.0 (53 species) | 121k | 525k |
| n-dodecane | 11.7k | 308k |
| n-hexane (1268 species) | 3.9 | 5.13k |
With every cell reacting, a GRI-3.0 step of the full solver is 2.6× faster. Large-mechanism ignition delays on the GPU match Cantera within 6e-6.
- Wide teams for stiff cells (#128): on GPUs, cells that needed 16 or more sub-steps in their last call get 8 warps (16 from 512 species) on a second stream; results are bitwise identical whatever the team width. At dt = 1e-6 s n-dodecane runs at 48.8k cells/s on an A100 (1.7× faster, 2× 16 EPYC cores) and n-hexane at 581 (3.1× faster).
- Benchmark mode with recorded A100 and CPU baselines (
benchmarks/baselines.csv,docs/design/chemistry.md); the CPU baselines are now measured correctly (#124). - Fused Strang half steps are available but off by default (they make results depend on when output is written).
Reacting-flow examples
- 2D cellular detonation (
examples/detonation_2d, #130): 2H2–O2–7Ar at 6.67 kPa from the ZND solution with seeded fresh-gas pockets, at 10 cells per induction length (as Oran et al. 1998); the front holds the CJ speed within 0.01% while triple points form and coarsen toward the published 3 cm cell width. A newP_MAXoutput records each cell's peak pressure, the numerical soot foil, and survives restarts (#118). - Lean H2/air flame in 2D (
examples/flame_2d, #131): φ = 0.4 at 700 K, mixture-averaged against unity Lewis transport; the planar flame speed matches Cantera within 0.04% (mixture-averaged) and 0.6% (unity Lewis) on the same mesh, and the mixture-averaged front shows superadiabatic burnt gas behind its bulges.
Numerics
- TENO-E on thin cells (#120): stencil cells are ranked by distance in a metric of the local mesh spacing where the mesh is clearly stretched. This removes growing grid-scale modes on thin tetrahedra and prisms (aspect ratios up to 25, orders 3–6), e.g. on boundary-layer prism meshes; regular hexahedral, tetrahedral, prismatic and pyramid tilings keep exactly their stencils.
- 2D cell centroids accurate to round-off (#127): the centroid formula lost accuracy far from the origin on fine meshes, which could split TENO's equidistant stencil candidates differently in different cells; a 1D problem on a 2D strip now stays one-dimensional to round-off. 2D results change at round-off level.
- The CUDA build is warning-clean under
-DMallard_WARNINGS_AS_ERRORS=ON(#125). - The non-reacting solver's speed is unchanged from 0.4.0 (A100: 2D TENO5 18.3 ms/step on 1M quads, MUSCL 3.88 ms/step, 3D TENO5 398 ms/step on 1M hexahedra).
Known limitations
- TENO orders 4 and 6 can grow modes next to walls on mildly stretched prisms and on strongly stretched tetrahedra (#126); prefer orders 3 or 5, or MUSCL, on such meshes until it is fixed.
- With very large mechanisms and only a few igniting cells, the A100 is still underused: n-hexane (1268 species) at dt = 1e-6 s runs at 0.66× the rate of 16 CPU cores.
- RHLL can amplify round-off transverse velocity where the velocity jump across a face is small (documented in
docs/numerics/overview.md). - The Mach 3 sphere develops a carbuncle on the axis where two symmetry planes meet with RHLL and TENO5 (#80).
Full list of changes: v0.4.0...v0.5.0