Dear All,
I am experiencing strange behaviour when using “fix wall/region” with a region defined using “style ellipsoid”. Particles go through the wall and this results in an error,
“ERROR on proc 0: Particle outside surface of region used in fix wall/region (…/fix_wall_region.cpp:307)”
I made a minimal input file to test this (in.test1 and corresponding log.test1). It consists of a single particle starting in the centre of the box, surrounded by a repulsive (WCA) ellipsoid. Instead of being repelled by the wall, it goes through and generates an error.
As a sanity check, I then defined a spherical region using the ellipsoid region style by setting a=b=c (in.test2).
region elip ellipsoid 0 0 0 $((v_r)) $((v_r)) $((v_r)) side in
The same thing happens and it generates the same error (log.test2_elip). However, when I define the same spherical region using the sphere region style,
region S sphere 0 0 0 $((v_r)) side in
it works as expected with no errors (in.test2 and log.test2_sphere). So it seems that there is something off with the “fix wall/region” and “region style ellipsoid” combination.
Please see the attached input/log files for reference. Note that species 2 is just there to help visualize the regions. I am using LAMMPS version 2Aug2023.
Can anyone explain this behaviour (and ideally offer a solution)? Any help would be much appreciated!
EDIT: I cannot upload files because I’m a new user. Instead I’ve appended in.test2 to the end of this post. Happy to provide files via email.
Kind regards,
James
units lj
atom_style atomic
dimension 3
# sphere radius
variable r equal 8
## box length
variable L equal 21
region box0 block $((-v_L/2)) $((v_L/2)) $((-v_L/2)) $((v_L/2)) $((-v_L/2)) $((v_L/2)) units box
create_box 2 box0
## same regions defined via style ellipsoid and sphere
region elip ellipsoid 0 0 0 $((v_r)) $((v_r)) $((v_r)) side in
region S sphere 0 0 0 $((v_r)) side in
create_atoms 2 random 1000 1818 elip ## just to help visualize ellipsoid
create_atoms 1 single 0 0 0
group 1 type 1
# non-interacting WCA potentials for everything
pair_style lj/cut $((2^(1/6)))
pair_coeff * * 0.0 1.0
mass * 1.0
timestep 0.002
fix wall all wall/region elip lj126 1.0 1.0 $((2^(1/6))) ## does not work
#fix wall all wall/region S lj126 1.0 1.0 $((2^(1/6))) ## works
velocity 1 set 1 1 0
fix nve 1 nve
thermo_style custom step temp pe etotal press vol density
thermo 100
dump traj all custom 100 dump.traj id type x y z
run 100000