Verlet integration is a symplectic technique used to solve ordinary differential equations for dynamic systems with conservative forces. That is, they are derived from a scalar potential. Two different algorithms are considered: Störmer-Verlet, also called position-Verlet, and velocity-Verlet.
The methods solve ordinary differential equations of second order of the form \[ \mathbf{\ddot{x}}(t) = \mathbf{a}(\mathbf{x}(t)) \] where \(\mathbf{x}(t)\) is the position and \(\mathbf{a}(\mathbf{x}(t))\) is the acceleration, which only depends on the position.
The update step by the numerical integration is \[ \mathbf{x}_{n+1} = \mathbf{x}_n + (\mathbf{x}_n - \mathbf{x}_{n-1}) + \mathbf{a}(\mathbf{x}_n) h^2 \] where \(h\) is the step size.
The update step of the velocity is \[ \mathbf{v}_{n+1} = \frac{\mathbf{x}_{n+1} - \mathbf{x}_n}{h} \]
The mass of the particles in the dynamic system is set to \(m_i = 1\) for all particles. In order to slow oscillation and reach an equilibrium state we include a damping term, a drag force linearly dependent on the velocity. The mass of the particles in the dynamic system is set to \(m_i = 1\) for all particles. The acceleration has the form \[ \mathbf{a}_n = \mathbf{f}_n - \zeta \mathbf{v}_n \, , \quad \zeta \geq 0 \] where \(\zeta\) is coefficient to dump oscillations.
The update step is given by
Nodes are circles of a given size, and collision forces are included in the conservative force terms to avoid node overlap. These forces are zero if the nodes keep a given distance and tend to infinity when the distance between the centers of the nodes tends to zero.