tidy3d.ModeABCBoundary#

class ModeABCBoundary[source]#

Bases: AbstractABCBoundary

One-way wave equation absorbing boundary conditions for absorbing a waveguide mode.

Parameters:
  • name (Optional[str] = None) – Optional unique name for boundary.

  • mode_spec (Union[ModeSpec, MicrowaveModeSpec, MicrowaveTerminalModeSpec] = ModeSpec()) – Parameters that determine the modes computed by the mode solver.

  • mode_index (NonNegativeInt = 0) – Index into the collection of modes returned by mode solver. The absorbing boundary conditions are configured to absorb the specified mode. If larger than mode_spec.num_modes, num_modes in the solver will be set to mode_index + 1.

  • freq_spec (Optional[Union[PositiveFloat, BroadbandModeABCSpec]] = None) – Specifies the frequency at which field is absorbed. If None, then the central frequency of the source is used. If BroadbandModeABCSpec, then the field is absorbed over the specified frequency range.

  • plane (Box) – Cross-sectional plane in which the absorbed mode will be computed.

Attributes

Methods

from_monitor(monitor[, mode_index, freq_spec])

Instantiate from a ModeMonitor or ModeSolverMonitor.

from_source(source[, freq_spec])

Instantiate from a ModeSource.

is_plane(val)

Raise validation error if not planar.

mode_spec#
mode_index#
freq_spec#
plane#
classmethod is_plane(val)[source]#

Raise validation error if not planar.

classmethod from_source(source, freq_spec=None)[source]#

Instantiate from a ModeSource.

Parameters:
  • source (ModeSource) – Mode source.

  • freq_spec (Optional[Union[PositiveFloat, BroadbandModeABCSpec]] = None) – Specifies the frequency at which field is absorbed. If None, then the central frequency of the source is used. If BroadbandModeABCSpec, then the field is absorbed over the specified frequency range.

Returns:

Boundary conditions for absorbing the desired mode.

Return type:

ModeABCBoundary

Example

>>> from tidy3d import GaussianPulse, ModeSource, inf
>>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12)
>>> source = ModeSource(size=(1, 1, 0), source_time=pulse, direction='+')
>>> abc_boundary = ModeABCBoundary.from_source(source=source)
classmethod from_monitor(monitor, mode_index=0, freq_spec=None)[source]#

Instantiate from a ModeMonitor or ModeSolverMonitor.

Parameters:
  • monitor (Union[ModeMonitor, ModeSolverMonitor]) – Mode monitor.

  • mode_index (NonNegativeInt = 0) – Mode index.

  • freq_spec (Optional[Union[PositiveFloat, BroadbandModeABCSpec]] = None) – Specifies the frequency at which field is absorbed. If None, then the central frequency of the source is used. If BroadbandModeABCSpec, then the field is absorbed over the specified frequency range.

Returns:

Boundary conditions for absorbing the desired mode.

Return type:

ModeABCBoundary

Example

>>> from tidy3d import ModeMonitor
>>> mnt = ModeMonitor(size=(1, 1, 0), freqs=[1e10], name="mnt")
>>> abc_boundary = ModeABCBoundary.from_monitor(monitor=mnt, mode_index=0)