flex_rf.tidy3d.ModeSpec
Type: class │ Base(s): AbstractModeSpec
Description
Section titled “Description”Stores specifications for the mode solver to find an electromagnetic mode.
The angle_theta and angle_phi parameters define the injection axis as illustrated in the figure
below, with respect to the axis normal to the mode plane (x in the figure). Note that angle_theta
must be smaller than . To inject in the backward direction, we can still use the
direction parameter as also shown in the figure. Similarly, the mode amplitudes computed in mode monitors
are defined w.r.t. the forward and backward directions as illustrated. 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}.
The bend_axis is the axis normal to the plane in which the bend lies, (z in the diagram below). In
the mode specification, it is defined locally for the mode plane as one of the two axes tangential to the
plane. In the case of bends that lie in the xy-plane, the mode plane would be either in xz or in
yz, so in both cases the correct setting is bend_axis=1, selecting the global z. The
bend_radius is counted from the center of the mode plane to the center of the curvature,
along the tangential axis perpendicular to the bend axis. This radius can also be negative, if the center of
the mode plane is smaller than the center of the bend.
Example(s)
Section titled “Example(s)”mode_spec = ModeSpec(num_modes=3, target_neff=1.5)Parameters
Section titled “Parameters”num_modes [PositiveInt] = 1 |
|
Number of modes returned by mode solver. |
target_neff [PositiveFloat | None] = None |
|
Guess for effective index of the mode. |
num_pml [tuple[NonNegativeInt, NonNegativeInt]] = (0, 0) |
|
Number of standard pml layers to add in the two tangential axes. |
filter_pol [Literal['te', 'tm'] | None] = None |
|
The solver always computes the |
angle_theta [float] = 0.0 |
|
Polar angle of the propagation axis from the injection axis. |
angle_phi [float] = 0.0 |
|
Azimuth angle of the propagation axis in the plane orthogonal to the injection axis. |
precision [Literal['auto', 'single', 'double']] = 'double' |
|
The solver will be faster and using less memory under single precision, but more accurate under double precision. Choose |
bend_radius [FiniteFloat | None] = None |
|
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. |
bend_axis [Axis2D | None] = None |
|
Index into the two tangential axes defining the normal to the plane in which the bend lies. This must be provided if |
angle_rotation [bool] = False |
|
Defines how modes are computed when |
track_freq [TrackFreq | None] = None |
|
Deprecated. Use ‘sort_spec.track_freq’ instead. |
group_index_step [PositiveFloat | bool] = False |
|
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 |
sort_spec [ModeSortSpec] = factory: ModeSortSpec |
|
Defines how to filter and sort modes within each frequency. If |
interp_spec [ModeInterpSpec | None] = None |
|
Specification for computing modes at a reduced set of frequencies and interpolating to obtain results at all requested frequencies. This can significantly reduce computational cost for broadband simulations where modes vary smoothly with frequency. Requires frequency tracking to be enabled ( |