fix pour gravity direction

Hi everyone,

I am learning lammps. I have a question. In fix pour documentation page, it says that gravity direction must be fixed in -z direction. However, in the example/granular, in order to simulate drum rotation, gravity direction changed into -y direction. Surprisingly, it works well! However, I tried to change the gravity direction again, it says error:Gravity must point in -z to use with fix pour in 3d. I don’t know why.

Can anyone explain it to me? Is there any way to change the gravity direction the second time?

Attached files are input script and log file after running.

Thanks.

Yechen Tang

in.pour.drum (3.03 KB)

log.lammps (12.8 KB)

I don’t have the script you refer to with me. But I’m guessing the
pour was done before the drum rotated. And the fix pour command
was unfixed before the gravity direction was rotated?

Steve

Hi Steve,

Thank you very much for your reply. I downloaded lammps-master from github and this script is in lammps-master/example/granular directory.

The pour was done before drum rotated. However, there is not any unfix pour command. The strange thing is that first time gravity change is fine but second time it says error.

Yechen Tang

It’s possible the fix checks that the pour is done (N particles inserted)
and does not throw an error in that case. But you can’t set
gravity to a non-z direction (for 3d) and pour particles.
LAMMPS does calculations based on particles falling
under the influence of z-dir gravity to do the pour correctly.

Steve

Thank you for your answer.