Hi James,
Interesting question - yes you are correct that this equation doesn't apply to the elastic case. The current implementation in MATLAB is not very memory efficient, and uses a large number of temporary matrices that could easily be re-used (these are being refactored as the C++ version is being developed).
For the acoustic variables, 46 matrices of size Nx * Ny * Nz are used if the medium is lossless, or 55 matrices if the medium is absorbing. This accounts for:
- 12 matrices to store the split field velocity
- 15 matrices to store the split stress field
- 9 matrices to store the velocity gradients
- 9 matrices to store the stress gradients
- 1 matrix to store the acoustic pressure (normal stress)
- PLUS 9 additional matrices if using absorption
Regarding material properties, if the medium is heterogeneous, 9 matrices of size Nx * Ny * Nz are used if the medium is lossless, or 14 if the medium is absorbing. This accounts for:
- 4 matrices to store the density on the regular and staggered grid
- 1 matrix to store the first Lame parameter
- 4 matrices to store the second Lame parameter on the regular and staggered grid
- PLUS 5 additional matrices to store the viscosity parameters on the regular and staggered grid if the medium is absorbing
So in the worst case (absorbing, fully heterogeneous medium), 69 matrices of size Nx * Ny * Nz are used during the simulation.
In the future, we intend to re-use the matrices used to store the gradients, potentially saving 18 matrices. In addition, the staggered grid values of the medium parameters could also be calculated on the fly, potentially saving 9 matrices. Some additional values could also be only calculated as needed, perhaps saving another 4 matrices. This would reduce 69 to 38 matrices. However, it's still very memory intensive.
Hope that helps,
Brad.