Input script description

Submitted by hossain.aziz on Fri, 11/08/2019 - 00:38

Hi,

I am new to LIGGGHTS. I am looking into the example input script given in the LIGGGHTS documentation. I can see that the 'region' command was used twice in the input script. I do not understand why the 'region' command was used twice. What was the purpose of using the 'region' command twice? I am adding the example input script below. It will be a great help for me if you can explain the reason behind using the 'region' command twice in the input script.

#Contact model example
atom_style granular
atom_modify map array
boundary m m m
newton off
communicate single vel yes
units si
region reg block -0.05 0.05 -0.05 0.05 0. 0.15 units box
create_box 1 reg
neighbor 0.002 bin
neigh_modify delay 0
#Material properties required for pair style
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.95
fix m4 all property/global coefficientFriction peratomtypepair 1 0.05
pair_style gran model hertz tangential history
pair_coeff * *
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.15
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.05 0. 0.
#region of insertion
region bc cylinder z 0. 0. 0.045 0.00 0.15 units box
#particle distributions
fix pts1 all particletemplate/sphere 12345787 1 density constant 2500 radius constant 0.0025
fix pdd1 all particledistribution/discrete 17903 1 pts1 1.0
fix ins all insert/pack seed 123457 distributiontemplate pdd1 vel constant 0. 0. -0.5 &
insert_every once overlapcheck yes all_in yes particles_in_region 1800 region bc
#apply nve integration to all particles
fix integr all nve/sphere
#output settings, include total thermal energy
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 800 post/dump*.newModels id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
#insert particles and run
run 5000

mschramm | Fri, 11/08/2019 - 03:13

First region command
region reg block -0.05 0.05 -0.05 0.05 0. 0.15 units box
is used by the following command
create_box 1 reg
This creates the simulation box that you will be using to simulate 1 particle type using the region id reg.
The dimensions of your simulation box are xlow = -0.05, xhigh = 0.05, ylow = -0.05, yhigh = 0.05, zlow = 0.0, and zhigh = 0.15

The second region command
region bc cylinder z 0. 0. 0.045 0.00 0.15 units box
Is used to define the region in which particles will be inserted utilizing the following command
fix ins all insert/pack seed 123457 distributiontemplate pdd1 vel constant 0. 0. -0.5 insert_every once overlapcheck yes all_in yes particles_in_region 1800 region bc
Here we are telling liggghts to insert particles using the particle distribution pdd1 to insert particles into your simulation domain. But we cannot just insert particles anywhere.
This is why the last option in the command contains "region bc". This tells the fix "ins" to insert the particles in the region defined by region id "bc"