Bombarded H atoms go beyond the defined simulation box

Dear Lammps users,

I am bombarding Tungsten substrate by Hydrogen atoms as part of my research at Texas A&M and developed an input file to carry out the simulation for the cumulative bombardment.

The input file runs with no problems or errors. My problem is that the H atoms go beyond its X & Y box boundary limits of (0 to 50 by 0 to 50, respectively). The atoms enter the W substrate within the defined boundary then it leaves the substrate from the sides going out of the simulation box. I am not sure how to restrict or prevent the H atoms of leaving beyond the specified simulation box boundary. The H atoms should be trapped into the substrate once its energy is below a certain value, or penetrate the substrate from the top and leaving from the bottom, or get deflected from the top surface (No other options for it to leave from the sides of the simulation box). I am not sure if I need to add more conditions to stop the H atoms from leaving the substrate from that undesired place which is affecting the accuracy of the data.
I would appreciate any help or suggestion to solve this problem.

Aws Al-Shalash (6.01 KB)

You can’t since there is the periodic boundary condition. H atoms appear to be leaving and re-entering the box but in fact they are in the box all the time. If you need to confine the H atoms inside the boundary, which does not really make sense, you would have to remove the periodic boundary condition and apply reflective walls (fix wall/reflect).

Let me remind you, if an H atom can bounce off the surface it may acquire velocities in different directions – that is just how it should work by interacting with the substrate surface. You can not limit the H atoms to only bounce off in one direction.