CFD_Benchmark
Model Overview
CFD_Benchmark is an open-source deep-learning benchmark library for research on neural partial differential equation (PDE) solvers. It extends Tsinghua University's open-source Neural-Solver-Library with Distributed Data Parallel (DDP) training support, additional models, and new datasets, while retaining the original neural-operator and physical-field modeling framework. The library supports neural PDE solver evaluation, deep-learning research for CFD, multi-model performance comparisons, large-scale distributed training experiments, physical simulation dataset development, and algorithm benchmarking.
The library currently supports the following benchmarks:
- Six standard benchmarks from [FNO] and [geo-FNO]
- PDEBench [NeurIPS 2022 Track dataset and benchmark] for autoregressive tasks
- The ShapeNet-Car dataset [TOG 2018] for industrial design benchmarks
- The BubbleML [Multiphase Multiphysics Dataset] for studying multiphysics phase-transition phenomena
Supported Neural Solvers
The following neural PDE solvers are supported:
Transolver - Transolver: A Fast Transformer Solver for PDEs on General Geometries [ICML 2024] [Code]
ONO - Improved Operator Learning by Orthogonal Attention [ICML 2024] [Code]
Factformer - Scalable Transformer for PDE Surrogate Modeling [NeurIPS 2023] [Code]
U-NO - U-NO: U-shaped Neural Operators [TMLR 2023] [Code]
LSM - Solving High-Dimensional PDEs with Latent Spectral Models [ICML 2023] [Code]
GNOT - GNOT: A General Neural Operator Transformer for Operator Learning [ICML 2023] [Code]
F-FNO - Factorized Fourier Neural Operators [ICLR 2023] [Code]
U-FNO - An enhanced Fourier neural operator-based deep-learning model for multiphase flow [Advances in Water Resources 2022] [Code]
Galerkin Transformer - Choose a Transformer: Fourier or Galerkin [NeurIPS 2021] [Code]
MWT - Multiwavelet-based Operator Learning for Differential Equations [NeurIPS 2021] [Code]
FNO - Fourier Neural Operator for Parametric Partial Differential Equations [ICLR 2021] [Code]
Transformer - Attention Is All You Need [NeurIPS 2017] [Code]
GFNO - Group Equivariant Fourier Neural Operators for Partial Differential Equations[2023 Poster][Code]
Several vision architectures also serve as effective baselines for structured-geometry tasks:
- Swin Transformer - Swin Transformer: Hierarchical Vision Transformer using Shifted Windows [ICCV 2021] [Code]
- U-Net - U-Net: Convolutional Networks for Biomedical Image Segmentation [MICCAI 2015] [Code]
Several established geometric deep-learning models are included for design tasks:
- Graph-UNet - Graph U-Nets [ICML 2019] [Code]
- GraphSAGE - Inductive Representation Learning on Large Graphs [NeurIPS 2017] [Code]
- PointNet - PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation [CVPR 2017] [Code]
The library also includes the following graph neural network:
Use Cases
| Use Case | Description |
|---|---|
| Neural PDE solver evaluation | Train, run inference with, and compare models such as FNO, Transolver, GNOT, ONO, and U-NO through a unified workflow |
| Autoregressive physical prediction | Predict the temporal evolution of PDE states step by step using datasets such as PDEBench |
| Multiphysics modeling | Study multiphase flows, multiphysics coupling, and phase-transition phenomena using datasets such as BubbleML |
| ModelScope/OneCode execution | Download the standalone model package, install its dependencies, and run the provided scripts |
Usage
1. OneCode
Use the online OneCode environment for an intelligent, one-click AI for Science (AI4S) programming experience:
Launch OneCode for one-click AI4S programming
2. Manual Setup
Hardware Requirements
- A GPU or DCU is recommended.
- 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
modelscope download --model OneScience/CFD_Benchmark --local_dir ./CFD_Benchmark
cd CFD_Benchmark
Set Up the Runtime Environment
DCU Environment
# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
GPU Environment
# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
Training Data
Use the dataset links in the benchmark overview above to download the required data.
The six standard benchmark datasets from [FNO] and [geo-FNO] are available from this link.
The PDEBench [NeurIPS 2022 Track dataset and benchmark], used for benchmarking autoregressive tasks, is available from this link.
The ShapeNet-Car [TOG 2018] benchmark dataset for industrial design tasks is available from [this link].
The BubbleML [Multiphase Multiphysics Dataset], designed for research on multiphysics phase-transition phenomena, is available from [this link].
The OneScience community also provides the cfd_benchmark dataset for training. Download it with the command below and verify that the data path in conf/config.yaml is configured correctly:
modelscope download --dataset OneScience/cfd_benchmark --local_dir ./data
Training
python scripts/train.py
Model Weights
This repository will provide weights trained on the OneScience cfd_benchmark dataset in the weights/ directory. The weights will be uploaded soon.
Inference
python scripts/inference.py
Inference loads the trained weights referenced by paths.weight_path and writes the metrics to:
./results/{train.save_name}/metrics.json
Official OneScience Resources
| Platform | OneScience Repository | Skills Repository |
|---|---|---|
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
Citations and License
- Reference repository: Neural-Solver-Library.
- This repository retains source attribution and has been adapted for automated execution through OneScience and ModelScope.