enable_gravity command

Purpose

Command for switching on gravity, default is 9.807 (force/mass units) in negative z-direction.

Note

This command is supported by Aspherix GPU.

Syntax

enable_gravity keyword value

Keywords:

Keyword

Description

id

user-assigned name for the command call

particle_group

ID of the group of particles on which the command is applied
default: all

direction

value exponential_averaging_time time_value; value = yes or no
vector direction to apply the acceleration
default: (0,0,-1)

magnitude

size of acceleration
default: 9.807; units: [length/time^2]

Examples

enable_gravity
enable_gravity direction (1, 1, 0) magnitude 9.807

Description

Imposes a gravitational acceleration on a group of particles. More generally it can represent any kind of driving field, e.g. a pressure gradient inducing a Poiseuille flow in a fluid. This command imparts the same acceleration to each particle (force/mass).

The direction imposes an acceleration in the vector direction given by (x,y,z). Only the direction of the vector is important; its length is ignored. For 2-D systems, the z component is ignored.

The magnitude of the acceleration is specified in force/mass units. The default setting for the acceleration is in 9.807 (m/s^2, SI units) in negative z-direction. If a different unit system is used (see the units command for details), this value is automatically converted into the selected units.

All components of the direction vector as well as the quantity of the magnitude can be specified as an equal-style variable. If the value is a variable, it should be specified as v_name, where name is the variable name. In this case, the variable will be evaluated each timestep, and its value used to determine the quantity. You should make sure that the variable calculates a result in the appropriate units, e.g. force/mass or degrees.

Equal-style variables can specify formulas with various mathematical functions, and include status_style command keywords for the simulation box parameters and timestep and elapsed time. Thus it is easy to specify a time-dependent gravitational field.

Additional information

No information about this command is written to binary restart files.

Restrictions

none