Finite Volume Features, Global Geometry Representations, and Residual Training for Deep Learning-based CFD Simulation

Loh Sher En Jessica, Naheed Anjum Arafat, Wei Xian Lim, Wai Lee Chan, Adams Wai-Kin Kong

This paper, presented at ICML 2024, introduces a suite of techniques to make Graph Neural Networks (GNNs) better at simulating fluid dynamics by borrowing "wisdom" from traditional numerical solvers.

TL;DR

By embedding global geometric context and traditional Finite Volume Method (FVM) mesh properties into GNNs, researchers reduced prediction errors in fluid flow simulations by up to 41%. The approach combines novel geometric features (Shortest Vector and Directional Integrated Distance) with "Finite Volume Features" and a residual training scheme that leverages cheap, low-resolution data to improve high-fidelity results.

What Problem Does This Paper Address?

Computational Fluid Dynamics (CFD) is essential for designing everything from aircraft wings to medical devices, but it is notoriously slow and computationally expensive. While GNNs have emerged as a fast alternative, they suffer from two major "blind spots":

  1. Locality: Standard GNNs rely on message-passing between immediate neighbors. A node in the mesh doesn't "know" where it is relative to a complex object (like an airfoil) unless that information travels through many layers of the network.
  2. Ignoring Mesh Physics: Traditional CFD solvers use the Finite Volume Method (FVM), which relies on specific physical properties of the mesh cells (like volume and face area) to conserve mass and momentum. Most GNNs treat the mesh as a generic graph, ignoring these critical physical inductive biases.

Methods

The authors propose three main contributions to bridge the gap between deep learning and traditional CFD:

1. Global Geometry Representations

To overcome the locality issue, the authors introduce two new ways to give nodes a global perspective of their environment:

Comparison of SDF, SV, and DID
  • Shortest Vector (SV): Instead of just knowing the distance to an object (the standard Signed Distance Function, or SDF), each node receives a vector pointing to the nearest boundary point, providing both distance and direction.
  • Directional Integrated Distance (DID): Acts like a "radar scan" for every node, calculating the average distance to boundaries across several angular segments. This gives nodes a global "sense" of the surrounding environment.

2. Finite Volume Features (FVF)

The authors integrate FVM-specific attributes directly into the graph convolutions.

Finite Volume Features on an airfoil mesh

This includes cell volume as a node attribute and face area normal vectors and face centroids as edge attributes. This allows the network to "weight" its messages based on the physical size and orientation of the mesh cells, mathematically resembling the flux calculations used in traditional solvers.

3. Residual Training

Instead of asking the GNN to predict the entire flow field from scratch, they use a low-resolution simulation as a baseline. The GNN is then trained to predict only the residual (the difference) between the low-res approximation and the high-res ground truth. This allows the model to focus its learning capacity on the most difficult areas, like turbulent wakes and boundary layers.

Datasets

The researchers evaluated their methods on two primary benchmarks:

  • 2DSHAPES: A collection of 2,000 simulations involving random 2D obstacles.
  • AirfRANS: A high-fidelity dataset of airfoil shapes at various Reynolds numbers and angles of attack.
  • Coarse-AirfRANS: A newly generated low-resolution version of the AirfRANS dataset specifically designed to test the effectiveness of residual training.

Key Insights and Results

  • GPS for Nodes: Message passing is an inefficient way to communicate global geometry. Providing SV and DID is like giving every node a "GPS and Radar" system, allowing the network to understand its spatial context in the very first layer.
  • Physics as Inductive Bias: By using FVF, the authors prove (Theorem 3.1) that a 2D mesh can be uniquely reconstructed from these features, highlighting their completeness.
  • Error Reduction: Tested across five state-of-the-art GNN architectures (including MeshGraphNet and Graph U-Net), the combination of SV, DID, and FVF reduced the Mean Squared Error (MSE) of MeshGraphNet by ~41%.
  • Architecture Agnostic: Even on the high-performing Graph U-Net, the new features reduced test loss by 21% to 71% depending on the convolution type used.
  • Residual Boost: In the CFDGCN model, adding residual training improved the error reduction from 24% (with just geometric features) to 41%.
  • Boundary Accuracy: Qualitative results show that the models are significantly better at capturing the "boundary layer"—the thin region of air right next to a wing where the most complex physics happens.

Limitations and Future Work

  • Data Saturation: As the amount of training data becomes massive, the relative benefit of these features might decrease, as the network may eventually "learn" the geometry on its own. However, such massive datasets are currently prohibitively expensive to generate.
  • 2D to 3D: The current work is focused on 2D simulations. Extending DID and FVF to 3D meshes is the next logical step, though it will increase computational complexity.
  • DID Computation Time: While SV and FVF are very fast to compute, the DID feature is more computationally intensive (taking several seconds per mesh), which could be a bottleneck for very large-scale applications.

Summary updated

BibTeX
@inproceedings{jessica2024finite,
  author = {Loh Sher En Jessica and Naheed Anjum Arafat and Wei Xian Lim and Wai Lee Chan and Adams Wai-Kin Kong},
  title = {{Finite Volume Features, Global Geometry Representations, and Residual Training for Deep Learning-based CFD Simulation}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=WzD4a5ufN8},
}
Figure