a new contact detection algorithm for non- spherical ...

0 downloads 0 Views 414KB Size Report
type of function (Lin & Ng, 1997; Pournin & Liebling, 2005). The method of potential particles introduced by Houlsby (2009) can model any convex particle shape ...
A NEW CONTACT DETECTION ALGORITHM FOR NONSPHERICAL PARTICLES IN THE DISCRETE ELEMENT METHOD C.W. Boon Department of Engineering Science, University of Oxford, Oxford, OX1 3PJ, United Kingdom

G.T. Houlsby Department of Engineering Science, University of Oxford, Oxford, OX1 3PJ, United Kingdom

S. Utili Department of Engineering Science, University of Oxford, Oxford, OX1 3PJ, United Kingdom

ABSTRACT: Houlsby (2009) presented the concept of “potential particles”, a method for modelling non-circular particles for the Discrete Element Method (DEM). Potential particles can assume a wide variety of shapes, ranging from circular to almost polygonal in 2-D and from spherical to almost polyhedral in 3-D. Here we present a new algorithm for the contact detection between potential particles in both 2-D and 3-D. The contact detection problem is formulated into a Second-Order Cone Program (SOCP) and solved using the commercial optimization software MOSEK (MOSEK, 2010). The algorithm is suitable for both rounded and angular particles, and was found to be robust in a variety of situations. Two 3-D simulations are illustrated using the new algorithm.

1

INTRODUCTION

The Discrete Element Method (DEM) has been widely used to model discontinuous media. It was first used to model blocky rocks (Cundall, 1971), and was then used to model granular materials (Cundall & Strack, 1979) in pharmaceutical, powder and civil engineering applications. In this paper, the original DEM formulation of Cundall & Strack (1979) is used, where particles are allowed to overlap at contacts (soft contact method). In a DEM calculation, an important fraction of computation time is devoted to contact detection and calculation of the overlap distance between particles. To calculate the forces exchanged between a pair of interacting particles, the location of the contact point and the overlap distance have to be determined (see Fig. 1). The small contact area which takes place in reality is approximated in the numerical model as a single contact point. Most available DEM codes model granular particles as circular in 2-D and spherical in 3D, since contact detection between circular and spherical particles is straightforward. For a pair of interacting circles (see Fig. 1), the overlap distance is the sum of the radii minus the distance between the centres of the particles, i.e., R1+R2 – ‖O1-O2‖ in Fig. 1. Contact detection between non-spherical particles is significantly more complicated. Various methods to model non-spherical particles have been proposed, most of which impose restrictions on the shape of the particles, i.e., either the particle has to be polyhedral (Cundall, 1988; Nezami et al., 2006; Fraige et al., 2008) or the particle shape is restricted to a particular type of function (Lin & Ng, 1997; Pournin & Liebling, 2005). The method of potential particles introduced by Houlsby (2009) can model any convex particle shape from spherical to polyhedral in 3-D. In the following, a new algorithm based on second-order cone programming (SOCP) has been implemented for both 2-D and 3-D cases. We first explain

385

the contact detection problem for the 2-D case. The extension to the 3-D case is conceptually straightforward.

Fig. 1. Overlap distance and contact point for a pair of interacting disks in 2-D

2

POTENTIAL PARTICLES

Based on the notion that a convex particle can be constructed from an assembly of lines in 2D or planes in 3-D, Houlsby (2009) describes an arbitrary convex particle in terms of a 2nd degree polynomial function (with respect to a local coordinate system). In 2-D, it is as follows: ⎛ N f = (1 − k )⎜ ∑ ai x + bi y − d i ⎝ i =1

⎞ − r 2 ⎟ + k(x2 + y2 − R2 ) ⎠

2

(1)

The terms 〈aix + biy ̶ di〉 define the particle’s constituent lines (see Fig. 2(a)), where 〈 〉 are Macaulay brackets, i.e., 〈x〉 = x, x > 0; 〈x〉 = 0, x ≤ 0. The lines are assembled such that their normal vectors point outward. They are summed quadratically and expanded by a distance r (see Fig. 2(b)), which is also related to the radius of the curvature at the corners (Houlsby, 2009). Further, a “shadow” circular particle is added; R is the radius of the circle, with 0 < k ≤ 1 denoting the fraction of circularity of the particle. Houlsby (2009) calls this function a “potential particle”, which has the following properties: • • • •

f = 0 defines the particle surface, f < 0“inside” the particle, f > 0 “outside” the particle, the particle is strictly convex, and any surface f=constant is strictly convex.

The convexity of particles implies that only one contact point can exist between a pair of interacting particles. For computational reasons, the expression in Eq. (1) is normalized (slightly changing the meaning of k): ⎛ N a x + bi y − d i f = (1 − k )⎜ ∑ i ⎜ i =1 r2 ⎝

386

2

⎞ ⎛ x2 y2 ⎞ − 1⎟ + k ⎜⎜ 2 + 2 − 1⎟⎟ ⎟ ⎝R R ⎠ ⎠

(2)

(a)

(b)

Fig. 2. Potential particles (from Houlsby (2009)) (a) A polygonal particle defined by a series of 2-D lines (b) Expanded particle with rounded corners. Lines have been quadratically summed.

3

CONTACT DETECTION ALGORITHM

To perform contact detection between a pair of potential particles fA and fB for the 2-D case, Houlsby (2009) proposes that one can solve one of the constrained minimization problems below: minimise fA subject to the constraint fB = 0 minimise fA+ fB subject to the constraint fA – fB = 0

(3) (4)

Houlsby (2009) further shows how one can use the method of Lagrange Multipliers and implement the Newton-Raphson method to solve the equations. The method of potential particles was recently used by Harkness (2009) to simulate interlocking media. He shows how the Newton-Raphson formulation proposed by Houlsby (2009) can be extended to solve 3-D problems. He reports that the Newton-Raphson method suffers from the problem of poor convergence and suggests that the terms in the Macaulay brackets can be raised to a 3rd degree, so that the 2nd derivatives become continuous. Based on our studies, the NewtonRaphson method converges poorly when the particles are very angular (low k and r values). In the optimization literature, it is generally held that optimizers for second order cone programming (SOCP) are robust and efficient because they can use primal-dual interior-point methods (Andersen et al., 2003). The SOCP formulation for the contact detection problem is detailed in this paper. The optimization problem is then solved using the commercial software MOSEK (MOSEK, 2010). The contact detection algorithm is first illustrated using an example in 2-D. The extension to 3-D will be explained later. Consider two potential particles, particle A fA(xA, yA) = 0 and particle B fB(xB,yB) = 0 defined in their local coordinates (xA, yA) and (xB, yB) respectively. fA =

(1 − k A ) ⎛ N A ⎜ ∑ aiA xA + biA y A − d iA rA2 ⎜⎝ i =1

(1 − k B ) ⎛ N B ⎜ ∑ aiB xB + biB yB − d iB fB = rB2 ⎜⎝ i =1

387

2

2

⎞ k − rA2 ⎟⎟ + A2 ( xA2 + y A2 − RA2 ) ⎠ RA ⎞ k − rB2 ⎟⎟ + B2 ( xB2 + y B2 − RB2 ) ⎠ RB

(5) (6)

The particles fA and fB are translated and rotated in the global Cartesian coordinates. Define their centres in the global coordinates as (x0A, y0A) and (x0B, y0B), and their orientations as θA and θB anticlockwise. The transformation between the global Cartesian coordinates (x, y) and the local coordinates of particle A (xA,yA) can be expressed using the linear equations: ⎡cosθ A ⎢ sin θ ⎣ A ⎡cosθ B ⎢ sin θ ⎣ B

− sin θ A ⎤ ⎡ xA ⎤ ⎡ x0A ⎤ ⎡ x ⎤ + = cosθ A ⎥⎦ ⎢⎣ y A ⎥⎦ ⎢⎣ y0A ⎥⎦ ⎢⎣ y ⎥⎦ − sin θ B ⎤ ⎡ xB ⎤ ⎡ x0B ⎤ ⎡ x ⎤ + = cosθ B ⎥⎦ ⎢⎣ y B ⎥⎦ ⎢⎣ y0B ⎥⎦ ⎢⎣ y ⎥⎦

(7) (8)

To find the closest point on particle B from particle A based on Eq. (3), Houlsby (2009) proposes to minimise fA subject to fB = 0. We can arrive at the same solution if we: minimise fA subject to fB ≤ 0

(9)

where the equality constraint is replaced with an inequality constraint. Note that in Houlsby (2009), Eq. (3) and (4) are minimised using the Newton-Raphson method over the global Cartesian coordinates (x, y). However, in our SOCP formulation, we shall minimise over the local coordinates of the particles. We now have two copies of the local coordinate systems (xA, yA) and (xB, yB). They appear in the optimization problem as two linear equality constraints given by Eq. (10) and (11), based on their relationship with the global coordinates in Eq. (7) and (8). xA cos θ A − y A sin θ A + x0 A = xB cos θ B − y B sin θ B + x0 B xA sin θ A + y A cos θ A + y0 A = xB sin θ B + y B cos θ B + y0 B

(10) (11)

To use the SOCP optimizer, one has to remove the Macaulay brackets in Eq. (2) by adding additional constraints and auxiliary slack variables. Taking particle A as an example: fA =

⎞ k (1 − k A ) ⎛ N A 2 ⎜⎜ ∑ piA − rA2 ⎟⎟ + A2 ( xA2 + y A2 − RA2 ) 2 rA ⎝ i =1 ⎠ RA

aiA xA + biA y A − d iA ≤ piA , i = 1,..., N A , piA ≥ 0, i = 1,..., N A .

(12) (13) (14)

Eq. (12) can be transformed into a second-order cone constraint: NA

∑p

2 iAc

2 2 + xAc + y Ac ≤ sA

(15)

i =1

where piAc =

1 − kA p iA rA

388

(16)

kA

xAc =

xA

(17)

kA yA RA

(18)

RA

y Ac =

Eq. (16), (17) and (18) can then be back substituted into Eq. (13) and (14). Note that the constant terms are absent in Eq. (15) because they can be dropped from the objective function for the purpose of minimisation. Similarly, particle B can be expressed as a second-order cone constraint. Since it is the constraint function, the constant terms will appear in sB. To summarise, the SOCP formulation to minimise fA subject to fB ≤ 0 is as follows: minimise sA subject to sB ≤ 1.0 NA

∑p

2 iAc

(19)

2 2 + xAc + y Ac ≤ sA

(20)

2 2 + xBc + y Bc ≤ sB

(21)

i =1

NB

∑p

2 iBc

i =1

wAs xAc cos θ A − wAs y Ac sin θ A − (wBs xBc cos θ B − wBs y Bc sin θ B ) = x0 B − x0 A wAs xAc sin θ A + wAs y Ac cos θ A − (wBs xBc sin θ B + wBs y Bc cos θ B ) = y0 B − y0 A wAs aiA xAc + wAsbiA yAc − wAp piAc ≤ d iA , i = 1,..., N A ,

wBs aiB xBc + wBs biB y Bc − wBp piBc ≤ d iB , piAc ≥ 0, piBc ≥ 0,

i = 1,..., N A , i = 1,..., N B ,

i = 1,..., N B ,

(22) (23) (24)

(25) (26) (27)

where wAp =

rA 1 − kA

(28)

RA kA

(29)

rB 1 − kB

(30)

RB kB

(31)

wAs = wBp = wAs =

Eq. (19) – (27) can be input directly into the second-order cone optimizer in MOSEK. A linear inequality constraint as expressed in Eq. (24) and (25) is introduced for every “plane” i in the particles. Note that the variables wAs, wBs, wAp, wBp will become ill-conditioned when their denominators become zero. Specifically, this happens when the spherical term is absent, or when only the spherical term is present. This implies that some variables are redundant in these special cases, and a more concise SOCP formulation can be derived to replace Eq. (20) – (31). The minimum to Eq. (19), i.e., (xAc*, yAc*) has to be transformed back to the local coordinates of particle A using Eq. (17) and (18). Thereafter, one can find the global

389

Cartesian coordinates using Eq. (7). Once this minimum, say point P2, at coordinates (xp2, yp2) is found, one can establish whether the particles overlap. There is overlap if sA < 1.0 or fA(xp2, yp2) < 0.0. The particles are just touching if fA(xp2, yp2) = 0.0. If fA(xp2, yp2) > 0.0, the particles are not overlapping or touching. Note that this point can be interpreted as the point on particle B which is “closest” to particle A. If there is overlap, we need to carry out a second computation by interchanging the roles of particle A and particle B, i.e., minimize sB subject to sA ≤ 1.0. In other words, we need to find a new point P1 at coordinates (xp1, yp1) on particle A which is “closest” to particle B. Following Houlsby (2009), the overlap distance can be taken as the Euclidean distance between (xp1, yp1) and (xp2, yp2). The contact point can be taken as the weighted mean of points (xp1, yp1) and (xp2, yp2); the weighting factors may depend on the relative stiffness of the particles (Houlsby, 2009). The contact normal can be taken as the combined first derivatives at (xp1, yp1) and (xp2, yp2) (refer to Houlsby (2009) for mathematical details). For a 3-D problem, where particles A and particles B are defined as: fA =

(1 − k A ) ⎛ N A ⎜ ∑ aiA xA + biA yA + ciA z A − d iA rA2 ⎜⎝ i =1

fB =

(1 − k B ) ⎛ N B ⎜ ∑ aiB xB + biB y B + ciB z B − d iB rB2 ⎜⎝ i =1

⎞ k − rA2 ⎟⎟ + A2 ( xA2 + y A2 + z A2 − RA2 ) ⎠ RA ⎞ k 2 − rB2 ⎟⎟ + B2 ( xB2 + y B2 + z B2 − RB2 ) ⎠ RB 2

(32) (33)

the SOCP formulation becomes: minimize sA subject to sB ≤ 1.0 NA

∑p

2 iAc

(34)

2 2 2 + xAc + y Ac + z Ac ≤ sA

(35)

2 2 2 + xBc + y Bc + z Bc ≤ sB

(36)

i =1

NB

∑p

2 iBc

i =1

wAs xAcQA11 + wAs y AcQA12 + wAs z AcQA13 − (wBs xBc QB11 + wBs y Bc QB12 + wBs z BcQB13 ) = x0 B − x0 A (37) wAs xAcQA 21 + wAs y AcQA 22 + wAs z AcQA 23 − (wBs xBc QB 21 + wBs y Bc QB 22 + wBs z Bc QB 23 ) = y0 B − y0 A (38) wAs xAcQA 31 + wAs y AcQA 32 + wAs z AcQA 33 − (wBs xBcQB31 + wBs yBc QB32 + wBs z Bc QB33 ) = z 0 B − z 0 A (39) wAs aiA xAc + wAsbiA y Ac + wAp ciA z Ac − wAp piAc ≤ d iA , i = 1,..., N A , (40) wBs aiB xBc + wBs biB yBc + wBp ciB z Bc − wBp piBc ≤ d iB , piAc ≥ 0, piBc ≥ 0,

i = 1,..., N A , i = 1,..., N B ,

i = 1,..., N B ,

(41) (42) (43)

where Q is the 3-D rotation matrix which can be conveniently be obtained from quaternion transformations (Kuipers, 2002). The variables wAs, wBs, wAp, wBp have been previously defined in Eq. (28) – (31). We have detailed the SOCP formulation for the original formulation based on Eq. (3). The second formulation based on Eq. (4) is similar to Eq. (3), but we: minimise sA+sB subject to sA– sB = 0.0

390

(44)

The rest of the equations for the SOCP remain the same Eq. (20) – (31). If the minimum to this problem, say point P3 at coordinates (xp3, yp3), is “inside” both particles A and particles B, there is overlap. If there is overlap, P3 is taken as the contact point. The contact normal can be taken as the combined normal vectors of the two particles evaluated at (xp3, yp3). The overlap distance can be found by performing a line search along the contact normal and bracketing two points, i.e., one on particle A and the other on particle B. The overlap distance can be calculated from the distance between these two points. 4

SIMULATIONS

Two simulations were run to examine the robustness of the contact detection algorithm. The open-source DEM code YADE (Kozicki & Donzé, 2008; Šmilauer, 2010) was linked to the optimization software MOSEK for the simulations. Simulation A In this simulation, potential particles are used to model the behaviour of granular material. The robustness of the algorithm is tested by simulating a variety of contact conditions involving faces or vertices. First a loose packing of 200 pyramidal particles is generated. Each particle is given a random orientation. Then the particles are allowed to fall under gravity to impact on a surface. Fig. 3 shows the result of the simulation at a number of time steps. Contact detection between every pair of particles potentially in contact is given as an optimization task to MOSEK. Using only one of the cores of a 3.1 GHz Core 2 Duo Processor on a PC with 4GB RAM, each optimization task was found to take a few hundred μs to a few ms on average for MOSEK to solve.

(b)

(a)

(c)

Fig. 3. Two hundred pyramidal particles falling under gravity: (a) loose packing as generated (b) after 4000 time steps (c) after 14000 time steps

Simulation B In this simulation, the contact detection algorithm is used to simulate a sliding wedge problem in rock engineering (see Fig. 4). The model consists of four rigid blocks. Three blocks are fixed with only one wedge being allowed to move under gravity. The following discontinuities (rock joints) are present: A: dip = 40° dip direction = 130° B: dip = 60° dip direction = 220°

391

The critical friction angle at which the free wedge starts sliding is sought. The analytical solution for this problem is given in Hoek & Bray (1974). An elastic perfectly-plastic model with the Mohr-Coulomb yielding surface is assumed for the joint behaviour. This problem is statically determinate and independent of the size of the blocks. Hence, the joint stiffness and density do not affect the solution. To simulate the problem numerically, a high coefficient of friction is first assigned to the discontinuities. Once the wedge reaches static equilibrium, the friction is reduced by a small fraction. This process is repeated until static equilibrium is lost and the wedge starts sliding. The critical friction angle achieved from the simulation was 33.49°. The difference is minor compared to the analytical solution (33.36°) and the 3DEC solution (33.19°) reported by Itasca (2007). The physical behaviour was successfully captured by the contact detection algorithm, and was slightly better than that obtained by 3DEC.

Fig. 4. Sliding wedge example (irregularities along the particle edges are an artifice of the graphical rendering package and are not present in the underlying model)

5

CONCLUSIONS

The method of potential particles introduced by Houlsby (2009) is a new way to define convex particles ranging from circular to polygonal in 2-D and from spherical to polyhedral in 3-D. This paper shows how the contact detection between potential particles can be formulated into a second-order cone program (SOCP). The commercial optimization software MOSEK is used to solve the optimization problem. No modifications have been made to tailor the optimizer specifically to solve this contact problem, and results are encouraging. The simulations show that the contact detection is robust even for particles nearly polygonal in 2-D and nearly polyhedral in 3-D. Moreover, the algorithm does not require the use of any special housekeeping algorithms even for shapes which are almost polyhedral, e.g., to identify the different types of interaction — face-face, face-edge, facevertex, edge-edge, edge-vertex, or vertex-vertex. 6

ACKNOWLEDGEMENT

Dr. Erling Andersen from MOSEK is thanked for highlighting how the Macaulay brackets can be replaced with slack variables. 7

REFERENCES

Andersen, E. D., Roos, C., & Terlaky, T. (2003). “On implementing a primal-dual interiorpoint method for conic quadratic optimization”. Mathematical Programming, 95(2), 249277.

392

Cundall, P. A. (1971). “A computer model for simulating progressive, large scale movement in blocky rock system”. Paper presented at the Sympo. ISRM. , Nancy, France. Cundall, P. A. (1988). “Formulation of a three-dimensional distinct element model--Part I. A scheme to detect and represent contacts in a system composed of many polyhedral blocks”. International Journal of Rock Mechanics and Mining Sciences & Geomechanics Abstracts, 25(3), 107-116. Cundall, P. A., & Strack, O. D. L. (1979). “Discrete numerical model for granular assemblies”. Geotechnique, 29(1), 47-65. Fraige, F. Y., Langston, P. A., & Chen, G. Z. (2008). “Distinct element modelling of cubic particle packing and flow”. Powder Technology, 186(3), 224-240. Harkness, J. (2009). “Potential particles for the modelling of interlocking media in three dimensions”. International Journal for Numerical Methods in Engineering, 80(12), 15731594. Hoek, E., & Bray, J. (1974). Rock Slope Engineering, The Institution of Mining and Metallurgy, London. Houlsby, G. T. (2009). “Potential particles: a method for modelling non-circular particles in DEM”. Computers and Geotechnics, 36(6), 953-959. Itasca. (2007). 3DEC 3-dimensional distinct element code, Itasca Consulting Group Inc. Minneapolis, MN. Kozicki, J., & Donzé, F. V. (2008). A new open-source software developed for numerical simulations using discrete modeling methods. Computer Methods in Applied Mechanics and Engineering, 197(49-50), 4429-4443. Kuipers, J. B. (2002). Quaternions and Rotation Sequences: A Primer with Applications to Orbits, Aerospace and Virtual Reality: Princeton University Press. Lin, X., & Ng, T. T. (1997). “A three-dimensional discrete element model using arrays of ellipsoids”. Geotechnique, 47(2), 319-329. MOSEK. (2010). The Optimisation Tools Manual: MOSEK ApS. Nezami, E. G., Hashash, Y. M. A., Zhao, D., & Ghaboussi, J. (2006). “Shortest link method for contact detection in discrete element method”. International Journal for Numerical and Analytical Methods in Geomechanics, 30(8), 783-801. Pournin, L., & Liebling, T. M. (2005). A generalization of distinct element method to tridimensional particles with complex shapes. Paper presented at the Powders and Grains 2005, Stuttgart. Šmilauer, V. (2010), “Cohesive Particle Model using the Discrete Element Method on the Yade Platform,” PhD thesis, Czech Technical University and Université Grenoble I.

393