Setting velocity to a rigid group failed!!

That's actually the documented behavior of the fix rigid command. From
the fix rigid doc page:

The aggregate properties of each rigid body are calculated one time at the
start of the first simulation run after these fixes are specified. The
properties include the position and velocity of the center-of-mass of the
body, its moments of inertia, and its angular momentum. This is done using
the properties of the constituent atoms of the body at that point in time
(or see the *infile* keyword option). Thereafter, changing properties of
individual atoms in the body will have no effect on a rigid body’s
dynamics, unless they affect the *pair_style*
<http://lammps.sandia.gov/doc/pair_style.html>interactions that
individual particles are part of. For example, you might think you could
displace the atoms in a body or add a large velocity to each atom in a body
to make it move in a desired direction before a 2nd run is performed, using
the *set* <http://lammps.sandia.gov/doc/set.html> or *displace_atoms*
<http://lammps.sandia.gov/doc/displace_atoms.html> or *velocity*
<http://lammps.sandia.gov/doc/velocity.html>command. But these commands
will not affect the internal attributes of the body, and the position and
velocity of individual atoms in the body will be reset when time
integration starts.

So you need to use your "velocity" command before the first "run" command,
either before or after
the fix rigid command.

Steve

Dear Steve, Axel,

​Thanks for you comments.
In fact, my main simulation is sequential.
Firstly I run for relaxation, (Fix Rigid command comes before first run)
2nd RUN for imposing constant force on the RIGID GROUP (in Z direction),
3rd RUN for subjecting the velocity to it (velocity set ...).
In this situation, what is the solution?

That's actually the documented behavior of the fix rigid command. From
the fix rigid doc page:

The aggregate properties of each rigid body are calculated one time at
the start of the first simulation run after these fixes are specified. The
properties include the position and velocity of the center-of-mass of the
body, its moments of inertia, and its angular momentum. This is done using
the properties of the constituent atoms of the body at that point in time
(or see the *infile* keyword option). Thereafter, changing properties of
individual atoms in the body will have no effect on a rigid body’s
dynamics, unless they affect the *pair_style*
<http://lammps.sandia.gov/doc/pair_style.html>interactions that
individual particles are part of. For example, you might think you could
displace the atoms in a body or add a large velocity to each atom in a body
to make it move in a desired direction before a 2nd run is performed, using
the *set* <http://lammps.sandia.gov/doc/set.html> or *displace_atoms*
<http://lammps.sandia.gov/doc/displace_atoms.html> or *velocity*
<http://lammps.sandia.gov/doc/velocity.html>command. But these commands
will not affect the internal attributes of the body, and the position and
velocity of individual atoms in the body will be reset when time
integration starts.

So you need to use your "velocity" command before the first "run"
command, either before or after
the fix rigid command.

Steve

Dear Steve, Axel,

​Thanks for you comments.
In fact, my main simulation is sequential.
Firstly I run for relaxation, (Fix Rigid command comes before first run)
2nd RUN for imposing constant force on the RIGID GROUP (in Z direction),
3rd RUN for subjecting the velocity to it (velocity set ...).
In this situation, what is the solution?

​i _already_ *told* you.
you are doing that stupid thing again...​