Skip to content
MatthewBonanniPublic

Repository files navigation

C++ License: Apache 2.0 DOI

logo_dark logo_light

Mallard is a high-order unstructured finite volume solver for compressible Euler, Navier-Stokes, and reacting flows, written in C++ with Kokkos to run on CPUs and NVIDIA and AMD GPUs.

Mallard simulations

A 2D Riemann problem on 16.8M quadrilaterals; a cellular detonation in 2H2-O2-7Ar on 19.2M hexahedra; the Taylor-Green vortex at Re = 1600 on 256³ hexahedra; autoignition of stratified lean H2/air at 41 atm (examples).

What's new in 0.11.0

Features

Meshes

  • Triangles and quadrilaterals; tetrahedra, hexahedra, prisms, pyramids, and mixed
  • Gmsh, CGNS, Fluent, OpenFOAM, and HDF5; generated boxes and annuli
  • Periodicity (translational, rotational), axisymmetry, and curved high-order boundaries

Numerics

  • TENO-E reconstruction, orders 3–6, on every cell type (what is original)
  • High order by default: equal accuracy at a fraction of second-order cost (measured)
  • Rusanov, HLL, HLLC, Roe, and RHLL Riemann solvers; explicit Runge-Kutta with fixed or error-controlled steps

Physics

  • Compressible Euler and Navier-Stokes; thermally perfect mixtures from Cantera mechanisms
  • Finite-rate chemistry: stiff Rosenbrock or BDF integration in every cell, with Strang or SIMPLER splitting
  • Tabulated chemistry: flamelet/progress-variable (FPV) tables, with LES and thickened flames
  • Detailed transport, Soret diffusion, and optically thin radiation
  • Sources and sponges as expressions over regions: moving, periodic, solution-defined, or from STL and OBJ solids

Large-eddy simulation

  • Sigma, WALE, Vreman, and Smagorinsky models; kinetic-energy-preserving hybrid flux
  • Thickened flames, synthetic turbulent inflow, and wall models (Griffin-Fu-Moin, equilibrium ODE)

Particles

  • Tracers on the high-order velocity; solid particles with compressible and rarefied drag, lift, and heat transfer
  • Evaporating droplets (d²-law, Abramzon-Sirignano) of named CoolProp liquids
  • Two-way coupling conserving momentum and energy to round-off; wall bounces and deposition
  • Injectors at points, boundaries, and regions; bitwise identical on any rank count

Boundary conditions

  • Walls, inlets, outlets, far field, and symmetry, combined with NSCBC, averaging, turbulence, or wall models
  • Any value a number, an expression of x, y, z, and t, or a profile from a data file

Performance

  • CPUs (OpenMP, threads) and NVIDIA and AMD GPUs; single or double precision
  • MPI with GPU-aware or NCCL halo exchange overlapped with computation; the whole step as one CUDA graph
  • Automatic structured fast path on unstructured meshes; walls and irregular cells stay unstructured
  • Bitwise identical on any rank count and across restarts

Input and output

  • TOML input with units (p = "1 atm"); errors name the key, the line, and the fix
  • Command-line tools: check, ctl, diff, info, input resolve, new, pack, and post (statistics, convergence, derived fields, flames)
  • Triggers on probes, forces, and reductions over regions (max(T, "domain") > 2500)
  • A self-contained run report per run and a divergence report on failure
  • VTKHDF output for ParaView; probes, statistics, spectra, PDFs, and derived fields

Verification and validation

Installing

Best for Limits
Container: ghcr.io/matthewbonanni/mallard (CPU) or :cuda (NVIDIA) Trying Mallard; Docker or Apptainer users; Kubernetes, multi-node included The image's own MPI
Portable Linux binaries (MPICH or Open MPI) Linux CPU runs with no compiling: unpack and run CPU only; built for a generic CPU target
Spack: spack repo add this repository, then spack install mallard Clusters, workstations, and GPUs: a native build with your compilers, MPI, and GPUs Slow for changing Mallard: each edit rebuilds through Spack
From source with CMake Development: unreleased changes, tests, and modifying Mallard
git clone --recursive https://github.com/MatthewBonanni/mallard.git && cd mallard
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_KOKKOS=OFF -DKokkos_ENABLE_THREADS=ON
cmake --build build -j

Running

mallard new cylinder && cd cylinder
mallard check input.toml
mallard -i input.toml --kokkos-num-threads=8

Contributing

Citing

License


Mach 8 flow over a mallard
Mach 8 flow over a mallard: 1.05M triangles, TENO5 + RHLL (examples/mallard).

Releases

Packages

Contributors

Languages