Page MenuHomec4science

fix_wall.html
No OneTemporary

File Metadata

Created
Wed, Nov 27, 06:41

fix_wall.html

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>fix wall/lj93 command &mdash; LAMMPS 9 Dec 2015 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 9 Dec 2015 documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>fix wall/lj93 command</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="fix-wall-lj93-command">
<span id="index-0"></span><h1>fix wall/lj93 command<a class="headerlink" href="#fix-wall-lj93-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-wall-lj126-command">
<h1>fix wall/lj126 command<a class="headerlink" href="#fix-wall-lj126-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-wall-lj1043-command">
<h1>fix wall/lj1043 command<a class="headerlink" href="#fix-wall-lj1043-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-wall-colloid-command">
<h1>fix wall/colloid command<a class="headerlink" href="#fix-wall-colloid-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-wall-harmonic-command">
<h1>fix wall/harmonic command<a class="headerlink" href="#fix-wall-harmonic-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 style face args ... 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>style = <em>wall/lj93</em> or <em>wall/lj126</em> or <em>wall/lj1043</em> or <em>wall/colloid</em> or <em>wall/harmonic</em></li>
<li>one or more face/arg pairs may be appended</li>
<li>face = <em>xlo</em> or <em>xhi</em> or <em>ylo</em> or <em>yhi</em> or <em>zlo</em> or <em>zhi</em></li>
</ul>
<pre class="literal-block">
args = coord epsilon sigma cutoff
coord = position of wall = EDGE or constant or variable
EDGE = current lo or hi edge of simulation box
constant = number like 0.0 or -30.0 (distance units)
variable = <a class="reference internal" href="variable.html"><em>equal-style variable</em></a> like v_x or v_wiggle
epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units)
epsilon can be a variable (see below)
sigma = size factor for wall-particle interaction (distance units)
sigma can be a variable (see below)
cutoff = distance from wall at which wall-particle interaction is cut off (distance units)
</pre>
<ul class="simple">
<li>zero or more keyword/value pairs may be appended</li>
<li>keyword = <em>units</em> or <em>fld</em></li>
</ul>
<pre class="literal-block">
<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
<em>fld</em> value = <em>yes</em> or <em>no</em>
<em>yes</em> = invoke the wall constraint to be compatible with implicit FLD
<em>no</em> = invoke the wall constraint in the normal way
<em>pbc</em> value = <em>yes</em> or <em>no</em>
<em>yes</em> = allow periodic boundary in a wall dimension
<em>no</em> = require non-perioidic boundaries in any wall dimension
</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 wallhi all wall/lj93 xlo -1.0 1.0 1.0 2.5 units box
fix wallhi all wall/lj93 xhi EDGE 1.0 1.0 2.5
fix wallhi all wall/lj126 v_wiggle 23.2 1.0 1.0 2.5
fix zwalls all wall/colloid zlo 0.0 1.0 1.0 0.858 zhi 40.0 1.0 1.0 0.858
</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 domain on one or more of its faces with a flat
wall that interacts with the atoms in the group by generating a force
on the atom in a direction perpendicular to the wall. The energy of
wall-particle interactions depends on the style.</p>
<p>For style <em>wall/lj93</em>, the energy E is given by the 9/3 potential:</p>
<img alt="_images/fix_wall_lj93.jpg" class="align-center" src="_images/fix_wall_lj93.jpg" />
<p>For style <em>wall/lj126</em>, the energy E is given by the 12/6 potential:</p>
<img alt="_images/pair_lj.jpg" class="align-center" src="_images/pair_lj.jpg" />
<p>For style <em>wall/lj1043</em>, the energy E is given by the 10/4/3 potential:</p>
<img alt="_images/fix_wall_lj1043.jpg" class="align-center" src="_images/fix_wall_lj1043.jpg" />
<p>For style <em>wall/colloid</em>, the energy E is given by an integrated form
of the <a class="reference internal" href="pair_colloid.html"><em>pair_style colloid</em></a> potential:</p>
<img alt="_images/fix_wall_colloid.jpg" class="align-center" src="_images/fix_wall_colloid.jpg" />
<p>For style <em>wall/harmonic</em>, the energy E is given by a harmonic spring
potential:</p>
<img alt="_images/fix_wall_harmonic.jpg" class="align-center" src="_images/fix_wall_harmonic.jpg" />
<p>In all cases, <em>r</em> is the distance from the particle to the wall at
position <em>coord</em>, and Rc is the <em>cutoff</em> distance at which the
particle and wall no longer interact. The energy of the wall
potential is shifted so that the wall-particle interaction energy is
0.0 at the cutoff distance.</p>
<p>Up to 6 walls or faces can be specified in a single command: <em>xlo</em>,
<em>xhi</em>, <em>ylo</em>, <em>yhi</em>, <em>zlo</em>, <em>zhi</em>. A <em>lo</em> face interacts with
particles near the lower side of the simulation box in that dimension.
A <em>hi</em> face interacts with particles near the upper side of the
simulation box in that dimension.</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 class="reference internal" href="variable.html"><em>equal-style variable</em></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 class="reference internal" href="thermo_style.html"><em>thermo_style</em></a> command keywords for the simulation
box parameters and timestep and elapsed time. Thus it is easy to
specify a time-dependent wall position. See examples below.</p>
<p>For the <em>wall/lj93</em> and <em>wall/lj126</em> and <em>wall/lj1043</em> styles,
<em>epsilon</em> and <em>sigma</em> are the usual Lennard-Jones parameters, which
determine the strength and size of the particle as it interacts with
the wall. Epsilon has energy units. Note that this <em>epsilon</em> and
<em>sigma</em> may be different than any <em>epsilon</em> or <em>sigma</em> values defined
for a pair style that computes particle-particle interactions.</p>
<p>The <em>wall/lj93</em> interaction is derived by integrating over a 3d
half-lattice of Lennard-Jones 12/6 particles. The <em>wall/lj126</em>
interaction is effectively a harder, more repulsive wall interaction.
The <em>wall/lj1043</em> interaction is yet a different form of wall
interaction, described in Magda et al in <a class="reference internal" href="#magda"><span>(Magda)</span></a>.</p>
<p>For the <em>wall/colloid</em> style, <em>R</em> is the radius of the colloid
particle, <em>D</em> is the distance from the surface of the colloid particle
to the wall (r-R), and <em>sigma</em> is the size of a constituent LJ
particle inside the colloid particle and wall. Note that the cutoff
distance Rc in this case is the distance from the colloid particle
center to the wall. The prefactor <em>epsilon</em> can be thought of as an
effective Hamaker constant with energy units for the strength of the
colloid-wall interaction. More specifically, the <em>epsilon</em> pre-factor
= 4 * pi^2 * rho_wall * rho_colloid * epsilon * sigma^6, where epsilon
and sigma are the LJ parameters for the constituent LJ
particles. Rho_wall and rho_colloid are the number density of the
constituent particles, in the wall and colloid respectively, in units
of 1/volume.</p>
<p>The <em>wall/colloid</em> interaction is derived by integrating over
constituent LJ particles of size <em>sigma</em> within the colloid particle
and a 3d half-lattice of Lennard-Jones 12/6 particles of size <em>sigma</em>
in the wall. As mentioned in the preceeding paragraph, the density of
particles in the wall and colloid can be different, as specified by
the <em>epsilon</em> pre-factor.</p>
<p>For the <em>wall/harmonic</em> style, <em>epsilon</em> is effectively the spring
constant K, and has units (energy/distance^2). The input parameter
<em>sigma</em> is ignored. The minimum energy position of the harmonic
spring is at the <em>cutoff</em>. This is a repulsive-only spring since the
interaction is truncated at the <em>cutoff</em></p>
<p>For any wall, the <em>epsilon</em> and/or <em>sigma</em> parameter can be specified
as an <a class="reference internal" href="variable.html"><em>equal-style variable</em></a>, in which case it should be
specified as v_name, where name is the variable name. As with a
variable wall position, the variable is evaluated each timestep and
the result becomes the current epsilon or sigma of the wall.
Equal-style variables can specify formulas with various mathematical
functions, and include <a class="reference internal" href="thermo_style.html"><em>thermo_style</em></a> command
keywords for the simulation box parameters and timestep and elapsed
time. Thus it is easy to specify a time-dependent wall interaction.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For all of the styles, you must insure that r is always &gt; 0 for
all particles in the group, or LAMMPS will generate an error. This
means you cannot start your simulation with particles at the wall
position <em>coord</em> (r = 0) or with particles on the wrong side of the
wall (r &lt; 0). For the <em>wall/lj93</em> and <em>wall/lj126</em> styles, the energy
of the wall/particle interaction (and hence the force on the particle)
blows up as r -&gt; 0. The <em>wall/colloid</em> style is even more
restrictive, since the energy blows up as D = r-R -&gt; 0. This means
the finite-size particles of radius R must be a distance larger than R
from the wall position <em>coord</em>. The <em>harmonic</em> style is a softer
potential and does not blow up as r -&gt; 0, but you must use a large
enough <em>epsilon</em> that particles always reamin on the correct side of
the wall (r &gt; 0).</p>
</div>
<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 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 <em>units</em> setting you specify.</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
define the lattice spacings.</p>
<p>The <em>fld</em> keyword can be used with a <em>yes</em> setting to invoke the wall
constraint before pairwise interactions are computed. This allows an
implicit FLD model using <a class="reference internal" href="pair_lubricateU.html"><em>pair_style lubricateU</em></a>
to include the wall force in its calculations. If the setting is
<em>no</em>, wall forces are imposed after pairwise interactions, in the
usual manner.</p>
<p>The <em>pbc</em> keyword can be used with a <em>yes</em> setting to allow walls to
be specified in a periodic dimension. See the
<a class="reference internal" href="boundary.html"><em>boundary</em></a> command for options on simulation box
boundaries. The default for <em>pbc</em> is <em>no</em>, which means the system
must be non-periodic when using a wall. But you may wish to use a
periodic box. E.g. to allow some particles to interact with the wall
via the fix group-ID, and others to pass through it and wrap around a
periodic box. In this case you should insure that the wall if
sufficiently far enough away from the box boundary. If you do not,
then particles may interact with both the wall and with periodic
images on the other side of the box, which is probably not what you
want.</p>
<hr class="docutils" />
<p>Here are examples of variable definitions that move the wall position
in a time-dependent fashion using equal-style
<a class="reference internal" href="variable.html"><em>variables</em></a>. The wall interaction parameters (epsilon,
sigma) could be varied with additional variable definitions.</p>
<div class="highlight-python"><div class="highlight"><pre>variable ramp equal ramp(0,10)
fix 1 all wall xlo v_ramp 1.0 1.0 2.5
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>variable linear equal vdisplace(0,20)
fix 1 all wall xlo v_linear 1.0 1.0 2.5
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><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></div>
</div>
<div class="highlight-python"><div class="highlight"><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></div>
</div>
<p>The ramp(lo,hi) function adjusts the wall position linearly from lo to
hi over the course of a run. The vdisplace(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>
<div class="highlight-python"><div class="highlight"><pre>position = c0 + A sin(omega*delta)
</pre></div>
</div>
<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>
<div class="highlight-python"><div class="highlight"><pre><span class="n">position</span> <span class="o">=</span> <span class="n">c0</span> <span class="o">+</span> <span class="n">A</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">cos</span><span class="p">(</span><span class="n">omega</span><span class="o">*</span><span class="n">delta</span><span class="p">))</span>
</pre></div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<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>.</p>
<p>The <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> <em>energy</em> option is supported by this
fix to add the energy of interaction between atoms and each wall to
the system&#8217;s potential energy as part of <a class="reference internal" href="thermo_style.html"><em>thermodynamic output</em></a>.</p>
<p>This fix computes a global scalar energy and a global vector of
forces, which can be accessed by various <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>. Note that the scalar energy is
the sum of interactions with all defined walls. If you want the
energy on a per-wall basis, you need to use multiple fix wall
commands. The length of the vector is equal to the number of walls
defined by the fix. Each vector value is the normal force on a
specific wall. Note that an outward force on a wall will be a
negative value for <em>lo</em> walls and a positive value for <em>hi</em> walls.
The scalar and vector values calculated by this fix are &#8220;extensive&#8221;.</p>
<p>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.</p>
<p>The forces due to this fix are imposed during an energy minimization,
invoked by the <a class="reference internal" href="minimize.html"><em>minimize</em></a> command.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you want the atom/wall interaction energy to be included in
the total potential energy of the system (the quantity being
minimized), you MUST enable the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> <em>energy</em>
option for this fix.</p>
</div>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="fix_wall_reflect.html"><em>fix wall/reflect</em></a>,
<a class="reference internal" href="fix_wall_gran.html"><em>fix wall/gran</em></a>,
<a class="reference internal" href="fix_wall_region.html"><em>fix wall/region</em></a></p>
</div>
<div class="section" id="default">
<h2>Default<a class="headerlink" href="#default" title="Permalink to this headline">¶</a></h2>
<p>The option defaults units = lattice, fld = no, and pbc = no.</p>
<hr class="docutils" />
<p id="magda"><strong>(Magda)</strong> Magda, Tirrell, Davis, J Chem Phys, 83, 1888-1901 (1985);
erratum in JCP 84, 2901 (1986).</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2013 Sandia Corporation.
</p>
</div>
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>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'9 Dec 2015',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

Event Timeline