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) – 2

  • overwrite (bool) – whether to run again even if it finds the modes in PATH.cache

  • semi_vectorial_method (str) – ‘Ey’ for TM, ‘Ex’ for TE

  • overwrite – runs even

  • plot (bool) – plot modes

  • plot_index (bool) – plot index profile

  • logscale (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())

(Source code)

_images/mode_solvers-1_00.png

(png, hires.png, pdf)

_images/mode_solvers-1_01.png

(png, hires.png, pdf)

_images/mode_solvers-1_02.png

(png, hires.png, pdf)

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) – 2

  • overwrite (bool) – whether to run again even if it finds the modes in PATH.cache

  • plot (bool) – plot modes

  • plot_index (bool) – plots index profile

  • logscale (bool) – plots mode in logscale

  • wg (Optional[RidgeWaveguide]) – waveguide

  • fields_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())

(Source code)

_images/mode_solvers-1_00.png

(png, hires.png, pdf)

_images/mode_solvers-1_01.png

(png, hires.png, pdf)

_images/mode_solvers-1_02.png

(png, hires.png, pdf)

Return type

ModeSolverFullyVectorial