I am simulating the sound wave propagation in non-rectangular and asymetric spaces using finite-difference method. I presume linear acoustics equations to be enough (i.e. $\Box p = 0$, $\Box \vec{v} = 0$) and I need to have open and closed boundaries of the system (e.g. node or antinode of acoustic pressure on the wall and the same for velocity).

The problem occurs when I have to deal with the Neumann boundary conditions. The method is unstable even for dense and computationally inconvenient grids.

The physics behind the maths allows 3+1 more or less straightforward possible ways how to do the simulation:

  • Model the acoustic pressure (then the Neumann condition is needed at the open/loose boundaries: $\partial_x p = 0$ on the boundary, closed boundaries are OK)
  • Model the velocity potential $\phi$ (not very convenient cause $\partial_x \phi = 0$ on the open boundary and $\partial_t \phi = 0$ on the closed boundary)
  • Model the acoustic velocity (i.e. model d'Alembert wave equation for the vector quantity - not very elegant, that's why we have potential)
  • Reformulate the physics to be e.g. hamiltonian (i.e. have only the first order derivatives), lattice Boltzmann etc. etc.

Any suggestions or experiences please?


CFL condition is satisfied.

The problem actually might be the numerical dispersion. The picture shows a system with the source on the left oscillating from -1 to 1 sinusoidally. The values on the picture outside the source area vary between -0.1 and 0.1. On the top and bottom there are Dirichlet boundaries, there is Neumann boundary at the right.

enter image description here

FDM with centered time and space was used. In matlab (dx=dy):

  • 1
    $\begingroup$ could you please elaborate a little more? what do you mean by "the method is unstable even for dense and computationally inconvenient grids"? When I did acoustic wave modelling using finite differences there was a well known formula to calculate the timestep and the grid discretization space so that the system would be stable. This was unrelated to the boundary condition. Are you sure your system is unstable? or could you have a bug in your code? I just saw the "fluid-dynamics" tag, so this may be a totally different problem to the one I was solving (earth-sciences related) $\endgroup$
    – cauchi
    Commented Oct 9, 2015 at 9:03
  • $\begingroup$ @Victor Pira, What kind of time integrator are you using? I'm not used to deal with sound/wave propagation, but what I remenber is that FTCS is not that great for it, but Crank-Nicholson is fine. $\endgroup$
    – Hydro Guy
    Commented Oct 12, 2015 at 0:02
  • $\begingroup$ Edits have been made. I haven't find anything satisfactory with Crank-Nicholson. It's more suited for parabolic problems. $\endgroup$ Commented Oct 12, 2015 at 14:05
  • 1
    $\begingroup$ If you are concerned that the errors in your approximation are due to the dissipative and dispersive properties of your finite difference scheme you need to look in Fourier space so that you can quantify the errors and know what to expect when you run your simulations. The book by Strikwerda (Chap 5) gives a nice outline of how to perform such analysis. $\endgroup$ Commented Oct 13, 2015 at 6:58

1 Answer 1


For numerical simulations of hyperbolic equations finite volume methods have been used in the literature.

I found clawpack and the book Finite-Volume Methods for Hyperbolic Problems from its author Randall J. LeVeque very helpful for implementing my own code. Since finite volume and finite differences are not so different, changing to the finite volume code might be a way to solve this.

With finite differences one has either problems with numerical dispersion or with numerical diffusion. To counter these different flux limiter functions are used to handle this short coming in finite volume codes.

You might also just implement your system with clawpacks python api, for reference, check out Gallery acoustics.

  • $\begingroup$ Thanks a lot! At least the sources recommendations were very helpful. I will mark this as accepted answer if there would be a more detailed discusion about FDM errors. $\endgroup$ Commented Oct 12, 2015 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.