<span id="index-0"></span><h1>fix wall/piston command<a class="headerlink" href="#fix-wall-piston-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix ID group-ID wall/piston face ... keyword value ...
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><em>fix</em></a> command</li>
<li>wall/piston = style name of this fix command</li>
<li>face = <em>zlo</em></li>
<li>zero or more keyword/value pairs may be appended</li>
<li>keyword = <em>pos</em> or <em>vel</em> or <em>ramp</em> or <em>units</em></li>
</ul>
<pre class="literal-block">
<em>pos</em> args = z
z = z coordinate at which the piston begins (distance units)
<em>vel</em> args = vz
vz = final velocity of the piston (velocity units)
<em>ramp</em> = use a linear velocity ramp from 0 to vz
<em>temp</em> args = target damp seed extent
target = target velocity for region immediately ahead of the piston
damp = damping paramter (time units)
seed = random number seed for langevin kicks
extent = extent of thermostated region (distance units)
<em>units</em> value = <em>lattice</em> or <em>box</em>
<em>lattice</em> = the wall position is defined in lattice units
<em>box</em> = the wall position is defined in simulation box units
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix xwalls all wall/piston zlo
fix walls all wall/piston zlo pos 1.0 vel 10.0 units box
fix top all wall/piston zlo vel 10.0 ramp
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Bound the simulation with a moving wall which reflect particles in the
specified group and drive the system with an effective infinite-mass
piston capable of driving shock waves.</p>
<p>A momentum mirror technique is used, which means that if an atom (or
the wall) moves such that an atom is outside the wall on a timestep by
a distance delta (e.g. due to <a class="reference internal" href="fix_nve.html"><em>fix nve</em></a>), then it is put
back inside the face by the same delta, and the velocity relative to
the moving wall is flipped in z. For instance, a stationary particle
hit with a piston wall with velocity vz, will end the timestep with a
velocity of 2*vz.</p>
<p>Currently the <em>face</em> keyword can only be <em>zlo</em>. This creates a piston
moving in the positive z direction. Particles with z coordinate less
than the wall position are reflected to a z coordinate greater than
the wall position. If the piston velocity is vpz and the particle
velocity before reflection is vzi, the particle velocity after
reflection is -vzi + 2*vpz.</p>
<p>The initial position of the wall can be specified by the <em>pos</em> keyword.</p>
<p>The final velocity of the wall can be specified by the <em>vel</em> keyword</p>
<p>The <em>ramp</em> keyword will cause the wall/piston to adjust the velocity
linearly from zero velocity to <em>vel</em> over the course of the run. If
the <em>ramp</em> keyword is omitted then the wall/piston moves at a constant
velocity defined by <em>vel</em>.</p>
<p>The <em>temp</em> keyword will cause the region immediately in front of the
wall/piston to be thermostated with a Langevin thermostat. This
region moves with the piston. The damping and kicking are measured in
the reference frame of the piston. So, a temperature of zero would
mean all particles were moving at exactly the speed of the
wall/piston.</p>
<p>The <em>units</em> keyword determines the meaning of the distance units used
to define a wall position, but only when a numeric constant is used.</p>
<p>A <em>box</em> value selects standard distance units as defined by the
<a class="reference internal" href="units.html"><em>units</em></a> command, e.g. Angstroms for units = real or metal.
A <em>lattice</em> value means the distance units are in lattice spacings.
The <a class="reference internal" href="lattice.html"><em>lattice</em></a> command must have been previously used to
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>. None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various <span class="xref std std-ref">output commands</span>. No parameter of this fix can
be used with the <em>start/stop</em> keywords of the <a class="reference internal" href="run.html"><em>run</em></a> command.
This fix is not invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This fix style is part of the SHOCK package. It is only enabled if
LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The face that has the wall/piston must be boundary type ‘s’
(shrink-wrapped). The opposing face can be
any boundary type other than periodic.</p>
<p>A wall/piston should not be used with rigid bodies such as those
defined by a “fix rigid” command. This is because the wall/piston
displaces atoms directly rather than exerting a force on them.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.