the classic model for galaxy formation within the cold dark matter ( cdm ) paradigm assumes that gas within galaxy halos initially reaches the temperature of the virialized halo . during the collapse of the halo , the process of violent relaxation of the dark matter shocks the gas component to the virial temperature .
any subsequently accreted gas is also shocked to the virial temperature as it enters the virial radius @xcite .
this assumption has been routinely adopted by many analytical works ( e.g. , * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
given a density profile , a cooling radius can be calculated , inside of which gas can radiate away its energy while conserving its specific angular momentum to form a centrifugally supported disk that grows from the inside out ( e.g. , * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
* ) . in general ,
these semi - analytic models ( sams ) have been successful in reproducing many of the present day properties of galaxies .
some studies have called this virial temperature assumption into question , however .
recent theoretical work has found that , in fact , the majority of baryons may never reach the virial temperature as they accrete onto galaxies @xcite .
* ; * ? ? ?
* hereafter k05 and k08 , respectively ) examined how gas gets into galaxies using a n - body + smoothed particle hydrodynamics ( sph ) simulation of a cosmological volume .
they found that galaxies with halo masses below a few 10@xmath2 m@xmath3  are dominated by `` cold '' gas accretion .
this cold gas is never shock heated to the virial temperature of the galaxy , and is thought to be accreted predominantly along filaments in the cosmic web ( e.g. , * ? ? ?
further support for this new paradigm has come from using a similarly large cosmological volume simulated with an adaptive mesh refinement ( amr ) code .    for galaxy halos to shock heat infalling gas
, the cooling rate of gas behind the shock must be slower than the compression rate of the infalling gas @xcite .
this requirement leads to two regimes in which gas is able to avoid shock heating , and instead cools onto the galaxy on a free fall timescale instead .
first , galaxies below a certain critical mass are not massive enough to support a stable shock because their dynamical time is shorter than the cooling time of the halo gas .
opt08 find that the halo mass where cold and shocked accretion contribute equally is in good agreement with the theoretical analysis of , with a critical mass of 10@xmath4 m@xmath3 .
this critical mass is roughly independent of redshift .
second , even when a shock is present , cold gas accretion can occur along filaments that penetrate deep inside the hot halo .
the ability of filaments to feed galaxy growth has been noted for some time @xcite .
k05 find that their cold flow gas accretion is largely along filaments .
these filaments are efficient at funneling gas to the galaxy , and can bring material to the galaxy from a much larger radius than predicted in the standard spherical accretion model . the mass contributed by filaments is a strong function of redshift ( db06 , opt08 ) .    note
that in the first case above , when a galaxy is in the low mass regime incapable of supporting a stable shock , cold gas accretion can occur both in a quasi - spherical fashion and along filaments , while in the second , high mass regime in which a hot halo exists , cold gas accretion occurs primarily along preferred directions in filaments .
lccccccccr h579 & 3.4@xmath510@xmath6 & 85 & 40 & 5.1@xmath510@xmath7 & 0.03 & @xmath85 & 0.17 & @xmath09.5@xmath510@xmath9 + dwf1 & 1.4@xmath510@xmath2 & 135 & 70 & 1.3@xmath510@xmath9 & 0.01 & 1.5 & 0.15 & @xmath05.3@xmath510@xmath10 + mw1 & 1.1@xmath510@xmath11 & 270 & 130 & 5.1@xmath510@xmath9 & 0.05 & 2.5 & 0.3 & @xmath04.8@xmath510@xmath10 + gal1 & 3.3@xmath510@xmath11 & 385 & 190 & 1.1@xmath510@xmath10 & 0.02 & 2.8 & 0.3 & @xmath03.7@xmath510@xmath10 + h277 & 7.1@xmath510@xmath2 & 230 & 115 & 3.8@xmath510@xmath9 & 0.03 & 2.5 & 0.35 & @xmath02.3@xmath510@xmath10 + mw1.lo & 1.1@xmath510@xmath11 & 265 & 130 & 5.0@xmath510@xmath9 & 0.07 & 2.5 & 0.6 & @xmath05.8@xmath510@xmath9 + mw1.ad & 1.1@xmath510@xmath11 & 270 & 130 & 5.1@xmath510@xmath9 & 0.07 & 2.5 & 0.6 & @xmath03.0@xmath510@xmath9 +    galaxies above the critical mass for shocking appear to be dominated by hot gas accretion as in the standard model , but they may have been fed by cold flow filaments even after a shock develops , particularly at high @xmath12 , and they are also built in part by the mergers of smaller galaxies that were dominated by cold flows .
thus , cold flow gas accretion is an important component of galaxy formation that has remained largely ignored until recently .
previous work on cold flow gas accretion in simulations have addressed the issue using large cosmological volumes , furnishing a statistical description of how galaxies get their gas .
this provides a useful starting point for modifying semi - analytic models of galaxy formation .
however , with large volumes and many simulated galaxies , numerical resolution for any individual galaxy must be sacrificed .
hence , these simulations were unable to resolve the internal structure of galaxies and investigate the impact of cold flows on the formation of galactic _
disks_. opt08 follow gas as it enters the virial radius of galaxies , and examined the temperature history of that gas as it flows toward the central galaxy , down to 0.1 r@xmath13 . however , limited resolution prevented them , or k05 or k08 , from being able to resolve disks in their galaxies
. thus , the impact of cold flows to disk assembly , and in particular the growth of the stellar disk component , has yet to be addressed .    rather than sample a cosmological volume at low resolution , in this paper we investigate gas accretion in several very high resolution simulations , in order to study the impact of cold gas accretion on the assembly of stellar disks .
each of these galaxies has at least a million particles within the virial radius by redshift zero .
this high resolution provides two advantages over previous simulation work on this subject .
first , it allows us to resolve the internal structure of our galaxies and their disks .
second , we overcome artificial broadening of shocks in sph so that we are able to identify entropy increases associated with accretion shocks , allowing us to explicitly search for shocks rather than simply using a temperature threshold as in previous works ( k05 , k08 , opt08 ) .
we are thus capable of examining the temperature and entropy history of accreted gas that eventually settles to the disk and forms stars .
these simulated galaxies are run within a @xmath14cdm context and span two orders of magnitude in galaxy halo mass , allowing us to study the role of cold flows in galaxies from 0.01 l@xmath1 to l@xmath1 .
this paper is outlined as follows : in section [ sims ] we briefly discuss the simulations used in this study . in section [ gasaccr ]
we describe our method to identify shocked and unshocked gas accretion to galaxies , and find that the fraction of accreted gas that is shocked is a strong function of galaxy mass , in agreement with previous works . in section [ diskgrowth ]
we extend the results of section [ gasaccr ] to investigate the role that unshocked , cold gas accretion has in building the stellar disk of galaxies , as a function of galaxy mass .
we briefly compare our results on disk growth to analytic models of disk galaxy formation . in section [ issues ]
we discuss the various effects of our numerical scheme on the results , and conclude that our results are robust ( those readers interested strictly in the science results may wish to skip this section ) .
finally , in section [ conclusions ] we discuss the implications of our results for existing analytic models of disk galaxy formation , and conclude .
the simulations used in this study are the culmination of an effort to create realistic disk galaxies . as discussed in @xcite , at @xmath12 = 0 disk galaxies in our simulations
overcome the angular momentum catastrophe and resolve the internal structure of disks ( see also * ? ? ?
* which shows that galaxies in this paper lie on the tully - fisher relation ) .
this crucial improvement allows us to undertake the current investigation , and is made possible both by dramatically increased numerical resolution and by the inclusion of a simple but physically motivated recipe to describe star formation ( sf ) and the effects of subsequent supernova ( sn ) feedback ( full details in * ? ? ?
* ) . our adopted sn feedback and cosmic uv background @xcite
drastically reduce the number of galaxy satellites containing a significant stellar population , avoiding the well known `` substructure problem '' @xcite .
our sn feedback is also effective at regulating sf , preventing gas from artificially cooling too early and forming stars , and hence we produce smaller bulges and halos in subsequent mergers @xcite .
this regulation by sn also reproduces the observed stellar mass - metallicity relationship for galaxies , both at the present time and at high redshift @xcite . at @xmath12
= 3 , these simulations reproduce the metallicities , incidence rate , and column density distributions of observed damped lyman alpha absorbers ( dlas * ? ? ?
four simulated disk `` field '' galaxies were chosen to cover two orders of magnitude in halo virial mass , from 3.4@xmath510@xmath6 m@xmath3  to 3.3@xmath510@xmath11 m@xmath3 .
the three most massive galaxies have been discussed in detail in ( * ? ? ?
* ; * ? ? ? * i.e. , dwf1 , mw1 , gal1 ) , but they have been rerun at eight times the mass resolution and twice the spatial resolution for this study . all galaxies are simulated using gasoline @xcite in a flat , @xmath14-dominated cosmology .
the three most massive galaxies were run using a wmap year 1 cosmology , while a wmap year 3 cosmology was adopted for the newest , lowest mass galaxy ( hereafter h579 ) .
the three least massive galaxies were originally drawn from uniform volumes ranging from 25 mpc to 50 mpc , while gal1 was selected from a 100 mpc box .
these galaxies were then resimulated at higher resolution using the volume renormalization technique @xcite , which allows us to resolve fine structure while capturing the effect of large scale torques .
we adopt the same sn and sf efficiency parameters as in @xcite and a kroupa initial mass function @xcite .
characteristics of each galaxy at @xmath12 = 0 are given in table 1 .
galaxies and their parent halos were identified using ahf @xcite .
ahf determines the virial radius , r@xmath13 , for each halo at each output time step using the overdensity criterion for a flat universe following @xcite .
ahf identifies all halos that exist in the high resolution region of our simulations at each output time step , and the individual particles that belong to them .
we can thus track a single gas particle through the entire simulation , as it is accreted to a galaxy , as that galaxy later merges with another , and as the gas particle forms stars .
ahf allows us to identify the main galaxy at each output time step from @xmath12 = 0 to higher @xmath12 , and the particles that belong to it . in this paper
, we identify the progenitor halos of the main galaxy all the way back to @xmath12 = 6 .
thus , as can be seen in table 1 , particles are traced back to a higher @xmath12 than the last major merger for these galaxies .
for example , our mw1 galaxy undergoes a last major merger at @xmath152.5 , and is easily identified at lower redshifts . at higher @xmath12 , we follow the most massive of the two progenitors to study the galaxy s history .
@xcite and @xcite showed that the mass function in their simulations converged at a minimum of 64 dark matter ( dm ) particles per halo .
thus , we require a minimum of 64 dm particles for halo identification in ahf .
halos with fewer particles are considered as `` smooth '' gas accretion instead , but in practice these halos are `` dark '' and have no bound baryons due to heating from our uv background .
the uv background turns on at @xmath12 = 6 and by @xmath12 = 4 has a significant effect on the lowest mass halos , heating their gas so that only halos with @xmath0100 or more particles are of sufficient mass to retain bound gas particles ( with velocities below the escape velocity of the halo ) .
therefore , unresolved halos with fewer than 64 dm particles should contribute little or no bound gas , and have no significant impact on the gas accretion study in this paper .
resolution effects are explored further in section  [ uv ] .
our highest ( lowest ) resolution runs have particle masses of 4.5@xmath510@xmath7 m@xmath16 ( 2.9@xmath510@xmath10 m@xmath16 ) , 1.6@xmath510@xmath7 m@xmath16 ( 4.3@xmath510@xmath9 m@xmath16 ) , and 4.7@xmath510@xmath17 m@xmath16 ( 1.3@xmath510@xmath9 m@xmath16 ) for dark matter , gas , and stars , respectively , and a force resolution of 0.15 - 0.3 kpc .
these galaxies were simulated to have a similar dynamical range and similar number of particles within the virial radius . for a more detailed discussion of the simulations ,
see @xcite .
we examine the temperature , entropy , and accretion histories for gas particles accreted to the main galaxy in these four simulations . for all cases ,
each gas particle s properties are determined at @xmath12 = 6 , @xmath12 = 5 , and @xmath12 = 4 , after which the values are sampled approximately every 320 myr until @xmath12 = 0 .
the gas in these simulations is allowed to cool via atomic cooling , adopting the cooling function for a primordial ( metal free ) gas .
we show in section  [ mc ] that adding metal line cooling to the simulations has no effect on the results presented in this paper .
major mergers have been defined as having a @xmath03:1 mass ratio , or lower .
the galaxies in this sample tend to have relatively quiescent merging histories , with the last major merger redshifts being greater than 1.5 .
this similarity is by design , in order to compare gas accretion histories of galaxies with similar pasts . in a future paper
, we will explore gas accretion and disk assembly in a set of l@xmath1 galaxies ( @xmath010@xmath11 at @xmath12 = 0 ) that span a broader range in space in spin parameters and in last major merger redshifts .
in addition to the four main galaxies studied here , a few other simulations have been run to investigate numerical convergence .
mw1 is explored at half of the dynamical resolution ( mw1.lo , the same resolution simulation discussed at length in * ? ? ?
this lower resolution run is also studied with cooling turned off ( the adiabatic case , mw1.ad ) and with metal line cooling added ( mw1.mc ) .
an additional l@xmath1 galaxy , h277 , with m@xmath13 = 7.1@xmath510@xmath2 m@xmath3 , is used to investigate the effects of output time step resolution on our temperature and entropy criteria .
before investigating the role of shocked versus unshocked gas in our simulations , we first want to identify the gas that has been accreted smoothly to our galaxy halos , as opposed to gas that has been accreted from other galaxy halos .
it is this smoothly accreted gas that will be available to potentially shock as in the classic model .
we first find all gas particles that have ever been identified as part of the main galaxy , back to @xmath12 = 6 .
ahf allows us to identify those gas particles which have been part of other galaxies before merging with the main galaxy .
those gas particles that are already in the main halo progenitor at @xmath12 = 6 ( i.e. , the earliest step at which gas particles are traced ) are labeled as `` early '' accretion .
we adopt an extreme definition and label as `` clumpy '' accretion any particles that have at any output step belonged to a galaxy halo other than the main galaxy we re considering .
the majority of this gas will be accreted in merger events ( note that in this definition , even those particles that come from the smaller progenitor in a last major merger get labeled as clumpy ; it includes both the hot and cold gas accreted in this merger ) , though a small fraction of this clumpy gas may also include gas that was tidally stripped or blown out of a galaxy halo and later accreted to the main galaxy we re considering .
the remaining gas that does not meet our `` clumpy '' criterion is labeled as `` smoothly '' accreted gas .
[ fig1 ] shows the fraction of gas accreted since @xmath12 = 6 that has been identified as `` clumpy '' ( green , at top of bars ) or `` smooth '' ( the blue and red bars , combined ; this separation of smooth is discussed in detail in section  [ decomp ] ) , in order of increasing galaxy mass for our four main galaxies .
the total halo mass ( dm+stars+gas ) of each of the four galaxies is listed below their respective bar .    the key feature of fig .
[ fig1 ] is the dominance of smoothly accreted gas in the formation of these galaxies , despite our extreme definition for `` clumpy '' accretion .
the first two columns of table  [ accr ] list the ratios of `` smooth '' and `` clumpy '' gas accretion to total gas accreted to the galaxy since @xmath12 = 6 . in all cases ,
@xmath075% or more of the gas accreted to the galaxy since @xmath12 = 6 has never belonged to another galaxy halo ( the adiabatic case is discussed in section  [ adiabatic ] ) .    because we resolve halos down to the mass limit where the uv background suppresses galaxy formation ,
the major numerical uncertainty in our smooth gas accretion fractions is due to our finite output time interval ( 320 myr ) . due to output time step resolution
, our fractions in table  [ accr ] for smoothly accreted gas will be an upper limit .
the issue of output step resolution is explored below ( section [ timeres ] ) and it is shown that , for a milky way type galaxy , increasing time resolution will identify a higher fraction of `` clumpy '' material , but not by more than 10% , so smoothly accreted gas still dominates the formation of this galaxy .
the dominance of smooth gas accretion in the baryonic growth of galaxies agrees with previous simulation results @xcite . @xcite
looked at this question , in particular .
their mass resolution allowed them to fully examine gas accretion in galaxies with masses greater than 5.4@xmath510@xmath6 m@xmath3  in halo mass , and they found that galaxies above this mass predominantly gain mass via smooth accretion rather than in mergers .
in fact , they find that mergers account for no more than 25% of mass accretion at redshifts greater than 1 , and no more than 35% of growth at @xmath12 @xmath18 0.5 .
k05 and k08 also concluded that , in a global sense , the growth of galaxies is dominated by smooth gas accretion rather than mergers .
lcccc h579 & 0.96 & 0.04 & 0.00 & 1.00 + dwf1 & 0.87 & 0.13 & 0.10 & 0.90 + mw1 & 0.73 & 0.27 & 0.65 & 0.35 + gal1 & 0.75 & 0.25 & 0.79 & 0.21 + h277 & 0.73 & 0.27 & 0.44 & 0.56 + mw1.lo & 0.78 & 0.22 & 0.62 & 0.38 + mw1.ad & 0.49 & 0.50 & 0.84 & 0.16 +    fig .
[ fig1 ] shows that , in general , there is a trend in the amount of `` clumpy '' accretion as a function of galaxy mass .
this figure suggests that as galaxy masses get smaller , the amount of material accreted from other galaxy halos decreases .
this is at odds with the merger trees of pure dark matter halos of different masses , which are statistically indistinguishable ( e.g. , * ? ? ?
* ; * ? ? ?
* ; * ? ? ?
however , fig .
[ fig1 ] represents only accreted gas , and in practice there is a decrease in the baryon fraction of halos with decreasing halo mass .
the reionization of the universe acts to unbind baryons from halos with v@xmath19 below @xmath030 km / s , and the fraction of unbound baryons increases as halo mass decreases further .
our uv background mimics this effect of reionization .
gas loss due to sne feedback also becomes increasingly effective at these lower masses .
the combined effect is for halos to become increasingly dark matter dominated toward lower halo mass .
as smaller halos merge with even smaller , more dark matter dominated halos , the amount of baryonic material accreted from other halos decreases with smaller halo masses , as seen in fig .
[ fig1 ] .
[ fig3 ] shows the accretion rate of gas to the virial radius as a function of time for each of the four main galaxies .
lines denoting smoothly accreted gas and `` clumpy '' accretion gas are shown in purple ( solid ) and red ( dashed ) , respectively .
major mergers are conspicuous for all but the lowest mass galaxy , h579 , for which the last major merger occurred at a redshift greater than 5 .
the obvious result here , again , is that smooth accretion of gas that has never belonged to another galaxy halo dominates the gas accretion history of all of these disk galaxies .
[ fig3 ] demonstrates that this is true at all redshifts , and not just for the cumulative case that is shown in fig .
[ fig1 ] .
having now identified two subsets of gas accretion to the virial radius , `` smooth '' or `` clumpy , '' we now focus on the gas that has been smoothly accreted . in the classic analytic picture of disk galaxy formation ,
this smoothly accreted gas will be shocked as it enters the virial radius of the galaxy .
db06 showed , instead , that there is a critical mass below which galaxies are unable to support a stable shock at the virial radius .
if a galaxy is below this mass , then gas may not shock until it reaches the disk , where the density contrast is high . in massive galaxies ,
even after a stable shock develops and propagates out through the galaxy s halo , filaments of cold gas may penetrate inside the shock radius .
these filaments may shock when they reach a radius closer to the disk .
smoothly accreted gas is followed until it reaches a radius of 30 kpc from the galaxy center ( or r@xmath13 at high @xmath12 , whichever is smaller ) .
we stop following gas particles at 30 kpc to avoid contamination from feedback effects that occur within our galaxy disks that also lead to a strong increase in entropy and temperature , mimicking the shocks we wish to identify .
similarly , we exclude `` clumpy '' gas from consideration in the remaining analysis , as feedback from merger induced star formation may mimic shocks .    by definition
, a particle undergoes an entropy increase when it encounters a shock .
previous work that searched for shocked gas within simulations used a temperature criterion rather than an entropy criterion .
our high resolution simulations allow us instead to search for the entropy increase associated with shocks .
we searched all smoothly accreted gas for an entropy jump that corresponded to a mach number of 3 or more .
however , we found that not all of this shocked gas was associated with an increase in temperature to near the virial temperature of the halo ( we discuss in section  [ entropy ] that this is unlikely to be a resolution effect ) .
for the purposes of this work , we are most interested in comparing to semi - analytic models of galaxy formation , which adopt the assumption that gas starts at the virial temperature of the halo before cooling to the disk .
thus , our adopted definitions below include a temperature criterion .    at each time step , we determine the densities and temperatures for each gas particle and compare to the properties of the main halo at that step . in the limit of a strong shock , it follows ( see also db06 ) from the rankine - hugoniot shock jump conditions for a singular isothermal sphere : @xmath20 and @xmath21 where @xmath22 is the gas density prior to encountering the shock , @xmath23 is the post - shock density , and t@xmath13 is the virial temperature of the galaxy halo that the gas encounters .
we require that a gas particle must reach 3/8 t@xmath13 to be labeled as `` shocked . '' in practice , however , due to the heating of the intergalactic medium ( igm ) by our uv background , 3/8 t@xmath13 of low mass halos is below the temperature floor of the igm .
alternatively , this means that the entropy of these halos is below the entropy floor of the igm ( discussed further in the next section ) , where we adopt the entropy definition of s = log@xmath24(t@xmath25/@xmath26 ) .
thus , for a particle to be labeled as `` shocked , '' it must reach a minimum entropy threshold in addition to a temperature ( 3/8 t@xmath13 ) threshold .
this entropy criterion requires @xmath27 .
\label{eq:3}\ ] ]    for each smoothly accreted gas particle at each time step we ask what minimum change in entropy , @xmath28s , is required for the particle to go from its initial entropy , s@xmath29 at step _ t _ , to s@xmath30 by the next time step , _
t_+@xmath31 t ( where , again , @xmath31 t is @xmath0320myr at most redshifts ) .
if the entropy at the next time step is in fact @xmath32 s@xmath30 , and the temperature of the particle at that next time step is @xmath32 3/8 @xmath33 , we count that particle as having undergone a shock .    in summary , to identify shocked gas we require that a gas particle undergoes a strong increase in both entropy and temperature , using two simple rules : @xmath28s @xmath32 s@xmath30-s@xmath29 , and t@xmath30 @xmath32 3/8 @xmath33 .
gas particles which meet these criteria are labeled as `` shocked , '' and the remaining smoothly accreted gas particles are then identified as `` unshocked . ''
if filaments undergo either strong shocks or a series of weak shocks within the halo , our definitions will identify both of these processes .
finally , we restrict our label of `` shock '' to those particles that shock at the time they enter the main galaxy s virial radius , or afterward .
we note that many of our particles do in fact undergo entropy jumps which meet our definition of shocks at earlier times .
it is common for these earlier shocks to occur while the gas particle is still at distances of several r@xmath13 from the main galaxy , and at times many gyr before they are ultimately accreted .
as we presume these shocks have nothing to do with galaxy accretion ( our focus here ) , we ignore them ( and note that these shocks are likely to occur when the uv background turns on , or in collapse in filaments ) .
[ fig1 ] shows the results of our search .
the smoothly accreted gas has been divided into `` shocked '' ( red ) and `` unshocked '' ( blue ) , based on the temperature and entropy criteria described above .
immediately obvious is that there is a strong trend for the amount of shocked gas within a galaxy to increase with virial mass .
the last two columns of table  [ accr ] quantify the fraction of shocked and unshocked gas mass to the total _
smoothly accreted _ gas mass .
when considering only the fraction relative to smoothly accreted gas ( rather than all gas ) , the trend with mass in the table is even stronger than originally appears in fig .
[ fig1 ] .
@xcite , k05 , bd06 , k08 , and opt08 found that there is a minimum halo mass required to support a stable shock .
similarly , a minimum halo mass to shock is built into our definition , which can be deduced from eqn .
[ eq:3 ] , as follows .
gas particles in the intergalactic medium will be at the mean baryonic density for that redshift , @xmath34 .
however , their temperature will be set by the ionizing uv background radiation .
thus , these particles have some entropy , s@xmath35 .
if particles with s@xmath35 are to shock and reach s@xmath30 as they enter the galaxy s virial radius , their densities must jump to 4@xmath34 , and their temperature must be 3/8 t@xmath13 . for low halo masses ,
though , with low t@xmath13 , s@xmath30 is less than s@xmath35 .
if this is the case , our shock definitions would lead to the false conclusion in which every accreted gas particle appears to be shocked .
effectively , the sound speed in the infalling gas is comparable to the infall velocity so there is no opportunity for a supersonic - subsonic transition .
clearly , we must require s@xmath30 @xmath8 s@xmath35 for gas to be physically shocked .
this requirement then leads to a minimum halo mass that is capable of shocking , as a function of redshift .
for our lowest mass galaxy , h579 , s@xmath30 never becomes greater than s@xmath35 .
hence , all of the smoothly accreted gas in h579 is identified as unshocked gas .
dwf1 does not shock gas until it reaches a halo mass of 1.1@xmath510@xmath2 m@xmath3  at @xmath12 = 0.6 .
this late shock development is seen in detail in fig .
[ rate2 ] , which is the same as fig .
[ fig3 ] , but now with smoothly accreted gas divided into shocked and unshocked gas .
meanwhile , our two most massive galaxies ( mw1 and gal1 ) reach large enough masses to shock very early on . for mw1 , this happens at @xmath12 = 4 when the galaxy is 8.9@xmath510@xmath6 m@xmath3 .
gal1 is 1.6@xmath510@xmath2 m@xmath3  at @xmath12 = 6 ( as far back as we trace gas ) , at which time it is already capable of supporting shocks .
although these four galaxies do not provide a statistical sample , the mass at which their shocks exist are in good agreement with previous results . for dwf1 and mw1 ,
the masses listed in the previous paragraph are the masses at which a shock is capable of developing , and thus when a hot halo might develop .
gal1 is already capable of shocking at @xmath12 = 6 , so this mass is an upper limit to when a stable shock develops .
opt08 show that shocking near the disk radius begins to occur when dark matter halos reach masses of a few@xmath510@xmath6 m@xmath3  to 10@xmath2 m@xmath3(see their figure 4 ) , in good agreement with the masses found for our galaxies .
we note that the shock definition of these authors differs from ours , but find below ( section  [ temp ] ) that our two definitions yield similar results .
these four galaxies were chosen to have their last major mergers at @xmath36 1.5 .
if we had instead examined galaxies with late major mergers , they may not cross the shock threshold until low redshifts , and have even higher fractions of unshocked gas accretion .
our galaxies here assemble the majority of their mass early , and then quietly accrete gas afterward , meaning that they effectively cross the mass threshold for stable shocks early .
thus , by adopting galaxies with similar merger histories , we guarantee that we are comparing galaxies across a range in mass , but with other properties being similar .
because of their range in final mass , each galaxy crosses the shock threshold at differing times .
galaxies that cross this threshold sooner , i.e. , more massive galaxies , therefore have a longer period of time to accrete shocked gas .
this extended time capable of shocking is partly responsible for the well defined trend of accreted shock fraction with increasing mass , in that these galaxies have similar histories and thus display this trend sharply .
however , larger volume cosmological simulations that are capable of statistically sampling a large number of galaxies also show this trend ( k05 , k08 , opt08 ) .
fig  [ fig7 ] shows histograms of the maximum temperature attained by all the gas that is smoothly accreted by our four galaxies .
the temperature shown here is the maximum temperature the particle reaches before we stop tracing it ( i.e. , until the particle reaches 30 kpc of the galaxy s center ) .
the solid line shows all of the smoothly accreted gas , while the dotted lines show the component of that smooth accretion that has remain unshocked , and the dashed lines show the shocked component .    in general , the shocked / unshocked gas
is well divided into hot / cold as well .
h579 has no shocked gas , but for our two most massive galaxies , mw1 and gal1 , the two components are well separated in temperature .
this separation is not altogether surprising , as part of our requirement for being identified as shocked is that the particle reach a minimum temperature ( 3/8 t@xmath13 ) as well as have a sudden entropy increase .
the exception is dwf1 .
while the unshocked gas extends to much lower temperatures than the hot gas , it overlaps the shocked gas .
this result is due to the requirement mentioned above that the shocked entropy of the galaxy must be above the ambient , intergalactic entropy ( s@xmath35 , set by the mean baryon density and the uv temperature floor ) .
dwf1 does not cross this threshold until @xmath150.6 .
consequently , there exists gas that reaches temperatures above 3/8 t@xmath13 of dwf1 at higher redshifts , and is not included as shocked .
it is difficult to say immediately whether this gas _ should _ be counted as shocked gas .
note that even the two most massive galaxies , which are capable of supporting a shock over basically their entire traced histories , include a portion of gas that reached high temperatures ( above a few 10@xmath9 k ) yet is labeled as unshocked because it does not undergo a strong entropy increase .
previous works on this subject have attempted to identify shocked and unshocked gas by using only a temperature cut ( e.g. , k05 and opt08 used a cut of 2.5@xmath510@xmath9 k ) . in that case , our hot , unshocked gas would have been included as shocked gas .
we will investigate this alternative definition to search for hot and cold flows later in the discussion ( section  [ temp ] ) .    despite the small inclusion of hot gas in the unshocked definition
, we find that our definitions do an excellent job of separating gas spatially , into gas accreted along preferred directions in filaments ( unshocked ) and gas accreted from a more spherical distribution ( shocked ) .
this distinction was also found by k05 and opt08 , using their temperature definition .
[ highz ] demonstrates this for our mw1 galaxy . at @xmath12 = 4 and 3 , the left hand column shows in green the gas particles that will eventually be ( or have already been ) accreted to the galaxy but remain unshocked , while the right hand column shows in green those gas particles that will be accreted ( or already have been ) to the galaxy and shocked .
the underlying colors are simply a gas density map , for reference ( black is least dense , white is densest structure ) .
each frame is @xmath01100 comoving kpc on a side . shown as a faint green box is the virial radius of our mw1 galaxy at each time . at @xmath12
= 4 , the galaxy has only just crossed the entropy threshold to allow shocked gas , so that it is only accreting unshocked gas at this step .
however , by @xmath12 = 3 the galaxy is capable of accreting shocked gas , but is still accreting a substantial amount of unshocked gas in filaments penetrating deep inside of the virial radius .
this demonstrates that the two modes of accretion can occur simultaneously at high @xmath12 .    the immediately obvious feature in fig .
[ highz ] is the clear distinction in spatial distribution at these high redshifts , before most of the gas has been accreted .
the unshocked gas is collapsing into filaments that are feeding the galaxy s growth .
because these filaments are capable of penetrating deep inside the virial radius , this cold gas is being delivered much closer to the galaxy disk ( see also section [ adiabatic ] , and hence appears to occupy a smaller spatial scale than the shocked gas .
the gas that will later be accreted and shocked , on the other hand , has a much more uniform or spherical distribution .
the shocked gas develops into a hot halo , much further from the disk .
now that we have identified how gas gets to the galaxy , and whether it shocks or remains unshocked as it approaches the disk , we wish to take it one step further and discover what role the various gas accretion mechanisms play in building the galaxy stellar disk .    to identify disk particles , the galaxies are first aligned so that the disk angular momentum vector lies along the _ z_-axis .
j@xmath37/j@xmath19 is calculated for each star particle in the galaxy , where j@xmath37 is the angular momentum in the _ x - y _ plane , and j@xmath19 is the momentum that a particle would have in a circular orbit with the same orbital energy ( see also * ? ? ?
disk stars are identified as those having near circular orbits , so that j@xmath37/j@xmath19 @xmath8 0.8 . for a full discussion on our disk identification ,
see brook _
et  al .  _
( 2008 , in prep ) .
[ fig8 ] shows the fraction of stellar disk mass at redshift zero that has formed from gas of various sources , for each of our four main galaxies .
again , the total halo mass of the four galaxies is listed below their respective bar , for reference .
the total of the blue and red bars shows the fraction of stellar mass in the disk that formed from smoothly accreted gas , with red indicating the fraction that shocked as it entered the galaxy , and blue indicating the fraction that remained unshocked .
the green bar shows the fraction of the stellar disk mass that formed from `` clumpy '' accretion , i.e. , gas that at some point belonged to another galaxy halo .
finally , the black bar shows the fraction of stellar disk mass that was accreted directly _ as stars _ from other galaxies , while the white shows the fraction of stellar disk mass that formed from gas that was already in the galaxy at @xmath12 = 6 .
[ fig1 ] showed that smoothly accreted gas dominates over clumpy accretion for all four of our galaxies .
[ fig8 ] shows that this smooth gas goes on to form stars , so that the majority of the disk is composed of stars formed from smoothly accreted gas rather than from gas accreted in mergers or _ stars _ accreted in mergers .
table  [ disk ] is similar to table  [ accr ] but for the stellar disk at redshift zero . unlike table  [ accr ] , in which the fraction of smooth and clumpy gas totaled to 1.0 , in table  [ disk ] the fractions of stars formed from smooth , clumpy , and `` early '' gas now sum to 1.0 , where `` early '' gas is that which was already in the galaxy at @xmath12 = 6 , i.e. , as far back as we trace the history of our gas particles .
however , the fractions of stars that formed from shocked or unshocked gas ( the last two columns in fig .
[ fig8 ] ) again sum to 1.0 ( representing the total of stars formed from smoothly accreted gas ) .
it can now be seen by comparing tables  [ disk ] and [ accr ] that the amount of shocked gas that makes it to the disk to form stars is lower than the total amount of shocked gas that is accreted to the galaxy .
in fact , table  [ disk ] shows that for all but our most massive galaxy , the stellar disk mass is dominated by stars formed from unshocked , smoothly accreted gas .
this domination of unshocked gas in building the stellar disk is even true for mw1 , despite the fact that the majority of smoothly accreted gas to mw1 gets shocked .
lcccc h579 & 0.96 & 0.03 & 0.00 & 1.00 + dwf1 & 0.75 & 0.14 & 0.06 & 0.94 + mw1 & 0.64 & 0.30 & 0.24 & 0.76 + gal1 & 0.63 & 0.29 & 0.69 & 0.31 + h277 & 0.67 & 0.23 & 0.32 & 0.68 + mw1.lo & 0.70 & 0.28 & 0.28 & 0.72 +      the importance of unshocked gas in the growth of the stellar disk is shown more explicitly in fig .
[ diskgrow ] , which shows the star formation histories of those stars that are in the galaxy disk at redshift zero , for each of the four main galaxies ( note , not the sfh of the entire galaxy ) . here
we can see that the disk sfr is , in fact , dominated at basically _ all times _ by stars forming from smoothly accreted , unshocked gas , for all but the most massive galaxy , gal1 . even in gal1 , unshocked gas dominated the growth of the stellar disk at an early period ( to @xmath151 ) ; only later does shocked gas begin to dominate .
it is interesting to compare fig .
[ diskgrow ] to fig .
[ rate2 ] , which shows the gas accretion rate onto the virial radius with time . note that in no case is the gas accretion rate exactly balanced by the star formation rate , though again we emphasize that we are only including disk sf here ( and excluding , for example , the sfr of the bulge ) .
our two most massive galaxies are particularly interesting .
[ rate2 ] shows that their gas accretion histories are generally dominated by smoothly accreted , _ shocked _ gas .
however , the star formation history of the mw1 disk is instead dominated by smoothly accreted , _ unshocked _ gas .
star formation from gas that has been shocked initially increases steadily with time , until about 5 gyr , after which the disk sfr due to this shocked component still remains relatively low , and eventually declines .
gal1 is a dramatic example of this .
shocked gas dominates the gas accretion history of the galaxy at essentially all times in the traced history . yet again the initial star formation of the disk is instead dominated by unshocked gas accretion , while the star formation from shocked gas slowly increases with time , before peaking at about 9 gyr and again declining .
this delay in star formation for the shocked gas is not surprising . as this gas reaches higher temperatures ( and entropies ) , it has much longer cooling times , slowing the rate at which it can cool to the disk and form stars . as the galaxy grows in time and reaches even higher virial temperatures , the radius at which shocking occurs increases ( discussed further in section  [ adiabatic ] ) .
this increase in shock radius will potentially make later accretion to the disk even more difficult , due to even longer cooling times .
we have quantified the different delay times ( the time between accretion to the virial radius and star formation in the disk ) of the two types of smooth gas accretion .
we find those stars that form from shocked and unshocked gas , and measure the average time between a gas particle s accretion to the virial radius and the time when it begins to form stars .
this delay is shorter for the unshocked gas .
the typical delay time for unshocked gas in our mw1 and gal1 galaxies is 1 - 2 gyr .
for shocked gas , the delay times in mw1 are typically 3 - 4 gyr , while for the hotter gal1 the times are longer , 4 - 6 gyr .
note that these delays are not intended to be representative of the cooling times of the particles .
the delay between accretion and star formation includes both the cooling time of the gas particle onto the disk , the natural time the gas might spend in the disk before producing stars , and subsequent delays in sf due to feedback processes in the disk , which vary as a function of galaxy mass @xcite . in the two lowest mass galaxies , the delay time for unshocked gas is typically longer than for our two highest mass galaxies ( 3 - 4 gyr rather than 1 - 2 gyr ) due to the increasing importance of feedback effects at lower masses .
the main conclusion , however , is that we expect longer cooling times for shocked gas compared to clumpy or unshocked gas .
thus , clumpy and unshocked gas will be able to make it to the disk to form stars at a faster rate than the shocked gas . in the next two sections we discuss the impact of cold flow ( unshocked ) gas accretion on disk formation .
[ gal1 ] shows the rest frame @xmath38 band surface brightness for gal1 at @xmath12 = 1 .
this image was created using sunrise , a monte carlo radiative transfer code @xcite .
the growth of the disk in gal1 is dominated by unshocked gas accretion prior to @xmath12 = 1 , which clearly results in an observable disk by this redshift . in a future paper
we will investigate the evolution of disk sizes since @xmath12 = 1 .
[ fig5 ] shows sunrise images of the @xmath39 band surface brightness of stars at @xmath12 = 0 that form from the various accretion modes in our mw1 simulation .
the left panel shows stars formed from unshocked , smoothly accreted gas ; the middle panel shows stars that formed from shocked , smoothly accreted gas ; the right panel shows stars that formed _ in the galaxy _ from gas that had been accreted from other halos ( i.e. , clumpy gas accretion ) .
these panels show that the stars formed from the clumpy and unshocked , cold gas are found in both the stellar disk and bulge component , while the stars that are able to form from shocked gas are instead predominantly in a disk .
this disk formed from shocked gas is also thinner than the disk created by the unshocked or clumpy gas .
the scale height of the shocked disk is @xmath025% smaller than the scale height of the unshocked disk .
the morphology indicated by fig .
[ fig5 ] can be explained in terms of the accretion times of the various gas components , and the subsequent cooling rate of that gas .
the earliest disk stars are predominantly formed by unshocked and `` clumpy '' gas , which dominate the accretion rate to the galaxy at the earliest times .
this gas can rapidly cool and form stars , but at these early times the galaxy is still undergoing a series of mergers ( major and minor ) that will both heat the forming disk ( leading to a larger scale height for the stars created from unshocked and clumpy gas ) and lead to bulge formation .
the shocked gas , on the other hand , is both the dominant mode of accretion at later times and takes substantially longer to cool to the disk after accretion .
the shocked gas will therefore settle into the disk after the chaotic merger period .
this late settling allows the shocked gas to cool to a thin disk before forming stars ( see also * ? ? ?
hence , the scale height of the stellar component formed from this shocked gas is smaller than the unshocked case .
[ sb ] dissects these sunrise images further , showing the radially averaged surface brightness profiles for each of these three components of gas accretion . as expected from fig .
[ diskgrow ] , the stars that form from unshocked gas dominate the surface brightness ( shown as blue diamonds ; clumpy as green + s ; shocked as red x s ; total as black triangles ) .
these profiles are fit well by a sersic bulge component plus exponential disk .
the scale lengths , @xmath40 , for each type of accretion are listed in the upper right corner of fig .
the stars formed from shocked gas have a longer disk scale length ( 4.1 kpc ) than those formed from unshocked ( 3.5 kpc ) or clumpy gas ( 3.3 kpc ) .
although the picture is confused slightly due to the longer cooling times of the shocked gas , this scale length difference may not be surprising given the differing accretion times for these two components .
although there is still a low level of unshocked gas accretion at the virial radius all the way to redshift zero , the majority of the unshocked gas is accreted prior to @xmath12 = 2 when the mean angular momentum is expected to be lower , and when chaotic merging will heat the disk . after this time
, shocked gas dominates the gas accretion to the halo , when the mean angular momentum is expected to be higher , and will therefore form a disk with a longer scale length .
the angular momentum content of this gas will be investigated in detail in a future paper .
an important point to draw from the previous two sections is that , particularly as seen in our two most massive galaxies , a significant amount of star formation is possible in disks prior to @xmath12 = 1 ( when the universe was 6 gyr old ) . as we have shown above , this early star formation is predominantly due to the contribution from unshocked gas accretion .
of course , the disks continue to grow since @xmath12 = 1 , but an existing disk is in place already by that time .
this is in accord with observations that find that large galaxy disks must be assembled prior to @xmath12 = 1 @xcite , or even by @xmath12 = 2 @xcite .
theoretical models of disk formation suggest instead that large disks must have formed since @xmath12 = 1 and hence undergone a large change in scale length since then , @xcite .
even the most up - to - date models still suggest a discrepancy with observational results @xcite , with observed disks being larger than predicted at @xmath12 = 1
. we will address disk sizes in a future paper , as it also requires a detailed examination of the angular momentum content of the accreted gas .
we focus here on the age of the stellar disk .
it is particularly interesting to examine the stellar disk growth for our two most massive galaxies , which have been dominated by shocked gas accretion over most of the history we trace here .
the unshocked gas accreted to these galaxies never reaches a temperature above 3/8 t@xmath13 .
sams adopt a model in which this gas would first have been heated to the virial temperature of the halo as it entered the virial radius , thus delaying its ability to cool quickly to the disk . as demonstrated in fig .
[ fig7 ] , the temperature difference between the shocked and unshocked gas can be a factor of 10 .
this temperature discrepancy may lead to significant differences between the sfrs found here and in sams .    in order to quantify the difference in sfrs between sams and our simulations , we estimate the effect on the disk sfh if the cold , unshocked gas had instead
first been heated to t@xmath13 .
the resulting change in the disk star formation rate is not straightforward to assess .
even our cold flow gas does not immediately form stars when it reaches the disk . rather
, there is a delay in star formation due to feedback effects in the disk .
as found by @xcite , this delay is a function of galaxy mass , being longer in low mass galaxies , so that low mass galaxies form stars inefficiently compared to higher mass galaxies .    as discussed in section  [ early ]
, the time between accretion to the virial radius and formation of disk stars is much longer for shocked gas than for unshocked gas .
we find the shocked and unshocked gas particles accreted between each output time step interval , and the mean difference in formation time for stars that subsequently form from that gas . to quantify the affect of heating our unshocked gas to high temperatures
, we adopt this average difference in formation time between shocked and unshocked star particles , and add this delay to the formation times of the star particles born from unshocked gas .
although not precise , this method captures the relevant physics , including cooling times and suppression of star formation by feedback , and will provide a meaningful estimate of the effects of assuming that all disk gas has been shock heated .    the result of adding this delay is shown in fig .
[ cooltheory ] , for mw1 and gal1 .
the top panels show the actual disk sfrs from our simulations as a solid line , exactly as in fig .
[ diskgrow ] , but now showing the total disk sfr from unshocked , shocked , and clumpy accreted gas together .
the dashed line shows what the resulting sfr would be if the unshocked gas had been heated to the same temperatures as the shocked gas .
the middle shows the resulting cumulative mass of the stellar disk as a function of time , again as actually seen in the simulations ( solid line ) and with the false delay added to the unshocked gas ( dashed line ) .
the bottom panels show the difference between the two disk masses in the middle panel ( the delayed disk mass as a fraction of the actual disk mass from the simulation ) .
[ cooltheory ] demonstrates that if the cold gas had reached virial temperatures that the sfr in the disk would have been significantly delayed . rather than being able to build the stellar disk within the first few gyr , the disk does not begin to grow substantially until @xmath151
the bottom panel shows that the disk is 50% less massive until @xmath12 = 1 in the case of strong heating than it actually is in the simulation , where the unshocked gas does not approach the virial temperature .
we discuss in this section the impact of key numerical effects on our results .
the effect likely to have the largest impact on our results is the interval between our outputs .
given our finite step interval of @xmath0320 myr , it is possible that a particle with a short cooling time may radiate away its energy quickly enough that we miss an increase in temperature and entropy associated with a shock event ( making our shocked fractions a lower limit ) .
this omission is more likely to occur for those particles shocking near the disk ( at @xmath0 30 kpc ) where the densities are much higher ( and hence cooling times shorter ) than at the virial radius .    to investigate the effect of our step size on our results
, we have run a new simulation with output steps at 1/12 of the time resolution presented above .
this new simulation , h277 , is a milky - way like galaxy with a rather quiet merger history and a total halo mass of 7.1@xmath510@xmath2 m@xmath3  ( see table  [ simsum ] ) at @xmath12 = 0 . for the same step interval as was used above
, the gas accretion results for this galaxy agree well with the trends shown for the previous four galaxies . from table
[ accr ] it can be seen that the fraction of shock accreted gas lies nicely between dwf1 and gal1 , as might be expected for this mass of galaxy .
a change in time resolution has an effect at two different stages of our analysis .
first , as just mentioned , we may miss particles with short cooling times that should have been counted by our `` shocked '' definition .
second , `` clumpy '' gas is identified as belonging at any output time step to a halo other than the main galaxy halo .
we are likely to miss gas particles that belong to another galaxy for less than @xmath0320 myr ( the time between output steps ) , e.g. , because they are subsequently lost from the galaxy due to sne .
the result of missing this clumpy accretion will be to increase the number of smoothly accreted particles instead .
these two stages of our analysis are not independent of one another , since the sample of shocked gas is drawn only from those gas particles that are identified as smooth accretion .
we wish to quantify them separately .
we first test how the number of particles identified as `` clumpy '' changes as a function of time resolution .
we investigate the change at 12x the original step interval used above ( i.e. , fine sampling corresponds to @xmath027 myr resolution per output ) .
when using our standard step interval , the smooth gas makes up 73% of all the gas accreted by galaxy h277 over the history of the trace . by increasing the output interval resolution by a factor of 12 ,
the gas identified as smoothly accreted declines , so that it composes 66% of all the gas accretion over the galaxy s history , for a total decline of 7% .
thus , by definition , the fraction of gas accreted as `` clumpy '' over the galaxy s history must increase by 7% .
this result means that our absolute numbers stated above for the fraction of gas that is smoothly accreted to each galaxy is an upper limit .
an examination of the accretion history of this galaxy shows smooth accretion with characteristic spikes indicative of mergers .
the amount of gas in these spikes identified as `` smooth '' decreases in our fine time step limit , but the spikes still remain , suggesting we are still missing some gas in mergers . by generously estimating the mass of gas contributing to these accretion spikes , we find that we are missing only an additional 1% of clumpy gas accretion .
thus , we agree with previous studies that find that the majority of gas mass is accreted smoothly rather than in mergers .
next , we use the `` smooth '' particles identified in the standard output resolution ( 320 myr outputs , where smooth gas accounts for 73% of all the gas accreted over the history of the galaxy ) to isolate the effect of output interval on the fraction of particles identified as shocked . at finer step intervals , the fraction of smooth gas that is shocked increases by 2.3% .
this increase is quite small , and occurs primarily at @xmath12 @xmath8 2 , likely to due to the fact that we do not adequately sample cooling times at high redshift . to verify this , we calculated the instantaneous cooling rates for particles in an annulus between 30 - 40 kpc ( as close to the disk as we trace them ) and inside 10 kpc of r@xmath13 at each of our `` standard '' analysis intervals .
for h277 , the virial radius does not reach 30 kpc until @xmath12 = 2.65 , and the cooling times of the particles within r@xmath13 are lower than our standard step resolution of 320 myr until this redshift .
after this redshift , however , the galaxy grows quickly and the cooling times are longer than our output intervals , so that we are capable of easily identifying shocked gas .
thus , it is not surprising that the addition of shocked gas when increasing time resolution comes at high redshifts .
we have done a similar cooling time analysis for our four main galaxies . in the case of dwf1 , mw1 , and gal1
, we do not fully resolve cooling times within the halos until redshifts 3 , 3 , and 4.5 , respectively .
however , because dwf1 is not massive enough to support a stable shock until @xmath12 @xmath00.6 , our time step undersampling at high @xmath12 has no impact on our resulting fraction of shocked gas . for mw1 and gal1
, we can expect about a 5% change , as we found in h277 , and perhaps less since we resolve their cooling times to higher redshift than in the h277 case .    as an interesting note ,
our lowest mass galaxy , h579 , always has cooling times longer than our standard output step interval ( though it is never massive enough to shock , so this is not important for our results ) .
it may seem odd at first that this galaxy has such long cooling times , but it is a result of the lower densities in this halo .
our uv background is capable of ionizing much of the hydrogen gas in the halo of this galaxy , causing it to be inefficient at cooling .
we verified that turning off our uv background lowers the instantaneous cooling times substantially , by almost an order of magnitude @xcite .      by definition ,
a shock is a phenomenon that leads to a sharp discontinuity in the physical properties of a gas . due to the nature of smoothed particle hydrodynamic codes , these properties for any given gas particle will be a smoothed estimate based on the properties of its nearest neighbors .
thus , there is some concern that sph will do a poor job of resolving shocks .
gasoline adopts the standard sph artificial viscosity formulation @xcite , with a correction to detect and reduce viscous transport in shearing regions @xcite . @xcite
investigated gasoline s performance in this area with both the standard @xcite shock tube test , and a spherical adiabatic collapse test @xcite .
it was found that gasoline does an excellent job of matching the analytic solutions to within a few particle separations , and matches the post - shock entropy values very well .
it can be possible for low numerical resolution to artificially broaden shocks ( due to entropy generated by the artificial viscosity used in sph ) , allowing gas to radiate energy while passing through a shock rather than heating and undergoing an entropy jump @xcite .
this broadening is unlikely to be an issue at the high resolutions used here @xcite , but we verified numerical convergence by using a lower resolution version of our mw1 run , mw1.lo , and performing the same analysis .
this run has 1/8 of the mass resolution and 1/2 the force resolution of mw1 ( and is the same galaxy discussed in detail in * ? ? ?
table  [ accr ] demonstrates that the shocked fraction in this run is in excellent agreement with mw1 .
since our shock definition includes a temperature criterion , this implies that we are not missing high temperature gas , and thus that we have a sufficient numerical resolution to identify entropy jumps and are not missing heating in shocks .
hence , our cold flow gas accretion is not an artifact of numerical resolution .
previous groups who have attempted to investigate the role of cold flows in galaxy gas accretion have used a different criterion to identify shocked and unshocked gas , adopting a strict temperature cutoff .
we examine in this section how our results differ if we use the same temperature definition as other authors .
k05 and opt08 have noted that the temperature distribution of accreted particles can be bimodal , with a minimum at 2.5@xmath510@xmath9 k. they use this minimum to separate gas into cold accretion and hot accretion modes .
we also see this minimum in the temperature distribution , as shown in fig .
[ mwhist ] for our mw1 galaxy .
this figure shows the maximum temperature of gas particles that have been accreted to the galaxy between successive redshift intervals . up until @xmath12 = 0.5
, there is a strong bimodality .
the dashed vertical line shows the separation at 2.5@xmath510@xmath9 k used by k05 , k08 , and opt08 .
our accreted gas particles clearly demonstrate this same minimum .
these two groups have previously noted that this minimum is a function of the cooling curve , and has therefore has little direct relation to the actual modes of hot or cold accretion .
however , it is a convenient point at which to separate the gas into hot or cold accretion modes .    to assess
how our results are affected by these definitions , we repeat the above analysis to identify shocked gas in our smoothly accreted gas component , using the temperature criterion of k05 and opt08 .
the same set of smoothly accreted particles is used , so that the only change between the two definitions will be in the resulting shocked or unshocked fraction ( or , more appropriately , hot and cold fraction ) .
the difference resulting from these two separate definitions is remarkably small .
the temperature criterion leads to slightly more hot gas being accreted to the galaxy than shocked gas , but the largest difference is only 7% , in the case of gal1 .
the remaining galaxies have differences of 3% or less .
h579 never reaches the temperature cutoff identified by k05 , and thus both studies agree than it has never accreted shocked / hot gas .
these tests lead us to conclude that the two different definitions yield very similar results .
this agreement may be partly due to the fact that we also impose some sort of temperature criterion ( requiring that our gas not only undergo an entropy increase , but reach 3/8 t@xmath13 as well ) . however , this result was not guaranteed .
we emphasize that the temperature criterion alone is based on the physics of the cooling curve , and does not reflect the physics of the gas accretion shocks .
hence , we choose to add an entropy criterion to our definition , as it is unique to each galaxy halo and the physics of the various accretion modes .
@xcite found that the mass function of our galaxies is resolved down to a minimum of 64 dm particles .
for the runs used here , that corresponds to total halo masses of 8.1@xmath510@xmath10 m@xmath3 , 6.1@xmath510@xmath10 m@xmath3 , 4.9@xmath510@xmath41 m@xmath3 , and 1.9@xmath510@xmath42 m@xmath3  for h579 , dwf1 , mw1 , and gal1 , respectively .
these masses are well below the limit where the uv field will suppress galaxy formation @xcite , and thus we avoid issues due to sub - resolution merging .
that is , there should be no unresolved halos that are being counted incorrectly as `` smooth '' accretion .
this assertion was verified by running the same analysis on a lower resolution version of our mw1 galaxy , mw1.lo , with a mass resolution of 1.9@xmath510@xmath42 m@xmath3  at 64 dm particles .
this mass is just below the limit that the uv field should suppress galaxy formation .
indeed , the smooth gas fraction agrees to within a few percent with mw1 ( see table  [ accr ] ) .
mw1.lo does have a five percent higher fraction of smooth accretion , but given fluctuations in the simulations , this is excellent agreement .
the dominant effect of the uv background in our simulations is to suppress galaxy formation at low masses , and hence lower the amount of clumpy accretion .
gas which would have otherwise been in small halos is now free to be smoothly accreted to our galaxies .
this was confirmed by running mw1.lo with the uv background off ( and cooling and sf turned off as well ) .
the results for this galaxy , mw1.ad , are shown in table  [ accr ] .
it is clear from the first two columns that the amount of `` clumpy '' accretion material increases from about 20% to about 50% .
this confirms that our uv background is partly responsible for reducing the amount of gas accreted from other halos , and hence increasing the amount of gas available for smooth accretion .
the more interesting effect of the uv background is on the amount of shocked gas accretion to the galaxy .
our uv background ( in combination with the mean baryonic density of the universe as a function of redshift ) sets a temperature floor in the igm , and hence an entropy floor for igm gas . for a galaxy to be capable of shocking accreted gas ,
the virial entropy of the galaxy halo must be above this background entropy by a certain factor .
hence , based on our definitions , the uv background sets a minimum halo mass that will be able to shock , as function of time .
@xcite and db06 showed that the shock radius in the case of adiabatic accretion ( i.e. , no cooling ) is well matched to the virial radius in a spherically symmetric case .
they also demonstrated that when cooling is turned on , the same galaxy is not initially massive enough to support a stable shock , so that accreted gas shocks at the disk of the assembling galaxy . only after a critical mass
is reached can the galaxy support a shock .
we have again used mw1.ad with the uv background , cooling , and sf turned off ( i.e. , the adiabatic case ) to test these results . as noted above , the amount of smooth accretion drops for mw1.ad , as much of the gas is able to remain bound to its dark matter halo . however , from table  [ accr ] ( last two columns ) it is clear that the amount of smooth gas accretion that is shocked also increases in this case , increasing to 84% .
this behavior is expected , and is similar to the standard spherical model in which all gas gets heated to the virial temperature of the galaxy as it is accreted .
the fact that there is unshocked gas at all is due to the fact that this simulation is not spherically symmetric , and filaments of cold gas still exist that are capable of penetrating well inside of the halo without shocking .
[ shockcomp ] shows the radii at which particles are shocked inside of r@xmath13 , as a function of time , for the mw1.lo and adiabatic , mw1.ad , runs .
contours are used for clarity , with black representing the least dense concentration of particles , and white peaks the most dense .
the solid lines show the virial radii of the galaxies as a function of time .
the main difference between the two runs is at high redshift . in the adiabatic case , particles are able to shock inside the virial radius even at high @xmath12 , while in the mw1.lo run there is no shocking at the highest redshifts .
shocks begin to occur near the disk at redshift 4 , and shocked particles fill the space between the disk and the virial radius at lower redshifts . the radius with the highest concentration of shocked particles moves outward with time in both cases .
metal line cooling has recently been added to gasoline ( shen et al . , in prep . ) .
mw1.lo was rerun with metal cooling on , to find if the new cooling has any effect on the results here .
however , the smoothly accreted gas ( be it shocked or unshocked ) has nearly primordial metallicities , and the resulting fractions of shocked and unshocked accreted gas are identical to the results for mw1.lo with only h and he cooling . likewise
, the fraction of disk stars formed from shocked and unshocked gas is also identical to mw1.lo .
we have tracked the history of gas accreted to four high resolution disk galaxies that span two orders of magnitude in galaxy mass .
for all of these galaxies , early disk growth can be predominantly attributed to cold gas , and up to milky way masses the sf of the stellar disk is dominated by unshocked , cold flow gas accretion at essentially all times .
this dominance of cold gas in the formation of disk stars can exist even when the the majority of gas accreting to the virial radius is being shocked and reaching high temperatures . at galaxy masses above l@xmath1 , an early phase of disk growth prior to @xmath12 = 1 can be attributed to the presence of cold gas accretion .
we have examined gas temperature histories in relation to the virial temperature of the halo that they are accreted to .
while the shocked component is capable of reaching temperatures near the virial temperature of the halo , the unshocked component of gas accretion remains below 3/8 of the virial temperature at all times .
the important role of unshocked , cold flow gas in the growth of galaxies is consistent with previous studies that adopt an explicit temperature cutoff , determined by the cooling curve , to identify cold flow gas .
we confirm that the ability of smoothly accreted gas to shock is a strong function of mass .
however , our focus here has been to study the subsequent role of this cold gas accretion in the growth of stellar disks . because the unshocked gas does not reach the same high temperatures as shocked gas
, it is capable of cooling to the disk faster and forming stars .
it is important to note that this early cooling of unshocked gas to the disk is not a manifestation of the historic `` overcooling '' problem .
this can be seen by examining the results from our stellar mass - metallicity relationship , which matches the observed relation at both low and high redshifts @xcite . as discussed by both @xcite and @xcite , this match
is achieved by overcoming the overcooling problem with both high resolution and a physically motivated sn feedback model .
previous works consistently produced metallicities too high when compared to observations at high @xmath12 , due to overcooling and a rapid consumption of gas and subsequent metal enrichment .
instead , our sn feedback scheme regulates the sfrs of our galaxies , preventing them from too quickly consuming their gas .
the early sf seen in our more massive galaxies is due instead to the accretion of cold gas that can cool rapidly to the disk to form stars .    despite running our simulations in a fully cosmological context that includes galaxy mergers ,
the dominant gas supply is from smoothly accreted gas that has never belonged to another galaxy halo . for a milky way mass galaxy with a quiescent merging history like the galaxies shown here ,
only @xmath025% of the accreted gas is acquired from other galaxy halos , resulting in a similar fraction of the disk stars forming from this gas .
it is our goal to assess the impact that cold flow gas accretion may have in altering current models of disk galaxy formation .
a direct comparison with semi - analytic models is difficult to do and beyond the scope of this paper .
current sams include the possibility of rapid gas cooling for low mass galaxies .
it has been suggested that this regime is similar to the cold flow gas accretion seen in simulations @xcite .
@xcite performed a detailed comparison of the galics sam @xcite to the sph results of k05 , and found that the cold gas accretion rates in the two schemes were in agreement .
this implies that the amount of cold gas currently available in sams may agree well with simulations , though this needs to be confirmed with further comparisons .
however , the results in this paper may emphasize a separate problem within the cold flow regime . even in the case of rapid cooling in sams ,
the temperature of the gas is initially set to the virial temperature of the galaxy halo , and cooling times are based on this assumption .
prior to the development of a hot halo , the free fall time determines when the gas reaches the disk in either the sams or the simulations .
however , sams do not yet model the impact of filaments on galaxy growth .
our two most massive galaxies , which are able to develop a hot halo at high redshifts ( 4 to 6 ; see also * ? ? ?
* ) , are still capable of accreting cold gas that never approaches the virial temperature of the halo in filaments at high @xmath12 .
these filaments allow a significant amount of cold gas mass to accumulate inside of the galaxy , even for massive galaxies capable of supporting a shock at early times .
this cold gas cools quickly to the disk to form stars .
this rapid settling to the disk allows for the building of stellar disks at higher redshifts than predicted if all gas is heated to the virial temperature , as in the standard model .
we have shown that the discrepancy in temperatures between the shocked and unshocked gas components leads to significantly longer cooling times for the shocked gas ( note that their densities will be discrepant as well , since most of the unshocked component are found in dense filaments , exacerbating the difference in cooling times ) .
if the unshocked gas had reached the virial temperature , the star formation rates in the disk would have been delayed ( in the cases shown here , until after @xmath12 = 1 ) .
a study of the angular momentum content of the accreted gas will be examined in future work , but the presence of cold flow gas accretion , particularly in filaments in massive halos , allows for the building of large , massive disks at high @xmath12 , in agreement with observations .
we would like to thank a. dekel , d. keres , j. dalcanton , s. white , and q. guo , for helpful conversations during this project .
ab , fg , and tq were supported by nsf itr grant phy-0205413 .
ab acknowledges support from a wa space grant fellowship .
fg acknowledges support from a theodore dunham grant , hst go-1125 , nsf grant ast-0607819 and nasa atp nnx08ag84 g .
simulations were run at tacc , sdsc , cineca , and nas .