Simulating a pseudo 2D box

Submitted by jrpb on Wed, 07/04/2012 - 23:54

I'm trying to simulate a 2D box with a fixed number of particles (spheres). Once the particles are inserted, one of the walls moves to pack the configuration, while the opposite wall rolls using the conveyor option. I got this part working. My problem is the following: I read in these forums that it's advised to use a thin simulation box instead of the 2D-related commands. I managed to get the thin box with the following lines:


region reg block 0 0.85*${sigma} 0 $l 0 $l units box
variable tmp equal $l-${sigma}
region insreg block 0 0.85*${sigma} 0 $l 0 ${tmp} units box
[...]
fix xwalls all wall/gran/hertz/history 1 0 xplane 0 ${sigma} 1

Where l is the box's side and sigma the particles' diameter, and insreg is my particle insertion region. Adding the 0.85 factor forces spheres to stay within a thin box, otherwise there would be a small movement component in the coordinate I'm trying to suppress (X, in my case). I tried different values for the factor and it doesn't seem to matter as long as it yields a width smaller than sigma and the xwalls remain equal or larger than sigma. Is this an appropriate way of achieving what I described at the beginning?

Also, eventually I would like to add particles of different radii. Is there a way of constructing a thin slice that will prevent spheres from moving in a given direction? This doesn't seem feasible with my current approach.

Thanks in advance.

EDIT: I'm using LIGGGHTS 1.5.3. Also, attached the whole script in case anybody wants to take a closer look.