PLaSK library
|
Public Member Functions | |
__init__ (self, name) | |
reconnect (self) | |
on_initialize (self) | |
on_invalidate (self) | |
get_lam (self) | |
compute_thermoelectric (self) | |
step (self, volt, save=False) | |
get_optical_determinant (self, lam) | |
get_junction_concentrations (self, interpolation='linear') | |
get_junction_gains (self, axis=None, interpolation='linear') | |
get_gain_spectrum (self, lams, pos=0., junction=0) | |
plot_junction_concentration (self, bounds=True, interpolation='linear', label=None, **kwargs) | |
plot_junction_gain (self, axis=None, bounds=True, interpolation='linear', label=None, **kwargs) | |
plot_gain_spectrum (self, lams, pos=0., junction=0, comp=None, **kwargs) | |
plot_optical_determinant (self, lams, **kwargs) | |
compute (self, save=True, invalidate=False, group='ThresholdSearch', stepsave=False) | |
save (self, filename=None, group='ThresholdSearch', optical_resolution=None) | |
get_optical_field (self, resolution=None) | |
get_optical_field_horizontal (self, resolution=None, interpolation='linear') | |
get_optical_field_vertical (self, pos=0.01, offset=0.5, resolution=None, interpolation='linear') | |
plot_optical_field (self, resolution=None, geometry_color='0.75', geometry_alpha=0.35, geometry_lw=1.0, **kwargs) | |
plot_optical_field_horizontal (self, resolution=None, bounds=True, interpolation='linear', **kwargs) | |
plot_optical_field_vertical (self, pos=0.01, offset=0.5, resolution=None, interpolation='linear', **kwargs) | |
Public Member Functions inherited from meta.shockley.thermoelectric.ThermoElectric | |
load_xpl (self, xpl, manager) | |
get_total_current (self, nact=0) | |
get_temperature (self) | |
get_voltage (self) | |
get_vertical_voltage (self, at=0) | |
get_junction_currents (self, refine=16, interpolation='linear') | |
plot_temperature (self, geometry_color='0.75', mesh_color=None, geometry_alpha=0.35, mesh_alpha=0.15, geometry_lw=1.0, mesh_lw=1.0, **kwargs) | |
plot_voltage (self, geometry_color='0.75', mesh_color=None, geometry_alpha=0.35, mesh_alpha=0.15, geometry_lw=1.0, mesh_lw=1.0, **kwargs) | |
plot_vertical_voltage (self, at=0., **kwargs) | |
plot_junction_current (self, refine=16, bounds=True, interpolation='linear', label=None, **kwargs) | |
Public Member Functions inherited from plask::Solver | |
bool | initCalculation () |
This should be called on beginning of each calculation method to ensure that solver will be initialized. | |
Solver (const std::string &name="") | |
Construct uninitialized solver. | |
virtual | ~Solver () |
Virtual destructor (for subclassing). Do nothing. | |
virtual void | loadConfiguration (XMLReader &source, Manager &manager) |
Load configuration from given source . | |
void | parseStandardConfiguration (XMLReader &source, Manager &manager, const std::string &expected_msg="solver configuration element") |
Load standard configuration (geometry, mesh) tags from source . | |
bool | isInitialized () |
Check if solver is already initialized. | |
void | invalidate () |
This method should be and is called if something important was changed: calculation space, mesh, etc. | |
virtual std::string | getClassName () const =0 |
Get name of solver. | |
std::string | getId () const |
Get solver id. | |
std::string | getName () const |
virtual std::string | getClassDescription () const |
Get a description of this solver. | |
template<typename ArgT = double, typename ValT = double> | |
DataLog< ArgT, ValT > | dataLog (const std::string &chart_name, const std::string &axis_arg_name, const std::string &axis_val_name) |
template<typename ArgT = double, typename ValT = double> | |
DataLog< ArgT, ValT > | dataLog (const std::string &axis_arg_name, const std::string &axis_val_name) |
template<typename ... Args> | |
void | writelog (LogLevel level, std::string msg, Args &&... params) const |
Log a message for this solver. | |
Public Attributes | |
diffusion | |
gain | |
optical | |
threshold_voltage | |
threshold_current | |
modeno | |
ivb | |
vtol | |
maxiter | |
quick | |
optical_resolution | |
skip_thermal | |
get_lam | |
Public Attributes inherited from meta.shockley.thermoelectric.ThermoElectric | |
thermal | |
electrical | |
tfreq | |
Static Public Attributes | |
float | tfreq = 6.0 |
vmin = None | |
vmax = None | |
tuple | optical_resolution = (800, 600) |
int | vtol = 1e-5 |
bool | quick = False |
int | maxiter = 50 |
bool | skip_thermal = False |
Protected Member Functions | |
_parse_xpl (self, tag, manager) | |
_optargs (self) | |
_get_lam (self) | |
_quickstep (self, arg) | |
_get_in_junction (self, func, axis=None) | |
_plot_in_junction (self, func, axis, bounds, kwargs, label) | |
_get_info (self) | |
Protected Member Functions inherited from meta.shockley.thermoelectric.ThermoElectric | |
_read_attr (self, tag, attr, solver, type=None, pyattr=None) | |
_parse_fem_tag (self, tag, manager, solver) | |
_save_thermoelectric (self, h5file, group) | |
_plot_hbounds (self, solver) | |
_get_defines_info (self) | |
Protected Member Functions inherited from plask::Solver | |
virtual void | onInitialize () |
Initialize the solver. | |
virtual void | onInvalidate () |
This method is called by invalidate() to reset stored values. | |
Protected Attributes | |
_invalidate | |
_sn | |
_max_concentration | |
_max_gain | |
_quickscale | |
Protected Attributes inherited from plask::Solver | |
bool | initialized |
true only if solver is initialized | |
Static Protected Attributes | |
dict | _OPTICAL_ROOTS = {} |
_Diffusion = None | |
_Gain = None | |
_Optical = None | |
str | _optarg = 'lam' |
str | _lam0 = 'lam0' |
Static Protected Attributes inherited from meta.shockley.thermoelectric.ThermoElectric | |
_Thermal = None | |
_Electrical = None | |
Additional Inherited Members | |
Static Protected Member Functions inherited from meta.shockley.thermoelectric.ThermoElectric | |
_iter_levels (geometry, mesh, *required) | |
Definition at line 37 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.__init__ | ( | self, | |
name | |||
) |
Reimplemented from meta.shockley.thermoelectric.ThermoElectric.
Reimplemented in meta.shockley.threshold.ThresholdSearchCyl, meta.shockley.threshold.ThresholdSearchBesselCyl, meta.shockley.threshold.ThresholdSearch2D, and meta.shockley.threshold.ThresholdSearchFourier2D.
Definition at line 56 of file threshold.py.
|
protected |
Definition at line 255 of file threshold.py.
|
protected |
Reimplemented from meta.shockley.thermoelectric.ThermoElectric.
Reimplemented in meta.shockley.threshold.ThresholdSearchCyl, meta.shockley.threshold.ThresholdSearchBesselCyl, meta.shockley.threshold.ThresholdSearch2D, and meta.shockley.threshold.ThresholdSearchFourier2D.
Definition at line 527 of file threshold.py.
|
protected |
Definition at line 149 of file threshold.py.
|
protected |
Reimplemented in meta.shockley.threshold.ThresholdSearchCyl, and meta.shockley.threshold.ThresholdSearchBesselCyl.
Definition at line 146 of file threshold.py.
|
protected |
Reimplemented from meta.shockley.thermoelectric.ThermoElectric.
Reimplemented in meta.shockley.threshold.ThresholdSearchCyl, meta.shockley.threshold.ThresholdSearchBesselCyl, meta.shockley.threshold.ThresholdSearch2D, and meta.shockley.threshold.ThresholdSearchFourier2D.
Definition at line 85 of file threshold.py.
|
protected |
Definition at line 316 of file threshold.py.
|
protected |
Function performing one step of the quick threshold search. Args: arg (array): Array containing voltage on a specified boundary condition (V) and wavelength. Returns: array: Imaginary and real part of a specified mode
Definition at line 213 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.compute | ( | self, | |
save = True , |
|||
invalidate = False , |
|||
group = 'ThresholdSearch' , |
|||
stepsave = False |
|||
) |
Execute the algorithm. In the beginning the solvers are invalidated and next, the self- consistent loop of thermal, electrical, gain, and optical calculations are run within the root-finding algorithm until the mode is found with zero optical losses. Args: save (bool or str): If `True` the computed fields are saved to the HDF5 file named after the script name with the suffix denoting either the batch job id or the current time if no batch system is used. The filename can be overridden by setting this parameter as a string. invalidate (bool): If this flag is set, solvers are invalidated in the beginning of the computations. group (str): HDF5 group to save the data under. stepsave (bool): If `True` the computed fields are saved to the HDF5 file after each computations step. Returns: The voltage set to ``ivolt`` boundary condition for the threshold. The threshold current can be then obtained by calling: >>> solver.get_total_current() 123.0
Reimplemented from meta.shockley.thermoelectric.ThermoElectric.
Definition at line 432 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.compute_thermoelectric | ( | self | ) |
Perform thermo-electric calculations. This method may be called manually to perform thermo-electric calculations. Afterwards, one may investigate gain spectrum or verify settings of the optical solver.
Definition at line 158 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_gain_spectrum | ( | self, | |
lams, | |||
pos = 0. , |
|||
junction = 0 |
|||
) |
Get gain spectrum for specified junction. Args: lams (array of floats): Wavelengths for which the spectrum should be plotted. pos (float): Lateral position fo the point in which the spectrum is plotted. junction (int): Junction number to take gain from. Return: Data: Gain spectrum.
Definition at line 299 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_junction_concentrations | ( | self, | |
interpolation = 'linear' |
|||
) |
Get carriers concentration at the active regions. Args: interpolation (str): Interpolation used when retrieving current density. Return: dict: Dictionary of junction current density data. Keys are the junction number.
Definition at line 267 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_junction_gains | ( | self, | |
axis = None , |
|||
interpolation = 'linear' |
|||
) |
Get gain at the active regions. Args: axis (mesh or sequence): Points along horizontal axis to plot gain at. Defaults to the optical mesh. interpolation (str): Interpolation used when retrieving current density. Return: dict: Dictionary of junction current density data. Keys are the junction number.
Definition at line 281 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_lam | ( | self | ) |
Reimplemented in meta.shockley.threshold.ThresholdSearchCyl, and meta.shockley.threshold.ThresholdSearchBesselCyl.
Definition at line 155 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_optical_determinant | ( | self, | |
lam | |||
) |
Function computing determinant of the optical solver. Args: lam (float or array): Wavelength to compute the determinant for (nm). Returns: float or array: Optical determinant.
Reimplemented in meta.shockley.threshold.ThresholdSearch2D, and meta.shockley.threshold.ThresholdSearchFourier2D.
Definition at line 237 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_optical_field | ( | self, | |
resolution = None |
|||
) |
Get computed optical mode field at threshold. Args: resolution (tuple of ints): Number of points in horizontal and vertical directions.
Definition at line 599 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_optical_field_horizontal | ( | self, | |
resolution = None , |
|||
interpolation = 'linear' |
|||
) |
Get horizontal distribution of the computed optical mode field at threshold. Args: resolution (int): Number of points in horizontal direction. interpolation (str): Interpolation used when retrieving current density.
Definition at line 613 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_optical_field_vertical | ( | self, | |
pos = 0.01 , |
|||
offset = 0.5 , |
|||
resolution = None , |
|||
interpolation = 'linear' |
|||
) |
Plot vertical distribution of the computed optical mode field at threshold and refractive index profile. Args: resolution (int): Number of points in horizontal direction. pos (float): Horizontal position to get the field at. offset (float): Distance above and below geometry boundary to include into the plot. interpolation (str): Interpolation used when retrieving current density.
Definition at line 630 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.on_initialize | ( | self | ) |
Reimplemented from meta.shockley.thermoelectric.ThermoElectric.
Reimplemented in meta.shockley.threshold.ThresholdSearch2D, and meta.shockley.threshold.ThresholdSearchFourier2D.
Definition at line 131 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.on_invalidate | ( | self | ) |
Reimplemented from meta.shockley.thermoelectric.ThermoElectric.
Definition at line 139 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.plot_gain_spectrum | ( | self, | |
lams, | |||
pos = 0. , |
|||
junction = 0 , |
|||
comp = None , |
|||
** | kwargs | ||
) |
Plot gain spectrum for specified junction. Args: lams (array of floats): Wavelengths for which the spectrum should be plotted. pos (float): Lateral position fo the point in which the spectrum is plotted. junction (int): Junction number to take gain from. comp (int or str): Spectrum component to plot **kwargs: Keyword arguments passed to the plot function.
Definition at line 383 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.plot_junction_concentration | ( | self, | |
bounds = True , |
|||
interpolation = 'linear' , |
|||
label = None , |
|||
** | kwargs | ||
) |
Plot carriers concentration at the active region. Args: bounds (bool): If *True* then the geometry objects boundaries are plotted. interpolation (str): Interpolation used when retrieving current density. label (str or sequence): Label for each junction. It can be a sequence of consecutive labels for each junction, or a string in which case the same label is used for each junction. If omitted automatic label is generated. **kwargs: Keyword arguments passed to the plot function.
Definition at line 334 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.plot_junction_gain | ( | self, | |
axis = None , |
|||
bounds = True , |
|||
interpolation = 'linear' , |
|||
label = None , |
|||
** | kwargs | ||
) |
Plot gain at the active region. Args: axis (mesh or sequence): Points along horizontal axis to plot gain at. Defaults to the optical mesh. bounds (bool): If *True* then the geometry objects boundaries are plotted. interpolation (str): Interpolation used when retrieving current density. label (str or sequence): Label for each junction. It can be a sequence of consecutive labels for each junction, or a string in which case the same label is used for each junction. If omitted automatic label is generated. **kwargs: Keyword arguments passed to the plot function.
Definition at line 356 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.plot_optical_determinant | ( | self, | |
lams, | |||
** | kwargs | ||
) |
Function plotting determinant of the optical solver. Args: lams (array): Wavelengths to plot the determinant for (nm). **kwargs: Keyword arguments passed to the plot function.
Reimplemented in meta.shockley.threshold.ThresholdSearch2D, and meta.shockley.threshold.ThresholdSearchFourier2D.
Definition at line 417 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.plot_optical_field | ( | self, | |
resolution = None , |
|||
geometry_color = '0.75' , |
|||
geometry_alpha = 0.35 , |
|||
geometry_lw = 1.0 , |
|||
** | kwargs | ||
) |
Plot computed optical mode field at threshold. Args: resolution (tuple of ints): Number of points in horizontal and vertical directions. geometry_color (str or ``None``): Matplotlib color specification for the geometry. If ``None``, structure is not plotted. geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible). geometry_lw (float): Line width for geometry. **kwargs: Keyword arguments passed to the plot function.
Definition at line 653 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.plot_optical_field_horizontal | ( | self, | |
resolution = None , |
|||
bounds = True , |
|||
interpolation = 'linear' , |
|||
** | kwargs | ||
) |
Plot horizontal distribution of the computed optical mode field at threshold. Args: resolution (int): Number of points in horizontal direction. bounds (bool): If *True* then the geometry objects boundaries are plotted. interpolation (str): Interpolation used when retrieving current density. **kwargs: Keyword arguments passed to the plot function.
Definition at line 674 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.plot_optical_field_vertical | ( | self, | |
pos = 0.01 , |
|||
offset = 0.5 , |
|||
resolution = None , |
|||
interpolation = 'linear' , |
|||
** | kwargs | ||
) |
Plot vertical distribution of the computed optical mode field at threshold and refractive index profile. Args: resolution (int): Number of points in horizontal direction. pos (float): Horizontal position to get the field at. offset (float): Distance above and below geometry boundary to include into the plot. interpolation (str): Interpolation used when retrieving current density. **kwargs: Keyword arguments passed to the plot function.
Definition at line 703 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.reconnect | ( | self | ) |
Reconnect all internal solvers. This method should be called if some of the internal solvers were changed manually.
Reimplemented from meta.shockley.thermoelectric.ThermoElectric.
Definition at line 76 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.save | ( | self, | |
filename = None , |
|||
group = 'ThresholdSearch' , |
|||
optical_resolution = None |
|||
) |
Save the computation results to the HDF5 file. Args: filename (str): The file name to save to. If omitted, the file name is generated automatically based on the script name with suffix denoting either the batch job id or the current time if no batch system is used. group (str): HDF5 group to save the data under. optical_resolution (tuple of ints): Number of points in horizontal and vertical directions for optical field.
Reimplemented from meta.shockley.thermoelectric.ThermoElectric.
Definition at line 550 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.step | ( | self, | |
volt, | |||
save = False |
|||
) |
Function performing one step of the threshold search. Args: volt (float): Voltage on a specified boundary condition (V). save (bool): If `True` the computed fields are saved to the HDF5 file after each computations step. Returns: float: Loss of a specified mode
Definition at line 182 of file threshold.py.
|
staticprotected |
Definition at line 41 of file threshold.py.
|
staticprotected |
Definition at line 42 of file threshold.py.
|
protected |
Definition at line 64 of file threshold.py.
|
staticprotected |
Definition at line 45 of file threshold.py.
|
protected |
Definition at line 474 of file threshold.py.
|
protected |
Definition at line 475 of file threshold.py.
|
staticprotected |
Definition at line 44 of file threshold.py.
|
staticprotected |
Definition at line 43 of file threshold.py.
|
staticprotected |
Definition at line 39 of file threshold.py.
|
protected |
Definition at line 486 of file threshold.py.
|
protected |
Definition at line 66 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.diffusion |
Definition at line 58 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.gain |
Definition at line 59 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.get_lam |
Reimplemented in meta.shockley.threshold.ThresholdSearchCyl, and meta.shockley.threshold.ThresholdSearchBesselCyl.
Definition at line 150 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.ivb |
Definition at line 89 of file threshold.py.
|
static |
Definition at line 53 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.maxiter |
Definition at line 91 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.modeno |
Definition at line 65 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.optical |
Definition at line 60 of file threshold.py.
|
static |
Definition at line 50 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.optical_resolution |
Definition at line 116 of file threshold.py.
|
static |
Definition at line 52 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.quick |
Definition at line 92 of file threshold.py.
|
static |
Definition at line 54 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.skip_thermal |
Definition at line 127 of file threshold.py.
|
static |
Definition at line 47 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.threshold_current |
Definition at line 63 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.threshold_voltage |
Definition at line 62 of file threshold.py.
|
static |
Definition at line 49 of file threshold.py.
|
static |
Definition at line 48 of file threshold.py.
|
static |
Definition at line 51 of file threshold.py.
meta.shockley.threshold.ThresholdSearch.vtol |
Definition at line 90 of file threshold.py.