tidy3d.TFSF#

class TFSF[source]#

Bases: AngledFieldSource, VolumeSource

Total-field scattered-field (TFSF) source that can inject a plane wave in a finite region.

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 name for the source.

  • center (Union[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]], Box] = (0.0, 0.0, 0.0)) โ€“ [units = um]. Center of object in x, y, and z.

  • size (Union[tuple[Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box]], Box]) โ€“ [units = um]. Size in x, y, and z directions.

  • source_time (Union[GaussianPulse, ContinuousWave, CustomSourceTime]) โ€“ Specification of the source time-dependence.

  • direction (Literal['+', '-']) โ€“ Specifies propagation in the positive or negative direction of the injection axis.

  • angle_theta (float = 0.0) โ€“ [units = rad]. Polar angle of the propagation axis from the injection axis.

  • angle_phi (float = 0.0) โ€“ [units = rad]. Azimuth angle of the propagation axis in the plane orthogonal to the injection axis.

  • pol_angle (float = 0) โ€“ [units = rad]. Specifies the angle between the electric field polarization of the source and the plane defined by the injection axis and the propagation axis (rad). pol_angle=0 (default) specifies P polarization, while pol_angle=np.pi/2 specifies S polarization. At normal incidence when S and P are undefined, pol_angle=0 defines: - Ey polarization for propagation along x.- Ex polarization for propagation along y.- Ex polarization for propagation along z.

  • injection_axis (Literal[0, 1, 2]) โ€“ Specifies the injection axis. The plane of incidence is defined via this injection_axis and the direction. The popagation axis is defined with respect to the injection_axis by angle_theta and angle_phi.

Notes

The TFSF source injects \(\frac{1 W}{\mu m^2}\) of power along the injection_axis. Note that in the case of angled incidence, \(\frac{1 W}{\mu m^2}\) is still injected along the sourceโ€™s injection_axis, and not the propagation direction, unlike a PlaneWave source. This allows computing scattering and absorption cross-sections without the need for additional normalization.

The TFSF source allows specifying a box region into which a plane wave is injected. Fields inside this region can be interpreted as the superposition of the incident field and the scattered field due to any scatterers present in the simulation domain. The fields at the edges of the TFSF box are modified at each time step such that the incident field is cancelled out, so that all fields outside the TFSF box are scattered fields only. This is useful in scenarios where one is interested in computing scattered fields only, for example when computing scattered cross-sections of various objects.

It is important to note that when a non-uniform grid is used in the directions transverse to the injection_axis of the TFSF source, the suppression of the incident field outside the TFSF box may not be as close to zero as in the case of a uniform grid. Because of this, a warning may be issued when nonuniform grid TFSF setup is detected. In some cases, however, the accuracy may be only weakly affected, and the warnings can be ignored.

See also

Notebooks:

Attributes

injection_plane_center

Center of the injection plane.

attrs

Methods

plot([x,ย y,ย z,ย ax])

Plot this source.

Inherited Common Usage

injection_axis#
property injection_plane_center#

Center of the injection plane.

plot(x=None, y=None, z=None, ax=None, **patch_kwargs)[source]#

Plot this source.

__hash__()#

Hash method.