Page MenuHomec4science

fix_pour.html
No OneTemporary

File Metadata

Created
Tue, Aug 6, 16:01

fix_pour.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 pour command &mdash; LAMMPS 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 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 pour 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-pour-command">
<span id="index-0"></span><h1>fix pour command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">ID</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">pour</span> <span class="n">N</span> <span class="nb">type</span> <span class="n">seed</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> command</li>
<li>pour = style name of this fix command</li>
<li>N = # of particles to insert</li>
<li>type = atom type to assign to inserted particles (offset for molecule insertion)</li>
<li>seed = random # seed (positive integer)</li>
<li>one or more keyword/value pairs may be appended to args</li>
<li>keyword = <em>region</em> or <em>diam</em> or <em>vol</em> or <em>rate</em> or <em>dens</em> or <em>vel</em> or <em>mol</em> or <em>rigid</em> or <em>shake</em> or <em>ignore</em></li>
</ul>
<pre class="literal-block">
<em>region</em> value = region-ID
region-ID = ID of region to use as insertion volume
<em>diam</em> values = dstyle args
dstyle = <em>one</em> or <em>range</em> or <em>poly</em>
<em>one</em> args = D
D = single diameter for inserted particles (distance units)
<em>range</em> args = Dlo Dhi
Dlo,Dhi = range of diameters for inserted particles (distance units)
<em>poly</em> args = Npoly D1 P1 D2 P2 ...
Npoly = # of (D,P) pairs
D1,D2,... = diameter for subset of inserted particles (distance units)
P1,P2,... = percentage of inserted particles with this diameter (0-1)
<em>id</em> values = idflag
idflag = <em>max</em> or <em>next</em> = how to choose IDs for inserted particles and molecules
<em>vol</em> values = fraction Nattempt
fraction = desired volume fraction for filling insertion volume
Nattempt = max # of insertion attempts per particle
<em>rate</em> value = V
V = z velocity (3d) or y velocity (2d) at which
insertion volume moves (velocity units)
<em>dens</em> values = Rholo Rhohi
Rholo,Rhohi = range of densities for inserted particles (mass/volume units)
<em>vel</em> values (3d) = vxlo vxhi vylo vyhi vz
<em>vel</em> values (2d) = vxlo vxhi vy
vxlo,vxhi = range of x velocities for inserted particles (velocity units)
vylo,vyhi = range of y velocities for inserted particles (velocity units)
vz = z velocity (3d) assigned to inserted particles (velocity units)
vy = y velocity (2d) assigned to inserted particles (velocity units)
<em>mol</em> value = template-ID
template-ID = ID of molecule template specified in a separate <a class="reference internal" href="molecule.html"><span class="doc">molecule</span></a> command
<em>molfrac</em> values = f1 f2 ... fN
f1 to fN = relative probability of creating each of N molecules in template-ID
<em>rigid</em> value = fix-ID
fix-ID = ID of <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid/small</span></a> command
<em>shake</em> value = fix-ID
fix-ID = ID of <a class="reference internal" href="fix_shake.html"><span class="doc">fix shake</span></a> command
<em>ignore</em> value = none
skip any line or triangle particles when detecting possible
overlaps with inserted particles
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">3</span> <span class="nb">all</span> <span class="n">pour</span> <span class="mi">1000</span> <span class="mi">2</span> <span class="mi">29494</span> <span class="n">region</span> <span class="n">myblock</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">pour</span> <span class="mi">10000</span> <span class="mi">1</span> <span class="mi">19985583</span> <span class="n">region</span> <span class="n">disk</span> <span class="n">vol</span> <span class="mf">0.33</span> <span class="mi">100</span> <span class="n">rate</span> <span class="mf">1.0</span> <span class="n">diam</span> <span class="nb">range</span> <span class="mf">0.9</span> <span class="mf">1.1</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">pour</span> <span class="mi">10000</span> <span class="mi">1</span> <span class="mi">19985583</span> <span class="n">region</span> <span class="n">disk</span> <span class="n">diam</span> <span class="n">poly</span> <span class="mi">2</span> <span class="mf">0.7</span> <span class="mf">0.4</span> <span class="mf">1.5</span> <span class="mf">0.6</span>
<span class="n">fix</span> <span class="n">ins</span> <span class="nb">all</span> <span class="n">pour</span> <span class="mi">500</span> <span class="mi">1</span> <span class="mi">4767548</span> <span class="n">vol</span> <span class="mf">0.8</span> <span class="mi">10</span> <span class="n">region</span> <span class="n">slab</span> <span class="n">mol</span> <span class="nb">object</span> <span class="n">rigid</span> <span class="n">myRigid</span>
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>Insert finite-size particles or molecules into the simulation box
every few timesteps within a specified region until N particles or
molecules have been inserted. This is typically used to model the
pouring of granular particles into a container under the influence of
gravity. For the remainder of this doc page, a single inserted atom
or molecule is referred to as a &#8220;particle&#8221;.</p>
<p>If inserted particles are individual atoms, they are assigned the
specified atom type. If they are molecules, the type of each atom in
the inserted molecule is specified in the file read by the
<a class="reference internal" href="molecule.html"><span class="doc">molecule</span></a> command, and those values are added to the
specified atom type. E.g. if the file specifies atom types 1,2,3, and
those are the atom types you want for inserted molecules, then specify
<em>type</em> = 0. If you specify <em>type</em> = 2, the in the inserted molecule
will have atom types 3,4,5.</p>
<p>All atoms in the inserted particle are assigned to two groups: the
default group &#8220;all&#8221; and the group specified in the fix pour command
(which can also be &#8220;all&#8221;).</p>
<p>This command must use the <em>region</em> keyword to define an insertion
volume. The specified region must have been previously defined with a
<a class="reference internal" href="region.html"><span class="doc">region</span></a> command. It must be of type <em>block</em> or a z-axis
<em>cylinder</em> and must be defined with side = <em>in</em>. The cylinder style
of region can only be used with 3d simulations.</p>
<p>Individual atoms are inserted, unless the <em>mol</em> keyword is used. It
specifies a <em>template-ID</em> previously defined using the
<a class="reference internal" href="molecule.html"><span class="doc">molecule</span></a> command, which reads a file that defines the
molecule. The coordinates, atom types, center-of-mass, moments of
inertia, etc, as well as any bond/angle/etc and special neighbor
information for the molecule can be specified in the molecule file.
See the <a class="reference internal" href="molecule.html"><span class="doc">molecule</span></a> command for details. The only
settings required to be in this file are the coordinates and types of
atoms in the molecule.</p>
<p>If the molecule template contains more than one molecule, the relative
probability of depositing each molecule can be specified by the
<em>molfrac</em> keyword. N relative probablities, each from 0.0 to 1.0, are
specified, where N is the number of molecules in the template. Each
time a molecule is inserted, a random number is used to sample from
the list of relative probabilities. The N values must sum to 1.0.</p>
<p>If you wish to insert molecules via the <em>mol</em> keyword, that will be
treated as rigid bodies, use the <em>rigid</em> keyword, specifying as its
value the ID of a separate <span class="xref doc">fix rigid/small</span>
command which also appears in your input script.</p>
<p>If you wish to insert molecules via the <em>mol</em> keyword, that will have
their bonds or angles constrained via SHAKE, use the <em>shake</em> keyword,
specifying as its value the ID of a separate <a class="reference internal" href="fix_shake.html"><span class="doc">fix shake</span></a> command which also appears in your input script.</p>
<p>Each timestep particles are inserted, they are placed randomly inside
the insertion volume so as to mimic a stream of poured particles. If
they are molecules they are also oriented randomly. Each atom in the
particle is tested for overlaps with existing particles, including
effects due to periodic boundary conditions if applicable. If an
overlap is detected, another random insertion attempt is made; see the
<em>vol</em> keyword discussion below. The larger the volume of the
insertion region, the more particles that can be inserted at any one
timestep. Particles are inserted again after enough time has elapsed
that the previously inserted particles fall out of the insertion
volume under the influence of gravity. Insertions continue every so
many timesteps until the desired # of particles has been inserted.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you are monitoring the temperature of a system where the
particle count is changing due to adding particles, you typically
should use the <a class="reference internal" href="compute_modify.html"><span class="doc">compute_modify dynamic yes</span></a>
command for the temperature compute you are using.</p>
</div>
<hr class="docutils" />
<p>All other keywords are optional with defaults as shown below.</p>
<p>The <em>diam</em> option is only used when inserting atoms and specifes the
diameters of inserted particles. There are 3 styles: <em>one</em>, <em>range</em>,
or <em>poly</em>. For <em>one</em>, all particles will have diameter <em>D</em>. For
<em>range</em>, the diameter of each particle will be chosen randomly and
uniformly between the specified <em>Dlo</em> and <em>Dhi</em> bounds. For <em>poly</em>, a
series of <em>Npoly</em> diameters is specified. For each diameter a
percentage value from 0.0 to 1.0 is also specified. The <em>Npoly</em>
percentages must sum to 1.0. For the example shown above with &#8220;diam 2
0.7 0.4 1.5 0.6&#8221;, all inserted particles will have a diameter of 0.7
or 1.5. 40% of the particles will be small; 60% will be large.</p>
<p>Note that for molecule insertion, the diameters of individual atoms in
the molecule can be specified in the file read by the
<a class="reference internal" href="molecule.html"><span class="doc">molecule</span></a> command. If not specified, the diameter of
each atom in the molecule has a default diameter of 1.0.</p>
<p>The <em>id</em> option has two settings which are used to determine the atom
or molecule IDs to assign to inserted particles/molecules. In both
cases a check is done of the current system to find the maximum
current atom and molecule ID of any existing particle. Newly inserted
particles and molecules are assigned IDs that increment those max
values. For the <em>max</em> setting, which is the default, this check is
done at every insertion step, which allows for particles to leave the
system, and their IDs to potentially be re-used. For the <em>next</em>
setting this check is done only once when the fix is specified, which
can be more efficient if you are sure particles will not be added in
some other way.</p>
<p>The <em>vol</em> option specifies what volume fraction of the insertion
volume will be filled with particles. For particles with a size
specified by the <em>diam range</em> keyword, they are assumed to all be of
maximum diamter <em>Dhi</em> for purposes of computing their contribution to
the volume fraction.</p>
<p>The higher the volume fraction value, the more particles are inserted
each timestep. Since inserted particles cannot overlap, the maximum
volume fraction should be no higher than about 0.6. Each timestep
particles are inserted, LAMMPS will make up to a total of M tries to
insert the new particles without overlaps, where M = # of inserted
particles * Nattempt. If LAMMPS is unsuccessful at completing all
insertions, it prints a warning.</p>
<p>The <em>dens</em> and <em>vel</em> options enable inserted particles to have a range
of densities or xy velocities. The specific values for a particular
inserted particle will be chosen randomly and uniformly between the
specified bounds. Internally, the density value for a particle is
converted to a mass, based on the radius (volume) of the particle.
The <em>vz</em> or <em>vy</em> value for option <em>vel</em> assigns a z-velocity (3d) or
y-velocity (2d) to each inserted particle.</p>
<p>The <em>rate</em> option moves the insertion volume in the z direction (3d)
or y direction (2d). This enables pouring particles from a
successively higher height over time.</p>
<p>The <em>ignore</em> option is useful when running a simulation that used line
segment (2d) or triangle (3d) particles, typically to define
boundaries for spherical granular particles to interact with. See the
<a class="reference internal" href="atom_style.html"><span class="doc">atom_style line or tri</span></a> command for details. Lines
and triangles store their size, and if the size is large it may
overlap (in a spherical sense) with the insertion region, even if the
line/triangle is oriented such that there is no actual overlap. This
can prevent particles from being inserted. The <em>ignore</em> keyword
causes the overlap check to skip any line or triangle particles.
Obviously you should only use it if there is in fact no overlap of the
line or triangle particles with the insertion region.</p>
</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</h2>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. This means you must be careful when restarting a
pouring simulation, when the restart file was written in the middle of
the pouring operation. Specifically, you should use a new fix pour
command in the input script for the restarted simulation that
continues the operation. You will need to adjust the arguments of the
original fix pour command to do this.</p>
<p>Also note that because the state of the random number generator is not
saved in restart files, you cannot do &#8220;exact&#8221; restarts with this fix,
where the simulation continues on the same as if no restart had taken
place. However, in a statistical sense, a restarted simulation should
produce the same behavior if you adjust the fix pour parameters
appropriately.</p>
<p>None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options are relevant to this
fix. No global or per-atom quantities are stored by this fix for
access by various <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>. No
parameter of this fix can be used with the <em>start/stop</em> keywords of
the <a class="reference internal" href="run.html"><span class="doc">run</span></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><span class="doc">energy minimization</span></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions</h2>
<p>This fix is part of the GRANULAR 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 class="std std-ref">Making LAMMPS</span></a> section for more info.</p>
<p>For 3d simulations, a gravity fix in the -z direction must be defined
for use in conjunction with this fix. For 2d simulations, gravity
must be defined in the -y direction.</p>
<p>The specified insertion region cannot be a &#8220;dynamic&#8221; region, as
defined by the <a class="reference internal" href="region.html"><span class="doc">region</span></a> command.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands</h2>
<p><a class="reference internal" href="fix_deposit.html"><span class="doc">fix deposit</span></a>, <a class="reference internal" href="fix_gravity.html"><span class="doc">fix gravity</span></a>,
<a class="reference internal" href="region.html"><span class="doc">region</span></a></p>
</div>
<div class="section" id="default">
<h2>Default</h2>
<p>Insertions are performed for individual particles, i.e. no <em>mol</em>
setting is defined. If the <em>mol</em> keyword is used, the default for
<em>molfrac</em> is an equal probabilities for all molecules in the template.
Additional option defaults are diam = one 1.0, dens = 1.0 1.0, vol =
0.25 50, rate = 0.0, vel = 0.0 0.0 0.0 0.0 0.0 (for 3d), vel = 0.0 0.0 0.0
(for 2d), and id = max.</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:'',
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