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
task_categories:
|
| 4 |
+
- other
|
| 5 |
+
pretty_name: PreGen Navier-Stokes 2D Dataset
|
| 6 |
+
size_categories:
|
| 7 |
+
- 100K<n<1M
|
| 8 |
+
tags:
|
| 9 |
+
- physics
|
| 10 |
+
- fluid-dynamics
|
| 11 |
+
- navier-stokes
|
| 12 |
+
- pde
|
| 13 |
+
- scientific-computing
|
| 14 |
+
- neural-operators
|
| 15 |
+
- foundation-models
|
| 16 |
+
- difficulty-transfer
|
| 17 |
+
- reynolds-number
|
| 18 |
+
- openfoam
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# PreGen Navier-Stokes 2D Dataset
|
| 22 |
+
|
| 23 |
+
## Dataset Description
|
| 24 |
+
|
| 25 |
+
This dataset accompanies the research paper **"Pre-Generating Multi-Difficulty PDE Data For Few-Shot Neural PDE Solvers"** (under review at ICLR 2026). It contains systematically generated 2D incompressible Navier-Stokes fluid flow simulations designed to study **difficulty transfer** in neural PDE solvers.
|
| 26 |
+
|
| 27 |
+
The key insight: by pre-generating many low and medium difficulty examples and including them with a small number of hard examples, neural PDE solvers can learn high-difficulty physics from far fewer samples. This dataset enables **8.9× reduction in compute time** while achieving comparable performance.
|
| 28 |
+
|
| 29 |
+
### Dataset Summary
|
| 30 |
+
|
| 31 |
+
- **Total Size:** ~421 GB
|
| 32 |
+
- **Format:** NumPy arrays (.npy files)
|
| 33 |
+
- **Number of Files:** 9
|
| 34 |
+
- **Simulations per file:** 6,400 trajectories
|
| 35 |
+
- **Timesteps:** 20 per trajectory
|
| 36 |
+
- **Spatial Resolution:** 128 × 128 grid
|
| 37 |
+
- **Solver:** OpenFOAM (icoFoam)
|
| 38 |
+
- **Domain:** 2D Incompressible Navier-Stokes equations
|
| 39 |
+
|
| 40 |
+
### Problem Setting
|
| 41 |
+
|
| 42 |
+
The dataset solves the 2D incompressible Navier-Stokes equations:
|
| 43 |
+
|
| 44 |
+
```
|
| 45 |
+
∂u/∂t + (u · ∇)u + ∇p = ν∆u
|
| 46 |
+
∇ · u = 0
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
where:
|
| 50 |
+
- `u(x,t)` is the velocity field
|
| 51 |
+
- `p(x,t)` is the kinematic pressure
|
| 52 |
+
- `ν` is the kinematic viscosity (1.5 × 10⁻⁵ m²/s)
|
| 53 |
+
- Domain: Ω ⊂ [0,1]²
|
| 54 |
+
|
| 55 |
+
## Difficulty Axes
|
| 56 |
+
|
| 57 |
+
The dataset systematically varies complexity along three axes:
|
| 58 |
+
|
| 59 |
+
### 1. **Geometry Axis** (Number of Obstacles)
|
| 60 |
+
Simulations in flow-past-object (FPO) configuration with varying obstacle complexity:
|
| 61 |
+
|
| 62 |
+
- **Easy:** No obstacles (open channel flow)
|
| 63 |
+
- **Medium:** Single square obstacle
|
| 64 |
+
- **Hard:** 2-10 randomly placed square obstacles
|
| 65 |
+
|
| 66 |
+
**Files:**
|
| 67 |
+
- `Geometry_Axis/FPO_Geometry_Easy_NoObstacle.npy` (47 GB)
|
| 68 |
+
- `Geometry_Axis/FPO_Geometry_Medium_SingleObstacle.npy` (47 GB)
|
| 69 |
+
- `Geometry_Axis/FPO_Geometry_Hard_MultiObstacle.npy` (47 GB)
|
| 70 |
+
|
| 71 |
+
### 2. **Physics Axis** (Reynolds Number)
|
| 72 |
+
Simulations with varying flow complexity via Reynolds number:
|
| 73 |
+
|
| 74 |
+
**Multi-Obstacle Flows:**
|
| 75 |
+
- **Easy:** Re ∈ [100, 1000] - laminar regime
|
| 76 |
+
- **Medium:** Re ∈ [2000, 4000] - transitional regime
|
| 77 |
+
- **Hard:** Re ∈ [8000, 10000] - turbulent regime
|
| 78 |
+
|
| 79 |
+
**Files:**
|
| 80 |
+
- `Physics_Axis/MultiObstacle/FPO_Physics_MultiObstacle_Easy_Re100-1000.npy` (47 GB)
|
| 81 |
+
- `Physics_Axis/MultiObstacle/FPO_Physics_MultiObstacle_Medium_Re2000-4000.npy` (47 GB)
|
| 82 |
+
- `Physics_Axis/MultiObstacle/FPO_Physics_MultiObstacle_Hard_Re8000-10000.npy` (47 GB)
|
| 83 |
+
|
| 84 |
+
**No-Obstacle Flows:**
|
| 85 |
+
- `Physics_Axis/NoObstacle/FPO_Physics_NoObstacle_Easy_Re100-1000.npy` (47 GB)
|
| 86 |
+
|
| 87 |
+
### 3. **Combined Axis** (Geometry + Physics)
|
| 88 |
+
Combined variations in both geometry and Reynolds number:
|
| 89 |
+
|
| 90 |
+
- **Easy:** No obstacles + low Re ([100, 1000])
|
| 91 |
+
- **Medium:** Single obstacle + medium Re ([2000, 4000])
|
| 92 |
+
- **Hard:** Multiple obstacles + high Re ([8000, 10000])
|
| 93 |
+
|
| 94 |
+
**File:**
|
| 95 |
+
- `Combined_Axis/FPO_Combined_Medium_SingleObstacle_MedRe.npy` (47 GB)
|
| 96 |
+
|
| 97 |
+
### 4. **Special Configuration**
|
| 98 |
+
- `Special/FPO_Cylinder_Hole_Location_6284.npy` (47 GB) - Cylinder with hole at specific location
|
| 99 |
+
|
| 100 |
+
## Data Format
|
| 101 |
+
|
| 102 |
+
Each `.npy` file contains a NumPy array with shape: `(6400, 20, 128, 128, 6)`
|
| 103 |
+
|
| 104 |
+
**Dimensions:**
|
| 105 |
+
- **6400**: Number of simulation trajectories
|
| 106 |
+
- **20**: Timesteps per trajectory
|
| 107 |
+
- **128 × 128**: Spatial grid resolution
|
| 108 |
+
- **6**: Channels (features)
|
| 109 |
+
|
| 110 |
+
**Channels (in order):**
|
| 111 |
+
1. **u** - Horizontal velocity component (m/s)
|
| 112 |
+
2. **v** - Vertical velocity component (m/s)
|
| 113 |
+
3. **p** - Kinematic pressure (m²/s²)
|
| 114 |
+
4. **Re_normalized** - Normalized Reynolds number
|
| 115 |
+
5. **Binary mask** - Geometry encoding (1 = obstacle, 0 = fluid)
|
| 116 |
+
6. **SDF** - Signed distance field to nearest obstacle boundary
|
| 117 |
+
|
| 118 |
+
## Simulation Details
|
| 119 |
+
|
| 120 |
+
### Boundary Conditions
|
| 121 |
+
|
| 122 |
+
**Flow Past Object (FPO):**
|
| 123 |
+
- **Left (inlet):** Parabolic velocity profile with peak velocity Umax
|
| 124 |
+
- **Right (outlet):** Zero-gradient pressure outlet
|
| 125 |
+
- **Top/Bottom:** No-slip walls (u = 0)
|
| 126 |
+
- **Obstacles:** No-slip walls (u = 0)
|
| 127 |
+
|
| 128 |
+
### Reynolds Number Sampling
|
| 129 |
+
Re is sampled from a truncated Gaussian distribution N(5000, 2000²) with support [100, 10000]. The inlet velocity is scaled to achieve the target Re:
|
| 130 |
+
|
| 131 |
+
```
|
| 132 |
+
Re = (U_avg × L) / ν
|
| 133 |
+
U_avg = (2/3) × U_max
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
### Time Integration
|
| 137 |
+
- **Scheme:** Backward Euler (1st order implicit)
|
| 138 |
+
- **Spatial discretization:** Finite volume method
|
| 139 |
+
- **Gradient terms:** Gauss linear (central differencing)
|
| 140 |
+
- **Convection:** Gauss linearUpwind with gradient reconstruction
|
| 141 |
+
- **Diffusion:** Gauss linear orthogonal
|
| 142 |
+
|
| 143 |
+
### Simulation Duration
|
| 144 |
+
Adaptive time scheduling based on Reynolds number to ensure flow development:
|
| 145 |
+
- **Low Re (10-100):** Fixed 2700s
|
| 146 |
+
- **Medium Re (100-1000):** 1-10× characteristic diffusion time
|
| 147 |
+
- **High Re (1000-10000):** 10-40× characteristic diffusion time
|
| 148 |
+
|
| 149 |
+
### Computational Cost
|
| 150 |
+
The harder the simulation, the more expensive to generate:
|
| 151 |
+
|
| 152 |
+
| Configuration | Average Time (seconds) |
|
| 153 |
+
|--------------|----------------------|
|
| 154 |
+
| No obstacle, Low Re | 176.7 |
|
| 155 |
+
| No obstacle, Medium Re | 261.1 |
|
| 156 |
+
| No obstacle, High Re | 350.4 |
|
| 157 |
+
| One obstacle, Low Re | 609.5 |
|
| 158 |
+
| One obstacle, Medium Re | 731.1 |
|
| 159 |
+
| One obstacle, High Re | 942.8 |
|
| 160 |
+
| Multiple obstacles, Low Re | 1550.9 |
|
| 161 |
+
| Multiple obstacles, Medium Re | 1599.2 |
|
| 162 |
+
| Multiple obstacles, High Re | 1653.3 |
|
| 163 |
+
|
| 164 |
+
## Key Research Findings
|
| 165 |
+
|
| 166 |
+
This dataset was specifically designed to study **difficulty transfer** in neural PDE solvers:
|
| 167 |
+
|
| 168 |
+
1. **Sample Efficiency**: Training on 10% hard data + 90% easy/medium data recovers ~96-98% of the performance of training on 100% hard data
|
| 169 |
+
|
| 170 |
+
2. **Compute Efficiency**: By mixing difficulties optimally, you can achieve the same error with **8.9× less compute** spent on data generation
|
| 171 |
+
|
| 172 |
+
3. **Medium > Easy**: For most budgets, generating fewer medium-difficulty examples outperforms generating more easy examples
|
| 173 |
+
|
| 174 |
+
4. **Foundation Dataset Potential**: Medium-difficulty data (single obstacle) improves few-shot performance on complex geometries (NURBS shapes from FlowBench)
|
| 175 |
+
|
| 176 |
+
## Usage
|
| 177 |
+
|
| 178 |
+
### Basic Loading
|
| 179 |
+
|
| 180 |
+
```python
|
| 181 |
+
import numpy as np
|
| 182 |
+
from huggingface_hub import hf_hub_download
|
| 183 |
+
|
| 184 |
+
# Download a specific difficulty level
|
| 185 |
+
file_path = hf_hub_download(
|
| 186 |
+
repo_id="sage-lab/PreGen-NavierStokes-2D",
|
| 187 |
+
filename="Geometry_Axis/FPO_Geometry_Easy_NoObstacle.npy",
|
| 188 |
+
repo_type="dataset"
|
| 189 |
+
)
|
| 190 |
+
|
| 191 |
+
# Load the data
|
| 192 |
+
data = np.load(file_path)
|
| 193 |
+
print(f"Data shape: {data.shape}") # (6400, 20, 128, 128, 6)
|
| 194 |
+
|
| 195 |
+
# Extract individual trajectories
|
| 196 |
+
trajectory_0 = data[0] # Shape: (20, 128, 128, 6)
|
| 197 |
+
|
| 198 |
+
# Extract velocity and pressure
|
| 199 |
+
u = trajectory_0[:, :, :, 0] # Horizontal velocity
|
| 200 |
+
v = trajectory_0[:, :, :, 1] # Vertical velocity
|
| 201 |
+
p = trajectory_0[:, :, :, 2] # Pressure
|
| 202 |
+
mask = trajectory_0[:, :, :, 4] # Binary geometry mask
|
| 203 |
+
sdf = trajectory_0[:, :, :, 5] # Signed distance field
|
| 204 |
+
```
|
| 205 |
+
|
| 206 |
+
### Difficulty Mixing for Training
|
| 207 |
+
|
| 208 |
+
```python
|
| 209 |
+
import numpy as np
|
| 210 |
+
from huggingface_hub import hf_hub_download
|
| 211 |
+
|
| 212 |
+
# Load different difficulty levels
|
| 213 |
+
easy_data = np.load(hf_hub_download(
|
| 214 |
+
repo_id="sage-lab/PreGen-NavierStokes-2D",
|
| 215 |
+
filename="Geometry_Axis/FPO_Geometry_Easy_NoObstacle.npy",
|
| 216 |
+
repo_type="dataset"
|
| 217 |
+
))
|
| 218 |
+
|
| 219 |
+
medium_data = np.load(hf_hub_download(
|
| 220 |
+
repo_id="sage-lab/PreGen-NavierStokes-2D",
|
| 221 |
+
filename="Geometry_Axis/FPO_Geometry_Medium_SingleObstacle.npy",
|
| 222 |
+
repo_type="dataset"
|
| 223 |
+
))
|
| 224 |
+
|
| 225 |
+
hard_data = np.load(hf_hub_download(
|
| 226 |
+
repo_id="sage-lab/PreGen-NavierStokes-2D",
|
| 227 |
+
filename="Geometry_Axis/FPO_Geometry_Hard_MultiObstacle.npy",
|
| 228 |
+
repo_type="dataset"
|
| 229 |
+
))
|
| 230 |
+
|
| 231 |
+
# Recommended: Use 10% hard + 90% medium for cost-effective training
|
| 232 |
+
n_hard = 80
|
| 233 |
+
n_medium = 720
|
| 234 |
+
|
| 235 |
+
train_data = np.concatenate([
|
| 236 |
+
hard_data[:n_hard],
|
| 237 |
+
medium_data[:n_medium]
|
| 238 |
+
], axis=0)
|
| 239 |
+
|
| 240 |
+
# Hold out 100 hard examples for testing
|
| 241 |
+
test_data = hard_data[-100:]
|
| 242 |
+
```
|
| 243 |
+
|
| 244 |
+
### Computing Metrics
|
| 245 |
+
|
| 246 |
+
```python
|
| 247 |
+
def compute_nmae(y_true, y_pred):
|
| 248 |
+
"""
|
| 249 |
+
Compute normalized Mean Absolute Error (nMAE)
|
| 250 |
+
as used in the paper.
|
| 251 |
+
|
| 252 |
+
Args:
|
| 253 |
+
y_true: Ground truth, shape (N, T, H, W, C)
|
| 254 |
+
y_pred: Predictions, shape (N, T, H, W, C)
|
| 255 |
+
|
| 256 |
+
Returns:
|
| 257 |
+
nMAE: Normalized mean absolute error
|
| 258 |
+
"""
|
| 259 |
+
numerator = np.abs(y_true - y_pred).sum()
|
| 260 |
+
denominator = np.abs(y_true).sum()
|
| 261 |
+
return numerator / (denominator + 1e-10)
|
| 262 |
+
```
|
| 263 |
+
|
| 264 |
+
## Tested Models
|
| 265 |
+
|
| 266 |
+
The paper evaluates this dataset on:
|
| 267 |
+
|
| 268 |
+
### Supervised Neural Operators (trained from scratch)
|
| 269 |
+
- **CNO** (Convolutional Neural Operator) - 18M parameters
|
| 270 |
+
- **F-FNO** (Factorized Fourier Neural Operator) - 5-layer
|
| 271 |
+
|
| 272 |
+
### Foundation Models (fine-tuned)
|
| 273 |
+
- **Poseidon-T** (Tiny) - 21M parameters
|
| 274 |
+
- **Poseidon-B** (Base) - 158M parameters
|
| 275 |
+
- **Poseidon-L** (Large) - 629M parameters
|
| 276 |
+
|
| 277 |
+
All models are trained autoregressively with one-step-ahead prediction (t → t+1) using relative L1 loss.
|
| 278 |
+
|
| 279 |
+
## Citation
|
| 280 |
+
|
| 281 |
+
If you use this dataset, please cite:
|
| 282 |
+
|
| 283 |
+
```bibtex
|
| 284 |
+
@inproceedings{pregen2026,
|
| 285 |
+
title={Pre-Generating Multi-Difficulty {PDE} Data For Few-Shot Neural {PDE} Solvers},
|
| 286 |
+
author={Anonymous},
|
| 287 |
+
booktitle={Under review at International Conference on Learning Representations (ICLR)},
|
| 288 |
+
year={2026},
|
| 289 |
+
url={https://openreview.net}
|
| 290 |
+
}
|
| 291 |
+
```
|
| 292 |
+
|
| 293 |
+
**Note:** Citation will be updated once the paper is published.
|
| 294 |
+
|
| 295 |
+
## Related Datasets
|
| 296 |
+
|
| 297 |
+
- **The Well** - Large-scale multi-physics PDE dataset
|
| 298 |
+
- **PDEBench** - Benchmark for scientific machine learning
|
| 299 |
+
- **FlowBench** - Flow simulation over complex geometries (NURBS shapes)
|
| 300 |
+
|
| 301 |
+
## License
|
| 302 |
+
|
| 303 |
+
MIT License
|
| 304 |
+
|
| 305 |
+
## Acknowledgments
|
| 306 |
+
|
| 307 |
+
This dataset was generated using:
|
| 308 |
+
- **OpenFOAM** (v2406) for CFD simulations
|
| 309 |
+
- Simulations performed on computational clusters
|
| 310 |
+
- Total compute time: Several thousand GPU/CPU hours
|
| 311 |
+
|
| 312 |
+
## Contact
|
| 313 |
+
|
| 314 |
+
For questions or issues:
|
| 315 |
+
- Open an issue in the dataset repository
|
| 316 |
+
- Contact the sage-lab organization on Hugging Face
|
| 317 |
+
- See the paper for additional contact information (once published)
|
| 318 |
+
|
| 319 |
+
## Dataset Maintainers
|
| 320 |
+
|
| 321 |
+
sage-lab organization
|
| 322 |
+
|
| 323 |
+
---
|
| 324 |
+
|
| 325 |
+
**Dataset Version:** 1.0
|
| 326 |
+
**Last Updated:** 2024
|
| 327 |
+
**Status:** Research dataset under peer review
|