1. INTRODUCTION

Theoretically, inflows happen. The classical and perhaps most famous
motivation for this view is the failure of the “closed-box”
model
(Schmidt, 1963,
Tinsley, 1980)
to account for the observed paucity of low-metallicity G and K stars
(Pagel &
Patchett, 1975,
Casuso & Beckman,
2004),
a discrepancy that persists even with the most recent measurements of
stars throughout the Milky Way disk
(Schlesinger et al.,
2012).
The closed-box model has other problems such as its inability to account
for the slow decline in galaxy gas fractions
(Tacconi et al.,
2013)
and the cosmic abundance of neutral hydrogen
(Wolfe et al., 2005).
Likewise, it cannot account for the weak observed evolution in galaxy
metallicities during the interval z = 2 → 0
(Erb et al., 2006),
an epoch during which most of the
present-day stellar mass formed.

More importantly, however, galaxy growth without inflows is
theoretically incompatible with the current ΛCDM paradigm. In this
picture, galaxies are viewed as condensations of cold baryons within
dark matter halos. The dark matter halos themselves grow via a sequence
of mergers that is decoupled from baryon physics and straightforward to
compute using either analytic
(White & Rees,
1978,
White & Frenk,
1991)
or numerical methods
(Springel et al.,
2005).
As the halos grow, they accrete gas directly from the intergalactic
medium (IGM). The vast majority of this gas accretes in a smooth
fashion; that is, it does not arrive having previously condensed into an
interstellar medium (ISM;
Nelson et
al. (2013)).
Halos that are more massive than the cosmic
Jeans mass are expected to acquire a mass of baryons that is of
order (Ωb / ΩM) ×
MDM, where MDM is the halo's
total mass
(Gnedin, 2000,
Okamoto et al., 2008,
Christensen et al.,
2016).
Roughly half of this material collapses from the halo onto the central
galaxy
(Christensen et al.,
2016),
driving further star formation.

The expected thermal history of collapsed gas prior to its arrival in the
central galaxy remains a topic of active study. It was originally assumed
that all gas is shock-heated to the virial temperature and then cools in a
spherically-symmetric way
(White & Rees,
1978).
This was challenged a decade ago by
numerical calculations, which found that much of the gas accretes
directly onto the central galaxy without ever being heated, particularly at
masses below 1012M⊙
(Kereš et al.,
2005,
Dekel & Birnboim,
2006).
The most recent calculations
that include significantly improved hydrodynamic solvers contradict
those results, attributing the lack of shock-heating and the inefficient
cooling of the hot gas in previous calculations to numerical
problems
(Nelson et al.,
2013).
The new calculations indicate that the
majority of gas at all halo masses is heated to the virial temperature
before accreting onto the halo. However, it does not accrete in a
spherically-symmetric fashion as originally envisioned
(White & Rees,
1978).
Instead, it tends to concentrate in coherent structures that connect to
large-scale intergalactic medium (IGM) filaments. The upshot is that, one
way or another, gas readily accretes efficiently enough in ΛCDM to
form the observed galaxy populations, with most gas arriving in the form
of smooth inflows.

Once the gas condenses to densities of ∼1 atom per
cm−3,gravitational instability triggers the formation
of molecular clouds and eventually stars. Feedback energy from the young
stars limits the efficiency of star formation and regulates the
ISM's structure in a number of ways. For our purposes, the most
important of these is the generation of galactic outflows, which are
inevitably observed wherever there is vigorous star formation
(Veilleux et al.,
2005).
Theoretical models consistently predict that the mass of material that
is ejected is comparable to or greater than the mass of stars that form
(Murray et al., 2005,
Muratov et al., 2015,
Christensen et al.,
2016).
This enriched material then becomes available for re-accretion after a
few dynamical times
(Oppenheimer et al.,
2010,
Henriques et al.,
2013,
Christensen et al.,
2016).

Outflows thus give rise to two conceptually distinct gas accretion
channels, “Primordial Gas” and “Recycled
Gas”. Primordial gas dominates inflows at early times and low masses
(Oppenheimer et al.,
2010,
Ma et al., 2016),
and it dilutes galaxies' gas-phase metallicities. Recycled gas
becomes increasingly important at late times and high masses. It is
pre-enriched, and therefore less effective at dilution.

To summarize, in the era of ΛCDM, galaxy growth driven by ongoing
inflows is unavoidable. The central conceit of this chapter is
that measurements of galaxy metallicities may be used to test models of
those inflows. To motivate our discussion of
how they do so, we list the observational probes that have been deployed:

Stellar metallicity distributions;

The slope, normalization, and evolution of the
mass-metallicity relation (MZR);

Third-parameter dependencies of metallicity on
SFR, gas fraction, redshift, and environment; and

Radial metallicity gradients (chiefly of the
gas).

Stellar metallicity distributions have historically been an important
indicator that inflows occur, but they are only available for the Milky
Way and a handful of its satellite galaxies
(Kirby et al., 2011).
For this reason, we will not discuss them further. Rather, we will focus
on extragalactic diagnostics where larger samples are available. We also
note that, throughout this discussion, we will focus on the oxygen
metallicity as it is the most widely-observed tracer of the overall
gas-phase metallicity. In Section 2, we
review the physical processes through which inflows modulate galaxy
metallicities. In Section 3,
we discuss the extent to which galaxy growth tracks the host halo growth.
In Section 4, we introduce the Equilibrium
Model, which is the simplest way for relating observables to inflows. In
Section 5,
we discuss departures from equilibrium growth. Finally, in
Section 6 we summarize.