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!
25 thoughts on “Granular simulations using LIGGGHTS”
I am interested to simulate projectiles hitting a granular bed. Which among the three packages you have cited above would be best according to you? I believe YADE is available only for Debian platforms and, therefore, is already restrictive?
YADE has binary packages available for Debian/Ubuntu, making it super easy to install – but you can also just grab the source and build it, as long as you have the necessary packages installed. As for which is best – it’s hard to say without knowing what you want to do. It depends on how many particles you need to model, if you’re happy with the built-in constitutive laws or want to write your own etc. etc.
I am using LIGGGHTS for simulating granular flow. But, it involves irregular particles, but LIGGGHTS hasnt publicized its multi sphere model. I see you use YADE for creating aggregate and then use LIGGGHTS for simulation, could you please tell how you achieve that? Also, is it posible to create some irregular geometries and use LIGGGHTS for calculation?
You’re right, the multi-sphere model in LIGGGHTS has not yet been made public. YADE has functions for building “clumps” (rigid groups of non-overlapping spheres) and then packing these into a region (makeClumpCloud). I simply used this and wrote the resulting particle positions, IDs etc. to a file which can be read by read_data in LIGGGHTS. One can then use a hybrid sphere/molecular pair style which allows particles to be “bonded” together. You can also switch off calculation of forces between particles that are part of the same clump. It works, but it runs rather slowly compared to a simple monodisperse simulation…
I am working on a compression test simulation in LIGGGHTS. Now I stumbled over your 2D stress chains simulating in LIGGGHTS and want to ask in witch program you did the visualization of the stress chain? I am using Paraview, but all I got was coloring the particles by stress. Did you use Visit?
I am using Paraview, yes – you have to dump contact information (dump local) in LIGGGHTS and then convert that to VTK. You can find some example code that I wrote here: https://code.google.com/p/liggghts-force-chains/ But you’ll have to modify it for your needs. This writes a VTK which connects the centres of particles in contact with a line, which you can then colour by force. If you want the thickness of the line to represent the force, you have to add some more filters in Paraview, i.e. data->CellDatatoPointData->ExtractSurface->Tube. Good luck!
hi,i’d like working with LIGGGHTS in my job. im Student and im working in polymer institut. they want from me that I simulate many polymer production with LIGGGHTS .
Can you give me a tutorial for working with LIGGGHTS ?
thanks a lot
Unfortunately there are no simple tutorials for using LIGGGHTS, so your best option is to start from the provided examples, understand each line in the script by reading the documentation, and then start modifying and seeing what happens…
I found your post quite helpful in starting off with LIGGGHTS. I’m an experienced user of CFD and have recently moved into particle dynamics, continuing work on the existing code in the group. I wanted to evaluate CFD-DEM but first want to learn LIGGGHTS. I wonder whether I need to learn LAMMPS before starting to work on LIGGGHTS? Is the documentation of LIGGGHTS self-contained to start working with the tutorials?
Hi Sam – I jumped straight into LIGGGHTS, and since the documentation is a fork of that for LAMMPS most of the details are still well described. However, there is still terminology from LAMMPS that lingers in LIGGGHTS and can be confusing and it sometimes it’s worth stepping back and seeing a command in its original context (i.e. molecular dynamics type simulations). Good luck!
Hi, I am new to LIGGGHTS, can you provide sample codes or examples.
The best place to start is with the supplied examples; they show what is needed, but not much more. Working through one or two of these whilst consulting the manual was how I started – then you can start to customise one for your own needs.
Can anybody tell me how to create 2D crystalline structure of granular beads using LIGGGHTS?
I came across your 2D compression model with stresses networks. I have been working in LIGGGHTS only in 3D. Now I want to simulate the compression test in 2D. Can you tell me how to model 2D compression in LIGGGHTS ??? and also if I can use OVITO for visualization or only paraview is supported, because so far I have used OVITO.
Thanks & regards
LIGGGHTS is inherently 3D, so this is a 3D simulation with periodic boundary conditions at the front/back of the slice… I haven’t used OVITO, but it reads LAMMPS dump files – if it doesn’t already work with LIGGGHTS, it should be an easy thing to get working…
Thanks for replying, so you are saying there is no separate 2D modeling in LIGGGHTS, got it. Now if I want to visualize my dump files in 2D, like you had posted your 2D compression test -stress networks in youtube, which visualization package should I use ??
Currently in OVITO, I am to visualize only 3D dump files from LIGGGHTS perfectly
Correct, LIGGGHTS is all 3D! You can try to simulate 2D by removing some degrees of freedom… I have only used ParaView for visualisation. I generated the stress chain data VTK file with the following script: https://github.com/msbentley/liggghts-utils/blob/master/dump2force.py
Thanks a lot. I too will try the same and get back to you if I have any doubts
I am in the starting phase of my PhD project of simulating dust explosion using coupled approach for LIGGGHTS and openfoam. I need to develop a model that should be able to simulate the dust particle distribution across the vessel (dust is injected in the vessel with pressurized air) with respect to time, their ignition and propagation of the flame across the dust cloud and eventually the maximum pressure generation as a result of the explosion. Could you please guide me if this could be achieved. I am new to CFDEM simulations and would really appreciate if you could point me in a direction to start with.
I intend to model the fluid flow through porous media using coupled DEM-CFD. It is mainly about the behavior and interactions of soil grains in the presence of interstitial water flow (probably in 3 dimensions). Soil particles are non-spherical, and they are assumed to be potentially detachable (not fixed); thus, fluid boundaries are deformable. I personally do not have any experience with any of these software tools, and I’m not sure which one I should use. Ease of use and performance are considered as important factors to me. I was wondering if you could help me.
I’m afraid I’ve only ever done “pure” DEM, no coupled CDF/DEM simulations – sorry I can’t be more help!
I’m afraid I’ve never used DEM-CFD and haven’t evaluated the tools available. Sorry!
I’ve just noticed your post about granular simulations for the first time. I’m doing a parallelization of an open-source code MercuryDPM which realizes Discrete Particle Method (as far as I understand currently – a subtype of DEM). I must read this post carefully 🙂
Greetings from Graz,
Is there anyone know how to insert particles from text or data file in LIGGGHTS? Any kind of suggestions is highly appreciated. Thanks
Sure, just use the
read_datacommand (see the docs)