FluidGym: Plug-and-Play Benchmarking of Reinforcement Learning Algorithms for Large-Scale Flow Control
|
|
|
|
|
Key Features
- Standalone, GPU-accelerated fluid dynamics implemented fully in PyTorch — no external CFD solvers required.
- Fully differentiable environments, enabling both reinforcement learning and gradient-based control methods.
- Gymnasium-like API with seamless integration into common RL frameworks.
- Standardized benchmarks with fixed train/validation/test splits for fair and reproducible evaluation.
- Diverse AFC environments (2D & 3D) with multiple difficulty levels, covering different regimes.
- Single-agent and multi-agent support for centralized and decentralized control.
- Reference baselines and experiments provided for widely used RL algorithms PPO and SAC.
Models & Data
- All trained models are publicly available on HuggingFace.
- Complete training and test datasets with results for all experimental runs are released for transparent comparison and reproducibility via our HuggingFace dataset.
What's New in FluidGym v0.2
- New solver: FluidGym now runs on phiPICT, which is installed as a prebuilt wheel, so installing FluidGym compiles no CUDA code.
- Batched environments:
fluidgym.make(id, n_envs=N)runsNenvironments in one simulation on a single GPU, andfluidgym.make_vec(..., devices=[...])scales across GPUs. - Much faster: training is on average ~20× faster, and over 100× faster for some environments.
- MHD support: new
RBCMHD3D-{easy,medium,hard}-v0environments for liquid-metal convection in a magnetic field. - Improved differentiability: activation checkpointing for BPTT, plus Jacobian and VJP examples.
- New wrappers:
VideoRecorderandPowerPenalty.
See the CHANGELOG for all changes, including breaking changes and previous releases.
Installation
📦 Installation from PyPI
FluidGym needs Linux, an NVIDIA GPU with a driver for CUDA 12.8 (≥ 570) and Python 3.11–3.13.
pip install fluidgym
This also installs the solver phiPICT together with the matching PyTorch (2.10, built with CUDA 12.8). There is no need to install PyTorch first: phiPICT's compiled extension only works with the PyTorch version it was built against, so pip replaces any other version. For other PyTorch/CUDA versions, first install the matching phiPICT wheel from its wheel index (or build phiPICT from source), then FluidGym, e.g. for PyTorch 2.14 with CUDA 12.6:
pip install "torch==2.14.*" --index-url https://download.pytorch.org/whl/cu126
pip install phipict -f https://upb-sciml.github.io/phiPICT/whl/torch-2.14+cu12.html
pip install fluidgym
🧱 Build from Source
FluidGym itself is pure Python; the CUDA solver comes with phiPICT from PyPI.
- Create a new conda environment and activate it:
conda create -n fluidgym python=3.12
conda activate fluidgym
- Clone the repository, enter the directory and install the package:
pip install .
For development, use make install-dev instead, which installs the package in
editable mode together with the development dependencies (needs pip ≥ 25.1).
Getting Started
For an easy start, refer to our documentation and the examples directory.
FluidGym provides a gymnasium-like interface that can be used as follows:
import fluidgym
env = fluidgym.make(
"CylinderJet2D-easy-v0",
)
obs, info = env.reset(seed=42)
for _ in range(50):
action = env.sample_action()
obs, reward, term, trunc, info = env.step(action)
env.render()
if term or trunc:
break
License & Citation
This repository is published under the Apache-2.0 license. If you use FliudGym in your work, please cite us:
@inproceedings{becktepe-fluidgym26,
title={Plug-and-Play Benchmarking of Reinforcement Learning Algorithms for Large-Scale Flow Control},
author={Jannis Becktepe and Aleksandra Franz and Nils Thuerey and Sebastian Peitz},
booktitle={Forty-third International Conference on Machine Learning},
year={2026},
url={https://openreview.net/forum?id=ilEooI8fK1}
}
Metadata
Release files for fluidgym 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fluidgym-0.2.0.tar.gz | 176.0 kB | With provenance | Details for fluidgym-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fluidgym-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for fluidgym-0.2.0-py3-none-any.whl |
Total release size: 385.4 kB
Release files / fluidgym-0.2.0.tar.gz
| Download URL | fluidgym-0.2.0.tar.gz |
|---|---|
| Size | 176.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05b09ddabe4b062567d18d6a690c4035aae35feec18593111d25edb98895fd80
|
|
BLAKE2b-256 checksum How to use checksums |
5e163d5d7ced601a53a8d31f8a1c2c418679c0f1f7a0748b791aafce28659b71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logRelease files / fluidgym-0.2.0-py3-none-any.whl
| Download URL | fluidgym-0.2.0-py3-none-any.whl |
|---|---|
| Size | 209.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9e372c0019c9be5226c719bfcfe606e7f2a821a19823be7b439242b6e98aed2
|
|
BLAKE2b-256 checksum How to use checksums |
32f1e8729f3545a297120f2d369508ee68c2f5ef0ac5129e1fa8c5b678b3d4ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logSecurity for fluidgym 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fluidgym-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.