Skip to content

Litianyu141/Gen-FVGN-steady

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gen-FVGN-steady

A fully differentiable GNN-based PDE Solver: With Applications to Poisson and Navier-Stokes Equations[Arxiv]
(This repository is an earlier version developed internally and was developed in the Ubuntu 20.04 version of WSL.)

Highlights

This code could solve multiple unstructured grids, multiple boundary conditions, multiple source terms, multiple PDEs in A single model without pre-computed data!

Abstract

In this study, we present a novel computational framework that integrates the finite volume method with graph neural networks to address the challenges in Physics-Informed Neural Networks(PINNs). Our approach leverages the flexibility of graph neural networks to adapt to various types of two-dimensional unstructured grids, enhancing the model's applicability across different physical equations and boundary conditions. The core innovation lies in the development of an unsupervised training algorithm that utilizes GPU parallel computing to implement a fully differentiable finite volume method discretization process. This method includes differentiable integral and gradient reconstruction algorithms, enabling the model to directly solve partial-differential equations(PDEs) during training without the need for pre-computed data. Our results demonstrate the model's superior mesh generalization and its capability to handle multiple boundary conditions simultaneously, significantly boosting its generalization capabilities. The proposed method not only shows potential for extensive applications in CFD but also establishes a new paradigm for integrating traditional numerical methods with deep learning technologies, offering a robust platform for solving complex physical problems.

Env

We have directly provided a conda environment package that supports both FVGN and MGN simultaneously(download:[BaiduNetdisk]). All you need to do is download and unzip it to the "/path/miniconda3/envs/" directory (note that the new folder's name must be FVGN-pt2.1). Then, run the command

conda env list

to check if the environment has been successfully imported.

Used grids

1.convert comsol grids or tecplot grids to Gen-FVGN supported format(and you can generate you own new mesh) set dataset path at parse_comsol.py, then run

python src/Extract_mesh/parse_comsol.py

2.set converted dataset/tf at src/run_train.sh, the run

sh src/run_train.sh

and you can set other params in run_train.sh. you can find more params instruction insrc/utils/get_param.py

Notice

If you are using the latest version vscode, we do not suggest use debuging mode to run src/Extract_mesh/parse_comsol.py. If you are trying to debug it, you have to decomment specific lines in src/Extract_mesh/parse_comsol.py. And make sure you activated conda env in the terminal!!!!!. Latest vscode allows you run specific conda env without activation, and it will cause exception in src/Extract_mesh/parse_comsol.py!

This code supports the .mphtxt meshes generated by COMSOL and the 2D polygonal meshes exported from Tecplot. We provide sample meshes [BaiduNetdisk]. You just need to place the path of the generated mesh into the parse_comsol.py file and run this file to convert the aforementioned meshes into the data format supported by Gen-FVGN.

Usage Method

The specific usage instructions for this repository are currently being prepared. All algorithms related to FVM are contained within the Integrator class in the model.py file.

License

Feel free to clone this repository and modify it! If it's of good use for you, give it a star and please cite our publications!

About

A GNN-based PDE solver without pre-computed data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published