Dear lammps-users,
To make a solid based on the discrete element method, I try to implement bonds in my simulation. I don’t have a datafile for defining bonds, so I wanted to use create_bond command, not sure if this is possible like that though…
When I run the script, I get: ERROR: Numeric index is out of bounds (…/force.cpp: 763).
The error comes up at the bond_coeff command line.
Does somebody know how I should adjust this line to make it run again?
Thank you in advance for helping!
The script is below:
#------------------------------------Initialization--------------------------------------------------------------------------------------------
atom_style hybrid sphere bond
boundary p p p
newton off
comm_modify vel yes
------------------------------------Make geometry--------------------------------------------------------------------------------------------
lattice sc 1
region reg block 0 10 0 10 0 10 units box
create_box 1 reg
create_atoms 1 box
neighbor 0.2 bin
neigh_modify delay 5
#-------------------------------------Define binding criteria----------------------------------------------------------------------------------
special_bonds lj/coul 1.0 1.0 1.0
bond_style harmonic
bond_coeff 1 80.0 1.0
create_bonds all all 1 1.0 1.5
pair_style gran/hooke/history 561e6 241e6 50 NULL 5 0
pair_coeff * *
#------------------------------------------Settings--------------------------------------------------------------------------------------------
compute peratom all pe/atom
variable tmp equal “lz”
variable L0 equal {tmp}
print "length, tmp: {tmp}"
print “Initial Length, L0: ${L0}”
#------------------------------------------Deformation-----------------------------------------------------------------------------------------
variable srate equal -1.0e1
variable srate1 equal “v_srate/1.0e3”
fix 2 all deform 1 z erate ${srate1} x volume y volume #units box remap x//box length increases by srate1 * 100 percent
variable L equal “lz - v_L0”
Output strain and stress info to file
variable strain equal “v_L/v_L0”
variable p1 equal “v_strain”
variable p2 equal “-pxx”
variable p3 equal “-pyy”
variable p4 equal “-pzz”
fix def1 all print 100 “{p1} {p2} {p3} {p4}” file solid_comp_lin.def1.txt screen no
#--------------------------------------Run simulation------------------------------------------------------------------------------------------
timestep 0.001
dump 1 all custom 500 dump.solid id type xs ys zs radius c_peratom fx fy fz
run 10000