Skip to content

flex_rf.tidy3d.WavePort

Type: class Base(s): AbstractWavePort

Class representing a single modal-driven wave port.

By default, the characteristic impedance of each mode is used as the reference impedance for S-parameter calculations.

size [TracedSize]

Size in x, y, and z directions.

name [str]

Unique name for the port.

direction [Direction]

’+’ or ’-’, defining which direction is considered ‘input’.

center [TracedCoordinate] = (0.0, 0.0, 0.0)

Center of object in x, y, and z.

num_grid_cells [int | None] = DEFAULT_WAVE_PORT_NUM_CELLS

Number of mesh grid cells in the transverse plane of the WavePort. Used in generating the suggested list of MeshOverrideStructure objects. Must be greater than or equal to 3. When set to None, no grid refinement is performed.

conjugated_dot_product [bool] = False

Use conjugated or non-conjugated dot product for mode decomposition.

frame [PECFrame | None] = DEFAULT_WAVE_PORT_FRAME

Add a thin frame around the source during FDTD run for an improved injection.

absorber [bool | ABCBoundary | ModeABCBoundary] = True

Place a mode absorber in the port. If True, an automatically generated mode absorber is placed in the port. If ABCBoundary or ModeABCBoundary, a mode absorber is placed in the port with the specified boundary conditions.

extrude_structures [bool] = False

Extrudes structures that intersect the wave port plane by a few grid cells when True, improving mode injection accuracy.

reference_impedance [Literal['Z0'] | Complex | ImpedanceModeDataArray | ImpedanceTerminalDataArray] = 'Z0'

User-specified reference impedance for S-parameter computation. If Z0 (default), the characteristic impedance is used. Otherwise, it can be a single complex value applied to all modes, or a data array specified for each. If the data array misses some modes, 50 Ohm is applied to the missing ones.

mode_spec [MicrowaveModeSpec] = factory: MicrowaveModeSpec._default_without_license_warning

Parameters to feed to mode solver which determine modes and how transmission line quantities, e.g., characteristic impedance, are computed.

mode_index [NonNegativeInt | None] = None

Index into the collection of modes returned by mode solver. Specifies which mode to inject using this port. Deprecated. Use the ‘mode_selection’ field instead.

mode_selection [tuple[int, ...] | None] = None

Selects specific mode(s) to use from the mode solver. Can be a single integer for one mode, or a tuple of integers for multiple modes. If None (default), all modes from the mode_spec are used. Indices must be non-negative and less than mode_spec.num_modes.

compute_current(sim_data: SimulationData)

Helper to compute current flowing through the port.

compute_voltage(sim_data: SimulationData)

Helper to compute voltage across the port.

get_characteristic_impedance_matrix(sim_mode_data: SimulationData | MicrowaveModeData)

Retrieve the characteristic impedance matrix of the port.

get_port_impedance(sim_mode_data: SimulationData | MicrowaveModeData, mode_index: int)

Retrieve the reference impedance of the port for a specific mode.

to_source(source_time: SourceTimeType, snap_center: float | None = None, mode_index: int = 0, mode_spec: MicrowaveModeSpecType | None = None)

Create a mode source from the wave port.