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:


Supported Neural Solvers

The following neural PDE solvers are supported:

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:

The library also includes the following graph neural network:

  • MeshGraphNet LEARNING MESH-BASED SIMULATION WITH GRAPH NETWORKSICLR 2021 [Code]

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

hf download OneScience-Group/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:

hf download --repo-type dataset OneScience-Group/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

Citations and License

  • Reference repository: Neural-Solver-Library.
  • This repository retains source attribution and has been adapted for automated execution through OneScience and ModelScope.

中文说明

模型概览

CFD_Benchmark 是一个面向神经偏微分方程(PDE)求解器研究的开源深度学习基准库。它扩展了清华大学开源的 Neural-Solver-Library,新增分布式数据并行(DDP)训练支持、模型和数据集,并保留原有的神经算子(neural operator)与物理场建模框架。该库支持神经 PDE 求解器评估、计算流体力学(CFD)深度学习研究、多模型性能比较、大规模分布式训练试验、物理模拟数据集开发及算法基准测试。

该库目前支持以下基准。


支持的神经求解器

支持以下神经 PDE 求解器。

几种视觉架构也可作为结构化几何任务的有效基线。

针对设计任务,库中包含多种成熟的几何深度学习模型。

该库还包含以下图神经网络。

使用场景

使用场景 说明
神经 PDE 求解器评估 通过统一流程训练、推理(inference)并比较 FNO、Transolver、GNOT、ONO 和 U-NO 等模型
自回归物理预测 使用 PDEBench 等数据集逐步预测 PDE 状态随时间的演变
多物理场建模 使用 BubbleML 等数据集研究多相流、多物理场耦合和相变现象
ModelScope/OneCode 运行 下载独立模型包,安装依赖并运行所提供的脚本

使用指南

1. OneCode

通过 OneCode 在线环境体验面向科学的人工智能(AI4S)智能一键编程。

启动 OneCode 以使用一键 AI4S 编程

2. 手动配置

硬件要求

  • 建议使用 GPU 或 DCU。
  • CPU 可用于导入检查和小规模流程验证,完整训练和推理速度较慢。
  • DCU 用户须提前安装 DTK。建议使用 DTK 25.04.2 或更高版本,或使用 OneScience 推荐的适配目标集群的版本。

下载模型包

hf download OneScience-Group/CFD_Benchmark --local-dir ./CFD_Benchmark 
cd CFD_Benchmark 

配置运行环境

DCU 环境

# 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 环境

# 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

训练数据

通过上述基准概览中的数据集链接下载所需数据。

可通过此链接获取来自 [FNO] 和 [geo-FNO] 的六个标准基准数据集。

用于自回归任务基准测试的 PDEBench [NeurIPS 2022 赛道数据集与基准] 可通过此链接获取。

用于工业设计任务的 ShapeNet-Car [TOG 2018] 基准数据集可通过[此链接]获取。

用于研究多物理场相变现象的 BubbleML [多相多物理场数据集] 可通过[此链接]获取。

OneScience 社区也提供用于训练的 cfd_benchmark 数据集。使用以下命令下载,并确认 conf/config.yaml 中的数据路径配置正确。

hf download --repo-type dataset OneScience-Group/cfd_benchmark  --local-dir ./data

训练

python scripts/train.py

模型权重

本仓库将在 weights/ 目录中提供使用 OneScience cfd_benchmark 数据集训练得到的权重。权重即将上传。

推理

python scripts/inference.py

推理加载 paths.weight_path 指定的训练权重,并将指标写入以下位置。

./results/{train.save_name}/metrics.json

OneScience 官方资源

引用与许可证

  • 参考仓库 Neural-Solver-Library。
  • 本仓库保留来源署名,并经过适配,可通过 OneScience 和 ModelScope 自动运行。
Downloads last month
12
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Papers for OneScience-Group/CFD_Benchmark