--- license: mit pretty_name: Navier-Stokes 2D (ν=1e-3, FNO benchmark) size_categories: - 1K **Intended use:** this dataset is meant to be used for both **training** and **testing / > evaluation** of neural operators and PDE surrogate models. It is shipped as a single pool > of 1200 trajectories; you are expected to split it into train / validation / test subsets > yourself (see [Suggested splits](#suggested-splits) below). ## Summary | Property | Value | |---|---| | Number of samples (N) | 1200 | | Spatial resolution | 64 × 64 | | Time steps (T) | 20 | | Viscosity (ν) | 1e-3 | | Variable | Vorticity `w(x, y, t)` | | `dtype` | `float32` | | Tensor shape | `[1200, 64, 64, 20]` = `[N, X, Y, T]` | | Domain | Unit torus `[0, 1]²` with periodic boundary conditions | | Equation | 2D incompressible Navier-Stokes (vorticity form) | | Total size | ~376 MB (`.pt`) / ~418 MB (Parquet) | ## Dataset structure - **Field:** vorticity `w(x, y, t)`, the scalar curl of the velocity field. - **Axes:** `[N, X, Y, T]` — sample index, x-grid, y-grid, time. - **Grid:** uniform `64 × 64`, periodic on both spatial axes. - **Time:** 20 snapshots per trajectory. - **No labels:** this is an unsupervised / self-supervised spatiotemporal dataset; the "target" is defined by the forecasting task you set up (e.g. predict future steps from past steps). ## Available formats The dataset is published in **two formats**: 1. **Parquet** (`data/`) — directly loadable with the `datasets` library. 2. **Original PyTorch tensor** (`navier_stokes_v1e-3_N1200_T20.pt`) — the unmodified `.pt`. ### Option A — `datasets` (Parquet) ```python from datasets import load_dataset ds = load_dataset("abelsr1710/navier-stokes-2d-fno", split="train") print(ds) # Dataset({ features: ['vorticity'], num_rows: 1200 }) # One sample: nested list -> tensor [64, 64, 20] import torch w = torch.tensor(ds[0]["vorticity"]) print(w.shape) # torch.Size([64, 64, 20]) ``` Work with everything as a single PyTorch tensor: ```python ds.set_format("torch", columns=["vorticity"]) W = ds["vorticity"] # [1200, 64, 64, 20] ``` ### Option B — Original PyTorch tensor (`.pt`) ```python import torch from huggingface_hub import hf_hub_download path = hf_hub_download( "abelsr1710/navier-stokes-2d-fno", "navier_stokes_v1e-3_N1200_T20.pt", repo_type="dataset", ) W = torch.load(path, map_location="cpu") # [1200, 64, 64, 20] float32 ``` ## Suggested splits Since the dataset is a single pool used for both training and evaluation, a common split is: ```python import torch W = torch.load(path, map_location="cpu") # [1200, 64, 64, 20] n_train, n_test = 1000, 200 train, test = W[:n_train], W[n_train:n_train + n_test] ``` ## Typical usage (FNO) To train a neural operator that maps past states to future states, a common recipe uses the first `T_in` steps as input and predicts the remaining steps: ```python T_in, T_out = 10, 10 x = W[..., :T_in] # [N, 64, 64, 10] -> model input y = W[..., T_in:] # [N, 64, 64, 10] -> model target ``` ## Source & generation These trajectories follow the data-generation setup of the original FNO work: a 2D incompressible Navier-Stokes solver in vorticity form on a periodic domain, with viscosity `ν = 1e-3`, random initial conditions, and a fixed forcing term. Snapshots are recorded over 20 time steps on a `64 × 64` grid. See the reference below for the full formulation. ## Citation If you use this dataset, please cite the original FNO work: ```bibtex @inproceedings{li2021fourier, title={Fourier Neural Operator for Parametric Partial Differential Equations}, author={Li, Zongyi and Kovachki, Nikola and Azizzadenesheli, Kamyar and Liu, Burigede and Bhattacharya, Kaushik and Stuart, Andrew and Anandkumar, Anima}, booktitle={International Conference on Learning Representations (ICLR)}, year={2021} } ``` ## License MIT.