Abstract:
In order to improve the efficiency of fluid calculations and ensure the accuracy of the results, the CUDA programming platform and the powerful floating-point computing capabilities of the GPU are used to accelerate the Poisseuille flow simulation calculation based on the lattice Boltzmann method.Two different addressing methods, linear addressing and subscript addressing are designed, these two addressing methods are respectively applied to the lattice point collision, migration flow, and macroscopic calculation of the lattice Boltzmann program, then discuss the influence of two addressing methods on the calculation efficiency of the program. At the same time, unified memory management is used in the program, and the variables opened up in this way can be used on the host side and the device side at the same time, which simplifies the code complexity and reduces the consumption of frequently opening up memory for variables.Using Intel(R) Xeon(R) E-52620 v4 CPU and Nvidia Quadro GP100GPU for calculations, the linear addressing method and the subscript addressing method have obtained 71 times and 25 times the speedup ratio of CPU serial code respectively.