  We present a code for modelling the ionization conditions of optically thin
astrophysical gas structures. Given the gas hydrogen density, equilibrium
temperature, elemental abundances, and the ionizing spectrum, the code solves
the equilibrium ionization fractions and number densities for all ions from
hydrogen to zinc. The included processes are photoionization, Auger ionization,
direct collisional ionization, excitation auto-ionization, charge exchange
ionization, two-body radiative recombination, dielectronic recombination, and
charge exchange recombination. The ionizing spectrum can be generalized to
include the ultraviolet background (UVB) and/or Starburst99 stellar populations
of various masses, ages, metallicities, and distances. The ultimate goal with
the code is to provide fast computation of the ionization conditions of gas in
N-body + hydrodynamics cosmological simulations, in particular adaptive mesh
refinement codes, in order to facilitate absorption line analysis of the
simulated gas for comparison with observations. To this end, we developed a
method to linearize the rate equations and efficiently solve the rate matrix
with a minimum number of iterations. Comparing the code to Cloudy 13.03
(Ferland), we find that the hydrogen and helium ionization fractions and the
metal species ionization corrections are in excellent agreement. We discuss the
science drivers and plans for further development of the ionization code to a
full radiative hydrodynamic routine that can be employed for processing the
simulations. A stand-alone version of the code has been made publicly available
(http://astronomy.nmsu.edu/cwc/Software/Ioncode/).
