plask.flow
¶
Data flow classes for standard properties.
This module contains providers, receivers, and filters for standard properties. These classes are present in binary solvers, but you may also use them in your custom Python solvers.
Providers and Receivers
Existing providers can be connected to receivers by using a simple assignment operator:
>>> first_solver.inTemperature = second_solver.outTemperature
You can manually retrieve data from any provider or a connected receiver by calling it like a function:
>>> second_solver.outTemperature(mymesh)
<plask.Data at 0x584c140>
>>> first_solver.inTemperature(mymesh, 'spline')
<plask.Data at 0x584c140>
Providers and receivers of most quantities give spatial distributions of the corresponding fields and, thus, require the target mesh as its argument. In addition you may specify the interpolation method as in the example above. If the interpolation method is omitted, its default value, depending is assumed by the solver automatically.
Some properties (e.g. the light intensity) require the result number given as the first argument (this is e.g. the consecutive mode number). Others take some optional arguments that are specified at the end (e.g. the gain requires to be given the wavelength at which the gain is computed.
In PLaSK you can create your custom Python solvers. They may contain the default providers and receivers defined here. Receivers are simple objects that can be attached to providers later and read as shown above. On the contrary, providers require you to create a callable that returns the data to be provided when requested.
Example
To create the solver that gets temperature from another source and increases it by 60 K, use the following class:
>>> class Hotter:
... def __init__(self):
... self.inTemperature = flow.TemperatureReceiver2D()
... self.outTemperature = flow.TemperatureProvider2D(
... lambda mesh, meth: self.get_data(mesh, meth))
... def get_data(self, mesh, method):
... temp = self.inTemperature(mesh, method)
... return temp.array + 60.
Filters
Filters are solverlike classes that translate the fields computed in one geometry to another one. This geometry can have either the same or different dimension.
All filter classes are used the same way. They are constructed with a single
argument, which is a target geometry. The type of this geometry must match
the suffix of the filter (2D
for twodimensional Cartesian geometry, Cyl
for axisymmetric cylindrical geometry, and 3D
for threedimensional one.
An example temperature filter for target 2D geometry can be constructed as
follows:
>>> temp_filter = flow.TemperatureFilter2D(mygeometry2d)
Having an existing filter, you may attach a source provider to it, using bracket
indexing. The index is a geometry object either existing in the target geometry
or containing it (e.g. a geometry.Extrusion
object that is the root of
the my_geometry_2d
geometry). The indexed element is a proper data receiver
that can be used for connecting the source data.
>>> temp_filter[some_object_in_mygeometry2d]
<plask.ReceiverForTemperature2D at 0x43a5210>
>>> temp_filter[mygeometry2d.extrusion]
<plask.ReceiverForTemperature3D at 0x44751a0>
>>> temp_filter[mygeometry2d.extrusion] = thermal_solver_3d.outTemperature
After connecting the source, the translated data can be obtained using the filter
member out
, which is a provider that can be connected to other solvers.
>>> temp_filter.out
<plask.ProviderForTemperature2D at 0x43a5fa0>
>>> other_solver_in_2d.inTemperature = temp_filter.out
After the connection the filter does its job automatically.
See also
Definition of filters in the XPL file: filter
tag.
Example using filters: sectutorialthresholdofarray.
Classes¶
Data filter for conduction and valence band edges into Cartesian2D geometry. 

Data filter for conduction and valence band edges into Cartesian3D geometry. 

Data filter for conduction and valence band edges into Cylindrical geometry. 

Provider of the conduction and valence band edges in Cartesian2D geometry (eV). 

Provider of the conduction and valence band edges in Cartesian3D geometry (eV). 

Provider of the conduction and valence band edges in Cylindrical geometry (eV). 

Receiver of the conduction and valence band edges in Cartesian2D geometry (eV). 

Receiver of the conduction and valence band edges in Cartesian3D geometry (eV). 

Receiver of the conduction and valence band edges in Cylindrical geometry (eV). 

Data filter for carriers concentration into Cartesian2D geometry. 

Data filter for carriers concentration into Cartesian3D geometry. 

Data filter for carriers concentration into Cylindrical geometry. 

Provider of the carriers concentration in Cartesian2D geometry (1/cm³). 

Provider of the carriers concentration in Cartesian3D geometry (1/cm³). 

Provider of the carriers concentration in Cylindrical geometry (1/cm³). 

Receiver of the carriers concentration in Cartesian2D geometry (1/cm³). 

Receiver of the carriers concentration in Cartesian3D geometry (1/cm³). 

Receiver of the carriers concentration in Cylindrical geometry (1/cm³). 

Data filter for electrical conductivity into Cartesian2D geometry. 

Data filter for electrical conductivity into Cartesian3D geometry. 

Data filter for electrical conductivity into Cylindrical geometry. 

Provider of the electrical conductivity in Cartesian2D geometry (S/m). 

Provider of the electrical conductivity in Cartesian3D geometry (S/m). 

Provider of the electrical conductivity in Cylindrical geometry (S/m). 

Receiver of the electrical conductivity in Cartesian2D geometry (S/m). 

Receiver of the electrical conductivity in Cartesian3D geometry (S/m). 

Receiver of the electrical conductivity in Cylindrical geometry (S/m). 

Data filter for current density into Cartesian2D geometry. 

Data filter for current density into Cartesian3D geometry. 

Data filter for current density into Cylindrical geometry. 

Provider of the current density in Cartesian2D geometry (kA/cm²). 

Provider of the current density in Cartesian3D geometry (kA/cm²). 

Provider of the current density in Cylindrical geometry (kA/cm²). 

Receiver of the current density in Cartesian2D geometry (kA/cm²). 

Receiver of the current density in Cartesian3D geometry (kA/cm²). 

Receiver of the current density in Cylindrical geometry (kA/cm²). 

Provider of the energy levels for electrons and holes in Cartesian2D geometry (eV). 

Provider of the energy levels for electrons and holes in Cartesian3D geometry (eV). 

Provider of the energy levels for electrons and holes in Cylindrical geometry (eV). 

Receiver of the energy levels for electrons and holes in Cartesian2D geometry (eV). 

Receiver of the energy levels for electrons and holes in Cartesian3D geometry (eV). 

Receiver of the energy levels for electrons and holes in Cylindrical geometry (eV). 

Data filter for quasiFermi levels for electrons and holes into Cartesian2D geometry. 

Data filter for quasiFermi levels for electrons and holes into Cartesian3D geometry. 

Data filter for quasiFermi levels for electrons and holes into Cylindrical geometry. 

Provider of the quasiFermi levels for electrons and holes in Cartesian2D geometry (eV). 

Provider of the quasiFermi levels for electrons and holes in Cartesian3D geometry (eV). 

Provider of the quasiFermi levels for electrons and holes in Cylindrical geometry (eV). 

Receiver of the quasiFermi levels for electrons and holes in Cartesian2D geometry (eV). 

Receiver of the quasiFermi levels for electrons and holes in Cartesian3D geometry (eV). 

Receiver of the quasiFermi levels for electrons and holes in Cylindrical geometry (eV). 

Data filter for material gain into Cartesian2D geometry. 

Data filter for material gain into Cartesian3D geometry. 

Data filter for material gain into Cylindrical geometry. 

Provider of the material gain in Cartesian2D geometry (1/cm). 

Provider of the material gain in Cartesian3D geometry (1/cm). 

Provider of the material gain in Cylindrical geometry (1/cm). 

Receiver of the material gain in Cartesian2D geometry (1/cm). 

Receiver of the material gain in Cartesian3D geometry (1/cm). 

Receiver of the material gain in Cylindrical geometry (1/cm). 

Data filter for heat sources density into Cartesian2D geometry. 

Data filter for heat sources density into Cartesian3D geometry. 

Data filter for heat sources density into Cylindrical geometry. 

Data filter for heat flux into Cartesian2D geometry. 

Data filter for heat flux into Cartesian3D geometry. 

Data filter for heat flux into Cylindrical geometry. 

Provider of the heat flux in Cartesian2D geometry (W/m²). 

Provider of the heat flux in Cartesian3D geometry (W/m²). 

Provider of the heat flux in Cylindrical geometry (W/m²). 

Receiver of the heat flux in Cartesian2D geometry (W/m²). 

Receiver of the heat flux in Cartesian3D geometry (W/m²). 

Receiver of the heat flux in Cylindrical geometry (W/m²). 

Provider of the heat sources density in Cartesian2D geometry (W/m³). 

Provider of the heat sources density in Cartesian3D geometry (W/m³). 

Provider of the heat sources density in Cylindrical geometry (W/m³). 

Receiver of the heat sources density in Cartesian2D geometry (W/m³). 

Receiver of the heat sources density in Cartesian3D geometry (W/m³). 

Receiver of the heat sources density in Cylindrical geometry (W/m³). 

Combined provider for heat sources density. 

Combined provider for heat sources density. 

Data filter for electric field into Cartesian2D geometry. 

Data filter for electric field into Cartesian3D geometry. 

Data filter for electric field into Cylindrical geometry. 

Provider of the electric field in Cartesian2D geometry (V/m). 

Provider of the electric field in Cartesian3D geometry (V/m). 

Provider of the electric field in Cylindrical geometry (V/m). 

Receiver of the electric field in Cartesian2D geometry (V/m). 

Receiver of the electric field in Cartesian3D geometry (V/m). 

Receiver of the electric field in Cylindrical geometry (V/m). 

Data filter for magnetic field into Cartesian2D geometry. 

Data filter for magnetic field into Cartesian3D geometry. 

Data filter for magnetic field into Cylindrical geometry. 

Provider of the magnetic field in Cartesian2D geometry (A/m). 

Provider of the magnetic field in Cartesian3D geometry (A/m). 

Provider of the magnetic field in Cylindrical geometry (A/m). 

Receiver of the magnetic field in Cartesian2D geometry (A/m). 

Receiver of the magnetic field in Cartesian3D geometry (A/m). 

Receiver of the magnetic field in Cylindrical geometry (A/m). 

Data filter for optical field magnitude into Cartesian2D geometry. 

Data filter for optical field magnitude into Cartesian3D geometry. 

Data filter for optical field magnitude into Cylindrical geometry. 

Provider of the optical field magnitude in Cartesian2D geometry (W/m²). 

Provider of the optical field magnitude in Cartesian3D geometry (W/m²). 

Provider of the optical field magnitude in Cylindrical geometry (W/m²). 

Receiver of the optical field magnitude in Cartesian2D geometry (W/m²). 

Receiver of the optical field magnitude in Cartesian3D geometry (W/m²). 

Receiver of the optical field magnitude in Cylindrical geometry (W/m²). 

Data filter for luminescence into Cartesian2D geometry. 

Data filter for luminescence into Cartesian3D geometry. 

Data filter for luminescence into Cylindrical geometry. 

Provider of the luminescence in Cartesian2D geometry (a.u.). 

Provider of the luminescence in Cartesian3D geometry (a.u.). 

Provider of the luminescence in Cylindrical geometry (a.u.). 

Receiver of the luminescence in Cartesian2D geometry (a.u.). 

Receiver of the luminescence in Cartesian3D geometry (a.u.). 

Receiver of the luminescence in Cylindrical geometry (a.u.). 

Provider of the effective index (). 

Receiver of the effective index (). 

Data filter for electric field into Cartesian2D geometry. 

Data filter for electric field into Cartesian3D geometry. 

Data filter for electric field into Cylindrical geometry. 

Provider of the electric field in Cartesian2D geometry (V/m). 

Provider of the electric field in Cartesian3D geometry (V/m). 

Provider of the electric field in Cylindrical geometry (V/m). 

Receiver of the electric field in Cartesian2D geometry (V/m). 

Receiver of the electric field in Cartesian3D geometry (V/m). 

Receiver of the electric field in Cylindrical geometry (V/m). 

Data filter for magnetic field into Cartesian2D geometry. 

Data filter for magnetic field into Cartesian3D geometry. 

Data filter for magnetic field into Cylindrical geometry. 

Provider of the magnetic field in Cartesian2D geometry (A/m). 

Provider of the magnetic field in Cartesian3D geometry (A/m). 

Provider of the magnetic field in Cylindrical geometry (A/m). 

Receiver of the magnetic field in Cartesian2D geometry (A/m). 

Receiver of the magnetic field in Cartesian3D geometry (A/m). 

Receiver of the magnetic field in Cylindrical geometry (A/m). 

Data filter for optical field magnitude into Cartesian2D geometry. 

Data filter for optical field magnitude into Cartesian3D geometry. 

Data filter for optical field magnitude into Cylindrical geometry. 

Provider of the optical field magnitude in Cartesian2D geometry (W/m²). 

Provider of the optical field magnitude in Cartesian3D geometry (W/m²). 

Provider of the optical field magnitude in Cylindrical geometry (W/m²). 

Receiver of the optical field magnitude in Cartesian2D geometry (W/m²). 

Receiver of the optical field magnitude in Cartesian3D geometry (W/m²). 

Receiver of the optical field magnitude in Cylindrical geometry (W/m²). 

Provider of the modal extinction (1/cm). 

Receiver of the modal extinction (1/cm). 

Provider of the propagation constant (1/µm). 

Receiver of the propagation constant (1/µm). 

Provider of the wavelength (nm). 

Receiver of the wavelength (nm). 

Data filter for potential into Cartesian2D geometry. 

Data filter for potential into Cartesian3D geometry. 

Data filter for potential into Cylindrical geometry. 

Provider of the potential in Cartesian2D geometry (V). 

Provider of the potential in Cartesian3D geometry (V). 

Provider of the potential in Cylindrical geometry (V). 

Receiver of the potential in Cartesian2D geometry (V). 

Receiver of the potential in Cartesian3D geometry (V). 

Receiver of the potential in Cylindrical geometry (V). 

Data filter for refractive index into Cartesian2D geometry. 

Data filter for refractive index into Cartesian3D geometry. 

Data filter for refractive index into Cylindrical geometry. 

Provider of the refractive index in Cartesian2D geometry (). 

Provider of the refractive index in Cartesian3D geometry (). 

Provider of the refractive index in Cylindrical geometry (). 

Receiver of the refractive index in Cartesian2D geometry (). 

Receiver of the refractive index in Cartesian3D geometry (). 

Receiver of the refractive index in Cylindrical geometry (). 

Data filter for temperature into Cartesian2D geometry. 

Data filter for temperature into Cartesian3D geometry. 

Data filter for temperature into Cylindrical geometry. 

Provider of the temperature in Cartesian2D geometry (K). 

Provider of the temperature in Cartesian3D geometry (K). 

Provider of the temperature in Cylindrical geometry (K). 

Receiver of the temperature in Cartesian2D geometry (K). 

Receiver of the temperature in Cartesian3D geometry (K). 

Receiver of the temperature in Cylindrical geometry (K). 

Data filter for thermal conductivity into Cartesian2D geometry. 

Data filter for thermal conductivity into Cartesian3D geometry. 

Data filter for thermal conductivity into Cylindrical geometry. 

Provider of the thermal conductivity in Cartesian2D geometry (W/(m×K)). 

Provider of the thermal conductivity in Cartesian3D geometry (W/(m×K)). 

Provider of the thermal conductivity in Cylindrical geometry (W/(m×K)). 

Receiver of the thermal conductivity in Cartesian2D geometry (W/(m×K)). 

Receiver of the thermal conductivity in Cartesian3D geometry (W/(m×K)). 

Receiver of the thermal conductivity in Cylindrical geometry (W/(m×K)). 

Data filter for voltage into Cartesian2D geometry. 

Data filter for voltage into Cartesian3D geometry. 

Data filter for voltage into Cylindrical geometry. 

Provider of the voltage in Cartesian2D geometry (V). 

Provider of the voltage in Cartesian3D geometry (V). 

Provider of the voltage in Cylindrical geometry (V). 

Receiver of the voltage in Cartesian2D geometry (V). 

Receiver of the voltage in Cartesian3D geometry (V). 

Receiver of the voltage in Cylindrical geometry (V). 