Simulation of granular flow down an inclined plane

I am trying to simulate granular flow down an inclined plane but I keep losing the atoms at the last step – after starting with 4000, all of them disappear at the very last step.

Since I am a first-time user of LAMMPS I could not quite figure out yet where I am going wrong.

This is what my input script currently looks like:

units si
dimension 3
atom_style sphere
boundary p p fm
newton off
comm_modify cutoff 1 mode single vel yes

region hill block 0 0.20 0 0.20 0 0.20 units box
create_box 1 hill
create_atoms 1 random 4000 21312 hill
set region hill diameter 0.005
neighbor 0.005 bin
neigh_modify check yes

variable kn equal 200000.0
#variable kt equal 100000.0
variable dcnormal equal 50.0
#variable dctangent equal 0.25
variable syc equal 0.5
variable tdf equal 1

pair_style gran/hertz/history {kn} NULL {dcnormal} NULL {syc} {tdf}
pair_coeff * *
timestep 0.005

fix 1 all wall/gran hertz/history {kn} NULL {dcnormal} NULL {syc} {tdf} zplane 0 0.2
fix 2 all nve/sphere

compute msd all msd com yes
variable twopoint equal “((c_msd[4])(stepdt+0.000006))/4”
fix 4 all vector 10 c_msd[4]
variable fitslope equal “slope(f_4)/4/(10*dt)”

thermo 1000
thermo_style custom step temp c_msd[4] v_twopoint v_fitslope
thermo_modify lost ignore norm no

fix 3 all gravity 9.8 chute 27

#dump dc all local 2000 diff.incflo.grandiff* index c_msd[4]

run 15000

Moreover, the dump prior to the run command (which I hashtagged) would not display the mean squared displacement and I keep encountering an error stating that dump local does not compute local atom info.

Any help from the more experienced user of LAMMPS would be greatly appreciated.

Thank you

-Elleesse NP

I think you’ll be able to knock some of these off by just simplifying your script and thinking about what type of objects your computes output.

For example, look into the keywords IN THE MANUAL that you specify in the dump command - what does index do? what is the size of c_msd[4]? why is your N=2000? what does dump local mean? Why can c_msd[4] be output using thermo_style? It is clear that these are not understood at this point, and learning to figure these things out through the scientific method is paramount to a scientist’s training. Everything you need to answer those is on 2 pages in the manual.

You just have to read it.

You’ll have to simplify anyways, for anyone to take any type of detailed look. For example, I have no idea what the following is trying to accomplish.

“compute msd all msd com yes
variable twopoint equal “((c_msd[4])(stepdt+0.000006))/4”
fix 4 all vector 10 c_msd[4]
variable fitslope equal “slope(f_4)/4/(10*dt)””

If the last 3 lines are not vital to reproducing the errors you receive, drop them! If you expect to get help from busy folks.