pyModeSolver.py_mode_solver.VFDModeSolver

class pyModeSolver.py_mode_solver.VFDModeSolver

Bases: simulator

Vector Finite-Difference Mode Solver

Reference:
      1. Fallahkhair, K. S. Li and T. E. Murphy, “Vector Finite Difference Modesolver for Anisotropic Dielectric Waveguides”, J. Lightw. Technol. 26(11) 1423-1431 (2008).

Methods

Run()

This method runs the mode solver simulations.

SetBoundaries([min_x, max_x, min_y, max_y])

Set the boundary condition for the mode solver.

SetSimSettings(device_geometry[, nmodes, ...])

This method sets the Mode Solver simulation settings.

get_core_simulator()

set_boundaries([min_x_bc, max_x_bc, ...])

Set the boundary condition for the mode solver.

set_sim_settings([device_geometry])

Run() ModeSolverResults

This method runs the mode solver simulations. It returns the results as a ModeSolverResults() object.

Returns:

An object containing the mode solver results.

Return type:

ModeSolverResults

SetBoundaries(min_x: dict = {'bc': 'pmc'}, max_x: dict = {'bc': 'pmc'}, min_y: dict = {'bc': 'pmc'}, max_y: dict = {'bc': 'pmc'}) None

Set the boundary condition for the mode solver. Supported boundaries are: “pmc”: perfect magnetic conductor, “asy” For anti-symmetric boundary and “sym” for symmetric boundary. Anti-symmetric is related to an odd symmetry of the H-fields at the boundary. Symmetric is related to an even symmetry of the H-fileds at the boundary.

Parameters:
  • min_x (dict, optional) – A dict with the choice of for x_min face. Defaults to {“bc”:”pmc”}.

  • max_x (dict, optional) – A dict with the choice of for x_max face.. Defaults to {“bc”:”pmc”}.

  • min_y (dict, optional) – A dict with the choice of for y_min face.. Defaults to {“bc”:”pmc”}.

  • max_y (dict, optional) – A dict with the choice of for y_max face.. Defaults to {“bc”:”pmc”}.

SetSimSettings(device_geometry: DeviceGeometry, nmodes: int = 4, nguess: float | complex = 3.4, mesh: dict[str, float] = {'dx': 0.025, 'dy': 0.025, 'dz': 0.025}, wavelength: dict[str, float | int] = {'max': 1.6, 'min': 1.5, 'npts': 5}, cut_plane: Literal['XY', 'YZ', 'XZ'] = 'YZ', cut_location: float = 0.0, tol: float = 1e-08, savepath: str = None, res_filename: str = None) None

This method sets the Mode Solver simulation settings. It does not set the boudnary conditions, for that you should use the SetBoundaries() method.

Parameters:
  • device_geometry (DeviceGeometry) – A DeviceGeometry object with the geometry specs of the device.

  • nmodes (int, optional) – Number of modes to analyse. Defaults to 4.

  • nguess (float | complex, optional) – Initial guess for the mode index of refraction. Defaults to 3.4.

  • mesh (dict[str,float], optional) – A dictionary specifying the cross section mesh sapce steps. Defaults to {“dx”: 0.025,”dy”: 0.025, “dz”: 0.025}.

  • wavelength (dict[str,float], optional) – A dictionary specifying the wavelength sweep properties. Defaults to {“min”:1.5,”max”:1.6,”npts”: 5}.

  • cut_plane (Literal['XY', 'YZ', 'XZ'], optional) – The plane of the cross section. Defaults to “YZ”.

  • cut_location (float, optional) – The location of the cross section plane along the plane normal axis. Defaults to 0.0.

  • tol (float, optional) – A tolerance for the eigensolver. Defaults to 1e-8.

  • savepath (str, optional) – A path to save the results. Defaults to None. If None, saves in the current working directory.

  • res_filename (str, optional) – Results file name witout extension. Defaults to None. If None, name the file as “mode_results_<YYYY_mm_dd_HH_MM_SS’>”