Skip to content

Laminar flow prediction using graph neural networks

License

Notifications You must be signed in to change notification settings

WangyanFR/gnn_laminar_flow

 
 

Repository files navigation

gnn_laminar_flow

A project concerned with the prediction of laminar velocity and pressure fields from an input shape using graph neural network architectures. If you exploit this work for your own research, please consider citing the article or the pre-print. This work was produced during the PhD thesis of J. Chen.

The proposed graph convolutional neural network works on triangular meshes, taking the coordinates of nodes and the binary encoding of the solid surface as inputs, and predicts velocity and pressure fields around random 2D shapes at a low Reynolds number. Compared to U-nets, the graph models have higher accuracy and requires fewer trainable parameters, but require an extended training time. In particular, it allows a particularly good resolution of the boundary layer.

The dataset contains 2000 random 2D obstacles, together with their laminar velocity and pressure fields, and is available upon request to the authors. It was also used in the following articles:

Structure of the repository

  • dataset_utils : functions concerning the data
  • network_utils : functions and classes concerning the convolutional blocks and network architecture
  • params : directions, network hyper-parameters etc..
  • predict : get the flow prediction and drag force of a cylinder or a NACA0012 airfoil
  • predict_testset: get the flow prediction and drag force of all the shapes in the test set
  • training : the main function for training a neural network
  • training_utils : functions used for custom training loops
  • best_model : save model parameters during the training process

Training the model

To train a model, first install the required packages in a dedicated virtual environment, then run python3 training.py. Network hyper-parameters can be configured in params.py, while the architecture is described in network_utils.py. Below is a result sample from the article.

About

Laminar flow prediction using graph neural networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%