Font Size: a A A

Implementation And Optimization Of 3D Discrete Element Method Simulation Software Based On CUDA

Posted on:2020-03-28Degree:MasterType:Thesis
Country:ChinaCandidate:Y WangFull Text:PDF
GTID:2428330575481210Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Whether in nature or in industrial and agricultural production,there are a large number of bulk materials,such as soil,sand,crop products and so on.Because of the limitations of using the finite element method to study the dynamics of bulk materials,the discrete element method has many advantages.Therefore,the discrete element method has been widely used in the simulation of bulk materials.Although this method provides a better solution for calculating the movement of complex granular materials,and reduces the storage space required for calculation as much as possible,with the increase of material size and particle number in the simulation experiment,the calculation amount will also increase exponentially,so it puts higher requirements on the computational efficiency of the discrete element method simulation software.The development of Moore's Law has reached a bottleneck.The main way to improve computer computing power is from pursuing the high performance of CPU single core switch to parallel computing by using multiple cores with appropriate complexity and relatively low power consumption.Compared with the CPU,the GPU has many processing units,high memory bandwidth,and fast calculation speed.Therefore,the computing performance of the GPU running multiple cores concurrently is much stronger than that of the CPU.At the same time,NVIDIA has added an easy-to-use programming interface to its GPUs,and provides a common parallel computing platform and programming model CUDA,enabling researchers to utilize the powerful computing power of the GPU more efficiently.With the maturity of CUDA parallel computing architecture,the use of CUDA technology to solve the problem of large computational complexity of discrete element method has become a new way to implement discrete element method simulation software.Based on the three-dimensional discrete element simulation software AgriDEM developed by our research group and the CPU parallel computing module designed by OpenMP technology,this paper applies CUDA technology,uses GPU parallel computing architecture,adds CUDA simulation calculation module for the software,and carries out a lot of improvements and optimizations.Firstly,according to the CUDA characteristics,the data structure and calculation flow of the CUDA simulation calculation module are designed and implemented.The main data structures include: data structures such as particles,boundaries,contact information,and mechanical models.The main calculation processes include: GPU data initialization,interparticle contact calculation,particle and boundary contact calculation,combined ball force calculation,particle and boundary refresh and output the calculation results to a file,etc.In the contact calculation part,a sort-based meshing method and a grid-based neighbor search method for GPU are described.At this time,the CUDA simulation calculation module has improved the efficiency of software simulation calculation to some extent.Secondly,some algorithms in the CUDA simulation calculation module are improved,including: triangle boundary deduplication algorithm,interparticle contact calculation algorithm,and neighbor search grid setting algorithm.The improvement of the triangle boundary deduplication algorithm makes the simulation result more accurate.The improvement of the interparticle contact calculation algorithm reduces the computational complexity and improves the computational efficiency.The dual grid method is used to improve the neighbor search grid setting algorithm and solve the problem of low computational efficiency when the difference of the size between particles and boundaries is large.In addition,a number of optimizations are performed according to the characteristics of CUDA,including: optimization of thread number setting,use of multiple CUDA streams,zero copy,CPU-GPU asynchronous structure,etc.The computational efficiency of the CUDA simulation calculation module is further improved.Finally,an integration test was performed on the CUDA simulation calculation module.By comparing the test results of the CUDA calculation module and the CPU calculation module for ball particle test and the aspheric particle test,it verified the correctness of the function of the CUDA simulation calculation module.The comparison between the CPU calculation module and the CUDA calculation module for processing different orders of magnitude particles is carried out.The results show that the CUDA simulation calculation module greatly shortens the simulation calculation time and achieves the purpose of improving the calculation efficiency.
Keywords/Search Tags:CUDA, Discrete Element, GPU, Simulation, Parallel Computing
PDF Full Text Request
Related items