|
|
|
|
|
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.
Introducing FluidGym v0.1
We are happy to announce that FluidGym v0.1 comes with many updates and improvements, mainly focusing on more convenient usage and integration with RL frameworks:
- Unified SARL and MARL interface: Previously, MARL environments implemented public
reset_marl()andstep_marl()functions. These have been removed and directly integrated with thereset()andstep()functions. When creating an environemtn viafluidgym.make(), you can now pass ause_marl=Trueflag, to enable MARL and use thereset()andstep()as before. The only difference is that they now return a batch of observations and rewards. This has also been updated for the integrations with PettingZoo and SB3. - Gymnasium spaces:
FluidEnvnow hasaction_spaceandobservation_spaceattributes consistent withgymnasium. Additionally, the previous flattened observations have been replaced byDictobservation space containing indivdual fields, such as as velocity and pressure fields, as indivual keys. Furthermore, the indivual observations are now shaped according to the spatial structure of the sensors, enabling the use of methods that leverage the spatial structure of the domain, e.g. CNNs, equivariant networks, etc. - Environment wrappers: Following the new observation spaces, we introduce
FluidWrappers, namelyFlattenObservation,ObsExtraction,ActionNoise, andSensorNoise. The general wrapper interface enables easy integration of new wrappers as needed. - Parallelization: Using the new
FluidEnvLikeprotocol, theParallelFluidEnvcan now seamlessly be used with all FluidGym wrappers and integration wrappers. We updated the example to show how you can use FluidGym across multiple GPUs.
Important: The FlattenObservation ensure direct compatiblity with our models
on HuggingFace (trained with FluidGym v0.0.2). If you want to use the models, make sure
to install the FluidGym v0.0.2 or use the FlattenObservation wrapper. In case you
encounter any issues, please report these via an Issue on GitHub. Thank you!
Installation
📦 Installation from PyPi
- Ensure the correct PyTorch version is installed (compatible with CUDA 12.8):
pip install torch --index-url https://download.pytorch.org/whl/cu128
- Install
pip install fluidgym
🐳 Using Docker
Instead of installing FluidGym you can use one of our Docker containers:
- fluidgym-runtime for running FluidGym
- fluidgym-devel for development
Both containers come with the following Miniconda environments:
py310: Python 3.10py311: Python 3.11py312: Python 3.12py313: Python 3.13
Start the containers with:
docker run -it --gpus all fluidgym-runtime bash
docker run -it --gpus all fluidgym-devel bash
🧱 Build from Source
- Create a new conda environment and activate it:
conda create -n fluidgym python=3.10
conda activate fluidgym
- Install gcc:
conda install pip "gcc_linux-64>=6.0,<=11.5" "gxx_linux-64>=6.0,<=11.5"
- Install the latest Pytorch for CUDA 12.8 via pip:
pip install torch --index-url https://download.pytorch.org/whl/cu128
- Install the matching cuda toolkit via conda:
conda install cuda-toolkit=12.8 -c nvidia/label/cuda-12.8.1
- Clone the repository and enter the directory, then compile the custom CUDA kernels and install the package (this might take several minutes):
make install
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 MIT license. If you use FliudGym in your work, please cite us:
@misc{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},
year={2026},
eprint={2601.15015},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2601.15015},
note={GitHub: https://github.com/safe-autonomous-systems/fluidgym},
}
Metadata
Release files for fluidgym 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 66.2 MB
Release files / fluidgym-0.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fluidgym-0.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 16.6 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c7b53f316bde8eb6510487840fc2139f327112cc459e03efb819467d37983c29
|
|
BLAKE2b-256 checksum How to use checksums |
deb9c7d9020ce571bc10e36f9566ac727370665976666604b8925a62d84b466d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / fluidgym-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fluidgym-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 16.6 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7fe035e18409ad42ebbabe882cea1f24bcd86975aa9b862736f842a242a2c3c1
|
|
BLAKE2b-256 checksum How to use checksums |
87d31bbcdc88482411a75d1752a06ee120b291320beb931aac49dbc2b8432b4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / fluidgym-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fluidgym-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 16.5 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
adc8d386a121bf8a45ec12aef9bc24e4229158f42c67a40bcc2a47dd18b947fd
|
|
BLAKE2b-256 checksum How to use checksums |
118b5007a00a1ec0b28e39a71e0a6644e18226aa243ab46ad06af0a4ff4e397b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / fluidgym-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | fluidgym-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 16.5 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d9353c50ecc481b5754e8d8cb8b773350de697e46e849a6214f733b8bd52681
|
|
BLAKE2b-256 checksum How to use checksums |
3f17b0eeea239a410a7c41e0790a498947b4466cd6f44fe1b867ddac98f6b76f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for fluidgym 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.