利用NVIDIA CUDA平台,在GPU上结合稀疏存贮算法实现基于格子Boltzmann方法的孔隙尺度多孔介质流动模拟加速,测试该算法相对基本算法的性能。比较该算法在不同GPU上使用LBGK和MRT两种碰撞模型及单、双精度计算时的性能差异。测试结果表明在GPU环境下采用稀疏存贮算法相对基本算法能大幅提高计算速度并节省显存,相对于串行CPU程序加速比达到两个量级。使用较新构架的GPU时,MRT和LBGK碰撞模型在单、双浮点数精度下计算速度相同。而在较上一代的GPU上,计算精度对MRT碰撞模型计算速度影响较大。
A sparse lattice representation lattice Boltzmann method algorithm is implemented on Graphics Processing Units ( GPU) to accelerate pore scale flow simuation. Prefomance testing shows that sparse lattice representation approach grately reduces memory requirement and maintains performance under low porosity compared with basic algorithm. Overall speedup reaches two orders of magnitude compared with serial code. Various factors including collision model, float number precision, and GPU that affect computing speed of the algorithm are invesgated independently. It indicates that MRT model runs as fast as LBGK model on new generation of GPU cards. While on old GPU cards, MRT model’ s computing speed matchs LBGK only when using single precision float.