The wave equation is a hyperbolic partial differential equation (PDE) which describes the displacement
whose solutions are traveling waves with wave velocity
The wave equation in 2D can be derived in the same fashion as for the 1D case and reads
or in general (3D)
Leap frog algorithm for solving the wave equation
We can then transform the PDE into a finite difference equation on a
For example, in the 2D case, the finite difference approximation for the Laplace operator is
Setting
where the unknown (future) term is on the left hand site and can be computed from all known (present and past) terms on the right hand side.
Von Neumann stability analysis
Not all combinations of
For the wave equation the Courant condition follows
(1D case) or when written as
it means that the time step
In the 2D case, the Courant condition is
Class material
- Student notebook: 1: Leap-frog method for the wave equation and von Neumann stability analysis: 16_PDEs_waves-students.ipynb
- Lecture notebooks 2 (correspond to the student notebooks):16_PDEs_waves.ipynb.
- Lecture notebook for 2D waves: 16_PDEs_2D_waves.ipynb
Additional resources
- Computational Physics, Ch 21
- Computational Modeling, Ch 6.5
- Numerical Recipes in C, WH Press, SA Teukolsky, WT Vetterling, BP Flannery. 2nd ed, 2002. Cambridge University Press. Chapter 19.
Footnotes
As usual,
git pull
the resources repository to get a local copy of the notebook. Then copy the notebook into your work directory in order to complete the exercises. ↩Notebook will be posted after class; in the mean time look at the student notebook. ↩