Ved100's picture
Update dataset card: Add paper, project page, code links, and update citation (#1)
94de5e6
---
license: mit
size_categories:
- 100K<n<1M
task_categories:
- other
pretty_name: PreGen Navier-Stokes 2D Dataset
tags:
- physics
- fluid-dynamics
- navier-stokes
- pde
- scientific-computing
- neural-operators
- foundation-models
- difficulty-transfer
- reynolds-number
- openfoam
language:
- en
---
# PreGen Navier-Stokes 2D Dataset
[Paper](https://huggingface.co/papers/2512.00564) | [Project Page](https://naman-choudhary-ai-ml.github.io/pde-difficulty-transfer/) | [Code](https://github.com/Naman-Choudhary-AI-ML/pregenerating-pde)
## Dataset Description
This dataset accompanies the research paper **[Pre-Generating Multi-Difficulty PDE Data For Few-Shot Neural PDE Solvers](https://huggingface.co/papers/2512.00564)** (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.
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.
### Dataset Summary
- **Format:** NumPy arrays (.npy files)
- **Number of Files:** 9
- **Simulations per file:** 6,400 trajectories
- **Timesteps:** 20 per trajectory
- **Spatial Resolution:** 128 × 128 grid
- **Solver:** OpenFOAM (icoFoam)
- **Domain:** 2D Incompressible Navier-Stokes equations
## Difficulty Axes
The dataset systematically varies complexity along three axes:
### 1. **Geometry Axis** (Number of Obstacles)
Simulations in flow-past-object (FPO) configuration with varying obstacle complexity:
- **Easy:** No obstacles (open channel flow)
- **Medium:** Single square obstacle
- **Hard:** 2-10 randomly placed square obstacles
**Files:**
- `Geometry_Axis/FPO_Geometry_Easy_NoObstacle.npy` (47 GB)
- `Geometry_Axis/FPO_Geometry_Medium_SingleObstacle.npy` (47 GB)
- `Geometry_Axis/FPO_Geometry_Hard_MultiObstacle.npy` (47 GB)
### 2. **Physics Axis** (Reynolds Number)
Simulations with varying flow complexity via Reynolds number:
**Multi-Obstacle Flows:**
- **Easy:** Re ∈ [100, 1000] - laminar regime
- **Medium:** Re ∈ [2000, 4000] - transitional regime
- **Hard:** Re ∈ [8000, 10000] - turbulent regime
**Files:**
- `Physics_Axis/MultiObstacle/FPO_Physics_MultiObstacle_Easy_Re100-1000.npy` (47 GB)
- `Physics_Axis/MultiObstacle/FPO_Physics_MultiObstacle_Medium_Re2000-4000.npy` (47 GB)
- `Physics_Axis/MultiObstacle/FPO_Physics_MultiObstacle_Hard_Re8000-10000.npy` (47 GB)
**No-Obstacle Flows:**
- `Physics_Axis/NoObstacle/FPO_Physics_NoObstacle_Easy_Re100-1000.npy` (47 GB)
### 3. **Combined Axis** (Geometry + Physics)
Combined variations in both geometry and Reynolds number:
- **Easy:** No obstacles + low Re ([100, 1000])
- **Medium:** Single obstacle + medium Re ([2000, 4000])
- **Hard:** Multiple obstacles + high Re ([8000, 10000])
**File:**
- `Combined_Axis/FPO_Combined_Medium_SingleObstacle_MedRe.npy` (47 GB)
### 4. **Special Configuration**
- `Special/FPO_Cylinder_Hole_Location_6284.npy` (47 GB) - Cylinder with hole at specific location
## Data Format
Each `.npy` file contains a NumPy array with shape: `(6400, 20, 128, 128, 6)`
**Dimensions:**
- **6400**: Number of simulation trajectories
- **20**: Timesteps per trajectory
- **128 × 128**: Spatial grid resolution
- **6**: Channels (features)
**Channels (in order):**
1. **u** - Horizontal velocity component (m/s)
2. **v** - Vertical velocity component (m/s)
3. **p** - Kinematic pressure (m²/s²)
4. **Re_normalized** - Normalized Reynolds number
5. **Binary mask** - Geometry encoding (1 = obstacle, 0 = fluid)
6. **SDF** - Signed distance field to nearest obstacle boundary
## Usage
```python
import numpy as np
from huggingface_hub import hf_hub_download
# Download a specific difficulty level
file_path = hf_hub_download(
repo_id="sage-lab/PreGen-NavierStokes-2D",
filename="Geometry_Axis/FPO_Geometry_Easy_NoObstacle.npy",
repo_type="dataset"
)
# Load the data
data = np.load(file_path)
print(f"Data shape: {data.shape}") # (6400, 20, 128, 128, 6)
# Extract individual trajectories
trajectory_0 = data[0] # Shape: (20, 128, 128, 6)
# Extract velocity and pressure
u = trajectory_0[:, :, :, 0] # Horizontal velocity
v = trajectory_0[:, :, :, 1] # Vertical velocity
p = trajectory_0[:, :, :, 2] # Pressure
mask = trajectory_0[:, :, :, 4] # Binary geometry mask
sdf = trajectory_0[:, :, :, 5] # Signed distance field
```
## Citation
If you use this dataset, please cite:
```bibtex
@article{pregen2025,
title={Pre-Generating Multi-Difficulty PDE Data For Few-Shot Neural PDE Solvers},
author={Choudhary, Naman and Singh, Vedant and Talwalkar, Ameet and Boffi, Nicholas Matthew and Khodak, Mikhail and Marwah, Tanya},
journal={arXiv preprint},
year={2025},
url={https://huggingface.co/papers/2512.00564}
}
```
## License
MIT License
---
**Dataset Version:** 1.0
**Last Updated:** 2024
**Status:** Research dataset under peer review