dynamicslab/hydrogym

An RL-Gym for Challenge Problems in Data-Driven Modeling and Control of Fluid Dynamics.

What it solves

HydroGym provides a standardized, research-ready platform for applying reinforcement learning (RL) to fluid dynamics and flow control. It bridges the gap between complex computational fluid dynamics (CFD) solvers and modern machine learning libraries, enabling researchers to train agents on tasks ranging from simple 2D benchmarks to complex 3D turbulent flows.

How it works

HydroGym exposes fluid dynamics simulations through a Gymnasium-compatible API, allowing them to be treated as standard RL environments. It supports six different solver backends (including Firedrake, NEK5000, and JAX-Fluids) and handles the complexities of CFD, such as parallelization and mesh management. The platform automatically manages environment checkpoints via the Hugging Face Hub and provides tools for custom observations like pressure probes or stress sensors.

Who it’s for

This project is designed for researchers and engineers in fluid mechanics and machine learning who need a robust, scalable framework to test RL algorithms on physical flow control problems. It is suitable for everything from local workstation experiments to large-scale distributed training on HPC systems.

Highlights

  • 61+ pre-configured environments covering 2D and 3D flows.
  • Compatible with popular RL libraries like Stable-Baselines3 and RLlib.
  • Supports diverse CFD backends including finite element, spectral element, and fully differentiable solvers.
  • Scalable architecture with MPI-parallelized solvers for high-performance computing.
  • Includes advanced features like modal decomposition, stability analysis, and multi-agent support via PettingZoo.

Related

  • Project
  • Project
  • Project
  • Project
  • Project