• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2014, Vol. 36 ›› Issue (07): 1231-1237.

• 论文 • 上一篇    下一篇

基于CPU-GPU混合加速的SPH流体仿真方法

胡鹏飞,袁志勇,廖祥云,郑奇,陈二虎   

  1. (武汉大学计算机学院,湖北 武汉 430072)
  • 收稿日期:2013-07-15 修回日期:2013-11-20 出版日期:2014-07-25 发布日期:2014-07-25
  • 基金资助:

    国家自然科学基金资助项目(61372107,61272276,61190125);国家973计划资助项目(2011CB707904);北航虚拟现实技术与系统国家重点实验室开放课题基金资助项目(BUAA-VR-13KF-15)

Fluid simulation method based on CPU-GPU hybrid acceleration                

HU Pengfei,YUAN Zhiyong,LIAO Xiangyun,ZHENG Qi,CHEN Erhu   

  1. (School of Computer,Wuhan University,Wuhan 430072,China)
  • Received:2013-07-15 Revised:2013-11-20 Online:2014-07-25 Published:2014-07-25

摘要:

基于光滑粒子流体力学SPH的流体仿真是虚拟现实技术的重要研究内容,但SPH流体仿真需要大量的计算资源,采用一般计算方法难以实现流体仿真的实时性。流体仿真通常由物理计算、碰撞检测和渲染等部分组成,借助GPU并行加速粒子的物理属性计算和碰撞过程使SPH方法的实时流体仿真成为可能。为了满足流体仿真应用中的真实性和实时性需求,提出一种基于CPUGPU混合加速的SPH流体仿真方法,流体计算部分采用GPU并行加速,流体渲染部分采用基于CPU的OpenMP加速。实验结果表明,基于CPUGPU混合加速的SPH流体仿真方法与CPU实现相比,能显著地减少流体仿真单帧计算时间且能更快速地完成渲染任务。

关键词: 流体仿真;SPH;实时模拟;OpenMP;CPUGPU混合加速

Abstract:

Fluid simulation based on the Smoothed Particle Hydrodynamics (SPH) plays an important role in the virtual reality, but it requires a lot of computing resources. The general methods are difficult to achieve the realtime requirement of fluid simulation based on SPH. The simulation of fluid consists of physical computing, collision detection and rendering and so on. The parallel computing based on GPU can speed up the computing and collision of particles and simulate the motion of fluid in real-time. In order to satisfy the realistic and real-time requirements, a novel fluid simulation method based on CPU-GPU hybrid acceleration is proposed, which consists of computing and rendering. The computing part of fluid simulation is accelerated by GPU, and the rendering part is accelerated by OpenMP running on CPU. The experiments show that the proposed hybrid acceleration method can significantly reduce the computing time in a fluid time step and complete rendering tasks more quickly.

Key words: fluid simulation;SPH;realtime simulation;OpenMP;CPU-GPU hybrid acceleration