Finite differences is a numerical method for approximating solutions to partial differential equations by dividing the domain into a grid of discrete points and computing the difference between adjacent points to approximate derivatives. In order to solve the wave equation using finite differences, techniques such as d'Alembert and Cauchy methods, method of characteristics, Fourier Von-Neumann analysis, and studying the truncation error, order, and consistency of the numerical scheme must be employed.
The d'Alembert method is a general solution to the one-dimensional wave equation, which is derived by constructing a characteristic triangle, while the Cauchy method involves discretizing both time and space and using finite differences to approximate the partial derivatives. The method of characteristics involves transforming the wave equation into a set of ordinary differential equations, while Fourier Von-Neumann analysis is used to prove the stability of the numerical scheme.
In order to ensure the accuracy and stability of the numerical scheme, the truncation error, order, and consistency of the scheme must be analyzed. The truncation error measures the difference between the exact solution and the numerical solution, while the order of the scheme measures how quickly the numerical solution converges to the exact solution as the grid is refined. Finally, the consistency of the scheme measures how well the numerical scheme approximates the original partial differential equation.
In this project, a Python program was developed to simulate waves in both 1D and 2D using the finite differences method, which involved implementing the aforementioned techniques to ensure accuracy and stability.