  The ionization state of the gas in the dynamic solar chromosphere can depart
strongly from the instantaneous statistical equilibrium commonly assumed in
numerical modeling. We improve on earlier simulations of the solar atmosphere
that only included non-equilbrium hydrogen ionization by performing a 2D
radiation-magneto-hydrodynamics simulation featuring non-equilibrium ionization
of both hydrogen and helium. The simulation includes the effect of hydrogen
Lyman-$\alpha$ and the EUV radiation from the corona on the ionization and
heating of the atmosphere. Details on code implementation are given. We obtain
helium ion fractions that are far from their equilibrium values. Comparison
with models with LTE ionization shows that non-equilibrium helium ionization
leads to higher temperatures in wave fronts and lower temperatures in the gas
between shocks. Assuming LTE ionization results in a thermostat-like behaviour
with matter accumulating around the temperatures where the LTE ionization
fractions change rapidly. Comparison of DEM curves computed from our models
shows that non-equilibrium ionization leads to more radiating material in the
temperature range 11-18 kK compared to models with LTE helium ionization. We
conclude that non-equilbrium helium ionization is important for the dynamics
and thermal structure of the upper chromosphere and transition region. It might
also help resolve the problem that intensities of chromospheric lines computed
from current models are smaller than those observed.
