BesselCyl Class

class optical.slab.BesselCyl(name='')

Optical Solver using Bessel expansion in cylindrical coordinates.

It calculates optical modes and optical field distribution using Bessel slab method and reflection transfer in two-dimensional cylindrical space.

Subclasses

Eigenmodes

Layer eignemodes

Mode

Detailed information about the mode.

Scattering

Reflected mode proxy.

Methods

compute_reflectivity(...)

Compute reflection coefficient on planar incidence [%].

compute_transmittivity(...)

Compute transmission coefficient on planar incidence [%].

find_mode(lam[, m])

Compute the mode near the specified effective index.

get_determinant(*args, **kwargs)

Compute discontinuity matrix determinant.

get_raw_E(num, level)

Get Bessel expansion coefficients for the electric field.

get_raw_H(num, level)

Get Bessel 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 eigenmodes for a layer at specified level.

scattering(...)

Access to the reflected field.

set_interface(...)

Set interface at the bottom of the specified object.

set_mode(arg2, arg3)

Set the mode for specified parameters.

Attributes

Receivers

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].

Providers

outDownwardsLightE

Provider of the computed electric field [V/m].

outDownwardsLightH

Provider of the computed magnetic field [A/m].

outEpsilon

Provider of the computed permittivity tensor [-].

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²].

outLoss

Provider of the computed modal extinction [1/cm].

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].

Other

determinant_type

Type of determinant that is computed in root finding.

domain

Computational domain ('finite' or 'infinite').

emission

Direction of the useful light emission.

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).

klist

A list of wavevectors ranges.

kmax

Maximum wavevector used in the infinite domain relative to the wavelength.

kmethod

Method of selecting wavevectors for numerical Hankel transform in infinite domain.

kscale

Scale factor for wavevectors used in the infinite domain.

kweights

An optional list of relative wavevector weights.

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.

m

Angular dependence parameter.

mesh

Mesh provided to the solver

modes

Computed modes.

pml

Side Perfectly Matched Layers boundary conditions.

root

Configuration of the root searching algorithm.

rule

Expansion rule for coefficients matrix.

size

Orthogonal expansion size.

smooth

Smoothing parameter for material boundaries (increases convergence).

stack

Stack of distinct layers.

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

Descriptions

Method Details

BesselCyl.compute_reflectivity(lam, side, coeffs)
BesselCyl.compute_reflectivity(lam, side, index)

Compute reflection coefficient on planar incidence [%].

Parameters:
  • lam (float or array of floats) – Incident light wavelength (nm).

  • side (top or bottom) – Side of the structure where the incident light is present.

  • index – Eigenmode number.

  • coeffs – expansion coefficients of the incident vector.

BesselCyl.compute_transmittivity(lam, side, coeffs)
BesselCyl.compute_transmittivity(lam, side, index)

Compute transmission coefficient on planar incidence [%].

Parameters:
  • lam (float or array of floats) – Incident light wavelength (nm).

  • side (top or bottom) – Side of the structure where the incident light is present.

  • index – Eigenmode number.

  • coeffs – expansion coefficients of the incident vector.

BesselCyl.find_mode(lam, m=None)

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:
  • lam (complex) – Starting wavelength (nm).

  • m (int) – HE/EH Mode angular number. If None, use m attribute.

BesselCyl.get_determinant(*args, **kwargs)

Compute discontinuity matrix determinant.

Arguments can be given through keywords only.

Parameters:
  • lam (complex) – Wavelength (nm).

  • k0 (complex) – Normalized frequency.

  • m (int) – HE/EH Mode angular number.

BesselCyl.get_raw_E(num, level)

Get Bessel expansion coefficients for the electric field.

This is a low-level function returning $E_s$ and $E_p$ Bessel expansion coefficients. Please refer to the detailed solver description for their interpretation.

Parameters:
  • num (int) – Computed mode number.

  • level (float) – Vertical lever at which the coefficients are computed.

Return type:

numpy.ndarray

BesselCyl.get_raw_H(num, level)

Get Bessel expansion coefficients for the magnetic field.

This is a low-level function returning $H_s$ and $H_p$ Bessel expansion coefficients. Please refer to the detailed solver description for their interpretation.

Parameters:
  • num (int) – Computed mode number.

  • level (float) – Vertical lever at which the coefficients are computed.

Return type:

numpy.ndarray

BesselCyl.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

BesselCyl.integrateEE(z1, z2)
BesselCyl.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:
  • num (int) – Computed mode number.

  • z1 (float) – Lower vertical bound of the integral.

  • z2 (float) – Upper vertical bound of the integral.

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!

BesselCyl.integrateHH(z1, z2)
BesselCyl.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:
  • num (int) – Computed mode number.

  • z1 (float) – Lower vertical bound of the integral.

  • z2 (float) – Upper vertical bound of the integral.

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!

BesselCyl.invalidate()

Set the solver back to uninitialized state.

This method frees the memory allocated by the solver and sets initialized to False.

BesselCyl.layer_eigenmodes(level)

Get eigenmodes 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

BesselCyl.scattering(side, idx)
BesselCyl.scattering(side, coeffs)

Access to the reflected field.

Parameters:
  • side (top or bottom) – Side of the structure where the incident light is present.

  • polarization – Specification of the incident light polarization. It should be a string of the form ‘E#‘, where # is the axis name of the non-vanishing electric field component.

  • idx – Eigenmode number.

  • coeffs – expansion coefficients of the incident vector.

Return type:

Fourier2D.Scattering

BesselCyl.set_interface(pos)
BesselCyl.set_interface(object, path=None)

Set interface at the bottom of the specified object.

Parameters:
  • object (geometry object) – object to set the interface at.

  • path (path) – Optional path specifying an instance of the object.

Set interface as close as possible to the specified position.

Parameters:

pos (float) – Position, near which the interface will be located.

BesselCyl.set_mode(arg2, arg3)

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:
  • lam (complex) – Wavelength (nm).

  • m (int) – HE/EH Mode angular number.

Receiver Details

BesselCyl.inCarriersConcentration = <property object>

Receiver of the carriers concentration required for computations [1/cm³].

You will find usage details in the documentation of the receiver class CarriersConcentrationReceiverCyl.

Example

Connect the receiver to a provider from some other solver:

>>> solver.inCarriersConcentration = other_solver.outCarriersConcentration

See also

Receciver class: plask.flow.CarriersConcentrationReceiverCyl

Provider class: plask.flow.CarriersConcentrationProviderCyl

Data filter: plask.filter.CarriersConcentrationFilterCyl

BesselCyl.inGain = <property object>

Receiver of the material gain required for computations [1/cm].

You will find usage details in the documentation of the receiver class GainReceiverCyl.

Example

Connect the receiver to a provider from some other solver:

>>> solver.inGain = other_solver.outGain

See also

Receciver class: plask.flow.GainReceiverCyl

Provider class: plask.flow.GainProviderCyl

Data filter: plask.filter.GainFilterCyl

BesselCyl.inTemperature = <property object>

Receiver of the temperature required for computations [K].

You will find usage details in the documentation of the receiver class TemperatureReceiverCyl.

Example

Connect the receiver to a provider from some other solver:

>>> solver.inTemperature = other_solver.outTemperature

See also

Receciver class: plask.flow.TemperatureReceiverCyl

Provider class: plask.flow.TemperatureProviderCyl

Data filter: plask.filter.TemperatureFilterCyl

Provider Details

BesselCyl.outDownwardsLightE(n=0, mesh, interpolation='default') = <property object>

Provider of the computed electric field [V/m].

Parameters:
  • n (int) – Number of the mode found with find_mode().

  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

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.ModeLightEProviderCyl

Receciver class: plask.flow.ModeLightEReceiverCyl

BesselCyl.outDownwardsLightH(n=0, mesh, interpolation='default') = <property object>

Provider of the computed magnetic field [A/m].

Parameters:
  • n (int) – Number of the mode found with find_mode().

  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

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.ModeLightHProviderCyl

Receciver class: plask.flow.ModeLightHReceiverCyl

BesselCyl.outEpsilon(mesh, interpolation='default') = <property object>

Provider of the computed permittivity tensor [-].

Parameters:
  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

Returns:

Data with the permittivity tensor on the specified mesh [-].

Example

Connect the provider to a receiver in some other solver:

>>> other_solver.inEpsilon = solver.outEpsilon

Obtain the provided field:

>>> solver.outEpsilon(mesh)
<plask.Data at 0x1234567>

See also

Provider class: plask.flow.EpsilonProviderCyl

Receciver class: plask.flow.EpsilonReceiverCyl

BesselCyl.outLightE(n=0, mesh, interpolation='default') = <property object>

Provider of the computed electric field [V/m].

Parameters:
  • n (int) – Number of the mode found with find_mode().

  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

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.ModeLightEProviderCyl

Receciver class: plask.flow.ModeLightEReceiverCyl

BesselCyl.outLightH(n=0, mesh, interpolation='default') = <property object>

Provider of the computed magnetic field [A/m].

Parameters:
  • n (int) – Number of the mode found with find_mode().

  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

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.ModeLightHProviderCyl

Receciver class: plask.flow.ModeLightHReceiverCyl

BesselCyl.outLightMagnitude(n=0, mesh, interpolation='default') = <property object>

Provider of the computed optical field magnitude [W/m²].

Parameters:
  • n (int) – Number of the mode found with find_mode().

  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

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
BesselCyl.outLoss(n=0) = <property object>

Provider of the computed modal extinction [1/cm].

Parameters:

n (int) – Value number.

Returns:

Value of the modal extinction [1/cm].

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.inModeLoss = solver.outLoss

Obtain the provided value:

>>> solver.outLoss(n=0)
1000

Test the number of provided values:

>>> len(solver.outLoss)
3

See also

Provider class: plask.flow.ModeLossProvider

Receciver class: plask.flow.ModeLossReceiver

BesselCyl.outRefractiveIndex(n=0, mesh, interpolation='default') = <property object>

Provider of the computed refractive index [-].

Parameters:
  • n (int) – Value number.

  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

Returns:

Data with the refractive index on the specified mesh [-].

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.inRefractiveIndex = solver.outRefractiveIndex

Obtain the provided field:

>>> solver.outRefractiveIndex(0, mesh)
<plask.Data at 0x1234567>

Test the number of provided values:

>>> len(solver.outRefractiveIndex)
3
BesselCyl.outUpwardsLightE(n=0, mesh, interpolation='default') = <property object>

Provider of the computed electric field [V/m].

Parameters:
  • n (int) – Number of the mode found with find_mode().

  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

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.ModeLightEProviderCyl

Receciver class: plask.flow.ModeLightEReceiverCyl

BesselCyl.outUpwardsLightH(n=0, mesh, interpolation='default') = <property object>

Provider of the computed magnetic field [A/m].

Parameters:
  • n (int) – Number of the mode found with find_mode().

  • mesh (mesh) – Target mesh to get the field at.

  • interpolation (str) – Requested interpolation method.

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.ModeLightHProviderCyl

Receciver class: plask.flow.ModeLightHReceiverCyl

BesselCyl.outWavelength(n=0) = <property object>

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

Attribute Details

BesselCyl.determinant_type = <property object>

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

BesselCyl.domain = <property object>

Computational domain (‘finite’ or ‘infinite’).

BesselCyl.emission = <property object>

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.

BesselCyl.geometry = <property object>

Geometry provided to the solver

BesselCyl.group_layers = <property object>

Layer grouping switch.

If this property is True, similar layers are grouped for efficiency.

BesselCyl.id = <property object>

Id of the solver object. (read only)

Example

>>> mysolver.id
mysolver:category.type
BesselCyl.initialized = <property object>

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.

BesselCyl.interface = <property object>

Matching interface position.

BesselCyl.k0 = <property object>

Normalized frequency of the light (1/µm).

BesselCyl.klist = <property object>

A list of wavevectors ranges. If no weights are given, the actual wavevectors used in the computations are the averages of each two adjacent values specified here and the integration weights are the sizes of each interval.

BesselCyl.kmax = <property object>

Maximum wavevector used in the infinite domain relative to the wavelength.

BesselCyl.kmethod = <property object>

Method of selecting wavevectors for numerical Hankel transform in infinite domain.

BesselCyl.kscale = <property object>

Scale factor for wavevectors used in the infinite domain.

BesselCyl.kweights = <property object>

An optional list of relative wavevector weights. The numbers should be relative to the inverse of the structure width.

BesselCyl.lam = <property object>

Wavelength of the light (nm).

BesselCyl.lam0 = <property object>

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 wavelength changes even slightly (this is most accurate, but can be very inefficient.

BesselCyl.layer_centers = <property object>

Vertical posiotions of centers of each layer.

At these positions materials and temperatures are probed.

BesselCyl.layer_edges = <property object>

Vertical posiotions of egges of each layer.

BesselCyl.m = <property object>

Angular dependence parameter.

BesselCyl.mesh = <property object>

Mesh provided to the solver

BesselCyl.modes = <property object>

Computed modes.

BesselCyl.pml = <property object>

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

BesselCyl.root = <property object>

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

BesselCyl.rule = <property object>

Expansion rule for coefficients matrix. Can be ‘direct’, ‘combined1’, ‘combined2’ or ‘old’. Inverse rule is proven to provide the best convergence and should be used in almost every case.

BesselCyl.size = <property object>

Orthogonal expansion size.

BesselCyl.smooth = <property object>

Smoothing parameter for material boundaries (increases convergence).

BesselCyl.stack = <property object>

Stack of distinct layers.

BesselCyl.temp_diff = <property object>

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.

BesselCyl.temp_dist = <property object>

Temperature probing step.

If temp_diff is not None, the temperature is laterally probed in points approximately separated by this distance.

BesselCyl.temp_layer = <property object>

Temperature probing step.

If temp_diff is not None, this is the minimum thickness of sublayers resulting from temperature-gradient division.

BesselCyl.transfer = <property object>

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.

BesselCyl.update_gain = <property object>

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.

BesselCyl.vpml = <property object>

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).

BesselCyl.wavelength = <property object>

Alias for lam