## 2 Materials and Methods
### Design and Implementation of swHPFM
#### 2.2.1 Algorithm and task mapping scheme
In addition, each vector has six components, which represent the continuity equation, the three-directional momentum component  
Figure 4: Mapping scheme of swHPFM for the physical model and the hardware architecture. The multilevel parallelism of the fluid mechanical model and the multilayer hardware architecture of the Sunway TaihuLight naturally correspond to each other. equation in Cartesian coordinates, the energy equation, and the S-A (Spalart-Allmaras) turbulence equation [25]. The expressions of the terms are shown in Equations (2) and (3). \[U=\left[ \begin{array}{c}\rho\\ \rho v_{x}\\ \rho v_{y}\\ \rho v_{z}\\ \rho e\\ \rho\overline{v}\end{array} \right]_{F_{c}}=\left[ \begin{array}{c}\rho w_{x} \\ \rho w_{x}v_{x}+p\\ \rho w_{x}v_{y}\\ \rho w_{x}v_{z}\\ \rho w_{x}h\\ \rho\overline{v}w_{x}\end{array} \right]_{G_{c}}=\left[ \begin{array}{c}\rho w _{y}\\ \rho w_{y}v_{x}\\ \rho w_{y}v_{y}+p\\ \rho w_{y}v_{z}\\ \rho w_{y}h-\Omega p\\ \rho\overline{v}w_{y}\end{array} \right]_{H_{c}}=\left[ \begin{array}{c}\rho w _{z}\\ \rho w_{z}v_{x}\\ \rho w_{z}v_{y}\\ \rho w_{z}v_{z}+p\\ \rho w_{y}h-\Omega p\\ \rho\overline{v}w_{y}\end{array} \right] \tag{2}\]  
\[I=\left[ \begin{array}{c}0\\ 0\\ \rho\Omega v_{z}\\ -\rho\Omega v_{y}\\ 0\\ I_{\overline{v}}\end{array} \right]_{F_{v}}=\left[ \begin{array}{c}0\\ \tau_{xx}\\ \tau_{xy}\\ \tau_{xz}\\ \beta_{x}\\ \alpha_{x}\end{array} \right]_{G_{v}}=\left[ \begin{array}{c}0\\ \tau_{yx}\\ \tau_{yy}\\ \tau_{yz}\\ \tau_{yz}\\ \beta_{y}\\ \alpha_{y}\end{array} \right]_{H_{v}}=\left[ \begin{array}{c}0\\ \tau_{zx}\\ \tau_{zy}\\ \tau_{zz}\\ \beta_{z}\\ \alpha_{z}\end{array} \right]_{\Xi_{z}} \tag{3}\]  
where \(\rho\) stands for the density, \(v_{x}\), \(v_{y}\), and \(v_{z}\) mean the absolute velocity component in three coordinate directions, \(w_{x}\), \(w_{y}\), and \(w_{z}\) represent the absolute velocity component in three coordinate directions, \(e\) is the ratio of the total energy, and \(\overline{v}\) is the eddy current viscosity variable. The physical meanings and expressions of the other items can be seen in reference [26]. To increase the convergence speed, the solver uses the Runge-Kutta (R-K) explicit time method to simulate the flow field. The convection term and the diffusion term in the solver are discretized via the central differential scheme. In addition, to improve the accuracy and efficiency of the algorithm, redundant terms were constructed. The local time step method and implicit residual smoothing method are used to accelerate the convergence. Among them, since the second-order explicit central scheme of the non-convective diffusion equation is unstable, the R-K method constructs an explicit artificial viscous smoothing numerical oscillation. The implicit residual smoothing replaces the original residual value by weighting the residual at the nodes and the adjacent nodes, accelerating the smoothing of the residual and enlarging the stability range of the time step. In addition, to smooth the residual, while reducing the calculational burden, the residual smoothing is performed only at odd steps in the R-K time marching method [24]. In this paper, a multigrid method, namely, the full multigrid (FMG) method, was used to accelerate the algorithm, which is illustrated in Figure 5. First, the iteration was performed on the coarse grid (Level 3) until the error satisfied convergence criteria, and the iteration process on this layer was completed. Then, the numerical solutions and errors were interpolated to the medium grid (Level 2), where they were iterated via the V-cycle approach, until the convergence criterion was satisfied. Finally, the results were interpolated to the fine grid (Level 1) [27]. This process was iterated, until the convergence of the numerical solution on Level 1 was obtained. The algorithm flow chart in each node is illustrated in Figure 6. First, the flow field was initialized by reading the input grid file, which specifies the number of grids, the grid coord  
Figure 5: A full multigrid (FMG) cycle structure. Level 1 means the fine grid.