Search arXivSearch

arXiv · 2508.00645

SmartFlow: A CFD-solver-agnostic deep reinforcement learning framework for computational fluid dynamics on HPC platforms

Abstract

Deep reinforcement learning (DRL) is emerging as a powerful tool for fluid-dynamics research, encompassing active flow control, autonomous navigation, turbulence modeling and discovery of novel numerical schemes. We introduce SmartFlow, a CFD-solver-agnostic framework for both single- and multi-agent DRL algorithms that can easily integrate with MPI-parallel CPU and GPU-accelerated solvers. Built on Relexi and SmartSOD2D, SmartFlow uses the SmartSim infrastructure library and our newly developed SmartRedis-MPI library to enable asynchronous, low-latency, in-memory communication between CFD solvers and Python-based DRL algorithms. SmartFlow leverages PyTorch's Stable-Baselines3 for training, which provides a modular, Gym-like environment API. We demonstrate its versatility via three case studies: single-agent synthetic-jet control for drag reduction in a cylinder flow simulated by the high-order FLEXI solver, multi-agent cylinder wake control using the GPU-accelerated spectral-element code SOD2D, and multi-agent wall-model learning for large-eddy simulation with the finite-difference solver CaLES. SmartFlow's CFD-solver-agnostic design and seamless HPC integration is promising to accelerate RL-driven fluid-mechanics studies.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Maochao Xiao, Yuning Wang, Felix Rodach, Bernat Font, Marius Kurz, Pol Suárez, Di Zhou, Francisco Alcántara-Ávila, Ting Zhu, Junle Liu, Ricard Montalà, Jiawei Chen, Jean Rabault, Oriol Lehmkuhl, Andrea Beck, Johan Larsson, Ricardo Vinuesa, Sergio Pirozzoli. 2025-08-01. SmartFlow: A CFD-solver-agnostic deep reinforcement learning framework for computational fluid dynamics on HPC platforms. https://arxiv.org/abs/2508.00645

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

KEEP EXPLORING

Related papers

Data-driven low-dimensional model for the onset of turbulence in plane Couette flow

We construct low-dimensional dynamical systems for low-Reynolds-number turbulence in plane Couette flow using Kernel Quantile Regression. Exploiting the finite-dimensional structure of attractors in dissipative systems, reduced-order models are learned from direct numerical simulation data using a small set of physically meaningful observables. The resulting discrete-time models accurately reproduce periodic and chaotic dynamics near the onset of turbulence. The minimum number of variables required for accurate prediction is found to be consistent with embedding theory based on the attractor dimension. For chaotic regimes, the models capture both short-term trajectory evolution and long-term statistical properties, including probability density functions. By incorporating the Reynolds number as an additional input variable, we further develop a parameter-dependent model that successfully reproduces the bifurcation structure over a range of Reynolds numbers, including bifurcations between training points. These results demonstrate the effectiveness of machine-learning-based reduced-order modeling for capturing the essential dynamics and statistics of weakly turbulent flows.

physics.flu-dyn

Rapidly rotating internally heated convection: bounds on long-time averages

Convection on geophysical and astrophysical scales is subject to rapid rotation and strong heating from within the domain. In studying the long-time behaviour of the solutions for such a system, energy identities fail to capture the effects of rotation because the Coriolis force does no work, and rapid rotation can be prohibitive for direct numerical simulations. Instead, we derive an asymptotically reduced model for rapidly rotating convection driven by uniform internal heating between isothermal stress-free boundaries in a plane periodic layer. The main contribution is the proof of bounds on the mean temperature, and the mean vertical convective heat transport, in terms of the Rayleigh and Ekman numbers, in the limit of infinite Prandtl number. The first quantity represents the mixing of the flow, and the second the asymmetry in heat leaving the bottom and top boundaries due to convection, and unlike Rayleigh-Bénard convection, the two are not a priori related. We employ alternative estimation techniques to those used in previous studies (Grooms \& Whitehead, 2014 \textit{Nonlinearity}, 28, 29) and identify two distinct scaling behaviours for both quantities. Finally, our bounds are optimised, within the methodology, and provide a rigorous constraint for future studies of rotation-dominated internally heated convection.

physics.flu-dyn

Baroclinic wave dynamics in the Ekman-free rotating rectangular annulus with localized forced plume

We report numerical simulations of a rotating rectangular annulus that isolates the Ekman-free bulk of the cylindrical baroclinic annulus, subjected to bi-directional temperature gradients imposed by a uniformly cooled inner wall and a localized forced heated plume at the outer bottom. The finite-volume OpenFOAM solver is employed across combinations of source Richardson number $Ri_0 = 99, 4, 1$ and Rossby number $Ro = 0.3, 0.1, 0.07$. A non-dimensional scaling of the governing equations identifies geostrophic-hydrostatic balance as the leading-order bulk state, a result confirmed a posteriori by the $x$ and $z-$momentum budgets. Baroclinic waves of mode $m=2$ at $Ro=0.3$ transition to $m=3$ as $Ro$ decreases, consistent with the contraction of the Eady deformation radius $L_ρ= NH/f$; Complex Empirical Orthogonal Function (CEOF) analysis characterizes the wave regime and detects a Hopf-bifurcated vacillating state at $Ri_0 = 99,~Ro = 0.1$. The plume morphology, classified through the Morton length scale and source flux-balance parameter, transitions from weak, laterally-swept structures at $Ri_0 = 99$ to sustained columnar plumes traversing the full baroclinic depth at $Ri_0 \leq 4$. The plume entrainment coefficient $Γ(z)$ shows opposite rotational sensitivities at low and high $Ri_0$, which we organize through a local plume Rossby number $Ro_p = w/(2Ωb)$. A mixing-length argument predicts a bulk turbulent heat flux $\overline{u'T'} \propto Ri_0^{-1/2}$, anticipating an order-of-magnitude enhancement from $Ri_0 = 99$ to $Ri_0 = 1$, in agreement with the simulations. A regime map in the $(Ri_0, Ro)$ plane reveals that, within the explored range, the plume-regime and wave-selection problems are approximately separable: $Ri_0$ sets the plume regime while $Ro$ selects the dominant baroclinic wave mode.

physics.flu-dyn