The propagation of sound waves is governed by the following system of first order partial differential equations:

The mathematical symbols might be a bit intimidating, but once past that, these formulae are surprisingly simple.
Implementing them in computer code is quite a challenge, but I found an excellent online resource that explains how to do so in detail: Understanding the Finite-Difference Time-Domain Method, John B. Schneider, www.eecs.wsu.edu/~schneidj/ufdtd, 2010.
That work is quite old now, so I thought it worthwhile to re-implement it in modern C++17 and provide a GUI.

My code is available at https://github.com/JamesBremner/soundsim