Conference PaperPDF Available

Towards a graph neural network solver for granular dynamics

Authors:

Abstract

The discrete element method (DEM) is a versatile but computationally intensive method for granular dynamics simulation. We investigate the possibility of accelerating DEM simulations using graph neural networks (GNN), which automatically support variable connectivity between particles. This approach was recently found promising for particle-based simulation of complex fluids [1]. We start from a time-implicit, or nonsmooth, DEM [2], where the computational bottleneck is the process of solving a mixed linear complementarity problem (MLCP) to obtain the contact forces and particle velocity update. This solve step is substituted by a GNN, trained to predict the MLCP solution. Following [1], we employ an encoder-process-decoder structure for the GNN. The particle and connectivity data is encoded in an input graph with particle mass, external force, and previous velocity as node attributes, and contact overlap, normal, and tangent vectors as edge attributes. The sought solution is represented in the output graph with the updated particle velocities as node attributes and the contact forces as edge attributes. In the intermediate processing step, the input graph is converted to a latent graph, which is then advanced with a fixed number of message passing steps involving a multilayer perceptron neural network for updating the edge and node values. The output graph, with the approximate solution to the MLCP, is finally computed by decoding the last processed latent graph. Both a supervised and unsupervised method are tested for training the network on granular simulation of particles in a rotating or static drum. AGX Dynamics [3] is used for running the simulations, and Pytorch [4] in combination with the Deep Graph Library [5] for the learning. The supervised model learns from ground truth MLCP solutions, computed using a projected Gauss-Seidel (PGS) solver, sampled from 1200 simulations involving 50-150 particles. The unsupervised model learns to minimize a loss function derived from the MLCP residual function using particle configurations extracted from the same simulations but ignoring the approximate solution from the PGS solver. The simulation samples are split into training data (80%), validation data (10%), and test data (10%). Network hyperparameter optimization is performed. The supervised GNN solver reaches an error level of 1% for the contact forces and 0.01% on the particle velocities for a static drum. For a rotating drum, the respective errors are 10% and 1%. The unsupervised GNN solver reaches 1% velocity errors, 5% normal forces errors, but it has significant problems with predicting the friction forces. The latter is presumably because of the discontinuous loss function that follows from the Coulomb friction law and therefore we explore regularization of it. Finally, we discuss the potential scalability and performance for large particle systems.
Towards a graph neural network solver for granular dynamics
Martin Servin*, Holger Götz, Tomas Berglund, and Erik Wallin
Department of Physics, Umeå University, SE-90187 Umeå, Sweden
* e-mail: martin.servin@umu.se, web page: http://digitalphysics.se
Algoryx Simulation AB, Umeå, Sweden. http://www.algoryx.se
ABSTRACT
The discrete element method (DEM) is a versatile but computationally intensive method for granular
dynamics simulation. We investigate the possibility of accelerating DEM simulations using graph
neural networks (GNN), which automatically support variable connectivity between particles. This
approach was recently found promising for particle-based simulation of complex fluids [1]. We start
from a time-implicit, or nonsmooth, DEM [2], where the computational bottleneck is the process of
solving a mixed linear complementarity problem (MLCP) to obtain the contact forces and particle
velocity update. This solve step is substituted by a GNN, trained to predict the MLCP solution.
Following [1], we employ an encoder-process-decoder structure for the GNN. The particle and
connectivity data is encoded in an input graph with particle mass, external force, and previous
velocity as node attributes, and contact overlap, normal, and tangent vectors as edge attributes. The
sought solution is represented in the output graph with the updated particle velocities as node
attributes and the contact forces as edge attributes. In the intermediate processing step, the input
graph is converted to a latent graph, which is then advanced with a fixed number of message passing
steps involving a multilayer perceptron neural network for updating the edge and node values. The
output graph, with the approximate solution to the MLCP, is finally computed by decoding the last
processed latent graph.
Both a supervised and unsupervised method are tested for training the network on granular
simulation of particles in a rotating or static drum. AGX Dynamics [3] is used for running the
simulations, and Pytorch [4] in combination with the Deep Graph Library [5] for the learning. The
supervised model learns from ground truth MLCP solutions, computed using a projected Gauss-
Seidel (PGS) solver, sampled from 1200 simulations involving 50-150 particles. The unsupervised
model learns to minimize a loss function derived from the MLCP residual function using particle
configurations extracted from the same simulations but ignoring the approximate solution from the
PGS solver. The simulation samples are split into training data (80%), validation data (10%), and test
data (10%). Network hyperparameter optimization is performed. The supervised GNN solver reaches
an error level of 1% for the contact forces and 0.01% on the particle velocities for a static drum. For a
rotating drum, the respective errors are 10% and 1%. The unsupervised GNN solver reaches 1%
velocity errors, 5% normal forces errors, but it has significant problems with predicting the friction
forces. The latter is presumably because of the discontinuous loss function that follows from the
Coulomb friction law and therefore we explore regularization of it. Finally, we discuss the potential
scalability and performance for large particle systems.
REFERENCES
[1] A. Sanchez-Gonzalez, J. Godwin, T. Pfaff, R. Ying, J. Leskovec, and P. Battaglia. Learning to
Simulate Complex Physics with Graph Networks”, Int. Conf. M L. arXiv:2002.09405 (2020).
[2] M. Servin, D. Wang, C. Lacoursière, and K. Bodin. Examining the smooth and nonsmooth
discrete element approaches to granular matter. Int. J. Num. Meth. Engng., 97, 878-902 (2014).
[3] AGX Dynamics, https://www.algoryx.se/agx-dynamics, Accessed: 2020-03-13.
[4] A. Paszke et al. PyTorch: An imperative style, high-performance deep learning library”,
NeurIPS, 8024-8035 (2019).
[5] M. Wang et al. Deep graph library: A graph-centric, highly-performant package for graph
neural networks”, arXiv:1909.01315 (2019).
ResearchGate has not been able to resolve any citations for this publication.
Article
Full-text available
The smooth and nonsmooth approaches to the discrete element method (DEM) are examined from a computational perspective. The main difference can be understood as using explicit versus implicit time integration. A formula is obtained for estimating the computational effort depending on error tolerance, system geometric shape and size, and on the dynamic state. For the nonsmooth DEM, a regularized version mapping to the Hertz contact law is presented. This method has the conventional nonsmooth and smooth DEM as special cases depending on size of time step and value of regularization. The use of the projected Gauss-Seidel solver for nonsmooth DEM simulation is studied on a range of test systems. The following characteristics are found. Firstly, the smooth DEM is computationally more efficient for soft materials, wide and tall systems, and with increasing flow rate. Secondly, the nonsmooth DEM is more beneficial for stiff materials, shallow systems, static or slow flow and with increasing error tolerance. Furthermore, it is found that just as pressure saturates with depth in a granular column, due to force arching, also the required number of iterations saturates and become independent of system size. This effect make the projected Gauss-Seidel solver scale much better than previously thought.
Learning to Simulate Complex Physics with Graph Networks
  • A Sanchez-Gonzalez
  • J Godwin
  • T Pfaff
  • R Ying
  • J Leskovec
  • P Battaglia
A. Sanchez-Gonzalez, J. Godwin, T. Pfaff, R. Ying, J. Leskovec, and P. Battaglia. "Learning to Simulate Complex Physics with Graph Networks", Int. Conf. M L. arXiv:2002.09405 (2020).
PyTorch: An imperative style, high-performance deep learning library
  • A Paszke
A. Paszke et al. "PyTorch: An imperative style, high-performance deep learning library", NeurIPS, 8024-8035 (2019).
Deep graph library: A graph-centric, highly-performant package for graph neural networks
  • M Wang
M. Wang et al. "Deep graph library: A graph-centric, highly-performant package for graph neural networks", arXiv:1909.01315 (2019).