I am executing a 2D simulation for the flow of granular materials through a silo for varying values of friction co-efficient (\mu). The simulation is executed in a loop with \mu being updated every iteration. A “clear” command is provided at the end of iteration so that the simulation can be restarted from same initial state, but with a different value of \mu which is included as a variable in “pair_style” and “fix wall/gran” commands.
However at the start of the next iteration, after the box and particles are assigned, some atoms are lost as can be seen in the following small portion of the output from lammps
12816 atoms in group 1
2400 atoms in group 2
Deleted 84 atoms, new total = 12732
Deleted 167 atoms, new total = 12565
Setting up run …
Memory usage per processor = 7.22035 Mbytes
Step Atoms KinEng 1
WARNING: Lost atoms: original 12565 current 10356 (…/thermo.cpp:410)
0 10356 6.9886799e-07 0
10000 10356 2.4099494 0.0016851842
20000 10356 9.0233771 0.0044873326
30000 10356 18.731947 0.011745691
40000 10356 29.850186 0.021077709
Note that the atoms are not lost once the simulation (or iteration) starts. That is the number “10356” mentioned in the output above remains the same till the iteration is completed and that number may again decrease in the next iteration.
The cause for this behavior, is most probably, due to the (possible inappropriate) usage of clear command as otherwise there is nothing amiss anywhere. Without using the loop, and hence the clear command, simulation works very well, when the value of \mu is specified manually for every run.
I searched on the lammps-mailing-list for the solution of this specific problem, but was not able to locate it. Any help would be greatly appreciated.