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 anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.json()
.name (Optional[str] = None) โ Optional name for the source.
center (Tuple[float, float, float] = (0.0, 0.0, 0.0)) โ [units = um]. Center of object in x, y, and z.
size (Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]) โ [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, whilepol_angle=np.pi/2
specifies S polarization. At normal incidence when S and P are undefined,pol_angle=0
defines: -Ey
polarization for propagation alongx
.-Ex
polarization for propagation alongy
.-Ex
polarization for propagation alongz
.injection_axis (Literal[0, 1, 2]) โ Specifies the injection axis. The plane of incidence is defined via this
injection_axis
and thedirection
. The popagation axis is defined with respect to theinjection_axis
byangle_theta
andangle_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โsinjection_axis
, and not the propagation direction, unlike aPlaneWave
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:
Defining a total-field scattered-field (TFSF) plane wave source
Nanoparticle Scattering: To force a uniform grid in the TFSF region and avoid the warnings, a mesh override structure can be used as illustrated here.
Attributes
Center of the injection plane.
Methods
plot
([x,ย y,ย z,ย ax])Plot this source.
Inherited Common Usage
- injection_axis#
- property injection_plane_center#
Center of the injection plane.
- __hash__()#
Hash method.