Graphs4CFD is a library built upon PyTorch and Pytorch Geometric (PyG) to code and train Graph Neural Networks (GNNs) based solvers for Computational Fluid Dynamics (CFD) applications.
To date, Graphs4CFD supports the following GNN models:
- MuS-GNN - Lino et al. 2022 (https://doi.org/10.1063/5.0097679)
- REMuS-GNN - Lino et al. 2022 (https://doi.org/10.1063/5.0097679)
- Mult-scale GNNs with low-resolution graphs obtained by Guillard's coarsening - Appendix C.3 in Lino et al. 2022 (https://doi.org/10.1063/5.0097679)
Graphs4CFD requires Python 3.7 or higher and a version of PyTorch compatible with your CUDA version. We recomend installing Graphs4CFD and its dependencies in a virtual envioroment, e.g., using Anaconda or Miniconda. To install Graphs4CFD and its dependecies (except PyTorch), run the following commands:
git clone git@github.com:mario-linov/graphs4cfd.git
cd graphs4cfd
pip install -e .
This also installs PyG and compiles and installs PyTorch Cluster, so it may take a while. Once Graphs4CFD has been installed, it can be imported in Python as follows:
import graphs4cfd as gfd
There are examples of how to use Graphs4CFD for training and inference in the examples/ folder.
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
To cite Graphs4CFD, please use the following reference:
Mario Lino, Stathi Fotiadis, Anil A. Bharath, and Chris Cantwell. "Multi-scale rotation-equivariant graph neural networks for unsteady Eulerian fluid dynamics". Physics of Fluids, 34 (2022).
@article{lino2022multi,
author = {Lino, Mario and Fotiadis, Stathi and Bharath, Anil A. and Cantwell, Chris},
title = {{Multi-scale rotation-equivariant graph neural networks for unsteady Eulerian fluid dynamics}},
journal = {Physics of Fluids},
volume = {34},
year = {2022},
url = {https://doi.org/10.1063/5.0097679},
}