The wave propagation modeling is created using the fourth- and second-order staggered-grid finite difference approximation of the scalar wave equation resulting in 13- and 5-point stencils. The modeling is performed in frequency domain for discreet frequencies. For stability and for avoiding numerical error, there should be at least 4 (13-point stencil) and 10 (5-point stencil) gridpoints per minimum wavelength. The left, right and bottom boundaries are incorporated with Perfectly Matching Layers (PMLs) to suppress undesired reflections from edges. The top boundary is left as free surface.
All the required functions are in the file functions.py
Bernhard Hustedt, Stéphane Operto, Jean Virieux, Mixed-grid and staggered-grid finite-difference methods for frequency-domain acoustic wave modelling, Geophysical Journal International, Volume 157, Issue 3, June 2004, Pages 1269–1296, https://doi.org/10.1111/j.1365-246X.2004.02289.x