# Parallel Accelerated Fifth-Order WENO Scheme-Based Pipeline Transient Flow Solution Model
## 5 Model Validation and Case Analysis
### Model Application and GPU Acceleration Performance Evaluation
#### 5.2.2 Analysis of Model Computation Efficiency and GPU Acceleration Performance  
The water hammer change process at the end valve was calculated in time steps of 0.02 s, 0.015 s, 0.01 s, and 0.005 s. The model's computational efficiency can be derived by analyzing the computational time consumed by the different schemes, with a computational time of 4800 s. According to the CFL constraint, the MOC and the first-order Godunov scheme should meet Cr = 1, while the second-order Godunov scheme takes Cr = 0.5 to obtain the best calculation effect [10], and the proposed fifth-order WENO finite volume scheme can meet Cr > 0.01. The total computation times for different schemes are presented in Table 3 and Figure 11. According to Table 3, the second-order Godunov scheme takes the highest time, while the MOC and the first-order Godunov scheme take the middle time, and the WENO scheme takes the least time for different time steps, while the Courant number meets the scheme requirements. The fifth-order WENO scheme takes 35% to 90% of the MOC and 15% to 39% of the time of the second-order Godunov scheme when the calculation accuracy is guaranteed and the appropriate Courant number is chosen. It can be concluded that the fifth-order WENO finite volume scheme proposed for the water hammer solution model can significantly improve computational efficiency. The computational time consumption of CPU programs and GPU programs at different grids was analyzed to evaluate the acceleration effect of the GPU-WENO scheme. The CPU model is Intel(R) Core (TM) i7-10700, and the GPU graphics card is NVIDIA GeForce GTX 1660 Ti, and both of them are the latest electronic products in recent years. Still using the ideal operating conditions shown in Figure 7, the pressure wave variation during sudden closure of the end valve was calculated for a total time of 48 s, as presented in Table 4. As shown in Table 4, when the grid number is uniformly divided into 600 and the grid length is 400 m, the single-threaded computation efficiency of the 8-core CPU is higher than  
Figure 10: The flow and pressure head variations at different locations when the valve is closed only at C. (**a**) The water hammer changes with time at different positions. (**b**) Flow at different locations varies with time. \begin{table}
\begin{tabular}{c c c c c} \hline
**Time Step (t/s)** & **MOC (t/min)** & **First-Order Godunov (t/min)** & **Second-Order Godunov (t/min)** & **Fifth-Order WENO (t/min)** \\ \hline
0.020 & 3.99 & 7.76 & 9.55 & 3.05 \\
0.015 & 6.72 & 13.47 & 16.75 & 6.34 \\
0.010 & 16.31 & 28.73 & 36.90 & 14.36 \\
0.005 & 59.00 & 118.75 & 146.54 & 22.47 \\ \hline \end{tabular}
\end{table} 
Table 3: The calculation time of different simulation methods. that of the GPU. The reason is that the number of CPU program cycles is small, and the CPU core performance can be fully utilized for the small number of grids, while the GPU program is so time-consuming compared to the CPU program because the internal data is copied from the host side to the device side and then copied from the device side to the host side after completing the calculation. The computational efficiency of the GPU program is significantly higher than that of the CPU program when the number of grids reaches thousands and above. At this point, the CPU program's large number of round-robin calculations is a critical factor in the program's time consumption, while the efficiency of the GPU is superior to the CPU program by calling multiple threads on the kernel block to perform parallel calculations. Figure 12 shows that when the number of threads reaches 32 or more, the GPU acceleration effect does not change with the increase of threads, indicating that for engineering problems within hundreds of thousands of grids, 32 threads can achieve the best acceleration effect. Besides, the acceleration effects of different graphics cards are significantly different.