CS Paper Radar

CompFlowLab: A Python code to develop and prototype new data-driven models for challenging compressible flow problems with shocks and chemical reactions

Ali Mohaghegh, Cheng Huang

cs.CE ·submitted 2026-09-26 02:11 UTC · v2
code/data

Abstract

CompFlowLab is an open-source Python environment that is capable of modeling different classes of compressible flow problems (including shocks, flames, and detonation waves) using a one-dimensional compressible Navier-Stokes solver with multi-species transport and chemical-reaction models. It is designed specifically for the data-driven modeling community as a lightweight, accessible prototyping platform to test, develop, and evaluate new modeling methods on numerically and physically challenging compressible flow problems, especially those featuring shocks and chemical reactions. Specifically, CompFlowLab aims at (1) providing computationally efficient calculations on advection-dominanted problems that are well-recognized to be difficult for conventional data-driven modeling techniques, such as shocks, flames, and detonation waves, and more importantly (2) enabling rapid testing and prototyping of new data-driven models. The code serves three primary purposes: (1) generating high-fidelity full order model data for training of data-driven modeling, (2) providing a modular platform for implementing and testing novel data-driven algorithms (e.g., machine learning methods and reduced-order modeling techniques) on challenging physics, and (3) offering a standalone Computational Fluid Dynamics (CFD) solver with validated test cases that can also support numerical method development in the broader CFD community. By unifying these capabilities in a clean, extensible Python codebase, CompFlowLab lowers barriers to innovation at the intersection of model reduction and complex fluid dynamics.

Closest papers

Nearest neighbours by meaning across the whole index.

CraftSPH: A composable framework for differentiable smoothed particle hydrodynamics implemented in PyTorch

cs.LG physics.flu-dynmath.NA ·2026-09-24 ·Gen Matono, Shujiro Fujioka, Mayuko Nishio
code/data similarity 0.59
Abstract · The code is publicly available at https://github.com/GenMNL/CraftSPH 43 pages, 14 figures

Smoothed particle hydrodynamics (SPH) is well suited to large-deformation fluid problems, and the growing use of automatic differentiation in engineering applications has motivated interest in differentiable SPH solvers. In this study, a composable differentiable SPH framework, CraftSPH, has been developed. In CraftSPH, major computational operations are implemented as independent modules that users can combine to construct solvers for different purposes. This design supports high-accuracy discretization and both explicit and implicit computation within a common framework, while allowing individual components to be maintained and extended. Selected numerical operations also support automatic differentiation (AD) for physical-parameter estimation and potential coupling with deep learning models. These capabilities were demonstrated through forward and inverse analyses. Forward analyses using an implicit SPH scheme with high-accuracy discretization showed good agreement with analytical and reference solutions for Poiseuille flow and a rising bubble, while capturing the key experimental trends in two- and three-dimensional dam-break problems. In inverse analyses, explicit and implicit SPH schemes were used to estimate kinematic viscosity in Taylor-Green vortex flow and Reynolds number in lid-driven cavity flow. The results also showed that the choice of operations included in the computational graph affects the computed gradients. Together, these findings demonstrate that CraftSPH enables users to assemble problem-specific solvers for forward and inverse analyses within a common framework.

0.47

Discontinuity-Aware Solvers for Vapor-Compression Cycles

cs.MS math.NA ·2026-11-15 ·Shreyas Ekanathan, Avinash Subramanian, Oscar Smith, Yingbo Ma, Christopher Rackauckas +1 more
code/data similarity 0.57
Abstract

Physics-based models of vapor-compression cycles are often formulated as large, stiff DAE systems with derivative discontinuities introduced at the points of phase change. We use an implementation of a discontinuity-aware ODE and DAE solver scheme that uses domain-specific, user-declared information to compute appropriate time steps for more efficient integration. This scheme is made open-source within Julia's DifferentialEquations package. We demonstrate how discontinuity information can be specified symbolically in a declarative modeling language such as Dyad and passed to the solver to address the numerical challenges posed. We apply this discontinuity-aware technique to two applications: first, a scalar ODE with two discontinuities, and then a model of a full vapor-compression cycle. The discontinuity-aware solver yields significantly fewer step rejections and improved solver times, particularly with the Rodas5P solver at loose tolerances, as compared to standard error control, suggesting that exposing physical discontinuity information from equation-oriented models to adaptive solvers can improve practical simulation performance without requiring reassembly of the model.

0.47

KPPax: preprocess differentiable kinetic ODE for machine learning in atmospheric chemistry

cs.AI ·2026-10-27 ·Wenqing Peng, Michael Boy, Zhi-Song Liu
benchmark similarity 0.57
Abstract

Atmospheric chemical mechanisms are commonly distributed in the language of the Kinetic PreProcessor (KPP), which generates efficient Fortran or C code but does not fit into the differentiable programming frameworks in which machine-learning models are developed. We present KPPax, a kinetic preprocessor that generates differentiable, just-in-time compiled, and vectorisable chemistry code in JAX from mechanisms written in the KPP language. KPPax evaluates the rate law with sparse operations in log space, which keeps it differentiable, and integrates the stiff system with the implicit solvers and the forward- and reverse-mode adjoints of the \texttt{diffrax} library, so that exact sensitivities are obtained without hand-derived adjoint code. We demonstrate two applications with the POLLU benchmark mechanism. In the first, the Fisher information matrix computed from an automatically differentiated Jacobian predicts, before any fit, which of the 25 rate coefficients a flow-tube-like design can identify, and noisy synthetic estimation confirms the predicted uncertainties of the nine identifiable rate coefficients to within about 30\% while revealing clusters of fast reactions of which only ratios are constrained. In the second, a neural-network correction of an emission inventory is trained offline on per-scenario 4D-Var retrievals and then fine-tuned online through the chemical model, which reduces the error of the biogenic correction by a factor of 2.4--5 and recovers information on low-temperature emissions that the individual retrievals lose. KPPax makes KPP mechanisms directly usable for parameter estimation and hybrid physics--machine-learning modelling.

0.29

Lattice Boltzmann Method for Compressible Navier-Stokes-Fourier Equations

cs.MS physics.flu-dyn ·2026-08-13 ·Fedor Bukreev, Adrian Kummerländer, Mathias J. Krause
similarity 0.55
Abstract

A lattice Boltzmann scheme for the three-dimensional compressible Navier--Stokes--Fourier equations, derived automatically from the declared system by a symbolic compiler, is validated against exact solutions and published reference data. The declared system carries the viscous stress and the heat flux as transported state, and is discretized on a D3Q7 lattice in single precision. Against the exact Sod and Becker solutions the captured shock thickness converges at first order. On the supersonic Taylor-Green vortex at $M_0 = 1.25$ the scheme at $512^3$ matches the reference dilatational dissipation more closely than seven compared solvers, by thirty percent over the next best. Every operator in this solver, the generated collision and constitutive closure and the added shock sensor alike, reads only the cell it acts on, and data reaches a neighbor only by streaming along the lattice characteristics.

0.39

A Gradient-Reconstruction Lattice Boltzmann Method for Compressible Navier--Stokes--Fourier Equations

cs.MS physics.comp-ph ·2026-09-14 ·Adrian Kummerländer, Fedor Bukreev, Mathias J. Krause
similarity 0.54
Abstract

Reaching compressible flow has usually forced lattice Boltzmann methods to abandon the compact stencil or the strict locality that make them efficient. We give up neither, solving the compressible Navier--Stokes--Fourier equations with a scheme that transports only the conserved mass, momentum and energy. The viscous stress and heat flux depend on gradients of the velocity and temperature. To capture them, existing compressible schemes go beyond a single lattice of the conserved fields. They enlarge the velocity set, carry the stress and heat flux as extra transported fields, place the energy on a separate grid, or give up exact streaming for an off-lattice advection. We instead recover the gradients from the non-equilibrium part of the distributions already present, inside the collision. No field beyond the conserved state is transported, no neighbour is read, streaming stays exact, and every computation runs in single precision. The method carries five fields where a transported-flux scheme carries fourteen, at a fraction of the memory and $4.9$ times the throughput. Verified against the exact Sod and Becker shock solutions and a supersonic Taylor--Green vortex, it tracks the direct-numerical-simulation reference on the kinetic energy and stays within the reference-solver spread on both dissipation rates.

0.16

Flow Mesh: A Velocity-Regularized Flow Matching Framework for Stable Distributional Modeling of Physical Fields on Unstructured Meshes

cs.LG physics.flu-dyn ·2026-10-23 ·Siddharth Verma, Jaewan Park, Jay Phil Yoo, Kazuma Kobayashi, Souvik Chakraborty +1 more
similarity 0.54
Abstract

Thermal-fluid field distributions underpin the analysis and operation of energy infrastructure, from nuclear-reactor cooling channels to industrial heat exchangers, but resolving these distributions through computational fluid dynamics requires prohibitively large simulation ensembles. Their complex geometries also demand unstructured meshes that are poorly accommodated by generative models developed for regular grids. Here we introduce FlowMesh, a generative framework that combines permutation-invariant mesh encoding with deterministic latent flow matching and an l1 penalty on the learned transport velocity. FlowMesh generates full-field realizations directly on fixed unstructured meshes without auxiliary grid interpolation or a stochastic denoising chain. Across lid-driven-cavity, pressurized-water-reactor subchannel and heat-exchanger datasets, evaluated over six matched training seeds, FlowMesh achieves macro-averaged probability-density-function coverage of 91.7%-97.0%, exceeding an architecture-controlled latent diffusion model by $11.6$--$45.4$ percentage points. Latent-velocity regularization increases coverage by $3.8$ percentage points for reactor flows and 1.1 points for heat-exchanger flows, while reducing temperature-field Kullback--Leibler divergence by 1.7-2.4-fold. Each full-field realization requires 1.23 \pm 0.15 s, providing a 585--1902-fold wall-clock acceleration over computational fluid dynamics. FlowMesh therefore makes large-scale generative characterization of thermal-fluid states computationally feasible, providing a foundation for data-driven analysis and digital-twin development in fixed-geometry energy systems.

0.22

Opal.jl: a comprehensive, composable framework for data assimilation in Julia

cs.MS ·2026-08-25 ·Nicholas Mueller
benchmark similarity 0.54
Abstract · 23 pages, 24 figures

Data assimilation (DA) and inverse modelling are indispensable tools for combining physics-based models with observations, yet the software that implements them is often fragmented: sequential (Kalman and particle) filters and variational (3D/4D-Var) estimators are typically developed as separate codebases, each tied to a specific class of forward model - for example, simple time-marching schemes for ordinary differential equations (ODEs), or full finite element (FE) discretisations of partial differential equations (PDEs). In this work, we present Opal.jl, a Julia package that overcomes this fragmentation by providing a unified environment for a wide range of DA methods and forward model backends, all accessible behind a single high-level interface. Starting from a handful of basic methods, complex inference tools can be built by composing them with advanced capabilities, such as covariance localisation/inflation, online noise covariance estimation, bias-aware correction, and kriging-based calibration of reduced-order surrogates. The package integrates natively with the SciML ecosystem for ODE-governed systems, and with Gridap/GridapROMs for both full-order and reduced-order discretisations of PDEs. Notably, the API is designed to allow a reduced-order surrogate to replace a full-order solver with no change to the code, even at the driver level. We demonstrate the library on a Lorenz-63 benchmark, on a Van der Pol oscillator problem with biased observations, on a turbulent Navier-Stokes flow past a square cavity, where the unknown Reynolds number is inferred from sparse velocity and pressure measurements, and finally on a heat equation using a reduced-order surrogate instead of a more standard full-order model.

0.24

Learned Warm Starts for Steady Transonic RANS Simulations of Wing and Aircraft Configurations

cs.CE physics.flu-dyn ·2026-10-31 ·Muhammad Irfan Zafar, Saleh Abuhanieh, Şahin Yiğit
similarity 0.53
Abstract

Neural surrogates can accelerate many-query aerodynamic analyses, but their standalone predictions may be insufficiently accurate or robust to support reliable design evaluations. We develop a learned warm-start formulation that predicts mean-flow and turbulence fields directly on native CFD meshes for subsequent correction by the RANS solver. A common architecture and objective structure are used across subcritical and transonic flows, including challenging conditions with shock-induced separation. A condition-modulated Transolver combines Fourier and wall features with target-gated regularization, a Sobolev-type loss, adaptive loss weighting and sampled training. Prediction requires no preliminary flow solution, and training requires no solver-residual evaluation. Extensive 3D CFD evaluations on SuperWing, the NASA Common Research Model (CRM) and DLR-F6 assess geometric and operating-condition generalization, including interpolation, extrapolation and cross-mesh deployment, using Spalart-Allmaras and $k$-$ω$ SST closures on million-cell meshes. Unseen nominal cases achieve geometric-mean iteration speed-ups of approximately $2$-$4\times$ under a common convergence criterion based on cold-run aerodynamic coefficients. On CRM, learned initialization provides greater aggregate acceleration than nearest-condition restarts using the same solution library. Resolution invariance enables direct deployment of coarse-mesh models on finer meshes without retraining, solution interpolation or target-condition coarse solves. Including data generation and training, estimated campaign speed-ups reach $2.1$-$2.3\times$. No warm run diverges; fewer than $2\%$ fail to satisfy the cold-reference convergence criterion. These results support learned initialization for repeated aerodynamic analyses, while highlighting initialization sensitivity near separation as a remaining limitation.

0.06