## Example 2: Press grains out of a jammed hopper by passing a rod through its bottom # New tricks: set grain initial positions, moving boundary, output grain positions and contact forces # Commands that appears in previous examples will not be repeatedly explained. # More command details in the documentation https://lammps.sandia.gov/doc/Commands.html atom_style sphere boundary p p f newton off comm_modify vel yes region reg block -5 5 -5 5 0 10 units box create_box 1 reg neighbor 0.2 bin neigh_modify delay 0 pair_style gran/hertz/history 200.0 200.0 5.0 5.0 0.5 1 pair_coeff * * timestep 0.01 fix 1 all nve/sphere fix 2 all gravity 1.0 spherical 0.0 -180.0 region reg2 block -5 5 -5 5 0 10 units box open 6 fix 3 all wall/gran/region hertz/history 200.0 200.0 5.0 5.0 0.5 1 region reg2 region reg4 cone z 0 0 1 10 3 10 units box open 1 open 2 fix 4 all wall/gran/region hertz/history 200.0 200.0 5.0 5.0 0.5 1 region reg4 read_data initialConfig add append variable cynZ equal 0.1*dt*step region reg5 cylinder z 0 0 1 0 3 units box side out move NULL NULL v_cynZ fix 5 all wall/gran/region hertz/history 200.0 200.0 5.0 5.0 0.5 1 region reg5 compute 2 all pair/local dist fx fy fz p1 p2 p3 compute 3 all property/local patom1 patom2 thermo_style custom step atoms v_cynZ thermo 100 thermo_modify lost warn norm no dump 1 all image 1000 press_*.jpg type type zoom 1.8 view 80 30 dump_modify 1 pad 5 dump 2 all custom 1000 xyz.txt id x y z dump 3 all local 1000 force.txt c_3[*] c_2[*] dump_modify 3 format line "%0.0f %0.0f %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f" run 15000