1
$\begingroup$

I'm trying to use the velocity Verlet integrator to simulate a damped driven pendulum (with unit mass) described by

$\ddot{\phi}+\gamma \dot{\phi}+\omega_0^2 sin\phi=Acos(\Omega t)$

The Verlet algorithm states that I should obtain the interaction potential using $\phi$ (see https://en.wikipedia.org/wiki/Verlet_integration), but I don't manage to get rid of the velocity ($\dot{\phi}$) in the expression. How is the interaction potential supposed to be calculated? Is there any trick I can use or have I simply misunderstood this?

My approach was to obtain the potential from

$-\frac{dU}{d\phi}=F(\phi)$

where the force in this case is equal to the acceleration ($\ddot{\phi}$). Integration will however not get rid of the velocity term, which is necessary.

$\endgroup$
  • $\begingroup$ If you scroll down the page of the same wiki site that you referred to section Velocity Verlet, you have all steps you need and you don't need worry about velocity. $\endgroup$ – user115350 May 27 '16 at 5:00
  • $\begingroup$ The problem is in the Velocity Verlet algorithm. In order to calculate the velocity at the next time step I have to use the velocity at the next time step, which doesn't work. In order to surpass this they say I should calculate the interaction potential by using the position and then use the position to calculate the velocity. However, my expression for the interaction potential still contains the velocity term and I still have to use the velocity to calculate the velocity... I wonder if I have calculated the interaction potential wrong or how it's supposed to be done? $\endgroup$ – Djamillah May 27 '16 at 7:02
1
$\begingroup$

You won't be able to find the potential because of the presence of drag and the forcing term. In other words, this is a non-conservative field and therefore it is impossible to define a potential.

Luckily, though, you don't need that because you have an explicit expression of the acceleration and that's all you need to use the Verlet or velocity Verlet algorithm.

The usual way to do it if you want to use velocity Verlet is to obtain an estimate $\tilde v_{n+1}$ making the approximation

$$a(x_{n+1},v_{n+1},t_{n+1}) \simeq a(x_{n+1}, v_n + a_n \Delta t,t_{n+1})$$

that is to say

$$\tilde v_{n+1} = v_n + \frac 1 2 \Delta t [a_n+ a(x_{n+1}, v_n + a_n \Delta t,t_{n+1})]$$

so that

$$v_{n+1} = v_n +\frac 1 2 \Delta t [a_n + a(x_{n+1}, \tilde v_{n+1}, t_{n+1})]$$

More details here. Anyway for damped systems it is preferable to use the Runge-Kutta algorithm, which doesn't require any such approximation.

$\endgroup$
  • $\begingroup$ Ok! How can I implement it? In order to calculate the velocity of the next time step I need the acceleration of the next time step, which is dependent of the velocity. Can I just ignore some terms? $\endgroup$ – Djamillah May 27 '16 at 8:20
  • $\begingroup$ I'll expand the answer to clarify. $\endgroup$ – valerio May 27 '16 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.