NAMar 16Code
Generalized Tadmor Conditions and Structure-Preserving Numerical Fluxes for the Compressible Flow of Real GasesRobin Klein, Benjamin Sanderse, Pedro Costa et al.
We generalize Tadmor's algebraic numerical flux condition for entropy-conservative discretizations of conservation laws to a broader class of secondary structures, i.e. possibly non-convex secondary quantities whose evolution can consist of both conservative and non-conservative contributions. The resulting generalized Tadmor condition yields a discrete local balance law for secondary structures alongside the discrete conservation law that is solved. In contrast to the convex entropy setting, non-convex secondary quantities can have singular Hessians and non-injective gradients; this introduces an additional necessary structural requirement, which we term (discrete) null-consistency. Null-consistency constrains admissible numerical work terms and is required for the existence and well-posedness of fluxes satisfying the generalized Tadmor condition. To construct such fluxes in practice, we show how discrete gradient operators provide systematic construction methods even when some of the functions entering the secondary structure are arbitrary, as in compressible flow closed by an arbitrary equation of state. As an application, we derive an entropy-conserving and kinetic-energy-consistent numerical flux for the Euler equations with an arbitrary (non-ideal) equation of state. We demonstrate the performance of the resulting scheme on a set of supercritical/transcritical compressible-flow test cases using several non-ideal equations of state, including a fully turbulent transcritical flow with a state-of-the-art equation of state and models for viscosity and heat conductivity. Computations are performed with our new open-source, flexible, JAX-based, multi-GPU compressible flow solver for Helmholtz-based equations of state available at github.com/rbklein/HelmEOS2.
LGOct 26, 2022
Comparison of neural closure models for discretised PDEsHugo Melchers, Daan Crommelin, Barry Koren et al.
Neural closure models have recently been proposed as a method for efficiently approximating small scales in multiscale systems with neural networks. The choice of loss function and associated training procedure has a large effect on the accuracy and stability of the resulting neural closure model. In this work, we systematically compare three distinct procedures: "derivative fitting", "trajectory fitting" with discretise-then-optimise, and "trajectory fitting" with optimise-then-discretise. Derivative fitting is conceptually the simplest and computationally the most efficient approach and is found to perform reasonably well on one of the test problems (Kuramoto-Sivashinsky) but poorly on the other (Burgers). Trajectory fitting is computationally more expensive but is more robust and is therefore the preferred approach. Of the two trajectory fitting procedures, the discretise-then-optimise approach produces more accurate models than the optimise-then-discretise approach. While the optimise-then-discretise approach can still produce accurate models, care must be taken in choosing the length of the trajectories used for training, in order to train the models on long-term behaviour while still producing reasonably accurate gradients during training. Two existing theorems are interpreted in a novel way that gives insight into the long-term accuracy of a neural closure model based on how accurate it is in the short term.
NAFeb 18, 2019
Constraint-consistent Runge-Kutta methods for one-dimensional incompressible multiphase flowBenjamin Sanderse, Arthur E. P. Veldman
New time integration methods are proposed for simulating incompressible multiphase flow in pipelines described by the one-dimensional two-fluid model. The methodology is based on 'half-explicit' Runge-Kutta methods, being explicit for the mass and momentum equations and implicit for the volume constraint. These half-explicit methods are constraint-consistent, i.e., they satisfy the hidden constraints of the two-fluid model, namely the volumetric flow (incompressibility) constraint and the Poisson equation for the pressure. A novel analysis shows that these hidden constraints are present in the continuous, semi-discrete, and fully discrete equations. Next to constraint-consistency, the new methods are conservative: the original mass and momentum equations are solved, and the proper shock conditions are satisfied; efficient: the implicit constraint is rewritten into a pressure Poisson equation, and the time step for the explicit part is restricted by a CFL condition based on the convective wave speeds; and accurate: achieving high order temporal accuracy for all solution components (masses, velocities, and pressure). High-order accuracy is obtained by constructing a new third order Runge-Kutta method that satisfies the additional order conditions arising from the presence of the constraint in combination with time-dependent boundary conditions. Two test cases (Kelvin-Helmholtz instabilities in a pipeline and liquid sloshing in a cylindrical tank) show that for time-independent boundary conditions the half-explicit formulation with a classic fourth-order Runge-Kutta method accurately integrates the two-fluid model equations in time while preserving all constraints. A third test case (ramp-up of gas production in a multiphase pipeline) shows that our new third order method is preferred for cases featuring time-dependent boundary conditions.
NAMar 19, 2018
An adaptive minimum spanning tree multi-element method for uncertainty quantification of smooth and discontinuous responsesYous van Halder, Benjamin Sanderse, Barry Koren
A novel approach for non-intrusive uncertainty propagation is proposed. Our approach overcomes the limitation of many traditional methods, such as generalised polynomial chaos methods, which may lack sufficient accuracy when the quantity of interest depends discontinuously on the input parameters. As a remedy we propose an adaptive sampling algorithm based on minimum spanning trees combined with a domain decomposition method based on support vector machines. The minimum spanning tree determines new sample locations based on both the probability density of the input parameters and the gradient in the quantity of interest. The support vector machine efficiently decomposes the random space in multiple elements, avoiding the appearance of Gibbs phenomena near discontinuities. On each element, local approximations are constructed by means of least orthogonal interpolation, in order to produce stable interpolation on the unstructured sample set. The resulting minimum spanning tree multi-element method does not require initial knowledge of the behaviour of the quantity of interest and automatically detects whether discontinuities are present. We present several numerical examples that demonstrate accuracy, efficiency and generality of the method.
NAApr 20Code
A differentiable software suite for accelerated simulation of turbulent flowsSyver Døving Agdestein, Benjamin Sanderse
We present IncompressibleNavierStokes.jl, an open-source Julia package for solving the incompressible Navier--Stokes equations on staggered Cartesian grids. The package features matrix-free, hardware-agnostic kernels that are compiled from a single source for multi-threaded CPU or GPU execution, and hand-written adjoint kernels for all discrete operators, enabling efficient reverse-mode automatic differentiation through the entire solver. This differentiability allows neural network closure models to be trained a-posteriori while embedded in a large-eddy simulation. Memory optimizations permit double-precision direct numerical simulations at resolutions up to $840^3$ on a single GPU. The software design, numerical methods, hardware performance, and integration of neural network closure models are described, and results for turbulent channel flow are validated against reference data.
NAApr 21
Stable self-adaptive timestepping for Reduced Order Models for incompressible flowsJosep Plana-Riu, Henrik Rosenberger, Benjamin Sanderse et al.
This work introduces RedEigCD, the first self-adaptive timestepping technique specifically tailored for reduced-order models (ROMs) of the incompressible Navier-Stokes equations. Building upon linear stability concepts, the method adapts the timestep by directly bounding the stability function of the employed time integration scheme using exact spectral information of matrices related to the reduced operators. Unlike traditional error-based adaptive methods, RedEigCD relies on the eigenbounds of the convective and diffusive ROM operators, whose computation is feasible at reduced scale and fully preserves the online efficiency of the ROM. A central theoretical contribution of this work is the proof, based on the combined theorems of Bendixson and Rao, that, under linearized assumptions, the maximum stable timestep for projection-based ROMs is shown to be larger than or equal to that of their corresponding full-order models (FOMs). Numerical experiments for both periodic and non-homogeneous boundary conditions demonstrate that RedEigCD yields stable timestep increases up to a factor 40 compared to the FOM, without compromising accuracy. The methodology thus establishes a new link between linear stability theory and reduced-order modeling, offering a systematic path towards efficient, self-regulating ROM integration in incompressible flow simulations.
FLU-DYNApr 10, 2025
Harnessing Equivariance: Modeling Turbulence with Graph Neural NetworksMarius Kurz, Andrea Beck, Benjamin Sanderse
This work proposes a novel methodology for turbulence modeling in Large Eddy Simulation (LES) based on Graph Neural Networks (GNNs), which embeds the discrete rotational, reflectional and translational symmetries of the Navier-Stokes equations into the model architecture. In addition, suitable invariant input and output spaces are derived that allow the GNN models to be embedded seamlessly into the LES framework to obtain a symmetry-preserving simulation setup. The suitability of the proposed approach is investigated for two canonical test cases: Homogeneous Isotropic Turbulence (HIT) and turbulent channel flow. For both cases, GNN models are trained successfully in actual simulations using Reinforcement Learning (RL) to ensure that the models are consistent with the underlying LES formulation and discretization. It is demonstrated for the HIT case that the resulting GNN-based LES scheme recovers rotational and reflectional equivariance up to machine precision in actual simulations. At the same time, the stability and accuracy remain on par with non-symmetry-preserving machine learning models that fail to obey these properties. The same modeling strategy translates well to turbulent channel flow, where the GNN model successfully learns the more complex flow physics and is able to recover the turbulent statistics and Reynolds stresses. It is shown that the GNN model learns a zonal modeling strategy with distinct behaviors in the near-wall and outer regions. The proposed approach thus demonstrates the potential of GNNs for turbulence modeling, especially in the context of LES and RL.
CEApr 8, 2025
Physics-aware generative models for turbulent fluid flows through energy-consistent stochastic interpolantsNikolaj T. Mücke, Benjamin Sanderse
Generative models have demonstrated remarkable success in domains such as text, image, and video synthesis. In this work, we explore the application of generative models to fluid dynamics, specifically for turbulence simulation, where classical numerical solvers are computationally expensive. We propose a novel stochastic generative model based on stochastic interpolants, which enables probabilistic forecasting while incorporating physical constraints such as energy stability and divergence-freeness. Unlike conventional stochastic generative models, which are often agnostic to underlying physical laws, our approach embeds energy consistency by making the parameters of the stochastic interpolant learnable coefficients. We evaluate our method on a benchmark turbulence problem - Kolmogorov flow - demonstrating superior accuracy and stability over state-of-the-art alternatives such as autoregressive conditional diffusion models (ACDMs) and PDE-Refiner. Furthermore, we achieve stable results for significantly longer roll-outs than standard stochastic interpolants. Our results highlight the potential of physics-aware generative models in accelerating and enhancing turbulence simulations while preserving fundamental conservation properties.
LGApr 8, 2025
Energy-Conserving Neural Network Closure Model for Long-Time Accurate and Stable LESToby van Gastelen, Wouter Edeling, Benjamin Sanderse
Machine learning-based closure models for LES have shown promise in capturing complex turbulence dynamics but often suffer from instabilities and physical inconsistencies. In this work, we develop a novel skew-symmetric neural architecture as closure model that enforces stability while preserving key physical conservation laws. Our approach leverages a discretization that ensures mass, momentum, and energy conservation, along with a face-averaging filter to maintain mass conservation in coarse-grained velocity fields. We compare our model against several conventional data-driven closures (including unconstrained convolutional neural networks), and the physics-based Smagorinsky model. Performance is evaluated on decaying turbulence and Kolmogorov flow for multiple coarse-graining factors. In these test cases we observe that unconstrained machine learning models suffer from numerical instabilities. In contrast, our skew-symmetric model remains stable across all tests, though at the cost of increased dissipation. Despite this trade-off, we demonstrate that our model still outperforms the Smagorinsky model in unseen scenarios. These findings highlight the potential of structure-preserving machine learning closures for reliable long-time LES.