license: apache-2.0
language:
- en
tags:
- OneScience
- fluid dynamics
- airfoil aerodynamic prediction
frameworks: PyTorch
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
modelscope download --model OneScience/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:
modelscope download --dataset OneScience/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
| 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
- Original Transolver paper: Transolver: A Fast Transformer Solver for PDEs on General Geometries.
- This repository retains source attribution and has been adapted for automated execution through OneScience and ModelScope.