Ansys Learning Forum › Forums › Discuss Simulation › Photonics › Diverging simulation: gain layer under periodic metallic grating › Reply To: Diverging simulation: gain layer under periodic metallic grating
Hi Javi,
I'm wondering if you've taken a look at the dt stability factor? Usually this is fine as the default maximum value, but we give this information about the setting:
"The theoretical maximum time step is calculated from the simulation mesh size based on the Courant stability criterion. By default, Lumerical software uses a time step that is 0.99 of the theoretical maximum time step. This theoretical maximum is calculated assuming propagation of light in a homogeneous vacuum. Once physical structures and interfaces are included in the simulation, particularly when dispersive materials are involved, a smaller time step is sometimes required."
As a simpler test, you may also want to consider using a finer mesh to capture what's happening at the boundary between the grating and gain material. We have a helpful troubleshooting guide for divergence if you haven't already seen it: Troubleshooting diverging simulations in FDTD – Ansys Optics.
Thanks,
Ethan