lammps/doc/fix_wall_srd.txt

191 lines
7.8 KiB
Plaintext
Raw Normal View History

"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/srd command :h3
[Syntax:]
fix ID group-ID wall/srd face arg ... keyword value ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
wall/srd = 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
zero or more keyword/value pairs may be appended :l
keyword = {units} :l
{units} value = {lattice} or {box}
{lattice} = the wall position is defined in lattice units
{box} = the wall position is defined in simulation box units :pre
:ule
[Examples:]
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
[Description:]
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 "fix srd"_fix_srd.html command, only on the group of
SRD particles it defines, so the group setting for the fix wall/srd
command is ignored.
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.
The {collision} and {Tsrd} settings specified via the "fix
srd"_fix_srd.html command affect the SRD/wall collisions. A {slip}
setting for the {collision} 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
{Tsrd}.
For a {noslip} setting of the {collision} keyword, both the normal and
tangential components of the new SRD velocity are sampled from a
Gaussian distribution at temperature {Tsrd}. 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.
Up to 6 walls or faces can be specified in a single command: {xlo},
{xhi}, {ylo}, {yhi}, {zlo}, {zhi}. A {lo} face reflects particles
that move to a coordinate less than the wall position, back in the
{hi} direction. A {hi} face reflects particles that move to a
coordinate higher than the wall position, back in the {lo} direction.
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 "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.
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 {coord} (r = 0) or with
particles on the wrong side of the wall (r < 0).
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 {overlap} keyword to {yes} in the "fix srd"_fix_srd.html
command, since the walls effectively overlap when SRD particles
collide with them. LAMMPS will issue a warning if you do not do this.
IMPORTANT NOTE: The walls of this fix only interact with SRD
particles, as defined by the "fix srd"_fix_srd.html command. If you
are simulating a mixture containing other kinds of particles, then you
should typically use "another wall command"_fix_wall.html 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.
The {units} 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.
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
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)
fix 1 all wall xlo v_ramp 1.0 1.0 2.5 :pre
variable linear equal vlinear(0,20)
fix 1 all wall xlo v_linear 1.0 1.0 2.5 :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
variable wiggle equal cwiggle(0.0,5.0,3.0)
fix 1 all wall xlo v_wiggle 1.0 1.0 2.5 :pre
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
[Restart, fix_modify, output, run start/stop, minimize info:]
No information about this fix is written to "binary restart
files"_restart.html. None of the "fix_modify"_fix_modify.html options
are relevant to this fix.
This fix computes a global array of values which can be accessed by
various "output commands"_Section_howto.html#4_15. 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.
Note that an outward normal force on a wall will be a negative value
for {lo} walls and a positive value for {hi} walls. The array values
calculated by this fix are "extensive".
No parameter of this fix can be used with the {start/stop} keywords of
the "run"_run.html command. This fix is not invoked during "energy
minimization"_minimize.html.
[Restrictions:]
Any dimension (xyz) that has an SRD wall must be non-periodic.
[Related commands:]
"fix srd"_fix_srd.html
[Default:] none