Page 129 - The Combined Finite-Discrete Element Method
P. 129
112 CONTACT DETECTION
that the total CPU time to detect all contacts is not dependent on the number of cells.
In other words, it is not dependent on the size of the finite space within which discrete
elements are distributed. Operations performed inside the loops do not depend upon the
number of discrete elements N either. The consequence of this is that the total CPU time
taken to detect all the contact is proportional to the total number of discrete elements.
RAM requirements in terms of required RAM space M related to contact detection
are easily calculated as the total space occupied by arrays A[2][n x ], B[n y ], X[N]and
Y[N]. Thus
M = n y + 2n x + 2N integer numbers (3.65)
In FORTRAN-based implementation integer arrays are used, as explained above, resulting
in total memory requirements of approximately 20 bytes per discrete element. In C and
C++ implementations, very often arrays of pointers are used in place of integer arrays.
For instance, a particular discrete element may not be identified by its number but by its
address. Arrays X and Y therefore contain the address of the next discrete element in the
list, and are accordingly the array of addresses (pointers). Arrays A and B contain the
address of the first discrete element in the list, and are consequently arrays of pointers.
RAM space can be saved by using pointers. In addition, C codes run faster when pointers
are used.
Numerical examination of CPU performance. The CPU and RAM requirements for the
NBS algorithm can be demonstrated by numerical examples.
Example I consists of N circular discrete elements of diameter D spaced at distance D
in the x-direction and at a distance 2D in the y-direction (Figure 3.46).
Contact detection is solved 10 times for the problem, and each time all contacting
couples are detected. The cumulative CPU times for all 10 contact detections as a function
of the total number of discrete elements comprising the problem are shown in Figure 3.47.
Packing "A"
2D
2D
2D
D D D D D D D
Figure 3.46 Example I: packing A (NBS Contact Detection Algorithm for bodies of similar size,
A. Munjiza and K.R.F. Andrews, International Journal for Numerical Methods in Engineering,
43/1). (Reproduced by permission of John Wiley & Sons, Ltd.).