Computational Physics pp 329-349 | Cite as

# Waves

## Abstract

We simulate classical waves which are, for instance, important in acoustics and electrodynamics. We use the method of finite differences to discretize the wave equation in one spatial dimension. Numerical solutions are obtained by an eigenvector expansion using trigonometric functions or by time integration. Accuracy and stability of different methods are compared. The wave function is second order in time and can be integrated directly with a two-step method. Alternatively, it can be converted into a first order system of equations of double dimension where the velocity appears explicitly. Finally, the second order wave equation can be replaced by two coupled first order equations for two variables (like velocity and density in case of acoustic waves), which can be solved by quite general methods. We compare the leapfrog, Lax-Wendroff and Crank-Nicolson methods. In a series of computer experiments we simulate waves on a string. We study reflection at an open or fixed boundary and at the interface between two different media. We compare dispersion and damping for different methods.

## Keywords

Wave Equation Double Dimension Classical Wave Implicit Euler Method Order Wave Equation## References

- 64.R. Courant, K. Friedrichs, H. Lewy, Math. Ann.
**100**, 32 (1928) MathSciNetzbMATHCrossRefGoogle Scholar - 129.H. Ibach, H. Lüth,
*Solid-State Physics: An Introduction to Principles of Materials Science*. Advanced Texts in Physics (Springer, Berlin, 2003) Google Scholar - 162.L. Lynch, Numerical integration of linear and nonlinear wave equations. Bachelor thesis, Florida Atlantic University, Digital Commons@University of Nebraska-Lincoln, 2004 Google Scholar
- 250.S.A. Teukolsky, Phys. Rev. D
**61**(8), 087501 (2000). doi: 10.1103/PhysRevD.61.087501 MathSciNetADSCrossRefGoogle Scholar