CFDBench is a large-scale benchmark developed by researchers at Tsinghua University to evaluate machine-learning methods for computational fluid dynamics. It focuses on model generalization across different boundary conditions, fluid properties, and geometric configurations.
CFDBench is built from several representative computational fluid dynamics datasets spanning diverse boundary conditions, fluid properties, and geometries. It evaluates both flow-field prediction performance and the generalization capabilities of machine-learning methods.
Use Cases
Use Case
Description
CFD surrogate benchmarking
Compare the flow-field prediction capabilities of neural operators and other deep-learning models using consistent data splits and metrics
Autoregressive flow evolution
Predict subsequent two-dimensional velocity fields step by step from the current grid-based field and assess error accumulation over multiple steps
Non-autoregressive field queries
Predict velocity directly at target locations from operating parameters and spatiotemporal coordinates, enabling evaluation over long time horizons
Supported Models
Type
root.model.name
Training Entry Point
Non-autoregressive
ffn
python scripts/train.py
Non-autoregressive
deeponet
python scripts/train.py
Autoregressive
auto_ffn
python scripts/train_auto.py
Autoregressive
auto_deeponet
python scripts/train_auto.py
Autoregressive
auto_edeeponet
python scripts/train_auto.py
Autoregressive
auto_deeponet_cnn
python scripts/train_auto.py
Autoregressive
resnet
python scripts/train_auto.py
Autoregressive
unet
python scripts/train_auto.py
Autoregressive
fno
python scripts/train_auto.py
Usage
1. OneCode
Use the online OneCode environment for an intelligent, one-click AI for Science (AI4S) programming experience:
A CPU can be used for import checks and small-scale pipeline validation, but full training and inference will be slow.
DCU users must install DTK in advance. DTK 25.04.2 or later, or the OneScience-recommended version for the target cluster, is recommended.
Download the Model Package
hf download OneScience-Group/CFDBench --local-dir ./CFDBench
cd CFDBench
Set Up the Runtime Environment
DCU Environment
bash
1# Activate DTK and Conda first2conda create -n onescience311 python=3.11 -y
3conda activate onescience311
4# Installation with uv is also supported5pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
GPU Environment
bash
1# Activate Conda first2conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=123conda activate onescience311
4# Installation with uv is also supported5pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
Training Data
The OneScience community provides the cfdbench dataset for training. Download it with the command below and verify that the data path in config/config.yaml is configured correctly:
This repository retains source attribution and has been adapted for automated execution through OneScience and ModelScope. Before public redistribution, verify the applicable licensing requirements of the upstream project.