K. M. Mukut
Blog · · 8 min read

LowMachReact-Hex: a multiphysics solver for reacting flows

What my reacting-flow CFD solver can do: low-Mach, incompressible and compressible flow modes, detailed chemistry, Soret diffusion, thermal radiation, LES and RANS turbulence, on hexahedral and body-fitted meshes, with safeguards that keep stiff flames from crashing a run. With results from its test cases.

A flame is several hard problems at once. Gas flows and mixes; dozens of species react on timescales far shorter than the flow’s; the gas expands as it heats; hot gas and soot radiate energy away; and near walls and in jets, turbulence takes over. A useful combustion code has to handle all of these together, without the stiffest one bringing the whole calculation down.

LowMachReact-Hex is the finite-volume CFD solver I am developing for exactly that kind of problem. It is written in modern Fortran, with C++ bridges to established chemistry libraries, and runs in parallel on clusters. This post describes what it can do. The full solver is still part of ongoing work and is not yet released; an earlier public snapshot of its infrastructure, with documentation, is linked at the end.

Why “low Mach”

In most flames the gas moves far slower than sound. A fully compressible solver would still have to follow every sound wave, which forces tiny time steps for no physical benefit. A low-Mach formulation filters the sound waves out but keeps what matters: the large changes in density as gas heats and reacts. The time step is then set by how fast the gas actually moves, which makes long simulations of low-speed reacting flows affordable.

What it models

A list of capabilities by area. Flow: low-Mach, incompressible and compressible modes. Chemistry: Cantera or PelePhysics. Species: many species with Soret diffusion. Radiation: P1 and discrete ordinates. Turbulence: LES, RANS and wall models. Meshes: hexahedral and body-fitted grids. Robustness: adaptive steps, rollback and restarts
LowMachReact-Hex at a glance. Diagram drawn for this post.
  • Three flow modes. The default is a low-Mach projection method for variable-density flow. An incompressible mode handles constant-density flows. A pressure-based compressible mode keeps the coupling between pressure and density, for stiff transients such as ignition, where density changes faster than the low-Mach method can comfortably follow.
  • Detailed chemistry. Thermodynamics, transport properties and reaction rates come from Cantera, the open-source chemistry library. For stiff mechanisms, a second backend uses PelePhysics with the CVODE integrator. Cold, inert regions are skipped automatically, chemistry can be subcycled where it changes fast, and limits on how much any cell may change in one step keep ignition from destabilizing the run.
  • Species and energy. Many species, with temperature- and composition-dependent properties, and a sensible-enthalpy energy equation. Soret (thermal) diffusion is included, the effect that drives light species such as hydrogen toward hot regions and heavy ones away from them.
  • Thermal radiation. Absorbing and emitting gas, solved with either the P1 approximation or the discrete ordinates method (from S2 to S8), with gray, weighted-sum-of-gray-gases or tabulated spectral properties, and coupled into the energy equation.
  • Turbulence. Large-eddy simulation with the Smagorinsky and WALE models, RANS closures (Spalart–Allmaras, k–ε, realizable k–ε and SST), and wall functions for velocity and heat transfer, so that walls do not have to be resolved down to the viscous sublayer. Forces on walls are recorded as lift and drag at every step.
  • Meshes and numerics. Unstructured hexahedral meshes, including curved, body-fitted multi-block grids such as an O-grid around a cylinder, with corrections for skewed cells. Bounded higher-order convection schemes keep scalars physical without smearing them out. The pressure equation is solved with a built-in conjugate-gradient solver or with HYPRE’s algebraic multigrid for large cases.
  • Output. Results go to ParaView-ready files, and runs write restart files that can be resumed later, even on a different number of processors.
A methane jet entering a channel from the left; the methane mass-fraction field forms a mushroom-shaped head that spreads downstream
Methane jet mixing: CH₄ mass fraction. From the public snapshot.

Built not to crash

Reacting-flow simulations fail in creative ways: a negative mass fraction, a temperature spike at ignition, a pressure solve that stops converging. LowMachReact-Hex checks every step for these. It looks for invalid numbers, temperature and density limits, runaway kinetic energy and a struggling pressure solve. If a step fails a check, the solver restores the previous state, cuts the time step and tries again, instead of carrying on with a broken solution. The time step also adapts on its own to the flow speed and the chemistry.

The physics is organized into seven operating modes. They run from constant-density flow, through passive mixing, heat transfer and variable density, to fully reacting flow, then reacting flow with radiation, and finally the compressible mode. A new case can be built up one stage at a time, checking each layer of physics before adding the next.

What it can do, in pictures

Each capability is exercised on test cases whose behavior is well known. A few of them follow.

Flow around curved bodies

The flow field around a tilted airfoil, colored by mean velocity magnitude: fast flow in dark red over the front of the upper surface, slow flow in blue along the rear of the upper surface and in the wake behind the trailing edge
Mean velocity magnitude around an airfoil; distances are in chord lengths. From the solver's test cases.

Over an airfoil, the flow speeds up across the curved upper surface and slows into a wake behind the trailing edge.

The classic test for curved bodies is flow past a circular cylinder. Here it runs on a curved grid wrapped around the cylinder, an O-grid, whose cells are strongly skewed; extra correction passes in the pressure solve keep the flow consistent on such cells. At a Reynolds number of 100, the flow settles into a steady, symmetric pair of eddies behind the cylinder.

Two panels around a gray cylinder at a Reynolds number of 100. Top: velocity magnitude, with a long, slow, symmetric wake behind the cylinder. Bottom: lateral velocity, with mirror-image regions of opposite sign above and below the cylinder and in the wake
Re = 100: a steady, symmetric wake. Top, velocity magnitude; bottom, lateral (sideways) velocity. From the solver's test cases.

At a Reynolds number of 1000, with the WALE large-eddy model switched on and a brief sideways nudge to break the symmetry, the wake starts to swing. Vortices peel off one side of the cylinder and then the other, and travel downstream as a von Kármán vortex street.

Two panels around a gray cylinder at a Reynolds number of 1000, 6.9 seconds into the run. Top: velocity magnitude, with a wavy, asymmetric wake. Bottom: lateral velocity, with large alternating red and blue patches downstream, the signature of a vortex street
Re = 1000: the wake breaks symmetry and sheds a vortex street. Top, velocity magnitude; bottom, lateral velocity, with alternating patches of opposite sign. From the solver's test cases.

Turbulence

In a large-eddy simulation, the large eddies are computed and only the smallest are modeled. One check is the energy spectrum: in the wake of a square obstacle in 3D, at a Reynolds number of 2000, the computed spectrum falls off at the slope that Kolmogorov’s theory predicts for turbulence. The Smagorinsky model and the wall-function runs give the same picture as WALE.

A log-log plot of energy against wavenumber. The solid resolved spectrum falls from upper left to lower right and runs alongside a dashed line of slope minus five-thirds, following it closely at the higher wavenumbers
Energy spectrum in the wake of a square obstacle (Re = 2000), WALE model. The dashed line is Kolmogorov's −5/3 power law; the computed spectrum follows it at the smaller scales. From the solver's test cases.

Near walls

Wall functions let a mesh stop short of the thin layer right at a wall, which would otherwise need very small cells. The solver has three of them: the log law, Spalding’s law and the Werner–Wengle power law. On the same case, all three give closely matching distributions of the dimensionless wall distance y+y^+ and of the friction velocity at the wall.

Two histograms with three overlapping colors for the three wall laws. Left: near-wall y-plus, with most cells near 35 and a few between 2 and 18. Right: friction velocity, with most cells near 0.07 meters per second. The three laws nearly coincide
Dimensionless wall distance y+ (left) and friction velocity (right) over the wall cells of one case, from the three wall laws. From the solver's test cases.

Thermal diffusion

With Soret diffusion switched on, the solver takes each species’ thermal-diffusion coefficient from Cantera. For hydrogen the coefficient is negative, which drives hydrogen toward the hottest gas, and it is largest in size in the hottest parts of the flame.

A scatter plot of hydrogen’s Soret coefficient against temperature from 400 to 2,350 kelvin. All values are zero or negative; the most negative values appear above about 1,900 kelvin
Hydrogen's Soret (thermal-diffusion) coefficient against temperature in a flame simulation. From the solver's test cases.

Radiation

For radiation, the classic test is a uniformly hot slab of gas, which has an exact solution.

The radiative source term across a 1 m slab: discrete-ordinates S8 points lie on the exact solution, S4 and S2 fall progressively below it, and the numerical P1 points follow the analytical P1 curve
Radiation in a hot gas slab: the discrete ordinates method converges to the exact solution as the angular resolution increases, and the P1 model reproduces its own analytical solution.

The discrete ordinates results approach the exact curve as more directions are used (S2 to S8), and the P1 results match the analytical P1 solution. That shows both models are implemented as intended.

What it is not (yet)

  • Not a shock-capturing code. The compressible mode is pressure-based, for low-speed flows with strong density changes, not for shocks or supersonic flow.
  • One flow region. Conjugate heat transfer between a solid and a fluid, with separate regions, is planned but not there yet.
  • CPU only. GPU execution is future work.
  • Simplified RANS. The RANS models are implemented in robust simplified forms and need validation for each class of flow.

Find out more

The full solver is not public yet. An earlier public snapshot of the solver infrastructure and its documentation is available, with the code on GitHub. It reflects part of the development direction, not the full capabilities described here. If you work on similar problems and would like to talk, my details are on the Contact page.

Update, December 2026

Since this post was written, LowMachReact-Hex has gained a third radiation solver: Photon Monte Carlo (PMC). P1 and discrete ordinates approximate how radiation spreads over directions; PMC instead follows large numbers of photon bundles as they are emitted, travel through the gas and are absorbed. It makes fewer approximations, at a higher computational cost.