Mallard is an unstructured, GPU-accelerated, high-order finite volume CFD solver I’ve been building. It’s written in C++20 with Kokkos, so the same code runs on NVIDIA and AMD GPUs as well as multicore CPUs, and it scales across nodes with MPI. Results are bitwise identical on any number of GPUs or ranks.
It solves the compressible Euler and Navier–Stokes equations in 2D, 3D and axisymmetric form, on triangles, quadrilaterals, tetrahedra, prisms, pyramids and hexahedra, with up to sixth-order TENO-E reconstruction. It also handles reacting flows: multicomponent gases with finite-rate chemistry read from Cantera mechanisms, mixture-averaged transport, and GPU chemistry kernels fast enough for mechanisms with over a thousand species.
The image above is a detail of the 2D Riemann problem on 4096 × 4096 cells, where the slip lines roll up into cascades of Kelvin–Helmholtz vortices. The cases are checked against exact solutions, experiments or reference DNS, for example:
- Shock tubes, the double Mach reflection and the Sedov blast against exact and reference solutions.
- Flow past a cylinder and a sphere, and the Taylor–Green vortex against spectral DNS.
- Turbulent channel flow at Re_τ = 180 against Moser, Kim & Mansour.
- Laminar flame speeds, ignition delays and counterflow flames against Cantera, and cellular detonations at the Chapman–Jouguet speed.
The gallery has animations of all of these, and the source is on GitHub.
