As promised in my last blog entry, having talked a little about why I am interested in simulating granular material (i.e. materials made up of distinct particles), I want to talk a little now about some of the tools I’m using. Of course all are free and open source – so you can download them and give it a try yourself!
Granular materials are oddities – sometimes they can behave like solids, and form stable structures, and sometimes they behave like liquids, and flow and pour. And sometimes they transition readily between the two! Because of this wide ranging behaviour, we don’t (yet!) have a nice set of equations to describe their bulk behaviour (as we for do, say, for gases). Instead, it is possible to build numerical models of granular systems by modelling the behaviour of individual particles, their interactions with other particles, walls, etc. This may sound complex, but much of the complexity is in how to computationally deal with tracking enough particles to be useful, not in the underlying physics. So if we can correctly describe the interactions of a pair of particles, we should be able to describe a system of billions of such particles – providing we have enough time and computing power!
This technique is called the Discrete Element Method (DEM) and is an extension of molecular dynamics to deal with larger particles which have a finite size and a rotational degree of freedom. There are several open source codes available which you might like to look into – I have played with three: ESyS-Particle, YADE and LIGGGHTS. Each has its own advantages, and in fact I ended up using bits of each (a geometry building module from ESyS called LSMGenGeo, some YADE scripts to build ballistic aggregates, and LIGGGHTS for my “grunt work”). In this post I’ll focus mainly on LIGGGHTS, since it is the engine at the heart of most of the calculations I’m working on right now.
LIGGGHTS is a fork of the popular molecular dynamics code LAMMPS with enhancements to better deal with the macroscopic particles used in granular mechanics simulations. As such, the computational complexity of stably integrating the equations of motions for millions of particles, and figuring out which particles are interacting, is already well-validated by the many LAMMPS users. The enhancements made by the LIGGGHTS team focus on the contact models (the physics of two particles interacting), linking the DEM model to a fluid dynamics code (OpenFOAM), allowing importing of CAD meshes for greater flexibility, and a host of utilities to enable generating of complex particle packings, support for non-spherical particles and so on. You can check out a recent presentation by the LIGGGHTS team [PDF] for more details!
My aim is ultimately to come up with a validated model of a cometary surface which accounts for low gravity, the various inter-particle forces, and the surface environment. But before one can run, one has to learn to walk – hence I’ve been playing with LIGGGHTS and trying to make a set of simulations that demonstrate the main features I want to include in my model. So for the the next few posts, I’m going to link a few YouTube videos showing output from LIGGGHTS and talk a little about them. If you want a sneak preview, you can jump to the YouTube playlist of these videos!