We test Transolver on practical design tasks. The car design task requires the model to estimate the surrounding wind speed and surface pressure for a driving car.
Relative error of surrounding wind, surface pressure and drag coefficient are recorded, as well as Spearman's rank correlations, which can be used to quantify the model's capability in ranking different designs.
Table 1. Model comparisons of the car design task.
- Install Python 3.8. For convenience, execute the following command.
pip install -r requirements.txtNote: You need to install pytorch_geometric.
- Prepare Data.
The raw data can be found [here], which is provided by Nobuyuki Umetani.
If you find the download button does not work, please directly try this link: http://www.nobuyuki-umetani.com/publication/mlcfd_data.zip
- Train and evaluate model. We provide the experiment scripts under the folder
./scripts/. You can reproduce the experiment results as the following examples:
bash scripts/Transolver.sh # for Training (will take 8-10 hours on one single A100)
bash scripts/Evaluation.sh # for EvaluationNote: You need to change the argument --data_dir and --save_dir to your dataset path. Here data_dir is for the raw data and save_dir is to save the preprocessed data.
If you have already downloaded or generated the preprocecessed data, you can change --preprocessed as True for speed up.
-
Develop your own model. Here are the instructions:
- Add the model file under folder
./models/. - Add the model configuration into
./main.py. - Add a script file under folder
./scripts/and change the argument--model.
- Add the model file under folder
Transolver proposes to learn physical states hidden under the unwieldy meshes.
The following visualization demonstrates that Transolver can successfully learn to ascribe the points under similar physical state to the same slice, such as windshield, license plate and headlight.
Figure 2. Visualization for Transolver learned physical states.
Transolver achieves the best performance in complex geometries and hybrid physics.
Figure 3. Case study of Transolver and other models.
If you find this repo useful, please cite our paper.
@inproceedings{wu2024Transolver,
title={Transolver: A Fast Transformer Solver for PDEs on General Geometries},
author={Haixu Wu and Huakun Luo and Haowen Wang and Jianmin Wang and Mingsheng Long},
booktitle={International Conference on Machine Learning},
year={2024}
}
If you have any questions or want to use the code, please contact wuhx23@mails.tsinghua.edu.cn.
We appreciate the following papers a lot for their valuable code base or datasets:
