[lammps-users] moving Boundary


I am simulating a system which consists of a box with p p p boundary conditions and metal units are used. Along the z-direction I consider a temperature gradient across a liquid domain with solid slabs at the ends.

The initial dimensions are x: 0-30, y:0-30, z:0-300.
Liquid domain: along z:10-290 and solid slabs are from 0-10 and 290-300.

Both solid slabs are at a high temp than the enclosed liquid between them. Solid temp is maintained by rescaling it after every 100 steps. Liquid is initially equilibrated at its initial temperature and then allowed to interact due to the temperature difference with the solid.

I use 1 fs timestep and upto 100000 steps I find that the solid and liquid occupy almost the positions in the box as assigned initially. But with increasing time steps of simulations, say after 500000 steps I find that the solid slabs have moved and now occupy positions from 0-1.5, and again from 279-300 along z direction. Essentially the total length in z-direction occupied by the slabs remains same. The slabs on both sides are of same material and have same property values.

Can you please suggest some remedy so that the solid slabs occupy the same regions as assigned initially.

Thank you.


You can anchor a group of atoms with a fix spring.
Fix recenter or fix momentum may also be useful.