Hello Everyone ! Firstly, thank you for taking the time to help out the LAMMPS community !
I am currently facing an issue in my simulation, which requires me to dynamically add small atoms (type 2) next to already existing larger atoms (type 1), and have them grow until they obtain the same size as the existing atoms (type 1).
Of course, when atoms are added dynamically and their diameter grows with every run, the bond radius will also adapt dynamically.
The issue I am facing is that, when I create the new type 2 atoms, if I set their diameters initially (set type 2 diameter 0.001), I experience an overlap with the type 1 atoms, even if I had already mentioned a pair style and pair coefficient between the two types. What is even more interesting is, if I do not set the diameter initially, the overlap does not exist.
Below are the input files I use to run this simulation. If I want to initialize diameter or not, I comment out the ‘set type 2 diameter 0.001’ line.
Beam
create_atoms 1 single 0.000 0.0 0.0
create_atoms 1 single 0.005 0.0 0.0
.
.
.
create_atoms 1 single 0.045 0.0 0.0
Bonds
create_bonds single/bond 1 1 2
.
.
.
create_bonds single/bond 1 9 10
Angles
create_bonds single/angle 1 1 2 3
.
.
.
create_bonds single/angle 1 8 9 10
Input File
.
.
.
# create growing atoms
create_atoms 2 single ${new_x1} ${new_y1} 0.0
create_atoms 2 single ${new_x2} ${new_y2} 0.0
set type 2 density 0.5
set type 2 diameter 0.001
Pair Interaction
pair_style hybrid/overlay granular lj/cut 0.1
pair_coeff * * granular hertz/material 1e5 0 0.5 tangential linear_nohistory 0 0
pair_coeff * * lj/cut 0 0 0
special_bonds lj/coul 0 1.0 1.0
Growth Loop
label loop_a
variable a loop 2500
# rebuild topology
run 0 pre yes post yes
# diameter growth rate
variable time_growth equal "0.001 + (0.004) * ((v_a) / (2500))"
variable r0 equal "0.003 + (0.005-0.003)* ((v_a) / (2500))"
bond_coeff ${lb} 2.1618112757330144 ${r0}
bond_coeff ${rb} 2.1618112757330144 ${r0}
group grow_atoms id ${l} ${r}
fix grow grow_atoms adapt 1 atom diameter v_time_growth
run 1
next a
jump SELF loop_a
Now, with gravity off, if the set type 2 diameter code is commented out, the new atoms I create do not overlap with the existing type 1 atoms. But, at timestep 0, I start of with very larger type 2 atoms, because LAMMPS randomly assigns one to it. However, if the ‘set type 2 diameter’ is defined, then there is an overlap. By overlap, I mean that the growing type 2 atoms invade the personal space of the type 1 atoms. That is the basis of my problem.
The end goal is to grow these atoms, without any overlap, while gravity is turned on.