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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- time-series-forecasting
|
| 5 |
+
tags:
|
| 6 |
+
- physics
|
| 7 |
+
- simulation
|
| 8 |
+
- PDE
|
| 9 |
+
- fluid-dynamics
|
| 10 |
+
- equivariance
|
| 11 |
+
- Navier-Stokes
|
| 12 |
+
- MHD
|
| 13 |
+
- turbulence
|
| 14 |
+
language:
|
| 15 |
+
- en
|
| 16 |
+
pretty_name: ReViT - Datasets for Rotationally Equivariant Vision Transformers
|
| 17 |
+
size_categories:
|
| 18 |
+
- 10G<n<100G
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# ReViT: Datasets for Rotationally Equivariant Vision Transformers
|
| 22 |
+
|
| 23 |
+
This repository contains the datasets used in the **ReViT** project, which develops rotationally equivariant vision transformers for learning PDE dynamics.
|
| 24 |
+
|
| 25 |
+
## Datasets
|
| 26 |
+
|
| 27 |
+
We provide three benchmark datasets spanning 2D and 3D physics simulations:
|
| 28 |
+
|
| 29 |
+
| Dataset | Task | Dimensionality | Channels | Spatial Resolution | Source |
|
| 30 |
+
|---------|------|---------------|----------|-------------------|--------|
|
| 31 |
+
| **KF2D** | 2D Kolmogorov Flow | 2D | 2 (velocity) | 160×160 | [APEBench](https://github.com/Ceyron/apebench) |
|
| 32 |
+
| **MHD_64** | 3D Magnetohydrodynamics | 3D | 7 (density + velocity + magnetic) | 64×64×64 | [The Well](https://github.com/PolymathicAI/the_well) |
|
| 33 |
+
| **P3D** | 3D Periodic Channel Flow | 3D | 4 (velocity + pressure) | 96×96×96 | DNS Simulation |
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## KF2D — 2D Kolmogorov Flow
|
| 38 |
+
|
| 39 |
+
**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.
|
| 40 |
+
|
| 41 |
+
### Files
|
| 42 |
+
|
| 43 |
+
| File | Shape | dtype | Size | Description |
|
| 44 |
+
|------|-------|-------|------|-------------|
|
| 45 |
+
| `KF2D/train_V.npy` | `(50, 51, 2, 160, 160)` | float64 | ~1.0 GB | Training trajectories |
|
| 46 |
+
| `KF2D/test_V.npy` | `(30, 201, 2, 160, 160)` | float64 | ~2.4 GB | Test trajectories |
|
| 47 |
+
|
| 48 |
+
### Data Layout
|
| 49 |
+
- **Axis 0** (`N`): Number of independent trajectory samples
|
| 50 |
+
- **Axis 1** (`T`): Time steps per trajectory (51 train / 201 test)
|
| 51 |
+
- **Axis 2** (`C=2`): Velocity channels `[u, v]`
|
| 52 |
+
- **Axes 3-4** (`H, W`): Spatial grid (160×160, periodic boundary conditions)
|
| 53 |
+
|
| 54 |
+
### Notes
|
| 55 |
+
- Data is stored as **velocity** fields (converted from vorticity via stream function inversion)
|
| 56 |
+
- Domain: `[0, 1]²` with periodic boundaries
|
| 57 |
+
- 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
|
| 58 |
+
|
| 59 |
+
---
|
| 60 |
+
|
| 61 |
+
## MHD_64 — 3D Magnetohydrodynamics
|
| 62 |
+
|
| 63 |
+
**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.
|
| 64 |
+
|
| 65 |
+
### Files
|
| 66 |
+
|
| 67 |
+
| File | Description |
|
| 68 |
+
|------|-------------|
|
| 69 |
+
| `MHD_64/data/train/MHD_Ma_0.7_Ms_0.5.hdf5` | Training data (~5.8 GB) |
|
| 70 |
+
| `MHD_64/data/valid/MHD_Ma_0.7_Ms_0.5.hdf5` | Validation data (~734 MB) |
|
| 71 |
+
| `MHD_64/stats.yaml` | Normalization statistics |
|
| 72 |
+
|
| 73 |
+
### HDF5 Structure
|
| 74 |
+
|
| 75 |
+
```
|
| 76 |
+
├── boundary_conditions/
|
| 77 |
+
│ ├── x_periodic/mask (64,) bool
|
| 78 |
+
│ ├── y_periodic/mask (64,) bool
|
| 79 |
+
│ └── z_periodic/mask (64,) bool
|
| 80 |
+
├── dimensions/
|
| 81 |
+
│ ├── time (100,) float32
|
| 82 |
+
│ ├── x (64,) float64
|
| 83 |
+
│ ├── y (64,) float64
|
| 84 |
+
│ └── z (64,) float64
|
| 85 |
+
├── scalars/
|
| 86 |
+
│ ├── Ma () float32 (= 0.7)
|
| 87 |
+
│ └── Ms () float32 (= 0.5)
|
| 88 |
+
├── t0_fields/
|
| 89 |
+
│ └── density (5, 100, 64, 64, 64) float32
|
| 90 |
+
└── t1_fields/
|
| 91 |
+
├── magnetic_field (5, 100, 64, 64, 64, 3) float32
|
| 92 |
+
└── velocity (5, 100, 64, 64, 64, 3) float32
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
### Data Layout
|
| 96 |
+
- **5 trajectories** × **100 time steps** each
|
| 97 |
+
- **Density**: scalar field `(5, 100, 64, 64, 64)`
|
| 98 |
+
- **Velocity**: 3-component vector field `(5, 100, 64, 64, 64, 3)`
|
| 99 |
+
- **Magnetic field**: 3-component vector field `(5, 100, 64, 64, 64, 3)`
|
| 100 |
+
- All spatial dimensions are periodic
|
| 101 |
+
|
| 102 |
+
### Notes
|
| 103 |
+
- This dataset is a subset of [The Well](https://github.com/PolymathicAI/the_well) benchmark
|
| 104 |
+
- Only the `MHD_Ma_0.7_Ms_0.5` parameter combination is included (used in experiments)
|
| 105 |
+
- The model consumes channels in order: `[velocity(3), magnetic(3), density(1)]` = 7 channels total
|
| 106 |
+
- Note: the HDF5 stores fields in order `[density, velocity, magnetic]`; the data loader reorders them
|
| 107 |
+
|
| 108 |
+
---
|
| 109 |
+
|
| 110 |
+
## P3D — 3D Periodic Channel Flow
|
| 111 |
+
|
| 112 |
+
**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.
|
| 113 |
+
|
| 114 |
+
### Files
|
| 115 |
+
|
| 116 |
+
| File | Shape (velocity) | Shape (pressure) | Size | Description |
|
| 117 |
+
|------|-------------------|-------------------|------|-------------|
|
| 118 |
+
| `P3D/sim0_data_train.h5` | `(1, 180, 3, 96, 96, 96)` | `(1, 180, 1, 96, 96, 96)` | ~1.4 GB | Training |
|
| 119 |
+
| `P3D/sim0_data_test.h5` | `(1, 20, 3, 96, 96, 96)` | `(1, 20, 1, 96, 96, 96)` | ~157 MB | Test |
|
| 120 |
+
|
| 121 |
+
### HDF5 Structure
|
| 122 |
+
|
| 123 |
+
```
|
| 124 |
+
├── velocity (1, T, 3, 96, 96, 96) float32
|
| 125 |
+
├── pressure (1, T, 1, 96, 96, 96) float32
|
| 126 |
+
└── timesteps (T,) int64
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
### Data Layout
|
| 130 |
+
- **Axis 0** (`B=1`): Batch dimension (single simulation)
|
| 131 |
+
- **Axis 1** (`T`): Time steps (180 train / 20 test)
|
| 132 |
+
- **Axis 2** (`C`): Channels — 3 for velocity `[u, v, w]`, 1 for pressure `[p]`
|
| 133 |
+
- **Axes 3-5** (`D, H, W`): Spatial grid (96×96×96)
|
| 134 |
+
|
| 135 |
+
### Notes
|
| 136 |
+
- The model uses 4 channels total: `[u, v, w, p]` (velocity + pressure)
|
| 137 |
+
- Only `sim0` is included (used in the default experiments)
|
| 138 |
+
- Spatial domain is periodic in all three directions
|
| 139 |
+
|
| 140 |
+
---
|
| 141 |
+
|
| 142 |
+
## Usage
|
| 143 |
+
|
| 144 |
+
### Quick Download
|
| 145 |
+
|
| 146 |
+
```python
|
| 147 |
+
from huggingface_hub import hf_hub_download, snapshot_download
|
| 148 |
+
|
| 149 |
+
# Download the entire repository
|
| 150 |
+
snapshot_download(
|
| 151 |
+
repo_id="thuerey-group/ReViT",
|
| 152 |
+
repo_type="dataset",
|
| 153 |
+
local_dir="./Dataset"
|
| 154 |
+
)
|
| 155 |
+
|
| 156 |
+
# Or download a specific dataset
|
| 157 |
+
hf_hub_download(
|
| 158 |
+
repo_id="thuerey-group/ReViT",
|
| 159 |
+
repo_type="dataset",
|
| 160 |
+
filename="KF2D/train_V.npy",
|
| 161 |
+
local_dir="./Dataset"
|
| 162 |
+
)
|
| 163 |
+
```
|
| 164 |
+
|
| 165 |
+
### Using the Download Script
|
| 166 |
+
|
| 167 |
+
A convenience script is provided in the [ReViT repository](https://github.com/thuerey-group/ReViT):
|
| 168 |
+
|
| 169 |
+
```bash
|
| 170 |
+
# Download all datasets
|
| 171 |
+
python scripts/download_from_hf.py --output_dir ./Dataset
|
| 172 |
+
|
| 173 |
+
# Download specific dataset
|
| 174 |
+
python scripts/download_from_hf.py --dataset KF2D --output_dir ./Dataset
|
| 175 |
+
|
| 176 |
+
# List available datasets
|
| 177 |
+
python scripts/download_from_hf.py --list
|
| 178 |
+
```
|
| 179 |
+
|
| 180 |
+
### Loading Data in Python
|
| 181 |
+
|
| 182 |
+
```python
|
| 183 |
+
import numpy as np
|
| 184 |
+
import h5py
|
| 185 |
+
|
| 186 |
+
# === KF2D ===
|
| 187 |
+
train_data = np.load("Dataset/KF2D/train_V.npy")
|
| 188 |
+
# shape: (50, 51, 2, 160, 160) — [samples, timesteps, channels, H, W]
|
| 189 |
+
|
| 190 |
+
# === MHD_64 ===
|
| 191 |
+
with h5py.File("Dataset/MHD_64/data/train/MHD_Ma_0.7_Ms_0.5.hdf5", "r") as f:
|
| 192 |
+
velocity = f["t1_fields/velocity"][:] # (5, 100, 64, 64, 64, 3)
|
| 193 |
+
magnetic = f["t1_fields/magnetic_field"][:] # (5, 100, 64, 64, 64, 3)
|
| 194 |
+
density = f["t0_fields/density"][:] # (5, 100, 64, 64, 64)
|
| 195 |
+
|
| 196 |
+
# === P3D ===
|
| 197 |
+
with h5py.File("Dataset/P3D/sim0_data_train.h5", "r") as f:
|
| 198 |
+
velocity = f["velocity"][:] # (1, 180, 3, 96, 96, 96)
|
| 199 |
+
pressure = f["pressure"][:] # (1, 180, 1, 96, 96, 96)
|
| 200 |
+
```
|
| 201 |
+
|
| 202 |
+
---
|
| 203 |
+
|
| 204 |
+
## Citation
|
| 205 |
+
|
| 206 |
+
If you use these datasets, please cite:
|
| 207 |
+
|
| 208 |
+
```bibtex
|
| 209 |
+
@article{revit2025,
|
| 210 |
+
title={ReViT: Rotationally Equivariant Vision Transformers for PDE Dynamics},
|
| 211 |
+
author={Thuerey Group},
|
| 212 |
+
year={2025}
|
| 213 |
+
}
|
| 214 |
+
```
|
| 215 |
+
|
| 216 |
+
## License
|
| 217 |
+
|
| 218 |
+
This dataset is released under the [MIT License](https://opensource.org/licenses/MIT).
|
| 219 |
+
|
| 220 |
+
## Acknowledgments
|
| 221 |
+
|
| 222 |
+
- **KF2D**: Generated using the [APEBench](https://github.com/Ceyron/apebench) benchmark framework
|
| 223 |
+
- **MHD_64**: Subset from [The Well](https://github.com/PolymathicAI/the_well) benchmark
|
| 224 |
+
- **P3D**: Direct numerical simulation data
|