1D Linear Advection

Leapfrog Method: Periodic Time

Time:
Time Steps:

The Leapfrog Method is:

\phi_i^{k+1}=\phi_{i+1}^{k-1}-\frac{c\Delta t}{\Delta x}(\phi_{i+1}^k-\phi_{i-1}^k)

Assume that the domain is from $$x=0$$ to $$x=3$$ and that the wave has period $$\frac{1}{c}$$.

Choose the wave speed $$c$$, step size $$\Delta x$$, the CFL number, and the number of periods $$H$$.

Note the calculated step time $$\Delta t$$ and the number of time steps.

Click SOLVE to observe the initial condition in blue and the computed Upwind solution in red.

Initial Condition: $$e^{-200(x - .5)^2}$$

Wave Speed $$c=$$
$$\Delta x=$$
CFL =
H =

The time step $$\Delta t$$ is:
Time steps per period: