Heating and cooling rates depend on density via the ionization balance and via the rates for the heating and cooling per ion. In the previous subsection we have shown that at the highest densities we consider the recombination rates can be enhanced by 3 body recombination, or reduced, by continuum lowering and collisional ionization. The former process is dominant at high densities for H I and He I, while the latter dominates for moderate densities for other ions. Since the thermal balance in a photoionized gas is dominated by H and He when the ionization parameter is low (i.e. log(), and by more highly charged ions at higher , we expect the heating and cooling to be affected differently at high densities in the two different regimes. Although the dependence of cooling rate on ionization balance at low densities is not generally monotonic (c.f. figure 6), for many ions the heating rate is greater at lower ionization parameter. The per ion heating rate depends on the photon flux rather than the gas density, while the per ion cooling rate is suppressed by collisional deexcitation. Figure 11 shows the dependence of heating and cooling rates on density and temperature, in a form analogous to that of figure 10. Curves show cooling (dashed) and heating (solid) rates at 5 temperatures spaced logarithmically between between 10K and 10 K, for log()=2 and a power law ionizing spectrum. For highly ionized species heating rates are decrease slightly with density, while cooling rates increase. H and He I behave in the opposite way, owing to the increase in recombination (which increases the neutral fraction and hence the photoionization heating) and to the collisional suppression of radiative decays (which decreases the net radiative cooling).