[lammps-users] Hex and Sq2 Lattice

Hi,

I am trying to create a geometry such that a circle touches a rectangular box. I used two lattice types. (i) Hex and (ii) Sq2. To my surprise i found that the two geometries look different. I am attaching a .doc file to this mail.

When I used the Hex lattice type, the circle became smaller and there is distance of seperation between the rectangular box and the circle. But when I used the Sq2 type, the circle is according to the dimensions i specified and the circle is touching the rectangular box, the way it should be. Also, when i am applying a force to the circle or ‘fix’ something on the circle with Sq2 lattice, it gives a “segmentation fault” error. If i bring the circle in Hex lattice on to the rectangular box, it runs fine. A portion of the code is available in the .doc file attached.

So i would like to know whether I am missing anything here because i want the circle with proper dimensions touching the rectangular box and it should work fine with the ‘fix’ command.

Thanks in advance.

Peri.

Query.doc (142 KB)

I presume you are using lj units. I think the issue is that of
lattice units versus box units. The mapping between the
two is different when a reduced density of 0.9 is converted
into a lattice spacing for sq2 vs hex lattices. See the discussion
in the "lattice" command doc page. So to get a density of
0.9, one of the 2 will have a larger spacing ... hence a 30x30
lattice will be physically larger.

The region command has a box/lattice "units" keyword which can
help you do what you want. I think your seg fault is due to
creating a geometry with overlaps in the latter case.

Steve