Hi Community,
While using the fix wall/region command I am getting the error - Particle on or inside surface of region used in fix wall/region. I went through the mailing list and found the below script by Steve which is for a fluid confined in a sphere. This script is running fine. I modified just two lines of the script so that it can do the fluid confined in a cylinder instead of a sphere.
units lj
atom_style atomic
boundary s s p
lattice sc 0.5
region r1 sphere 0 0 0 5
#region r1 cylinder z 0 0 5 0 10
create_box 1 r1
create_atoms 1 region r1
mass 1 1.0
velocity all create 1.44 87287 loop geom
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
fix 1 all nve
region r1a sphere 0 0 0 6
#region r1a cylinder z 0 0 10 0 15
fix 2 all wall/region r1a harmonic 20.0 0.0 1.0
dump 1 all xyz 100 dump.xyz
thermo 100
thermo_style custom step temp epair press
run 10000
The two lines to change from sphere to cylinder are
- I replaced the line - region r1 sphere 0 0 0 5 - with - region r1 cylinder z 0 0 5 0 10
- I replaced the line - region r1a sphere 0 0 0 6 - with - region r1a cylinder z 0 0 8 0 14
This should work fine, but I’m getting the above mentioned error.
Any help is very thankful.