Time-dependend PML in 2D

Hello,

I’m working on implementing a solution to the scalar wave equation in a 2D waveguide, with infinite propagation at the horizontal axis.

I am currently stuck on implementing the time-dependent PMLs on the left and right side of my computational domain. I have successfully done so for the Helmholtz equation, but the implementation does not translate to the time-dependent problem. Namely, the command

mesh.SetPML(pml.Cartesian((0,0), (W,D), 2j),“PMLL|PMLR”)

has no effect. Here, W is the width and D is the depth of the waveguide. PMLL and PMLR are the left and right PML rectangles respectively.

If there are any suggestions as to how the time-dependent PML could be implemented, they’d be much appreciated!

I’m uploading the Helmholtz equation code as reference of a working version, as well as the wave equation version, where the PML issue exists.

WEWG.py (5.2 KB)
HEWG.py (7.3 KB)

Time domain PML works differently:
https://markuswess.github.io/waves/pmls/time-domain.html
best