Baryons are initially distributed near uniformly  they are expected to trace the dark matter distribution on scales above the Jeans length (Arons and Silk 1968; Gnedin and Hui 1998). To form galaxies they must first be concentrated by the forces of gravity which are dominated by the distribution of dark matter. In particular, we expect that baryons will concentrate towards the deep potential wells of dark matter halos. These should therefore be the sites of galaxy formation.
3.1. Cold or Hot Accretion (Shocks)
Baryonic material will be dragged along by the gravitationally dominant dark matter such that dark matter halos are expected to accrete baryonic material. How much baryonic material they accrete depends upon the depth of their potential well and the pressure of the baryons.
According to Okamoto et al. (2008a), the mass of baryons which accrete from the intergalactic medium into a galaxy halo during some interval t after the Universe has been reionized (i.e. the hydrogen content of the Universe has been almost fully ionized as a result of emission from stars and active galactic nuclei (AGN)) is given by
(10) 
where M_{acc} is given below,
(11) 
and where the sum is taken over all progenitors of the current halo, and t_{evp} is the timescale for gas to evaporate from the progenitor halo and is given by
(12) 
where T_{evp} is the temperature below which gas will be heated and evaporated from the halo, c_{s} is the sound speed in the halo gas. Okamoto et al. (2008a) compute T_{evp} by finding the equilibrium temperature of gas at an overdensity of _{evp} = 10^{6}. The accreted mass, M_{acc}, is given by
(13) 
Here, T_{acc} is the larger of T_{eq} and the temperature of intergalactic medium gas adiabatically compressed to the density of accreting gas where T_{eq} is the equilibrium temperature at which radiative cooling balances photoheating for gas at the density expected at the virial radius, for which Okamoto et al. (2008a) use one third of the halo overdensity.
An accretion shock is a generic expectation whenever the gas accretes supersonically as it will do if the halo virial temperature exceeds the temperature of the accreting gas (Binney 1977a). Models of accretion shocks have been presented by several authors (Bertschinger 1985; Tozzi and Norman 2001; Voit et al. 2003; Book and Benson 2010) with the general conclusion that the shock occurs at a radius comparable to (or perhaps slightly larger than) the virial radius when cooling times are long compared to dynamical times. In the other limit of short cooling times, it has long been understood that the shock must instead form at much smaller radii, close to the forming galaxy (Rees and Ostriker 1977, White and Frenk 1991). For example, according to Rees and Ostriker (1977): "Unless pregalactic clouds collapse in an exceedingly homogeneous fashion, their kinetic energy of infall will be thermalized by shocks before collapse has proceeded by more than a factor ~ 2. What happens next depends on the relative value of the cooling and collapse timescales. Masses in the range 10^{10}  10^{12} M_{} cool so efficiently that they always collapse at the freefall rate, and probably quickly fragment into stars. Larger masses may, however, experience a quasistatic contraction phase...". Thus, Rees and Ostriker (1977) clearly understood the difference between the rapid inflow and hydrostatic cooling regimes, and correctly identified the transition mass, suggesting that this be identified this with the characteristic stellar mass of galaxies. Accretion in these two regimes may be expected to result in very different spatial and spectral distributions of cooling radiation, leading to the possibility of observationally distinguishing the two types of accretion (Fardal et al. 2001).
The distinction between these two regimes has always been an integral part of analytic models of galaxy formation, beginning with Rees and Ostriker (1977). For example, White and Frenk (1991) introduced a transition between rapid and slow cooling regimes at the point where cooling and virial radii become equal, or, equivalently, the point at which cooling and dynamical times at the halo virial radius become equal. In the rapid cooling regime, the accretion rate of gas into the central galaxy was then determined by the cosmological infall rate, while in the slow cooling regime the accretion rate was determined by the cooling time in the gas. Their Figure 2 illustrates that the rapid cooling regime will occur in low mass halos and at high redshifts. All subsequent semianalytic models of galaxy formation (e.g. Kauffmann et al. 1993, Cole et al. 1994) have adopted this prescription, or some variant of it, and it has also been validated by 1D hydrodynamical simulations (e.g ForcadaMiro and White 1997). The validity of this prescription has been confirmed by studies which compared its predictions for the condensed masses of galaxies with those from smoothed particle hydrodynamics simulations across the boundary of the rapid to slow cooling transition (Benson et al. 2001b, Yoshida et al. 2002, Helly et al. 2003b), although it should be noted that the accuracy of these comparisons is less than that at which semianalytic models are now being used.
Recent work has once again focused on the formation of accretion shocks. Recent 3D hydrodynamical simulations (Fardal et al. 2001; see also Keres et al. 2005, Ocvirk et al. 2008, Keres et al. 2009), have suggested that a significant fraction of gas in low mass galaxies has never been shock heated (at least within regions adequately resolved by the simulations; for example numerical simulations may not adequately resolve shocks in the radiative regime due to artificial viscosity, numerical diffusion and other numerical artifacts; Agertz et al. 2007). Motivated by these results Birnboim and Dekel (2003) developed an analytic treatment of accretion shock stability ^{4}. The accretion shock relies on the presence of a stable atmosphere of postshock gas to support itself. If cooling times in the postshock gas are sufficiently short, this atmosphere cools and collapses and can no longer support the shock. The shock therefore shrinks to smaller radii, where it can be stable. Birnboim and Dekel (2003) find that
(14) 
where is gas density, (T) is the cooling function for gas at temperature T, T_{1} = (3/16)µ u_{0}^{2} / k_{b} N_{a} is the postshock temperature and u is the infall velocity, all evaluated for the preshock gas at radius r, is required for the shock to be stable ^{5}. For cosmological halos this implies that shocks can only form close to the virial radius in halos with mass greater than 10^{11} M_{} for primordial gas (or around 10^{12} M_{} for gas of Solar metallicity). These values are found to depend only weakly on redshift and are in good agreement with the results of hydrodynamical simulations. It is crucial to note that these new criteria are equivalent to that of White and Frenk (1991) up to factors of order unity.
As a result, in low mass halos gas tends to accrete into halos "cold ^{6}"  never being shock heated to the virial temperature and proceeding to flow along filaments towards the center of the halo where it will eventually shock ^{7}. Halos which do support shocks close to the virial radius are expected to contain a quasihydrostatic atmosphere of hot gas. The structure of this atmosphere is determined by the entropy that the gas gains at the accretion shock and that may be later modified by radiative cooling and feedback (Voit et al. 2003; McCarthy et al. 2007). In practice, the transition from rapid to slow cooling regimes is not sharp  halos able to support a shock at their virial radius still contain some unshocked gas; because the halos retain a memory of past accretion and because cold filaments may penetrate through the hot halo. At high redshifts in particular, the "cold" accretion mode may be active even in halos whose accretion of gas is primarily via an accretion shock close to the virial radius.
The consequences of rapid vs. slow cooling regimes for the properties of the galaxy forming warrant further study. As Croton et al. (2006) have stressed, the absence of a more detailed treatment of the rapid cooling regime may not be important since, by definition the gas accretion rate in small halos is limited by the growth of the halo rather than by the system's cooling time. In contrast, Brooks et al. (2009) demonstrate in hydrodynamical simulations that in the rapid cooling regime accreted gas can reach the galaxy more rapidly, by virtue of the fact that it does not have to cool but instead merely has to freefall to the center of the halo (starting with a velocity comparable to the virial velocity). This results in earlier star formation than if all gas were assumed to be initially shock heated to the virial temperature close to the virial radius of the halo. It is also clear that the situation needs to be carefully reassessed in the presence of effective feedback schemes that prevent excessive star formation, particularly in the high redshift universe.
While hot atmospheres of gas are clearly present in massive systems such as groups and clusters of galaxies (where the hot gas is easily detected by virtue of its Xray emission), observational evidence for hot atmospheres of gas arising from cosmological infall surrounding lower mass systems, such as massive but isolated galaxies is sparse. Interesting upper limits have been placed on the Xray emission from massive, nearby spiral galaxies (Benson et al. 2000b; Rasmussen et al. 2009), and the hot component of the Milky Way's halo is constrained by the ram pressure that it exerts on the Magellanic Stream (Moore and Davis 1994; Mastropietro et al. 2005b). Additionally, ultraviolet line detections of the socalled warmhot intergalactic medium (intergalactic gas at temperatures of 10^{5}  10^{6} K) show that some of this material must lie close to the Milky Way (Wang et al. 2005; Williams et al. 2006). What is known is that the Milky Way's halo contains a significant mass of cold, neutral gas in the form of high velocity clouds (Putman et al. 2003). This may indicate, as expected on theoretical grounds (Crain et al. 2009), that the Milky Way is in the transition mass range between purely cold and purely hot accretion.
Gas which does experience a strong virial shock will have its kinetic infall energy thermalized and therefore be heated to of order the virial temperature
(15) 
This gas will proceed to form a hydrostatically supported atmosphere obeying the usual hydrostatic equilibrium equation:
(16) 
where P is the gas pressure, (r) the gas density and M(r) the total (i.e. dark matter plus baryonic) mass within radius r. This distribution may be modified, particularly on small scales, by other contributors to supporting the halo against gravity, such as turbulence (Frenk et al. 1999), cosmic ray pressure (Guo and Oh 2008) and magnetic pressure (Gonçalves and Friaça 1999). In any case, the resulting hot atmosphere will fill the dark matter halo with a density still several orders of magnitude lower than typical galactic densities. In the absence of any dissipitative process, the gas would remain in this state indefinitely. Fortunately, however, gas is able to cool radiatively and so will eventually lose energy and, consequently, pressure support, at which point it must fall towards the center of the gravitational potential of the dark matter halo thereby increasing its density. Gas which does not experience a shock close to the virial radius can fall almost ballistically towards the halo center. It must still lose its infall energy at some point, however, shocking closer to the halo center near the forming galaxy. As such, it too will eventually be heated and must cool down (although it will presumably do so much more rapidly due to its higher density).
In the remainder of this subsection we will review the various mechanisms by which such gas cools.
For metal rich gas, or gas hot enough to begin to collisionally ionize hydrogen (i.e. T 10^{4} K), the primary cooling mechanisms at low redshifts are a combination of various atomic processes including recombination radiation, collisional excitation and subsequent decay and Bremmsstahlung. In the absence of any external radiation field (see Section 3.3.1), these are all twobody processes and so the cooling rate is expected to scale as the square of the density for gas of fixed chemical composition and temperature. It is usual, therefore, to write the cooling rate per unit volume of gas as
(17) 
where n_{H} is the number density of hydrogen (both neutral and ionized) and (T, Z) is the "cooling function" and depends on temperature and chemical composition. Typically, the chemical composition is described by a single number, the metallicity Z (defined as the mass fraction of elements heavier than helium), and an assumed set of abundance ratios (e.g. primordial or Solar). The cooling function can then be found by first solving for the ionization state of the gas assuming collisional ionization equilibrium and then summing the cooling rates from the various above mentioned cooling mechanisms. Such calculations can be carried out by using, for example, Cloudy (Ferland et al. 1998). Examples of cooling functions computed in this way are shown in Fig. 1.
In detail, the cooling function depends not just on the overall metallicity, but on the detailed chemical composition of the gas. If the abundances of individual elements are known, the corresponding cooling function is easily calculated. In theoretical calculations of galaxy formation it is often computationally impractical to follow the abundance of numerous chemical species in a large number of galaxies and dark matter halos. Fortunately, MartínezSerrano et al. (2008) have demonstrated that an optimal linear combination of abundances, which minimizes the variance between cooling/heating rates computed using that linear combination as a parameter and a full calculation using all abundances, provides very accurate estimates of cooling rates. The best linear combination turns out to be a function of temperature. This reduces the problem to tracking the optimal combination of elements for a small number of temperatures. This number can then be used in place of metallicity when computing cooling functions.
Most calculations of cooling rates in cosmological halos assume that the gas is in collisional or photoionization equilibrium. Even if the gas begins in such a state, as it cools it can drift away from equilibrium as, particularly at low temperatures, the ionelectron recombination timescales can significantly exceed the cooling timescales  as such, the ionization state always lags behind the equilibrium state due to the rapidly changing gas temperature. Figure 2 shows calculations of effective cooling functions for gas initially in collisional ionization equilibrium (and with no external radiation field) with a fully timedependent calculation of cooling and ionization state (Gnat and Sternberg 2007). Significant differences can be seen, resulting in cooling timescales being a factor of 23 longer when nonequilibrium effects are taken into account.
Figure 2. A comparison of cooling functions
for gas in collisional ionization equilibrium (upper panel) with
effective cooling functions for gas in which the timedependent
ionization state is computed throughout the cooling (lower panel). Line
types indicate different metallicities (shown in the upper panel,
values in units of Solar metallicity), while IB and IC labels indicate
whether the gas was assumed to be cooling isobarically or
isochorically. The primary coolant at each temperature is indicated in
the upper panel. 
At high redshifts, the density of cosmic microwave background photons becomes sufficiently high that the frequent Compton scattering of these photons from electrons in the ionized plasma inside dark matter halos results in significant cooling of that plasma (assuming that its temperature exceeds that of the cosmic microwave background). The Compton cooling timescale is given by (Peebles (1968))
(18) 
where x_{e} = n_{e} / n_{t}, n_{e} is the electron number density, n_{t} is the number density of all atoms and ions, T_{CMB} is the CMB temperature and T_{e} is the electron temperature of the gas. Unlike the various atomic cooling processes described in Section 3.2.1, the Compton cooling rate per unit volume does not scale as the square of the particle density, since it involves an interaction between a particle and a cosmic microwave background photon. Since the CMB photon density is the same everywhere, independent of the local gas density, the Compton cooling rate scales linearly with density. As a result, the Compton cooling timescale is independent of gas density. Thus, if gas in a dark matter halo is able to cool via Compton cooling, it can do so at all radii (assuming that it is isothermal and has the same electron fraction everywhere).
In a Universe with WMAP 5 yr cosmological parameters, the Compton cooling time is less than the age of the Universe above z 6.
3.2.3. Molecular Hydrogen Cooling
Somewhat ironically, the gas in dark matter halos at the highest redshifts is too cold to cool any further. In halos with virial temperatures below 10^{4} K even shock heated gas (if shocks can occur) will be mostly neutral and therefore unable to cool via the usual atomic processes described in Section 3.2.1. Studies show that the dominant coolant in such cases becomes the small fraction of hydrogen in the form of molecular hydrogen (Abel et al. 1997). Cooling via molecular hydrogen is crucial for the formation of the first stars (Abel et al. 2002) and galaxies (Bromm et al. 2009) and, therefore, for the sources which cause the reionization of the Universe (Benson et al. 2006; Wise and Abel 2008a). The details of molecular hydrogen cooling are more complicated than those of atomic cooling: in addition to uncertainties in the molecular chemistry (Glover and Abel 2008), in many cases equilibrium is not reached and the photon background can lead to both negative (Wise and Abel 2007a) and positive (Ricotti et al. 2001) feedbacks.
Cosmologically, molecular hydrogen forms via the gasphase reactions (McDowell 1961):
(19) 
and
(20) 
Our discussion of molecular hydrogen cooling will mostly follow Yoshida et al. (2006).
The molecular hydrogen cooling timescale is found by first estimating the abundance, f_{H2,c}, of molecular hydrogen that would be present if there is no background of H_{2}dissociating radiation from stars. For gas with hydrogen number density n_{H} and temperature T_{v} the fraction is (Tegmark et al. 1997):
(21) 
where T_{3} is the temperature T_{v} in units of 1000 K and n_{HI} is the hydrogen density in units of cm^{3}. Using this initial abundance we calculate the final H_{2} abundance, still in the absence of a photodissociating background, as
(22) 
where the exponential cutoff is included to account for collisional dissociation of H_{2}, as in Benson et al. (2006).
Finally, the cooling timescale due to molecular hydrogen can be computed using (Galli and Palla 1998):
(23) 
where
(24) 
(25) 
and
(26) 
is the cooling function in the low density limit (independent of hydrogen density) and we have used the fit given by Galli and Palla (1998), and
(27) 
is the cooling function in local thermodynamic equilibrium and
(28)

are the cooling functions for rotational and vibrational transitions in H_{2} (Hollenbach and McKee 1979).
It is also possible to estimate the rate of molecular hydrogen formation on dust grains using the approach of Cazaux and Spaans (2004), who find that the rate of H_{2} formation via this route can be important in the high redshift Universe. In this case we have to modify equation (13) of Tegmark et al. (1997), which gives the rate of change of the H_{2} fraction, to account for the dust grain growth path. The molecular hydrogen fraction growth rate becomes:
(30) 
where f is the fraction of H_{2} by number, x is the ionization fraction of H which has total number density n,
(31) 
is the dust formation rate coefficient (Cazaux and Spaans 2004; eqn. 4), and k_{m} is the effective rate coefficient for H_{2} formation (Tegmark et al. 1997; eqn. 14). Adopting the expression given by Cazaux and Spaans (2004; eqn. 3) for the H sticking coefficient, S_{H}(T) and _{d} = 0.53 Z for the dusttogas mass ratio as suggested by Cazaux and Spaans (2004), results in _{d} 0.01 for Solar metallicity. This must be solved simultaneously with the recombination equation governing the ionized fraction x. The solution, assuming x(t) = x_{0} / (1 + x_{0} nk_{1} t) and 1  x  2f 1 as do Tegmark et al. (1997), is
(32) 
where _{r} = 1 / x_{0} / n_{H} / k_{1}, _{d} = 1 / n_{H} / k_{d}, k_{1} is the hydrogen recombination coefficient and E_{i} is the exponential integral.
While gas must cool in order to collapse and form a galaxy, there are several physical processes which instead heat the gas. In this subsection we review the nature and effects of those mechanisms.
Immediately after the epoch of cosmological recombination, the cosmological background light consists of just the blackbody radiation of the CMB. Once stars (and perhaps AGN) begin to form they emit photons over a range of energies, including some at energies greater than the ionization edges of important coolants such as hydrogen, helium and heavier elements. Such photons can, in principle, photoionize atoms and ions in dark matter halos. This changes the ionization balance in the halo and heats the gas (via the excess energy of the photon above the ionization edge), thereby altering the rate at which this gas can cool to form a galaxy.
The ionizing background at some wavelength, , and redshift, z, is given by
(33) 
where (, z) is the proper volumeaveraged emissivity at redshift z and wavelength and (z_{1}, z_{2}, ) is the optical depth between z_{1} and z_{2} for a photon with wavelength at z_{1}. Calculation of the background requires a knowledge of the emissivity history of the Universe and the optical depth (itself a function of the ionization state and density distribution in the IGM) as a function of redshift.
Detailed theoretical models of the ionizing background, using observational constraints on the emissivity history, together with models of the distribution of neutral gas and calculations of radiative transfer, have been developed by Haardt and Madau (1996; see also Madau and Haardt 2009) and allow the background to be computed for any redshift.
Once the background is known, its effects on gas in dark matter halos can be determined. Such calculations require the use of photoionization codes, such as Cloudy (Ferland et al. 1998), to solve the complex set of coupled equations that describe the photoionization equilibrium and to determine the resulting net cooling or heating rates.
Figure 3 shows examples of net heating/cooling functions in the presence of a photoionizing background. These functions were calculated using the MappingsIII code of Allen et al. (2008) with a photoionizing background computed selfconsistently from the galaxy formation model of Benson et al. (2002a) and an assumed metallicity of Z = 0.3 Z_{}. Unlike collisional ionization equilibrium cooling functions, which are density independent ^{8}, photoionization equilibrium cooling curves depend on the density of the gas. The curves shown are therefore computed for gas at densities typical of gas in dark matter halos at each redshift indicated. It can be seen that heating becomes important for temperatures T 3 × 10^{4} K.
Figure 3. Cooling functions for gas at the mean density of cosmological halos at three different redshifts (as indicated in the figure). The dotted line shows the cooling function in the absence of any photoionizing background. Other lines show the net cooling/heating function in the presence of the photoionizing background selfconsistently computed by Benson et al. (2002a). All calculations assume a metallicity of 0.3 Z_{}. The discontinuity at low temperatures shows the transition from net heating to net cooling. 
The overcooling problem has been a longstanding issue for galaxy formation theory. Simply put, in massive dark matter halos simple estimates suggest that gas can cool at a sufficiently large rate that, by the present day, galaxies much more massive than any observed will have formed (White and Rees 1978; White and Frenk 1991; Katz 1992; Benson et al. 2003). An obvious way to counteract this problem is to heat the cooling gas, thereby offsetting the effects of cooling. Some sort of feedback loop is attractive here in order to couple the heating rate to the cooling rate and thereby balance the two.
In the massive halos where overcooling is a problem energy input from supernovae (see Section 6.3.1) is insufficient to offset cooling ^{9}. Consequently, much interest has been recently given to the idea that heating caused by AGN may be responsible for solving the overcooling problem. The amount of energy available from AGN is up to a factor 2050 higher than from supernovae (Benson et al. 2003). Semianalytic models have demonstrated that such a scenario can work (see Section 6.3.2)  producing a significant reduction in the mass of gas able to cool in massive halos while simultaneously producing black holes with properties consistent with those observed  under the assumption that energy output from AGN can efficiently couple to the cooling atmosphere in the surrounding dark matter halo (Croton et al. 2006; Bower et al. 2006; Somerville et al. 2008b).
The mechanism by which energy output from the AGN is coupled to the surrounding atmosphere remains unclear. Several solutions have been proposed, from effervescent heating (in which AGN jets inflate bubbles which heat the intracluster medium (ICM) via PdV work; Roychowdhury et al. 2004, Vecchia et al. 2004, Ruszkowski et al. 2008, but see Vernaleo and Reynolds 2006) to heating by outflows driven by superEddington accretion (King 2009) and viscous dissipation of sound waves (Ruszkowski et al. 2004) with turbulence playing an important role (Brüggen and Scannapieco 2009).
Heating that occurs prior to the collapse into a dark matter halo can also significantly affect the later evolution of baryons. Prior to virial collapse and any associated shock heating the gas evolves approximately adiabatically, maintaining a constant entropy. In cosmological studies the entropy is usually written as
(34) 
where is a adiabatic index of the gas. An early period of heating (perhaps from the first generation of galaxies) can increase the entropy of the gas by raising its temperature. Since entropy is conserved this preheating will be "remembered" by the gas. We can consider what happens to such gas when it accretes into a halo, assuming for now that a shock forms close to the virial radius. A shock randomizes the ordered infall motion of the gas and therefore increases its entropy. At early times, when the shock is relatively weak, this entropy gain will be small compared to the preheated entropy of the gas. At late times, the shock entropy will dominate. The result is that the entropy distribution of preheated gas in a halo looks similar to that of nonpreheated gas, except that there is a floor of minimum entropy.
The equation of hydrostatic equilibrium can be rewritten in terms of entropy using the fact that = (P / K)^{1/} giving
(35) 
and shows that the gas will arrange itself in the halo with the lowest entropy material in the center. The presence of an entropy floor leads to a density core in the halo center. This increases cooling times in the halo core and may therefore help prevent the formation of supermassive galaxies via the overcooling problem (see Section 3.3.2; Borgani et al. 2001, Voit et al. 2003, Younger and Bryan 2007). Additionally, Xray observations of galaxy clusters seem to suggest the presence of entropy floors.
While preheating is an attractive way of explaining entropy floors in clusters and reducing the overcooling problem it is not clear whether it can consistently explain the abundance of galaxies in lower mass halos. If preheating occurred uniformly, it would drastically reduce the number of lower mass galaxies forming (Benson and Madau 2003). Preheating would need to occur preferentially in the sites of protoclusters to avoid this problem  not inconceivable but not demonstrated either.
Shock heated gas in dark matter halos is an ionized plasma and is therefore expected to have a thermal conductivity given by (Spitzer 1962):
(36) 
where n_{e} is the electron density and
(37) 
where Z is the atomic number of the ions. If cooling in the inner regions of the hot gas halo leads to a temperature gradient in the atmosphere then conduction will cause energy to be deposited at radius r at a rate per unit volume given by:
(38) 
where T is the temperature in the atmosphere. Thus, thermal conduction can, in principle, act as a heat source for the inner regions of the hot atmosphere  as they cool, heat is conducted inwards from the outer, hotter regions of the atmosphere. The actual conductivity may be substantially reduced below the Spitzer value if the hot atmosphere is threaded by tangled magnetic fields (such that electrons cannot directly transport heat but must effectively diffuse along field lines).
While thermal conduction is an attractive mechanism by which to solve the overcooling problem (since the conductivity is higher in more massive clusters due to the strong temperature dependence of _{s}) it has been demonstrated that it cannot sufficiently offset cooling rates even with conductivities close to the Spitzer value (Benson et al. 2003; Dolag et al. 2004; Pope et al. 2005), nor can it maintain a stable hot gas atmosphere over cosmological timescales (Conroy and Ostriker 2008, Parrish et al. 2009).
In the simplest picture, gas which cools sufficiently below the virial temperature loses pressure support and flows smoothly towards the minimum of the gravitational potential well, settling there to form a galaxy. Such a picture is likely oversimplified, however.
Maller and Bullock (2004) consider the consequences of the thermal instability in cooling atmospheres. They find that cooling gas fragments into two phases: cold (T 10^{4}), dense clouds in pressure equilibrium with a hot (approximately virial temperature), diffuse component which can persist for cosmological periods of time due to a long cooling time. The masses of the clouds are determined from the thermal conduction limit, known as the Field length ^{10} (Field 1965), and processes such as KelvinHelmholtz instabilities and conductive evaporation which act to destroy clouds. This significantly alters the manner in which fueling of galaxies occurs. The rate of gas supply to a forming galaxy now depends on the rate at which the dense gas clouds can infall, due to processes such a hydrodynamical drag and cloudcloud collisions. The timescales for these two processes are given by
(39) 
and
(40) 
respectively, where m_{cl}, r_{cl} and v_{cl} are the characteristic mass, radius and velocity of cold clouds respectively, M_{cl} is the total mass in clouds, C_{d} is a drag coefficient, _{h} is the mean density of hot gas in the halo and R_{c} is the radius within which gas is sufficiently dense that it has been able to radiate away all of its thermal energy (i.e. the "cooling radius"; Maller and Bullock 2004). The numerical values given in each equation are computed for typical cloud properties taken from Maller and Bullock (2004).
These timescales can significantly exceed the cooling time for gas in galactic scale dark matter halos. Consequently, Maller and Bullock (2004) find that considering the formation and infall of such clouds can significantly reduce the rate of gas supply to a forming galaxy (by factors of two or so), particularly in more massive halos. This picture has recently been confirmed in numerical experiments by Kaufmann et al. (2009).
^{4} Unpublished work by ForcadaMiro and White (1997), also utilizing a 1D hydrodynamics code, reached similar conclusions. Back.
^{5} The lefthand side of this expression is equivalent, to order of magnitude, to t_{sc} / t_{cool} where t_{sc} is the soundcrossing time in the halo and t_{cool} is the cooling time in the postshock gas. This provides some physical insight into this condition: if the postshock gas can cool too quickly sound waves cannot communicate across the halo and thereby form a hydrostatic atmosphere which can support a shock front). Back.
^{6} Or, more likely, warm (BlandHawthorn 2009). Back.
^{7} While this picture seems reasonable on theoretical grounds, it as yet has little direct observational support (Steidel et al. 2010). Back.
^{8} Since the simple n^{2} scaling is factored out of the cooling function by definition. Back.
^{9} The total binding energy of gas in a dark matter halo scales as M^{5/3} while the energy available from supernovae, assuming 100% efficient conversion of gas into stars, scales as M. Consequently, in sufficiently massive halos, there will always be insufficient energy from supernovae to heat the entire halo. Back.
^{10} Above this length scale thermal conduction can damp temperature perturbations in the intracluster medium and prevent cloud formation. Back.