Modelling Granular Soil Behaviour Using a Physics Engine
Total Page:16
File Type:pdf, Size:1020Kb
Pytlos, M. et al. (2015) Géotechnique Letters 5, 243–249, http://dx.doi.org/10.1680/jgele.15.00067 Modelling granular soil behaviour using a physics engine M. PYTLOS*, M. GILBERT* and C. C. SMITH* A physics engine is a software library used in the film and computer games industries to realistically animate a physical system. In this paper it is shown that particulate media can be faithfully modelled using a rigid body physics engine, thereby providing a viable alternative to the discrete element method codes currently used in the field of geomechanics. An overview of the simulation method implemented in the widely used Box2D physics engine is provided, and it is shown that this tool can successfully capture the critical state response of granular media, using particles modelled as randomly shaped polygons. KEYWORDS: discrete-element modelling; particle-scale behaviour ICE Publishing: all rights reserved NOTATION INTRODUCTION db diameter of a circle bounding the full extent of a given The discrete element method (DEM) has proved increasingly particle popular as a research tool in the field of geomechanics since e coefficient of restitution its introduction to the community by Cundall & Strack I moment of inertia about contact point (1979). However, it has been somewhat handicapped by Jt tangential corrective impulse j magnitude of normal corrective impulse long simulation run times, and the hope that improvements n in computer power alone would solve this problem, as jt magnitude of tangential corrective impulse L initial length per row of discs in vertical direction expressed by Cundall (2001), may have been misplaced. In m mass fact processor performance gains have been slowing down nˆ contact normal unit vector with every new generation, and this trend is unlikely to p position of contact point change in the near future (Esmaeilzadeh et al., 2012). þ p˙ post-tangential impulse translational velocity of Significant reductions in DEM run times are possible by contact point À using high-performance parallel computing platforms p˙ pre-impulse translational velocity of contact point ’ r (O Sullivan, 2015), but the beneficiaries, at least in the vector from centre of mass of body to contact point short term, are primarily likely to be researchers with access t time tˆ contact tangential unit vector to supercomputers. To address this it seems worthwhile to v translational velocity of body look at alternatives to DEM. In particular, the physics based v ++ post-normal impulse translational velocity of body animation tools used in the computer games and film v + post-tangential impulse translational velocity of body industries, referred to as ‘physics engines’, appear worthy v − pre-impulse translational velocity of body of investigation. Physics engines are software libraries x position of centre of mass which employ a wide variety of simulation techniques; con- β deviation of tangent at contact point between sliding sidering rigid body simulation, a good overview was discs from direction of principal stress Δ provided by Erleben (2005), and, more recently, by Bender t time step size et al. (2014). For games the simulation needs to be real-time; δ vertical displacement of top row of discs μ coefficient of friction thus traditionally physics engines favour speed, robustness and stability over accuracy. There is, however, a demand for μg particle coefficient of friction during sample gener- ation stage more physical realism in video games and simulation μs particle coefficient of friction during shearing stage methods are continually being improved. A list of commer- σ1 major principal stress cial and open-source physics engines is provided by Bender σ2 minor principal stress et al. (2012). Early attempts at modelling soil have been ϕμ angle of particle surface friction described by Izadi & Bezuijen (2015) using the open-source ϕ crit critical state friction angle Bullet physics engine (Coumanns, 2012) and by Pytlos et al. Ω rotation of body (2015) using the open-source Box2D physics engine (Catto, ω rotational velocity of body ++ 2011), both with promising results. The aim of this paper is ω post-normal impulse rotational velocity of body ω+ post-tangential impulse rotational velocity of body to provide a more thorough verification of the physical ω− pre-impulse rotational velocity of body correctness of the simulations that can be obtained using Box2D in the context of soil modelling; this will help to establish whether Box2D is a viable alternative to the two-dimensional DEM codes currently used in the geome- chanics field. Manuscript received 7 May 2015; first decision 1 June 2015; accepted 12 August 2015. Published online at www.geotechniqueletters.com on 29 BOX2D October 2015. Box2D is a two-dimensional physics engine which simulates *Department of Civil and Structural Engineering, University of the dynamic interaction between discrete bodies. The con- Sheffield, Sheffield, UK tinuous motion of bodies is discretised in the time domain 243 Downloaded by [ UNIVERSITY OF SHEFFIELD] on [19/07/16]. Copyright © ICE Publishing, all rights reserved. 244 Pytlos, Gilbert and Smith and the simulation progressed using a time-stepping scheme. Each time step can be viewed as a sub-problem, where the task is first to calculate the rate of change of movements, and 1 1 then to update the variables describing the state of each p body. Objects are idealised as rigid bodies and free body nˆ 1 motion is governed by the Newton–Euler equations. nˆ p2 p1 = p2 2 2 Contact model (a) (b) Simulation of an assembly of granular particles requires the equations of motion to be augmented in order to prevent bodies from inter-penetrating and to model friction; this is achieved by means of the contact model. Whereas a traditional DEM code based on the distinct element method (Cundall & Strack, 1979) uses a penalty based 1 contact model, in Box2D a constraint based contact model is p used, which is more akin to the ‘contact dynamics’ approach 2 nˆ considered by Jean (1999) and Radjai & Richefeu (2009). p1 This can be considered to be the main difference between Box2D and traditional DEM approaches. 2 Consider two bodies in contact as shown in Fig. 1(b). The state of each body i, which has mass mi, is defined by (c) the position of the centre of mass, xi, translational velocity, vi, rotation, Ωi and rotational velocity, ωi. The contact is nˆ Fig. 1. Non-penetration constraint between two bodies: defined in terms of the contact normal unit vector, , contact (a) C > 0; (b) C = 0; (c) C <0 tangential unit vector, tˆ, coefficient of friction, μ, and, for n n n both bodies, the position of the contact point, pi, and the moment of inertia about the contact point Ii. The non- penetration constraint can be formulated as follows In a given time step the solver first computes tentative, or ¼ ðÞÁp À p nˆ ð Þ À À Cn 1 2 0 1 ‘ ’ v ω pre-impulse , velocities i and i for each body, assuming free body motion. For a pair of bodies in contact (Cn ≤ 0) If the bodies are in contact (Cn ≤ 0) the tangential constraint, which is used in conjunction with the Coulomb these velocities are then tested against the tangential con- ˙ ¼ J ¼ tˆ friction law to simulate friction between the bodies, can be straint (Ct 0). The solver computes an impulse,ÀÁt jt , p˙À À p˙À Á tˆ defined as which instantly changes the relative velocity 1 2 in order to prevent violation of the constraint. The magnitude ¼ ðÞÁp À p tˆ ¼ ð Þ Ct 1 2 0 2 of the impulse is calculated from ÀÁ In the distinct element method violation of the constraints, À p˙À À p˙À Á tˆ illustrated in Fig. 1(c), is allowed and can be considered to be j ¼ 1 2 ð7Þ t ðr? Á tˆÞ2 ðr? Á tˆÞ2 an inherent feature of the contact model. In a given time step 1 þ 1 þ 1 þ 2 the violations are calculated for the current state of the m1 m2 I1 I2 system. Force–displacement laws are then used to add forces r p − x to the system in order to minimise the violations. The where i = i i. The magnitude of the impulse is limited by ’ penalty method is easy to implement and theoretically very Coulomb s friction law fast because of the simple computations involved. However, À μjn jt μjn ð8Þ in practice, stability of the simulation necessitates the use of a very small time step size, so that run times can be very long. where jn is the magnitude of the impulse in the normal A second disadvantage of the penalty method is that the collision direction. If jt calculated in equation (7) is outside contact parameters do not represent real physical properties the friction limit, its value is reduced and the tangential of the particles, and are instead ‘tuned’ in order to achieve constraint will not be satisfied (the bodies will slide). The vþ ωþ the desired macro-level behaviour (O’Sullivan. 2011). post-impulse velocities for each body, i and i , are then In Box2D, a constraint-based approach is used. For a pair calculated from of bodies in contact (C ≤ 0), the constraints are formulated n ˆ ˆ at the velocity level þ À jtt þ À jtt v ¼ v þ v ¼ v À ð9Þ 1 1 m 2 2 m ˙ ¼ ðÞÁp˙ À p˙ nˆ þ ðÞÁp À p nˆ˙ ð Þ 1 2 Cn 1 2 1 2 0 3 r? Á j tˆ r? Á j tˆ ˙ ¼ ðÞÁp˙ À p˙ tˆ þ ðÞÁp À p ˆ˙ ¼ ð Þ ωþ ¼ ωÀ þ 1 t ωþ ¼ ωÀ À 2 t ð10Þ Ct 1 2 1 2 t 0 4 1 1 2 2 I1 I2 p˙ ¼ v þ ω ðp À x Þ? where i i i i i .