atom_style    granular
atom_modify   map array
boundary      m m m 
newton        off

communicate   single vel yes

units         si

region        domain block -5 5 -5 5 -5 5 units box
create_box    1 domain

neighbor      0.002 bin
neigh_modify  delay 0


#Material properties required for new pair styles

fix  m1 all property/global youngsModulus peratomtype 5.e6
fix  m2 all property/global poissonsRatio peratomtype 0.45
fix  m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix  m4 all property/global coefficientFriction peratomtypepair 1 0.5
#fix  m5 all property/global k_finnie peratomtypepair 1 1.0

#New pair style
pair_style  gran model hertz tangential history #Hertzian without cohesion
pair_coeff  * *

timestep    0.00001

fix  gravi all gravity 9.81 vector 0.0 0.0 -1.0

fix  cad all mesh/surface file Mesh/Deck.stl type 1 scale 0.001
fix  inface all mesh/surface file Mesh/Inseration.stl type 1 scale 0.001
fix  granwalls all wall/gran model hertz tangential history mesh n_meshes 1 meshes cad

#distributions for insertion
fix  pts1 all particletemplate/sphere 15485863 atom_type 1 density constant 2500 radius constant 0.0015
fix  pts2 all particletemplate/sphere 15485867 atom_type 1 density constant 2500 radius constant 0.0025

#region and insertion
group  nve_group region domain
region bc cylinder z 0.0 0.0 0.015 0.05 0.12 units box

fix  pdd1 all particledistribution/discrete 32452843  2 pts1 0.3 pts2 0.7

#particle insertion
fix    ins nve_group insert/stream seed 32452867 distributiontemplate pdd1 &
       nparticles 60000 massrate 0.1 insert_every 1000 overlapcheck yes all_in no vel constant 0.0 0.0 -1.0 &
       insertion_face inface 
       
  fix    integr nve_group nve/sphere
  
  dump   dmp all custom/vtk 200 post/par*.vtk id type type x y z vx vy vz fx fy fz
dump   dumpstress all mesh/gran/VTK 200 post/mesh_*.vtk stress wear cad

  
  #movement
#fix move1 all move/mesh mesh cad wiggle amplitude 0.1 0.1 0.1 period 0.01
#fix move2 all move/mesh mesh cad linear 0. 0. 1.5
#variable omega_v equal 2.0
#fix move2 all move/mesh mesh cad rotate/variable origin 0. 0. 0. axis 1 0. 0. omega v_omega_v


run 10000
#unfix move2
#unfix move1

fix move1 all move/mesh mesh cad wiggle amplitude 0.01 0.01 0.01 period 0.02
fix move2 all move/mesh mesh cad linear 0. 0. -1.5
run 10000