Improved Particle-Particle Contact Detection Using

0 downloads 0 Views 457KB Size Report
Oct 29, 2015 - Improved Particle-Particle Contact Detection Using Efficient Data Structures ... Particles are stored in C++ container vector & each bin is a list.
Abstract: Improved Particle-Particle Contact Detection Using Ef...

https://aiche.confex.com/aiche/2010/webprogram/Paper199268...

Start | Grid View | Browse by Day OR Group/Topical | Author Index | Keyword Index | Personal Scheduler

Improved Particle-Particle Contact Detection Using Efficient Data Structures Monday, November 8, 2010 Hall 1 (Salt Palace Convention Center) Tathagata Bhattacharya and J. J. McCarthy, Department of Chemical and Petroleum Engineering, University of Pittsburgh, Pittsburgh, PA We revisited the No Binary Search (NBS) contact detection algorithm of Munjiza et. al. [ NBS contact detection algorithm for bodies of similar size, A. Munjiza and K. R. F. Andrews, International Journal for Numerical Methods in Engineering, Volume 43, Issue 1, Pages 131 - 149, 1998 ]. The outstanding feature of the NBS algorithm is that the total contact detection time is proportional to the total number of particles in the domain and that the outer loop is always over the total number of objects (and not over the number of bins). In the present work, we found out that the use of efficient data structures enables us to have an outer loop which will go over the total number of non-empty bins. Preliminary investigation shows that the resulting code is more than three times faster than our implementation of the algorithm of Munjiza et. al. Extended Abstract: File Not Uploaded See more of this Session: Poster Session: Particle Technology Forum See more of this Group/Topical: Particle Technology Forum

1 of 1

10/29/15 10:27 PM

Improved Particle-Particle Contact Detection Using Efficient Data Structures Tathagata Bhattacharya and Joseph J. McCarthy Department of Chemical and Petroleum Engineering University of Pittsburgh, Pittsburgh PA 15261

Abstract: We revisited the No Binary Search (NBS) contact detection algorithm of Munjiza et. al. [ NBS contact detection algorithm for bodies of similar size, A. Munjiza and K. R. F. Andrews, International Journal for Numerical Methods in Engineering, Volume 43, Issue 1, Pages 131 - 149, 1998]. The outstanding feature of the NBS algorithm is that the total contact detection time is proportional to the total number of particles in the domain and that the outer loop is always over the total number of objects (and not over the number of bins). In the present work, we found out that the use of efficient data structures enables us to have an outer loop which will go over the total number of non-empty bins. Preliminary investigation shows that the resulting code is more than three times faster than our implementation of the algorithm of Munjiza et. al..

Algorithm/Scheme Check for contacts (within bin & with neighboring bins)

Data Structure ! Loop over all particles to map them into respective bins

! Particles are stored in C++ container vector & each bin is a list which stores the address of each Particle vector Particles; typedef std::list bin;

! Store indices of non-empty bins in a C++ container set

Benchmarking

! set does not allow duplicate entry

10

! Finally, have a outer loop which goes over only non-empty bins ! Munjiza et. al.’s implementation has a outer loop which goes over all particles ! Since number of non-empty bins ! number of particles, looping time is reduced & the algorithm becomes faster!

Performance Comparison with Literature

! Boost C++ libraries (www.boost.org) used for various arrays typedef boost::multi array bin array; //bin array is //a 2D array of type bin bin array bins(boost::extents[m][n]);

PACKING 'A' (Munjiza et. al.)

9 Contact Detection Time, T (s)

! Particle is a structure struct Particle { public: double x,y,z,radius; int id, color; // other definitions... };

Brute Force

8

NBS (Munjiza et. al.)

7

NBS (present work)

6

3X faster

5 4 3 2 1 0

0

10 20 30 40 50 60 70 80 Total Number of Objects (N x 1000)

90

Outlook ! T ∝ N as opposed to N log N or N 2

2D

! Use of efficient data structures makes it 3X faster! ! Scale up for HPC using parallelization or GPGPU

Acknowledgements D

! ACS PRF, DOE, NSF ! S. Levent Yilmaz, Ashish Yeri & Benjamin Schmidt

Suggest Documents