I want to implement a simple particules system using the velocity form of the Verlet algorithm as integrator.
Initial conditions at $t=0$ for a given particule $p$:
- mass: $ m $
- position: $\overrightarrow x(t=0) = \overrightarrow x_0$
- velocity: $\overrightarrow v(t=0) = \overrightarrow v_0$
- forces applied to it: $ \overrightarrow F(t=0) = \overrightarrow F_0 $
Algorithm's recipe says:
- Calculate: $\overrightarrow v(t+\frac{1}{2}\Delta t) = \overrightarrow v(t) + \frac{1}{2}\overrightarrow a(t)\Delta t$
- Calculate: $\overrightarrow x(t+\Delta t) = \overrightarrow x(t) + \overrightarrow v(t+\frac{1}{2}\Delta t) \Delta t$
- Derive: $\overrightarrow a(t+\Delta t)$ from the interaction potential using $\overrightarrow x(t+\Delta t)$
- Calculate: $\overrightarrow v(t+\Delta t) = \overrightarrow v(t + \frac{1}{2}\Delta t) + \frac{1}{2}\overrightarrow a(t+\Delta t)\Delta t$
Let's apply it in order to find $\overrightarrow x(t=1)$ and $\overrightarrow v(t=1)$, so with $\Delta t = 1$:
- $\overrightarrow v(0+\frac{1}{2}1) = \overrightarrow v(0) + \frac{1}{2}\overrightarrow a(0)1 = \overrightarrow v_0 + \frac{1}{2}\frac{\overrightarrow F_0}{m}$ [OK using Newton's second law]
- $\overrightarrow x(0+1) = \overrightarrow x(0) + \overrightarrow v(0+\frac{1}{2}1) 1 = \overrightarrow x_0 + (1.)$ [OK using previous result (1.)]
- ???
- $\overrightarrow v(0+1) = \overrightarrow v(0 + \frac{1}{2}1) + \frac{1}{2}\overrightarrow a(0+1)1 = (1.) + \frac{1}{2}(3.)$ [OK using (1.) and (3.)]
--
So I'm stuck with (3.)
I have to calculate $\overrightarrow a(0+1)$ but I don't know how... I can't apply Newton's second law here since I don't know $\overrightarrow F(t=1)$. Algorithm says "from the interaction potential using (1.)" but I don't understand what it means...
Can you help?
Thank you
