tidy3d.Simulation.compute_modes¶
- Simulation.compute_modes(mode_object, Nmodes, target_neff=None, pml_layers=(0, 0), bend_radius=None, bend_axis=None)¶
Compute the eigenmodes of the 2D cross-section of a
ModeSource
orModeMonitor
object, assuming translational invariance in the third dimension. The eigenmodes are computed at the central frequency of theModeSource
or for every frequency in the list of frequencies of theModeMonitor
. In-plane, PEC boundaries are assumed, such that the mode shold decay at the boundaries to be accurate. PML boundaries can also be added to ensure decay. Useviz_modes()
to visuzlize the computed eigenmodes.- Parameters
mode_object (ModeSource or ModeMonitor) – The object defining the 2D plane in which to compute the modes.
Nmodes (int) – Number of eigenmodes to compute.
target_neff (None or float, optional) – Look for modes with effective index closest to
target_neff
.pml_layers (tuple, optional) – Number of PML layers to be added in each direction. These are added to the interior of the mode plane, i.e. its size is not extended.
bend_radius (float or None, optional) – (micron) A curvature radius for simulation of waveguide bends.
bend_axis (
'x'
,'y'
,'z'
or None, optional) – The axis normal to the plane in which the bend lies. This must be provided ifbend_radius
is not none, and it must be orthogonal to the axis normal to the mode plane.
Note
Adding PML layers could make the decay at the boundaries cleaner, but could also introduce spurious modes.