The state of the gas is defined by its temperature and by the ionic level populations. As a practical matter, we maintain the distinction between the total abundance of a given ion relative to its parent element (the ion fraction or fractional abundance) and the relative populations of the various bound levels of that ion (level populations), although such distinctions are somewhat arbitrary given the presence of transitions linking non-adjacent ion stages and excited levels of adjacent ions.

Calculation of level populations proceeds in 2 steps. First, a calculation of ion fractions is performed using total ionization and recombination rates into and out of each ion analogous to those used in XSTAR v.1 (KM82). Then we eliminate ions with abundance less than a fixed fraction relative to hydrogen from further consideration. Experimentation has shown that (as parameterized by the input parameter critf) yields gas temperatures within 1 of those calculated using a larger set of ions for most situations when the density is low. This criterion leads to ion sets which can include up to 10 stages for heavy elements such as iron and nickel. We also make sure that the selected ions are all adjacent. i.e. we force the inclusion of ions which fall below our threshold if they are bracketed by ions which satisfy the abundance crterion.

The second step consists of solving the full kinetic equation matrix linking the various levels of the ions selected in step 1. We include all processes in the database which link the bound levels of any ion in our selected set with any other level, and also including the bare nucleus as the continuum level for the hydrogenic ion, if indicated. This results in a matrix with dimensionality which may be as large as 2400. The equations may be written schematically as for each level. In place of the equation for the ground level of the most abundant ion we solve the number conservation constraint.

We include collisional and radiative bound-bound transitions (with continuum photoexcitation), collisional ionization, photoionization and recombination for all the levels of every ion for which the required atomic rate data is available. The effects of line scattering in all transitions are accounted for by taking into account the fact that line scattering reduces the net decay rate by repeated absorption and reemission of the line photon. An analogous procedure is used for free-bound (recombination) transitions.