The implementation of the total free-bound Gaunt factor in fiasco#

The calculation of the wavelength-averaged total free-bound Gaunt factor, \(G_{fb}\), as suggested by Mewe et al. [MLvandOord86] and used in CHIANTI to compute the total free-bound radiative losses (fiasco.Ion.free_bound_radiative_loss()) makes an approximation to an infinite sum that can be improved upon. Specifically, Equation 14 of Mewe et al. [MLvandOord86] has a simple analytic solution. They make the approximation,

\[f_{1}(Z, n, n_{0} ) = \sum_{1}^{\infty} n^{-3} - \sum_{1}^{n_{0}} n^{-3} = \zeta(3) - \sum_{1}^{n_{0}} n^{-3} \approx 0.21 n_{0}^{-1.5}\]

where \(\zeta(x)\) is the Riemann zeta function. However, the second sum is analytic,

\[\sum_{1}^{n_{0}} n^{-3} = \zeta(3) + \frac{1}{2}\psi^{(2)}(n_{0}+1)\]

where \(\psi^{n}(x)\) is the \(n\)-th derivative of the digamma function (or polygamma function). As such, we can write the full solution of Equation 14 as,

\[f_{1}(Z, n, n_{0}) = \zeta(3) - \sum_{1}^{n_{0}} n^{-3} = - \frac{1}{2}\psi^{(2)}(n_{0}+1)\]

The final expression is therefore simplified and more accurate than the approximation used by Mewe et al. [MLvandOord86].

Note also that, unlike in Mewe et al. [MLvandOord86], the calculation of the total free-bound Gaunt factor, used by free_bound_radiative_loss(), does not include the abundances and ionization equilibria.