This guide details the governing equations, spatial discretization, time-marching schemes, and projection steps implemented in the solver.
The solver is a collocated finite-volume method on unstructured hexahedral control volumes, supporting two distinct runtime paths: * Constant-Density Baseline: constant-density incompressible / low-Mach projection solver (). * Active Variable-Density Path: variable-density low-Mach solver using Cantera/PelePhysics thermodynamics, conservative and transport, and a conservative low-Mach divergence source.
For a cell : * : Cell volume () * : Face of cell * : Face area () * : Normal perpendicular distance used for face gradients () * : Face normal, owner-to-neighbor orientation * : Face normal reoriented outward from cell * : Volumetric face flux, owner-to-neighbor orientation () * : Volumetric face flux reoriented outward from cell * : Mass face flux, owner-to-neighbor orientation () * : Mass face flux reoriented outward from cell
The stored volumetric face flux is:
The stored mass face flux is:
For an upwind transported scalar :
The solver manages two distinct pressure and density scales:
* Projection Pressure (): Hydrodynamic pressure driving velocity projections ().
* Thermodynamic Pressure (): Uniform background thermodynamic pressure (background_press) used for Cantera/PelePhysics state evaluations: , , etc.
* Flow Density (transport%rho): Active flow density. Constant in baseline mode () and coupled to thermodynamics in variable-density mode ().
* Thermodynamic Density (): Density returned from state equations: .
where is the viscous stress tensor: Kinematic viscosity is updated as when variable viscosity is active.
In variable-density mode:
Sensible enthalpy is defined relative to reference temperature (typically ) to prevent artificial heat release during non-reacting mixing:
The predictor computes a tentative cell velocity using an explicit Adams-Bashforth 2nd-order (AB2) time scheme: where the momentum residual is: The pressure gradient is calculated using the Gauss finite-volume reconstruction:
The corrected face fluxes satisfy the low-Mach divergence constraint: The face correction is: The elliptic system is formulated as:
The Poisson system is solved iteratively using a parallel PCG method implemented in src/numerics/mod_linear_solver.f90:
To reduce numerical diffusion while enforcing physical boundedness, the solver supports high-order convection schemes:
For a face with flow from cell to cell : The virtual upstream node is reconstructed dynamically on unstructured grids:
To prevent unphysical oscillations, QUICK is combined with a low-order upwind fallback using the Normalized Variable Diagram (NVD):
Decoupled from transport via a fractional-step operator-splitting approach, reactions are integrated using CVODE.
The global flow step is divided into a cell-local number of sub-slices :
where is max_chemistry_subcycles and is subcycling_dT_threshold ().
To preserve mass conservation without triggering numerical stiffness in trace intermediate radicals, mass fractions are normalized by modifying only the dominant majority bath species (typically ):
To avoid non-differentiable step transitions that break Newton-solver Jacobian evaluations, temperature clipping is smoothed using a cubic spline over window :
If a physical check fails, the timestep is rejected, the state is rolled back to time level , and retried with .
Rejections are triggered if:
* NaN/Inf states occur.
* Pressure Poisson CG iterations exceed pressure_max_iter.
* Local CFL exceeds stability limits.
* Density ratios fall below safety thresholds.
To prevent pressure shocks in low-Mach projection source terms due to massive local energy release, chemical source terms can be relaxed:
where is chemistry_source_relaxation.