tidy3d.plugins.smatrix.TerminalComponentModeler#
- class TerminalComponentModeler[source]#
- Bases: - AbstractComponentModeler- Tool for modeling two-terminal multiport devices and computing port parameters with lumped and wave ports. - Parameters:
- attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, - attrsare mutable. For example, the following is allowed for setting an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- simulation (Simulation) – Simulation describing the device without any sources present. 
- ports (Tuple[Union[LumpedPort, CoaxialLumpedPort, WavePort], ...] = ()) – 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. 
- freqs (Union[Tuple[float, ...], ArrayLike[dtype=float, ndim=1]]) – [units = Hz]. Array or list of frequencies at which to compute port parameters. 
- 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- Falseresults in an unmodified Gaussian pulse spectrum which can have a nonzero DC component.
- folder_name (str = default) – Name of the folder for the tasks on web. 
- verbose (bool = False) – Whether the - AbstractComponentModelershould print status and progressbars.
- callback_url (Optional[str] = None) – Http PUT url to receive simulation finish event. The body content is a json file with fields - {'id', 'status', 'name', 'workUnit', 'solverVersion'}.
- path_dir (str = .) – Base directory where data and batch will be downloaded. 
- solver_version (Optional[str] = None) – batch_cached : Optional[Batch] = None Optional field to specify - batch. Only used as a workaround internally so that- batchis written when- .to_file()and then the proper batch is loaded from- .from_file(). We recommend leaving unset as setting this field along with fields that were not used to create the task will cause errors.
 
 - Attributes - Generate all the - Simulationobjects for the port parameter calculation.- ports- Methods - ab_to_s(a_matrix, b_matrix)- Get the scattering matrix given the power wave matrices. - compute_power_delivered_by_port(port, sim_data)- Helper to compute the total power delivered to the network by a port for a given simulation result. - compute_power_wave_amplitudes(port, sim_data)- Helper to compute the incident and reflected power wave amplitudes at a port for a given simulation result. - plot_sim([x, y, z, ax])- Plot a - Simulationwith all sources added for each port, for troubleshooting.- plot_sim_eps([x, y, z, ax])- Plot permittivity of the - Simulationwith all sources added for each port.- port_reference_impedances(batch_data)- Tabulates the reference impedance of each port at each frequency. - s_to_z(s_matrix, reference)- Get the impedance matrix given the scattering matrix and a reference impedance. - Inherited Common Usage - ports#
 - plot_sim(x=None, y=None, z=None, ax=None, **kwargs)[source]#
- Plot a - Simulationwith all sources added for each port, for troubleshooting.
 - plot_sim_eps(x=None, y=None, z=None, ax=None, **kwargs)[source]#
- Plot permittivity of the - Simulationwith all sources added for each port.
 - property sim_dict#
- Generate all the - Simulationobjects for the port parameter calculation.
 - static compute_power_wave_amplitudes(port, sim_data)[source]#
- Helper to compute the incident and reflected power wave amplitudes at a port for a given simulation result. The computed amplitudes have not been normalized. 
 - static compute_power_delivered_by_port(port, sim_data)[source]#
- Helper to compute the total power delivered to the network by a port for a given simulation result. Units of power are Watts. 
 - static ab_to_s(a_matrix, b_matrix)[source]#
- Get the scattering matrix given the power wave matrices. 
 - static s_to_z(s_matrix, reference)[source]#
- Get the impedance matrix given the scattering matrix and a reference impedance. 
 - port_reference_impedances(batch_data)[source]#
- Tabulates the reference impedance of each port at each frequency. 
 - __hash__()#
- Hash method.