fix addforce/weighted command

Warning

GPU support for this command has not been tested and may not work as expected.

Syntax

fix ID group-ID addforce/weighted keywords values
  • ID, is documented in fix command.

  • addforce/weighted = style name of this fix command

  • zero or more keyword/value pairs may be appended

  • keyword = force or region or limit_total_acceleration or accel_max

force value = fx,fy,fz
  fx,fy,fz = force component values, can be variables (force units)
region value = region-ID
  region-ID = ID of region atoms must be in to have added force
limit_total_acceleration value = yes or no
accel_max value = amax
  amax = maximum acceleration that may be applied to each particle by the resultant force
  (length/time^2 units)

Examples

fix pressureBC all addforce/weighted force 0. 0. 1.06  limit_total_acceleration yes accel_max 10. region press

Description

This fix adds a forces to the particle in the fix group. The force is distributed among the particles in a way so that each particle feels the same acceleration by the added force, i.e. it is weighted using the mass of each particle as weight. The force keyword is mandatory to define the components of the force vector.

If the limit_total_acceleration keyword is set to yes, then the acceleration caused by the resultant force on each particle is limited to the value defined by the keyword accel_max. The resultant force is the sum of the added force and other external forces acting on the particle (e.g., gravity and contact forces).

This is useful to avoid numerical instabilities in case there are not enough eligible particles inside the application region, which would result in high added forces per particle and, therefore, accelerations.

If the region keyword is used, the atom must also be in the specified geometric region in order to have force added to it.

Warning

In case limit_total_acceleration is enabled, the present fix should be located in the input script after all the commands that introduce a force (e.g., gravity) in order for them to be accounted in the calculation of the resultant force.

Restart, fix_modify, output, run start/stop

This fix does not need to write data to binary restart files. None of the fix_modify options are relevant to this fix.A global vector is stored by this fix for access by various output commands. It contains the x,y,and z component of the force that was actually applied No parameter of this fix can be used with the start/stop keywords of the run command.

Restrictions

None

Coarse-graining information:

Using coarsegraining in combination with this command should lead to statistically equivalent dynamics and system state.

Default

accel_max = 0 limit_total_acceleration = no region = whole simulation box