# ModeSpec
Stores specifications for the mode solver to find an electromagnetic mode.
Note, the planar axes are found by popping the injection axis from {x, y, z}. For example, if injection axis is y, the planar axes are ordered {x, z}.
# Number of Modes
num_modes: Number of modes returned by the mode solver.
Type: integer
- Unit: unitless
- Constraint: greater than 0
- Default: 1
# Target Effective Index
target_neff: Guess for effective index of the mode.
Type: floating-point number
- Unit: unitless
- Constraint: greater than 0
- Default: None
# Number of PML Layers
num_pml: Number of standard pml layers to add in the two tangential axes.
Type: integer
- Unit: unitless
- Constraint: greater than or equal to 0
- Default: (0, 0)
# Polarization Filtering
filter_pol: The solver always computes the num_modes modes closest to the given target_neff. If filter_pol=None, they are simply sorted in order of decresing effective index. If a polarization filter is selected, the modes are rearranged such that the first n_pol modes in the list are the ones with the selected polarization fraction larger than or equal to 0.5, while the next num_modes - n_pol modes are the ones where it is smaller than 0.5 (i.e. the opposite polarization fraction is larger than 0.5). Within each polarization subset, the modes are still ordered by decreasing effective index.
te-fraction is defined as the integrated intensity of the E-field component parallel to the first plane axis, normalized to the total in-plane E-field intensity. Conversely, tm-fraction uses the E field component parallel to the second plane axis.
Options:
- None
- te
- tm
Default: None
# Polar Angle
angle_theta: Polar angle of the propagation axis from the injection axis.
Type: floating-point number
- Unit: choose between rad or degree (default)
- Default: 0
# Azimuth Angle
angle_phi: Azimuth angle of the propagation axis in the plane orthogonal to the injection axis.
Type: floating-point number
- Unit: choose between rad or degree (default)
- Default: 0
# Angle Rotation
angle_rotation: Defines how modes are computed when angle_theta is not zero.
Options:
False: A coordinate transformation is applied through the permittivity and permeability tensors.True: The structures in the simulation are first rotated to compute a mode solution at a reference plane normal to the structure's azimuthal direction. Then, the fields are rotated to align with the mode plane, using then_effcalculated at the reference plane.
Note: Currently only supported when
angle_phiis a multiple ofnp.pi.
# Bend Radius
bend_radius: A curvature radius for simulation of waveguide bends.
Can be negative, in which case the mode plane center has a smaller value than the curvature center along the tangential axis perpendicular to the bend axis.
Type: floating-point number
- Unit: choose between m, μm (default), or nm
- Default: None
# Bend Axis
bend_axis: Index into the two tangential axes defining the normal to the plane in which the bend lies.
This must be provided if bend_radius is not None.
For example, for a ring in the global xy-plane, and a mode plane in either the xz or the yz plane, the bend_axis is always 1 (the global z axis).
Options:
- None
- 0
- 1
Default: None
# Track Mode Frequency
track_freq: Parameter that turns on/off mode tracking based on their similarity. Can take values 'lowest', 'central', or 'highest', which correspond to mode tracking based on the lowest, central, or highest frequency. If 'None', no mode tracking is performed.
Options:
- None
- central
- lowest
- highest
Default: central
# Group Index Computation Control
group_index_step: Control the computation of the group index alongside the effective index. If set to a positive value, it sets the fractional frequency step used in the numerical differentiation of the effective index to compute the group index. If set to True, a value of 0.15 is used.
Options:
- False: The mode solver will not calculate the group index.
- True: The mode solver will calculate the group index using a fractional frequency step of 0.15 or other user input value.
Default: True
# Single or Double Precision in Mode Solver
precision: The solver will be faster and using less memory under single precision, but more accurate under double precision. With the default auto, apply double precision if the simulation contains a good conductor, single precision otherwise.
Options:
- auto
- single
- double
Default: auto
# Colocate Fields
colocate: Toggle whether fields should be colocated to grid cell boundaries (i.e. primal grid nodes).
Options:
- False: Fields will NOT be colocated to grid cell boundaries.
- True: Fields will be colocated to grid cell boundaries.
Default: True