This repository contains PyTorch implementations of meshgraphnets for flow around circular cylinder problem on the basic of PyG (pytorch geometric).
The original paper can be found as following:
Pfaff T, Fortunato M, Sanchez-Gonzalez A, et al. Learning mesh-based simulation with graph networks[J]. International Conference on Learning Representations (ICLR), 2021.
Some code of this repository refer to Differentiable Physics-informed Graph Networks.
tqdm==4.62.3
pip install -r requirements.txt
Download cylinder_flow
dataset using the script https://github.com/deepmind/deepmind-research/blob/master/meshgraphnets/download_dataset.sh.
Parse the downloaded dataset into .h5
file using the tool parse_tfrecord.py
Change the dataset_dir
in train.py to your .h5
files.
train the model by run python train.py
.
For test, run rollout.py
, and the result pickle file will be saved at result folder, the you can run the render_results.py to generate result videos that can be saved at videos folder.
Here are some examples, trained on cylinder_flow
dataset.
In addition, we use simulation software to generate new training data. The test results on our data are as following:
:email: jianglx@whu.edu.cn