Using fix wall/region twice

Hello,

I’m trying to model with LAMMPS 7May 2011 the flow of particles through the cylinder with the sphere inside it, the particles should be reflected from the sphere and from cylinder walls. So I have 2 regions

region simCylinder cylinder z 0 0 1.3 -7 7 units box
region sphere1 sphere 0 0 2 1 units box side out

I use atom_style sphere and want to set lj93 interactions with the walls of sphere and cylinder, however it appears that LAMMPS can understand only one (last) fix wall/region in the script. If I set

fix wall all wall/region sphere1 lj93 1.0e-6 0.001 0.005
fix wall all wall/region simCylinder lj93 1.0e-6 0.001 0.005

then particles are reflected from the cylinder but aren’t reflected from the sphere, and vice versa, if I set

fix wall all wall/region simCylinder lj93 1.0e-6 0.001 0.005
fix wall all wall/region sphere1 lj93 1.0e-6 0.001 0.005

then particles see the sphere but don’t see the outer cylinder. Of course workaround is to make one region with intersect, like

region boundaries intersect 2 sphere1 simCylinder
fix wall all wall/region boundaries lj93 1.0e-6 0.001 0.005

but such behavior is not mentioned anywhere in the manual, so I decided to ask if it is bug or feature?

Nikita Tropin | Scientist

There is no restriction on how many wall commands you can use.

Steve

Then I suppose it is a bug. How can you explain that when I use multiple fix wall/region commands, LAMMPS understands only the last one?

Nikita Tropin | Scientist

Because you use the same ID for different fix commands. From the doc page:

"If you specify a new fix with the same ID and style as an existing
fix, the old fix is deleted and the new one is created (presumably
with new settings)."
http://lammps.sandia.gov/doc/fix.html

Best,
Laurent

2011/6/1 Tropin, Nikita <[email protected]>: