Lammps - FIx NPT - Problem

hello guys,

I am working on simple MD simulation.

I want to work on constant temp and pressure, and I have 3 types of particles as solid particles and 2 types as mobile particles.
I want to keep the mobile particles temp at 300 and pressure at 1bar.
I keep the upper and lower solid particles to be freeze, so that the mobile particles won’t be far from each other.

I use NPT fix for the temp and pressure equilibration.
but at the end of the pressure equilibration, the simulation got a problem with the mobile particles flowing out of the simulation cell boundary, and I cannot figure out what the problem is.

can anyone give a suggestion please?
I have attached the script file.

Thank you
Teddy

in.MD1 (3.56 KB)

hello guys,

I am working on simple MD simulation.

​actually, your input is not so simple. it is quite complex.​

I want to work on constant temp and pressure, and I have 3 types of
particles as solid particles and 2 types as mobile particles.
I want to keep the mobile particles temp at 300 and pressure at 1bar.
I keep the upper and lower solid particles to be freeze, so that the
mobile particles won't be far from each other.

I use NPT fix for the temp and pressure equilibration.
but at the end of the pressure equilibration, the simulation got a problem
with the mobile particles flowing out of the simulation cell boundary, and
I cannot figure out what the problem is.

can anyone give a suggestion please?
I have attached the script file.

​there are several inconsistencies in your input and things that don't make
sense.
- you are using atom style sphere, but you have point particle
interactions. so why not atom style atomic?
- you are using fix freeze, which is meant for extended (e.g. granular)
particles, but you only have point particles
- you are using fix box/relax with an MD, while it is only active during
minimization.
- you are issuing two fix box/relax commands. there must not be multiple
fixes changing the box at the same time. later you issue a fix npt in
addition. you just got lucky here.

your system is quite complex with very complex and hard to follow exclusion
of interactions​ and zeroed parameters. i suggest you start with setting up
a smaller/simpler system with less particle types and a simpler geometry
and make that work first and then gradually increase complexity while
checking the correctness and behavior until you reach the desired setup. if
you do this well, you should be able to detect, where the problem of
particles behaving in unexpected ways originates.

axel.