Skip to content

flex_rf.tidy3d.AbstractComponentModeler

Type: class Base(s): ABC, Tidy3dBaseModel

Tool for modeling devices and computing port parameters.

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] = ''
ports [tuple[Port | TerminalPortType, ...]] = ()

Collection of ports describing the scattering matrix elements. For each input mode, one simulation will be run with a modal source.

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.

run_only [tuple[IndexType, ...] | 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[ElementType, ElementType, 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.

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.

matrix_indices_monitor [tuple[IndexType, ...]]

Abstract property for all matrix indices that will be used to collect data.

unique_port_names
get_port_by_name(port_name: str)

Get the port from the name.

get_task_name(port: PortType, mode_index: int | None = None, terminal_label: str | None = None)

Generates a standardized task name from a port object.

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.

run(path_dir: str = DEFAULT_DATA_DIR, *, folder_name: str = 'default', callback_url: str | None = None, verbose: bool = True, solver_version: str | None = None, pay_type: PayType | str = 'AUTO', priority: int | None = None, local_gradient: bool = False, max_num_adjoint_per_fwd: int | None = None)
validate_pre_upload()

Validate the modeler before upload.