| --- |
| license: mit |
| task_categories: |
| - time-series-forecasting |
| tags: |
| - physics |
| - simulation |
| - PDE |
| - fluid-dynamics |
| - equivariance |
| - Navier-Stokes |
| - MHD |
| - turbulence |
| language: |
| - en |
| pretty_name: ReViT - Datasets for Rotationally Equivariant Vision Transformers |
| size_categories: |
| - 10G<n<100G |
| --- |
| |
| # ReViT: Datasets for Rotationally Equivariant Vision Transformers |
|
|
| This repository contains the datasets used in the **ReViT** project, which develops rotationally equivariant vision transformers for learning PDE dynamics. |
|
|
| ## Datasets |
|
|
| We provide three benchmark datasets spanning 2D and 3D physics simulations: |
|
|
| | Dataset | Task | Dimensionality | Channels | Spatial Resolution | Source | |
| |---------|------|---------------|----------|-------------------|--------| |
| | **KF2D** | 2D Kolmogorov Flow | 2D | 2 (velocity) | 160×160 | [APEBench](https://github.com/Ceyron/apebench) | |
| | **MHD_64** | 3D Magnetohydrodynamics | 3D | 7 (density + velocity + magnetic) | 64×64×64 | [The Well](https://github.com/PolymathicAI/the_well) | |
| | **P3D** | 3D Periodic Channel Flow | 3D | 4 (velocity + pressure) | 96×96×96 | DNS Simulation | |
| |
| --- |
| |
| ## KF2D — 2D Kolmogorov Flow |
| |
| **Physical scenario:** Forced 2D turbulence governed by the incompressible Navier-Stokes equations with sinusoidal forcing (Kolmogorov flow). The external forcing sustains turbulence, producing statistically stationary vortex dynamics. |
| |
| ### Files |
| |
| | File | Shape | dtype | Size | Description | |
| |------|-------|-------|------|-------------| |
| | `KF2D/train_V.npy` | `(50, 51, 2, 160, 160)` | float64 | ~1.0 GB | Training trajectories | |
| | `KF2D/test_V.npy` | `(30, 201, 2, 160, 160)` | float64 | ~2.4 GB | Test trajectories | |
| |
| ### Data Layout |
| - **Axis 0** (`N`): Number of independent trajectory samples |
| - **Axis 1** (`T`): Time steps per trajectory (51 train / 201 test) |
| - **Axis 2** (`C=2`): Velocity channels `[u, v]` |
| - **Axes 3-4** (`H, W`): Spatial grid (160×160, periodic boundary conditions) |
| |
| ### Notes |
| - Data is stored as **velocity** fields (converted from vorticity via stream function inversion) |
| - Domain: `[0, 1]²` with periodic boundaries |
| - The original vorticity data was generated using [APEBench](https://github.com/Ceyron/apebench); velocity conversion was performed using `Generate_velocity.py` from the ReViT repository |
| |
| --- |
| |
| ## MHD_64 — 3D Magnetohydrodynamics |
| |
| **Physical scenario:** Compressible ideal magnetohydrodynamics (MHD) simulation with Mach number Ma=0.7 and sonic Mach number Ms=0.5. The simulation evolves coupled density, velocity, and magnetic fields on a 3D periodic domain. |
| |
| ### Files |
| |
| | File | Description | |
| |------|-------------| |
| | `MHD_64/data/train/MHD_Ma_0.7_Ms_0.5.hdf5` | Training data (~5.8 GB) | |
| | `MHD_64/data/valid/MHD_Ma_0.7_Ms_0.5.hdf5` | Validation data (~734 MB) | |
| | `MHD_64/stats.yaml` | Normalization statistics | |
| |
| ### HDF5 Structure |
| |
| ``` |
| ├── boundary_conditions/ |
| │ ├── x_periodic/mask (64,) bool |
| │ ├── y_periodic/mask (64,) bool |
| │ └── z_periodic/mask (64,) bool |
| ├── dimensions/ |
| │ ├── time (100,) float32 |
| │ ├── x (64,) float64 |
| │ ├── y (64,) float64 |
| │ └── z (64,) float64 |
| ├── scalars/ |
| │ ├── Ma () float32 (= 0.7) |
| │ └── Ms () float32 (= 0.5) |
| ├── t0_fields/ |
| │ └── density (5, 100, 64, 64, 64) float32 |
| └── t1_fields/ |
| ├── magnetic_field (5, 100, 64, 64, 64, 3) float32 |
| └── velocity (5, 100, 64, 64, 64, 3) float32 |
| ``` |
| |
| ### Data Layout |
| - **5 trajectories** × **100 time steps** each |
| - **Density**: scalar field `(5, 100, 64, 64, 64)` |
| - **Velocity**: 3-component vector field `(5, 100, 64, 64, 64, 3)` |
| - **Magnetic field**: 3-component vector field `(5, 100, 64, 64, 64, 3)` |
| - All spatial dimensions are periodic |
| |
| ### Notes |
| - This dataset is a subset of [The Well](https://github.com/PolymathicAI/the_well) benchmark |
| - Only the `MHD_Ma_0.7_Ms_0.5` parameter combination is included (used in experiments) |
| - The model consumes channels in order: `[velocity(3), magnetic(3), density(1)]` = 7 channels total |
| - Note: the HDF5 stores fields in order `[density, velocity, magnetic]`; the data loader reorders them |
| |
| --- |
| |
| ## P3D — 3D Periodic Channel Flow |
| |
| **Physical scenario:** Direct numerical simulation (DNS) of incompressible turbulent flow in a 3D periodic channel. The simulation resolves velocity and pressure fields at high resolution. |
| |
| ### Files |
| |
| | File | Shape (velocity) | Shape (pressure) | Size | Description | |
| |------|-------------------|-------------------|------|-------------| |
| | `P3D/sim0_data_train.h5` | `(1, 180, 3, 96, 96, 96)` | `(1, 180, 1, 96, 96, 96)` | ~1.4 GB | Training | |
| | `P3D/sim0_data_test.h5` | `(1, 20, 3, 96, 96, 96)` | `(1, 20, 1, 96, 96, 96)` | ~157 MB | Test | |
| |
| ### HDF5 Structure |
| |
| ``` |
| ├── velocity (1, T, 3, 96, 96, 96) float32 |
| ├── pressure (1, T, 1, 96, 96, 96) float32 |
| └── timesteps (T,) int64 |
| ``` |
| |
| ### Data Layout |
| - **Axis 0** (`B=1`): Batch dimension (single simulation) |
| - **Axis 1** (`T`): Time steps (180 train / 20 test) |
| - **Axis 2** (`C`): Channels — 3 for velocity `[u, v, w]`, 1 for pressure `[p]` |
| - **Axes 3-5** (`D, H, W`): Spatial grid (96×96×96) |
| |
| ### Notes |
| - The model uses 4 channels total: `[u, v, w, p]` (velocity + pressure) |
| - Only `sim0` is included (used in the default experiments) |
| - Spatial domain is periodic in all three directions |
| |
| --- |
| |
| ## Usage |
| |
| ### Quick Download |
| |
| ```python |
| from huggingface_hub import hf_hub_download, snapshot_download |
| |
| # Download the entire repository |
| snapshot_download( |
| repo_id="thuerey-group/ReViT", |
| repo_type="dataset", |
| local_dir="./Dataset" |
| ) |
| |
| # Or download a specific dataset |
| hf_hub_download( |
| repo_id="thuerey-group/ReViT", |
| repo_type="dataset", |
| filename="KF2D/train_V.npy", |
| local_dir="./Dataset" |
| ) |
| ``` |
| |
| ### Using the Download Script |
| |
| A convenience script is provided in the [ReViT repository](https://github.com/thuerey-group/ReViT): |
| |
| ```bash |
| # Download all datasets |
| python scripts/download_from_hf.py --output_dir ./Dataset |
| |
| # Download specific dataset |
| python scripts/download_from_hf.py --dataset KF2D --output_dir ./Dataset |
| |
| # List available datasets |
| python scripts/download_from_hf.py --list |
| ``` |
| |
| ### Loading Data in Python |
| |
| ```python |
| import numpy as np |
| import h5py |
| |
| # === KF2D === |
| train_data = np.load("Dataset/KF2D/train_V.npy") |
| # shape: (50, 51, 2, 160, 160) — [samples, timesteps, channels, H, W] |
| |
| # === MHD_64 === |
| with h5py.File("Dataset/MHD_64/data/train/MHD_Ma_0.7_Ms_0.5.hdf5", "r") as f: |
| velocity = f["t1_fields/velocity"][:] # (5, 100, 64, 64, 64, 3) |
| magnetic = f["t1_fields/magnetic_field"][:] # (5, 100, 64, 64, 64, 3) |
| density = f["t0_fields/density"][:] # (5, 100, 64, 64, 64) |
| |
| # === P3D === |
| with h5py.File("Dataset/P3D/sim0_data_train.h5", "r") as f: |
| velocity = f["velocity"][:] # (1, 180, 3, 96, 96, 96) |
| pressure = f["pressure"][:] # (1, 180, 1, 96, 96, 96) |
| ``` |
| |
| --- |
| |
| ## Citation |
| |
| If you use these datasets, please cite: |
| |
| ```bibtex |
| @article{revit2025, |
| title={ReViT: Rotationally Equivariant Vision Transformers for PDE Dynamics}, |
| author={Thuerey Group}, |
| year={2025} |
| } |
| ``` |
| |
| ## License |
| |
| This dataset is released under the [MIT License](https://opensource.org/licenses/MIT). |
| |
| ## Acknowledgments |
| |
| - **KF2D**: Generated using the [APEBench](https://github.com/Ceyron/apebench) benchmark framework |
| - **MHD_64**: Subset from [The Well](https://github.com/PolymathicAI/the_well) benchmark |
| - **P3D**: Direct numerical simulation data |
|
|