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

Public Member Functions

 __init__ (self, name)
 
 reconnect (self)
 
 load_xpl (self, xpl, manager)
 
 on_initialize (self)
 
 on_invalidate (self)
 
 compute (self, save=True, invalidate=True, group='ThermoElectric')
 
 get_total_current (self, nact=0)
 
 save (self, filename=None, group='ThermoElectric')
 
 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

 thermal
 
 electrical
 
 tfreq
 

Protected Member Functions

 _read_attr (self, tag, attr, solver, type=None, pyattr=None)
 
 _parse_fem_tag (self, tag, manager, solver)
 
 _parse_xpl (self, tag, manager)
 
 _save_thermoelectric (self, h5file, group)
 
 _plot_hbounds (self, solver)
 
 _get_defines_info (self)
 
 _get_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.
 

Static Protected Member Functions

 _iter_levels (geometry, mesh, *required)
 

Static Protected Attributes

 _Thermal = None
 
 _Electrical = None
 

Additional Inherited Members

- Protected Attributes inherited from plask::Solver
bool initialized
 true only if solver is initialized
 

Detailed Description

Definition at line 69 of file thermoelectric.py.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ _get_defines_info()

meta.shockley.thermoelectric.ThermoElectric._get_defines_info (   self)
protected

Definition at line 491 of file thermoelectric.py.

◆ _get_info()

◆ _iter_levels()

meta.shockley.thermoelectric.ThermoElectric._iter_levels (   geometry,
  mesh,
required 
)
staticprotected

Definition at line 228 of file thermoelectric.py.

◆ _parse_fem_tag()

meta.shockley.thermoelectric.ThermoElectric._parse_fem_tag (   self,
  tag,
  manager,
  solver 
)
protected

Definition at line 112 of file thermoelectric.py.

◆ _parse_xpl()

meta.shockley.thermoelectric.ThermoElectric._parse_xpl (   self,
  tag,
  manager 
)
protected

◆ _plot_hbounds()

meta.shockley.thermoelectric.ThermoElectric._plot_hbounds (   self,
  solver 
)
protected

Definition at line 439 of file thermoelectric.py.

◆ _read_attr()

meta.shockley.thermoelectric.ThermoElectric._read_attr (   self,
  tag,
  attr,
  solver,
  type = None,
  pyattr = None 
)
protected

Definition at line 94 of file thermoelectric.py.

◆ _save_thermoelectric()

meta.shockley.thermoelectric.ThermoElectric._save_thermoelectric (   self,
  h5file,
  group 
)
protected

Definition at line 259 of file thermoelectric.py.

◆ compute()

meta.shockley.thermoelectric.ThermoElectric.compute (   self,
  save = True,
  invalidate = True,
  group = 'ThermoElectric' 
)
Run calculations.

In the beginning the solvers are invalidated and next, the thermo-
electric algorithm is executed until both solvers converge to the
value specified in their configuration in the `maxerr` property.

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.

Reimplemented in meta.shockley.threshold.ThresholdSearch.

Definition at line 181 of file thermoelectric.py.

◆ get_junction_currents()

meta.shockley.thermoelectric.ThermoElectric.get_junction_currents (   self,
  refine = 16,
  interpolation = 'linear' 
)
Get current densities at the active regions.

Args:
    refine (int): Number of points in the plot between each two points
                  in the computational 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 324 of file thermoelectric.py.

◆ get_temperature()

meta.shockley.thermoelectric.ThermoElectric.get_temperature (   self)
Get temperature on a thermal mesh.

Definition at line 292 of file thermoelectric.py.

◆ get_total_current()

meta.shockley.thermoelectric.ThermoElectric.get_total_current (   self,
  nact = 0 
)
Get total current flowing through active region (mA)

Definition at line 221 of file thermoelectric.py.

◆ get_vertical_voltage()

meta.shockley.thermoelectric.ThermoElectric.get_vertical_voltage (   self,
  at = 0 
)
Get computed voltage along the vertical axis.

Args:
    at (float): Horizontal position of the axis at which the voltage
                is plotted.

Definition at line 304 of file thermoelectric.py.

◆ get_voltage()

meta.shockley.thermoelectric.ThermoElectric.get_voltage (   self)
Get voltage on an electrical mesh.

Definition at line 298 of file thermoelectric.py.

◆ load_xpl()

meta.shockley.thermoelectric.ThermoElectric.load_xpl (   self,
  xpl,
  manager 
)

Definition at line 108 of file thermoelectric.py.

◆ on_initialize()

meta.shockley.thermoelectric.ThermoElectric.on_initialize (   self)

◆ on_invalidate()

meta.shockley.thermoelectric.ThermoElectric.on_invalidate (   self)

Reimplemented in meta.shockley.threshold.ThresholdSearch.

Definition at line 177 of file thermoelectric.py.

◆ plot_junction_current()

meta.shockley.thermoelectric.ThermoElectric.plot_junction_current (   self,
  refine = 16,
  bounds = True,
  interpolation = 'linear',
  label = None,
**  kwargs 
)
Plot current density at the active region.

Args:
    refine (int): Number of points in the plot between each two points
                  in the computational 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 446 of file thermoelectric.py.

◆ plot_temperature()

meta.shockley.thermoelectric.ThermoElectric.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 computed temperature to the current axes.

Args:
    geometry_color (str or ``None``): Matplotlib color specification for
        the geometry. If ``None``, structure is not plotted.

    mesh_color (str or ``None``): Matplotlib color specification for
        the mesh. If ``None``, the mesh is not plotted.

    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).

    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).

    geometry_lw (float): Line width for geometry.

    mesh_lw (float): Line width for mesh.

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

See also:
    :func:`plask.plot_field` : Plot any field obtained from receivers

Definition at line 353 of file thermoelectric.py.

◆ plot_vertical_voltage()

meta.shockley.thermoelectric.ThermoElectric.plot_vertical_voltage (   self,
  at = 0.,
**  kwargs 
)
Plot computed voltage along the vertical axis.

Args:
    at (float): Horizontal position of the axis at which the voltage
                is plotted.

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

Definition at line 423 of file thermoelectric.py.

◆ plot_voltage()

meta.shockley.thermoelectric.ThermoElectric.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 computed voltage to the current axes.

Args:
    geometry_color (str or ``None``): Matplotlib color specification
        for the geometry. If ``None``, structure is not plotted.

    mesh_color (str or ``None``): Matplotlib color specification for
        the mesh. If ``None``, the mesh is not plotted.

    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).

    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).

    geometry_lw (float): Line width for geometry.

    mesh_lw (float): Line width for mesh.

    **kwargs: Keyword arguments passed to the :func:`plask.plot_field`.

See also:
    :func:`plask.plot_field` : Plot any field obtained from receivers

Definition at line 388 of file thermoelectric.py.

◆ reconnect()

meta.shockley.thermoelectric.ThermoElectric.reconnect (   self)
Reconnect all internal solvers.

This method should be called if some of the internal solvers were changed manually.

Reimplemented in meta.shockley.threshold.ThresholdSearch.

Definition at line 86 of file thermoelectric.py.

◆ save()

meta.shockley.thermoelectric.ThermoElectric.save (   self,
  filename = None,
  group = 'ThermoElectric' 
)
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.

Reimplemented in meta.shockley.threshold.ThresholdSearch.

Definition at line 273 of file thermoelectric.py.

Member Data Documentation

◆ _Electrical

meta.shockley.thermoelectric.ThermoElectric._Electrical = None
staticprotected

Definition at line 72 of file thermoelectric.py.

◆ _Thermal

meta.shockley.thermoelectric.ThermoElectric._Thermal = None
staticprotected

Definition at line 71 of file thermoelectric.py.

◆ electrical

meta.shockley.thermoelectric.ThermoElectric.electrical

Definition at line 77 of file thermoelectric.py.

◆ tfreq

meta.shockley.thermoelectric.ThermoElectric.tfreq

Definition at line 80 of file thermoelectric.py.

◆ thermal

meta.shockley.thermoelectric.ThermoElectric.thermal

Definition at line 76 of file thermoelectric.py.


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