.. index:: fix wall/region fix wall/region command ======================= Syntax """""" .. parsed-literal:: fix ID group-ID wall/region region-ID style epsilon sigma cutoff * ID, group-ID are documented in :doc:`fix ` command * wall/region = style name of this fix command * region-ID = region whose boundary will act as wall * style = *lj93* or *lj126* or *colloid* or *harmonic* * epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units) * sigma = size factor for wall-particle interaction (distance units) * cutoff = distance from wall at which wall-particle interaction is cut off (distance units) Examples """""""" .. parsed-literal:: fix wall all wall/region mySphere lj93 1.0 1.0 2.5 Description """"""""""" Treat the surface of the geometric region defined by the *region-ID* as a bounding wall which interacts with nearby particles according to the specified style. The distance between a particle and the surface is the distance to the nearest point on the surface and the force the wall exerts on the particle is along the direction between that point and the particle, which is the direction normal to the surface at that point. Regions are defined using the :doc:`region ` command. Note that the region volume can be interior or exterior to the bounding surface, which will determine in which direction the surface interacts with particles, i.e. the direction of the surface normal. Regions can either be primitive shapes (block, sphere, cylinder, etc) or combinations of primitive shapes specified via the *union* or *intersect* region styles. These latter styles can be used to construct particle containers with complex shapes. Regions can also change over time via the :doc:`region ` command keywords (move) and *rotate*. If such a region is used with this fix, then the of region surface will move over time in the corresponding manner. .. warning:: As discussed on the :doc:`region ` command doc page, regions in LIGGGHTS(R)-PUBLIC do not get wrapped across periodic boundaries. It is up to you to insure that periodic or non-periodic boundaries are specified appropriately via the :doc:`boundary ` command when using a region as a wall that bounds particle motion. This also means that if you embed a region in your simulation box and want it to repulse particles from its surface (using the "side out" option in the :doc:`region ` command), that its repulsive force will not be felt across a periodic boundary. .. warning:: For primitive regions with sharp corners and/or edges (e.g. a block or cylinder), wall/particle forces are computed accurately for both interior and exterior regions. For *union* and *intersect* regions, additional sharp corners and edges may be present due to the intersection of the surfaces of 2 or more primitive volumes. These corners and edges can be of two types: concave or convex. Concave points/edges are like the corners of a cube as seen by particles in the interior of a cube. Wall/particle forces around these features are computed correctly. Convex points/edges are like the corners of a cube as seen by particles exterior to the cube, i.e. the points jut into the volume where particles are present. LIGGGHTS(R)-PUBLIC does NOT compute the location of these convex points directly, and hence wall/particle forces in the cutoff volume around these points suffer from inaccuracies. The basic problem is that the outward normal of the surface is not continuous at these points. This can cause particles to feel no force (they don't "see" the wall) when in one location, then move a distance epsilon, and suddenly feel a large force because they now "see" the wall. In the worst-case scenario, this can blow particles out of the simulation box. Thus, as a general rule you should not use the fix wall/region command with *union* or *interesect* regions that have convex points or edges. The energy of wall-particle interactions depends on the specified style. For style *lj93*, the energy E is given by the 9/3 potential: .. image:: Eqs/fix_wall_lj93.jpg :align: center For style *lj126*, the energy E is given by the 12/6 potential: .. image:: Eqs/pair_lj.jpg :align: center For style *colloid*, the energy E is given by an integrated form of the :doc:`pair_style colloid ` potential: .. image:: Eqs/fix_wall_colloid.jpg :align: center For style *wall/harmonic*, the energy E is given by a harmonic spring potential: .. image:: Eqs/fix_wall_harmonic.jpg :align: center In all cases, *r* is the distance from the particle to the region surface, and Rc is the *cutoff* distance at which the particle and surface no longer interact. The energy of the wall potential is shifted so that the wall-particle interaction energy is 0.0 at the cutoff distance. For the *lj93* and *lj126* styles, *epsilon* and *sigma* are the usual Lennard-Jones parameters, which determine the strength and size of the particle as it interacts with the wall. Epsilon has energy units. Note that this *epsilon* and *sigma* may be different than any *epsilon* or *sigma* values defined for a pair style that computes particle-particle interactions. The *lj93* interaction is derived by integrating over a 3d half-lattice of Lennard-Jones 12/6 particles. The *lj126* interaction is effectively a harder, more repulsive wall interaction. For the *colloid* style, *epsilon* is effectively a Hamaker constant with energy units for the colloid-wall interaction, *R* is the radius of the colloid particle, *D* is the distance from the surface of the colloid particle to the wall (r-R), and *sigma* is the size of a constituent LJ particle inside the colloid particle. Note that the cutoff distance Rc in this case is the distance from the colloid particle center to the wall. The *colloid* interaction is derived by integrating over constituent LJ particles of size *sigma* within the colloid particle and a 3d half-lattice of Lennard-Jones 12/6 particles of size *sigma* in the wall. For the *wall/harmonic* style, *epsilon* is effectively the spring constant K, and has units (energy/distance^2). The input parameter *sigma* is ignored. The minimum energy position of the harmonic spring is at the *cutoff*. This is a repulsive-only spring since the interaction is truncated at the *cutoff* .. warning:: For all of the styles, you must insure that r is always > 0 for all particles in the group, or LIGGGHTS(R)-PUBLIC will generate an error. This means you cannot start your simulation with particles on the region surface (r = 0) or with particles on the wrong side of the region surface (r < 0). For the *wall/lj93* and *wall/lj126* styles, the energy of the wall/particle interaction (and hence the force on the particle) blows up as r -> 0. The *wall/colloid* style is even more restrictive, since the energy blows up as D = r-R -> 0. This means the finite-size particles of radius R must be a distance larger than R from the region surface. The *harmonic* style is a softer potential and does not blow up as r -> 0, but you must use a large enough *epsilon* that particles always reamin on the correct side of the region surface (r > 0). Restart, fix_modify, output, run start/stop, minimize info """""""""""""""""""""""""""""""""""""""""""""""""""""""""" No information about this fix is written to :doc:`binary restart files `. The :doc:`fix_modify ` *energy* option is supported by this fix to add the energy of interaction between atoms and the wall to the system's potential energy as part of :doc:`thermodynamic output `. This fix computes a global scalar energy and a global 3-length vector of forces, which can be accessed by various :ref:`output commands `. The scalar energy is the sum of energy interactions for all particles interacting with the wall represented by the region surface. The 3 vector quantities are the x,y,z components of the total force acting on the wall due to the particles. The scalar and vector values calculated by this fix are "extensive". No parameter of this fix can be used with the *start/stop* keywords of the :doc:`run ` command. The forces due to this fix are imposed during an energy minimization, invoked by the :doc:`minimize ` command. .. warning:: If you want the atom/wall interaction energy to be included in the total potential energy of the system (the quantity being minimized), you MUST enable the :doc:`fix_modify ` *energy* option for this fix. Restrictions """""""""""" none Related commands """""""""""""""" :doc:`fix wall/lj93 `, :doc:`fix wall/lj126 `, :doc:`fix wall/colloid `, :doc:`fix wall/gran ` **Default:** none .. _liws: http://www.cfdem.com .. _ld: Manual.html .. _lc: Section_commands.html#comm