LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

fix wall/reflect command

Syntax:

fix ID group-ID wall/reflect keyword ... 

Examples:

fix xwalls all wall/reflect xlo xhi
fix walls all wall/reflect xlo ylo zlo xhi yhi zhi 

Description:

Bound the simulation with one or more walls which reflect particles when they attempt to move thru them.

Reflection means that if an atom moves outside the box on a timestep by a distance delta (e.g. due to fix nve), then it is put back inside the box by the same delta and the sign of the corresponding component of its velocity is flipped.

When used in conjunction with fix nve and run_style verlet, the resultant time-integration algorithm is equivalent to the primitive splitting algorithm (PSA) described by 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.

IMPORTANT NOTE: This fix performs its operations at the same point in the timestep as other time integration fixes, such as fix nve, fix nvt, or fix npt. Thus fix wall/reflect should normally be the last such fix specified in the input script, since the adjustments it makes to atom coordinates should come after the changes made by time integration. LAMMPS will warn you if your fixes are not ordered this way.

Restart, fix_modify, output, run start/stop, minimize info:

No information about this fix is written to binary restart files. None of the fix_modify options are relevant to this fix. No global scalar or vector or per-atom quantities are stored by this fix for access by various output commands. No parameter of this fix can be used with the start/stop keywords of the run command. This fix is not invoked during energy minimization.

Restrictions:

Any dimension (xyz) that has a reflecting wall must be non-periodic.

A reflecting wall cannot be used with rigid bodies such as those 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 wall/lj93.

Related commands:

fix wall/lj93 command

Default: none

(Bond) Bond and Leimkuhler, SIAM J Sci Comput, 30, p 134 (2007).