Electromagnetic Modes¶
Mode Types¶
fdtdx.core.modes.ModeTupleType = namedtuple('Mode', ['neff', 'Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz'])
module-attribute
¶
A named tuple representing an electromagnetic mode.
Attributes:
Name | Type | Description |
---|---|---|
neff |
Complex effective refractive index of the mode |
|
Ex |
X component of the electric field |
|
Ey |
Y component of the electric field |
|
Ez |
Z component of the electric field |
|
Hx |
X component of the magnetic field |
|
Hy |
Y component of the magnetic field |
|
Hz |
Z component of the magnetic field |
Mode Solvers¶
fdtdx.core.physics.modes.compute_modes(frequency, permittivity_cross_section, coords, direction, target_neff=None, angle_theta=0.0, angle_phi=0.0, num_modes=10, precision='double', filter_pol=None)
¶
Compute optical modes of a waveguide cross-section.
This function uses the Tidy3D mode solver to compute the optical modes of a given waveguide cross-section defined by its permittivity distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frequency
|
float
|
Operating frequency in Hz |
required |
permittivity_cross_section
|
ndarray
|
2D array of relative permittivity values |
required |
coords
|
List[ndarray]
|
List of coordinate arrays [x, y] defining the grid |
required |
direction
|
Literal['+', '-']
|
Propagation direction, either "+" or "-" |
required |
target_neff
|
float | None
|
Target effective index to search around. Defaults to None. |
None
|
angle_theta
|
float
|
Polar angle in radians. Defaults to 0.0. |
0.0
|
angle_phi
|
float
|
Azimuthal angle in radians. Defaults to 0.0. |
0.0
|
num_modes
|
int
|
Number of modes to compute. Defaults to 10. |
10
|
precision
|
Literal['single', 'double']
|
Numerical precision. Defaults to "double". |
'double'
|
filter_pol
|
Literal['te', 'tm'] | None
|
Mode polarization filter. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
List[ModeTupleType]
|
List[ModeTupleType]: List of computed modes sorted by decreasing real part of effective index. Each mode contains the field components and effective index. |
Source code in src/fdtdx/core/physics/modes.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|