Transolver-Airfoil-Design

Model Overview

Transolver-Airfoil-Design is a two-dimensional external-flow prediction model for airfoils, built on Transolver by Tsinghua University's THUML group. It rapidly predicts flow-field distributions and aerodynamic performance around airfoils.

Paper: Transolver: A Fast Transformer Solver for PDEs on General Geometries

Model Description

Transolver-Airfoil-Design uses a Transformer architecture with Physics-Attention and is adapted for training on the unstructured-mesh AirfRANS airfoil dataset. It predicts velocity fields, pressure fields, and drag coefficients for airfoil geometries.

Use Cases

Use Case Description
Airfoil aerodynamic design Rapidly predict two-dimensional external flow around airfoils to screen candidate geometries
Industrial simulation acceleration Accelerate large-scale simulations using PDE surrogate modeling on complex geometries

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/Transolver-Airfoil-Design --local-dir ./Transolver-Airfoil-Design
cd Transolver-Airfoil-Design

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

The OneScience community provides the airfrans dataset for training. Download it with the command below and verify that the data path in config/config.yaml is configured correctly:

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

Training

python scripts/train.py

By default, training saves the following checkpoint:

./weight/Transolver.pth

Model Weights

This repository will provide model weights pretrained on ShapeNetCar data in the weights/ directory. The weights will be uploaded soon.

Inference

python scripts/inference.py

Evaluation and Visualization

python scripts/result.py

Official OneScience Resources

Citations and License


中文说明

模型概述

Transolver-Airfoil-Design 是清华大学 THUML 团队基于 Transolver 构建的翼型二维外流场预测模型,可快速预测翼型周围的流场分布及气动性能。

论文Transolver:面向通用几何形状的快速 Transformer PDE 求解器

模型描述

Transolver-Airfoil-Design 采用带 Physics-Attention 的 Transformer 架构,并适配了使用非结构化网格 AirfRANS 翼型数据集的训练。它预测翼型几何对应的速度场、压力场和阻力系数。

使用场景

使用场景 说明
翼型气动设计 快速预测翼型周围的二维外流场,以筛选候选几何形状
加速工业模拟 使用复杂几何形状上的 PDE 代理模型(surrogate model)加速大规模模拟

使用方法

1. OneCode

通过 OneCode 在线环境体验智能一键式 AI 科学计算(AI4S)编程。

启动 OneCode 体验一键 AI4S 编程

2. 手动配置

硬件要求

  • 建议使用 GPU 或 DCU。
  • 可使用 CPU 进行导入检查和小规模流程验证,完整训练和推理(inference)会较慢。
  • DCU 用户必须提前安装 DTK。建议使用 DTK 25.04.2 或更高版本,或使用 OneScience 为目标集群推荐的版本。

下载模型包

hf download OneScience-Group/Transolver-Airfoil-Design --local-dir ./Transolver-Airfoil-Design
cd Transolver-Airfoil-Design

配置运行环境

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

训练数据

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

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

训练

python scripts/train.py

默认情况下,训练保存以下模型权重(检查点)(checkpoint)。

./weight/Transolver.pth

模型权重

本仓库将在 weights/ 目录中提供在 ShapeNetCar 数据上预训练的模型权重。权重即将上传。

推理

python scripts/inference.py

评估与可视化

python scripts/result.py

OneScience 官方资源

引用与许可证

Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for OneScience-Group/Transolver-Airfoil-Design