[lammps-users] "velocity set" is ignored?

Hi all,

I modified "in.friction" in examples/friction as follows to keep BOTH
temperature and x-component of velocity of group "boundary", which
consists of groups "hi-fixed" and "lo-fixed". I expected that the two
groups would keep their opposite velocities with fixed temperature
while the frictional force were working between them.

--- the modified part of "in.friction" ---
# initial velocities

compute new boundary temp/partial 0 1 0
velocity boundary create 0.1 482748 temp new
velocity hi-fixed set 0.5 0.0 0.0 sum yes
velocity lo-fixed set -0.5 0.0 0.0 sum yes

# fixes

fix 1 all nve
fix 3 boundary temp/rescale 200 0.1 0.1 0.02 1.0
fix_modify 3 temp new
velocity hi-fixed set 0.5 NULL NULL
velocity lo-fixed set -0.5 NULL NULL

I don't see anything keeping the boundary atoms from getting
a force applied to them. This will slow down their initial
velocities.

Steve

Thank you, Steve, for pointing out the problem.
I thought that the commands "velocity set" I wrote below the "fix"
commands would override the velocities of the boundary atoms and thus
would keep the atoms going.

Is the command "velocity set" used only for determining the initial
velocities? If so, which command can be used to keep both temperature
and x-component of velocity of the boundary atoms?

Thank you.
Shigenobu

The velocity command is always a one-time setting, i.e. an initialization
command. If you want v to stay unchanged during a simulation
then you simply make sure either the force on those atoms is 0 (e.g.
the fix setforce command), or you don't integrate them (e.g. don't
include them in the group for fix nve or fix nvt). Note there is
a fix nve/noforce command if you simply want to integrate a group
of atoms via their velocity, but no force.

Steve