The governing equations of a wave propagation may be written in a non-conservative, compact divergence form
This form of equations may be used to describe linearized Euler equation for acoustics, linear elastic wave equations, Maxwell equations for electromagnetic waves, and so on.
Some of the simulation results are shown in the videos below. The 1D acoustic simulation in heterogeneous medium is published in GitHub.
Reference
Lin, W., "Design Optimization of Acoustic Metamaterials and Phononic Crystals with a Time Domain Method," PhD Dissertation, 2016. [Download Link 1 Link 2]