# FDM - Solving acoustical wave equation via first order PDE's

Solving acoustical wave equation:

$$c_0^2\partial_{xx}p-\partial_{tt}=0$$

using forward-time centered-space FDM is not very convenient cause of numerical dispersion etc.

What about using a little physics and solve this as a system of first order equations (linearized Euler equations), i.e.:

$$\nabla p = -\rho_0\partial_t\vec{v}$$ $$\partial_t\rho+\rho_0\nabla \cdot\vec{v}=0$$ $$c_0^2\partial_t \rho=\partial_tp$$

In 2D case let's denote $u$, $v$ the components of velocity vector, let $\Delta x \equiv \Delta y$ and discretize:

$$p_{i,j}^{n+1}=p_{i,j}^{n}+\frac{\rho_0 c_0^2 \Delta t}{\Delta x}\left(u_{i,j}^{n}-u_{i,j+1}^{n} + v_{i,j}^{n}-v_{i+1,j}^{n} \right)$$

$$u_{i,j}^{n+1}=u_{i,j}^{n}+\frac{\Delta t}{\rho_0 \Delta x}\left(p^{n}_{i,j}-p^{n}_{i,j+1} \right)$$

$$v_{i,j}^{n+1}=v_{i,j}^{n}+\frac{\Delta t}{\rho_0 \Delta x}\left(p^{n}_{i,j}-p^{n}_{i+1,j} \right)$$

• Is that correct?
• Would that help to get solution with lower numerical noise, dispersion etc.?
• Would you use forward discretization as above or centered one?
• How would the CFL condition look like for this case?
• Where'd your continuity equation go? You ought to have something for $rho$. – Bill Barth Oct 21 '15 at 13:31
• The first one is continuity equation. I got rid of the $\rho$ substituting from the adiabatic process equation. This could be done without further differentiation and therefore it's OK for the system of first order PDE's – Victor Pira Oct 21 '15 at 13:35

Is that correct?

Your system of PDEs looks correct though I didn't double-check the minus signs and such. The acoustic wave equation is often solved numerically in first-order form. The choice of second- or first-order form is often based on historical biases or culture in a given field.

The one-sided differences you've used lead to an unstable scheme (it doesn't even satisfy the CFL condition!)

Would that help to get a solution with lower numerical noise, dispersion, etc.?

Not by itself. Issues related to numerical errors are essentially the same for both forms.

Would you use forward discretization as above or centered one?

A centered difference would be better than what you have, since it satisfies the CFL condition and is stable for small enough time step sizes. It is dispersive, so if you have steep gradients in the solution (or if you do not resolve high frequencies sufficiently well) you will get oscillations that are of a numerical origin. Another approach is to apply an upwind discretization along characteristics.

How would the CFL condition look like for this case?

Geometrically, the CFL condition is the same (the numerical domain of dependence must include the physical domain of dependence). Algebraically, it is also the same -- for a centered-difference scheme, you need $c\Delta t/\Delta x \le 1$.

One nice reference is LeVeque's book on finite volume methods; see Section 2.6-2.8 for a full derivation; Chapter 3 for an in-depth discussion of the system; and Chapters 4-6 for numerical discretization and examples. Chapter 9 is all about acoustics with spatially-varying coefficients.