in.pour

# Custom pour example


variable name string pour


atom_style sphere

boundary p p fm

newton off

comm_modify vel yes


lattice fcc .8

region reg block -35 35 -3 3 0 70

create_box 4 reg


neighbor 0.2 bin

neigh_modify delay 0


pair_style hybrid lj/cut 2.5 gran/hooke/history 2000.0 NULL 50.0 NULL 0.5 0

pair_coeff * * lj/cut 1 1 2.5

pair_coeff 1 1 gran/hooke/history


timestep 0.001

region P1 block -9 -8 -1.5 1.5 60 66

region P2 block -9 -6 -1.5 1.5 65 66

region P3 block -7 -6 -1.5 1.5 63 66

region P4 block -9 -6 -1.5 1.5 63 64

region P union 4 P1 P2 P3 P4

region O1 block -4 -3 -1.5 1.5 60 66

region O2 block -4 -1 -1.5 1.5 65 66

region O3 block -2 -1 -1.5 1.5 60 66

region O4 block -4 -1 -1.5 1.5 60 61

region O union 4 O1 O2 O3 O4


region U1 block 1 2 -1.5 1.5 60 66

region U2 block 1 4 -1.5 1.5 60 61

region U3 block 3 4 -1.5 1.5 60 66

region U union 3 U1 U2 U3


region R1 block 6 7 -1.5 1.5 60 66

region R2 block 6 9 -1.5 1.5 65 66

region R3 block 8 9 -1.5 1.5 63 66

region R4 block 6 9 -1.5 1.5 63 64

region R5 prism 8 9 -1.5 1.5 60 63 0 -.75 0

region R union 5 R1 R2 R3 R4 R5

region POUR union 4 P O U R

group POUR region POUR

create_atoms 2 region POUR


fix 1 all nve/sphere

fix 2 all gravity 1.0 spherical 0.0 -180.0

fix zlower all wall/gran hooke/history 2000.0 NULL 50.0 NULL 0.5 0 &

zplane 0.0 2000.0


#fix 3 POUR nve/noforce

#fix 4 POUR setforce 0.0 0.0 0.0


region slab block -3 3 -2 2 69.5 70

fix ins all pour 40000 1 300719 vol 0.5 100 region slab


region slab2 block -16 -15 -2 2 69.5 70

fix ins2 all pour 10000 3 300719 vol 0.5 100 region slab2


region slab3 block 15 16 -2 2 69.5 70

fix ins3 all pour 10000 4 300719 vol 0.5 100 region slab3


compute 1 all erotate/sphere

thermo_style custom step atoms ke c_1 vol

thermo 1000

thermo_modify lost ignore norm no

compute_modify thermo_temp dynamic yes


dump 1 all custom 250 dump.${name}.* id type x y z vx vy vz



run 1000000

# Original LAMMPS pour example script

# Pour granular particles into chute container, then induce flow


atom_style sphere

boundary p p fm

newton off

comm_modify vel yes


region reg block -10 10 -10 10 -0.5 16 units box

create_box 1 reg


neighbor 0.2 bin

neigh_modify delay 0


# IMPORTANT NOTE: these values of stiffness (2000) and timestep (0.001)

# are used in this example file to produce a quick simulation and movie.

# More appropriate values for realistic simulations would be

# k = 2.0e5 and dt = 0.0001, as in bench/in.chute.


pair_style gran/hooke/history 2000.0 NULL 50.0 NULL 0.5 0

pair_coeff * *


timestep 0.001


fix 1 all nve/sphere

fix 2 all gravity 1.0 spherical 0.0 -180.0

fix zlower all wall/gran hooke/history 2000.0 NULL 50.0 NULL 0.5 0 &

zplane 0.0 2000.0


region slab block -9.0 9.0 -9.0 9.0 10.0 15.0 units box

fix ins all pour 3000 1 300719 vol 0.13 50 region slab


compute 1 all erotate/sphere

thermo_style custom step atoms ke c_1 vol

thermo 1000

thermo_modify lost ignore norm no

compute_modify thermo_temp dynamic/dof yes


#dump id all atom 1000 dump.pour


#dump 2 all image 1000 image.*.jpg type type &

# axes yes 0.8 0.02 view 80 -30

#dump_modify 2 pad 5


#dump 3 all movie 1000 movie.mpg type type &

# axes yes 0.8 0.02 view 80 -30

#dump_modify 3 pad 5


run 25000


unfix ins

fix 2 all gravity 1.0 chute 26.0

run 25000



Return to main LAMMPS Tutorials page.