LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

fix insert command

Syntax:

fix ID group-ID insert N type seed keyword values ... 

Examples:

fix 3 all insert 1000 2 29494 region myblock
fix 2 all insert 10000 1 19985583 region disk vol 0.33 100 zrate 1.0 diam 0.9 1.1 

Description:

Insert particles into a granular run every few timesteps within a specified region until N particles have been inserted. This is useful for simulating the pouring of particles into a container.

Inserted particles are assigned the specified atom type and are assigned to two groups: the default group "all" and the group specified in the fix insert command (which can also be "all").

This command must use the region keyword to define an insertion volume. The specified region must have been previously defined with a region command. It must be of type block or a z-axis cylinder and must be defined with side = in.

Each timestep particles are inserted, they are placed randomly inside the insertion volume so as to mimic a stream of poured particles. The larger the volume, 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.

All other keywords are optional with defaults as shown below. The diam, dens, and vel options enable inserted particles to have a range of diameters or densities or xy velocities. The specific values for a particular inserted particle will be chosen randomly and uniformly between the specified bounds. The vz value for option vel assigns a z-velocity to each inserted particle.

The vol option specifies what volume fraction of the insertion volume will be filled with particles. The higher the 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. LAMMPS will make up to Nattempt tries to insert a new particle without overlaps. If it fails it prints a warning.

The zrate option allows the insertion volume to move in the z direction. This enables pouring particles from a successively higher height over time.

Restrictions:

Can only be used with atom_style granular. A gravity fix in the -z direction must be defined for use in conjunction with this fix.

Related commands:

fix_gravity, region

Default:

The option defaults are diam = 1.0 1.0, dens = 1.0 1.0, vol = 0.25 50, zrate = 0.0, vel = 0.0 0.0 0.0 0.0 0.0.