Numerical Scheme¶
Velocity-Verlet scheme¶
The time integration in exaDEM uses the velocity form of the Störmer-Verlet algorithm, better known as
velocity-Verlet. It is simple, stable and accurate, and well suited to DEM simulations. At each time step:
-
position at full time step:
\[ \mathbf{x}(t + \Delta t) = \mathbf{x}(t) + \mathbf{v}(t)\,\Delta t + \mathbf{a}(t)\,\frac{\Delta t^2}{2} \] -
velocity at half time step:
\[ \mathbf{v}\left(t + \tfrac{\Delta t}{2}\right) = \mathbf{v}(t) + \mathbf{a}(t)\,\frac{\Delta t}{2} \] -
acceleration at full time step \(\mathbf{a}(t + \Delta t)\), from the forces computed with the positions \(\mathbf{x}(t + \Delta t)\);
-
velocity at full time step:
\[ \mathbf{v}(t + \Delta t) = \mathbf{v}\left(t + \tfrac{\Delta t}{2}\right) + \frac{1}{2}\,\mathbf{a}(t + \Delta t)\,\Delta t \]
The scheme is defined in data/config/config_numerical_schemes.msp. Written out step by step (without the
field-loading optimizations described below), it reads:
Note
To avoid loading the same fields several times, some of these operators are combined into
combined_compute_prolog and combined_compute_epilog, and the default configuration also interleaves the
driver counterparts of several steps (push_f_v_r_driver, force_to_accel_driver, ...):
exaNBody provides generic first-order time-integration operators (exaNBody/src/exanb/push_vec3_1st_order_xform.cpp):
push_v_r: positions from velocities;push_f_v: velocities from forces (i.e. accelerations);push_f_r: positions from forces (i.e. accelerations);
and a second-order one (exaNBody/src/exanb/push_vec3_2nd_order_xform.cpp):
push_f_v_r: positions from both velocities and forces (i.e. accelerations).
Since positions are expressed in a reduced frame in exaDEM, xform_mode: INV_XFORM is mandatory with any
operator that updates the particle positions.
Operators¶
Each operator is described below, so that you can reorder, add or remove them to build another time-integration
scheme. For performance reasons, some of them are merged into combined_compute_prolog and
combined_compute_epilog.
reset_force_moment¶
Resets the force and moment fields.
force_to_accel¶
Computes the particle accelerations from the forces and the mass, \(\mathbf{f} = m\,\mathbf{a}\), with \(\mathbf{f}\) the sum of the forces applied to the particle.
push_to_quaternion¶
Updates the particle orientations \(Q\) from the angular velocities \(\omega\) and angular accelerations
\(\dot\omega\). Parameter: dt_scale, coefficient applied to \(\Delta t\).
push_to_angular_velocity¶
Updates the angular velocities, \(\omega \leftarrow \omega + \dot\omega\,\frac{\Delta t^2}{2}\). Parameter:
dt_scale, coefficient applied to \(\Delta t\).
Note
This operator is not used directly: it is merged into combined_compute_epilog.
push_to_angular_acceleration¶
Computes the angular accelerations from the moments and the inertia: the angular velocity is expressed in the body frame, \(\omega_b = \bar{Q}\,\omega\) (with \(\bar{Q}\) the conjugate of \(Q\)), \(\dot\omega_b\) is computed from the moment and the inertia, and \(\dot\omega = Q\,\dot\omega_b\).
Note
This operator is not used directly: it is merged into combined_compute_epilog.
combined_compute_prolog¶
Combines, in this order and with the dt_scale values of steps 1, 2 and 3 of the scheme above (1.0, 0.5 and 1.0,
not user-configurable):
push_f_v_rpush_f_vpush_to_quaternion
combined_compute_epilog¶
Combines, in this order:
push_to_angular_accelerationpush_to_angular_velocitypush_f_v