# EffectiveIndex2D Class¶

class optical.effective.EffectiveIndex2D(name="")

Calculate optical modes and optical field distribution using the effective index method in two-dimensional Cartesian space.

## Subclasses¶

 Mode Detailed information about the mode.

## Methods¶

 clear_modes() Clear all computed modes. find_mode(neff[, symmetry]) Compute the mode near the specified effective index. find_modes([start, end, symmetry, resteps, …]) Find the modes within the specified range using global method. get_delta_neff(pos) Return effective index part for lateral propagation at specified horizontal position. get_determinant(neff) Get modal determinant. get_total_absorption([num]) Get total energy absorbed by from a mode in unit time. get_vert_determinant(neff) Get vertical modal determinant for debugging purposes. initialize() Initialize solver. invalidate() Set the solver back to uninitialized state. search_vneff([start, end, resteps, imsteps, eps]) Find the effective indices in the vertical direction within the specified range using global method. set_mode(arg2[, symmetry]) Set the current mode the specified effective index. set_simple_mesh() Set simple mesh based on the geometry objects bounding boxes.

## Attributes¶

 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¶

 outElectricField Alias for outLightE. outHeat Provider of the computed heat sources density [W/m³]. outLightE Provider of the computed electric field [V/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 [-].

### Other¶

 emission Emission direction. geometry Geometry provided to the solver id Id of the solver object. initialized True if the solver has been initialized. mesh Mesh provided to the solver. mirrors Mirror reflectivities. modes List of the computed modes. polarization Polarization of the searched modes. root Configuration of the root searching algorithm for horizontal component of the mode. stripe_root Configuration of the root searching algorithm for vertical component of the mode in a single stripe. vat Horizontal position of the main stripe (with dominant mode). vneff Effective index in the vertical direction. wavelength Current wavelength.

## Descriptions¶

### Method Details¶

EffectiveIndex2D.clear_modes()

Clear all computed modes.

EffectiveIndex2D.find_mode(neff, symmetry=None)

Compute the mode near the specified effective index.

Parameters: neff (complex) – Starting point of the root search. symmetry ('+' or '-') – Symmetry of the mode to search. If this parameter is not specified, the default symmetry is used: positive mode symmetry fir symmetrical geometries and no symmetry for asymmetrical geometries. Index in the modes list of the found mode. integer
EffectiveIndex2D.find_modes(start=0.0, end=0.0, symmetry=None, resteps=256, imsteps=64, eps=(1e-06+1e-09j))

Find the modes within the specified range using global method.

Parameters: start (complex) – Start of the search range (0 means automatic). end (complex) – End of the search range (0 means automatic). resteps (integer) – Number of steps on the real axis during the search. imsteps (integer) – Number of steps on the imaginary axis during the search. eps (complex) – required precision of the search. List of the indices in the modes list of the found modes. list of integers
EffectiveIndex2D.get_delta_neff(pos)

Return effective index part for lateral propagation at specified horizontal position.

Parameters: pos (float or array of floats) – Horizontal position to get the effective index.
EffectiveIndex2D.get_determinant(neff)

Get modal determinant.

Parameters: neff (complex or array of complex) – effective index value compute the determinant at. (to) – Determinant at the effective index neff or an array matching its size. complex or list of complex
EffectiveIndex2D.get_total_absorption(num=0)

Get total energy absorbed by from a mode in unit time.

Parameters: num (int) – number of the mode. Total absorbed energy [mW].
EffectiveIndex2D.get_vert_determinant(neff)

Get vertical modal determinant for debugging purposes.

Parameters: neff (complex of numeric array of complex) – Vertical effective index value compute the determinant at. (to) – Determinant at the vertical effective index neff or an array matching its size. complex or list of complex
EffectiveIndex2D.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. bool
EffectiveIndex2D.invalidate()

Set the solver back to uninitialized state.

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

EffectiveIndex2D.search_vneff(start=0.0, end=0.0, resteps=256, imsteps=64, eps=(1e-06+1e-09j))

Find the effective indices in the vertical direction within the specified range using global method.

Parameters: start (complex) – Start of the search range (0 means automatic). end (complex) – End of the search range (0 means automatic). resteps (integer) – Number of steps on the real axis during the search. imsteps (integer) – Number of steps on the imaginary axis during the search. eps (complex) – required precision of the search. List of the found effective indices in the vertical direction. list of floats
EffectiveIndex2D.set_mode(arg2, symmetry=None)

Set the current mode the specified effective index.

Parameters: neff (complex) – Mode effective index. symmetry ('+' or '-') – Symmetry of the mode to search.
EffectiveIndex2D.set_simple_mesh()

Set simple mesh based on the geometry objects bounding boxes.

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


Receciver class: plask.flow.CarriersConcentrationReceiver2D

Provider class: plask.flow.CarriersConcentrationProvider2D

Data filter: plask.filter.CarriersConcentrationFilter2D

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


Receciver class: plask.flow.GainReceiver2D

Provider class: plask.flow.GainProvider2D

Data filter: plask.filter.GainFilter2D

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


Receciver class: plask.flow.TemperatureReceiver2D

Provider class: plask.flow.TemperatureProvider2D

Data filter: plask.filter.TemperatureFilter2D

### Provider Details¶

EffectiveIndex2D.outElectricField

Alias for outLightE.

EffectiveIndex2D.outHeat(mesh, interpolation='default')

Provider of the computed heat sources density [W/m³].

Parameters: mesh (mesh) – Target mesh to get the field at. interpolation (str) – Requested interpolation method. Data with the heat sources density on the specified mesh [W/m³].

Example

Connect the provider to a receiver in some other solver:

>>> other_solver.inHeat = solver.outHeat


Obtain the provided field:

>>> solver.outHeat(mesh)

EffectiveIndex2D.outLightE(n=0, mesh, interpolation='default')

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


Test the number of provided values:

>>> len(solver.outLightE)
3

EffectiveIndex2D.outLightMagnitude(n=0, mesh, interpolation='default')

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


Test the number of provided values:

>>> len(solver.outLightMagnitude)
3

EffectiveIndex2D.outNeff(n=0)

Provider of the computed effective index [-].

Parameters: n (int) – Value number. 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

EffectiveIndex2D.outRefractiveIndex(mesh, interpolation='default')

Provider of the computed refractive index [-].

Parameters: mesh (mesh) – Target mesh to get the field at. interpolation (str) – Requested interpolation method. 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)


### Attribute Details¶

EffectiveIndex2D.emission

Emission direction.

EffectiveIndex2D.geometry

Geometry provided to the solver

EffectiveIndex2D.id

Id of the solver object. (read only)

Example

>>> mysolver.id
mysolver:category.type

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

EffectiveIndex2D.mesh

Mesh provided to the solver.

EffectiveIndex2D.mirrors

Mirror reflectivities. If None then they are automatically estimated from theFresnel equations.

EffectiveIndex2D.modes

List of the computed modes.

Item Attributes

 neff Mode effective index. symmetry Mode symmetry (‘positive’, ‘negative’, or None). power Total power emitted into the mode [mW]. total_absorption Cumulated absorption for the mode [mW].
Return type: optical.effecticve.EffectiveIndex2D.Mode
EffectiveIndex2D.polarization

Polarization of the searched modes.

EffectiveIndex2D.root

Configuration of the root searching algorithm for horizontal component of the mode.

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. stairs Number of staircase iterations (Brent method only).
Return type: RootParams
EffectiveIndex2D.stripe_root

Configuration of the root searching algorithm for vertical component of the mode in a single stripe.

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. stairs Number of staircase iterations (Brent method only).
Return type: RootParams
EffectiveIndex2D.vat

Horizontal position of the main stripe (with dominant mode).

EffectiveIndex2D.vneff

Effective index in the vertical direction.

EffectiveIndex2D.wavelength

Current wavelength.