[lammps-users] problem stress tensor output in granular simulations

Dear Lammps Users,

I am having a problem with outputting the per-atom stress tensor in a
granular simulation. In an attempt to debug the problem, I modified
two of the example problems that came with Lammps (21-May-08
distribution). I modified the "indent" and "pour" examples by adding
the following line of code:

compute 2 all stress/atom

This line by itself did not cause a crash.

However, when I modifed the dump to

dump id all custom 1000 dump.pour tag xs ys zs c_2[1]

it did not run. Below is the tested input script (modified pour
example) and the resulting log file.

Thanks,

Priscilla Fonseca

Dear Priscilla,

This is just a shot in the dark, but in your input file it doesn't appear that you create any atoms. You do create the box for the defined region "reg", but you seem to be missing a "create atoms" command.

Jon Z.

The pour example starts with 0 atoms which is probably
causing the compute stress/atom to break. Try running a few
timesteps until you have some atoms, then turning on
the dump with compute stress/atom.

Steve

I tried doing what you suggested, but the break just occurs later -
after the few timesteps that were run without the stress/atom compute.

Anyway, the simulation I am working on creates atoms using read_data.
I only used the "pour" example to illustrate the problem because it is
a known example with a granular atom-type, like my own simulation.
Should I send a shortened example of my input file (my own simulation,
not the pour example)?

Thanks,
Priscilla Fonseca

Finally got around to figuring out this bug. It had to do
with granular systems defined per-atom mass and
the code expecting per-type mass, which is what most
LAMMPS simulations use. The 12Jan09 patch should
fix it.

Also, the indent example does not have this issue, so it
ran fine for me. Wasn't clear from the email if you
were having problems with both scripts or just in.pour which
is a granular example.

Sorry for the delay,
Steve