arXiv ScienceSearch

arXiv · 2203.13760

JAX-FLUIDS: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows

Abstract

Physical systems are governed by partial differential equations (PDEs). The Navier-Stokes equations describe fluid flows and are representative of nonlinear physical systems with complex spatio-temporal interactions. Fluid flows are omnipresent in nature and engineering applications, and their accurate simulation is essential for providing insights into these processes. While PDEs are typically solved with numerical methods, the recent success of machine learning (ML) has shown that ML methods can provide novel avenues of finding solutions to PDEs. ML is becoming more and more present in computational fluid dynamics (CFD). However, up to this date, there does not exist a general-purpose ML-CFD package which provides 1) powerful state-of-the-art numerical methods, 2) seamless hybridization of ML with CFD, and 3) automatic differentiation (AD) capabilities. AD in particular is essential to ML-CFD research as it provides gradient information and enables optimization of preexisting and novel CFD models. In this work, we propose JAX-FLUIDS: a comprehensive fully-differentiable CFD Python solver for compressible two-phase flows. JAX-FLUIDS allows the simulation of complex fluid dynamics with phenomena like three-dimensional turbulence, compressibility effects, and two-phase flows. Written entirely in JAX, it is straightforward to include existing ML models into the proposed framework. Furthermore, JAX-FLUIDS enables end-to-end optimization. I.e., ML models can be optimized with gradients that are backpropagated through the entire CFD algorithm, and therefore contain not only information of the underlying PDE but also of the applied numerical methods. We believe that a Python package like JAX-FLUIDS is crucial to facilitate research at the intersection of ML and CFD and may pave the way for an era of differentiable fluid dynamics.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Deniz A. Bezgin, Aaron B. Buhendwa, Nikolaus A. Adams. 2022-03-25. JAX-FLUIDS: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows. https://doi.org/10.1016/j.cpc.2022.108527

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Bayesian neural network correction of RANS turbulence models with uncertainty quantification in separated flows

Data-driven correction of turbulence models offers a promising route for improving Reynolds-averaged Navier-Stokes (RANS) predictions, but quantifying uncertainty in such corrections and ensuring generalization across flows remain key challenges. This work presents a Bayesian neural network (BNN) framework for uncertainty-aware correction of RANS models. The BNN represents both epistemic and input-dependent aleatoric uncertainty, interpreted here as irreducible scatter in the feature-to-correction relationship, with the latter propagated as spatially correlated fields through the RANS solver. The framework is trained exclusively on a periodic-hill configuration and evaluated without retraining on five unseen separated-flow configurations. The learned corrections improve the training-flow prediction, but the strong momentum-field benefit obtained from the anisotropy correction does not transfer consistently to the unseen flows. Out-of-distribution under-coverage is already present at the correction-field level, indicating that the loss of calibration is already present in transfer of the learned correction rather than being introduced primarily by CFD propagation. Overall, the framework enables joint propagation of epistemic and aleatoric uncertainty while exposing the present limitations of uncertainty calibration under distribution shift.

physics.flu-dyn

Direct numerical simulation of particle-laden flow in a linear compressor cascade: Unsteady boundary-layer effects on particle-blade interactions

We perform point-particle direct numerical simulations (PP-DNS) of particle-laden flow through a linear compressor cascade subjected to synthetic free-stream turbulence. Monodisperse particles are advanced in a one-way coupled Eulerian-Lagrangian framework with drag-only dynamics. We use PP-DNS collision statistics together with empirical deposition and erosion models to estimate particle deposition and blade erosion. Collision hotspots and regions of predicted deposition are identified near the leading edge and over the pressure side. On the pressure side, for the intermediate Stokes number, the onset of frequent collisions and predicted deposition is spatially associated with elevated boundary-layer intermittency during bypass transition. Nevertheless, for the largest particles, impacts occur farther upstream. On the suction side, sparse collisions and predicted deposition events appear only for the smallest particles and are phase-modulated by separation-induced vortex shedding. Joint distributions of impact velocity and angle show that leading-edge impacts are faster and span wider angles than pressure-side impacts. For the two larger particle sizes, the higher normal impact velocities near the leading edge result in a greater likelihood of rebound than on the pressure side. Therefore, appreciable erosion is predicted primarily near the leading edge under the present conditions. The present results highlight the role of unsteady boundary-layer dynamics in affecting particle-blade interactions in compressor cascades.

physics.flu-dyn

Diffusion Enhancement and Directional Suppression Induced by Reciprocal Flows

Reciprocal flows repeatedly return fluid elements to their initial positions, producing no net advective transport on time average. Nevertheless, their interplay with diffusion gives rise to nontrivial transport. To describe this phenomenon, we develop a general theory of effective diffusion under two-dimensional linear flows with arbitrary time dependence. By analyzing the advection-diffusion equation, we derive exact expressions for the mean square displacement and the effective diffusion coefficients for extensional, simple shear, and rotational flows within a single framework. We show that the reciprocal flows universally induce diffusion enhancement. The diffusion tensor exhibits pronounced anisotropy, which can result in directional diffusion suppression in spite of the direction-averaged diffusion enhancement. Our results provide a general framework for diffusion control by time-dependent flows and can provide new strategies for transport manipulation in microfluidic and biological systems.

physics.flu-dyn