TerminalComponentModeler#
Tool for modeling two-terminal multiport devices and computing port parameters with lumped and wave ports. |
|
Data associated with a |
|
Stores the computed S-matrix and reference impedances for the terminal ports. |
|
Port parameter matrix elements for terminal-based ports. |
|
Array of values over dimensions of frequency and port name. |
The TerminalComponentModeler is the core simulation object for 3D RF/microwave simulations in Tidy3D. Its primary function is to simulate the system over N number of ports and M number of frequency points, with the end result being a MxNxN S-parameter matrix.
my_tcm = TerminalComponentModeler(
simulation=base_sim,
ports=[port1, port2],
freqs=my_frequencies,
...
)
The key parts of a TerminalComponentModeler are:
The
Simulationfield defines the underlying Tidy3D Simulation object. This baseSimulationobject contains information about the simulation domain such as structures, boundary conditions, grid specifications, and monitors. Note that sources should not be included in the base simulation, but rather in theportsfield instead.The
portsfield defines the list of source excitations. These are commonly of typeLumpedPortorWavePort. The number of ports determines the number of batch jobs in theTerminalComponentModelerand the dimensionality of the S-parameter matrix. Note: Port names cannot contain the β@β symbol (reserved for internal indexing).The
freqsfield defines the list of frequency points for the simulation.
More information and explanation for additional fields can be found in the documentation page for the TerminalComponentModeler.
Workflow#
In order to submit the simulation, use web.upload(), web.start(), web.monitor(), and web.load().
Alternatively, use the web.run() method to perform all of the above in one single step.
To get the S-matrix from the results, use the smatrix() method of the TerminalComponentModelerData object.
# Get S-matrix from results
my_s_matrix = my_tcm_data.smatrix()
The S-matrix is stored as a MicrowaveSMatrixData whose data property contains a TerminalPortDataArray instance. To obtain a specific S_ij value, use the port_in and port_out coordinates with the corresponding port name. To obtain a specific frequency, use the f coordinate.
# Get return loss
my_S11 = my_s_matrix.data.sel(port_in="my_port_1", port_out="my_port_1")
Note
At this moment, Tidy3D uses the physics phase convention \(e^{-i\omega t}\). Other RF simulation software and texts may use the electrical engineering convention \(e^{i\omega t}\). This affects the sign of the imaginary part of calculated S-parameters and impedance values. To convert between the two, simply use the complex conjugation operation, e.g. np.conjugate().
See also
To learn more about the web API workflow in Tidy3D, please refer to the following pages:
To learn more about data post-processing and visualization, please refer to the following pages:
Please refer to the following example models to see the TerminalComponentModeler in action: