# Accelerating FVM-Based Parallel Fluid Simulations with Better Grid Renumbering Methods
## 1 Introduction  
Computational fluid dynamics (CFD) are widely used in aerospace [1], reactor thermal-hydraulics, ship and ocean engineering [2], explosions, etc. However, simulating the delicate structures of the flow field for real-world engineering cases is still forbidden due to the enormous amount of calculation [3]. Thus, parallel performance optimization techniques have received extensive attention in academia and industry [4, 5]. The grid numbering directly determines the matrix structure after discretization, then exhibiting great impact on performance of parallel fluid simulations. Nowadays, accelerating fluid simulations through grid renumbering has become a well-established approach. The traditional metrics such as Bandwidth [6] or Profile [7] have been applied to discriminate the matrix structures of a linear system for decades, which could provide a valuable guidance for choosing an effective ordering method. These indicators were widely used due to the simplicity of calculation. However, calculating the bandwidth of thematrix does not accurately reflect the performance in complex applications. The structure of sparse matrices determines the order of memory access for parallel computation. This has a significant impact on the performance of modern computer architectures with multiple levels of storage hierarchies. Taking the most widely used Finite Volume Method (FVM) [8] as an example, after numbering the discrete cells of the simulation domain, it is necessary to assemble sparse linear systems in a parallel fashion. The assembly process is based on the parameters and numbers of connected grid cells. There are many well-known numbering algorithms, which can be found in many literature works, such as [PERSON] [9], [PERSON] [10], [PERSON] [11], [PERSON] [12], and the Reverse Cuthill-Mckee by [PERSON] et al. [13] It is worth noting that optimizing the numbering of a sparse matrix is a formidable combinatorial problem and is therefore not a viable option to find the true optimal solution. Therefore, these published methods all used some kind of greedy-based local optimization algorithm. The heuristic algorithm [14; 15; 16] is another type of numbering algorithm proposed in recent years, but it does not perform well in terms of the overall iterative efficiency of numerical simulations. These classical methods have proved their stability, rapidity, and efficiency in simple benchmarks. It has become a consensus that grid renumbering can effectively improve computing performance. Thus, we believe that refocusing this classical topic and providing improved methods for grids numbering of complex cases are of great significance. Nevertheless, in fluid simulation of complex engineering problems, choosing a better numbering method still faces great challenges. Firstly, these simple indicators such as Bandwidth and Profile cannot accurately evaluate the computational performance of sparse matrices corresponding to complex applications. In complex application scenarios, lower bandwidth does not always lead to better performance. Secondly, the existing grid numbering algorithms are mainly focused on the optimization of solving linear systems. However, the equation discretization process also occupies a large proportion in a CFD simulation. It is necessary to quantitatively analyze the effect of mesh numbering on the complete calculation process with complex fluid simulation cases. To address the above problems, we proposed an improved indicator for more accurately evaluating the structure of a sparse matrix, and further designed a novel grid renumbering algorithm to reduce the key metrics of the matrices in FVM-based fluid simulations. Complex engineering cases have been tested in parallel and analyzed to validate the proposed algorithm and indicator. This paper is organized as follows; Section 2 describes the finite volume methods and aims to demonstrate why the grid numbering is important for FVM-based simulations.