Mode solver¶
semi vectorial¶
- modes.mode_solver_semi.mode_solver_semi(n_modes=2, semi_vectorial_method='Ex', overwrite=False, plot=False, plot_index=False, logscale=False, **wg_kwargs)[source]¶
returns semi vectorial mode solver with the computed modes
- Parameters
n_modes (
int
) – 2overwrite (
bool
) – whether to run again even if it finds the modes in PATH.cachesemi_vectorial_method (
str
) – ‘Ey’ for TM, ‘Ex’ for TEoverwrite – runs even
plot (
bool
) – plot modesplot_index (
bool
) – plot index profilelogscale (
bool
) – plots mode in logscale
- Keyword Arguments
x_step – 0.02
y_step – 0.02
thickness – 0.22
width – 0.5
slab_thickness – 0
sub_thickness – 0.5
sub_width – 2.0
clad_thickness – 0.5
n_sub – sio2
n_wg – si
n_clads – [sio2]
wavelength – 1.55
angle – 90.0
import modes as ms m = ms.mode_solver_semi(plot_index=True, plot=True) print(m.results.keys())
- Return type
ModeSolverSemiVectorial
full vectorial¶
- modes.mode_solver_full.mode_solver_full(n_modes=2, overwrite=False, plot=False, plot_index=False, logscale=False, wg=None, fields_to_write=('Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz'), **wg_kwargs)[source]¶
Return full vectorial mode solver with the computed modes
- Parameters
n_modes (
int
) – 2overwrite (
bool
) – whether to run again even if it finds the modes in PATH.cacheplot (
bool
) – plot modesplot_index (
bool
) – plots index profilelogscale (
bool
) – plots mode in logscalewg (
Optional
[RidgeWaveguide
]) – waveguidefields_to_write (
Tuple
[Literal
[‘Ex’, ‘Ey’, ‘Ez’, ‘Hx’, ‘Hy’, ‘Hz’],...
]) – List of fields_to_write “Ex”, “Ey”, “Ez”, “Hx”, “Hy”, “Hz”
- Keyword Arguments
x_step – 0.02 grid step (um)
y_step – 0.02 grid step (um)
thickness – 0.22 (um)
width – 0.5 (um)
slab_thickness – 0 (um)
sub_width – 2.0 related to the total simulation width
sub_thickness – 0.5 bottom simulation margin
clad_thickness – [0.5] List of claddings (top simulation margin)
n_sub – sio2 substrate index material
n_wg – si waveguide index material
n_clads – list of cladding materials [sio2]
wavelength – 1.55 wavelength (um)
angle – 90 sidewall angle (degrees)
import modes as ms s = ms.mode_solver_full(plot=True, plot_index=True, n_modes=1, width=0.5, thickness=0.22) print(s.results.keys())
- Return type
ModeSolverFullyVectorial