I am simulating a Bragg grating in FDTD where the change in effective refractive index is achieved by modulating the width of the waveguide. I am interested in the amount of power that is transmitted and reflected from the grating. I am also interested in the group delay experienced in the transmission and reflection, so I have profile monitors that I can calculate this from.
I’ve been having some trouble with the normalized transmitted and reflected powers being above 1 and below zero, so I started running the simulations for a longer time in order for the fields to decay completely, which instead leads to the simulations diverging after a relatively long time.
I tried to fix the problem first by decreasing Q from 0.99 to 0.9 and then to 0.5 (which made the simulations diverge faster) and then by playing around with the settings for the PML boundary. I change it to a stabilized profile and also tried a standard profile but with alpha=0.1. None of this worked so I tried changing to running the simulations with a constant refractive index for both my materials instead of dispersive materials, but this also didn’t help.
I have attached two simulation files with slightly different settings, one that diverged after some time and one that didn’t diverge but where the reflected power goes both above 1 and below 0 as shown in the plot below.
The blue line is reflected power and the green is transmitted power.
The main difference between the diverging and the stable simulation is that the modulation of amplitude of the width of the waveguide is 5 times larger in the one that diverges than in the one that is stable. Both situations are perfectly reasonable so I don’t see why one should diverge and the other not. In any case both return strange results (the diverging simulation is also a significantly longer grating, but the short ones also tend to diverge).
For reference I am using FDTD version 2020a-r6.
Finished simulation files are in this link