--- license: mit task_categories: - other pretty_name: PreGen Navier-Stokes 2D Dataset size_categories: - 100K Easy**: For most budgets, generating fewer medium-difficulty examples outperforms generating more easy examples 4. **Foundation Dataset Potential**: Medium-difficulty data (single obstacle) improves few-shot performance on complex geometries (NURBS shapes from FlowBench) ## Usage ### Basic Loading ```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 ``` ### Difficulty Mixing for Training ```python import numpy as np from huggingface_hub import hf_hub_download # Load different difficulty levels easy_data = np.load(hf_hub_download( repo_id="sage-lab/PreGen-NavierStokes-2D", filename="Geometry_Axis/FPO_Geometry_Easy_NoObstacle.npy", repo_type="dataset" )) medium_data = np.load(hf_hub_download( repo_id="sage-lab/PreGen-NavierStokes-2D", filename="Geometry_Axis/FPO_Geometry_Medium_SingleObstacle.npy", repo_type="dataset" )) hard_data = np.load(hf_hub_download( repo_id="sage-lab/PreGen-NavierStokes-2D", filename="Geometry_Axis/FPO_Geometry_Hard_MultiObstacle.npy", repo_type="dataset" )) # Recommended: Use 10% hard + 90% medium for cost-effective training n_hard = 80 n_medium = 720 train_data = np.concatenate([ hard_data[:n_hard], medium_data[:n_medium] ], axis=0) # Hold out 100 hard examples for testing test_data = hard_data[-100:] ``` ### Computing Metrics ```python def compute_nmae(y_true, y_pred): """ Compute normalized Mean Absolute Error (nMAE) as used in the paper. Args: y_true: Ground truth, shape (N, T, H, W, C) y_pred: Predictions, shape (N, T, H, W, C) Returns: nMAE: Normalized mean absolute error """ numerator = np.abs(y_true - y_pred).sum() denominator = np.abs(y_true).sum() return numerator / (denominator + 1e-10) ``` ## Tested Models The paper evaluates this dataset on: ### Supervised Neural Operators (trained from scratch) - **CNO** (Convolutional Neural Operator) - 18M parameters - **F-FNO** (Factorized Fourier Neural Operator) - 5-layer ### Foundation Models (fine-tuned) - **Poseidon-T** (Tiny) - 21M parameters - **Poseidon-B** (Base) - 158M parameters - **Poseidon-L** (Large) - 629M parameters All models are trained autoregressively with one-step-ahead prediction (t → t+1) using relative L1 loss. ## Citation If you use this dataset, please cite: ```bibtex @inproceedings{pregen2026, title={Pre-Generating Multi-Difficulty {PDE} Data For Few-Shot Neural {PDE} Solvers}, author={Anonymous}, booktitle={Under review at International Conference on Learning Representations (ICLR)}, year={2026}, url={https://openreview.net} } ``` **Note:** Citation will be updated once the paper is published. ## Related Datasets - **The Well** - Large-scale multi-physics PDE dataset - **PDEBench** - Benchmark for scientific machine learning - **FlowBench** - Flow simulation over complex geometries (NURBS shapes) ## License MIT License ## Acknowledgments This dataset was generated using: - **OpenFOAM** (v2406) for CFD simulations - Simulations performed on computational clusters - Total compute time: Several thousand GPU/CPU hours ## Contact For questions or issues: - Open an issue in the dataset repository - Contact the sage-lab organization on Hugging Face - See the paper for additional contact information (once published) ## Dataset Maintainers sage-lab organization --- **Dataset Version:** 1.0 **Last Updated:** 2024 **Status:** Research dataset under peer review