5.5. sesame.analyzer
– Computing densities, recombination and currents¶
Sesame provides several functions to compute densities, recombination and other integrated quantities to simplify the analysis of simulation data. We give a summary of these functions below:
line (system, p1, p2) |
Compute the path and sites between two points. |
band_diagram (location[, fig]) |
Compute the band diagram between two points defining a line. |
electron_density ([location]) |
Compute the electron density across the system or on a line defined by two points. |
hole_density ([location]) |
Compute the hole density across the system or on a line defined by two points. |
bulk_srh_rr ([location]) |
Compute the bulk Shockley-Read-Hall recombination across the system or on a line defined by two points. |
auger_rr ([location]) |
Compute the Auger recombination across the system or on a line defined by two points. |
radiative_rr ([location]) |
Compute the radiative recombination across the system or on a line defined by two points. |
defect_rr (defect) |
Compute the recombination for all sites of a defect (2D and 3D). |
total_rr () |
Compute the sum of all the recombination sources for all sites of the system. |
electron_current ([component, location]) |
Compute the electron current either by component (x or y) across the entire system, or on a line defined by two points. |
hole_current ([component, location]) |
Compute the hole current either by component (x or y) across the entire system, or on a line defined by two points. |
electron_current_map ([cmap, scale]) |
Compute a 2D map of the electron current. |
map3D (data[, cmap, scale]) |
Plot a 3D map of data across the entire system. |
integrated_bulk_srh_recombination () |
Integrate the bulk Shockley-Read-Hall recombination over an entire system. |
integrated_auger_recombination () |
Integrate the Auger recombination over an entire system. |
integrated_radiative_recombination () |
Integrate the radiative recombination over an entire system. |
integrated_defect_recombination (defect) |
Integrate the recombination along a defect in 2D. |
full_current () |
Compute the steady state current in 1D and 2D. |
All the functions are gathered in the sesame.analyzer.Analyzer()
class.
-
class
sesame.analyzer.
Analyzer
(sys, data)[source]¶ Object that simplifies the extraction of physical data (densities, currents, recombination) across the system.
Parameters: sys: Builder :
A discretized system.
data: dictionary :
Dictionary containing 1D arrays of electron and hole quasi-Fermi levels and the electrostatic potential across the system. Keys must be ‘efn’, ‘efp’, and/or ‘v’.
-
auger_rr
(location=None)[source]¶ Compute the Auger recombination across the system or on a line defined by two points.
Parameters: location: array-like ((x1,y1), (x2,y2)) :
Tuple of two points defining a line over which to compute the recombination.
Returns: r: numpy array :
An array with the values of recombination.
-
band_diagram
(location, fig=None)[source]¶ Compute the band diagram between two points defining a line. Display a plot if fig is None.
Parameters: location: array-like ((x1,y1), (x2,y2)) :
Tuple of two points defining a line over which to compute a band diagram.
fig: Maplotlib figure :
A plot is added to it if given. If not given, a new one is created and displayed.
-
bulk_srh_rr
(location=None)[source]¶ Compute the bulk Shockley-Read-Hall recombination across the system or on a line defined by two points.
Parameters: location: array-like ((x1,y1), (x2,y2)) :
TUple of two points defining a line over which to compute the recombination.
Returns: r: numpy array :
An array with the values of recombination.
-
defect_rr
(defect)[source]¶ Compute the recombination for all sites of a defect (2D and 3D).
Parameters: defect: named tuple :
Container with the properties of a defect. The expected field names of the named tuple are sites, location, dos, energy, sigma_e, sigma_h, transition, perp_dl.
Returns: r: numpy array of floats :
An array with the values of recombination at each sites.
-
electron_current
(component='x', location=None)[source]¶ Compute the electron current either by component (x or y) across the entire system, or on a line defined by two points.
Parameters: component: string :
Current direction
'x'
or'y'
. By default returns all currents in the x-direction.location: array-like ((x1,y1), (x2,y2)) :
Tuple of two points defining a line over which to compute the electron current.
Returns: jn: numpy array of floats :
-
electron_current_map
(cmap='gnuplot', scale=10000.0)[source]¶ Compute a 2D map of the electron current.
Parameters: cmap: Matplotlib color map :
Color map used for the plot.
scale: float :
Scale to apply to the axes of the plot.
-
electron_density
(location=None)[source]¶ Compute the electron density across the system or on a line defined by two points.
Parameters: location: array-like ((x1,y1), (x2,y2)) :
Tuple of two points defining a line over which to compute the electron density.
Returns: n: numpy array of floats :
See also
-
full_current
()[source]¶ Compute the steady state current in 1D and 2D.
Returns: J: float :
The integrated full steady state current.
-
hole_current
(component='x', location=None)[source]¶ Compute the hole current either by component (x or y) across the entire system, or on a line defined by two points.
Parameters: component: string :
Current direction
'x'
or'y'
. By default returns all currents in the x-direction.location: array-like ((x1,y1), (x2,y2)) :
Tuple of two points defining a line over which to compute the hole current.
Returns: jp: numpy array of floats :
-
hole_current_map
(cmap='gnuplot', scale=10000.0)[source]¶ Compute a 2D map of the hole current of a 2D system.
Parameters: cmap: Matplotlib color map :
Color map used for the plot.
scale: float :
Scale to apply to the axes of the plot.
-
hole_density
(location=None)[source]¶ Compute the hole density across the system or on a line defined by two points.
Parameters: location: array-like ((x1,y1), (x2,y2)) :
Tuple of two points defining a line over which to compute the hole density.
Returns: p: numpy array of floats :
See also
-
integrated_auger_recombination
()[source]¶ Integrate the Auger recombination over an entire system.
Returns: JR: float :
The integrated Auger recombination.
Warning
Not implemented in 3D.
-
integrated_bulk_srh_recombination
()[source]¶ Integrate the bulk Shockley-Read-Hall recombination over an entire system.
Returns: JR: float :
The integrated bulk recombination.
Warning
Not implemented in 3D.
-
integrated_defect_recombination
(defect)[source]¶ Integrate the recombination along a defect in 2D.
Returns: JD: float :
The recombination integrated along the line of the defect.
Warning
Not implemented in 3D.
-
integrated_radiative_recombination
()[source]¶ Integrate the radiative recombination over an entire system.
Returns: JR: float :
The integrated radiative recombination.
Warning
Not implemented in 3D.
-
static
line
(system, p1, p2)[source]¶ Compute the path and sites between two points.
Parameters: system: Builder :
The discretized system.
p1, p2: array-like (x, y) :
Two points defining a line.
Returns: s, sites: numpay arrays :
Curvilinear abscissa and sites of the line.
Notes
This method can be used with an instance of the Analyzer():
>>> az = sesame.Analyzer(sys, res) >>> X, sites = az.line(sys, p1, p2)
or without it:
>>> X, sites = sesame.Analyzer.line(sys, p1, p2)
-
map3D
(data, cmap='gnuplot', scale=1e-06)[source]¶ Plot a 3D map of data across the entire system.
Parameters: data: numpy array :
One-dimensional array of data with size equal to the size of the system.
cmap: string :
Name of the colormap used by Matplolib.
scale: float :
Relevant scaling to apply to the axes.
-
radiative_rr
(location=None)[source]¶ Compute the radiative recombination across the system or on a line defined by two points.
Parameters: location: array-like ((x1,y1), (x2,y2)) :
Tuple of two points defining a line over which to compute the recombination.
Returns: r: numpy array :
An array with the values of recombination.
-