首页 | 本学科首页   官方微博 | 高级检索  
     

基于CUDA的弱可压SPH流体建模与仿真
引用本文:段兴锋,任鸿翔,神和龙.基于CUDA的弱可压SPH流体建模与仿真[J].计算机工程与科学,2018,40(8):1375-1382.
作者姓名:段兴锋  任鸿翔  神和龙
作者单位:(1.大连海事大学航海动态仿真和控制交通行业重点实验室,辽宁 大连 116026; 2.集美大学航海学院,福建 厦门 361021)
基金项目:国家863计划(2015AA010504);交通运输部应用基础研究项目(2015329225240);福建省教育厅科技项目(JA15269)
摘    要:为了实现小尺度范围流体场景的实时、真实感模拟,采用弱可压SPH方法对水体进行建模,提出了流体计算的CPU GPU混合架构计算方法。针对邻域粒子查找算法影响流体计算效率的问题,采用三维空间网格对整个模拟区域进行均匀网格划分,利用并行前缀求和和并行计数排序实现邻域粒子的查找。最后,采用基于CUDA并行加速的Marching Cubes算法实现流体表面提取,利用环境贴图表现流体的反射和折射效果,实现流体表面着色。实验结果表明,所提出的流体建模和模拟算法能实现小尺度范围流体的实时计算和渲染,绘制出水的波动、翻卷和木块在水中晃动的动态效果,当粒子数达到1 048 576个时,GPU并行计算方法相较CPU方法的加速比为60.7。

关 键 词:光滑流体粒子动力学  边界处理  邻域搜索  Marching  Cubes  CUDA  
收稿时间:2017-04-11
修稿时间:2018-08-25

Fluid modeling and simulation using CUDA-based weakly compressible SPH
DUAN Xing feng,REN Hong xiang,SHEN He long.Fluid modeling and simulation using CUDA-based weakly compressible SPH[J].Computer Engineering & Science,2018,40(8):1375-1382.
Authors:DUAN Xing feng  REN Hong xiang  SHEN He long
Affiliation:(1.Key Laboratory of Marine Dynamic Simulation & Control for Ministry of Communications, Dalian Maritime University,Dalian 116026; 2.College of Navigation,Jimei University,Xiamen 361021,China)
Abstract:In order to realize the real time and realistic simulation of small scale fluid scenes, the Weakly Compressible SPH (WCSPH) method is used to model fluids and a hybrid CPU GPU framework is proposed for fluid calculation. Aiming at the problem that the neighbor particle search algorithm affects the computational efficiency of the fluid, we propose a 3D spatial grid partition algorithm and parallel counting sort algorithm to increase speed for searching neighbour particles. Lastly, we propose a parallel Marching Cubes algorithm based on CUDA to triangulate the iso surface of fluids, and use cube map technology to represent the effect of reflection and refraction, thus achieving fluid surface shading. The experiments show that the proposed fluid modeling and simulation method can realize the real time calculation and rendering of small scale fluid scenes and draw the dynamic effects of water flow, overturning and the wood swaying in the water. When the number of particles reaches 1 048 576, the parallel method based on GPU achieves the speedup of 60.7 in comparison to the sequential method based on CPU.
Keywords:smoothed particle hydrodynamics(SPH)  Boundary handling  neighbour search  marching cubes  CUDA  
点击此处可从《计算机工程与科学》浏览原始摘要信息
点击此处可从《计算机工程与科学》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号