Change Box

Hi Dear Lammps users,
I want to increase the simulation box volume using change_box command, and create atoms in the new volume. I am using the following commands, but as the log file shows the zlo parameter does not change:

Commands
change_box all z delta -12.135 0 units box
change_box all boundary p p s
variable PLo equal zlo
variable PHi equal zlo+12.135
region piston block INF INF INF INF {PLo} {PHi} units box

Log File outputs
change_box all z delta -12.135 0 units box
orthogonal box = (8.35295 8.35295 0.394423) to (64.6471 64.6471 96.9706)
change_box all boundary p p s
variable PLo equal zlo
variable PHi equal zlo+12.135
region piston block INF INF INF INF {PLo} {PHi} units box
region piston block INF INF INF INF 12.533548229595021795 ${PHi} units box
region piston block INF INF INF INF 12.533548229595021795 24.668548229595021581 units box

On the other hand, if I accept that the fact that the value of zlo does not change with changing the box volume, and I use the following commands, no atoms will be created in the new volume:

Commands
change_box all z delta -12.135 0 units box
change_box all boundary p p s
variable PLo equal zlo-12.135
variable PHi equal zlo
region piston block INF INF INF INF {PLo} {PHi} units box
create_atoms 1 region piston
group piston region piston

log file
change_box all z delta -12.135 0 units box
orthogonal box = (8.35295 8.35295 0.394423) to (64.6471 64.6471 96.9706)
change_box all boundary p p s
variable PLo equal zlo-12.135
variable PHi equal zlo
region piston block INF INF INF INF {PLo} {PHi} units box
region piston block INF INF INF INF 0.39854822959502200774 ${PHi} units box
region piston block INF INF INF INF 0.39854822959502200774 12.533548229595021795 units box
create_atoms 1 region piston
Created 0 atoms
group piston region piston
0 atoms in group piston

Am I doing something wrong.

Sincerely you
Mahdi Tavakol

This is because you shrink-wrapped the boundary condition along z -
change it to f or m should do it.

Ray

Hi,
Thanks for the reply.

The problem has been solved.
However, can you explain more.
I mean that I know the definition of s, p, f and m.
But, what is the cause of this behavior?

Sincerely you
Mahdi Tavakol

This is because you shrink-wrapped the boundary condition along z -
change it to f or m should do it.

Ray

It is explained here: http://lammps.sandia.gov/doc/boundary.html

Ray