  We investigate the thermodynamics of the ISM and the formation of molecular
hydrogen through numerical simulations of spiral galaxies. The model follows
the chemical, thermal and dynamical response of the disc to an external spiral
potential. Self-gravity and magnetic fields are not included. The calculations
demonstrate that gas can cool rapidly when subject to a spiral shock. Molecular
clouds in the spiral arms arise through a combination of compression of the ISM
by the spiral shock and orbit crowding. These results highlight that local
self-gravity is not required to form molecular clouds. Self-shielding provides
a sharp transition density, below which gas is essentially atomic, and above
which the molecular gas fraction is >0.001. The timescale for gas to move
between these regimes is very rapid (<~1 Myr). From this stage, the majority of
gas generally takes between 10 to 20 Myr to obtain high H$_{2}$ fractions (>50
%). Although our calculations are unable to resolve turbulent motions on scales
smaller than the spiral arm and do not include self-gravity. True cloud
formation timescales are therefore expected to be even shorter.
  The mass budget of the disc is dominated by cold gas residing in the spiral
arms. Between 50 and 75 % of this gas is in the atomic phase. When this gas
leaves the spiral arm and drops below the self-shielding limit it is heated by
the galactic radiation field. Consequently, most of the volume in the interarm
regions is filled with warm atomic gas. However, some cold spurs and clumps can
survive in interarm regions for periods comparable to the interarm passage
timescale. Altogether between 7 and 40% of the gas in our disc is molecular,
depending on the surface density of the calculation, with approximately 20%
molecular for a surface density comparable to the solar neighbourhood.

Astrophysics