fix insert/pack/face command¶
fix insert/pack/face/universe command¶
Syntax¶
fix ID group-ID insert/pack/face seed seed_value general_keywords general_values pack_face_keywords pack_face_values
fix ID group-ID insert/pack/face/universe seed seed_value general_keywords general_values pack_face_keywords pack_face_values ukeyword uvalue
ID, group-ID are documented in fix command
insert/pack/face = style names of this fix command
seed = obligatory keyword
seed_value = random # seed (positive integer)
one or more general keyword/value pairs can be appended
general_keywords = verbose or maxattampt or insert_every or all_in
verbose = yes or no maxattempt value = ma ma = max # of insertion attempts per atom (positive integer) insert_every value = ie ie = every how many time-steps particles are inserted (also receiving interval in universe version) - insertion happens periodically (positive integer) start value = ts ts = time-step at which insertion should start (positive integer larger than current time-step) all_in value = yes or no
following the general keyword/value section, one or more pack_face keyword/value pairs can be appended for the fix insert/pack/face command
pack_face_keywords = region or massflow_face or cg or type_offset or ntry_mc
region value = region-ID region-ID = ID of the region mesh/hex where the particles will be generated massflow_face values = fix-ID fix-ID = ID of a fix massflow/mesh/face or fix massflow/mesh/face/universe command cg value = cg cg = coarse grain ratio of particles to insert (N/A to universe version) type_offset value = to to = offset in atom type compared to particles measured by fix massflow/mesh/face ntry_mc values = n n = number of Monte-Carlo steps for calculating the region's volume (positive integer) temperature value = yes or no yes = to set the temperature of the inserted particles chemistry value = yes or no yes = to set the reduction state of the inserted particles
one ukeyword/uvalue pair must be appended for the universe version of this command
ukeywords = receive_from_partition
receive_from_partition value = partition partition = partition to receive data from in multi-partition simulations
Examples¶
fix ins resolved insert/pack/face seed 1001 maxattempt 500 insert_every 500 all_in yes region hexregion massflow_face massflow cg 1 type_offset 1 ntry_mc 10000
Description¶
Insert particles recorded by fix massflow/mesh/face into a granular run every few timesteps within the specified region, as defined via the region keyword. The region of type mesh/hex must hold the element property ‘face_id’ corresponding to the ‘face_id’ property of the mesh used in fix massflow/mesh/face. This command uses a distributiontemplate generated automatically from the data collected by fix massflow/mesh/face to define the properties of the inserted particles.
The verbose keyword controls whether statistics about particle insertion is output to the screen each time particles are inserted.
At each insertion step, fix insert/pack/face tries to insert all particles recorded by fix massflow/mesh/face since the last insertion.
The frequency of the particle insertion can be controlled by the keyword insert_every, which defines the number of time-steps between two insertions.
The start keyword can be used to set the time-step at which the insertion should start.
Inserted particles are assigned the atom types recorded by fix massflow/mesh/face which can be altered via the type_offset keyword. The particles are assigned to 2 groups: the default group “all” and the group specified in the fix insert command.
Overlap is checked for at insertion, both within the inserted particle package and with other existig particles. The number of insertion attempts per particle can be specified via the maxattempt keyword. Each timestep particles are inserted, the command will make up to a total of M tries to insert the new particles without overlaps, where M = # of inserted particles * maxattempt. If unsuccessful at completing all insertions, a warning will be printed.
The all_in flag determines if the particle is completely contained in the insertion region (all_in yes) or only the particle center (all_in no).
The initial velocity is determined by the face- and mass-averaged data gathered by fix massflow/mesh/face.
Description for fix insert/pack/face:
This command must use the region keyword to define an insertion volume. The specified region must have been previously defined with a region mesh/hex command. Dynamic regions are not supported as insertion region. Each timestep particles are inserted, they are placed randomly inside the hexahedral cell of the insertion volume that corresponds to the face of the surface mesh used by fix massflow/mesh/face.
The massflow_face must be used to specify a fix massflow/mesh/face command that determines the number and parameters of the particles to insert.
The cg value determines the coarse grain ratio of the particles to insert.
The type_offset option can be used to change the atom type of the inserted particles from the atom type of the particles recorded by fix massflow/mesh/face. The given offset is added to the original atom type.
To determine the volume of each hexahedron of the insertion region, a Monte Carlo approach is used. The ntry_mc keyword is used to control the number of MC tries that are used for the volume calculation.
If LIGGGHTS is invoked in multi-partition mode (cf. Command-line options), where each partition represents a separate coarse-graining level of the multi-level coarse-grain model, the universe version of this command needs to be used. In this case the coupled partition must be specified via the receive_from_partition option. Furthermore, massflow_face needs to specify a fix of style massflow/mesh/face/universe on the coupled partition. In this mode the nevery option also specifies the interval for receiving data.
Restart, fix_modify, output, run start/stop, minimize info:
Information about this fix is written to binary restart files. This means you can restart a simulation while inserting particles, when the restart file was written during the insertion operation.
None of the fix_modify options are relevant to this fix. A global vector is stored by this fix for access by various output commands. The first component of the vector is the number of particles already inserted, the second component is the mass of particles already inserted. No parameter of this fix can be used with the start/stop keywords of the run command. This fix is not invoked during energy minimization.
Restrictions¶
Dynamic regions are not supported as insertion region.
Default¶
The defaults are maxattempt = 50, all_in = no, start = next time-step, cg = 1, type_offset = 0, ntry_mc = 100000