Graph neural networks for laminar flow prediction around random 2D shapes

Junfeng Chen,Elie Hachem,Jonathan Viquerat
DOI: https://doi.org/10.1063/5.0064108
2021-10-01
Abstract:In the recent years, the domain of fast flow field prediction has been vastly dominated by pixel-based convolutional neural networks. Yet, the recent advent of graph convolutional neural networks (GCNNs) have attracted a considerable attention in the computational fluid dynamics (CFD) community. In this contribution, we proposed a GCNN structure as a surrogate model for laminar flow prediction around 2D obstacles. Unlike traditional convolution on image pixels, the graph convolution can be directly applied on body-fitted triangular meshes, hence yielding an easy coupling with CFD solvers. The proposed GCNN model is trained over a data set composed of CFD-computed laminar flows around 2,000 random 2D shapes. Accuracy levels are assessed on reconstructed velocity and pressure fields around out-of-training obstacles, and are compared with that of standard U-net architectures, especially in the boundary layer area.
Fluid Dynamics,Computational Physics
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to solve the problem of laminar flow prediction around two - dimensional random shapes. Specifically, the authors propose a surrogate model based on Graph Convolutional Neural Networks (GCNN) for laminar flow prediction on triangular meshes. Compared with traditional Convolutional Neural Networks (CNN), GCNN can be directly applied to body - fitted triangular meshes, making it easier to couple with Computational Fluid Dynamics (CFD) solvers. #### Main problems and methods 1. **Limitations of existing methods**: - In the field of rapid flow field prediction, traditional methods mainly rely on pixel - based Convolutional Neural Networks (CNN). However, these methods usually need to project data onto regular Cartesian grids, which will lead to geometric inaccuracies and larger amounts of data. 2. **Advantages of GCNN**: - GCNN can be directly applied to unstructured meshes (such as triangular meshes), avoiding errors caused by data interpolation and projection. In addition, GCNN can better capture the physical characteristics of the boundary layer region. 3. **Research objectives**: - Propose a GCNN structure as a surrogate model for predicting laminar flow around two - dimensional obstacles. - Evaluate the accuracy of this model in reconstructing velocity and pressure fields and compare it with the standard U - net architecture, especially in the performance of the boundary layer region. 4. **Experimental design**: - The training set consists of 2,000 randomly generated two - dimensional shapes, and the laminar flow field of each shape is obtained through CFD calculations. - The test set includes unseen shapes (such as cylinders and NACA0012 airfoils) to evaluate the generalization ability of the model. #### Key formulas - **Navier - Stokes equations**: \[ \begin{cases} \rho \left( \frac{\partial \mathbf{v}}{\partial t} + \mathbf{v} \cdot \nabla \mathbf{v} \right) - \nabla \cdot (2\eta \epsilon(\mathbf{v}) - p\mathbf{I}) = \mathbf{f}, \\ \nabla \cdot \mathbf{v} = 0, \end{cases} \] where $\rho$ is the fluid density, $\eta$ is the dynamic viscosity, $\mathbf{v}$ is the velocity field, $p$ is the pressure field, and $\mathbf{I}$ is the unit tensor. - **Loss function (Mean Absolute Error, MAE)**: \[ L = \frac{1}{N_V} \sum_{i = 1}^{N_V} \left( |u_{\text{pred},i} - u_{\text{ref},i}| + |v_{\text{pred},i} - v_{\text{ref},i}| + |p_{\text{pred},i} - p_{\text{ref},i}| \right), \] where $N_V$ is the number of nodes, and $u$ and $v$ are the components of the velocity field respectively, and $p$ is the pressure field. - **Drag force calculation**: \[ F_D = \mathbf{e}_x \cdot \oint_S \left( p \mathbf{n} + \mu \frac{\partial v_s}{\partial s} \right) ds, \] where $\mathbf{e}_x$ is the unit vector in the x - direction, $\mathbf{n}$ is the inward - pointing unit normal vector, and $\frac{\partial v_s}{\partial s}$ is the normal gradient of the tangential velocity. ### Summary This paper solves the problem of laminar flow prediction around two - dimensional random shapes by introducing GCNN, aiming to improve the prediction.