forked from lijiext/lammps
204 lines
8.6 KiB
HTML
204 lines
8.6 KiB
HTML
<HTML>
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
<H3>fix wall/srd command
|
|
</H3>
|
|
<P><B>Syntax:</B>
|
|
</P>
|
|
<PRE>fix ID group-ID wall/srd face arg ... keyword value ...
|
|
</PRE>
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
|
|
|
<LI>wall/srd = style name of this fix command
|
|
|
|
<LI>one or more face/arg pairs may be appended
|
|
|
|
<LI>face = <I>xlo</I> or <I>xhi</I> or <I>ylo</I> or <I>yhi</I> or <I>zlo</I> or <I>zhi</I>
|
|
|
|
<PRE> <I>xlo</I>,<I>ylo</I>,<I>zlo</I> arg = EDGE or constant or variable
|
|
EDGE = current lo edge of simulation box
|
|
constant = number like 0.0 or -30.0 (distance units)
|
|
variable = <A HREF = "variable.html">equal-style variable</A> like v_x or v_wiggle
|
|
<I>xhi</I>,<I>yhi</I>,<I>zhi</I> arg = EDGE or constant or variable
|
|
EDGE = current hi edge of simulation box
|
|
constant = number like 50.0 or 100.3 (distance units)
|
|
variable = <A HREF = "variable.html">equal-style variable</A> like v_x or v_wiggle
|
|
</PRE>
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
<LI>keyword = <I>units</I>
|
|
|
|
<PRE> <I>units</I> value = <I>lattice</I> or <I>box</I>
|
|
<I>lattice</I> = the wall position is defined in lattice units
|
|
<I>box</I> = the wall position is defined in simulation box units
|
|
</PRE>
|
|
|
|
</UL>
|
|
<P><B>Examples:</B>
|
|
</P>
|
|
<PRE>fix xwalls all wall/srd xlo EDGE xhi EDGE
|
|
fix walls all wall/srd xlo 0.0 ylo 10.0 units box
|
|
fix top all wall/srd zhi v_pressdown
|
|
</PRE>
|
|
<P><B>Description:</B>
|
|
</P>
|
|
<P>Bound the simulation with one or more walls which interact with
|
|
stochastic reaction dynamics (SRD) particles as slip (smooth) or
|
|
no-slip (rough) flat surfaces. The wall interaction is actually
|
|
invoked via the <A HREF = "fix_srd.html">fix srd</A> command, only on the group of
|
|
SRD particles it defines, so the group setting for the fix wall/srd
|
|
command is ignored.
|
|
</P>
|
|
<P>A particle/wall collision occurs if an SRD particle moves outside the
|
|
wall on a timestep. This alters the position and velocity of the SRD
|
|
particle and imparts a force to the wall.
|
|
</P>
|
|
<P>The <I>collision</I> and <I>Tsrd</I> settings specified via the <A HREF = "fix_srd.html">fix
|
|
srd</A> command affect the SRD/wall collisions. A <I>slip</I>
|
|
setting for the <I>collision</I> keyword means that the tangential
|
|
component of the SRD particle momentum is preserved. Thus only a
|
|
normal force is imparted to the wall. The normal component of the new
|
|
SRD velocity is sampled from a Gaussian distribution at temperature
|
|
<I>Tsrd</I>.
|
|
</P>
|
|
<P>For a <I>noslip</I> setting of the <I>collision</I> keyword, both the normal and
|
|
tangential components of the new SRD velocity are sampled from a
|
|
Gaussian distribution at temperature <I>Tsrd</I>. Additionally, a new
|
|
tangential direction for the SRD velocity is chosen randomly. This
|
|
collision style imparts both a normal and tangential force to the
|
|
wall.
|
|
</P>
|
|
<P>Up to 6 walls or faces can be specified in a single command: <I>xlo</I>,
|
|
<I>xhi</I>, <I>ylo</I>, <I>yhi</I>, <I>zlo</I>, <I>zhi</I>. A <I>lo</I> face reflects particles
|
|
that move to a coordinate less than the wall position, back in the
|
|
<I>hi</I> direction. A <I>hi</I> face reflects particles that move to a
|
|
coordinate higher than the wall position, back in the <I>lo</I> direction.
|
|
</P>
|
|
<P>The position of each wall can be specified in one of 3 ways: as the
|
|
EDGE of the simulation box, as a constant value, or as a variable. If
|
|
EDGE is used, then the corresponding boundary of the current
|
|
simulation box is used. If a numeric constant is specified then the
|
|
wall is placed at that position in the appropriate dimension (x, y, or
|
|
z). In both the EDGE and constant cases, the wall will never move.
|
|
If the wall position is a variable, it should be specified as v_name,
|
|
where name is an <A HREF = "variable.html">equal-style variable</A> name. In this
|
|
case the variable is evaluated each timestep and the result becomes
|
|
the current position of the reflecting wall. Equal-style variables
|
|
can specify formulas with various mathematical functions, and include
|
|
<A HREF = "thermo_style.html">thermo_style</A> command keywords for the simulation
|
|
box parameters and timestep and elapsed time. Thus it is easy to
|
|
specify a time-dependent wall position.
|
|
</P>
|
|
<P>IMPORTANT NOTE: Because the trajectory of the SRD particle is tracked
|
|
as it collides with the wall, you must insure that r = distance of the
|
|
particle from the wall, is always > 0 for SRD particles, or LAMMPS
|
|
will generate an error. This means you cannot start your simulation
|
|
with SRD particles at the wall position <I>coord</I> (r = 0) or with
|
|
particles on the wrong side of the wall (r < 0).
|
|
</P>
|
|
<P>IMPORTANT NOTE: If you have 2 or more walls that come together at an
|
|
edge or corner (e.g. walls in the x and y dimensions), then be sure to
|
|
set the <I>overlap</I> keyword to <I>yes</I> in the <A HREF = "fix_srd.html">fix srd</A>
|
|
command, since the walls effectively overlap when SRD particles
|
|
collide with them. LAMMPS will issue a warning if you do not do this.
|
|
</P>
|
|
<P>IMPORTANT NOTE: The walls of this fix only interact with SRD
|
|
particles, as defined by the <A HREF = "fix_srd.html">fix srd</A> command. If you
|
|
are simulating a mixture containing other kinds of particles, then you
|
|
should typically use <A HREF = "fix_wall.html">another wall command</A> to act on
|
|
the other particles. Since SRD particles will be colliding both with
|
|
the walls and the other particles, it is important to insure that the
|
|
other particle's finite extent does not overlap an SRD wall. If you
|
|
do not do this, you may generate errors when SRD particles end up
|
|
"inside" another particle or a wall at the beginning of a collision
|
|
step.
|
|
</P>
|
|
<P>The <I>units</I> keyword determines the meaning of the distance units used
|
|
to define a wall position, but only when a numeric constant is used.
|
|
It is not relevant when EDGE or a variable is used to specify a face
|
|
position.
|
|
</P>
|
|
<P>A <I>box</I> value selects standard distance units as defined by the
|
|
<A HREF = "units.html">units</A> command, e.g. Angstroms for units = real or metal.
|
|
A <I>lattice</I> value means the distance units are in lattice spacings.
|
|
The <A HREF = "lattice.html">lattice</A> command must have been previously used to
|
|
define the lattice spacings.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>Here are examples of variable definitions that move the wall position
|
|
in a time-dependent fashion using equal-style
|
|
<A HREF = "variable.html">variables</A>.
|
|
</P>
|
|
<PRE>variable ramp equal ramp(0,10)
|
|
fix 1 all wall xlo v_ramp 1.0 1.0 2.5
|
|
</PRE>
|
|
<PRE>variable linear equal vlinear(0,20)
|
|
fix 1 all wall xlo v_linear 1.0 1.0 2.5
|
|
</PRE>
|
|
<PRE>variable wiggle equal swiggle(0.0,5.0,3.0)
|
|
fix 1 all wall xlo v_wiggle 1.0 1.0 2.5
|
|
</PRE>
|
|
<PRE>variable wiggle equal cwiggle(0.0,5.0,3.0)
|
|
fix 1 all wall xlo v_wiggle 1.0 1.0 2.5
|
|
</PRE>
|
|
<P>The ramp(lo,hi) function adjusts the wall position linearly from lo to
|
|
hi over the course of a run. The linear(c0,velocity) function does
|
|
something similar using the equation position = c0 + velocity*delta,
|
|
where delta is the elapsed time.
|
|
</P>
|
|
<P>The swiggle(c0,A,period) function causes the wall position to
|
|
oscillate sinusoidally according to this equation, where omega = 2 PI
|
|
/ period:
|
|
</P>
|
|
<PRE>position = c0 + A sin(omega*delta)
|
|
</PRE>
|
|
<P>The cwiggle(c0,A,period) function causes the wall position to
|
|
oscillate sinusoidally according to this equation, which will have an
|
|
initial wall velocity of 0.0, and thus may impose a gentler
|
|
perturbation on the particles:
|
|
</P>
|
|
<PRE>position = c0 + A (1 - cos(omega*delta))
|
|
</PRE>
|
|
<HR>
|
|
|
|
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
|
</P>
|
|
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
|
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
|
|
are relevant to this fix.
|
|
</P>
|
|
<P>This fix computes a global array of values which can be accessed by
|
|
various <A HREF = "Section_howto.html#4_15">output commands</A>. The number of rows
|
|
in the array is equal to the number of walls defined by the fix. The
|
|
number of columns is 3, for the x,y,z components of force on each
|
|
wall.
|
|
</P>
|
|
<P>Note that an outward normal force on a wall will be a negative value
|
|
for <I>lo</I> walls and a positive value for <I>hi</I> walls. The array values
|
|
calculated by this fix are "extensive".
|
|
</P>
|
|
<P>No parameter of this fix can be used with the <I>start/stop</I> keywords of
|
|
the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy
|
|
minimization</A>.
|
|
</P>
|
|
<P><B>Restrictions:</B>
|
|
</P>
|
|
<P>Any dimension (xyz) that has an SRD wall must be non-periodic.
|
|
</P>
|
|
<P><B>Related commands:</B>
|
|
</P>
|
|
<P><A HREF = "fix_srd.html">fix srd</A>
|
|
</P>
|
|
<P><B>Default:</B> none
|
|
</P>
|
|
</HTML>
|