Simulation of highly divergent Optical Beams


Simulation of highly divergent Optical Beams

Kotik, D.; Götte, J. B.

Optical-beams-MEEP [1] provides a Cython module and several Python/Scheme scripts for spatio-temporal simulation of various optical beams in two and three dimensions. The provided scripts are designed to serve as configurations files for the powerful Meep [2] tool, an established open-source FDTD simulation software package for electromagnetic fields. The objective of these scripts is the simulation of reflection and refraction of highly divergent polarised optical beams at plane and curved dielectric interfaces. Currently supported are Gaussian beams (2d), Laguerre-Gaussian beams (3d) and Airy beams (2d).
Utilizing Meep to simulate the propagation of a Gaussian beam in a homogeneous medium is fairly easy: specifying its real valued current distribution at waist is sufficient. However, for highly divergent beams with the waist being placed at or close to an intersection of regions of different optical properties, this requires specifying the exact complex-valued current distribution at a certain distance to the beam's waist. This is typically done by calculating the beam profile via a plane wave decomposition which involves integration of the real and imaginary parts of a highly oscillating integrand. Meep's deprecated Guile/Scheme interface could handle this with a fast numeric integration routine. With Python however, due to its expensive function call overhead, multiple integration becomes such a computationally intense task by itself that it would put Meep's Python interface almost useless for the considered simulation tasks.
In order to overcome this problem, we developed a Python extension module based on Cython, employing highly optimized C code that can be called from within Python. Since SciPy's adaptive quadrature routine allows for low-level compiled functions, we manage to completely circumvent Python's tremendous overhead when calling the integrand functions many times.
In conclusion, our module allows for using Meep's more modern, easier to use Python interface while keeping the computational overhead low.

References

[1] Daniel Kotik, & Jörg Götte. https://github.com/DanielKotik/Optical-beams-MEEP/. Zenodo. http://doi.org/10.5281/zenodo.369179
[2] https://github.com/NanoComp/meep

Keywords: FDTD; Meep; Cython; Gaussian beam

  • Poster (Online presentation)
    720. WE-Heraeus-Seminar / Structures in Confined Light - from Topology to Microscopy, 16.-17.08.2021, online, Germany

Permalink: https://www.hzdr.de/publications/Publ-33816