ThresholdSearchBesselCyl
------------------------

.. xml:tag:: <meta solver="ThresholdSearchBesselCyl"> [ThresholdSearchBesselCyl]

   Corresponding Python class: :py:class:`meta.shockley.ThresholdSearchBesselCyl`.

   Solver for threshold search of semiconductor laser in cylindrical geometry.

   This solver performs thermo-electrical computations followed by determination ot threshold current and optical analysis in order to determine the threshold of a semiconductor laser. The search is performed by ``scipy`` root finding algorithm in order to determine the voltage and electric current ensuring no optical loss in the laser cavity.

   The optical computations are done with vector method based on Bessel exansion.

   :attr required name: Solver name.

   .. xml:contents::

      .. xml:tag:: <geometry> [in meta.ThresholdSearchBesselCyl]

         Geometry settings for all solvers.

         :attr required thermal: Geometry used by the thermal solver. (cylindrical geometry)
         :attr required electrical: Geometry used by the electrical, diffusion, and gain solvers. (cylindrical geometry)
         :attr required optical: Geometry used by the optical solver. (cylindrical geometry)

      .. xml:tag:: <mesh> [in meta.ThresholdSearchBesselCyl]

         Mesh settings for all solvers.

         :attr required thermal: Mesh used by the thermal solver. (mesh)
         :attr required electrical: Mesh used by the electrical solver. (mesh)
         :attr diffusion: Mesh used by the carriers diffusion solver. (mesh)
         :attr optical: Mesh used by the optical solver. (mesh)
         :attr empty-elements: Should empty regions (e.g. air) be included into electrical computations? (\ ``default``\ , \ ``include``\ , or \ ``exclude``\ , default is \ ``default``\ )

      .. xml:tag:: <optical> [in meta.ThresholdSearchBesselCyl]

         Configuration of the optical solver

         :attr m: Angular mode number \ *m*\  (0 for LP0x, 1 for LP1x, etc.). (int, default 1)
         :attr n: Radial mode number \ *n*\  (1 for LPx1, 2 for LPx2, etc.). (int, default 1)
         :attr lam0: 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. (float)
         :attr update-gain: If this attribute is set to 'yes', material parameters are always recomputed for layers with gain or permittivity provided by inEpsilon. This allows to set 'lam0' for better efficiency and still consider slight changes of wavelength, where it matters the most. (bool, default is \ ``no``\ )
         :attr domain: Computational domain. If set to finite, the field is expanded in Fourier-Bessel series over a finite domain (geometry + PMLs). For infinite domain, the field is represented by its Hankel transform. (\ ``finite``\  or \ ``infinite``\ , default is \ ``infinite``\ )
         :attr size: Expansion size. (int, default 12)
         :attr group-layers: Should similar layers be grouped for better performance. (bool, default is \ ``yes``\ )
         :attr k-method: Method of selecting wavevectors for numerical Hankel transform in infinite domain. (\ ``uniform``\ , \ ``laguerre``\ , or \ ``manual``\ , default is \ ``uniform``\ )
         :attr k-scale: Scale factor for wavevectors used in infinite domain. Multiplied by the expansion size and divided by the geometry width it is a maximum considered wavevector. (float, default 10)
         :attr k-list: A list of relative wavevetors ranges. The numbers should be relative to the inverse of the structure width. The actual wavevectors used in the computations are the avrages of each two adjacent values specified here and the integration weights are the sizes of each interval. (list of floats)
         :attr transfer: Layers transfer algorithm. Can be either reflection transfer, admittance transfer or automatic, in which case the reflection computations will use reflection transfer and eigenmode search is done with admittance transfer. (\ ``auto``\ , \ ``reflection``\ , or \ ``admittance``\ , default is \ ``auto``\ )
         :attr lam: Initial wavelength for optical search. If this value is set, the computations are started from this value. If this value is set, the radial mode number \ *n*\  is ignored. Note that it is safer to leave this empty and allow the solver to look for it automatically, however, it may increase the time of optical computations. (float (nm))
         :attr maxlam: Maximum wavelength considered for the optical mode search. (float (nm))
         :attr dlam: Step, by which the wavelength is swept while searching for the approximate mode. (float (nm), default 0.05 nm)

      .. xml:tag:: <root> [in meta.ThresholdSearchBesselCyl]

         Configuration of the root-finder used in threshold search.

         :attr required bcond: Number of the voltage boundary condition to vary during the threshold search. (int)
         :attr vmin: Minimum voltage to search threshold for. It should be below the threshold. (float)
         :attr vmax: Maximum voltage to search threshold for. It should be above the threshold. (float)
         :attr vtol: Tolerance on voltage in the root search. (float (V), default 1e-05 V)
         :attr maxiter: Maximum number of root finding iterations. (int, default 50)

      .. xml:tag:: <voltage> [in meta.ThresholdSearchBesselCyl]

         Voltage boundary conditions. See subsection :ref:`sec-xpl-Boundary-conditions`.

      .. xml:tag:: <temperature> [in meta.ThresholdSearchBesselCyl]

         Temperature boundary conditions. See subsection :ref:`sec-xpl-Boundary-conditions`.

      .. xml:tag:: <heatflux> [in meta.ThresholdSearchBesselCyl]

         Heat Flux boundary conditions. See subsection :ref:`sec-xpl-Boundary-conditions`.

      .. xml:tag:: <convection> [in meta.ThresholdSearchBesselCyl]

         Convective boundary conditions. See subsection :ref:`sec-xpl-Boundary-conditions`.

         This boundary condition does not have \ *value*\  attribute. Use \ *coeff*\  for convection coefficient and \ *ambient*\  for ambient temperature instead.

      .. xml:tag:: <radiation> [in meta.ThresholdSearchBesselCyl]

         Radiative boundary conditions. See subsection :ref:`sec-xpl-Boundary-conditions`.

         This boundary condition does not have \ *value*\  attribute. Use \ *emissivity*\  for surface emissivity and \ *ambient*\  for ambient temperature instead.

      .. xml:tag:: <optical-interface> [in meta.ThresholdSearchBesselCyl]

         Matching interface position in the stack for optical solver.

         :attr position: Interface will be located as close as possible to the vertical coordinate specified in this attribute. (float (µm))
         :attr object: Name of the geometry object below which the interface is located. (geometry object)
         :attr path: Optional path name, specifying particular instance of the object given in the object attribute. (geometry path)

      .. xml:tag:: <optical-vpml> [in meta.ThresholdSearchBesselCyl]

         Vertical absorbing perfectly matched layer boundary conditions parameters.

         :attr factor: PML scaling factor. (complex, default is \ ``1-2j``\ )
         :attr dist: PML distance from the structure. (float (µm), default 10.0 µm)
         :attr size: PML size. (float (µm), default 2.0 µm)

      .. xml:tag:: <optical-pml> [in meta.ThresholdSearchBesselCyl]

         Side absorbing perfectly matched layer boundary conditions parameters.

         :attr factor: PML scaling factor. (complex, default 1.0)
         :attr shape: PML shape order (0 → flat, 1 → linearly increasing, 2 → quadratic, etc.). (float, default 1)
         :attr dist: PML distance from the structure. (float (µm), default 20.0 µm)
         :attr size: PML size. (float (µm), default 0.0 µm)

      .. xml:tag:: <junction> [in meta.ThresholdSearchBesselCyl]

         Configuration of the effective model of p-n junction.

         :attr beta#: Junction coefficients. This is an inverse of the junction thermal voltage. (float (1/V))
         :attr js#: Reverse bias current densities. (float (A/m\ :sup:`2`\ ))
         :attr pnjcond: Initial vertical conductivity of the junctions. (float (S/m), default 5.0 S/m)

      .. xml:tag:: <contacts> [in meta.ThresholdSearchBesselCyl]

         Properties of the contact layers.

         :attr pcond: p-contact conductivity. (float (S/m), default 5.0 S/m)
         :attr ncond: n-contact conductivity. (float (S/m), default 50.0 S/m)

      .. xml:tag:: <loop> [in meta.ThresholdSearchBesselCyl]

         Configuration of the self-consistent thermo-electric loop.

         :attr skip-thermal: Skip thermal computations. The structure is assumed to have a constant temperature \ *inittemp*\ . This can be used to look for the threshold under pulse laser operation. (bool, default is \ ``no``\ )
         :attr tfreq: Number of electrical iterations per single thermal step. As temperature tends to converge faster, it is reasonable to repeat thermal solution less frequently. (int, default 6)
         :attr inittemp: Initial temperature used for the first computation. (float (K), default 300 K)
         :attr maxterr: Maximum allowed temperature error. (float (K), default 0.05 K)
         :attr maxcerr: Maximum allowed current density error. (float (%), default 0.05 %)

      .. xml:tag:: <tmatrix> [in meta.ThresholdSearchBesselCyl]

         Matrix configuration for the thermal solver.

         :attr algorithm: Algorithm used for solving set of linear positive-definite equations. (\ ``cholesky``\ , \ ``gauss``\ , or \ ``iterative``\ , default is \ ``cholesky``\ )

         .. xml:tag:: <iterative> [in meta.ThresholdSearchBesselCyl]

            Parameters for iterative matrix solver. PLaSK uses `NSPCG`_ package for performing iterations. Please refer to its documentation for explanation of most of the settings.

            .. _NSPCG: https://web.ma.utexas.edu/CNA/NSPCG/

            :attr maxit: Maximum number of iterations. (int, default 1000)
            :attr maxerr: Maximum iteration error. (float, default 1e-6)
            :attr noconv: Desired behavior if the iterative solver does not converge. (\ ``error``\ , \ ``warning``\ , or \ ``continue``\ , default is \ ``warning``\ )
            :attr accelerator: Accelerator used for iterative matrix solver. (\ ``cg``\ , \ ``si``\ , \ ``sor``\ , \ ``srcg``\ , \ ``srsi``\ , \ ``basic``\ , \ ``me``\ , \ ``cgnr``\ , \ ``lsqr``\ , \ ``odir``\ , \ ``omin``\ , \ ``ores``\ , \ ``iom``\ , \ ``gmres``\ , \ ``usymlq``\ , \ ``usymqr``\ , \ ``landir``\ , \ ``lanmin``\ , \ ``lanres``\ , \ ``cgcr``\ , or \ ``bcgs``\ , default is \ ``cg``\ )
            :attr preconditioner: Preconditioner used for iterative matrix solver. (\ ``rich``\ , \ ``jac``\ , \ ``ljac``\ , \ ``ljacx``\ , \ ``sor``\ , \ ``ssor``\ , \ ``ic``\ , \ ``mic``\ , \ ``lsp``\ , \ ``neu``\ , \ ``lsor``\ , \ ``lssor``\ , \ ``llsp``\ , \ ``lneu``\ , \ ``bic``\ , \ ``bicx``\ , \ ``mbic``\ , or \ ``mbicx``\ , default is \ ``ic``\ )
            :attr nfact: This number initializes the frequency of partial factorizations. It specifies the number of linear system evaluations between factorizations. The default value is 1, which means that a factorization is performed at every iteration. (int, default 10)
            :attr ndeg: Degree of the polynomial to be used for the polynomial preconditioners. (int, default 1)
            :attr lvfill: Level of fill-in for incomplete Cholesky preconditioners. Increasing this value will result in more accurate factorizations at the expense of increased memory usage and factorization time. (int, default 0)
            :attr ltrunc: Truncation bandwidth to be used when approximating the inverses of matrices with dense banded matrices. An increase in this value means a more accurate factorization at the expense of increased storage. (int, default 0)
            :attr omega: Relaxation parameter. (float, default 1.0)
            :attr nsave: The number of old vectors to be saved for the truncated acceleration methods. (int, default 5)
            :attr nrestart: The number of iterations between restarts for the restarted acceleration methods. (int, default 100000)

            .. list-table:: Preconditioner choices:

             * - ``rich``

               - Richardson's method

             * - ``jac``

               - Jacobi method

             * - ``ljac``

               - Line Jacobi method

             * - ``ljacx``

               - Line Jacobi method (approx. inverse)

             * - ``sor``

               - Successive Overrelaxation

             * - ``ssor``

               - Symmetric SOR (can be used only with SOR accelerator)

             * - ``ic``

               - Incomplete Cholesky (default)

             * - ``mic``

               - Modified Incomplete Cholesky

             * - ``lsp``

               - Least Squares Polynomial

             * - ``neu``

               - Neumann Polynomial

             * - ``lsor``

               - Line SOR

             * - ``lssor``

               - Line SSOR

             * - ``llsp``

               - Line Least Squares Polynomial

             * - ``lneu``

               - Line Neumann Polynomial

             * - ``bic``

               - Block Incomplete Cholesky (ver. 1)

             * - ``bicx``

               - Block Incomplete Cholesky (ver. 2)

             * - ``mbic``

               - Modified Block Incomplete Cholesky (ver. 1)

             * - ``mbicx``

               - Modified Block Incomplete Cholesky (ver. 2)

            

            .. list-table:: Accelerator choices:

             * - ``cg``

               - Conjugate Gradient acceleration (default)

             * - ``si``

               - Chebyshev acceleration or Semi-Iteration

             * - ``sor``

               - Successive Overrelaxation (can use only SOR preconditioner)

             * - ``srcg``

               - Symmetric Successive Overrelaxation Conjugate Gradient Algorithm (can use only SSOR preconditioner)

             * - ``srsi``

               - Symmetric Successive Overrelaxation Semi-Iteration Algorithm (can use only SSOR preconditioner)

             * - ``basic``

               - Basic Iterative Method

             * - ``me``

               - Minimal Error Algorithm

             * - ``cgnr``

               - Conjugate Gradient applied to the Normal Equations

             * - ``lsqr``

               - Least Squares Algorithm

             * - ``odir``

               - ORTHODIR, a truncated/restarted method useful for nonsymmetric systems of equations

             * - ``omin``

               - ORTHOMIN, a common truncated/restarted method used for nonsymmetric systems

             * - ``ores``

               - ORTHORES, another truncated/restarted method for nonsymmetric systems

             * - ``iom``

               - Incomplete Orthogonalization Method

             * - ``gmres``

               - Generalized Minimal Residual Method

             * - ``usymlq``

               - Unsymmetric LQ

             * - ``usymqr``

               - Unsymmetric QR

             * - ``landir``

               - Lanczos/ORTHODIR

             * - ``lanmin``

               - Lanczos/ORTHOMIN or Biconjugate Gradient Method

             * - ``lanres``

               - Lanczos/ORTHORES or “two-sided” Lanczos Method

             * - ``cgcr``

               - Constrained Generalized Conjugate Residual Method

             * - ``bcgs``

               - Biconjugate Gradient Squared Method

      .. xml:tag:: <ematrix> [in meta.ThresholdSearchBesselCyl]

         Matrix configuration for the electrical solver.

         :attr algorithm: Algorithm used for solving set of linear positive-definite equations. (\ ``cholesky``\ , \ ``gauss``\ , or \ ``iterative``\ , default is \ ``cholesky``\ )

         .. xml:tag:: <iterative> [in meta.ThresholdSearchBesselCyl]

            Parameters for iterative matrix solver. PLaSK uses `NSPCG`_ package for performing iterations. Please refer to its documentation for explanation of most of the settings.

            .. _NSPCG: https://web.ma.utexas.edu/CNA/NSPCG/

            :attr maxit: Maximum number of iterations. (int, default 1000)
            :attr maxerr: Maximum iteration error. (float, default 1e-6)
            :attr noconv: Desired behavior if the iterative solver does not converge. (\ ``error``\ , \ ``warning``\ , or \ ``continue``\ , default is \ ``warning``\ )
            :attr accelerator: Accelerator used for iterative matrix solver. (\ ``cg``\ , \ ``si``\ , \ ``sor``\ , \ ``srcg``\ , \ ``srsi``\ , \ ``basic``\ , \ ``me``\ , \ ``cgnr``\ , \ ``lsqr``\ , \ ``odir``\ , \ ``omin``\ , \ ``ores``\ , \ ``iom``\ , \ ``gmres``\ , \ ``usymlq``\ , \ ``usymqr``\ , \ ``landir``\ , \ ``lanmin``\ , \ ``lanres``\ , \ ``cgcr``\ , or \ ``bcgs``\ , default is \ ``cg``\ )
            :attr preconditioner: Preconditioner used for iterative matrix solver. (\ ``rich``\ , \ ``jac``\ , \ ``ljac``\ , \ ``ljacx``\ , \ ``sor``\ , \ ``ssor``\ , \ ``ic``\ , \ ``mic``\ , \ ``lsp``\ , \ ``neu``\ , \ ``lsor``\ , \ ``lssor``\ , \ ``llsp``\ , \ ``lneu``\ , \ ``bic``\ , \ ``bicx``\ , \ ``mbic``\ , or \ ``mbicx``\ , default is \ ``ic``\ )
            :attr nfact: This number initializes the frequency of partial factorizations. It specifies the number of linear system evaluations between factorizations. The default value is 1, which means that a factorization is performed at every iteration. (int, default 10)
            :attr ndeg: Degree of the polynomial to be used for the polynomial preconditioners. (int, default 1)
            :attr lvfill: Level of fill-in for incomplete Cholesky preconditioners. Increasing this value will result in more accurate factorizations at the expense of increased memory usage and factorization time. (int, default 0)
            :attr ltrunc: Truncation bandwidth to be used when approximating the inverses of matrices with dense banded matrices. An increase in this value means a more accurate factorization at the expense of increased storage. (int, default 0)
            :attr omega: Relaxation parameter. (float, default 1.0)
            :attr nsave: The number of old vectors to be saved for the truncated acceleration methods. (int, default 5)
            :attr nrestart: The number of iterations between restarts for the restarted acceleration methods. (int, default 100000)

            .. list-table:: Preconditioner choices:

             * - ``rich``

               - Richardson's method

             * - ``jac``

               - Jacobi method

             * - ``ljac``

               - Line Jacobi method

             * - ``ljacx``

               - Line Jacobi method (approx. inverse)

             * - ``sor``

               - Successive Overrelaxation

             * - ``ssor``

               - Symmetric SOR (can be used only with SOR accelerator)

             * - ``ic``

               - Incomplete Cholesky (default)

             * - ``mic``

               - Modified Incomplete Cholesky

             * - ``lsp``

               - Least Squares Polynomial

             * - ``neu``

               - Neumann Polynomial

             * - ``lsor``

               - Line SOR

             * - ``lssor``

               - Line SSOR

             * - ``llsp``

               - Line Least Squares Polynomial

             * - ``lneu``

               - Line Neumann Polynomial

             * - ``bic``

               - Block Incomplete Cholesky (ver. 1)

             * - ``bicx``

               - Block Incomplete Cholesky (ver. 2)

             * - ``mbic``

               - Modified Block Incomplete Cholesky (ver. 1)

             * - ``mbicx``

               - Modified Block Incomplete Cholesky (ver. 2)

            

            .. list-table:: Accelerator choices:

             * - ``cg``

               - Conjugate Gradient acceleration (default)

             * - ``si``

               - Chebyshev acceleration or Semi-Iteration

             * - ``sor``

               - Successive Overrelaxation (can use only SOR preconditioner)

             * - ``srcg``

               - Symmetric Successive Overrelaxation Conjugate Gradient Algorithm (can use only SSOR preconditioner)

             * - ``srsi``

               - Symmetric Successive Overrelaxation Semi-Iteration Algorithm (can use only SSOR preconditioner)

             * - ``basic``

               - Basic Iterative Method

             * - ``me``

               - Minimal Error Algorithm

             * - ``cgnr``

               - Conjugate Gradient applied to the Normal Equations

             * - ``lsqr``

               - Least Squares Algorithm

             * - ``odir``

               - ORTHODIR, a truncated/restarted method useful for nonsymmetric systems of equations

             * - ``omin``

               - ORTHOMIN, a common truncated/restarted method used for nonsymmetric systems

             * - ``ores``

               - ORTHORES, another truncated/restarted method for nonsymmetric systems

             * - ``iom``

               - Incomplete Orthogonalization Method

             * - ``gmres``

               - Generalized Minimal Residual Method

             * - ``usymlq``

               - Unsymmetric LQ

             * - ``usymqr``

               - Unsymmetric QR

             * - ``landir``

               - Lanczos/ORTHODIR

             * - ``lanmin``

               - Lanczos/ORTHOMIN or Biconjugate Gradient Method

             * - ``lanres``

               - Lanczos/ORTHORES or “two-sided” Lanczos Method

             * - ``cgcr``

               - Constrained Generalized Conjugate Residual Method

             * - ``bcgs``

               - Biconjugate Gradient Squared Method

      .. xml:tag:: <diffusion> [in meta.ThresholdSearchBesselCyl]

         Diffusion solver configuration.

         :attr fem-method: Order of the finite-element method. (\ ``linear``\  or \ ``parabolic``\ , default is \ ``parabolic``\ )
         :attr accuracy: Required relative accuracy. (float (%), default 0.01 %)
         :attr abs-accuracy: Required absolute minimal concentration accuracy. (float (cm\ :sup:`-3`\ ), default 5000000000000000.0 cm\ :sup:`-3`\ )
         :attr maxiters: Maximum number of allowed iterations before attempting to refine mesh. (int, default 20)
         :attr maxrefines: Maximum number of allowed mesh refinements. (int, default 5)
         :attr interpolation: Current density interpolation method name. (\ ``linear``\  or \ ``spline``\ , default is \ ``spline``\ )

      .. xml:tag:: <gain> [in meta.ThresholdSearchBesselCyl]

         Gain solver parameters.

         :attr lifetime: Average carriers lifetime. This parameter is used for gain spectrum broadening. (float (ps), default 0.1 ps)
         :attr matrix-elem: Value of the squared matrix element in gain computations. If it is not set it is estimated automatically. (float (eV×m\ :sub:`0`\ ))
         :attr strained: Boolean attribute indicating if the solver should consider strain in the active region. If set to \ *yes*\  then there must a layer with the role "\ *substrate*\ " in the geometry. The strain is computed by comparing the atomic lattice constants of the substrate and the quantum wells. (bool, default is \ ``no``\ )

      .. xml:tag:: <optical-root> [in meta.ThresholdSearchBesselCyl]

         Parameters of the root-finding algorithm in optical solver.

         :attr method: Root finding algorithm. (\ ``muller``\ , \ ``broyden``\ , or \ ``brent``\ , default is \ ``muller``\ )
         :attr tolx: Maximum change of the effective frequency parameter which is allowed for convergent solution. (float, default 1e-06)
         :attr tolf-min: Minimum value of the determinant sufficient to assume convergence. (float, default 1e-07)
         :attr tolf-max: Maximum value of the determinant required to assume convergence. (float, default 1e-05)
         :attr maxstep: Maximum step in one iteration of root finding. Significant for the Broyden's method only. (float, default 0.1)
         :attr maxiter: Maximum number of root finding iterations. (int, default 500)
         :attr alpha: Parameter ensuring sufficient decrease of determinant in each step (Broyden method only). (float, default 1e-07)
         :attr lambda: Minimum decrease ratio of one step (Broyden method only). (float, default 1e-08)
         :attr initial-range: Initial range size (Muller method only). (complex, default 0.001)

      .. xml:tag:: <output> [in meta.ThresholdSearchBesselCyl]

         Settings for the solver output.

         :attr optical-res-x: Number of points along the horizontal axis for the saved and plotted optical field. (int, default 800)
         :attr optical-res-y: Number of points along the vertical axis for the saved and plotted optical field. (int, default 600)
