Mode solver

semi vectorial

modes.mode_solver_semi.mode_solver_semi(n_modes=2, semi_vectorial_method='Ex', overwrite=False, plot=False, plot_profile=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 CONFIG.cache

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

  • overwrite – runs even

  • plot (bool) – plot modes

  • plot_profile (bool) – plot index profile

  • logscale (bool) – plots mode in logscale

  • 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_clad – sio2

  • wavelength – 1.55

  • angle – 90.0

import modes as ms

m = ms.mode_solver_semi()
print(m.results.keys())

(Source code)

Return type

ModeSolverSemiVectorial

full vectorial

modes.mode_solver_full.mode_solver_full(n_modes=2, overwrite=False, plot=False, plot_profile=False, logscale=False, wg=None, fields_to_write=('Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz'), **wg_kwargs)[source]

returns 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 CONFIG.cache

  • 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, n_modes=1, width=0.5, thickness=0.22)
print(s.results.keys())

(Source code)

Return type

ModeSolverFullyVectorial