Computational fluid dynamics simulations are commonplace and crucial in many industries, yet obtaining flow solutions requires solving large, sparse linear systems of equations at a significant time and energy cost. This becomes particularly expensive, especially on unstructured
...
Computational fluid dynamics simulations are commonplace and crucial in many industries, yet obtaining flow solutions requires solving large, sparse linear systems of equations at a significant time and energy cost. This becomes particularly expensive, especially on unstructured meshes. One of the most effective methods for solving such systems is the algebraic multigrid (AMG). Still, its performance depends heavily on the efficiency of its internal components, particularly the smoother. Many existing data-driven AMG enhancements mainly target structured grids or focus on other operators rather than smoothing, leaving a gap in unstructured mesh performance optimization.
This study develops a graph neural network (GNN) inspired by AutoAMG, a GNN-based approach to enhance AMG performance by predicting optimal strength parameters. The GNN in this work is trained to predict polynomial coefficients used to construct a sparse pseudo-inverse smoother matrix, improving the AMG smoothing step. The framework is implemented in PyTorch with graphics processing unit (GPU) acceleration, while the training and evaluation datasets are generated using the CFD solvers WaterLily and ReFRESCO. These cover synthetic problems, canonical external flows, and industry-relevant 2D simulations of airfoils (from the AirfRANS dataset) for both structured and unstructured meshes. The framework includes the graph generation, GNN architecture, AMG integration, and a training and validation pipeline.
Excellent generalization is demonstrated for structured cases, achieving approximately 25% wall-clock time reduction and nearly perfect convergence on grids up to 128 times larger than the ones used in training. Similarly, for unstructured 2D/3D problems, data diversity proves to be the primary driver of generalization. A mixed dataset produces stable acceleration across all meshes, achieving 17-18% solve time reductions on grids up to 20 times larger number of cells. Tests further demonstrate that, while different GNN sizes can enhance solving times, performance is ultimately limited by the smoother itself. Increasing the pseudo-inverse complexity, such as using a high polynomial functions to construct the coefficients, can cause overfitting.
Testing on the complex AirfRANS dataset shows that the model generalizes to significantly larger problems and unseen flow regimes, reducing iterations by nearly 20%. However, due to higher sparse smoother costs, this resulted in a 4.7% net slowdown in solve time. In conclusion, this research demonstrates that a GNN-tuned Jacobi smoother can accelerate AMG solvers on diverse grids, averaging 17-25% wall-clock reductions. The framework demonstrates that a GNN can provide quantifiable speedups, given that the reduction in iteration count outweighs the higher computational cost of the sparse smoother.