optical.slab.
Fourier2D
(name="")¶Optical Solver using Fourier expansion in 2D.
It calculates optical modes and optical field distribution using Fourier slab method and reflection transfer in two-dimensional Cartesian space.
Eigenmodes |
Layer eignemodes |
Mode |
Detailed information about the mode. |
Scattering |
Reflected mode proxy. |
compute_reflectivity (…) |
Compute reflection coefficient on planar incidence [%]. |
compute_transmittivity (…) |
Compute transmission coefficient on planar incidence [%]. |
find_mode (*args, **kwargs) |
Compute the mode near the specified effective index. |
gaussian (side, polarization, sigma[, center]) |
Create coefficients vector with Gaussian profile. |
get_determinant (*args, **kwargs) |
Compute discontinuity matrix determinant. |
get_raw_E (num, level) |
Get Fourier expansion coefficients for the electric field. |
get_raw_H (num, level) |
Get Fourier expansion coefficients for the magnetic field. |
initialize () |
Initialize solver. |
integrateEE (…) |
Get average integral of the squared electric field: |
integrateHH (…) |
Get average integral of the squared magnetic field: |
invalidate () |
Set the solver back to uninitialized state. |
layer_eigenmodes (level) |
Get eignemodes for a layer at specified level. |
scattering (…) |
Access to the reflected field. |
scattering_gaussian (side, polarization, sigma) |
Helper function to Access reflected fields for access incidence. |
set_interface (…) |
Set interface at the bottom of the specified object. |
set_mode (*args, **kwargs) |
Set the mode for specified parameters. |
inCarriersConcentration |
Receiver of the carriers concentration required for computations [1/cm³]. |
inGain |
Receiver of the material gain required for computations [1/cm]. |
inTemperature |
Receiver of the temperature required for computations [K]. |
outDownwardsLightE |
Provider of the computed electric field [V/m]. |
outDownwardsLightH |
Provider of the computed magnetic field [A/m]. |
outLightE |
Provider of the computed electric field [V/m]. |
outLightH |
Provider of the computed magnetic field [A/m]. |
outLightMagnitude |
Provider of the computed optical field magnitude [W/m²]. |
outNeff |
Provider of the computed effective index [-]. |
outRefractiveIndex |
Provider of the computed refractive index [-]. |
outUpwardsLightE |
Provider of the computed electric field [V/m]. |
outUpwardsLightH |
Provider of the computed magnetic field [A/m]. |
outWavelength |
Provider of the computed wavelength [nm]. |
beta |
Alias for klong |
dct |
Type of discrete cosine transform for symmetric expansion. |
determinant_type |
Type of determinant that is computed in root finding. |
emission |
Direction of the useful light emission. |
ft |
Type of the Fourier transform. |
geometry |
Geometry provided to the solver |
group_layers |
Layer grouping switch. |
id |
Id of the solver object. |
initialized |
True if the solver has been initialized. |
interface |
Matching interface position. |
k0 |
Normalized frequency of the light [1/µm]. |
klong |
Longitudinal propagation constant of the light [1/µm]. |
ktran |
Transverse propagation constant of the light [1/µm]. |
lam |
Wavelength of the light [nm]. |
lam0 |
Reference wavelength. |
layer_centers |
Vertical posiotions of centers of each layer. |
layer_edges |
Vertical posiotions of egges of each layer. |
mesh |
Mesh provided to the solver |
mirrors |
Mirror reflectivities. |
modes |
Computed modes. |
pml |
Side Perfectly Matched Layers boundary conditions. |
polarization |
Mode polarization. |
refine |
Number of refinement points for refractive index averaging. |
root |
Configuration of the root searching algorithm. |
size |
Orthogonal expansion size. |
smooth |
Smoothing parameter for material boundaries (increases convergence). |
stack |
Stack of distinct layers. |
symmetry |
Mode symmetry. |
temp_diff |
Maximum temperature difference between the layers in one group. |
temp_dist |
Temperature probing step. |
temp_layer |
Temperature probing step. |
transfer |
Preferred transfer method. |
update_gain |
Always update gain. |
vpml |
Vertical Perfectly Matched Layers boundary conditions. |
wavelength |
Alias for lam |
Fourier2D.
compute_reflectivity
(lam, side, polarization)¶Fourier2D.
compute_reflectivity
(lam, side, coffs)Fourier2D.
compute_reflectivity
(lam, side, index)Compute reflection coefficient on planar incidence [%].
Parameters: |
|
---|
Fourier2D.
compute_transmittivity
(lam, side, polarization)¶Fourier2D.
compute_transmittivity
(lam, side, coffs)Fourier2D.
compute_transmittivity
(lam, side, index)Compute transmission coefficient on planar incidence [%].
Parameters: |
|
---|
Fourier2D.
find_mode
(*args, **kwargs)¶Compute the mode near the specified effective index.
Only one of the following arguments can be given through a keyword. It is the starting point for search of the specified parameter.
Parameters: |
|
---|
Fourier2D.
gaussian
(side, polarization, sigma, center=0.0)¶Create coefficients vector with Gaussian profile.
This method is intended to use for scattering()
method.
Parameters: |
|
---|
Example
>>> scattered = fourier.scattering('top',
... fourier.gaussian('top', 'Ex', 0.2))
Fourier2D.
get_determinant
(*args, **kwargs)¶Compute discontinuity matrix determinant.
Arguments can be given through keywords only.
Parameters: |
|
---|
Fourier2D.
get_raw_E
(num, level)¶Get Fourier expansion coefficients for the electric field.
This is a low-level function returning \(E_l\) and/or \(E_t\) Fourier expansion coefficients. Please refer to the detailed solver description for their interpretation.
Parameters: |
|
---|---|
Return type: | numpy.ndarray |
Fourier2D.
get_raw_H
(num, level)¶Get Fourier expansion coefficients for the magnetic field.
This is a low-level function returning \(H_l\) and/or \(H_t\) Fourier expansion coefficients. Please refer to the detailed solver description for their interpretation.
Parameters: |
|
---|---|
Return type: | numpy.ndarray |
Fourier2D.
initialize
()¶Initialize solver.
This method manually initialized the solver and sets initialized
to
True. Normally calling it is not necessary, as each solver automatically
initializes itself when needed.
Returns: | solver initialized state prior to this method call. |
---|---|
Return type: | bool |
Fourier2D.
integrateEE
(z1, z2)¶Fourier2D.
integrateEE
(num, z1, z2)Get average integral of the squared electric field:
\[\frac 1 2 \int_{z_1}^{z_2} |E|^2.\]
In the lateral direction integration is performed over the whole domain.
Parameters: |
|
---|---|
Returns: | Computed integral [V2 / m2]. |
Return type: | float |
Warning
This method may return incorrect results for layers with gain, due to the strong non-Hemiticity!
Fourier2D.
integrateHH
(z1, z2)¶Fourier2D.
integrateHH
(num, z1, z2)Get average integral of the squared magnetic field:
\[\frac 1 2 \int_{z_1}^{z_2} |H|^2.\]
In the lateral direction integration is performed over the whole domain.
Parameters: |
|
---|---|
Returns: | Computed integral [A2 / m2]. |
Return type: | float |
Warning
This method may return incorrect results for layers with gain, due to the strong non-Hemiticity!
Fourier2D.
invalidate
()¶Set the solver back to uninitialized state.
This method frees the memory allocated by the solver and sets
initialized
to False.
Fourier2D.
layer_eigenmodes
(level)¶Get eignemodes for a layer at specified level.
This is a low-level function to access diagonalized eigenmodes for a specific layer. Please refer to the detailed solver description for the interpretation of the returned values.
Parameters: | level (float) – Vertical level at which the coefficients are computed. |
---|---|
Return type: | Eigenmodes |
Fourier2D.
scattering
(side, idx)¶Fourier2D.
scattering
(side, coeffs)Fourier2D.
scattering
(side, polarization)Access to the reflected field.
Parameters: |
|
---|---|
Return type: |
Fourier2D.
scattering_gaussian
(side, polarization, sigma, center=0.0)¶Helper function to Access reflected fields for access incidence.
This method is equivalent to calling:
>>> fourier.scattering(side,
... fourier.gaussian(side, polarization, sigma, center))
Parameters: |
|
---|
Fourier2D.
set_interface
(object, path=None)¶Fourier2D.
set_interface
(pos)Set interface at the bottom of the specified object.
Parameters: |
|
---|
Set interface as close as possible to the specified position.
Parameters: | pos (float) – Position, near which the interface will be located. |
---|
Fourier2D.
set_mode
(*args, **kwargs)¶Set the mode for specified parameters.
This method should be used if you have found a mode manually and want to insert it into the solver in order to determine the fields. Calling this will raise an exception if the determinant for the specified parameters is too large.
Arguments can be given through keywords only.
Parameters: |
|
---|
Fourier2D.
inCarriersConcentration
¶Receiver of the carriers concentration required for computations [1/cm³].
You will find usage details in the documentation of the receiver class
CarriersConcentrationReceiver2D
.
Example
Connect the reveiver to a provider from some other solver:
>>> solver.inCarriersConcentration = other_solver.outCarriersConcentration
See also
Receciver class: plask.flow.CarriersConcentrationReceiver2D
Provider class: plask.flow.CarriersConcentrationProvider2D
Data filter: plask.filter.CarriersConcentrationFilter2D
Fourier2D.
inGain
¶Receiver of the material gain required for computations [1/cm].
You will find usage details in the documentation of the receiver class
GainReceiver2D
.
Example
Connect the reveiver to a provider from some other solver:
>>> solver.inGain = other_solver.outGain
See also
Receciver class: plask.flow.GainReceiver2D
Provider class: plask.flow.GainProvider2D
Data filter: plask.filter.GainFilter2D
Fourier2D.
inTemperature
¶Receiver of the temperature required for computations [K].
You will find usage details in the documentation of the receiver class
TemperatureReceiver2D
.
Example
Connect the reveiver to a provider from some other solver:
>>> solver.inTemperature = other_solver.outTemperature
See also
Receciver class: plask.flow.TemperatureReceiver2D
Provider class: plask.flow.TemperatureProvider2D
Data filter: plask.filter.TemperatureFilter2D
Fourier2D.
outDownwardsLightE
(n=0, mesh, interpolation='default')¶Provider of the computed electric field [V/m].
Parameters: |
|
---|---|
Returns: | Data with the electric field on the specified mesh [V/m]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeLightE = solver.outDownwardsLightE
Obtain the provided field:
>>> solver.outDownwardsLightE(0, mesh)
<plask.Data at 0x1234567>
Test the number of provided values:
>>> len(solver.outDownwardsLightE)
3
See also
Provider class: plask.flow.ModeLightEProvider2D
Receciver class: plask.flow.ModeLightEReceiver2D
Fourier2D.
outDownwardsLightH
(n=0, mesh, interpolation='default')¶Provider of the computed magnetic field [A/m].
Parameters: |
|
---|---|
Returns: | Data with the magnetic field on the specified mesh [A/m]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeLightH = solver.outDownwardsLightH
Obtain the provided field:
>>> solver.outDownwardsLightH(0, mesh)
<plask.Data at 0x1234567>
Test the number of provided values:
>>> len(solver.outDownwardsLightH)
3
See also
Provider class: plask.flow.ModeLightHProvider2D
Receciver class: plask.flow.ModeLightHReceiver2D
Fourier2D.
outLightE
(n=0, mesh, interpolation='default')¶Provider of the computed electric field [V/m].
Parameters: |
|
---|---|
Returns: | Data with the electric field on the specified mesh [V/m]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeLightE = solver.outLightE
Obtain the provided field:
>>> solver.outLightE(0, mesh)
<plask.Data at 0x1234567>
Test the number of provided values:
>>> len(solver.outLightE)
3
See also
Provider class: plask.flow.ModeLightEProvider2D
Receciver class: plask.flow.ModeLightEReceiver2D
Fourier2D.
outLightH
(n=0, mesh, interpolation='default')¶Provider of the computed magnetic field [A/m].
Parameters: |
|
---|---|
Returns: | Data with the magnetic field on the specified mesh [A/m]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeLightH = solver.outLightH
Obtain the provided field:
>>> solver.outLightH(0, mesh)
<plask.Data at 0x1234567>
Test the number of provided values:
>>> len(solver.outLightH)
3
See also
Provider class: plask.flow.ModeLightHProvider2D
Receciver class: plask.flow.ModeLightHReceiver2D
Fourier2D.
outLightMagnitude
(n=0, mesh, interpolation='default')¶Provider of the computed optical field magnitude [W/m²].
Parameters: |
|
---|---|
Returns: | Data with the optical field magnitude on the specified mesh [W/m²]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeLightMagnitude = solver.outLightMagnitude
Obtain the provided field:
>>> solver.outLightMagnitude(0, mesh)
<plask.Data at 0x1234567>
Test the number of provided values:
>>> len(solver.outLightMagnitude)
3
See also
Provider class: plask.flow.ModeLightMagnitudeProvider2D
Receciver class: plask.flow.ModeLightMagnitudeReceiver2D
Fourier2D.
outNeff
(n=0)¶Provider of the computed effective index [-]. Effective index of the last computed mode.
Parameters: | n (int) – Value number. |
---|---|
Returns: | Value of the effective index [-]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeEffectiveIndex = solver.outNeff
Obtain the provided value:
>>> solver.outNeff(n=0)
1000
Test the number of provided values:
>>> len(solver.outNeff)
3
See also
Provider class: plask.flow.ModeEffectiveIndexProvider
Receciver class: plask.flow.ModeEffectiveIndexReceiver
Fourier2D.
outRefractiveIndex
(mesh, interpolation='default')¶Provider of the computed refractive index [-].
Parameters: |
|
---|---|
Returns: | Data with the refractive index on the specified mesh [-]. |
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inRefractiveIndex = solver.outRefractiveIndex
Obtain the provided field:
>>> solver.outRefractiveIndex(mesh)
<plask.Data at 0x1234567>
See also
Provider class: plask.flow.RefractiveIndexProvider2D
Receciver class: plask.flow.RefractiveIndexReceiver2D
Fourier2D.
outUpwardsLightE
(n=0, mesh, interpolation='default')¶Provider of the computed electric field [V/m].
Parameters: |
|
---|---|
Returns: | Data with the electric field on the specified mesh [V/m]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeLightE = solver.outUpwardsLightE
Obtain the provided field:
>>> solver.outUpwardsLightE(0, mesh)
<plask.Data at 0x1234567>
Test the number of provided values:
>>> len(solver.outUpwardsLightE)
3
See also
Provider class: plask.flow.ModeLightEProvider2D
Receciver class: plask.flow.ModeLightEReceiver2D
Fourier2D.
outUpwardsLightH
(n=0, mesh, interpolation='default')¶Provider of the computed magnetic field [A/m].
Parameters: |
|
---|---|
Returns: | Data with the magnetic field on the specified mesh [A/m]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeLightH = solver.outUpwardsLightH
Obtain the provided field:
>>> solver.outUpwardsLightH(0, mesh)
<plask.Data at 0x1234567>
Test the number of provided values:
>>> len(solver.outUpwardsLightH)
3
See also
Provider class: plask.flow.ModeLightHProvider2D
Receciver class: plask.flow.ModeLightHReceiver2D
Fourier2D.
outWavelength
(n=0)¶Provider of the computed wavelength [nm].
Parameters: | n (int) – Value number. |
---|---|
Returns: | Value of the wavelength [nm]. |
You may obtain the number of different values this provider can return by testing its length.
Example
Connect the provider to a receiver in some other solver:
>>> other_solver.inModeWavelength = solver.outWavelength
Obtain the provided value:
>>> solver.outWavelength(n=0)
1000
Test the number of provided values:
>>> len(solver.outWavelength)
3
See also
Provider class: plask.flow.ModeWavelengthProvider
Receciver class: plask.flow.ModeWavelengthReceiver
Fourier2D.
dct
¶Type of discrete cosine transform for symmetric expansion.
Fourier2D.
determinant_type
¶Type of determinant that is computed in root finding.
This attribute specifies what is returned by the get_determinant()
method. Regardless of the determinant type, its value must be zero for any mode.
Can take on of the following values that specified what quantity is computed for the characteristic matrix:
eigenvalue | Eigenvalue with the smallest magnitude |
full | Determinant of the matrix |
Fourier2D.
emission
¶Direction of the useful light emission.
Necessary for the over-threshold model to correctly compute the output power.
Currently the fields are normalized only if this parameter is set to
top
or bottom
. Otherwise, it is undefined
(default) and the fields
are not normalized.
Fourier2D.
ft
¶Type of the Fourier transform. Analytic transform is faster and more precise, however it ignores temperature and gain distributions.
Fourier2D.
geometry
¶Geometry provided to the solver
Fourier2D.
group_layers
¶Layer grouping switch.
If this property is True
, similar layers are grouped for efficiency.
Fourier2D.
id
¶Id of the solver object. (read only)
Example
>>> mysolver.id
mysolver:category.type
Fourier2D.
initialized
¶True if the solver has been initialized. (read only)
Solvers usually get initialized at the beginning of the computations.
You can clean the initialization state and free the memory by calling
the invalidate()
method.
Fourier2D.
interface
¶Matching interface position.
Fourier2D.
k0
¶Normalized frequency of the light [1/µm].
Use this property only if you are looking for anything else than the wavelength,e.g. the effective index of lateral wavevector.
Fourier2D.
klong
¶Longitudinal propagation constant of the light [1/µm].
Use this property only if you are looking for anything else than the longitudinal component of the propagation vector and the effective index.
Fourier2D.
ktran
¶Transverse propagation constant of the light [1/µm].
Use this property only if you are looking for anything else than the transverse component of the propagation vector.
Fourier2D.
lam
¶Wavelength of the light [nm].
Use this property only if you are looking for anything else than the wavelength, e.g. the effective index of lateral wavevector.
Fourier2D.
lam0
¶Reference wavelength.
This is a wavelength at which refractive index is retrieved from the structure. If this parameter is None, material parameters are computed each time, the wavelenght changes even slightly (this is most accurate, but can be very inefficient.
Fourier2D.
layer_centers
¶Vertical posiotions of centers of each layer.
At these positions materials and temperatures are probed.
Fourier2D.
layer_edges
¶Vertical posiotions of egges of each layer.
Fourier2D.
mesh
¶Mesh provided to the solver
Fourier2D.
mirrors
¶Mirror reflectivities. If None then they are automatically estimated from the Fresnel equations.
Fourier2D.
modes
¶Computed modes.
Fourier2D.
pml
¶Side Perfectly Matched Layers boundary conditions.
Attributes:
factor |
PML scaling factor. |
shape |
PML shape order (0 → flat, 1 → linearly increasing, 2 → quadratic, etc.). |
dist |
PML distance from the structure. |
size |
PML size. |
Return type: | PML |
---|
Fourier2D.
polarization
¶Mode polarization.
Fourier2D.
refine
¶Number of refinement points for refractive index averaging.
Fourier2D.
root
¶Configuration of the root searching algorithm.
Attributes:
alpha |
Parameter ensuring sufficient decrease of determinant in each step (Broyden method only). |
lambd |
Minimum decrease ratio of one step (Broyden method only). |
initial_range |
Initial range size (Muller and Brent methods only). |
maxiter |
Maximum number of iterations. |
maxstep |
Maximum step in one iteration (Broyden method only). |
method |
Root finding method (‘muller’, ‘broyden’, or ‘brent’) |
tolf_max |
Required tolerance on the function value. |
tolf_min |
Sufficient tolerance on the function value. |
tolx |
Absolute tolerance on the argument. |
Return type: | RootParams |
---|
Fourier2D.
size
¶Orthogonal expansion size.
Fourier2D.
smooth
¶Smoothing parameter for material boundaries (increases convergence).
Fourier2D.
stack
¶Stack of distinct layers.
Fourier2D.
symmetry
¶Mode symmetry.
Fourier2D.
temp_diff
¶Maximum temperature difference between the layers in one group.
If a temperature in a single layer varies vertically more than this value, the layer is split into two and put into separate groups. If this is empty, temperature gradient is ignored in layers grouping.
Fourier2D.
temp_dist
¶Temperature probing step.
If temp_diff
is not None
, the temperature is laterally probed
in points approximately separated by this distance.
Fourier2D.
temp_layer
¶Temperature probing step.
If temp_diff
is not None
, this is the minimum thickness of sublayers
resulting from temperature-gradient division.
Fourier2D.
transfer
¶Preferred transfer method.
Can take on of the following values:
auto | Automatically choose the best method |
reflection | Reflection Transfer Method |
admittance | Admittance Transfer Method |
impedance | Impedance Transfer Method |
Reflection transfer can have optional suffix -admittance
(default)
or -impedance
, in which case the admittance/impedance matching is done
at interface (for eigenmode search). You should prefer admittance if electric
field is expected to have significant horizontal components (particularly
at the interface) i.e. for TE-like modes and impedance for TM-like modes.
Fourier2D.
update_gain
¶Always update gain.
If this attribute is set to True, material parameters are always recomputed for layers with gains. This allows to set py:attr:lam0 for better efficiency and still update gain for slight changes of wavelength.
Fourier2D.
vpml
¶Vertical Perfectly Matched Layers boundary conditions.
Attributes
factor |
PML scaling factor. |
dist |
PML distance from the structure. |
size |
PML size. |
Attribute shape
is ignored for vertical PML (it is always 0).