tidy3d.ModeABCBoundary#

class ModeABCBoundary[source]#

Bases: AbstractABCBoundary

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

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, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

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

  • mode_spec (ModeSpec = ModeSpec(attrs={}, num_modes=1, target_neff=None, num_pml=(0,, 0), filter_pol=None, angle_theta=0.0, angle_phi=0.0, precision='double', bend_radius=None, bend_axis=None, angle_rotation=False, track_freq='central', group_index_step=False, type='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 (Union[PositiveFloat, BroadbandModeABCSpec, NoneType] = 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.

Inherited Common Usage

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[pd.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 (pd.NonNegativeInt = 0) – Mode index.

  • freq_spec (Optional[Union[pd.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)
__hash__()#

Hash method.