Skip to content

flex_rf.tidy3d.TerminalComponentModeler

Type: class Base(s): AbstractComponentModeler, MicrowaveBaseModel

Tool for modeling two-terminal multiport devices and computing port parameters with lumped and wave ports.

S-Parameter Definitions

The s_param_def parameter controls which wave definition is used to compute scattering parameters. Three definitions are supported:

  • "pseudo" (default): Pseudo-waves as defined by Marks and Williams [1]. Uses scaling factor F=Re(Z)/(2Z)F = \sqrt{\text{Re}(Z)} / (2|Z|). Wave amplitudes are a=F(V+ZI)a = F(V + ZI) and b=F(VZI)b = F(V - ZI).

  • "power": Power waves as defined by Kurokawa [3] and described in Pozar [2]. Uses scaling factor F=1/(2Re(Z))F = 1 / (2\sqrt{\text{Re}(Z)}). Wave amplitudes are a=F(V+ZI)a = F(V + ZI) and b=F(VZI)b = F(V - Z^*I) where ZZ^* is the complex conjugate. Ensures a2b2|a|^2 - |b|^2 represents actual power flow.

  • "symmetric_pseudo": Equivalent to pseudo-waves except for the scaling factor. Uses F=1/(2Z)F = 1 / (2\sqrt{Z}) where the square root is complex. This choice of scaling factor ensures the S-matrix will be symmetric when the simulated device is reciprocal.

[1] R. B. Marks and D. F. Williams, “A general waveguide circuit theory,” J. Res. Natl. Inst. Stand. Technol., vol. 97, pp. 533, 1992.

[2] D. M. Pozar, Microwave Engineering, 4th ed. Hoboken, NJ, USA: John Wiley & Sons, 2012.

[3] K. Kurokawa, “Power Waves and the Scattering Matrix,” IEEE Trans. Microwave Theory Tech., vol. 13, no. 2, pp. 194-202, March 1965.

simulation [Simulation]

Simulation describing the device without any sources present.

freqs [FreqArray]

Array or list of frequencies at which to compute port parameters.

name [str] = ''
remove_dc_component [bool] = True

Whether to remove the DC component in the Gaussian pulse spectrum. If True, the Gaussian pulse is modified at low frequencies to zero out the DC component, which is usually desirable so that the fields will decay. However, for broadband simulations, it may be better to have non-vanishing source power near zero frequency. Setting this to False results in an unmodified Gaussian pulse spectrum which can have a nonzero DC component.

custom_source_time [SourceTimeType | None] = None

If provided, this will be used as specification of the source time-dependence in simulations. Otherwise, a default source time will be constructed.

ports [tuple[TerminalPortType, ...]] = ()

Collection of lumped and wave ports associated with the network. For each port, one simulation will be run with a source that is associated with the port.

run_only [tuple[NetworkIndex, ...] | None] = None

Set of matrix indices that define the simulations to run. If None, simulations will be run for all indices in the scattering matrix. If a tuple is given, simulations will be run only for the given matrix indices.

element_mappings [tuple[tuple[NetworkElement, NetworkElement, Complex], ...]] = ()

Tuple of S matrix element mappings, each described by a tuple of (input_element, output_element, coefficient), where the coefficient is the element_mapping coefficient describing the relationship between the input and output matrix element. If all elements of a given column of the scattering matrix are defined by element_mappings, the simulation corresponding to this column is skipped automatically.

radiation_monitors [tuple[discriminated_union(DirectivityMonitor | DirectivityMonitorSpec), ...]] = ()

Facilitates the calculation of figures-of-merit for antennas. These monitors will be included in every simulation and record the radiated fields. Users can specify a combination of DirectivityMonitor objects for manual placement and DirectivityMonitorSpec objects for automatic generation.

assume_ideal_excitation [bool] = False

If True, only the excited port is assumed to have a nonzero incident wave amplitude power. This choice simplifies the calculation of the scattering matrix. If False, every entry in the vector of incident wave amplitudes (a) is calculated explicitly. This choice requires a matrix inversion when calculating the scattering matrix, but may lead to more accurate scattering parameters when there are reflections from simulation boundaries.

s_param_def [SParamDef] = 'pseudo'

Wave definition: ‘pseudo’, ‘power’, or ‘symmetric_pseudo’. Default is ‘pseudo’.

low_freq_smoothing [ModelerLowFrequencySmoothingSpec | None] = None

The low frequency smoothing parameters for the terminal component simulation.

structure_priority_mode [PriorityMode | None] = 'conductor'

If not None, override the structure priority mode in the simulation. This field only affects structures of priority=None. If equal, the priority of those structures is set to 0; if conductor, the priority of structures made of LossyMetalMedium is set to 90, PECMedium to 100, and others to 0.

base_sim()

The base simulation with all components added, including radiation monitors.

get_radiation_monitor_by_name(monitor_name: str)

Find and return a DirectivityMonitor monitor by its name.

matrix_indices_monitor()

Tuple of all the possible matrix indices.

matrix_indices_run_sim()

Tuple of all the matrix indices that will be used to run simulations.

matrix_indices_source()

Tuple of all the source matrix indices, which may be less than the total number of ports.

mode_solver_for_port(port_name: str)

Get the mode solver object for a given port.

network_dict()

Dictionary associating each unique NetworkIndex to a port and mode/terminal index.

network_index(port: TerminalPortType, mode_index: int | None = None, terminal_label: str | None = None)

Converts the port, and a mode_index when the port is a WavePort, or a terminal_label when the port is a TerminalWavePort, to a unique string specifier.

plot_port(port: str | TerminalPortType, ax: Ax = None, label_font_size: float | None = None, **kwargs: Any)

Plot a Simulation on the port plane.

plot_sim(x: float | None = None, y: float | None = None, z: float | None = None, ax: Ax = None, **kwargs: Any)

Plot a Simulation with all sources and absorbers.

plot_sim_eps(x: float | None = None, y: float | None = None, z: float | None = None, ax: Ax = None, **kwargs: Any)

Plot permittivity of the Simulation.

plot_sim_grid(x: float | None = None, y: float | None = None, z: float | None = None, ax: Ax = None, **kwargs: Any)

Plot the cell boundaries as lines on a plane defined by one nonzero x,y,z coordinate.

sim_dict()

Generate all the Simulation objects for the port parameter calculation.

task_name_from_index(source_index: NetworkIndex)

Compute task name for a given network index without constructing simulations.