HydroGym: A Reinforcement Learning Platform for Fluid Dynamics
Christian Lagemann, Sajeda Mokbel, Miro Gondrum, Mario Rüttgers, Jared Callaham, Ludger Paehler, Samuel Ahnert, Nicholas Zolman, Kai Lagemann, Nikolaus Adams, Matthias Meinke, Wolfgang Schröder, Jean-Christophe Loiseau, Esther Lagemann, Steven L. Brunton
TL;DR
HydroGym tackles the bottlenecks hindering RL in fluid dynamics by delivering a solver-agnostic platform with 42 validated flow-control environments spanning 2D to 3D regimes and variable Reynolds numbers. It integrates differentiable and non-differentiable solvers, enabling gradient-enhanced optimization and scalable multi-agent control, and provides comprehensive benchmarking against standard RL algorithms. The work demonstrates robust transfer learning across configurations, accelerates learning with gradient information, and showcases 3D flow control capabilities including wake manipulation and acoustic disruption. By democratizing access to standardized, high-fidelity fluid benchmarks, HydroGym paves the way for rapid algorithmic advances and broader adoption of AI-driven flow control in engineering practice.
Abstract
Modeling and controlling fluid flows is critical for several fields of science and engineering, including transportation, energy, and medicine. Effective flow control can lead to, e.g., lift increase, drag reduction, mixing enhancement, and noise reduction. However, controlling a fluid faces several significant challenges, including high-dimensional, nonlinear, and multiscale interactions in space and time. Reinforcement learning (RL) has recently shown great success in complex domains, such as robotics and protein folding, but its application to flow control is hindered by a lack of standardized benchmark platforms and the computational demands of fluid simulations. To address these challenges, we introduce HydroGym, a solver-independent RL platform for flow control research. HydroGym integrates sophisticated flow control benchmarks, scalable runtime infrastructure, and state-of-the-art RL algorithms. Our platform includes 42 validated environments spanning from canonical laminar flows to complex three-dimensional turbulent scenarios, validated over a wide range of Reynolds numbers. We provide non-differentiable solvers for traditional RL and differentiable solvers that dramatically improve sample efficiency through gradient-enhanced optimization. Comprehensive evaluation reveals that RL agents consistently discover robust control principles across configurations, such as boundary layer manipulation, acoustic feedback disruption, and wake reorganization. Transfer learning studies demonstrate that controllers learned at one Reynolds number or geometry adapt efficiently to new conditions, requiring approximately 50% fewer training episodes. The HydroGym platform is highly extensible and scalable, providing a framework for researchers in fluid dynamics, machine learning, and control to add environments, surrogate models, and control algorithms to advance science and technology.
