next up previous print clean
Next: The Crank-Nicolson method Up: FINITE DIFFERENCING IN (omega,x)-SPACE Previous: Explicit heat-flow equation

The leapfrog method

A difficulty with the given program is that it doesn't work for all possible numerical values of $\alpha$.You can see that when $\alpha$ is too large (when $ \Delta x $ is too small) the solution in the interior region of the data table contains growing oscillations. What is happening is that the low-frequency part of the solution is OK (for a while), but the high-frequency part is diverging. The mathematical reason the divergence occurs is the subject of mathematical analysis found in IEI section 2.8. Intuitively, at wavelengths long compared to $ \Delta x $ or $ \Delta t $,we expect the difference approximation to agree with the true heat-flow equation, smoothing out irregularities in temperature. At short wavelengths the wild oscillation shows that the difference equation can behave in a way almost opposite to the way the differential equation behaves. The short wavelength discrepancy arises because difference operators become equal to differential operators only at long wavelengths. The divergence of the solution is a fatal problem because the subsequent round-off error will eventually destroy the low frequencies too.

By supposing that the instability arises because the time derivative is centered at a slightly different time t+1/2 than the second x-derivative at time t, we are led to the so-called leapfrog method, in which the time derivative is taken as a difference between t-1 and t+1:  
 \begin{displaymath}
{ \partial q \over \partial t } \quad \approx \quad
{ q_{{t+1}}\ -\ q_{{t-1}} \over 2\ \Delta t }\end{displaymath} (28)
Here the result is even worse. An analysis found in IEI shows that the solution is now divergent for all real numerical values of $\alpha$.Although it was a good idea to center both derivatives in the same place, it turns out that it was a bad idea to express a first derivative over a span of more mesh points. The enlarged operator has two solutions in time instead of just the familiar one. The numerical solution is the sum of the two theoretical solutions, one of which, unfortunately (in this case), grows and oscillates for all real values of $\alpha$.

To avoid all these problems (and get more accurate answers as well), we now turn to some slightly more complicated solution methods known as implicit methods.


next up previous print clean
Next: The Crank-Nicolson method Up: FINITE DIFFERENCING IN (omega,x)-SPACE Previous: Explicit heat-flow equation
Stanford Exploration Project
12/26/2000