In response to an out-of-the-blue email asking for help, I recently dug up my Jupyter Notebook code for reproducing the results of a paper written with Boris Kuhlmey in 2015, “Two-dimensional imaging in hyperbolic media–the role of field components and ordinary waves“.
With a bit of extra love, this can be adapted to reproduce every figure! The beauty of this approach compared to brute-force methods such as FEM and FDTD is that it allows quite rapid calculations via analytical formulae. I seem to remember that, for comparison, COMSOL sometimes struggled to converge, and that the huge slabs considered towards the end of the paper would have impossibly large meshes. However, this code is slowed down by the need for arbitrary-precision computations, which stems from large exponentials that appear when considering fine spatial features… Please cite the paper if you use this code for your research!
Code is here: https://github.com/tuniz/Imaging_2D/