2010-01-09 06:54:29 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
fix wall/region command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
|
|
|
fix ID group-ID wall/region region-ID style epsilon sigma cutoff :pre
|
|
|
|
|
|
|
|
ID, group-ID are documented in "fix"_fix.html 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) :ul
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
fix wall all wall/region mySphere lj93 1.0 1.0 2.5 :pre
|
|
|
|
|
|
|
|
[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 "region"_region.html 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
|
2010-01-12 04:54:59 +08:00
|
|
|
construct particle containers with complex shapes. Regions can also
|
|
|
|
change over time via keywords like {linear}, {wiggle}, and {rotate},
|
|
|
|
which when used with this fix, have the effect of moving the region
|
|
|
|
surface in a prescribed manner.
|
2010-01-09 06:54:29 +08:00
|
|
|
|
|
|
|
IMPORTANT NOTE: As discussed on the "region"_region.html command doc
|
|
|
|
page, regions in LAMMPS 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 "boundary"_boundary.html command when
|
2010-07-21 03:11:41 +08:00
|
|
|
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
|
|
|
|
"region"_region.html command), that its repulsive force will not be
|
|
|
|
felt across a periodic boundary.
|
2010-01-09 06:54:29 +08:00
|
|
|
|
|
|
|
IMPORTANT NOTE: 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.
|
|
|
|
LAMMPS 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:
|
|
|
|
|
|
|
|
:c,image(Eqs/fix_wall_lj93.jpg)
|
|
|
|
|
|
|
|
For style {lj126}, the energy E is given by the 12/6 potential:
|
|
|
|
|
|
|
|
:c,image(Eqs/pair_lj.jpg)
|
|
|
|
|
|
|
|
For style {colloid}, the energy E is given by an integrated form of
|
|
|
|
the "pair_style colloid"_pair_colloid.html potential:
|
|
|
|
|
|
|
|
:c,image(Eqs/fix_wall_colloid.jpg)
|
|
|
|
|
|
|
|
For style {wall/harmonic}, the energy E is given by a harmonic spring
|
|
|
|
potential:
|
|
|
|
|
|
|
|
:c,image(Eqs/fix_wall_harmonic.jpg)
|
|
|
|
|
|
|
|
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}
|
|
|
|
|
|
|
|
IMPORTANT NOTE: For all of the styles, you must insure that r is
|
|
|
|
always > 0 for all particles in the group, or LAMMPS 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 "binary restart
|
|
|
|
files"_restart.html.
|
|
|
|
|
|
|
|
The "fix_modify"_fix_modify.html {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 "thermodynamic
|
|
|
|
output"_thermo_style.html.
|
|
|
|
|
2010-04-03 00:51:06 +08:00
|
|
|
This fix computes a global scalar energy and a global 3-length vector
|
|
|
|
of forces, which can be accessed by various "output
|
|
|
|
commands"_Section_howto.html#4_15. The scalar energy is the sum of
|
|
|
|
energy interactions for all particles interacting with the wall
|
2010-01-09 06:54:29 +08:00
|
|
|
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
|
2010-04-03 00:51:06 +08:00
|
|
|
particles. The scalar and vector values calculated by this fix are
|
|
|
|
"extensive".
|
2010-01-09 06:54:29 +08:00
|
|
|
|
|
|
|
No parameter of this fix can be used with the {start/stop} keywords of
|
|
|
|
the "run"_run.html command.
|
|
|
|
|
|
|
|
The forces due to this fix are imposed during an energy minimization,
|
|
|
|
invoked by the "minimize"_minimize.html command.
|
|
|
|
|
|
|
|
IMPORTANT NOTE: 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 "fix_modify"_fix_modify.html
|
|
|
|
{energy} option for this fix.
|
|
|
|
|
|
|
|
[Restrictions:] none
|
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
|
|
|
"fix wall/lj93"_fix_wall.html,
|
|
|
|
"fix wall/lj126"_fix_wall.html,
|
|
|
|
"fix wall/colloid"_fix_wall.html,
|
|
|
|
"fix wall/gran"_fix_wall_gran.html
|
|
|
|
|
|
|
|
[Default:] none
|