I am new to fenics- python. I have to develop a program using fem in fenics for time harmonic Maxwell equations with PML-perfect matched layer boundary conditions. The domain would be spherical with boundary as a cube/sphere in a box. I have to calculate the optical properties of the domain specifically extinction/ absorption for a range of electromagnetic waves ( 400nm to 700nm).
I’m not sure how to implement this and I am looking for links/ sample codes on how to implement it in fenics.
Hi! I’m currently working on implementing electromagnetic demos in FEniCSx. At the moment on GitHub there is a demo for simulating a TM-polarized plane wave scattered by an infinite wire, and there is also a part for the calculation of absorption, scattering and extinction efficiencies. You can check the code at this link.
Even though in the demo scattering boundary conditions are used (not PMLs) and the problem is in 2D (not 3D) I think you can find many useful hints for solving your problem.
I am currently working on the implementation of PML for acoustics, but is not that easy. When it’s ready I will post it on the forum.