tidy3d.PointDipole#

class PointDipole[source]#

Bases: CurrentSource, ReverseInterpolatedSource

Uniform current source with a zero size. The source corresponds to an infinitesimal antenna with a fixed current density, and is slightly different from a related definition that is used in some contexts, namely an oscillating electric or magnetic dipole. The two are related through a factor of omega ** 2 in the power normalization, where omega is the angular frequency of the oscillation. This is discussed further in our source normalization FAQ page.

Parameters:
  • name (Optional[str] = None) – Optional name for the source.

  • center (Optional[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]]] = None) – [units = um]. Center of object in x, y, and z.

  • size (tuple[Literal[0], Literal[0], Literal[0]] = (0, 0, 0)) – [units = um]. Size in x, y, and z directions, constrained to (0, 0, 0).

  • source_time (Union[GaussianPulse, ContinuousWave, CustomSourceTime, BroadbandPulse, BasebandStep, BasebandGaussianPulse, BasebandRectangularPulse, BasebandCustomSourceTime]) – Specification of the source time-dependence.

  • interpolate (bool = True) – Handles reverse-interpolation of zero-size dimensions of the source. If False, the source data is snapped to the nearest Yee grid point. If True, equivalent source data is applied on the surrounding Yee grid points to emulate placement at the specified location using linear interpolation.

  • confine_to_bounds (bool = False) – If True, any source amplitudes which, after discretization, fall beyond the bounding box of the source are zeroed out, but only along directions where the source has a non-zero extent. The bounding box is inclusive. Should be set `True when the current source is being used to excite a current in a conductive material.

  • polarization (Literal['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz']) – Specifies the direction and type of current component.

  • .. – TODO add image of how it looks like based on sim 1.

Example

>>> from tidy3d import GaussianPulse
>>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12)
>>> pt_dipole = PointDipole(center=(1,2,3), source_time=pulse, polarization='Ex')

Attributes

size

polarization

interpolate

confine_to_bounds

source_time

center

name

Methods

sources_from_angles(source_time, ...[, ...])

Returns a list of PointDipole objects used to emulate a single dipole polarized in an arbitrary direction.

size#
classmethod sources_from_angles(source_time, angle_theta, angle_phi, component='electric', **kwargs)[source]#

Returns a list of PointDipole objects used to emulate a single dipole polarized in an arbitrary direction. The direction is specificed using a polar and azimuthal angle.

Parameters:
  • source_time (SourceTime) – Specification of the source time-dependence.

  • angle_theta (float) – Polar angle w.r.t. the z-axis.

  • angle_phi (float) – Azimuth angle around the z-axis.

  • component (Literal["electric", "magnetic"] = "electric") – The type of polarization.

  • kwargs (dict) – Keyword arguments passed to PointDipole(), excluding source_time and polarization

Returns:

A list of PointDipole objects that emulate a single dipole with an arbitrary direction of polarization.

Return type:

list[PointDipole]