Fit Function: JRREC1

Fit Function \[\sigma(pt) = \frac{{\text{pcf}(2) \times 10^{-14} \sqrt{\frac{{\text{pcf}(1)}}{{13.58}}} \times \left(\frac{{\text{pcf}(1)}}{{pt}}\right)^{1.5}}}{{\frac{{\text{pcf}(1)}}{{pt}} + \text{pcf}(3)}}\]
Comments Python code requires NumPy imported as `np`.

Fortran

Arguments
namedescriptionunitstype(s)
pt electron temperature eV real, dimension(:)
pcf coefficient data array real, dimension(9)
kncf number of coefficients in the data array integer
pfit rate coefficient cm3 s-1 real, dimension(:)
kermsg error message character
Return values
namedescriptionunitstype(s)
pfit rate coefficient cm3 s-1 real, dimension(:)
Code
c
c###################################################################
c
      subroutine jrrec1(pt, pcf, kncf, pfit, kermsg)
c
c     this is a subroutine to calculate a reaction rate coefficient
c     in cm[3]/s as function of electron tempreature in ev for
c     radiative recombination.
c
c     pcf is the coefficient data array, where
c
c     pcf(1) =   the threshold energy for the transition
c
c     pcf(2)  =   coefficient a(nl)
c
c     pcf(3)  =   coefficient chi(nl)
c
c     pt = tempreature (ev)
c
c     kermsg = blank if no errors
c
c     pfit = reaction rate coefficient in cm[3]/s
c
c     written by j. j. smith , iaea atomic and molecular data unit
c
c------------------------------------------------------------------------
c
      double precision pt, pcf, pfit
      real n
      dimension pcf(3)
      character*(*) kermsg
      data ry/13.58/

      eth=pcf(1)
      a=pcf(2)
      chi=pcf(3)
      beta=eth/pt
c
      pfit = a * 1.0e-14 * sqrt(eth/ry) * (beta**1.5) / (beta + chi)
      return
c
      end

Python

Arguments
namedescriptionunitstype(s)
pt electron temperature eV float, np.ndarray
pcf coefficient data array float, np.ndarray
Return values
namedescriptionunitstype(s)
pfit rate coefficient cm3 s-1 float, np.ndarray
Code
def jrrec1(pt, pcf):
    """
    This function calculates the rate coefficients in cm3/s as a function of
    electron temperature in eV for radiative recombination.

        pt: Electron temperature (eV)
        pcf: Coefficient data array
            pcf[0]: Threshold energy for the transition
            pcf[1], pcf[2]: Fitting coefficients
    """

    ry = 13.58
    eth = pcf[0]
    beta = eth/pt

    pfit = pcf[1] * 1.0e-14 * np.sqrt(eth/ry) * (beta**1.5)/(beta + pcf[2])

    return pfit