ERROR: Lost atoms

I am currently trying to use LAMMPS to simulate the selective laser melting process of Al-0.8Si-0.6Mg-0.1Cu-0.05Fe (wt%). During the simulation, I encountered a “lost atoms” issue:
ERROR: Lost atoms: original 186064 current 185999 (…/thermo.cpp:488)
Last command: run 1040000 every 10000 “group faraway dynamic all region faraway” “group faraway1 dynamic all region faraway1” “delete_atoms group faraway” “delete_atoms group faraway1”
When viewing the image in OVITO, I found that the simulation box underwent an explosive expansion, and the atoms scattered.

Below is my input file:

units metal
boundary p p s
atom_style atomic
neighbor 2 bin
neigh_modify every 5 delay 0 check yes
timestep 0.001

lattice fcc 4.045
region box block -7 72 -2 54 0 30 units lattice
create_box 8 box

region imobile block -28.315 291.24 -8.09 218.43 0 0.89 units box
create_atoms 1 region imobile
region isothermal block -28.315 291.24 -8.09 218.43 0.89 4.45 units box
create_atoms 2 region isothermal
region transition block -28.315 291.24 -8.09 218.43 4.45 21.36 units box
create_atoms 3 region transition

region s1 sphere 28 28 48 26 units box
create_atoms 4 region s1
region s2 sphere 80 28 48 26 units box
create_atoms 4 region s2
region s3 sphere 132 28 48 26 units box
create_atoms 4 region s3
region s4 sphere 184 28 48 26 units box
create_atoms 4 region s4
region s5 sphere 236 28 48 26 units box
create_atoms 4 region s5

region s6 sphere 28 80 48 26 units box
create_atoms 4 region s6
region s7 sphere 80 80 48 26 units box
create_atoms 4 region s7
region s8 sphere 132 80 48 26 units box
create_atoms 4 region s8
region s9 sphere 184 80 48 26 units box
create_atoms 4 region s9
region s10 sphere 236 80 48 26 units box
create_atoms 4 region s10

region s11 sphere 28 132 48 26 units box
create_atoms 4 region s11
region s12 sphere 80 132 48 26 units box
create_atoms 4 region s12
region s13 sphere 132 132 48 26 units box
create_atoms 4 region s13
region s14 sphere 184 132 48 26 units box
create_atoms 4 region s14
region s15 sphere 236 132 48 26 units box
create_atoms 4 region s15

region s16 sphere 28 184 48 26 units box
create_atoms 4 region s16
region s17 sphere 80 184 48 26 units box
create_atoms 4 region s17
region s18 sphere 132 184 48 26 units box
create_atoms 4 region s18
region s19 sphere 184 184 48 26 units box
create_atoms 4 region s19
region s20 sphere 236 184 48 26 units box
create_atoms 4 region s20

mass 1 26.9815386
mass 2 26.9815386
mass 3 26.9815386
mass 4 26.9815386
mass 5 28.086
mass 6 24.305
mass 7 63.546
mass 8 55.845

set type 4 type/ratio 5 0.007689 100
set type 4 type/ratio 6 0.0067156 100
set type 4 type/ratio 7 0.000430986 100
set type 4 type/ratio 8 0.000245315 100

group s1 region s1
group s2 region s2
group s3 region s3
group s4 region s4
group s5 region s5
group s6 region s6
group s7 region s7
group s8 region s8
group s9 region s9
group s10 region s10
group s11 region s11
group s12 region s12
group s13 region s13
group s14 region s14
group s15 region s15
group s16 region s16
group s17 region s17
group s18 region s18
group s19 region s19
group s20 region s20

group imobile region imobile
group isothermal region isothermal
group transition region transition
region track1 union 10 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10
group track1 region track1
region track2 union 10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20
group track2 region track2

pair_style meam
pair_coeff * * library.meam AlS SiS MgS CuS FeS alsimgcufe.meam AlS AlS AlS AlS SiS MgS CuS FeS

delete_atoms overlap 3 transition track1
delete_atoms overlap 3 transition track2
write_data all.data

compute atomPe all pe/atom
compute avePe all reduce ave c_atomPe
compute KE all ke/atom
variable KB equal 8.625e-5
variable TEMP atom c_KE/1.5/{KB} compute cna all cna/atom 3.453 compute myRDF all rdf 500 compute 1 all msd com yes variable msdx equal c_1[1] variable msdy equal c_1[2] variable msdz equal c_1[3] variable msd equal c_1[4] variable istep equal step fix msd all print 1 "{istep} {msdx} {msdy} {msdz} {msd}" screen no file msd.dat

thermo_style custom step temp pe press etotal vol enthalpy
thermo 1
run 0

variable z0 equal 22 #z方向的参考
variable z_threshold equal 130 #z方向阈值距离
variable z_max equal v_z0+v_z_threshold
region faraway block INF INF INF INF ${z_max} INF units box
region faraway1 block INF INF INF INF INF -2 units box

minimize 1e-15 1e-15 10000 10000
reset_timestep 0

velocity all create 373 1872
fix 1 all nve/limit 0.1
fix 2 all langevin 373 373 $(100.0*dt) 1872
fix 3 all ave/time 1 2000 2000 c_thermo_temp c_thermo_pe c_thermo_press c_avePe file relax.fix
thermo 1000
thermo_style custom step temp pe c_avePe press vol

dump 1 all custom 1000 relax.xyz id type x y z c_cna v_TEMP
run 200000 every 10000 “group faraway dynamic all region faraway” “group faraway1 dynamic all region faraway1” “delete_atoms group faraway” “delete_atoms group faraway1”
write_data relax.data
unfix 1
unfix 2
unfix 3
undump 1
reset_timestep 0

variable dx equal 28+stepdt0.2
region laser1 cylinder z v_dx 52 52 22 73 units box
group laser1 region laser1
region laser2 cylinder z v_dx 156 52 22 73 units box
group laser2 region laser2

compute imobile imobile temp
compute isothermal isothermal temp
compute transition transition temp
compute s1 s1 temp
compute s2 s2 temp
compute s3 s3 temp
compute s4 s4 temp
compute s5 s5 temp
compute s6 s6 temp
compute s7 s7 temp
compute s8 s8 temp
compute s9 s9 temp
compute s10 s10 temp
compute s11 s11 temp
compute s12 s12 temp
compute s13 s13 temp
compute s14 s14 temp
compute s15 s15 temp
compute s16 s16 temp
compute s17 s17 temp
compute s18 s18 temp
compute s19 s19 temp
compute s20 s20 temp

fix 1 imobile spring/self 10.0 xyz
fix 2 isothermal langevin 373 373 $(100.0*dt) 1872
fix 3 all nve
fix 4 track1 heat 1 400 region laser1
fix 5 all ave/time 1 2000 2000 c_s1 c_s2 c_s3 c_s4 c_s5 c_s6 c_s7 c_s8 c_s9 c_s10 c_s11 c_s12 c_s13 c_s14 c_s15 c_s16 c_s17 c_s18 c_s19 c_s20 file SLM.fix
thermo 1000
thermo_style custom step c_imobile c_isothermal c_transition c_s1 c_s2 c_s3 c_s4 c_s5 c_s6 c_s7 c_s8 c_s9 c_s10
dump 1 all custom 1000 SLM.xyz id type x y z c_cna v_TEMP
run 1040000 every 10000 “group faraway dynamic all region faraway” “group faraway1 dynamic all region faraway1” “delete_atoms group faraway” “delete_atoms group faraway1”
write_data heat1.data
unfix 4
run 200000 every 10000 “group faraway dynamic all region faraway” “group faraway1 dynamic all region faraway1” “delete_atoms group faraway” “delete_atoms group faraway1”
write_data cold1.data

fix 4 track2 heat 1 400 region laser2
thermo 1000
thermo_style custom step c_imobile c_isothermal c_transition c_s11 c_s12 c_s13 c_s14 c_s15 c_s16 c_s17 c_s18 c_s19 c_s20
run 1040000 every 10000 “group faraway dynamic all region faraway” “group faraway1 dynamic all region faraway1” “delete_atoms group faraway” “delete_atoms group faraway1”
write_data heat2.data
unfix 4
run 200000 every 10000 “group faraway dynamic all region faraway” “group faraway1 dynamic all region faraway1” “delete_atoms group faraway” “delete_atoms group faraway1”
write_data cold2.data

I would like to understand why this issue occurs and how to resolve it. Any insights or suggestions would be greatly appreciated!
Thank you in advance!

Please note that your input is convoluted and huge. You are not likely to find anybody here to go through this and debug it. Parts of it are unreadable, too.

That means that either your geometry or your force field parameters are not suitable.
You can test this with a very small input, possibly with only one or two elements initially.
Then you can gradually make it more complex, but leave out anything that is not essential for running the input (stuff for analysis you can add at the end) until you reach the “explosion” state and then you can either see for yourself where the problem is, or post a new topic with a more specific question here.

Thank you very much for your reply! I’ve carefully read the guidelines on your homepage, and next time I will present my question in a more concise and efficient manner. I plan to start with a smaller model to identify where the issue lies.

1 Like