Particles going outside of the simulation box

Dear all,

I am doing 2D simulation of a Debye-huckel system. In the movie of my simulation the particles remain confined to a region but goes outside of the simulation box. Can anybody suggest me any solution.

Regards,
Hirak

Your description makes no sense. How can particles remain confined in
a region and yet go outside of the simulation box?

Axel.

I am saying that the particles can be seen oscillating but they dont fly apart and as a whole they are transferred outside the simulation box.

then using the term "region" does not apply, but rather you should say
they stay close together.

what you see is a called a center of mass drift. that should not
happen, but is not usual either.
if often is due to the velocity initialization, you can subtract the
center of mass momentum with the velocity command.

it also can happen when you use interactions with a cutoff that have
not sufficiently decayed at the cutoff distance and then your system
geometry is such that not all residual forces cancel. that is a
systematic problem and can be resolved by adjusting the pair style
settings.

if you want to restrain the group to a specific location, you can
apply fix spring to the group of particles.

axel.

That’s really helpful. Thanks a lot.

Regards,
Hirak

I have tried zeroing the initial center of mass momentum by using velocity command. Also tried using “fix spring” command. But they didn’t work.

In this simulation i have used a confining potential and incorporated it via “fix addforce” command . I have seen that once i increase the confinement strength keeping other parameters fixed the problem occurs.

I have tried zeroing the initial center of mass momentum by using velocity command. Also tried using “fix spring” command. But they didn’t work.

perhaps you didn’t use those properly.

In this simulation i have used a confining potential and incorporated it via “fix addforce” command . I have seen that once i increase the confinement strength keeping other parameters fixed the problem occurs.

your system behaves according to the physics of the model you implement. if that is not the behavior you expect, there is no “magic” LAMMPS command that will suddenly bring those in agreement again. you need to understand why things behave in unexpected ways and whether your model is not modeling what you want or your expectations are not what the physics dictates. which is which is next to impossible to determine from remote. to figure it out is part of the process.

axel.