FlowBench / README.md
BGLab's picture
Corrections
b9ac8ca verified
metadata
license: cc-by-nc-4.0
language:
  - en
tags:
  - fluid dynamics
size_categories:
  - 10K<n<100K

Overview

Simulating fluid flow around arbitrary shapes is key to solving various engineering problems. However, simulating flow physics across complex geometries remains numerically challenging and computationally resource-intensive, particularly when using conventional PDE solvers. Machine learning methods offer attractive opportunities to create fast and adaptable PDE solvers. However, benchmark datasets to measure the performance of such methods are scarce, especially for flow physics across complex geometries. We introduce FlowBench, a benchmark for neural simulators with over 10K samples, which is larger than any publicly available flow physics dataset. FlowBench contains flow simulation data across complex geometries (parametric vs. non-parametric), spanning a range of flow conditions (Reynolds number and Grashoff number), capturing a diverse array of flow phenomena (steady vs. transient; forced vs. free convection), and for both 2D and 3D. FlowBench contains over 10K data samples, with each sample the outcome of a fully resolved, direct numerical simulation using a well-validated simulator framework designed for modeling transport phenomena in complex geometries. For each sample, we include velocity, pressure, and temperature field data at 3 different resolutions and several summary statistics features of engineering relevance (such as coefficients of lift and drag, and Nusselt numbers).

We envision that FlowBench will enable evaluating the interplay between complex geometry, coupled flow phenomena, and data sufficiency on the performance of current, and future, neural PDE solvers. We enumerate several evaluation metrics to help rank order the performance of current (and future) neural PDE solvers. We benchmark the performance of three baseline methods: Fourier Neural Operators (FNO), Convolutional Neural Operators (CNO), and DeepONets. This dataset will be a valuable resource for evaluating neural PDE solvers that model complex fluid dynamics around 2D and 3D objects.

Dataset Information FlowBench exposes data for four families of datasets:

FPO - Flow Past an Object
Settings : Time dependent problem. We provide 242 snapshots per simulation.
Geometries : harmonics, nurbs, skelneton
Specification : Navier Stokes [2d, resolutions = 1024x256, 512x128]
LDC - Lid Driven Cavity
Geometries : harmonics, nurbs, skelneton
Specification : Navier Stokes [2d, resolutions = 512x512, 256x256, 128x128]
LDC - Lid Driven Cavity
Geometries : Ellipsoids and Toroids
Specification : Navier Stokes [3d, resolution = 128x128x128]
LDC - Lid Driven Cavity
Setting - Constant Reynolds Number
Geometries : harmonics, nurbs, skelneton
Specification : Navier Stokes + Heat Transfer [2d, resolutions = 512x512, 256x256, 128x128]
LDC - Lid Driven Cavity
Setting - Variable Reynolds Number
Geometries : harmonics, nurbs, skelneton
Specification : Navier Stokes + Heat Transfer [2d, resolutions = 512x512, 256x256, 128x128]

For all families of datasets, except FPO, we directly provide the numpy input and output tensors X,Y that can be used by SciML researchers to train their SciML models. Tensor formulae for both X,Y have been described in appendix (section B.2) of our main paper.

For FPO family of datasets, we adopt a slightly different approach. Because we are exposing the full 242 time steps of a simulation, it was more prudent to have the end users prepare their own input and output tensors depending on the time steps they choose. This allows the end users to control the size of the tensors going into their SciML models. Hence we recommend the following approach for accessing the data:

  1. Go to the one of the FPO simulation folders, e.g. FPO_NS_2D_512x128
  2. Choose your geometry, e.g., harmonics
  3. You would notice several directories - these represent the various geometries of the type harmonics.
  4. Under each geometry, the user will find full simulations of three different flow conditions packaged as a *.npz file. Each of these files contains the full simulation across 242 time steps for each of the fields.

License

CC-BY-NC-4.0

Downloading dataset from Huggingface

To run the example code, you need to install the following package:

pip install huggingface_hub

The following script demonstrates how to download a directory from the Hugging Face Hub:

from huggingface_hub import HfApi, hf_hub_download
import os
import shutil

REPO_ID = "BGLab/FlowBench"
DIRECTORY = "LDC_NS_2D"

# Initialize the Hugging Face API
api = HfApi()

# List files in the directory
files_list = api.list_repo_files(repo_id=REPO_ID, repo_type="dataset")

# Filter the files in the specified directory
files_to_download = [f for f in files_list if f.startswith(DIRECTORY)]

# Create local directory if it doesn't exist
os.makedirs(DIRECTORY, exist_ok=True)

# Download each file
for file in files_to_download:
    file_path = hf_hub_download(repo_id=REPO_ID, filename=file, repo_type="dataset")
    # Copy the file to the local directory using shutil.copy2
    shutil.copy2(file_path, os.path.join(DIRECTORY, os.path.basename(file_path)))

print("Files downloaded successfully.")

Directory Structure

main/
β”œβ”€β”€ FPO_NS_2D_1024x256/
β”‚   β”œβ”€β”€ harmonics/
β”‚   β”‚   β”œβ”€β”€ 1/*.npz
β”‚   β”‚   β”œβ”€β”€ 2/*.npz
β”‚   β”‚   β”œβ”€β”€ 3/*.npz
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   └── 100/*.npz
β”‚   β”œβ”€β”€ nurbs/
β”‚   β”‚   β”œβ”€β”€ 1/*.npz
β”‚   β”‚   β”œβ”€β”€ 2/*.npz
β”‚   β”‚   β”œβ”€β”€ 3/*.npz
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   └── 100/*.npz
β”‚   └── skelneton/
β”‚   β”‚   β”œβ”€β”€ 1/*.npz
β”‚   β”‚   β”œβ”€β”€ 2/*.npz
β”‚   β”‚   β”œβ”€β”€ 3/*.npz
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   └── 100/*.npz
β”œβ”€β”€ FPO_NS_2D_1024x256/
β”‚   β”œβ”€β”€ harmonics/
β”‚   β”‚   β”œβ”€β”€ 1/*.npz
β”‚   β”‚   β”œβ”€β”€ 2/*.npz
β”‚   β”‚   β”œβ”€β”€ 3/*.npz
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   └── 100/*.npz
β”‚   β”œβ”€β”€ nurbs/
β”‚   β”‚   β”œβ”€β”€ 1/*.npz
β”‚   β”‚   β”œβ”€β”€ 2/*.npz
β”‚   β”‚   β”œβ”€β”€ 3/*.npz
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   └── 100/*.npz
β”‚   └── skelneton/
β”‚   β”‚   β”œβ”€β”€ 1/*.npz
β”‚   β”‚   β”œβ”€β”€ 2/*.npz
β”‚   β”‚   β”œβ”€β”€ 3/*.npz
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   β”œβ”€β”€ .
β”‚   β”‚   └── 100/*.npz
β”œβ”€β”€ LDC_NSHT_2D_constant-Re/
β”‚   β”œβ”€β”€ 128x128/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”‚   β”œβ”€β”€ 256x256/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”‚   └── 512x512/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”œβ”€β”€ LDC_NSHT_2D_variable-Re/
β”‚   β”œβ”€β”€ 128x128/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”‚   β”œβ”€β”€ 256x256/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”‚   └── 512x512/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”œβ”€β”€ LDC_NS_2D/
β”‚   β”œβ”€β”€ 128x128/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”‚   β”œβ”€β”€ 256x256/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”‚   └── 512x512/
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ harmonics_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_X.npz
β”‚   β”‚   β”œβ”€β”€ nurbs_lid_driven_cavity_Y.npz
β”‚   β”‚   β”œβ”€β”€ skelneton_lid_driven_cavity_X.npz
β”‚   β”‚   └── skelneton_lid_driven_cavity_Y.npz
β”œβ”€β”€ LDC_NS_3D/
β”‚   β”œβ”€β”€ LDC_3D_X.npz
β”‚   β”œβ”€β”€ LDC_3D_Y.npz
β”œβ”€β”€ README.md
β”œβ”€β”€ .gitattributes
β”œβ”€β”€ croissant.json
└── info.txt

Citation If you find this dataset useful in your research, please consider citing our paper as follows:

@article{tali2024flowBench,
        title = "FlowBench: A Large Scale Benchmark for Flow Simulation             over Complex Geometries",
        author = "Tali, Ronak and Rabeh, Ali and Yang, Cheng-Hau and     Shadkhah, Mehdi and Karki, Samundra and Upadhyaya, Abhisek and Dhakshinamoorthy, Suriya and Saadati, Marjan and Sarkar, Soumik and Krishnamurthy, Adarsh and Hegde, Chinmay and Balu, Aditya and Ganapathysubramanian, Baskar"
        year = "2024"
}