Contact Resolution for General Level Surfaces using Automatic Differentiation

A contact resolution algorithm for generic shapes based on level surfaces in DEM is presented. The algorithm is based on [1]. This algorithm is only able to detect whether or not two general shapes are in contact. In the case of small particles with electrostatic forces, contact detection is not sufficient, as inter-particle forces are active even if they are not in contact. It is therefore extended here to obtain the distance between the particles, or the virtual overlap, and the initial contact point. From a user point of view, these algorithms for general irregular shapes are not very attractive. They require the solution of a system of nonlinear equations. A NewtonRaphson approach to linearise these equations leads to a series of linear equations containing the gradients and the Hessians of the level surfaces. These gradients and Hessians generally have to be obtained explicitly, either by manually deriving the function, or by some symbolic algebra package. In addition, they have to be coded and debugged by the user. These steps make the implementation of new shapes, although trivial, error-prone and time-consuming. Derivation, however, is a mechanistic process, and there is no reason why a software component being able to execute the evaluation of a function, specified by the user in the form of an algorithm, would not also be capable of providing partial derivatives of any order. Here a technique, called Automatic Differentiation (AD) is used to accomplish this. By the use of AD, the user only has to provide the code for the evaluation of the level surface. Under the hood, the software provides first and second order partial derivatives automatically to construct the linear systems for contact resolution. The use of DEM as a numerical technique for investigating granular flow problems and eventually for engineering bulk handling systems is very promising. Yet there are many scientific and numerical issues that need to be solved before these promises can become a reality. One of these problems is dealing with irregular shapes. Several approaches have been taken to treat irregular shapes. Some of them