  We describe similarity solutions that characterize the collapse of
collisional gas onto scalefree perturbations in an Einstein-de Sitter universe.
We consider the effects of radiative cooling and derive self-similar solutions
under the assumption that the cooling function is a power law of density and
temperature, $\Lambda(T,\rho) \propto \rho^{3/2} T$. We use these results to
test the ability of Smooth Particle Hydrodynamics (SPH) techniques to follow
the collapse and accretion of shocked, rapidly cooling gas in a cosmological
context. Our SPH code reproduces the analytical results very well in cases that
include or exclude radiative cooling. No substantial deviations from the
predicted central mass accretion rates or from the temperature, density, and
velocity profiles are observed in well resolved regions inside the shock
radius. This test problem lends support to the reliability of SPH techniques to
model the complex process of galaxy formation.
