# Accelerating FVM-Based Parallel Fluid Simulations with Better Grid Renumbering Methods
## 6 Conclusions  
Numerical simulation of fluid dynamics is one of the essential applications on supercomputers. Due to the enormous amount of computation, improving the parallel performance is critical for solving real-world CFD cases. In this paper, we refocus on the classic topic of grid numbering for FVM-based fluid simulations. In order to choose a better renumbering method to improve the efficiency of FVM-based CFD numerical simulations, this paper proposed an improved evaluation metric MDMP with sparse matrix properties. We also proposed a CQ renumbering algorithm that greatly optimizes the traditional evaluation metrics (bandwidth and profile). In order to compare and validate the proposed metrics and algorithms, we integrated the CQ and Greedy renumbering algorithms into a generic CFD software YHACT. We also conducted a quantitative study of different numbering algorithms using a real-world case derived from nuclear reactor engineering. Compared to the widely used Greedy algorithm, the CQ algorithm yielded a lower maximum bandwidth (up to 82.19% optimized compared to Greedy) but leads to a lower numerical simulation efficiency (up to 24.8% lower compared to Greedy). In addition, the MDMP of the Greedy algorithm is reduced by 83.43% compared to the CQ algorithm. The Results section verifies that the size of the MDMP is positively correlated with the size of the cache hit rate of the different renumbering algorithms during CFD computation. The results showed that using MDMP can more accurately discriminate the quality of a sparse matrix. In addition, after renumbering the cells exported from commercial grid-generating software, the parallel performance have been greatly improved for simulating hydraulics for a bundle of fuel rods in the nuclear reactor core. More importantly, the algorithms are implemented in a general CFD framework, which has good parallel scalability and could be extended seamlessly by new grid numbering algorithms.  
This work can provide useful guidance for the design and optimization of an efficient general-purpose CFD software. In the future, we aim to build an accurate performance discrimination model and propose novel numbering algorithms with optimal performance based on this extensible framework for grids renumbering. We also hope that the approaches of this paper and the corresponding CFD software can be open-sourced, and more applications will be carried out in academia and industry shortly.  
Conceptualization, H.Z., X.-W.G. and J.L.; Data curation, H.Z., Q.L. and H.X.; Formal analysis, Q.L. and H.X.; Funding acquisition, X.-W.G., C.L. and J.L.; Methodology, H.Z.; Project administration, X.-W.G.; Resources, J.L.; Software, H.Z., X.-W.G. and C.L.; Supervision, J.L.; Validation, H.Z.; Visualization, H.Z. and X.-W.G.; Writing--original draft, H.Z.; Writing--review and editing, X.-W.G. All authors have read and agreed to the published version of the manuscript.  
This work was partially supported by the National Natural Science Foundation of China (Grant Nos. 61902413, 12102468, and 12002380) and the National University of Defense Technology Foundation (Nos. ZK21-02 and ZK20-52).  
Not applicable.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Case** & **Grid Size** & **Method** & **MDMP** & **Time** & **Cache Miss** \\ \hline \multirow{3}{*}{FuelRodBundleFlow(12 core)} & original & 9131.96 & 1093.99 & 7.40\% \\ \cline{2-6}  & Greedy & 37.23 & 599.788 & 4.70\% \\ \cline{2-6}  & CQ & 128.10 & 595.618 & 5.00\% \\ \hline \multirow{3}{*}{FuelRodBundleFlow(16 core)} & original & 45719.74 & 1582.53 & 9.70\% \\ \cline{2-6}  & Greedy & 41.37 & 1387.23 & 5.50\% \\ \cline{2-6}  & CQ & 298.63 & 1424.94 & 6.20\% \\ \hline \multirow{3}{*}{FuelRodBundleFlow(40 core)} & original & 133808.29 & 3545.39 & 7.10\% \\ \cline{2-6}  & Greedy & 42.71 & 2962.77 & 4.20\% \\ \cline{1-1} \cline{2-6}  & CQ & 96.31 & 3262.48 & 4.60\% \\ \hline \hline \end{tabular}
\end{table}
Table 7: _Cont._