Using Dynamic Triangulations in Distinct Element Simulations of Granular Media Th.M. Liebling†
J.-A. Ferrez
Abstract This paper presents an efficient neighborhood function, based on dynamic triangulations, that is used to detect collisions in distinct element simulations of granular media in 2D and 3D. The theoretical bases are briefly exposed, the additions to a general distinct element modeling (DEM) algorithm are reviewed, and some example simulations are presented.
Key words: triangulations, modeling, simulation, granular media, large scale and parallel computing.
1 Introduction A granular medium is a large collection of solid particles, the grains, that interact. We can find many examples of such media in different fields: nature (sand, soil, etc), civil engineering (railroad beds, dams, roads, ...), food products, chemistry, pharmacy, etc. Many of their properties like convection and segregation, flows and arching effects, etc are still not well known and simulation has become a powerful tool for studying them. Furthermore, it allows measuring parameters that are difficult (if at all possible) to observe in experiments. Distinct element modeling (DEM) is a natural tool for computer simulations of highly discontinuous phenomena. By considering each element, particle or grain separately, it allows to take into account their local behavior while providing global measures. Classical examples include molecular dynamics and granular media simulations. The main drawback of this approach is traditionally associated with the high computational cost of detecting and resolving the interactions between the elements. To be more precise, there is an non-compressible cost associated with the implementation of the physical law governing those interactions, and an overhead associated with finding the exact location where those interactions occur. It is clearly not optimal to detect potential collisions among n grains by testing every n n 1 2 possible pair. Some sort of neighborhood function is required to reduce the number of candidates that may interact with a given grain. The issues here are:
efficiency, defined as the average ratio of proposed candidates versus actual contacts
computational cost, the effort required to build and maintain the neighborhood function throughout the simulation subject to the motion of the grains versatility, the ability to detect collision among grains of various shapes, sizes and trajectories.
This short paper only addresses the case of spherical grains in two and three dimensional models. Other techniques based on dynamic triangulations for polygonal grains have also been developed and are covered in [5]. Once this strong hypothesis on the grain shape is enforced, the dynamic triangulation shows a good efficiency at a reasonable computational cost with no further restriction on the sizes or movements of the grains. Section 2 presents the theoretical background on which our collision detection relies. In section 3 we show how it integrates within a classic DEM simulation, and in section 4 we present some example applications.
Chair of Operations Research, Department of Mathematics, EPFL, CH-1015 Lausanne,
[email protected] of Operations Research, Department of Mathematics, EPFL, CH-1015 Lausanne,
[email protected]
† Chair
16th IMACS World Congress ( c 2000 IMACS)
1
Using Dynamic Triangulations in Distinct Element Simulations
2
2 Dynamic triangulations Collision detection among spheres of any size in any dimension using a dynamic triangulation (Figure 1) is based on the following theorem.
Figure 1: 24 spheres and the edges of the weighted Delaunay triangulation used to detect potential collision among them.
Theorem 2.1 All the collisions among disjoint spheres can be found by testing the edges of the weighted Delaunay triangulation whose generating sites are the center of the spheres and weights are the square roots of the radii. Proof Given a set of n disjoint spheres where sphere S i has center ci and radius ri (Figure 2), we associate with each sphere its Laguerre cell Li defined as: Li
x
Pi x Pj x j i
where Pi x
ci
x 2 ri2
This definition is similar to that of the well known Voronoi cell. It essentially means that L i contains all the points that are ”closer” to Si than to any other sphere, but using the power function to a sphere as a ”distance”. In particular, we have the following properties: Pi x 0 x Si and Pi x 0 x Si
/ and the So, if the spheres do not overlap, Si Li . Therefore, there is a potential contact between Si and S j only if Li L j 0, detection of the collisions between two spheres is reduced to the adjacency detection among the Laguerre cells. The weighted / Collision Delaunay triangulation is the dual structure of the Laguerre complex 1, that is: edge (i j) exists if and only if Li L j 0. detection is now reduced to the enumeration of the edges in the weighted Delaunay triangulation. Several characteristics of the weighted Delaunay triangulations make them especially appealing for our purpose: 1. Theorem 2.1 is valid in any dimension, although only dimensions two and three are required for the applications we have in mind. 2. Theorem 2.1 remains valid if the spheres slightly overlap, allowing soft body contact models to be used (Figure 3). 3. In 2D, weighted Delaunay triangulations have a number of edges linear in the number of spheres. In 3D, while this dependence may be as high as quadratic, it remains linear in all cases encountered in practice. 4. The weighted Delaunay triangulation can be efficiently updated to follow the positions of the moving spheres (Figure 4). A more rigorous discussion of the above claims can be found in [5]. 1 The Laguerre complex is also known as Power Diagram [1]. The Delaunay triangulation of weighted sites used here is also known as regular triangulation. See [2] for an extensive review of these fundamental computational geometry tools.
Using Dynamic Triangulations in Distinct Element Simulations
L4
3
L3
S3
S4 S2 L1 L2 S1
x P1(x)
Figure 2: The spheres Si , the Laguerre cells Li , and the weighted Delaunay triangulation on the center of the spheres. The power P1 x of x to S1 is shown, measured as the squared distance along the tangent from x to the contact point.
Figure 3: The Laguerre cells and weighted Delaunay triangulation with overlapping spheres. Here the overlaps are exaggerated, but the detection still works. In practice, the overlaps are about 1% of the size of the grains.
Figure 4: As the spheres move, the original Delaunay triangulation may fail to detect contacts. Maintaining the triangulation is mandatory: a new edge appears while another one disappears. The construction of the initial triangulation is a well known problem in numerical simulation. The theory and computational implementation closest to our needs is that of Joe [7, 8]. We need a more elaborate version, though, because we are dealing with weighted generating sites and we need to efficiently modify the topological structure of the triangulation to reflect the new situation induced by the movement of the generating sites. While the former constraint is easily satisfied, the latter forces us to use elaborate data structures to represent the triangulation as well as proximity relations. In three dimensions, this is achieved with doubly connected face lists (DCFL) [3].
Using Dynamic Triangulations in Distinct Element Simulations
4
3 The DEM scheme The use of the dynamic Delaunay triangulation as neighborhood function implies some changes in the general simulation algorithm of a distinct element modeling (DEM) scheme. We illustrate this with an example taken from a soft body granular matter simulation: steps 1 and 5 would not appear in a straight-forward method, while step 2 would require another way to find the collisions. 1 Construct the initial Delaunay triangulation T This is the startup overhead, paid only once. 2 Detect contact along edges of T Along each edge (i j) of T, if ci c j ri r j then there is a contact between spheres i and j. There may be edges with no contact, but there may not be a contact without an edge. This is where the use of the triangulation shows its strength, resulting in an overall complexity of O(n). 3 Apply some law at every contact point Once all contact points have been identified, proper action must be taken according to the nature of the simulation. This action can be based on values like the size of the overlap, relative normal and shear speeds, particle types, etc. Upon completion of this step, all the inter-particle forces are known. 4 Update the trajectories After adding up the forces contributed by the contacts in step 3 and external forces (gravity, contact with boundaries, etc), it is now possible to integrate the motion equations over the duration of the iteration, resulting in new particle positions. 5 Update the triangulation T with local operations This is the running overhead of the triangulation. However, this step need not be performed at each iteration (especially for dense media), reducing its impact. 6 Go back to 2 The iteration duration must be chosen carefully. Small values will require many more iterations for the same result, but too large values might introduce instabilities in the triangulation (step 5) and a loss of accuracy in the model (step 3). Software based on that algorithm was used for 2D simulations. A special version for distributed memory parallel computers was developed and used on a Cray T3D system [4]. The version for 3D simulations is now completed and used for various experiments. A parallel version for shared memory machines such as high-end PCs and workstations or the SGI Origin2000 exist and give satisfactory results on limited number of processors. A different version for distributed memory machines including the Swiss T1 machine - is under development.
4 Applications Many simulations were performed using 2D discs as grains, the reader is referred to [11] for a complete description and to [10] for more images and videos. Figure 5 shows two examples. In three dimensions, we are investigating the optimal packing problem. The question is simple: ”how many spherical particles can be stacked in a given closed container”. It has attracted a lot of attention over the last centuries, starting like many mathematical developments from a military issue [9], and recently attained a major milestone with Hales’ proof [6] that the maximal density of packings of identical spheres is obtained by the face-centered cubic packing. Optimal packings of spheres of unequal radii still cannot be determined analytically and require either experiments or simulations. They are, though, a key parameter of many industrial processes, and a better understanding of their principles would benefit both research and production in areas such as pharmacy, chemistry, civil engineering, etc. The packings shown in figure 6 were obtained by dropping grains of equal size in a box. Such packings reach a density far from the optimum of 3 π 2 74 048%. Admittedly some space is lost near the borders of the box, but the main loss is caused by the randomness of the arrangement. Shaking the box is thus used to improve the packing. Figure 7 shows some random packings of spheres of 2 different radii similar to those of figure 6. As expected, densities are higher with smaller grains. In both cases, shaking the box can be used to further improve the packing. In figure 8 the rearrangement of small grains around a large one is illustrated. A video is available online at http:// rosowww.epfl.ch/jaf/3dwdt/.
Using Dynamic Triangulations in Distinct Element Simulations
5
Figure 5: left: Rock fall on an embankment. This simulation duplicates an experiment conducted at the Civil Engineering Dept. of EPFL (Prof. Descoeudres) to study the impact of a falling rock on a concrete slab topped with a granular bed. The picture shows the final position of the rock after absorption by a bed composed of approx. 20’000 grains. The colors identify the horizontal layers and their deformation due to the impact. right: Pressure distribution. All edges in the triangulation that actually correspond to a contact between two spheres are drawn with a thickness proportional to the force at that contact point. Forces against the walls are represented identically.
n 1484 r 0 04 d 0 52%
n 3498 r 0 03 d 0 53%
n 6944 r 0 02 d 0 54%
Figure 6: Sample packings of identical spheres in a cubic box. n non overlapping spheres of radius r are placed randomly in the unit cube, then gravity and a vertical piston are used to enforce the packing. After 2 seconds, an average density d is measured.
n1 207 n2 227 r1 0 08 r2 0 04 d 0 57%
n1 1484 n2 1747 r1 0 04 r2 0 02 d 0 59%
Figure 7: Sample packings of unequal spheres in a cubic box.
5 Conclusion The distinct element method was a major breakthrough when it first allowed to perform computer simulation of mostly unknown, discontinuous phenomena. The addition of an efficient collision detection mechanism opens up new opportunities, since larger
Using Dynamic Triangulations in Distinct Element Simulations
6
t
1 00s
t
1 05s
t
1 10s
t
1 15s
t
1 20s
t
1 25s
Figure 8: During the packing process, the medium and small grains rearrange themselves to leave space for the large one (bottom view). simulations are usually needed to better match physical reality. When spherical grains are considered, the dynamic triangulation has proved to be efficient and versatile.
References [1] F. Aurenhammer. Power diagrams: properties, algorithms and applications. SIAM J. Comput., 16(1):78–96, 1987. [2] J.-D. Boissonnat and M. Yvinec. Algorithmic Geometry. Cambridge University Press, 1998. [3] D. P. Dobkin and M. J. Laszlo. Primitives for the manipulation of three-dimensional subdivisions. Algorithmica, 4:3–32, 1989. [4] J.-A. Ferrez, D. M¨uller, and Th.M. Liebling. Parallel implementation of a distinct element method for granular media simulation on the Cray T3D. EPFL Supercomputing Review, 8, 1996. Online at http://sawww.epfl.ch/SIC/SA/ publications/SCR96/scr8-page4.html. [5] J.-A. Ferrez, D. M¨uller, and Th.M. Liebling. Dynamic triangulations for granular media simulations. In K. Mecke and D. Stoyan, editors, Statistical Physics and Spatial Statistics, Lecture Notes in Physics. Springer, 2000. [6] Th. C. Hales. The Kepler conjecture. Overview of the proof and related papers.
http://www.math.lsa.umich.edu/˜hales/countdown/, 1998.
[7] B. Joe. Three-dimensional triangulations from local transformations. SIAM J. Sci. Stat. Comput., 10(4):718–741, 1989. [8] B. Joe. Construction of three-dimensional delaunay triangulations using local transformations. Computer Aided Geometric Design, 8:123–142, 1991. [9] K. Leutwyler. Stack ’em tight. Scientific American, September 1998. explorations/1998/091498sphere/.
Online at http://www.sciam.com/
[10] D. M¨uller. Simulations of granular media. http://rosowww.epfl.ch/dm/sigma.html, 1996. [11] D. M¨uller. Techniques informatiques efficaces pour la simulation de mileux granulaires par des m e´ thodes d’´el´ements distincts. PhD thesis, EPFL, 1996.