Granular Model

Submitted by pnkumar on Sat, 01/16/2016 - 14:19

There are predefined granular models provided in the LIGGGHTS Docs. Can I define the new model to use instead of using given models.
I want to use hooke/stiffness model but with a little modification. Can I do that ?

ckloss's picture

ckloss | Mon, 01/25/2016 - 22:35

Hi pnkumar,

if you look into the /src directory of the download, you'll find a couple of model_* files which describe the models which we distribute. If you want to modify any of these, copy the one that is most similar to what you want to do, and edit it by "following the pattern". We also have training courses where we give some insight into how contact model modification works

Best wishes
Christoph

pnkumar | Mon, 02/01/2016 - 08:40

I modified the model file for hookee/stiness in src directory. Then I use hookee stiffness model and run the simulation but particle are leaving the simulation box but this doesn't happen if I use hookee model.

here is the my script file

## Particle filling part
atom_style granular
atom_modify map array
boundary p p f
newton on

communicate single vel yes

units lj

region reg block 0.0 0.08 0.0 0.08 0.0 0.3 units box
create_box 1 reg

neighbor 0.001 bin
neigh_modify delay 0

#Material properties required for new pair styles

fix a1 all property/global kn peratomtypepair 1 2e5
fix a2 all property/global kt peratomtypepair 1 6e4
fix a3 all property/global gamman peratomtypepair 1 3e7
fix a4 all property/global gammat peratomtypepair 1 3e7
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.8
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5

#New pair style
pair_style gran model hooke/stiffness absolute_damping off
pair_coeff * *

timestep 0.00001

fix gravi all gravity 9.81 vector 0.0 0.0 -1.0

#the plane
fix zwall all wall/gran model hooke/stiffness tangential history primitive type 1 zplane 0.0

#distributions for insertion
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 8000 radius constant 0.002
fix pdd1 all particledistribution/discrete 1 1 pts1 1.0

#region and insertion
group nve_group region reg
region reg2 block 0.0 0.08 0.0 0.08 0.0 0.25 units box
#particle insertion
fix ins nve_group insert/rate/region seed 5101 distributiontemplate pdd1 &
nparticles 11000 massrate 10 insert_every 100 overlapcheck yes all_in no vel constant 0.0 0.0 0.0 &
region reg2

#apply nve integration to all particles that are inserted as single particles
fix integr nve_group nve/sphere

#output settings, include total thermal energy
compute 1 all ke
compute 2 all stress/atom
compute 3 all temp
compute 4 all pressure 3
compute 5 all reduce sum c_2[1] c_2[2] c_2[3] c_2[4] c_2[5] c_2[6]

variable press equal -(c_5[1]+c_5[2]+c_5[3])/(3*vol)
thermo_style custom step atoms cpu ke v_press
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

#insert the first particles so that dump is not empty
run 1
dump dmp1 all custom 100 attributes/dump*.xyz id type x y z vx vy vz fx fy fz tqx tqy tqz omegax omegay omegaz
dump_modify dmp1 sort 1
dump dmp2 all custom 100 stress/stress*.xyz id type c_2[1] c_2[2] c_2[3] c_2[4] c_2[5] c_2[6]
dump_modify dmp2 sort 1
dump pic all image 200 images/img*.ppm type type size 640 640 adiam 0.004

#insert particles
run 110000 upto
unfix ins

Can you tell why the particle are leaving the box?

Regards
pnkumar