liggghts-with-bonds bond creation

Submitted by liggghtschr on Tue, 05/30/2017 - 12:40

Dear liggghts users,

I want to set up a simulation with bonds (I am using liggghts-with-bonds) that has atoms with different sizes. I was not able to get different atoms with the „create_atoms“ command.

My idea was to first insert the atoms with the fix insert/pack command, let them settle and then create the bonds in order to have bonds and different sized atoms.

Unfortunatly i can‘t get the bonds working when first running the simulation and then create the bonds. I also tried to first insert the atoms and then create the bonds in another script with the restart command because I thought maybe the fix … command needs to stand before my run command?

I attached a simple script I wrote (without the restart command) that doesn't give me an error message but seems to ignore my bond fix.

AttachmentSize
Binary Data bond.tar_.gz183 bytes

mschramm | Tue, 05/30/2017 - 16:36

I was unable to open the script to take a look at it.

Are you trying to simulate a "soil" or a "fiber" of some sort?

If you are looking to do a soil, I would set the max bonds per atom to 6 and after letting your atoms settle use

run 1
fix bondcr all bond/create/gran ${every_n_steps} ${atom_type_i} ${atom_type_j} ${cut_off} 1 6
run 5 # Let the bonds form
fix_modify bondcr every 0 # Make sure no new bonds form

liggghtschr | Fri, 06/02/2017 - 09:37

I somehow messed up the tar file....
The commands you wrote are pretty much the same as the script that I wrote.
Here it is:

atom_style hybrid granular bond/gran n_bondtypes 1 bonds_per_atom 12
atom_modify map array
boundary f f f

newton off
communicate single vel yes
units si

region reg block -0.5 0.5 -.5 .5 0 2 units box
create_box 1 reg

neighbor 0.05 bin
neigh_modify delay 0

#Material properties
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.9
fix m4 all property/global coefficientFriction peratomtypepair 1 0.05
fix m5 all property/global characteristicVelocity scalar 2.

#pair style
pair_style gran model hertz tangential history
pair_coeff * *
bond_style gran

# For stressbreak
variable rp equal 0.0025 # Particle radius
variable d equal 2*${rp} # Particle diameter
variable d equal 2*0.0025
variable sc equal 0.005
variable rb equal ${rp} # Bond-Radius multiplier
variable rb equal 0.0025
variable I equal 0.25*PI*${rb}*${rb}*${rb}*${rb}
variable A equal PI*${rb}*${rb}
variable Y equal 6894.75729*1000*1e4
variable kn equal 2*$Y/$d
variable ks equal 12*$I*$Y/($A*$d*$d*$d) #${kn}/2.5

bond_coeff 1 ${rb} ${kn} ${ks} 1 3e20 3e20
mass 1 1.0
timestep 0.00005
fix 1 all nve/sphere
fix 2 all gravity 9.81 vector 0.0 0.0 -1.0

#box walls
fix boxwalls_x1 all wall/gran model hooke tangential history primitive type 1 xplane -0.5
fix boxwalls_x2 all wall/gran model hooke tangential history primitive type 1 xplane +0.5
fix boxwalls_y1 all wall/gran model hooke tangential history primitive type 1 yplane -0.5
fix boxwalls_y2 all wall/gran model hooke tangential history primitive type 1 yplane +0.5
fix boxwalls_z1 all wall/gran model hooke tangential history primitive type 1 zplane 0
fix boxwalls_z2 all wall/gran model hooke tangential history primitive type 1 zplane +2

#region of insertion
region bc block -0.5 0.5 -0.5 0.5 0 0.5 units box

#particle distributions
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant 0.04
fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. 0 insert_every 2000 overlapcheck yes all_in yes particles_in_region 100 region bc

#thermo settings
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

#make a dump of particles and the stl file
dump dmp all custom 200 post/dump*.data id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

#run with particle insertion
run 4000

#run to let particle settle
run 30000 upto

#form bonds
fix bondcr all bond/create/gran 1 1 1 0.0001 1 12
run 30005 upto
#run
fix_modify bondcr every 0
run 40000 upto

liggghtschr | Sun, 06/04/2017 - 19:21

I tried changing the cutoff distance to a size bigger than the radius and I also tried adding more atoms because I saw that the amount of neighbours per atom was relatively low.
I still don't get any bonds even though the script does not give me any kind of error message so I assume the requirements for building bonds are somehow not met...
Could someone show me a simple script that creates bonds in a script that uses fix insert to insert the atoms? Maybe I am missing a command?