[lammps-users] about modify fix wall

Dear,

------------------------------------|

-----wall-- | |
periodic boundary of system
-----wall-- | |

------------------------------------|

I have modified the fix wall/lj93 to a cylindrical wall as above in blue. I delete the code for checking x,y,z periodic boundary because my cylindrical wall is only a part of my simuation system.

[deleted
/* if (dim == 0 && domain->xperiodic)
error->all(“Cannot use wall in periodic dimension”);
if (dim == 1 && domain->yperiodic)
error->all(“Cannot use wall in periodic dimension”);
if (dim == 2 && domain->zperiodic)
error->all(“Cannot use wall in periodic dimension”);
*/
]

But when I run my in.file, if the atoms entering the cylindrical cavity, the atoms’ coordinate will be nan I don’t know what the error’s origin is. would some kindy people like to help me analyze this question? Thanks in advance.

Following is a part of error information.
ITEM: ATOMS
1 1 -2 0 0 0 0 0
2 1 -2.94212 0.0676817 0 0 0 0
3 1 -3.04217 0.978036 0 0 0 0
4 1 -3.8616 1.40182 0 0 0 0
5 1 -4.76045 1.40556 0 0 0 0
ITEM: ATOMS
1 1 nan nan 0 0 0 0
2 1 nan nan 0 0 0 0
3 1 -3.0586 0.95618 0 0 0 0
4 1 -3.86056 1.39668 0 0 0 0
5 1 -4.79383 1.3999 0 0 0 0
ITEM: ATOMS
1 1 nan nan 0 0 0 0
2 1 nan nan 0 0 0 0
3 1 nan nan 0 0 0 0
4 1 -3.86353 1.39404 0 0 0 0
5 1 -4.8104 1.40422 0 0 0 0

Dear,

dear!

>------------------------------------|
> > > >
> >-----wall-- | |
> > periodic boundary of system
> >-----wall-- | |
> > > >
>------------------------------------|

I have modified the fix wall/lj93 to a cylindrical wall as above in blue.
I delete the code for checking x,y,z periodic boundary because my
cylindrical wall is only a part of my simuation system.

actually what you have is not a wall alone but an "object".

[...]

But when I run my in.file, if the atoms entering the cylindrical
cavity, the atoms' coordinate will be nan I don't know what the
error's origin is. would some kindy people like to help me analyze
this question? Thanks in

NaN stands for 'Not a Number' and means that you have tried to compute
something that does not result in a "legal" floating point number.
(division by zero, square root of a negative number or similar).

there are many reasons why this can happen. i'd suggest to single
step through the code with a debugger to locate the culprit.
with the setup from above, how do you intend to block particles
from bypassing the cylinder? perhaps your atom has moved to the
wrong side of the wall..

cheers,
   axel.

advance.

Following is a part of error information.

[...]

If you run your modified LAMMPS under valgrind
on a single proc, you can often find invalid math
operations or memory errors your added code
is creating.

Steve