Skip to content

External Forces

External forces act on the particles from sources outside the particle system: gravity, fluid drag, or user-defined forces applied to some particles or regions.

gravity_force

\[ \mathbf{f} = m\,\mathbf{g} \]

with \(m\) the particle mass and \(\mathbf{g}\) the gravity vector.

Parameter Description
gravity gravity vector, default [0, 0, -9.807]
- gravity_force:
   gravity: [0, 0, -0.009807]

quadratic_force

Quadratic drag modelling air or fluid friction:

\[ \mathbf{f} = -\mu\,c_x\,\|\mathbf{v}\|\,\mathbf{v} \]

with \(c_x\) the aerodynamic coefficient, \(\mu\) the drag coefficient and \(\mathbf{v}\) the particle velocity.

Parameter Description
cx aerodynamic coefficient, default for air 0.38
mu drag coefficient, default for air 0.000015
- quadratic_force:
   cx: 0.38
   mu: 0.0000015

See the example quadratic-force-test/QuadraticForceInput.msp.

sphere_fluid_friction

Drag from a fluid velocity field defined on the cells of the grid:

\[ \mathbf{dv} = \mathbf{fv} - \mathbf{pv}, \qquad \mathbf{f} = c_x\,\mathbf{dv}\,\|\mathbf{dv}\|\,\pi\,r^2 \]

with \(\mathbf{fv}\) the fluid velocity, \(\mathbf{pv}\) the particle velocity, \(r\) the particle radius and \(c_x\) a coefficient (1 by default).

Note

The fluid velocity of each cell is set with the set_cell_values operator of exaNBody. See the jet example.