An Efficient Parallel Framework for the Discrete Element Method Using GPU
Abstract
:1. Introduction
2. Parallelisation of DEM
2.1. DEM Algorithm
2.1.1. Calculate Contact Forces
2.1.2. Update Kinematic State of Particles
2.2. GPU Parallelisation of “Calculate Contact Forces”
2.2.1. Naїve Algorithm
Algorithm 1 “naїve” algorithm. |
1: For i = 0 to N-1 2: For j = i + 1 to N 3: If distance(i, j) < Ri + Rj 4: Particles i and j in contact 5: end 6: end 7: end |
2.2.2. Advanced Scheme
Algorithm 2 Neighbour cell scheme. |
1: For i = 0 to N 2: Check Xi 3: Add Particle i into particle list of Cell c 4: End 5: For i = 0 to N 6: Check Xi, then know: 7: Neighbour cells of Particle i 8: For particles in neighbour cells 9: “Naїve” detection 10: End 11: End |
2.2.3. Hybrid Scheme
Algorithm 3 GPU parallelisation of ‘Calculate contact forces’. |
1: For i = 0 to N (divided by threads) 2: Check Xi, based on configuration of fine cells, then: 3: Put Particle i to its position in the expanded particle list of Cell c 4: End 5: For c = 1 to Nc (divided by threads) 6: Compress the expanded particle list 7: End 8: For i = 1 to N (divided by threads) 9: Check Xi, then know: 10: 27 Neighbour cells of Particle i 11: For particles j in neighbour cells 12: Equations (1)–(12) 13: End 14: End |
2.3. GPU Parallelisation of “Update Kinematic State of Particles”
Algorithm 4 GPU parallelisation of ‘Update kinematic state of particles’. |
1: For i = 0 to N (divided by threads) 2: Equations (13)–(18) 3: End |
3. Performance Evaluation
3.1. Triaxial Test
3.2. Cone Penetration Test
3.3. Two-Dimensional Dam Break
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Cundall, P.A.; Strack, O.D.L. A discrete numerical model for granular assemblies. Géotechnique 1979, 29, 47–65. [Google Scholar] [CrossRef]
- Hu, Y.; Randolph, M.F. A practical numerical approach for large deformation problems in soil. Int. J. Numer. Anal. Methods Geomech. 1998, 22, 327–350. [Google Scholar] [CrossRef]
- Wang, D.; Randolph, M.F.; White, D.J. A dynamic large deformation finite element method based on mesh regeneration. Comput. Geotech. 2013, 54, 192–201. [Google Scholar] [CrossRef]
- Dong, Y. Reseeding of particles in the material point method for soil-structure interactions. Comput. Geotech. 2020, 127, 103716. [Google Scholar] [CrossRef]
- Soga, K.; Alonso, E.; Yerro, A.; Kumar, K.; Bandara, S. Trends in large-deformation analysis of landslide mass movements with particular emphasis on the material point method. Géotechnique 2016, 66, 248–273. [Google Scholar] [CrossRef] [Green Version]
- Jiang, M.J.; Yu, H.S.; Leroueil, S. A simple and efficient approach to capturing bonding effect in naturally microstructured sands by discrete element method. Int. J. Numer. Methods Eng. 2007, 69, 1158–1193. [Google Scholar] [CrossRef]
- Sufian, A.; Knight, C.; O’Sullivan, C.; Van Wachem, B.; Dini, D. Ability of a pore network model to predict fluid flow and drag in saturated granular materials. Comput. Geotech. 2019, 110, 344–366. [Google Scholar] [CrossRef]
- Yuan, W.H.; Liu, K.; Zhang, W.; Dai, B.; Wang, Y. Dynamic modeling of large deformation slope failure using smoothed particle finite element method. Landslides 2020, 17, 1591–1603. [Google Scholar] [CrossRef]
- Zhu, H.P.; Zhou, Z.Y.; Yang, R.Y.; Yu, A.B. Discrete particle simulation of particulate systems: A review of major applications and findings. Chem. Eng. Sci. 2008, 63, 5728–5770. [Google Scholar] [CrossRef]
- Yazdchi, K.; Srivastava, S.; Luding, S. Micro–macro relations for flow through random arrays of cylinders. Compos. Part A Appl. Sci. Manuf. 2012, 43, 2007–2020. [Google Scholar] [CrossRef] [Green Version]
- Kumar, N.; Luding, S.; Magnanimo, V. Macroscopic model with anisotropy based on micro–macro information. Acta Mech. 2014, 225, 2319–2343. [Google Scholar] [CrossRef] [Green Version]
- Guo, P.J.; Stolle, D.F.E. Lateral pipe-soil interaction in sand with reference to scale effect. J. Geotech. Geoenvironmental Eng. 2005, 131, 338–349. [Google Scholar] [CrossRef]
- Jiang, M.J.; Yin, Z.Y. Analysis of stress redistribution in soil and earth pressure on tunnel lining using the discrete element method. Tunn. Undergr. Space Technol. 2012, 32, 251–259. [Google Scholar] [CrossRef]
- Falagush, O.; McDowell, G.R.; Yu, H. Discrete element modeling of cone penetration tests incorporating particle shape and crushing. Int. J. Geomech. 2015, 15, 04015003. [Google Scholar] [CrossRef]
- Shi, D.; Yang, Y.; Deng, Y.; Xue, J. DEM modelling of screw pile penetration in loose granular assemblies considering the effect of drilling velocity ratio. Granul. Matter 2019, 21, 74. [Google Scholar] [CrossRef]
- Peters, J.F.; Jelinek, B.; Goodman, C.; Vahedifard, F.; Mason, G. Large-scale discrete-element modeling for engineering analysis: Case study for the mobility cone penetrometer. J. Geotech. Geoenvironmental Eng. 2019, 145, 04019111. [Google Scholar] [CrossRef]
- Gao, M.; Wang, X.; Wu, K.; Pradhana, A.; Sifakis, E.; Yuksel, C.; Jiang, C. GPU optimization of material point methods. ACM Trans. Graph. (TOG) 2018, 37, 1–12. [Google Scholar] [CrossRef]
- Coop, M.R.; Sorensen, K.K.; Bodas Freitas, T.; Georgoutsos, G. Particle breakage during shearing of a carbonate sand. Géotechnique 2004, 54, 157–163. [Google Scholar] [CrossRef]
- Zhang, W.C.; Wang, J.F.; Jiang, M.J. DEM-aided discovery of the relationship between energy dissipation and shear band formation considering the effects of particle rolling resistance. J. Geotech. Geoenvironmental Eng. 2013, 139, 1512–1527. [Google Scholar] [CrossRef]
- Singh, A.; Magnanimo, V.; Saitoh, K.; Luding, S. Effect of cohesion on shear banding in quasistatic granular materials. Phys. Rev. E 2014, 90, 022202. [Google Scholar] [CrossRef] [Green Version]
- Cui, L.; Sheng, Q.; Dong, Y.; Xie, M. Unified elasto-plastic analysis of rock mass supported with fully grouted bolts for deep tunnels. Int. J. Numer. Anal. Methods Geomech. 2022, 46, 247–271. [Google Scholar] [CrossRef]
- Johnson, D.H.; Vahedifard, F.; Jelinek, B.; Peters, J.F. Micromechanical modeling of discontinuous shear thickening in granular media-fluid suspension. J. Rheol. 2017, 61, 265–277. [Google Scholar] [CrossRef]
- Kesseler, M.; Heller, V.; Turnbull, B. A laboratory-numerical approach for modelling scale effects in dry granular slides. Landslides 2018, 15, 2145–2159. [Google Scholar] [CrossRef] [Green Version]
- Fan, N.; Jiang, J.; Dong, Y.; Guo, L.; Song, L. Approach for evaluating instantaneous impact forces during submarine slide-pipeline interaction considering the inertial action. Ocean Eng. 2022, 245, 110466. [Google Scholar] [CrossRef]
- Potyondy, D.O.; Cundall, P.A. A bonded-particle model for rock. Int. J. Rock Mech. Min. Sci. 2004, 41, 1329–1364. [Google Scholar] [CrossRef]
- O’Sullivan, C. Particle-based discrete element modeling: Geomechanics perspective. Int. J. Geomech. 2011, 11, 449–464. [Google Scholar] [CrossRef]
- Coetzee, C.J. Calibration of the discrete element method. Powder Technol. 2017, 310, 104–142. [Google Scholar] [CrossRef]
- Cleary, P.W. Industrial particle flow modelling using discrete element method. Eng. Comput. 2009, 26, 698–743. [Google Scholar] [CrossRef]
- Furuichi, M.; Nishiura, D.; Kuwano, O.; Bauville, A.; Hori, T.; Sakaguchi, H. Arcuate stress state in accretionary prisms from real-scale numerical sandbox experiments. Sci. Rep. 2018, 8, 8685. [Google Scholar] [CrossRef]
- Kuhn, M.R.; Bagi, K. Specimen size effect in discrete element simulations of granular assemblies. J. Eng. Mech. 2009, 135, 485–492. [Google Scholar] [CrossRef]
- Thakur, S.C.; Ooi, J.Y.; Ahmadian, H. Scaling of discrete element model parameters for cohesionless and cohesive solid. Powder Technol. 2016, 293, 130–137. [Google Scholar] [CrossRef] [Green Version]
- Lommen, S.; Mohajeri, M.; Lodewijks, G.; Schott, D. DEM particle upscaling for large-scale bulk handling equipment and material interaction. Powder Technol. 2019, 352, 273–282. [Google Scholar] [CrossRef]
- Berger, K.J.; Hrenya, C.M. Challenges of DEM. II: Wide particle size distributions. Powder Technol. 2014, 264, 627–633. [Google Scholar] [CrossRef]
- Cheng, K.; Wang, Y.; Yang, Q.; Mo, Y.; Guo, Y. Determination of microscopic parameters of quartz sand through tri-axial test using the discrete element method. Comput. Geotech. 2017, 92, 22–40. [Google Scholar] [CrossRef]
- Gao, P.; Liu, Z.; Shi, D.; Wang, F. Investigation on perforation drilling to mitigate punch-through potential in sand overlying soft clay. Appl. Ocean Res. 2022, 119, 103026. [Google Scholar] [CrossRef]
- Ferellec, J.F.; McDowell, G.R. A method to model realistic particle shape and inertia in DEM. Granul. Matter 2010, 12, 459–467. [Google Scholar] [CrossRef]
- Zheng, J.; Hryciw, R.D. An image based clump library for DEM simulations. Granul. Matter 2017, 19, 1–15. [Google Scholar] [CrossRef]
- Hopkins, M. Polyhedra faster than spheres? Eng. Comput. 2014, 31, 567–583. [Google Scholar] [CrossRef]
- Kuang, D.; Long, Z.; Guo, R.; Yu, P. Experimental and numerical investigation on size effect on crushing behaviors of single calcareous sand particles. Mar. Georesources Geotechnol. 2020, 39, 1–12. [Google Scholar] [CrossRef]
- Wang, J.; Schweizer, D.; Liu, Q.; Su, A.; Hu, X.; Blum, P. Three-dimensional landslide evolution model at the Yangtze River. Eng. Geol. 2021, 292, 106275. [Google Scholar] [CrossRef]
- Yan, Z.; Wilkinson, S.K.; Stitt, E.H.; Marigo, M. Discrete element modelling (DEM) input parameters: Understanding their impact on model predictions using statistical analysis. Comput. Part. Mech. 2015, 2, 283–299. [Google Scholar] [CrossRef] [Green Version]
- Rapaport, D.C. Multi-million particle molecular dynamics I. Design considerations for vector processing. Comput. Phys. Commun. 1991, 62, 198–216. [Google Scholar] [CrossRef]
- Nishiura, D.; Sakaguchi, H. Parallel-vector algorithms for particle simulations on shared-memory multiprocessors. J. Comput. Phys. 2011, 230, 1923–1938. [Google Scholar] [CrossRef]
- Amritkar, A.; Deb, S.; Tafti, D. Efficient parallel CFD-DEM simulations using OpenMP. J. Comput. Phys. 2014, 256, 501–519. [Google Scholar] [CrossRef]
- Yan, B.; Regueiro, R.A. Comparison between pure MPI and hybrid MPI-OpenMP parallelism for Discrete Element Method (DEM) of ellipsoidal and poly-ellipsoidal particles. Comput. Part. Mech. 2019, 6, 271–295. [Google Scholar] [CrossRef]
- NVIDIA. CUDA Programming Guide, Version 5.5; NVIDIA: Santa Clara, CA, USA, 2013. [Google Scholar]
- Dong, Y.; Wang, D.; Randolph, M.F. A GPU parallel computing strategy for the material point method. Comput. Geotech. 2015, 66, 31–38. [Google Scholar] [CrossRef]
- Dong, Y.; Cui, L.; Zhang, X. Multiple-GPU for three dimensional MPM based on single-root complex. Int. J. Numer. Methods Eng. 2021, 123, 1481–1504. [Google Scholar] [CrossRef]
- Dong, Y.; Grabe, J. Large scale parallelisation of the material point method with multiple GPUs. Comput. Geotech. 2018, 101, 149–158. [Google Scholar] [CrossRef]
- Zhang, W.; Zhong, Z.H.; Peng, C.; Yuan, W.H.; Wu, W. GPU-accelerated smoothed particle finite element method for large deformation analysis in geomechanics. Comput. Geotech. 2021, 129, 103856. [Google Scholar] [CrossRef]
- Govender, N.; Wilke, D.N.; Kok, S.; Els, R. Development of a convex polyhedral discrete element simulation framework for NVIDIA Kepler based GPUs. J. Comput. Appl. Math. 2014, 270, 386–400. [Google Scholar] [CrossRef]
- Nishiura, D.; Matsuo, M.Y.; Sakaguchi, H. ppohDEM: Computational performance for open source code of the discrete element method. Comput. Phys. Commun. 2014, 185, 1486–1495. [Google Scholar] [CrossRef] [Green Version]
- Šmilauer, V.; Catalano, E.; Chareyre, B.; Dorofeenko, S.; Duriez, J.; Gladky, A.; Kozicki, J.; Modenese, C.; Scholtès, L.; Sibille, L.; et al. Yade reference documentation. Yade Doc. 2010, 474, 1–510. [Google Scholar]
- Itasca Consulting Group Inc. PFC manual, version 5.0. Minneapolis. 2016. Available online: https://www.itascacg.com/software/pfc (accessed on 3 July 2021).
- Lin, X.; Ng, T.T. Contact detection algorithms for three-dimensional ellipsoids in discrete element modelling. Int. J. Numer. Anal. Methods Geomech. 1995, 19, 653–659. [Google Scholar] [CrossRef]
- Munjiza, A.; Andrews, K.R.F. NBS contact detection algorithm for bodies of similar size. Int. J. Numer. Methods Eng. 1998, 43, 131–149. [Google Scholar] [CrossRef]
- Perkins, E.; Williams, J.R. A fast contact detection algorithm insensitive to object sizes. Eng. Comput. 2001, 18, 48–61. [Google Scholar] [CrossRef]
- Nezami, E.G.; Hashash, Y.M.A.; Zhao, D.; Ghaboussi, J. Shortest link method for contact detection in discrete element method. Int. J. Numer. Anal. Methods Geomech. 2006, 30, 783–801. [Google Scholar] [CrossRef]
- Williams, J.R.; O’Connor, R. Discrete Element Simulation and the Contact Problem. Arch. Comput. Methods Eng. 1999, 6, 279–304. [Google Scholar] [CrossRef]
- Whitehead, N.; Fit-Florea, A. Precision & Performance: Floating Point and IEEE754 Compliance for NVIDIA GPUs. 2011. Available online: https://developer.nvidia.com/sites/default/files/akamai/cuda/files/NVIDIA-CUDA-Floating-Point.pdf (accessed on 5 October 2020).
- Jiang, M.J.; Konrad, J.M.; Leroueil, S. An efficient technique for generating homogeneous specimens for DEM studies. Comput. Geotech. 2003, 30, 579–597. [Google Scholar] [CrossRef]
- Arroyo, M.; Butlanska, J.; Gens, A.; Calvetti, F.; Jamiolkowski, M. Cone penetration tests in a virtual calibration chamber. Géotechnique 2011, 61, 525–531. [Google Scholar] [CrossRef]
- Butlanska, J.; Arroyo, M.; Gens, A.; O’Sullivan, C. Multi-scale analysis of cone penetration test (CPT) in a virtual calibration chamber. Can. Geotech. J. 2014, 51, 51–66. [Google Scholar] [CrossRef]
- Eid, W.K. Scaling Effect in Cone Penetration Testing in Sand. Doctoral Dissertation, Virginia Polytechnic Institute and State University, 1987. Available online: https://vtechworks.lib.vt.edu/handle/10919/49849?show=full (accessed on 3 July 2021).
- Eslami, A.; Moshfeghi, S.; Molaabasi, H.; Eslami, M.M. Piezocone and Cone Penetration Test (CPTu and CPT) Applications in Foundation Engineering. Butterworth-Heinemann. 2019. Available online: https://www.elsevier.com/books/piezocone-and-cone-penetration-test-cptu-and-cpt-applications-in-foundation-engineering/eslami/978-0-08-102766-0 (accessed on 3 July 2021).
Number of Particles | D/d50 | CPU Sequential | CPU Parallel (10 Threads) | GPU Parallel (Double-Precision) | ||
---|---|---|---|---|---|---|
Runtime (s) | Runtime (s) | Speedup | Runtime (s) | Speedup | ||
3920 | 25 | 618 | 144 | 4.3 | 19 | 33 |
7840 | 31.5 | 2248 | 500 | 4.5 | 49 | 46 |
15,680 | 40 | 6072 | 1265 | 4.8 | 76 | 80 |
31,360 | 50 | 13,047 | 2558 | 5.1 | 150 | 87 |
100,880 | 72 | 40,375 | 7764 | 5.2 | 475 | 85 |
250,880 | 100 | 115,593 | 21,810 | 5.3 | 1409 | 82 |
501,760 | 126 | 333,600 | 60,655 | 5.5 | 3879 | 86 |
1,003,520 | 158 | 666,298 | 118,980 | 5.6 | 8328 | 80 |
2,007,040 | 200 | 1,399,226 | 249,861 | 5.6 | 16,461 | 85 |
4,997,600 | 316 | 3,464,750 | 607,850 | 5.7 | 40,287 | 86 |
Number of Particles | Calculate Contact Forces between Particles | Update Kinematic State of Each Particle | ||||
---|---|---|---|---|---|---|
CPU Sequential | GPU Parallel | Speedup | CPU Sequential | GPU Parallel | Speedup | |
3920 | 482 | 18.5 | 26 | 136 | 0.5 | 272 |
7840 | 1900 | 47 | 40 | 348 | 1.8 | 193 |
15,680 | 5478 | 73 | 75 | 594 | 3.3 | 180 |
31,360 | 11,764 | 144 | 82 | 1283 | 5.9 | 217 |
100,880 | 36,404 | 455 | 80 | 3971 | 20 | 198 |
250,880 | 107,312 | 1369 | 78 | 8281 | 40 | 210 |
501,760 | 316,020 | 3784 | 83 | 17,580 | 95 | 185 |
1,003,520 | 627,622 | 8070 | 78 | 38,676 | 258 | 150 |
2,007,040 | 1,326,887 | 16,291 | 81 | 72,339 | 425 | 170 |
4,997,600 | 3,273,441 | 39,280 | 83 | 191,309 | 1007 | 190 |
Number of Particles | dc/d50 | D/d50 | CPU Sequential | CPU Parallel (10 Threads) | GPU Parallel (Double-Precision) | ||
---|---|---|---|---|---|---|---|
Runtime (s) | Runtime (s) | Speedup | Runtime (s) | Speedup | |||
65,000 | 2.74 | 46 | 16,918 | 3525 | 4.8 | 236 | 72 |
150,000 | 3.45 | 58 | 35,336 | 7362 | 4.8 | 476 | 74 |
520,000 | 5.5 | 92 | 179,411 | 36,615 | 4.9 | 2347 | 76 |
1,001,000 | 11 | 184 | 373,927 | 76,312 | 4.9 | 5125 | 73 |
2,002,000 | 22 | 368 | 748,954 | 149,790 | 5.0 | 9981 | 75 |
4,881,200 | 55 | 920 | 1,852,845 | 370,569 | 5.0 | 25,798 | 72 |
Number of Particles | H/d50 | CPU Sequential | CPU Parallel (10 Threads) | GPU Parallel (Double-Precision) | ||
---|---|---|---|---|---|---|
Runtime (s) | Runtime (s) | Speedup | Runtime (s) | Speedup | ||
4000 | 67 | 89 | 20 | 4.4 | 6 | 15 |
8000 | 93 | 200 | 45 | 4.4 | 8 | 25 |
20,000 | 150 | 398 | 88 | 4.5 | 7 | 57 |
40,000 | 210 | 756 | 164 | 4.6 | 12 | 63 |
160,000 | 424 | 2814 | 611 | 4.6 | 47 | 60 |
640,000 | 848 | 11,217 | 2386 | 4.7 | 193 | 58 |
1,280,000 | 1,200 | 22,311 | 4648 | 4.8 | 378 | 59 |
2,560,000 | 1700 | 46,019 | 9587 | 4.8 | 742 | 62 |
5,000,000 | 2400 | 90,159 | 18,783 | 4.8 | 1502 | 60 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Dong, Y.; Yan, D.; Cui, L. An Efficient Parallel Framework for the Discrete Element Method Using GPU. Appl. Sci. 2022, 12, 3107. https://doi.org/10.3390/app12063107
Dong Y, Yan D, Cui L. An Efficient Parallel Framework for the Discrete Element Method Using GPU. Applied Sciences. 2022; 12(6):3107. https://doi.org/10.3390/app12063107
Chicago/Turabian StyleDong, Youkou, Dingtao Yan, and Lan Cui. 2022. "An Efficient Parallel Framework for the Discrete Element Method Using GPU" Applied Sciences 12, no. 6: 3107. https://doi.org/10.3390/app12063107
APA StyleDong, Y., Yan, D., & Cui, L. (2022). An Efficient Parallel Framework for the Discrete Element Method Using GPU. Applied Sciences, 12(6), 3107. https://doi.org/10.3390/app12063107