  We introduce the PRISM interstellar medium (ISM) model for thermochemistry
and its implementation in the RAMSES-RTZ code. The model includes a
non-equilibrium primordial, metal, and molecular chemistry network for 115
species coupled to on-the-fly multifrequency radiation transport. PRISM
accurately accounts for the dominant ISM cooling and heating processes in the
low-density regime (i.e. $\rho<10^5\ {\rm cm^{-3}}$), including photoheating,
photoelectric heating, H$_2$ heating/cooling, cosmic-ray heating, H/He cooling,
metal-line cooling, CO cooling, and dust cooling (recombination and gas-grain
collisions). We validate the model by comparing 1D equilibrium simulations
across six dex in metallicity to existing 1D ISM models in the literature. We
apply PRISM to high-resolution (4.5 pc) isolated dwarf galaxy simulations that
include state-of-the-art models for star formation and stellar feedback to take
an inventory of which cooling and heating processes dominate each different gas
phase of a galaxy and to understand the importance of non-equilibrium effects.
We show that most of the ISM gas is either close to thermal equilibrium or
exhibits a slight cooling instability, while from a chemical perspective, the
non-equilibrium electron fraction is often more than three times higher or
lower than the equilibrium value, which impacts cooling, heating, and
observable emission lines. Electron enhancements are attributed to
recombination lags while deficits are shown to be due to rapid cosmic-ray
heating. The PRISM model and its coupling to RAMSES-RTZ is applicable to a wide
variety of astrophysical scenarios, from cosmological simulations to isolated
giant molecular clouds, and is particularly useful for understanding how
changes to ISM physics impact observable quantities such as metallic emission
lines.
