tidy3d.BlochBoundary#
- class BlochBoundary[source]#
Bases:
BoundaryEdge
Specifies a Bloch boundary condition along a single dimension.
- 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 unique name for boundary.
bloch_vec (float) – Normalized component of the Bloch vector in units of 2 * pi / (size along dimension) in the background medium, along the dimension in which the boundary is specified.
Example
>>> bloch = BlochBoundary(bloch_vec=1)
See also
Attributes
Returns the forward phase factor associated with
bloch_vec
.Methods
from_source
(source, domain_size, axis[, medium])Set the Bloch vector component based on a given angled source and its center frequency.
Inherited Common Usage
- bloch_vec#
- property bloch_phase#
Returns the forward phase factor associated with
bloch_vec
.
- classmethod from_source(source, domain_size, axis, medium=None)[source]#
- Set the Bloch vector component based on a given angled source and its center frequency.
Note that if a broadband angled source is used, only the frequency components near the center frequency will exhibit angled incidence at the expect angle. In this case, a narrowband source is recommended.
- Parameters:
source (Union[
GaussianBeam
,ModeSource
,PlaneWave
]) – Angled source.domain_size (float) – Size of the domain (micron) in the direction normal to the Bloch boundary.
axis (int) – Axis normal to the Bloch boundary.
medium (
Medium
) – Background medium associated with the Bloch vector. Default: free space.
- Returns:
Bloch boundary condition with wave vector defined based on the source angles and center frequency.
- Return type:
Example
>>> from tidy3d import GaussianPulse, PlaneWave, inf >>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12) >>> pw_source = PlaneWave( ... size=(inf,inf,0), source_time=pulse, direction='+', angle_theta=0.2, angle_phi=0.3) >>> bloch = BlochBoundary.from_source(source=pw_source, domain_size=5, axis=0)
- __hash__()#
Hash method.