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

Public Member Functions

 __init__ (self, name='')
 
 on_initialize (self)
 
 get_nng (self)
 
 get_optical_determinant (self, neff)
 
 plot_optical_determinant (self, neffs, **kwargs)
 
 get_vert_optical_determinant (self, vneff)
 
 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("EffectiveIndex2D()")
 
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 = 'wavelength'
 
 _Thermal = thermal.static.Static2D
 
 _Electrical = electrical.shockley.Shockley2D
 
 _Diffusion = electrical.diffusion.Diffusion2D
 
 _Gain = gain.freecarrier.FreeCarrier2D
 
dict _OPTICAL_ROOTS = {'optical-root': 'root', 'optical-stripe-root': 'stripe_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)
 
 outLoss = property(lambda self: self.optical.outLoss, doc=_doc.outLoss)
 
 outNeff = property(lambda self: self.optical.outNeff, doc=_doc.outNeff)
 
 outRefractiveIndex = property(lambda self: self.optical.outRefractiveIndex, doc=_doc.outRefractiveIndex)
 
 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.

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 1223 of file threshold.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1344 of file threshold.py.

Member Function Documentation

◆ _get_info()

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

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1468 of file threshold.py.

◆ _parse_xpl()

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

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1386 of file threshold.py.

◆ get_nng()

meta.shockley.threshold.ThresholdSearch2D.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 = ThresholdSearch2D()
     >>> solver.get_nng = lambda: 3.5
     >>> solver.compute()

Definition at line 1355 of file threshold.py.

◆ get_optical_determinant()

meta.shockley.threshold.ThresholdSearch2D.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 1400 of file threshold.py.

◆ get_vert_optical_determinant()

meta.shockley.threshold.ThresholdSearch2D.get_vert_optical_determinant (   self,
  vneff 
)
Function computing ‘vertical determinant’ of the optical solver.

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

Returns:
    float or array: Optical determinant.

Definition at line 1433 of file threshold.py.

◆ on_initialize()

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

Reimplemented from meta.shockley.threshold.ThresholdSearch.

Definition at line 1349 of file threshold.py.

◆ plot_optical_determinant()

meta.shockley.threshold.ThresholdSearch2D.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 1418 of file threshold.py.

◆ plot_vert_optical_determinant()

meta.shockley.threshold.ThresholdSearch2D.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 1452 of file threshold.py.

Member Data Documentation

◆ _Diffusion

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

Definition at line 1248 of file threshold.py.

◆ _Electrical

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

Definition at line 1247 of file threshold.py.

◆ _Gain

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

Definition at line 1249 of file threshold.py.

◆ _lam0

str meta.shockley.threshold.ThresholdSearch2D._lam0 = 'wavelength'
staticprotected

Definition at line 1244 of file threshold.py.

◆ _maxneff

meta.shockley.threshold.ThresholdSearch2D._maxneff
protected

Definition at line 1352 of file threshold.py.

◆ _optarg

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

Definition at line 1243 of file threshold.py.

◆ _Optical

meta.shockley.threshold.ThresholdSearch2D._Optical
protected

Definition at line 1346 of file threshold.py.

◆ _OPTICAL_ROOTS

dict meta.shockley.threshold.ThresholdSearch2D._OPTICAL_ROOTS = {'optical-root': 'root', 'optical-stripe-root': 'stripe_root'}
staticprotected

Definition at line 1251 of file threshold.py.

◆ _Thermal

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

Definition at line 1246 of file threshold.py.

◆ diffusion

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

Definition at line 1278 of file threshold.py.

◆ dneff [1/2]

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

Definition at line 1318 of file threshold.py.

◆ dneff [2/2]

meta.shockley.threshold.ThresholdSearch2D.dneff

Definition at line 1393 of file threshold.py.

◆ electrical

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

Definition at line 1275 of file threshold.py.

◆ gain

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

Definition at line 1281 of file threshold.py.

◆ maxiter

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

Definition at line 1312 of file threshold.py.

◆ mn [1/2]

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

Definition at line 1325 of file threshold.py.

◆ mn [2/2]

meta.shockley.threshold.ThresholdSearch2D.mn

Definition at line 1394 of file threshold.py.

◆ optical

meta.shockley.threshold.ThresholdSearch2D.optical = attribute("EffectiveIndex2D()")
static

Definition at line 1284 of file threshold.py.

◆ optical_resolution

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

Definition at line 1330 of file threshold.py.

◆ skip_thermal

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

Definition at line 1336 of file threshold.py.

◆ tfreq

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

Definition at line 1287 of file threshold.py.

◆ thermal

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

Definition at line 1272 of file threshold.py.

◆ vmax

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

Definition at line 1302 of file threshold.py.

◆ vmin

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

Definition at line 1295 of file threshold.py.

◆ vtol

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

Definition at line 1309 of file threshold.py.

◆ wavelength

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

Definition at line 1315 of file threshold.py.

Property Documentation

◆ outCarriersConcentration

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

Definition at line 1263 of file threshold.py.

◆ outConductivity

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

Definition at line 1262 of file threshold.py.

◆ outCurrentDensity

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

Definition at line 1259 of file threshold.py.

◆ outGain

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

Definition at line 1265 of file threshold.py.

◆ outHeat

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

Definition at line 1261 of file threshold.py.

◆ outHeatFlux

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

Definition at line 1254 of file threshold.py.

◆ outLightE

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

Definition at line 1270 of file threshold.py.

◆ outLightMagnitude

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

Definition at line 1266 of file threshold.py.

◆ outLoss

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

Definition at line 1267 of file threshold.py.

◆ outNeff

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

Definition at line 1268 of file threshold.py.

◆ outRefractiveIndex

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

Definition at line 1269 of file threshold.py.

◆ outTemperature

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

Definition at line 1253 of file threshold.py.

◆ outThermalConductivity

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

Definition at line 1256 of file threshold.py.

◆ outVoltage

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

Definition at line 1258 of file threshold.py.


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