广西师范大学学报(自然科学版) ›› 2012, Vol. 30 ›› Issue (4): 18-24.

• • 上一篇    下一篇

基于CUDA的格子Boltzmann数值模拟加速实现

覃章荣1, 张超英1, 丘滨2, 李圆圆1, 莫刘刘1   

  1. 1.广西师范大学计算机科学与信息工程学院,广西桂林 541004;
    2.广西水电职业技术学院,广西南宁 530023
  • 收稿日期:2012-07-16 发布日期:2018-11-27
  • 通讯作者: 张超英(1958—),男,广西永福人,广西师范大学教授。E-mail:zhangcy@gxnu.edu.cn
  • 基金资助:
    国家自然科学基金资助项目(11162002)

Implementation of the Acceleration Simulation with Lattice Boltzmann Method Based on CUDA

QIN Zhang-rong1, ZHANG Chao-ying1, QIU Bin2, LI Yuan-yuan1, MO Liu-liu1   

  1. 1.College of Computer Science and Information Engineering,Guangxi Normal University,Guilin Guangxi 541004,China;
    2.Guangxi College of Water Resources and Electic Power,Nanning Guangxi 530023,China
  • Received:2012-07-16 Published:2018-11-27

摘要: 针对近年来利用CUDA技术在个人计算机显卡的GPU上实现LBM并行加速计算的研究越来越多,但对在GPU中使用不同GPU存储器进行计算的具体实现算法以及其对计算性能的影响分析研究甚少,文章实现了在GPU中使用不同存储器进行LBM并行计算,给出了具体的实现算法,并以平面Poiseuille流为算例,在普通个人计算机上,分别使用NVIDIA GeForce GTS 450 GPU和Intel Core i5-760 4核CPU进行计算。结果表明,两者计算结果吻合得很好,最高获得了约107倍的加速比,验证了在GPU上进行LBM并行计算的可行性以及加速性能,为在低成本的个人计算机上高效率地解决计算流体力学中的复杂计算问题提供了一种非常有效的途径。

关键词: GPU, CUDA, 格子Boltzmann方法, 平面Poiseuille流

Abstract: In recent years,there are more and more research on implementing LBM accelerating computation on the GPU of a PC's graphics card with CUDA technology is getting more attention.But the detailed algorithm and the analysis of computational performance which compute parallelly on a GPU with different memory are rarely studied.In thispaper,by using different memory on a GPU,the parallel computing of LBM was implemented and the detailed algorithms are provided.Taking the plane Poiseuilleflow as a test example,the parallel computation of the LBM is implemented on a NVIDIA GeForce GTS 450 GPU and an Intel Core i5-760 quad-core CPU on a PC respectively.Both computing results have good agreement and the highest speedup of GPU is about 107 times faster than that of CPU.The result indicates parallel computation of the LBM on GPU is completely feasible and the accelerating performance is very significant,which provides a very effective way to solve the complex problem of the modern computational fluid dynamics in a low cost computer.

Key words: GPU, CUDA, lattice Boltzmann method, plane Poiseuille flow

中图分类号: 

  • O357
[1] CHEN Shi-yi,DOOLEN G D.Lattice Boltzmann method for fluid flows[J].Ann Rev Fluid Mech,1998,30:329-364.
[2] 闻炳海,张超英,刘海燕,等.大血管中血液流动的LBM模拟[J].广西师范大学学报:自然科学版,2008,26(4):22-25.
[3] 邱冰,王立龙,薛泽,等.用晶格Boltzmann方法研究微血管脉动流中悬浮颗粒运动特征的转变[J].广西师范大学学报:自然科学版,2011,29(4):7-11.
[4] 郑彦奎,刘沙,熊生伟,等.Lattice Boltzmann方腔模型的CUDA加速实现[J].科学技术与工程,2010,10(7):1684-1688.
[5] 张云,王小伟,葛蔚,等.多松弛时间格子Boltzmann方法在GPU上的实现[J].计算机与应用化学,2011,28(3):265-269.
[6] TO¨LKE J,KRAFCZYK M.TeraFLOP computing on a desktop PC with GPUs for 3D CFD[J].International Journal of Computational Fluid Dynamics,2008,22(7):443-456.
[7] 李博,李曦鹏,张云,等.耦合Nvidia/AMD两类GPU的格子玻尔兹曼模拟[J].科学通报,2009,54(20):3177-3184.
[8] NVIDIA Corporation.NVIDIA CUDA C Programming Guide,version 4.2[EB/OL].(2012-5-10)[2012-7-16].http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDACProgrammingGuide.pdf.
[9] CHEN Shi-yi,CHEN Hu-dong,MARTINE D O,et al.Lattice Boltzmann model for simulation of magnetohydrodyna-mics[J].Phys Rev Lett,1991,67(27):3776-3781.
[10] FILIPPOVA O,HANEL D.Lattice Boltzmann simulation of gas-particleflow in filters[J].Comput Flui,1997,26(7):697-712.
[1] 凌风如, 张超英, 陈燕雁, 覃章荣. LBM中基于半程反弹的统一边界条件研究[J]. 广西师范大学学报(自然科学版), 2020, 38(1): 70-78.
[2] 周戎龙,罗玉玲,闭金杰,岑明灿,丘森辉,廖志贤. 图像并行加密算法在手持设备上的应用研究[J]. 广西师范大学学报(自然科学版), 2019, 37(3): 60-70.
[3] 张超英, 黎槟华, 覃章荣. 基于CUDA的晶格Boltzmann并行算法的综合优化设计[J]. 广西师范大学学报(自然科学版), 2012, 30(3): 142-148.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!
版权所有 © 广西师范大学学报(自然科学版)编辑部
地址:广西桂林市三里店育才路15号 邮编:541004
电话:0773-5857325 E-mail: gxsdzkb@mailbox.gxnu.edu.cn
本系统由北京玛格泰克科技发展有限公司设计开发