Hi all,
I’m currently using LAMMPS to simulate the selective laser melting (SLM) process of an Al-Mn-Mg-Sc-Zr alloy. The interatomic interactions are described by a DeepMD-trained potential (model-compress.pb). The simulation setup includes a substrate and multiple powder particles, and laser scanning is implemented via fix heat combined with a moving region.
However, I’ve observed that some atoms—especially Mg atoms—exhibit abnormally large displacements, with some even flying out of the simulation domain, which is clearly unphysical.
I visualized the simulation using OVITO, and the abnormal motion is illustrated in the figure below.
As a temporary workaround, I use dynamic regions to delete atoms that have moved too far every 5000 steps (~5 ps). But I understand this approach might only be hiding a deeper issue.以下是我的in文件:
units metal
boundary p p s
atom_style atomic
neighbor 2 bin
neigh_modify every 1 delay 0 check yes
timestep 0.001
read_data combined.data
pair_style deepmd model-compress.pb
pair_coeff * *
region substrate block -40.45 250.79 -40.45 210.34 0 11 units box
group substrate region substrate
region s1 sphere 20 20 31 20 units box
region s2 sphere 62 20 31 20 units box
…………
region s19 sphere 146 146 31 20 units box
region s20 sphere 188 146 31 20 units box
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
group s1 region s1
group s2 region s2
…………
group s19 region s19
group s20 region s20
delete_atoms overlap 3 substrate track1
delete_atoms overlap 3 substrate 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
variable CNA atom c_cna
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
compute 2 all ave/sphere/atom
thermo_style custom step temp pe press etotal vol enthalpy
thermo 1
run 1
variable z0 equal 0
variable z_threshold equal 90
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 -40 units box
minimize 1e-6 1e-8 1000 10000
reset_timestep 0
velocity all create 423 1872
fix 1 all nve/limit 0.1
fix 2 all langevin 423 423 $(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
fix rdf0 all ave/time 1 2000 2000 c_myRDF[*] file rdf0.dat mode vector
fix msd0 all print 1 "${istep} ${msdx} ${msdy} ${msdz} ${msd}" screen no file msd0.dat
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 c_2[2]
run 100000 every 5000 "group faraway dynamic all region faraway" "group faraway1 dynamic all region faraway1" "delete_atoms group faraway" "delete_atoms group faraway1"
write_data relax.data
write_restart relax.equil
unfix 1
unfix 2
unfix 3
unfix rdf0
unfix msd0
undump 1
reset_timestep 0
restart 100000 restart/restart.equil
fix 1 substrate langevin 423 423 $(100.0*dt) 1872
fix 2 all nve
variable dx1 equal 20+step*dt*0.4
region laser1 cylinder z v_dx1 41 41 11 51 units box
group laser1 region laser1
fix 3 track1 heat 1 300 region laser1
fix 4 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 SLM1.fix
fix rdf1 all ave/time 1 100000 400000 c_myRDF[*] file rdf1.dat mode vector
fix msd1 all print 1 "${istep} ${msdx} ${msdy} ${msdz} ${msd}" screen no file msd1.dat
thermo 1000
thermo_style custom step v_dx1 c_substrate 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 v_CNA v_TEMP c_2[2]
run 400000 every 5000 "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 rdf1
unfix 3
fix rdf2 all ave/time 1 50000 500000 c_myRDF[*] file rdf2.dat mode vector
run 100000 every 5000 "group faraway dynamic all region faraway" "group faraway1 dynamic all region faraway1" "delete_atoms group faraway" "delete_atoms group faraway1"
unfix 4
unfix rdf2
unfix msd1
undump 1
write_data cold1.data
So I would like to ask:
- What could be the root cause of this unphysical atomic motion? Could it be due to poor training of the Deep Potential, especially for Mg-related interactions?
- Is it physically or methodologically reasonable to delete atoms in this way during an SLM simulation?
- Are there better ways to stabilize the system, such as improving temperature control, adjusting the timestep, tuning laser parameters, or retraining the DP model?
Any insights or suggestions would be greatly appreciated. Thank you in advance!
