The Computational Fluid Dynamics (CFD) code, ‘BlackJack,’ was created with a singular purpose: to generate extremely accurate numerical solutions of the Navier-Stokes equations in support of a broader program to develop new analytical solutions to those same equations. Unlike general-purpose CFD tools designed for industrial applications or engineering approximations, BlackJack CFD is a research code, engineered from the ground up to deliver benchmark-level fidelity for theoretical validation. Its development was motivated by the realization that no existing solver provided the order of accuracy, control over discretization, or modular extensibility required to confirm and refine exact or semi-exact solutions to the full compressible Navier-Stokes equations. Every algorithmic choice in BlackJack from the finite difference stencils to the boundary condition handling, damping strategies, and grid metrics was selected to eliminate numerical artifacts and ensure transparent, reproducible correspondence with analytical theory. It allows one to see what the analytical solutions will be, unlike production CFD codes that yield only relative insights into solutions.
I created the code BlackJack as an extension of my earlier DARPA supported program focused on developing new analytical solutions to the Navier-Stokes equations in high-speed flows. As I began deriving exact and semi-empirical solutions, it became clear that the engineering and applied communities no longer accept mathematical correctness based solely on symbolic insertion into the governing equations. Instead, they now demand that analytical solutions be compared directly to numerical simulations or experimental data, as if analytical solutions require the same form of validation as CFD. This mindset is fundamentally backwards, but it is the reality faced today.
Just as CFD is validated against wind tunnel measurements, engineers now insist that analytical solutions be benchmarked against numerical simulations, regardless of the fact that the solution may already satisfy the governing equations exactly. To confront this, I needed a numerical tool that was capable of producing reference-quality data free of dissipation, dispersion, and algorithmic ambiguity so that it could serve as a baseline for validating these theoretical results. Existing CFD codes, including commercial and open-source tools, were simply not built for this purpose.
This became the motivation for the new code. The goal was to construct a solver from the ground up that prioritizes fidelity over generality, with numerical methods capable of matching analytical solutions point for point in both steady and unsteady flow regimes. I began development nearly two years ago, writing the entire codebase by myself in Fortran. The architecture reflects the demands of research rather than industry: everything is explicitly structured, highest-order accurate, and open to modification.
BlackJack is a high-order structured CFD solver built on a multi-block, sub-block framework. It supports fully three-dimensional simulations on structured grids with arbitrary block decomposition, allowing exact enforcement of interface conditions and strict memory locality across parallel threads. Discretization schemes are user-specified and include a wide range of central and biased finite difference operators, including dispersion-optimized methods suitable for acoustics, shocks, and nonlinear wave propagation. Damping and filtering routines, including high-order sponge layers and localized artificial diffusivity, are tightly integrated into the residual formulation to stabilize underresolved gradients while preserving accuracy in smooth regions. Boundary conditions allow for subsonic and supersonic inflow and outflow, slip and no-slip walls, moving boundaries, periodic conditions, and radiation conditions. Each of these can be independently specified in each spatial direction, offering full control over problem setup and experimental design.
The solver operates on conservative variables, advancing them in time using a suite of advanced integrators, including low-storage and error-controlled methods up to 21st (and higher) order in accuracy. Grid metrics are computed analytically using the full inverse Jacobian formulation, enabling consistent representation of curvilinear geometry and ensuring the fidelity of derivative operations. All numerical routines-including finite difference, damping, boundary enforcement, and thermodynamic evaluation are modularized and can be extended with minimal disruption to the core solver. This modularity is essential, as BlackJack is designed not only to run known problems but to serve as a platform for exploring new equations, new models, and new forms of physical boundary data. The code can easily add additional equations, such as those for electromagnetics with minimal changes.
The code continues to evolve. Current development focuses on enhanced GPU parallelism, support for structured GMSH grid input, and expansion of the analytical validation suite with canonical solutions ranging from nonlinear acoustics to transitional flows and shock interactions. The code is already capable of resolving shock formation in N-wave propagation, reproducing linear and nonlinear acoustic fields, and achieving global accuracies on the order of 21st order or higher with only a handful of points per wavelength.
The name of the code originated as a joke I made with coworkers while I was a professor at the University of Florida. My original goal was to develop a high-order CFD code with spatial accuracy up to 21 points. Since 21 is the critical number in the card game blackjack, I began informally referring to the code as “BlackJack.” I also considered naming it “Gambit,” as a nod to the X-Men series, but BlackJack (or informally Gambit) ultimately stuck. Achieving practical CFD with shock capturing at 21st-order accuracy is not trivial, and the code continues to be pushed toward arbitrary order in both space and time for more complicated problems.