PLaSK library
Loading...
Searching...
No Matches
meta.shockley.threshold.ThresholdSearchFourier2D Class Reference
Inheritance diagram for meta.shockley.threshold.ThresholdSearchFourier2D:
[legend]
Collaboration diagram for meta.shockley.threshold.ThresholdSearchFourier2D:
[legend]

Public Member Functions

 __init__ (self, name='')
 
 on_initialize (self)
 
 get_nng (self)
 
 get_optical_determinant (self, neff)
 
 plot_optical_determinant (self, neffs, **kwargs)
 
 plot_vert_optical_determinant (self, vneffs, **kwargs)
 
- Public Member Functions inherited from meta.shockley.threshold.ThresholdSearch
 reconnect (self)
 
 on_invalidate (self)
 
 get_lam (self)
 
 compute_thermoelectric (self)
 
 step (self, volt, save=False)
 
 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)
 
 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, ValTdataLog (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, ValTdataLog (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

 dneff
 
 mn
 
- Public Attributes inherited from meta.shockley.threshold.ThresholdSearch
 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

 thermal = attribute(_Thermal.__name__+"()")
 
 electrical = attribute(_Electrical.__name__+"()")
 
 diffusion = attribute(_Diffusion.__name__+"()")
 
 gain = attribute(_Gain.__name__+"()")
 
 optical = attribute("Fourier2D()")
 
float tfreq = 6.0
 
 vmin = None
 
 vmax = None
 
int vtol = 1e-5
 
int maxiter = 50
 
 wavelength = None
 
float dneff = 0.02
 
int mn = 1
 
tuple optical_resolution = (800, 600)
 
bool skip_thermal = False
 
- Static Public Attributes inherited from meta.shockley.threshold.ThresholdSearch
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)
 
 _get_info (self)
 
- Protected Member Functions inherited from meta.shockley.threshold.ThresholdSearch
 _optargs (self)
 
 _get_lam (self)
 
 _quickstep (self, arg)
 
 _get_in_junction (self, func, axis=None)
 
 _plot_in_junction (self, func, axis, bounds, kwargs, label)
 
- 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

 _Optical
 
 _maxneff
 
- Protected Attributes inherited from meta.shockley.threshold.ThresholdSearch
 _invalidate
 
 _sn
 
 _max_concentration
 
 _max_gain
 
 _quickscale
 
- Protected Attributes inherited from plask::Solver
bool initialized
 true only if solver is initialized
 

Static Protected Attributes

str _optarg = 'neff'
 
str _lam0 = 'lam'
 
 _Thermal = thermal.static.Static2D
 
 _Electrical = electrical.shockley.Shockley2D
 
 _Diffusion = electrical.diffusion.Diffusion2D
 
 _Gain = gain.freecarrier.FreeCarrier2D
 
dict _OPTICAL_ROOTS = {'optical-root': 'root'}
 
- Static Protected Attributes inherited from meta.shockley.threshold.ThresholdSearch
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
 

Properties

 outTemperature = property(lambda self: self.thermal.outTemperature, doc=_Thermal.outTemperature.__doc__)
 
 outHeatFlux = property(lambda self: self.thermal.outHeatFlux, doc=_Thermal.outHeatFlux.__doc__)
 
 outThermalConductivity
 
 outVoltage = property(lambda self: self.electrical.outVoltage, doc=_Electrical.outVoltage.__doc__)
 
 outCurrentDensity
 
 outHeat = property(lambda self: self.electrical.outHeat, doc=_Electrical.outHeat.__doc__)
 
 outConductivity = property(lambda self: self.electrical.outConductivity, doc=_Electrical.outConductivity.__doc__)
 
 outCarriersConcentration
 
 outGain = property(lambda self: self.gain.outGain, doc=_Gain.outGain.__doc__)
 
 outLightMagnitude = property(lambda self: self.optical.outLightMagnitude, doc=_doc.outLightMagnitude)
 
 outNeff = property(lambda self: self.optical.outNeff, doc=_doc.outNeff)
 
 outEpsilon = property(lambda self: self.optical.outEpsilon, doc=_doc.outEpsilon)
 
 outLightE = property(lambda self: self.optical.outLightE, doc=_doc.outLightE)
 

Additional Inherited Members

- Static Protected Member Functions inherited from meta.shockley.thermoelectric.ThermoElectric
 _iter_levels (geometry, mesh, *required)
 

Detailed Description

Solver for threshold search of semiconductor laser.

This solver performs thermo-electrical computations followed by
determination ot threshold current and optical analysis in order to
determine the threshold of a semiconductor laser. The search is
performed by ``scipy`` root finding algorithm in order to determine
the voltage and electric current ensuring no optical loss in the
laser cavity.

This solver uses vector optical solver :class:`~plask.optical.modal.Fourier2D`.

The computations can be executed using `compute` method, after which
the results may be save to the HDF5 file with `save` or presented visually
using ``plot_...`` methods. If ``save`` parameter of the :meth:`compute` method
is *True* the fields are saved automatically after the computations.
The file name is based on the name of the executed script with suffix denoting
either the launch time or the identifier of a batch job if a batch system
(like SLURM, OpenPBS, or SGE) is used.

Definition at line 1474 of file threshold.py.

Constructor & Destructor Documentation

◆ __init__()

meta.shockley.threshold.ThresholdSearchFourier2D.__init__ (   self,
  name = '' 
)

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1596 of file threshold.py.

Member Function Documentation

◆ _get_info()

meta.shockley.threshold.ThresholdSearchFourier2D._get_info (   self)
protected

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1723 of file threshold.py.

◆ _parse_xpl()

meta.shockley.threshold.ThresholdSearchFourier2D._parse_xpl (   self,
  tag,
  manager 
)
protected

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1638 of file threshold.py.

◆ get_nng()

meta.shockley.threshold.ThresholdSearchFourier2D.get_nng (   self)
Get approximate effective index for optical computations.

This method returns approximate wavelength for optical computations.
By default if browses the wavelength range starting from :attr:`maxneff`,
decreasing it by :attr:`dneff` until lateral mode :attr:`mn` is found.

You can override this method to use custom mode approximation.

Example:
     >>> solver = ThresholdSearchFourier2D()
     >>> solver.get_nng = lambda: 3.5
     >>> solver.compute()

Definition at line 1607 of file threshold.py.

◆ get_optical_determinant()

meta.shockley.threshold.ThresholdSearchFourier2D.get_optical_determinant (   self,
  neff 
)
Function computing determinant of the optical solver.

Args:
     neff (float or array): Effective index to compute the determinant for.

Returns:
    float or array: Optical determinant.

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1674 of file threshold.py.

◆ on_initialize()

meta.shockley.threshold.ThresholdSearchFourier2D.on_initialize (   self)

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1601 of file threshold.py.

◆ plot_optical_determinant()

meta.shockley.threshold.ThresholdSearchFourier2D.plot_optical_determinant (   self,
  neffs,
**  kwargs 
)
Function plotting determinant of the optical solver.

Args:
    neffs (array): Array of effective indices to plot the determinant for.

    **kwargs: Keyword arguments passed to the plot function.

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1692 of file threshold.py.

◆ plot_vert_optical_determinant()

meta.shockley.threshold.ThresholdSearchFourier2D.plot_vert_optical_determinant (   self,
  vneffs,
**  kwargs 
)
Function plotting ‘vertical determinant’ of the optical solver.

Args:
    vneffs (array): Array of effective indices to plot the vertical
                    determinant for.

    **kwargs: Keyword arguments passed to the plot function.

Definition at line 1707 of file threshold.py.

Member Data Documentation

◆ _Diffusion

meta.shockley.threshold.ThresholdSearchFourier2D._Diffusion = electrical.diffusion.Diffusion2D
staticprotected

Definition at line 1501 of file threshold.py.

◆ _Electrical

meta.shockley.threshold.ThresholdSearchFourier2D._Electrical = electrical.shockley.Shockley2D
staticprotected

Definition at line 1500 of file threshold.py.

◆ _Gain

meta.shockley.threshold.ThresholdSearchFourier2D._Gain = gain.freecarrier.FreeCarrier2D
staticprotected

Definition at line 1502 of file threshold.py.

◆ _lam0

str meta.shockley.threshold.ThresholdSearchFourier2D._lam0 = 'lam'
staticprotected

Definition at line 1497 of file threshold.py.

◆ _maxneff

meta.shockley.threshold.ThresholdSearchFourier2D._maxneff
protected

Definition at line 1604 of file threshold.py.

◆ _optarg

str meta.shockley.threshold.ThresholdSearchFourier2D._optarg = 'neff'
staticprotected

Definition at line 1496 of file threshold.py.

◆ _Optical

meta.shockley.threshold.ThresholdSearchFourier2D._Optical
protected

Definition at line 1598 of file threshold.py.

◆ _OPTICAL_ROOTS

dict meta.shockley.threshold.ThresholdSearchFourier2D._OPTICAL_ROOTS = {'optical-root': 'root'}
staticprotected

Definition at line 1504 of file threshold.py.

◆ _Thermal

meta.shockley.threshold.ThresholdSearchFourier2D._Thermal = thermal.static.Static2D
staticprotected

Definition at line 1499 of file threshold.py.

◆ diffusion

meta.shockley.threshold.ThresholdSearchFourier2D.diffusion = attribute(_Diffusion.__name__+"()")
static

Definition at line 1530 of file threshold.py.

◆ dneff [1/2]

float meta.shockley.threshold.ThresholdSearchFourier2D.dneff = 0.02
static

Definition at line 1570 of file threshold.py.

◆ dneff [2/2]

meta.shockley.threshold.ThresholdSearchFourier2D.dneff

Definition at line 1647 of file threshold.py.

◆ electrical

meta.shockley.threshold.ThresholdSearchFourier2D.electrical = attribute(_Electrical.__name__+"()")
static

Definition at line 1527 of file threshold.py.

◆ gain

meta.shockley.threshold.ThresholdSearchFourier2D.gain = attribute(_Gain.__name__+"()")
static

Definition at line 1533 of file threshold.py.

◆ maxiter

int meta.shockley.threshold.ThresholdSearchFourier2D.maxiter = 50
static

Definition at line 1564 of file threshold.py.

◆ mn [1/2]

int meta.shockley.threshold.ThresholdSearchFourier2D.mn = 1
static

Definition at line 1577 of file threshold.py.

◆ mn [2/2]

meta.shockley.threshold.ThresholdSearchFourier2D.mn

Definition at line 1648 of file threshold.py.

◆ optical

meta.shockley.threshold.ThresholdSearchFourier2D.optical = attribute("Fourier2D()")
static

Definition at line 1536 of file threshold.py.

◆ optical_resolution

tuple meta.shockley.threshold.ThresholdSearchFourier2D.optical_resolution = (800, 600)
static

Definition at line 1582 of file threshold.py.

◆ skip_thermal

bool meta.shockley.threshold.ThresholdSearchFourier2D.skip_thermal = False
static

Definition at line 1588 of file threshold.py.

◆ tfreq

float meta.shockley.threshold.ThresholdSearchFourier2D.tfreq = 6.0
static

Definition at line 1539 of file threshold.py.

◆ thermal

meta.shockley.threshold.ThresholdSearchFourier2D.thermal = attribute(_Thermal.__name__+"()")
static

Definition at line 1524 of file threshold.py.

◆ vmax

meta.shockley.threshold.ThresholdSearchFourier2D.vmax = None
static

Definition at line 1554 of file threshold.py.

◆ vmin

meta.shockley.threshold.ThresholdSearchFourier2D.vmin = None
static

Definition at line 1547 of file threshold.py.

◆ vtol

int meta.shockley.threshold.ThresholdSearchFourier2D.vtol = 1e-5
static

Definition at line 1561 of file threshold.py.

◆ wavelength

meta.shockley.threshold.ThresholdSearchFourier2D.wavelength = None
static

Definition at line 1567 of file threshold.py.

Property Documentation

◆ outCarriersConcentration

meta.shockley.threshold.ThresholdSearchFourier2D.outCarriersConcentration
static
Initial value:
= property(lambda self: self.diffusion.outCarriersConcentration,
doc=_Diffusion.outCarriersConcentration.__doc__)

Definition at line 1516 of file threshold.py.

◆ outConductivity

meta.shockley.threshold.ThresholdSearchFourier2D.outConductivity = property(lambda self: self.electrical.outConductivity, doc=_Electrical.outConductivity.__doc__)
static

Definition at line 1515 of file threshold.py.

◆ outCurrentDensity

meta.shockley.threshold.ThresholdSearchFourier2D.outCurrentDensity
static
Initial value:
= property(lambda self: self.electrical.outCurrentDensity,
doc=_Electrical.outCurrentDensity.__doc__)

Definition at line 1512 of file threshold.py.

◆ outEpsilon

meta.shockley.threshold.ThresholdSearchFourier2D.outEpsilon = property(lambda self: self.optical.outEpsilon, doc=_doc.outEpsilon)
static

Definition at line 1521 of file threshold.py.

◆ outGain

meta.shockley.threshold.ThresholdSearchFourier2D.outGain = property(lambda self: self.gain.outGain, doc=_Gain.outGain.__doc__)
static

Definition at line 1518 of file threshold.py.

◆ outHeat

meta.shockley.threshold.ThresholdSearchFourier2D.outHeat = property(lambda self: self.electrical.outHeat, doc=_Electrical.outHeat.__doc__)
static

Definition at line 1514 of file threshold.py.

◆ outHeatFlux

meta.shockley.threshold.ThresholdSearchFourier2D.outHeatFlux = property(lambda self: self.thermal.outHeatFlux, doc=_Thermal.outHeatFlux.__doc__)
static

Definition at line 1507 of file threshold.py.

◆ outLightE

meta.shockley.threshold.ThresholdSearchFourier2D.outLightE = property(lambda self: self.optical.outLightE, doc=_doc.outLightE)
static

Definition at line 1522 of file threshold.py.

◆ outLightMagnitude

meta.shockley.threshold.ThresholdSearchFourier2D.outLightMagnitude = property(lambda self: self.optical.outLightMagnitude, doc=_doc.outLightMagnitude)
static

Definition at line 1519 of file threshold.py.

◆ outNeff

meta.shockley.threshold.ThresholdSearchFourier2D.outNeff = property(lambda self: self.optical.outNeff, doc=_doc.outNeff)
static

Definition at line 1520 of file threshold.py.

◆ outTemperature

meta.shockley.threshold.ThresholdSearchFourier2D.outTemperature = property(lambda self: self.thermal.outTemperature, doc=_Thermal.outTemperature.__doc__)
static

Definition at line 1506 of file threshold.py.

◆ outThermalConductivity

meta.shockley.threshold.ThresholdSearchFourier2D.outThermalConductivity
static
Initial value:
= property(lambda self: self.thermal.outThermalConductivity,
doc=_Thermal.outThermalConductivity.__doc__)

Definition at line 1509 of file threshold.py.

◆ outVoltage

meta.shockley.threshold.ThresholdSearchFourier2D.outVoltage = property(lambda self: self.electrical.outVoltage, doc=_Electrical.outVoltage.__doc__)
static

Definition at line 1511 of file threshold.py.


The documentation for this class was generated from the following file: