fix set/vel command

Syntax

fix ID group-ID set/vel keywords values ...
  • ID, group-ID are documented in fix command
  • set/vel = style name of this fix command
  • following keyword/value pairs must be appended
  • keyword = dim and (vel or omega)
dim value = x or y or z
  x, y, z = component of the velocity vector to be set
vel value = vel_component
  vel_component = value of the velocity component to be set, can be a variable (velocity units)
omega value = omega_component
  omega_component = value of the omega component to be set, can be a variable (angular velocity units)
  • one or more optional keyword/value pairs can be appended
  • optional keyword = region
region value = region-ID
  region-ID = ID of region atoms must be in to have their (angular) velocity in one direction set
type value = atom type
  atom type = atom type atoms must be of to have their (angular) velocity in one direction set

Examples

fix fixvel all set/vel dim y vel -2.3 region velset
fix fixvel all set/vel dim y omega 10.0 region velset

Description

This fix sets one component of the (angular) velocity of particles in the fix group. The component to be set is defined by the dim keyword. If the keyword vel is used, then the velocity of the particles in the fix group is specified by the argument that follows this keyword. If the keyword omega is used the same happens for the angular velocity of the particles in the fix group.

The dim keyword must be used as well as either vel or omega.

If the optional region keyword is used, the atom must also be in the specified geometric region in order to have the (angular) velocity component set.

The fix also sets the force/torque component on the particle in the specified direction to zero, so that an additional integrator (such as nve/sphere) could be applied to the particles.

Restart, fix_modify, output, run start/stop, minimize info

This fix does not need to write data to binary restart files. None of the fix_modify options are relevant to this fix. This fix computes a global scalar of the force, used to push the particles in the desired direction. No parameter of this fix can be used with the start/stop keywords of the run command. This fix is not invoked during energy minimization.

Restrictions

This fix has to be placed in the input script before the first fix which implements the initial_integrate() function. This is typically implemented by integrators, such as nve/sphere The code will exit with an error if this is not the case. When applied to multispheres, only the optional keyword type is permitted, group and region are not admissible.

Default

region = whole simulation box