flex_rf.tidy3d.MicrowaveModeSpec
Type: class │ Base(s): AbstractModeSpec, MicrowaveBaseModel
Description
Section titled “Description”Specification for transmission line modes and microwave waveguides.
The MicrowaveModeSpec class specifies how quantities related to transmission line
modes and microwave waveguides are computed. For example, it defines the paths for line integrals, which are used to
compute voltage, current, and characteristic impedance of the transmission line.
Example(s)
Section titled “Example(s)”import tidy3d as td# Using automatic impedance calculation (single spec, will be duplicated for all modes)mode_spec_auto = td.MicrowaveModeSpec( num_modes=2, impedance_specs=td.AutoImpedanceSpec())# Using custom impedance specification for multiple modesvoltage_spec = td.AxisAlignedVoltageIntegralSpec( center=(0, 0, 0), size=(0, 0, 1), sign="+")current_spec = td.AxisAlignedCurrentIntegralSpec( center=(0, 0, 0), size=(2, 1, 0), sign="+")custom_impedance = td.CustomImpedanceSpec( voltage_spec=voltage_spec, current_spec=current_spec)mode_spec_custom = td.MicrowaveModeSpec( num_modes=1, impedance_specs=custom_impedance)# Using num_modes='auto' with a tuple of specsmode_spec_auto_tuple = td.MicrowaveModeSpec( num_modes="auto", impedance_specs=(custom_impedance, custom_impedance))Parameters
Section titled “Parameters”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 ( |
num_modes [PositiveInt | Literal['auto']] = 1 |
|
Number of modes returned by mode solver. Use ‘auto’ to infer from impedance_specs length (if tuple) or detected from the number of isolated conductors assuming quasi-TEM modes (if AutoImpedanceSpec). |
impedance_specs [ImpedanceSpecType | tuple[ImpedanceSpecType | None, ...]] = factory: AutoImpedanceSpec._default_without_license_warning |
|
Field controls how the impedance is calculated for each mode calculated by the mode solver. Can be a single impedance specification (which will be applied to all modes) or a tuple of specifications (one per mode). The number of impedance specifications should match the number of modes field. When an impedance specification of |
tem_polarization_threshold [float] = TEM_POLARIZATION_THRESHOLD |
|
Threshold for classifying modes as TEM, TE, or TM based on mean TE/TM fraction across frequencies. A mode is classified as TEM if both mean TE and TM fractions are greater than or equal to this threshold. Similarly, a mode is classified as TE (or TM) if the mean TE (or TM) fraction is greater than or equal to this threshold. |
qtem_polarization_threshold [float] = QTEM_POLARIZATION_THRESHOLD |
|
Threshold for classifying modes as quasi-TEM based on TE/TM fraction at the lowest frequency. A mode is classified as quasi-TEM if both TE and TM fractions at the lowest frequency are greater than or equal to this threshold. |
Methods
Section titled “Methods”check_impedance_specs_consistent_with_num_modes() |
|
Check impedance specs consistency with num_modes. |