Hello everyone,
I want to confine my system of particles in a cylinder for which I define a cylindrical region and use the wall/region command. These are my commands -
region cylin_confine cylinder z 0.0 0.0 2.9 0 25 side in
fix wall all wall/region cylin_confine lj126 1.0 0.4 0.448984819
fix_modify wall energy yes
This creates a cylindrical wall along the z-axis. If I try to make the wall periodic in the z-direction by making by boundary periodic and using -
region cylin_confine cylinder z 0.0 0.0 2.9 0 25 side in open 1 open 2
fix wall all wall/region cylin_confine lj126 1.0 0.4 0.448984819
fix_modify wall energy yes
I get an error of lost atoms, could someone let me know what’s going wrong?
Thank You.
Please always report which LAMMPS version you are using.
The documentation for the region command clearly states that regions are not periodic and do not wrap around periodic boundaries.
Thus for your system, you have to make certain the region extends into the ghost atom area, since atoms can move slightly out of the box in between neighbor list rebuilds.
Other than that, no further changes are required.
If you have “lost atoms” errors, then this is due to bad dynamics or bad force field parameters leading to too large forces and thus atoms moving too fast. This could happen, if the confinement wall is too close to the existing atoms.
Below is a small example based on the “melt” example that models atoms in periodic system with a cylindrical confinement:
lattice fcc 0.8442
region box block 0 10 0 10 0 10
create_box 1 box
region cyl cylinder z 5 5 3 0 10 side in
create_atoms 1 region cyl
mass 1 1.0
velocity all create 3.0 87287 loop geom
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
region cyl2 cylinder z 5 5 3.5 -2 12 side in
fix wall all wall/region cyl2 lj126 1.0 0.4 0.5
fix 1 all nve
thermo 50
run 2500