I am trying to accomplish the following. I want to simulate a polymer fluid between two LJ93 walls. The ‘yhi’ variable is tied to the npt fix. I am going to include my ‘in’ file here for you to peruse. This code has the effect of yhi getting arbitrarily large. I am looking for some expansion and leveling out at some limit value for yhi. I suspect there is something missing that is simple here. Thanks so much for your help!
– snip –
units lj
timestep 0.005
atom_style bond
boundary p p p
read_data dat.chain
run_style verlet
pair_style soft 1.0
pair_coeff * * 10.0
bond_style harmonic
bond_coeff * 1111 0.967
fix 2 all wall/lj93 ylo EDGE 3.0 1.0 1.122 units box pbc yes
fix 3 all wall/lj93 yhi EDGE 3.0 1.0 1.122 units box pbc yes
fix 1 all npt temp 1.0 1.0 100.0 y 0.0 0.0 1000.0 fixedpoint 0.0 0.0 0.0
yhi is set once to the box edge position and never
changes.
What is odd about your script is that you are using periodic
boundaries and npt, including in the y dimension where
the walls are. It’s possible all particles are contained
within the walls (have you visualized them), and the box
boundaries will continue to expand. A more normal
way to model fluid between 2 walls is to use fixed
or shrink wrap boundaries in y, and put the walls where
you want them.
Thanks Steve. Nice to hear from you after all these years.
I am trying to model efforts in a paper concerning thin polymer films. We have a lj93 wall at yhi and ylo. They are using NPT with temp of 1 and pressure of 0 and the freedom is in the Y axis. This makes yhi move (I am seeing yhi from the ‘thermo’ output.) I am fixing ylo at 1. I am making movies of my runs and they keep all the sites between the two walls. I tried ‘fixed’ and ‘shrinkwrap’ but NPT does not like that, it requires periodic boundaries.
a) yhi may be changing (due to NPT), but the position
of the wall is not changing. The EDGE keyword sets
the wall position to a constant value, which is the yhi at the
time the fix is specified. The wall will not track yhi
thereafter.
b) I don’t think you want a periodic system in y. If you
do this then particles will “see” particles on the other
side of the box thru the wall, due to the PBC. So I
don’t think that’s consistent with what you mean
by a wall.
c) If you want the wall to push on the fluid with a
given “pressure”, you could use the variable feature
of fix wall/lj93 and define a variable that resets the
wall position as a function of current Pyy (or total P),
your desired pressure, and the current position. E.g.
the walls move slowly outward if Pyy > Ptarget or
vice versa. In that case you would want shrink-wrap
boundaries in y, but you could still use periodic
in x,z and have fix NPT barostat x,z. Maybe fix wall/lj93
should have an option that does this more simply.
Suggestions welcome.
d) You can also use an atomic wall (equivalent to
lj93 if its thick enough), and use fix aveforce to push
on the wall atoms as a quasi-rigid entity in y, to apply a “pressure”
in y.