Skip to content

Mallard 0.6.0

Choose a tag to compare

@MatthewBonanni MatthewBonanni released this 05 Oct 05:25
· 508 commits to main since this release

Mallard 0.6.0 adds axisymmetric flows, non-reflecting boundaries, in-situ statistics, parallel HDF5 output and AMD GPUs, and switches cfl to the conventional unstructured normalization.

Changes that affect results

  • Conventional CFL normalization (#175, #173): the CFL = 1 step is now dt = 2V / Σ_f λ_f A_f (Blazek's convention, with the viscous term 4 ν Σ_f A_f² / V), for single gases and mixtures; on a uniform 2D grid dt = cfl h / (|u| + |v| + 2a). The same cfl now gives twice the time step as in 0.5.0: halve cfl in inputs written for 0.5 or earlier to keep their results. The CFL output variable halves accordingly. Every cfl in examples/, benchmarks/, the tests, the tools' defaults and the docs was halved, so the examples' CFL values changed but their results did not (restart files of shortened 2D and 3D example runs are byte-identical). Measured stability limits are 1.26–1.55 for SSPRK3 and 1.39–1.71 for RK4, depending on reconstruction and cell type; the recommended maxima are 1.2 (SSPRK3) and 1.35 (RK4), with 1.0 as a default and about 0.35 for detonations (time step). The examples keep their halved values for now.
  • 3D analytical initial conditions change (#188, #186): each tetrahedron is now integrated with a 14-point degree-5 rule, and the 3D default n_subdivisions is 1. Initialization is much faster (1M hexahedra: 58.8 s → 1.6 s on 64 threads; the 128³ Taylor–Green box: 2m 46s → 4.2 s), but 3D initial states are not bitwise equal to 0.5.0: smooth fields differ at round-off (Taylor–Green ≤ 2.2e-14 relative), while discontinuous initial conditions differ in cells cut by the discontinuity, by up to 2.9% in explosion_3d and 9.2e-4 of the maximum RHOE in sedov_3d, with mass and energy errors comparable to before. 2D initial states are byte-identical. The 128³ Taylor–Green example needs about 27 KB of host memory per cell and fits on 4 GPUs.
  • Double-flux mixtures with HLL, Rusanov and HLLC (#187): wave speeds now use each side's own frozen (gamma, e0) (see below), which changes their results; single gases and conservative mixtures are unchanged.
  • The faster TENO-E setup (#181) changes results at round-off (≤ 6e-13 relative after 2 steps); Shu–Osher amplifies such differences (see Known limitations).

Physics and boundaries

  • Axisymmetric (r–z) flows (#184): [physics] axisymmetric = true in 2D builds, a revolved finite-volume formulation that conserves mass, axial momentum, energy and species discretely and is exactly well balanced at rest; TENO-E fits r-weighted moments and keeps design order up to the axis (manufactured solution: 3.1, 4.5, 5.4 for TENO3–5). Mixtures, chemistry and MPI work unchanged, and planar runs are bitwise unchanged. Validated on Hagen–Poiseuille flow (second order: 1.3e-3, 3.2e-4, 8.0e-5 of U on 16/32/64 cells), Noh (shock radius within 1%), Sedov (shock 0.6% ahead of exact), a sphere at Re 100 / 150 (Cd 1.100 / 0.900 vs 1.087 / 0.889 from Clift, Grace & Weber; separation 126.5° / 120.2° vs 126.5° / 120.4°) and a counterflow diffusion flame (peak T within 0.7% of Cantera).
  • Characteristic (NSCBC) boundaries and sponge layers (#176): nscbc_outlet and nscbc_inlet (Poinsot & Lele with transverse terms, single gases and mixtures, double flux) and [[sponges]]. A normal acoustic pulse reflects 0.1–0.2% with MUSCL (1% with TENO5), against 0.6–34% for extrapolation; partially reflecting outlets match the theoretical reflection coefficient within 3%. A vortex at M = 0.25 leaves with an RMS pressure error of 0.05 Δp_vortex (1.2–1.3 for Poinsot & Lele's original condition), and an H2/air flame blows out through the outlet (examples/flame_outflow) with the pressure within 0.7% of its target. Existing boundary conditions are bitwise unchanged.
  • Gas-mixture Roe and RHLL (#187): Roe (Glaister; Shuen, Liou & van Leer) and RHLL now accept gas mixtures, with exact upwinding at contacts between different gases. The 1D CJ detonation holds D_CJ within +0.11% / +0.01% at 10 / 20 cells per induction length with either, like HLLC. With double flux, each side's own frozen (gamma, e0) now sets the wave speeds of both fluxes of a face; before, HLL-type fluxes perturbed p by 0.1% at contacts. This also changes HLL, Rusanov and HLLC results with double flux (single gases and conservative mixtures are unchanged).
  • Fractional reaction orders below 1 (#177): the mass-action law is regularized below 1e-12 kmol/m³, so mechanisms such as Westbrook–Dryer propane (previously NaN Jacobians before ignition) now integrate; ignition delays match Cantera within 4.5e-5 at the V1 conditions.
  • Inflow compositions as expressions (#167): an upt inlet's X or Y can vary along the boundary (x, y, z expressions), e.g. for stratified fuel/air layers.
  • viscosity_model = "power_law" (#170).

Output and post-processing

  • In-situ statistics and probes (#169): [statistics] keeps time-weighted means and covariances of the flow and mass fractions on the device, and [[probes]] writes point and line probes as CSV. Restarts continue both bitwise on any rank count, and solutions are bitwise identical with statistics on or off; 9 statistics sampled every step cost 2.8% on an A100 (1024² cells). tools/plane_average.py averages over homogeneous directions.
  • Parallel HDF5 output with XDMF (#179): [[write_data]] format = "hdf5" writes the mesh once and two files per snapshot that ParaView opens, byte-identical across rank counts. On 2.1M hexahedra it writes half the bytes of VTU (689 vs 1288 MB) and is 3.2× faster on one rank; on a single local disk VTU pieces are faster beyond about 4 ranks, while HDF5 is what scales on a parallel file system.
  • Q (Q-criterion) and VORTICITY output variables (#139).
  • tools/animate_cartesian.py animates Cartesian runs with millions of cells (#178), such as the 4096² Riemann run.
  • New [integrals] columns (velocity_squared, vorticity_squared, density_squared, temperature, temperature_squared), and monitor files created by a run started from a restart file now get their header (#170).

Performance and platforms

  • AMD GPUs (#180): Mallard builds, passes its 2D, 3D and MPI suites and is tuned on AMD Instinct MI355X (Kokkos HIP, -Werror clean). One MI355X against one A100: 2D TENO5 on 1M quads 3.4× faster (5.36 vs 18.4 ms/step), MUSCL 2.5×, 3D TENO5 on 1M hexahedra 2.0×, the reactive shock tube 2.6×, chemistry 1.3–1.9×. Build notes are in the README.
  • TENO-E setup 5.6× faster (#181, #140): 372 → 66 s on 1M hexahedra (8 threads), bitwise identical stencils except round-off (≤ 6e-13 relative in restart files after 2 steps); setup of the 64³ 3D examples drops from about 115 s to 18–21 s. cache_single_precision = true (#151) halves the cache (19 instead of 36 KB per cell for order-5 hexahedra); it is off by default.
  • GPU performance set (#168): benchmarks/perf/ with A100 (and MI355X) baselines and tools/perf_suite.py to run and compare them (fails when slower than baseline by more than 5% and the run-to-run spread).
  • The float build compiles and passes again (#185, #190).

Examples

  • Decaying isotropic turbulence (examples/isotropic_turbulence, #170): the Johnsen et al. (2010) DNS at Mt = 0.6, Re_λ = 100 on 64³–256³. At 256³, filtered to 64³, kinetic energy is within 2.1% (mean) and enstrophy within 2.4% of Johnsen et al., and within 2.3% and 0.3% of Subramaniam et al. (2019); 128³ and 256³ agree within 0.3% in kinetic energy.
  • Triple flame (examples/triple_flame, #182): H2:N2 against air with inlet mixing layers of 4 and 12 thermal thicknesses (Ruetsch, Vervisch & Liñán 1995); U_F / S_L = 2.31 and 2.46 rises with the layer thickness as there, but higher, because the hydrogen tip burns at 1.24–1.30 S_L. The comparison with the one-step reference is qualitative.
  • Flame–vortex interaction (examples/flame_vortex, #182): 11 vortex pairs on a rich H2/air flame mapped onto Poinsot, Veynante & Candel's (1991) diagram (no effect, wrinkled, pocket); none quenches, consistent with no radiative losses being modeled. 1D flame speeds are within −1.5% to +0.2% of Cantera.
  • Turbulent channel flow at Re_τ = 180 (examples/channel_retau180, #172): DNS at bulk Mach 0.2 against Moser, Kim & Mansour (1999): Re_τ = 172.6 vs 178.1 (Cf 7% low), u_rms⁺ peak 2.88 vs 2.66, v_rms⁺, w_rms⁺ and −u′v′⁺ peaks within 1–4%. It adds [source] mass_flow (constant mass flow by a uniform body force, single gases and mixtures) and [mesh] stretching (tanh clustering of generated meshes).
  • Counterflow diffusion flame (examples/counterflow_diffusion, #171): H2/N2 against air from 3D opposed jets, against Cantera at matched strain rate: peak temperature within 2% up to 90% of Cantera's extinction strain (+0.49% at 2 m/s), and extinction 0–9% above Cantera's strain.
  • Axisymmetric poiseuille_pipe, noh_axisymmetric, sedov_axisymmetric and sphere_axisymmetric, and flame_outflow (above).

Known limitations

  • Runs with NSCBC boundaries do not restart bitwise: the per-face boundary state is re-initialized from the solution (#189). Every other run restarts bitwise.
  • With the default low-Mach correction, extrapolation outlets reflect 15% (MUSCL) to 34% (TENO5) of a normal acoustic pulse; use nscbc_outlet where reflections matter.
  • With gas mixtures, RHLL + TENO5 can leave mass fractions slightly negative (N2 = −2e-10 in three cells of a shock tube), because species bounds are enforced at face points only.
  • 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.
  • The Mach 3 sphere develops a carbuncle on the axis where two symmetry planes meet with RHLL and TENO5 (#80).
  • Shu–Osher amplifies round-off through TENO's discrete stencil selection (a 1e-15 perturbation grows to 4e-5 in density by the end), so its results differ from 0.5.0 at that level after the TENO setup changes.

Full list of changes: v0.5.0...v0.6.0