# A Parallel Algorithm Based on Regularized Lattice Boltzmann Method for Multi-Layer Grids
## 4 Numerical Simulations
### Performance Evaluation  
In this section, we evaluate the algorithm proposed in this paper in terms of both speed-up ratio and efficiency. The scenario configuration for the simulation in this section is the same as in Section 4.2. This section evaluates parallel performance using speedup ratio and efficiency. The speedup ratio is defined as follows:  
\[Speedup=\frac{T_{serial}}{T_{parallel}(p)} \tag{23}\]  
where \(T_{serial}\) is the serial execution time and \(T_{parallel}(p)\) is the parallel execution time using \(p\) cores. The efficiency is defined as follows:  
\[Efficiency=\frac{Speedup}{p} \tag{24}\]  
The speedup ratio and efficiency of the parallel algorithm proposed in this paper at different numbers of cores is demonstrated in Table 4.  
In order to facilitate the comparison of the performance of the algorithms in this paper, parallel computation is performed using OpenMP under the same experimental conditions and scenarios. The speedup ratio and efficiency of the OpenMP at different numbers of cores is demonstrated in Table 5. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Cores** & **1** & **2** & **4** & **8** & **16** \\ \hline Speedup & 1 & 1.73 & 3.37 & 5.77 & 9.05 \\ Efficiency & 100\% & 86.51\% & 84.25\% & 72.13\% & 56.56\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The speedup ratio and efficiency of the algorithm proposed in this paper. Figure 24: Streamlines of the flow field of a three-dimensional sphere at \(Re=200\). \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & **[PERSON] et al. ** [45] & **[PERSON] et al. ** [46] & **[PERSON] et al. ** [44] & **Present Work** \\ \hline \(Re\) & \(\overline{C_{D}}\) & \(X_{S}\) & \(\overline{C_{D}}\) & \(X_{S}\) & \(\overline{C_{D}}\) & \(X_{S}\) & \(\overline{C_{D}}\) & \(X_{S}\) \\ \hline
50 & – & – & – & – & 1.56  
The performance of the multi-layer grids RLBM algorithm using the parallel algorithm proposed in this paper is compared with the multi-layer grids RLBM algorithm using OpenMP multi-threaded computation. The comparison of speed-up ratios is shown schematically in Figure 25. The comparison of efficiency is shown schematically in Figure 26.  
It is clear that the parallel algorithm proposed in this paper exhibits a significant speed-up ratio for all numbers of cores. For example, in the case of 16 cores, the algorithm achieves a speed-up ratio of 9.05, while the speed-up ratio using OpenMP is only 4.621. It shows that the algorithm proposed in this paper is able to make better use of parallel computing resources and achieve higher computational efficiency when scaling up to more processor cores. As the number of processor cores increases, the speed-up ratio of MPI increases significantly more than that of OpenMP, demonstrating excellent scalability. The algorithm proposed in this paper is significantly more efficient than OpenMP for all cores. In the two-core case, the MPI is 87% efficient compared to 73% for the OpenMP. This trend is more pronounced as the number of cores increases. It shows that the algorithm in this paper is better able to maintain efficient load balancing and low communication overhead when increasing the number of cores. Although the efficiency of the MPI algorithm decreases as the number of cores increases, the decrease is significantly smaller than that of the OpenMP algorithm. The efficiency of the MPI algorithm is still maintained at a reasonable level in larger-scale parallel computations, indicating the effectiveness of its load-balancing strategy. The rationality and efficiency of the algorithm in this paper are proved, and it can greatly reduce the computational bottleneck of individual processes and improve the overall computational efficiency. The algorithm only needs to communicate between  
Figure 25: Comparison of the speed-up between the parallel algorithm in this paper and the parallel algorithm using OpenMP.