Photonic Device

The PhotonicDevice is at the core of the imodulator package. It is a data centre for the modulator, meant to store information about the geometry and materials of the device. It is built in such a way to allow seamless integration with the various solvers available in the package, in order to minimize the amount of time spent on parametrization between different simulations.

class imodulator.PhotonicDevice.PhotonicDevice(photo_polygons)

Base class for a PhotonicDevice. This class holds all the information needed to do a full simulation of an electro-optical modulator.

__init__(photo_polygons)

Initializes the class.

Based on the resolutions of the mesh settings given to each PhotoPolygon, it will also look for the different interfaces between semiconductor, insulator and metal polygons and generate the junction entities. Furthermore, it will also create the line entities based on the PhotoPolygon.calculate_current and PhotoPolygon.d_buffer_current attributes.

Warning

The algorithm to search for junctions is not active at the moment. It is a feature that will be implemented in the future.

Parameters:

photo_polygons (list[SemiconductorPolygon | MetalPolygon | InsulatorPolygon]) – a list of PhotonicPolygon objects. These objects will be used to create the mesh and the dielectric tensors. Note that the polygons in this list will dictate the hierarchy of the polygons for the meshing algorithm. The first polygon in the list will have the highest priority.

plot_polygons(color_polygon='black', color_line='green', color_junctions='blue', fill_polygons=False, poly_list_color=None, fig=None, ax=None)

Plots the polygons of the PhotonicDevice object.

Parameters:
  • color_polygon (str (default: 'black')) – The color to use for the polygons.

  • color_line (str (default: 'green')) – The color to use for the lines.

  • color_junctions (str (default: 'blue')) – The color to use for the junctions.

  • fill_polygons (bool (default: False)) – If True, the polygons will be filled.

  • poly_list_color (Optional[Dict[str, str]] (default: None)) – A dictionary to limit the plotted polygons and to map polygon names to fill colors.

  • polygon" ({"name of the) – color,…}

  • fig (default: None) – The figure to plot on. If None, a new figure is created.

  • ax (default: None) – The axis to plot on. If None, a new axis is created.

Returns:

The figure and axis objects.

Return type:

fig, ax

Some remarks about the creation of a PhotonicDevice:

  1. It is reccomended to always create a PhotonicPolygon called ‘background’. If it is not given one with such a name, it shall be created one and added to the photopolygons list. This is necessary so as to be able to mesh your background.

  2. The PhotonicDevice will hold all the results from both the mode and the charge transport simulations in the form of interpolators. In case you would like to access such information they shall be stored in the PhotonicDevice.mode and PhotonicDevice.charge attributes, respectively.

References