1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
13 fix ID group-ID pour N type seed keyword values ... :pre
15 ID, group-ID are documented in "fix"_fix.html command :ulb,l
16 pour = style name of this fix command :l
17 N = # of particles to insert :l
18 type = atom type to assign to inserted particles (offset for molecule insertion) :l
19 seed = random # seed (positive integer) :l
20 one or more keyword/value pairs may be appended to args :l
21 keyword = {region} or {diam} or {vol} or {rate} or {dens} or {vel} or {mol} or {rigid} or {shake} or {ignore} :l
22 {region} value = region-ID
23 region-ID = ID of region to use as insertion volume
24 {diam} values = dstyle args
25 dstyle = {one} or {range} or {poly}
27 D = single diameter for inserted particles (distance units)
28 {range} args = Dlo Dhi
29 Dlo,Dhi = range of diameters for inserted particles (distance units)
30 {poly} args = Npoly D1 P1 D2 P2 ...
31 Npoly = # of (D,P) pairs
32 D1,D2,... = diameter for subset of inserted particles (distance units)
33 P1,P2,... = percentage of inserted particles with this diameter (0-1)
35 idflag = {max} or {next} = how to choose IDs for inserted particles and molecules
36 {vol} values = fraction Nattempt
37 fraction = desired volume fraction for filling insertion volume
38 Nattempt = max # of insertion attempts per particle
40 V = z velocity (3d) or y velocity (2d) at which
41 insertion volume moves (velocity units)
42 {dens} values = Rholo Rhohi
43 Rholo,Rhohi = range of densities for inserted particles (mass/volume units)
44 {vel} values (3d) = vxlo vxhi vylo vyhi vz
45 {vel} values (2d) = vxlo vxhi vy
46 vxlo,vxhi = range of x velocities for inserted particles (velocity units)
47 vylo,vyhi = range of y velocities for inserted particles (velocity units)
48 vz = z velocity (3d) assigned to inserted particles (velocity units)
49 vy = y velocity (2d) assigned to inserted particles (velocity units)
50 {mol} value = template-ID
51 template-ID = ID of molecule template specified in a separate "molecule"_molecule.html command
52 {molfrac} values = f1 f2 ... fN
53 f1 to fN = relative probability of creating each of N molecules in template-ID
54 {rigid} value = fix-ID
55 fix-ID = ID of "fix rigid/small"_fix_rigid.html command
56 {shake} value = fix-ID
57 fix-ID = ID of "fix shake"_fix_shake.html command
59 skip any line or triangle particles when detecting possible
60 overlaps with inserted particles :pre
65 fix 3 all pour 1000 2 29494 region myblock
66 fix 2 all pour 10000 1 19985583 region disk vol 0.33 100 rate 1.0 diam range 0.9 1.1
67 fix 2 all pour 10000 1 19985583 region disk diam poly 2 0.7 0.4 1.5 0.6
68 fix ins all pour 500 1 4767548 vol 0.8 10 region slab mol object rigid myRigid :pre
72 Insert finite-size particles or molecules into the simulation box
73 every few timesteps within a specified region until N particles or
74 molecules have been inserted. This is typically used to model the
75 pouring of granular particles into a container under the influence of
76 gravity. For the remainder of this doc page, a single inserted atom
77 or molecule is referred to as a "particle".
79 If inserted particles are individual atoms, they are assigned the
80 specified atom type. If they are molecules, the type of each atom in
81 the inserted molecule is specified in the file read by the
82 "molecule"_molecule.html command, and those values are added to the
83 specified atom type. E.g. if the file specifies atom types 1,2,3, and
84 those are the atom types you want for inserted molecules, then specify
85 {type} = 0. If you specify {type} = 2, the in the inserted molecule
86 will have atom types 3,4,5.
88 All atoms in the inserted particle are assigned to two groups: the
89 default group "all" and the group specified in the fix pour command
90 (which can also be "all").
92 This command must use the {region} keyword to define an insertion
93 volume. The specified region must have been previously defined with a
94 "region"_region.html command. It must be of type {block} or a z-axis
95 {cylinder} and must be defined with side = {in}. The cylinder style
96 of region can only be used with 3d simulations.
98 Individual atoms are inserted, unless the {mol} keyword is used. It
99 specifies a {template-ID} previously defined using the
100 "molecule"_molecule.html command, which reads a file that defines the
101 molecule. The coordinates, atom types, center-of-mass, moments of
102 inertia, etc, as well as any bond/angle/etc and special neighbor
103 information for the molecule can be specified in the molecule file.
104 See the "molecule"_molecule.html command for details. The only
105 settings required to be in this file are the coordinates and types of
106 atoms in the molecule.
108 If the molecule template contains more than one molecule, the relative
109 probability of depositing each molecule can be specified by the
110 {molfrac} keyword. N relative probablities, each from 0.0 to 1.0, are
111 specified, where N is the number of molecules in the template. Each
112 time a molecule is inserted, a random number is used to sample from
113 the list of relative probabilities. The N values must sum to 1.0.
115 If you wish to insert molecules via the {mol} keyword, that will be
116 treated as rigid bodies, use the {rigid} keyword, specifying as its
117 value the ID of a separate "fix rigid/small"_fix_rigid.html
118 command which also appears in your input script.
120 If you wish to insert molecules via the {mol} keyword, that will have
121 their bonds or angles constrained via SHAKE, use the {shake} keyword,
122 specifying as its value the ID of a separate "fix
123 shake"_fix_shake.html command which also appears in your input script.
125 Each timestep particles are inserted, they are placed randomly inside
126 the insertion volume so as to mimic a stream of poured particles. If
127 they are molecules they are also oriented randomly. Each atom in the
128 particle is tested for overlaps with existing particles, including
129 effects due to periodic boundary conditions if applicable. If an
130 overlap is detected, another random insertion attempt is made; see the
131 {vol} keyword discussion below. The larger the volume of the
132 insertion region, the more particles that can be inserted at any one
133 timestep. Particles are inserted again after enough time has elapsed
134 that the previously inserted particles fall out of the insertion
135 volume under the influence of gravity. Insertions continue every so
136 many timesteps until the desired # of particles has been inserted.
138 NOTE: If you are monitoring the temperature of a system where the
139 particle count is changing due to adding particles, you typically
140 should use the "compute_modify dynamic yes"_compute_modify.html
141 command for the temperature compute you are using.
145 All other keywords are optional with defaults as shown below.
147 The {diam} option is only used when inserting atoms and specifes the
148 diameters of inserted particles. There are 3 styles: {one}, {range},
149 or {poly}. For {one}, all particles will have diameter {D}. For
150 {range}, the diameter of each particle will be chosen randomly and
151 uniformly between the specified {Dlo} and {Dhi} bounds. For {poly}, a
152 series of {Npoly} diameters is specified. For each diameter a
153 percentage value from 0.0 to 1.0 is also specified. The {Npoly}
154 percentages must sum to 1.0. For the example shown above with "diam 2
155 0.7 0.4 1.5 0.6", all inserted particles will have a diameter of 0.7
156 or 1.5. 40% of the particles will be small; 60% will be large.
158 Note that for molecule insertion, the diameters of individual atoms in
159 the molecule can be specified in the file read by the
160 "molecule"_molecule.html command. If not specified, the diameter of
161 each atom in the molecule has a default diameter of 1.0.
163 The {id} option has two settings which are used to determine the atom
164 or molecule IDs to assign to inserted particles/molecules. In both
165 cases a check is done of the current system to find the maximum
166 current atom and molecule ID of any existing particle. Newly inserted
167 particles and molecules are assigned IDs that increment those max
168 values. For the {max} setting, which is the default, this check is
169 done at every insertion step, which allows for particles to leave the
170 system, and their IDs to potentially be re-used. For the {next}
171 setting this check is done only once when the fix is specified, which
172 can be more efficient if you are sure particles will not be added in
175 The {vol} option specifies what volume fraction of the insertion
176 volume will be filled with particles. For particles with a size
177 specified by the {diam range} keyword, they are assumed to all be of
178 maximum diamter {Dhi} for purposes of computing their contribution to
181 The higher the volume fraction value, the more particles are inserted
182 each timestep. Since inserted particles cannot overlap, the maximum
183 volume fraction should be no higher than about 0.6. Each timestep
184 particles are inserted, LAMMPS will make up to a total of M tries to
185 insert the new particles without overlaps, where M = # of inserted
186 particles * Nattempt. If LAMMPS is unsuccessful at completing all
187 insertions, it prints a warning.
189 The {dens} and {vel} options enable inserted particles to have a range
190 of densities or xy velocities. The specific values for a particular
191 inserted particle will be chosen randomly and uniformly between the
192 specified bounds. Internally, the density value for a particle is
193 converted to a mass, based on the radius (volume) of the particle.
194 The {vz} or {vy} value for option {vel} assigns a z-velocity (3d) or
195 y-velocity (2d) to each inserted particle.
197 The {rate} option moves the insertion volume in the z direction (3d)
198 or y direction (2d). This enables pouring particles from a
199 successively higher height over time.
201 The {ignore} option is useful when running a simulation that used line
202 segment (2d) or triangle (3d) particles, typically to define
203 boundaries for spherical granular particles to interact with. See the
204 "atom_style line or tri"_atom_style.html command for details. Lines
205 and triangles store their size, and if the size is large it may
206 overlap (in a spherical sense) with the insertion region, even if the
207 line/triangle is oriented such that there is no actual overlap. This
208 can prevent particles from being inserted. The {ignore} keyword
209 causes the overlap check to skip any line or triangle particles.
210 Obviously you should only use it if there is in fact no overlap of the
211 line or triangle particles with the insertion region.
215 [Restart, fix_modify, output, run start/stop, minimize info:]
217 No information about this fix is written to "binary restart
218 files"_restart.html. This means you must be careful when restarting a
219 pouring simulation, when the restart file was written in the middle of
220 the pouring operation. Specifically, you should use a new fix pour
221 command in the input script for the restarted simulation that
222 continues the operation. You will need to adjust the arguments of the
223 original fix pour command to do this.
225 Also note that because the state of the random number generator is not
226 saved in restart files, you cannot do "exact" restarts with this fix,
227 where the simulation continues on the same as if no restart had taken
228 place. However, in a statistical sense, a restarted simulation should
229 produce the same behavior if you adjust the fix pour parameters
232 None of the "fix_modify"_fix_modify.html options are relevant to this
233 fix. No global or per-atom quantities are stored by this fix for
234 access by various "output commands"_Section_howto.html#howto_15. No
235 parameter of this fix can be used with the {start/stop} keywords of
236 the "run"_run.html command. This fix is not invoked during "energy
237 minimization"_minimize.html.
241 This fix is part of the GRANULAR package. It is only enabled if
242 LAMMPS was built with that package. See the "Making
243 LAMMPS"_Section_start.html#start_3 section for more info.
245 For 3d simulations, a gravity fix in the -z direction must be defined
246 for use in conjunction with this fix. For 2d simulations, gravity
247 must be defined in the -y direction.
249 The specified insertion region cannot be a "dynamic" region, as
250 defined by the "region"_region.html command.
254 "fix deposit"_fix_deposit.html, "fix gravity"_fix_gravity.html,
259 Insertions are performed for individual particles, i.e. no {mol}
260 setting is defined. If the {mol} keyword is used, the default for
261 {molfrac} is an equal probabilities for all molecules in the template.
262 Additional option defaults are diam = one 1.0, dens = 1.0 1.0, vol =
263 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
264 (for 2d), and id = max.