In this assignment, I have developed a CFD code to solve the wave equation numerically. I have applied the second-order upwind flux and two-stage Runge-Kutta time advance schemes to the wave equation to find the time and space discretization. First, this equation is solved numerically and compared to exact solution. In the next steps, the validation, stability and effects of changing boundary condition on our solution will be investigated. Finally, the results will be presented and completely discussed.
Programming Assignment 2-Wave Equation
1. Introduction
The wave equation is an important second-order linear partial differential equation for the description of waves – as they occur in physics – such as sound waves, light waves and water waves. It arises in fields like acoustics, electromagnetic, and fluid dynamics. Historically, the problem of a vibrating string such as that of a musical instrument was studied by Jean le
Rond d'Alembert, Leonhard Euler, Daniel Bernoulli, and Joseph-Louis Lagrange.
Figure 1-Wave Diffusion
Wave equation has many applications. The ideal-string wave equation applies to any perfectly elastic medium which is displaced along one dimension. For example, the air column of a clarinet or organ pipe can be modeled using the one-dimensional wave by substituting airpressure deviation for string displacement, and longitudinal volume velocity for transverse string velocity.
Wave equations are examples of hyperbolic partial differential equations, but there are many variations. In its simplest form, the wave equation concerns a time variable, one or more spatial variables, and a scalar function, whose values could model the displacement of a wave.
As mentioned in abstract, the objective of this project is to solve numerically the onedimensional wave equation. To discretize the wave equation, the second-order upwind flux evaluation and two-stage Runge-Kutta time advance schemes are used. At the first part,