计算物理 ›› 2016, Vol. 33 ›› Issue (1): 23-29.

• 研究论文 • 上一篇    下一篇

激波与火焰面相互作用数值模拟的GPU加速

蒋华, 董刚, 陈霄   

  1. 南京理工大学瞬态物理重点实验室, 江苏 南京 210094
  • 收稿日期:2014-12-04 修回日期:2015-04-03 出版日期:2016-01-25 发布日期:2016-01-25
  • 作者简介:蒋华(1988-),男,博士生,主要从事计算流体力学研究,E-mail:18951895841@126.com;董刚(1970-),男,博士,研究员,主要从事计算流体力学研究,E-mail:dgvehicle@yahoo.com
  • 基金资助:
    国家自然科学基金(11372140)和江苏省研究生科研创新计划(KYLX_0328)资助项目

A Numerical Study of Interactions Between Shock Waves and Flame with GPU Acceleration

JIANG Hua, DONG Gang, CHEN Xiao   

  1. Key Laboratory of Transient Physics, Nanjing University of Science and Technology, Jiangsu Nanjing 210094, China
  • Received:2014-12-04 Revised:2015-04-03 Online:2016-01-25 Published:2016-01-25

摘要: 为考察计算机图形处理器(GPU)在计算流体力学中的计算能力,采用基于CPU/GPU异构并行模式的方法对激波与火焰界面相互作用的典型可压缩反应流进行数值模拟,优化并行方案,考察不同网格精度对计算结果和计算加速性能的影响.结果表明,和传统的基于信息传递的MPI 8线程并行计算相比,GPU并行模拟结果与MPI并行模拟结果相同;两种计算方法的计算时间均随网格数量的增加呈线性增长趋势,但GPU的计算时间比MPI明显降低.当网格数量较小时(1.6×104),GPU计算得到的单个时间步长平均时间的加速比为8.6;随着网格数量的增加,GPU的加速比有所下降,但对较大规模的网格数量(4.2×106),GPU的加速比仍可达到5.9.基于GPU的异构并行加速算法为可压缩反应流的高分辨率大规模计算提供了较好的解决途径.

关键词: 激波, 火焰界面, GPU, 异构系统, 加速比

Abstract: To study performance of graphic processing unit (GPU) for computational fluid dynamics, simulation on interactions between shock waves and a flame interface, a typical compressible reactive flow, was carried out on CPU/GPU heterogeneous system. Several optimal strategies are taken to raise GPU code performance. Computational results and acceleration performance of GPU with different grid number were examined. It was found that computational results by parallel GPU are the same as those by traditional CPU based on MPI parallel of 8 threads. Computational times of two parallel methods linearly grow with increase of computational grid numbers. Compuational cost by GPU is less than cost by MPI. As grid number is small(1.6×104), speedup ratio of 8. 6 was achieved on GPU. As grid number grows, speedup ratio decreases. However, a ratio of 5.9 still can be held on GPU when grid number is more (4.2×106). Arithmetic on CPU/GPU heterogeneous system provides a good solution for large-scale computations of compressible reactive flows.

Key words: shock wave, flame interface, GPU, heterogeneous system, speedup ratio

中图分类号: