LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

fix gravity command

Syntax:

fix ID group gravity style args 

Examples:

fix 1 all gravity chute 24.0
fix 1 all gravity spherical 0.0 -180.0
fix 1 all gravity gradient 0.0 -180.0 0.0 0.1
fix 1 all gravity vector 100.0 1 1 0 

Description:

Impose an additional acceleration on each particle in the group. For granular systems the magnitude is chosen so as to be due to gravity. For non-granular systems the magnitude of the acceleration is specified, so it can be any kind of driving field desired (e.g. a pressure gradient inducing a Poisselle flow). Note that this is different from what the fix addforce command does, since it adds the same force to each atom, independent of its mass. This command adds the same acceleration to each atom (force/mass).

The first 3 styles apply to granular systems. Style chute is typically used for simulations of chute flow where the specified angle is the chute angle, with flow occurring in the +x direction. Style spherical allows an arbitrary 3d direction to be specified for the gravity vector. Style gradient allows the direction of the gravity vector to be time dependent. The units of the gradient arguments are in full rotations per time unit. E.g. a timestep of 0.001 and a gradient of 0.1 means the gravity vector would rotate thru 360 degrees every 10,000 timesteps. For the time-dependent case, the initial direction of the gravity vector is phi,theta at the time the fix is specified.

The strength of the acceleration due to gravity is 1.0 in LJ units, which are the only allowed units for granular systems.

Style vector is used for non-granular systems. An acceleration of the specified magnitude is applied to each atom in the group in the vector direction given by (x,y,z).

Restrictions:

Styles chute, spherical, and gradient can only be used with atom_style granular. Style vector can only be used with non-granular systems.

Related commands:

atom_style granular, fix addforce

Default: none