Defining Shells

In my LAMMPS program, I have a spherical particle with a known radius. I am trying to create regions around this at a set radius*x distance from the particle. In effect, I am trying to create increasingly large hollow spheres around the particle.

My current method, using the following code:

`region deltaTwo sphere v_liquidCenterX v_liquidCenterY v_liquidCenterZ v_twiceRad side out

region deltaThree sphere v_liquidCenterX v_liquidCenterY v_liquidCenterZ v_threeRad side out

region deltaFour sphere v_liquidCenterX v_liquidCenterY v_liquidCenterZ v_fourRad side out

region deltaFive sphere v_liquidCenterX v_liquidCenterY v_liquidCenterZ v_fiveRad side out

region innerSphere sphere v_liquidCenterX v_liquidCenterY v_liquidCenterZ v_radius

region intersectSphere1 union 2 deltaTwo innerSphere side out

region intersectSphere2 union 2 deltaTwo deltaThree side out

region intersectSphere3 union 2 deltaFour deltaThree side out

region intersectSphere4 union 2 deltaFive deltaFour side out`

has not been successful. The regions tend to overlap. Any advice?

There are two conceptual problems:

  • to get a spherical shell region, you need to have the intersection of two sphere regions (i.e. where they overlap), not the union (where any of the region is defined)
  • you need pairs of “side out” and “side in” regions for the inner and outer boundary definitions