2006-09-22 00:22:34 +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/reflect command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2010-06-01 23:06:27 +08:00
|
|
|
fix ID group-ID wall/reflect face arg ... keyword value ... :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2010-06-01 23:06:27 +08:00
|
|
|
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
|
|
|
wall/reflect = style name of this fix command :l
|
|
|
|
one or more face/arg pairs may be appended :l
|
|
|
|
face = {xlo} or {xhi} or {ylo} or {yhi} or {zlo} or {zhi} :l
|
|
|
|
{xlo},{ylo},{zlo} arg = EDGE or constant or variable
|
|
|
|
EDGE = current lo edge of simulation box
|
|
|
|
constant = number like 0.0 or -30.0 (distance units)
|
|
|
|
variable = "equal-style variable"_variable.html like v_x or v_wiggle
|
|
|
|
{xhi},{yhi},{zhi} arg = EDGE or constant or variable
|
|
|
|
EDGE = current hi edge of simulation box
|
|
|
|
constant = number like 50.0 or 100.3 (distance units)
|
|
|
|
variable = "equal-style variable"_variable.html like v_x or v_wiggle :pre
|
2010-10-13 01:58:24 +08:00
|
|
|
zero or more keyword/value pairs may be appended :l
|
2010-06-01 23:06:27 +08:00
|
|
|
keyword = {units} :l
|
|
|
|
{units} value = {lattice} or {box}
|
2010-10-13 01:58:24 +08:00
|
|
|
{lattice} = the wall position is defined in lattice units
|
|
|
|
{box} = the wall position is defined in simulation box units :pre
|
2010-06-01 23:06:27 +08:00
|
|
|
:ule
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2010-06-01 23:06:27 +08:00
|
|
|
fix xwalls all wall/reflect xlo EDGE xhi EDGE
|
|
|
|
fix walls all wall/reflect xlo 0.0 ylo 10.0 units box
|
|
|
|
fix top all wall/reflect zhi v_pressdown :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
|
|
|
Bound the simulation with one or more walls which reflect particles
|
2010-06-01 23:06:27 +08:00
|
|
|
in the specified group when they attempt to move thru them.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2010-06-01 23:06:27 +08:00
|
|
|
Reflection means that if an atom moves outside the wall on a timestep
|
2006-09-22 00:22:34 +08:00
|
|
|
by a distance delta (e.g. due to "fix nve"_fix_nve.html), then it is
|
2010-06-01 23:06:27 +08:00
|
|
|
put back inside the face by the same delta, and the sign of the
|
2006-09-22 00:22:34 +08:00
|
|
|
corresponding component of its velocity is flipped.
|
|
|
|
|
2008-05-14 05:49:52 +08:00
|
|
|
When used in conjunction with "fix nve"_fix_nve.html and "run_style
|
|
|
|
verlet"_run_style.html, the resultant time-integration algorithm is
|
|
|
|
equivalent to the primitive splitting algorithm (PSA) described by
|
|
|
|
"Bond"_#Bond. Because each reflection event divides
|
|
|
|
the corresponding timestep asymmetrically, energy conservation is only
|
|
|
|
satisfied to O(dt), rather than to O(dt^2) as it would be for
|
|
|
|
velocity-Verlet integration without reflective walls.
|
|
|
|
|
2010-06-01 23:06:27 +08:00
|
|
|
Up to 6 walls or faces can be specified in a single command: {xlo},
|
|
|
|
{xhi}, {ylo}, {yhi}, {zlo}, {zhi}. A {lo} face reflects particles
|
2010-10-13 01:58:24 +08:00
|
|
|
that move to a coordinate less than the wall position, back in the
|
2010-06-01 23:06:27 +08:00
|
|
|
{hi} direction. A {hi} face reflects particles that move to a
|
2010-10-13 01:58:24 +08:00
|
|
|
coordinate higher than the wall position, back in the {lo} direction.
|
2010-06-01 23:06:27 +08:00
|
|
|
|
2010-10-13 01:58:24 +08:00
|
|
|
The position of each wall can be specified in one of 3 ways: as the
|
2010-06-01 23:06:27 +08:00
|
|
|
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.
|
2010-10-13 01:58:24 +08:00
|
|
|
If the wall position is a variable, it should be specified as v_name,
|
2010-08-13 07:10:38 +08:00
|
|
|
where name is an "equal-style variable"_variable.html 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
|
|
|
|
"thermo_style"_thermo_style.html command keywords for the simulation
|
|
|
|
box parameters and timestep and elapsed time. Thus it is easy to
|
|
|
|
specify a time-dependent wall position.
|
2010-06-01 23:06:27 +08:00
|
|
|
|
|
|
|
The {units} keyword determines the meaning of the distance units used
|
2011-10-26 22:47:30 +08:00
|
|
|
to define a wall position, but only when a numeric constant or
|
|
|
|
variable is used. It is not relevant when EDGE is used to specify a
|
|
|
|
face position. In the variable case, the variable is assumed to
|
|
|
|
produce a value compatible with the {units} setting you specify.
|
2010-06-01 23:06:27 +08:00
|
|
|
|
|
|
|
A {box} value selects standard distance units as defined by the
|
|
|
|
"units"_units.html command, e.g. Angstroms for units = real or metal.
|
|
|
|
A {lattice} value means the distance units are in lattice spacings.
|
|
|
|
The "lattice"_lattice.html command must have been previously used to
|
|
|
|
define the lattice spacings.
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
2010-10-13 01:58:24 +08:00
|
|
|
Here are examples of variable definitions that move the wall position
|
|
|
|
in a time-dependent fashion using equal-style
|
|
|
|
"variables"_variable.html.
|
|
|
|
|
|
|
|
variable ramp equal ramp(0,10)
|
2011-10-25 23:07:42 +08:00
|
|
|
fix 1 all wall/reflect xlo v_ramp :pre
|
2010-10-13 01:58:24 +08:00
|
|
|
|
|
|
|
variable linear equal vlinear(0,20)
|
2011-10-25 23:07:42 +08:00
|
|
|
fix 1 all wall/reflect xlo v_linear :pre
|
2010-10-13 01:58:24 +08:00
|
|
|
|
|
|
|
variable wiggle equal swiggle(0.0,5.0,3.0)
|
2011-10-25 23:07:42 +08:00
|
|
|
fix 1 all wall/reflect xlo v_wiggle :pre
|
2010-10-13 01:58:24 +08:00
|
|
|
|
|
|
|
variable wiggle equal cwiggle(0.0,5.0,3.0)
|
2011-10-25 23:07:42 +08:00
|
|
|
fix 1 all wall/reflect xlo v_wiggle :pre
|
2010-10-13 01:58:24 +08:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
The swiggle(c0,A,period) function causes the wall position to
|
|
|
|
oscillate sinusoidally according to this equation, where omega = 2 PI
|
|
|
|
/ period:
|
|
|
|
|
|
|
|
position = c0 + A sin(omega*delta) :pre
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
position = c0 + A (1 - cos(omega*delta)) :pre
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
2007-10-11 06:28:11 +08:00
|
|
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
2007-06-26 08:03:39 +08:00
|
|
|
|
|
|
|
No information about this fix is written to "binary restart
|
|
|
|
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
2010-04-03 00:51:06 +08:00
|
|
|
are relevant to this fix. No global or per-atom quantities are stored
|
|
|
|
by this fix for access by various "output
|
2011-08-26 01:01:01 +08:00
|
|
|
commands"_Section_howto.html#howto_15. No parameter of this fix can
|
|
|
|
be used with the {start/stop} keywords of the "run"_run.html command.
|
2007-10-11 06:28:11 +08:00
|
|
|
This fix is not invoked during "energy minimization"_minimize.html.
|
2007-06-26 08:03:39 +08:00
|
|
|
|
2007-03-08 09:01:08 +08:00
|
|
|
[Restrictions:]
|
|
|
|
|
|
|
|
Any dimension (xyz) that has a reflecting wall must be non-periodic.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2009-11-13 08:04:38 +08:00
|
|
|
A reflecting wall should not be used with rigid bodies such as those
|
2007-03-09 23:20:25 +08:00
|
|
|
defined by a "fix rigid" command. This is because the wall/reflect
|
|
|
|
displaces atoms directly rather than exerts a force on them. For
|
|
|
|
rigid bodies, use a soft wall instead, such as "fix
|
2010-05-07 23:11:21 +08:00
|
|
|
wall/lj93"_fix_wall.html. LAMMPS will flag the use of a rigid
|
2009-11-13 08:04:38 +08:00
|
|
|
fix with fix wall/reflect with a warning, but will not generate an
|
|
|
|
error.
|
2007-03-09 23:20:25 +08:00
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Related commands:]
|
|
|
|
|
2010-05-07 23:11:21 +08:00
|
|
|
"fix wall/lj93"_fix_wall.html command
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Default:] none
|
2008-05-14 05:49:52 +08:00
|
|
|
|
2010-10-28 04:54:22 +08:00
|
|
|
:line
|
|
|
|
|
2008-05-14 05:49:52 +08:00
|
|
|
:link(Bond)
|
|
|
|
[(Bond)] Bond and Leimkuhler, SIAM J Sci Comput, 30, p 134 (2007).
|