Numerical integration - verlet algorithm - accuracy

Click For Summary
SUMMARY

The discussion centers on the accuracy of three velocity estimators derived from the Verlet algorithm for numerical integration in computational physics, specifically applied to a 1D harmonic oscillator. The estimators include the standard velocity estimator, an improved version, and the leapfrog method. It is established that the leapfrog method exhibits an accuracy that is one order of magnitude worse than the other two due to the timing of position calculations, which leads to a deviation in energy estimates. This discrepancy arises because the leapfrog method calculates velocity at staggered time intervals, resulting in a consistent directional error in potential energy calculations.

PREREQUISITES
  • Understanding of the Verlet algorithm for numerical integration
  • Familiarity with velocity estimators in computational physics
  • Knowledge of harmonic oscillators and their equations of motion
  • Basic concepts of error analysis in numerical methods
NEXT STEPS
  • Study the derivation and application of the Verlet algorithm in more complex systems
  • Learn about error analysis techniques in numerical integration
  • Explore alternative numerical integration methods for solving differential equations
  • Investigate the implications of timing in numerical estimators on energy conservation
USEFUL FOR

Computational physicists, numerical analysts, and students studying numerical methods in physics who seek to understand the implications of different velocity estimators in simulations.

QPingy
Messages
2
Reaction score
0
In my computational physics textbook, three different velocity estimators are derived for a problem with equation of motion: [itex]\ddot x = F(x)[/itex] where the positions are found by using the Verlet algorithm:
[itex]x(t+h) = 2 x(t) - x(t-h) + h^2 F[x(t)][/itex]

The three velocity estimators are:
[itex] v(t) = \frac{x(t+h) - x(t-h)}{2h} + \mathcal{O}(h^2)[/itex]
[itex] v_{improved}(t) = \frac{x(t+h) - x(t-h)}{2h} - \frac{h}{12}\left( F[x(t+h)] - F[x(t-h)] \right) + \mathcal{O}(h^3)[/itex]
[itex] v_{leapfrog}(t + h/2) = \frac{x(t+h) - x(t)}{h} + \mathcal{O}(h^2)[/itex]

I have no problems deriving these equations, so far everything is clear.
But, in the textbook they apply the methods for the 1D harmonic oscillator and they conclude:
The leap-frog energy estimator is an order of magnitude worse than the other two. This is not surprising since the fact that the velocity is not calculated at the same time instants as the position results in deviation of the energy from the continuum value of order h instead of h^2.

So, just because the time instants are different, the leapfrog's results are 1 orde worse than the other two? I can't find an explanation/reasoning for this...

Can someone help me?

Regards,
Jan
 
Physics news on Phys.org
QPingy said:
So, just because the time instants are different, the leapfrog's results are 1 orde worse than the other two?
Wrong time also means wrong position and therefore wrong potential. As the potential is monotonically increasing / decreasing for many steps at a time, you get a consistent direction of the error there.
 
Okay, but I still don't see why the leapfrog is one order worse than the first estimator. Both use 2 positions, which are calculated using the verlet algorithm. I understand what you're saying about the potential, but I don't get why this would result in such a difference between the 2 estimators...
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K