pyModeSolver.pyModeSolver.VFDModeSolver

class pyModeSolver.pyModeSolver.VFDModeSolver

Bases: object

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.

RunSolver()

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

Set the boundary condition for the mode solver.

SetParameters(lambda_, guess, nmodes, dx, ...)

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

This method sets the Mode Solver simulation settings.

standarize_xy(nx, ny, nz, dx, dy, dz, xmin, ...)

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: str = 'pmc', max_x: str = 'pmc', min_y: str = 'pmc', max_y: str = 'pmc', params: PML_Params = None) None

Set the boundary condition for the mode solver. :param min_x: “pmc”, “asy”, “sym”, or “pml”. Defaults to “pmc”. :type min_x: str :param …:

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: ndarray = None, cut_plane: Literal['XY', 'YZ', 'XZ'] = 'YZ', cut_location: float = 0.0, tol: float = 1e-08, radius: float = None, results_path: str = None, device_name: 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 (np.ndarray, optional) – Array defining the frequency points to simulate. 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.

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

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