船舶海洋与建筑工程

一种改进GPU加速策略在光滑粒子流体动力学方法中的应用

展开
  • 1.江苏科技大学 船舶与海洋工程学院,江苏 镇江 212003
    2.哈尔滨工程大学 船舶工程学院,哈尔滨 150001
管延敏(1983-),高级工程师,从事船舶水动力学研究.

收稿日期: 2022-06-13

  修回日期: 2022-08-09

  录用日期: 2022-08-26

  网络出版日期: 2022-11-10

基金资助

国家重点研发计划(2022YFE0107000);国家自然科学基金面上项目(52171259)

Application of an Improved GPU Acceleration Strategy for the Smoothed Particle Hydrodynamics Method

Expand
  • 1. School of Naval Architecture and Ocean Engineering, Jiangsu University of Science and Technology, Zhenjiang 212003, Jiangsu, China
    2. College of Shipbuilding Engineering, Harbin Engineering University, Harbin 150001, China

Received date: 2022-06-13

  Revised date: 2022-08-09

  Accepted date: 2022-08-26

  Online published: 2022-11-10

摘要

为解决粒子的无序化易引起的图形处理器(GPU)内存访问冲突问题和提高计算效率,通过建立粒子重排序技术提出了一种改进的GPU加速策略.将该加速策略应用于光滑粒子流体动力学(SPH)方法中对三维带障碍物溃坝进行模拟,并与实验结果对比对算法进行验证,获得了较高的计算精度.基于此算例,通过在不同硬件设施上进行模拟分别对粒子重新编号的效果和算法的求解效率比较研究.结果表明,粒子重新编号技术可以保证稳定的单步运行时间,能够有效解决GPU-SPH算法显存访问冲突问题;该GPU加速的SPH并行算法能够大幅提高SPH方法求解效率,随着粒子数量的增加,其大幅缩短计算时间的优势愈发明显,为扩大SPH方法解决三维数值模拟的适用性提供了可能.

本文引用格式

管延敏, 杨彩虹, 康庄, 周利 . 一种改进GPU加速策略在光滑粒子流体动力学方法中的应用[J]. 上海交通大学学报, 2023 , 57(8) : 981 -987 . DOI: 10.16183/j.cnki.jsjtu.2022.209

Abstract

In order to solve the problem of graphics processing unit (GPU) memory access conflicts possibly caused by the disorder of particles and enhance the computation efficiency, an improved GPU acceleration strategy is proposed by establishing particle reorder technology. The acceleration strategy is applied to the smoothed particle hydrodynamics (SPH) method to simulate the dam breaking with obstacles in three dimensions, and the algorithm is verified by comparing with the experimental results, which obtained a high calculation accuracy. Based on this benchmark example of the SPH, the studies on the effect of particle renumbering and the solution efficiency of the algorithm are conducted by comparing the simulations of different hardware facilities. The results indicate that the particle reorder technology can ensure a stable single-step running time, and can effectively solve the problem of graphic card memory access conflicts that commonly exist in the GPU-SPH algorithm. Furthermore, the GPU parallel algorithm can greatly improve the solution efficiency of the SPH method, and with the increase of particle number, the advantage of drastically reducing the computation time becomes more obvious. The method proposed in this paper provides the possibility to expand the application of the SPH method to solve 3D numerical simulations.

参考文献

[1] 刘肃肃, 胡祎乐, 余音. 基于GPU 的近场动力学模拟的并行化方法[J]. 上海交通大学学报, 2016, 50(9): 1362-1367.
[1] LIU Susu, HU Yile, YU Yin. Parallel computing method of peridynamic models based on GPU[J]. Journal of Shanghai Jiao Tong University, 2016, 50(9): 1362-1367.
[2] HARADA T, KOSHIZUKA S, KAWAGUCHI Y. Smoothed particle hydrodynamics on GPUs[C]//Computer Graphics International. Petropolis, Brazil: Computer Graphics Society, 2007, 40: 63-70.
[3] CRESPO A C, DOMINGUEZ J M, BARREIRO A, et al. GPUs, a new tool of acceleration in CFD: Efficiency and reliability on smoothed particle hydrodynamics methods[J]. PloS One, 2011, 6(6): 1-13.
[4] HE Y, BAYLY A E, HASSANPOUR A, et al. A GPU-based coupled SPH-DEM method for particle-fluid flow with free surfaces[J]. Powder Technology, 2018, 338: 548-562.
[5] XIA X, LIANG Q. A GPU-accelerated smoothed particle hydrodynamics (SPH) model for the shallow water equations[J]. Environmental Modelling & Software, 2016, 75: 28-43.
[6] XIONG Q, LI B, XU J. GPU-accelerated adaptive particle splitting and merging in SPH[J]. Computer Physics Communication, 2013, 184 (7): 1701-1707.
[7] 徐锋. 基于众核架构的并行SPH 算法的研究与实现[D]. 上海: 上海交通大学, 2013.
[7] XU Feng. Research and implementation of the smoothed particle hydrodynamics algorithm based on multi-core architecture[D]. Shanghai: Shanghai Jiao Tong University, 2013.
[8] 金善勤, 郑兴, 段文洋. 基于GPU 并行的改进SPH 方法对黏性流场的模拟[J]. 哈尔滨工程大学学报, 2015, 36(8): 1011-1018.
[8] JIN Shanqin, ZHENG Xing, DUAN Wenyang. Viscosity flow simulation using improved SPH method based on GPU parallel calculation[J]. Journal of Harbin Engineering University, 2015, 36(8): 1011-1018.
[9] 杨志国, 黄兴, 郑兴, 等. GPU在SPH方法模拟溃坝问题的应用研究[J]. 哈尔滨工程大学学报, 2014, 35(6): 661-666.
[9] YANG Zhiguo, HUANG Xing, ZHENG Xing, et al. The application research of GPU in the SPH method to simulate the dam breaking problem[J]. Journal of Harbin Engineering University, 2014, 35(6): 661-666.
[10] 车庆首, 李传文, 张轶, 等. GAPI: GPU 加速的移动对象并行索引方法[J]. 计算机科学与探索, 2017, 11(11): 1713-1722.
[10] CHE Qingshou, LI Chuanwen, ZHANG Yi, et al. GAPI: GPU accelerated parallel method for indexing moving objects[J]. Journal of Frontiers of Computer Science and Technology, 2017, 11(11): 1713-1722.
[11] IHMSEN M, AKINCI N, BECKER M, et al. A parallel SPH implementation on multi-core CPUs[J]. Computer Graphics Forum, 2011, 30: 99-112.
[12] 聂霄. 不可压缩SPH流体的真实感模拟及其加速技术研究[D]. 成都: 电子科技大学, 2015.
[12] NIE Xiao. Study on realistic simulation and acceleration techniques of incompressible SPH fluids[D]. Chengdu: University of Electronic Science and Technology of China, 2015.
[13] WENDLAND H. Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree[J]. Advances in computational Mathematics, 1995, 4(1): 389-396.
[14] MONAGHAN J J, GINGOLD R A. Shock simulation by the particle method SPH[J]. Journal of Computational Physics, 1983, 52(2): 374-389.
[15] MONAGHAN J J. Particle methods for hydrodynamics[J]. Computer Physics Report, 1985, 3(2): 71-124.
[16] KLEEFSMAN K M T, FEKKEN G, VELDMAN A E P, et al. A volume-of-fluid based simulation method for wave impact problems[J]. Journal of Computational Physics, 2005, 206: 363-393.
文章导航

/