Closed smgitrep closed 5 months ago
By default the mode solver uses PEC boundaries, so there is no loss in the simulation. To capture radiative loss, you need to add PML instead by setting e.g. num_pml = (12, 12)
in the ModeSpec
. There are a few things to note:
num_modes
if needed to find it (or use target_neff
).pip install tidy3d==2.7.0rc2
. Thank you for the detailed response. Could you clarify if the boundary_spec parameter in td.Simulation is used by the ModeSolver?
No, Simulation.boundary_spec
does not affect the mode solver, it is only for FDTD simulations. In principle, the mode solver boundary (as defined by the mode plane) can be (and often is) much smaller than the enclosing simulation domain boundary. We need to truncate the mode solve differently than the FDTD simulation. For lossless fields that decay by the mode plane boundaries, using the default PEC works very well and avoids some of the PML complications. However, if you want to capture the losses, then you have to set the num_pml
in the mode_spec
of the mode solver.
I noticed the ModeSolver always finds real effective indices for bent waveguide modes. I expected the effective indices to be complex to account for radiation loss. Can the ModeSolver compute complex effective indices?