From 'bathtub' galaxy evolution models to metallicity gradients

We model gas phase metallicity radial profiles of galaxies in the local Universe by building on the `bathtub' chemical evolution formalism - where a galaxy's gas content is determined by the interplay between inflow, star formation and outflows. In particular, we take into account inside-out disc growth and add physically-motivated prescriptions for radial gradients in star formation efficiency (SFE). We fit analytical models against the metallicity radial profiles of low-redshift star-forming galaxies in the mass range $\log(M_\star/M_\odot)$ = [9.0-11.0] derived by Belfiore et al. 2017, using data from the MaNGA survey. The models provide excellent fits to the data and are capable of reproducing the change in shape of the radial metallicity profiles, including the flattening observed in the centres of massive galaxies. We derive the posterior probability distribution functions for the model parameters and find significant degeneracies between them. The parameters describing the disc assembly timescale are not strongly constrained from the metallicity profiles, while useful constrains are obtained for the SFE (and its radial dependence) and the outflow loading factor. The inferred value for the SFE is in good agreement with observational determinations. The inferred outflow loading factor is found to decrease with stellar mass, going from nearly unity at $\log(M_\star/M_\odot) = 9.0$ to close to zero at $\log(M_\star/M_\odot) =11.0$, in general agreement with previous empirical determinations. These values are the lowest we can obtain for a physically-motivated choice of initial mass function and metallicity calibration. We explore alternative choices which produce larger loading factors at all masses, up to order unity at the high-mass end.


INTRODUCTION
Within the Λ cold dark matter (ΛCDM) framework of galaxy formation, galaxy discs grow by cooling of baryonic gas at the centres of dark matter haloes (Silk 1977;White & Rees 1978;White & Frenk 1991). Gas is consumed by star formation and lost to the hot halo and the intergalactic medium via outflows driven by supernovae, stellar winds and radiation pressure (Naab & Ostriker 2017). A detailed understanding of the processes driving this 'baryon cycle' remains elusive, due to the difficulty of directly observing gas flows in and out of galaxies (Sancisi et al. 2008;Sánchez Almeida et al. 2014) and our limited understanding of the microphysics of the different feedback processes involved. Metals, which are direct products of stellar nucleosynthesis, represent ideal tracers of the ESO Fellow. E-mail: francesco.belfiore@eso.org † E-mail: f.vincenzo@bham.ac.uk baryon cycle. Studies of the metal content of galaxies may therefore be used to indirectly probe gas accretion and the effect of feedback mechanisms.
Observations of chemical abundances in external galaxies demonstrate the existence of a tight relation between luminosity, or stellar mass, and metallicity (the mass-metallicity relation, Lequeux et al. 1979;Tremonti et al. 2004). More recently evidence has accumulated in favour of the existence of a secondary dependence of the mass-metallicity relation on star formation rate (SFR, Ellison et al. 2008;Mannucci et al. 2010;Lara-López et al. 2010). The observed correlation goes in the sense that galaxies of a fixed stellar mass have lower metallicity when they have higher SFR, or gas mass (Hughes et al. 2013;Bothwell et al. 2013;Cresci et al. 2018, although see Sánchez et al. 2019 for an alternative viewpoint).
These observations have motivated the development of chemical evolution models generally referred to as 'gas regulatory' or 'bathtub' models (Bouché et al. 2010;Finlator & Davé 2008;Dayal et al. 2013;Dekel et al. 2013;Lilly et al. 2013;Peng & Maiolino 2014). In this framework the traditional closed-box chemical evolution model (Schmidt 1963) is extended to take inflows and outflows into account. The power of this approach lies in its simplicity and the ability to capture the basic physics behind galaxy scaling relations and/or abundance patterns of stars in the Milky Way (Andrews et al. 2016;Weinberg et al. 2017).
Focusing on our Galaxy, there is a long history of chemical evolution models aimed at reproducing the metallicity gradient observed in the disc (Lacey & Fall 1985;Chiosi 1980;Matteucci 1986;Matteucci & Francois 1989;Boissier & Prantzos 1999;Chiappini et al. 2001). In order to address the G-dwarf problem (Schmidt 1963;Lynden-Bell 1975), these models generally assume continuous accretion of gas over Gyr timescales. Notably, the study of the metallicity gradient of the Milky Way has been instrumental in providing early support for the 'inside-out' disc formation paradigm. In this framework, outer regions of the disc are formed later and on longer timescales, as expected from the theory of disc assembly in a cosmological context (White & Frenk 1991;Kauffmann 1996). Several classical models, however, reproduce the properties of the Milky Way without including outflows. The outcome is generally successful since the outflow loading factor is highly degenerate with the value of the nucleosynthetic yields, which are plagued by significant uncertainties (Romano et al. 2010). We note, moreover, that a radial dependence of the yield (which could be caused by radial changes in the initial mass function, IMF) or of the star formation efficiency (SFE= SFR/M gas , where M gas is the cold gas mass) can also generate a negative metallicity gradient (Goetz & Koeppen 1992). The effects of these different parameters (infall timescale, outflow loading factor, SFE etc) on the metallicity gradients have been discussed qualitatively in previous work, but the possible degeneracies between them remain difficult to quantify.
The advent of a new generation of large integral field spectroscopy (IFS) surveys (including CALIFA, Sánchez et al. 2012;and MaNGA, Bundy et al. 2015) has greatly improved the amount and quality of data relating to chemical abundances of external galaxies. Metallicity has been known to be a decreasing function of galactocentric distance in disc galaxies since the 1970s (Searle 1971;Peimbert 1979;Shaver et al. 1983;Vila-Costas & Edmunds 1992), but modern IFS surveys have finally allowed studies of representative samples of galaxies with sufficient statistics to uncover more subtle trends. For example, Belfiore et al. (2017) demonstrated that the shape of the gas-phase metallicity radial profiles depends on the stellar mass of the host galaxy. In particular, low-mass galaxies (log(M /M ) = 9.0) have flatter gradients than galaxies with stellar masses of log(M /M ) = 10.5. However, the metallicity radial profile is found to flatten again in the inner regions of the most massive star forming galaxies (see also Sánchez-Menguiano et al. 2017).
This mounting body of observational data justifies the development of chemical evolution models that may successfully cross the gap between integrated and spatially resolved properties of galaxies. Several attempts have already been made to use variants of the bathtub chemical evolution model to interpret resolved chemical abundances (Ascasibar et al. 2015;Belfiore et al. 2015;Kudritzki et al. 2015;Ho et al. 2015;Lian et al. 2018). In this paper we follow the same philosophy and develop an extension of the gas regulatory formalism in order to test whether simple analytical models can reproduce the observational trends highlighted in Belfiore et al. (2017). We focus entirely on gas-phase metallicity, and in particular on reproducing the detailed shape of the radial metallicity profiles. We do not approximate radial profiles as linear gradients, since the observations are not well-represented by simple straight-line models.
Our models take into account inside-out growth and radial variations of the SFE, but are otherwise intentionally simplistic. Metallicity gradients in real galaxies are likely to be affected by additional physics, which we do not include here (e.g. radial gas flows, the effect of enriched gas inflow or galaxy mergers). Zoom-in hydrodynamical simulations have been used to study these effects in some detail (Torrey et al. 2012;Pilkington et al. 2012;Gibson et al. 2013;Tissera et al. 2018). These simulations remain, however, too expensive to study large and representative samples of galaxies and explore variations in model parameters.
The flexible analytical models presented in this work, on the other hand, allow for a rapid exploration of parameter space, and are therefore ideally suited to developing physical intuition and uncovering the degeneracies between model parameters. We demonstrate the latter point explicitly by fitting our analytical models to the MaNGA radial metallicity profiles presented in Belfiore et al. (2017), and evaluating the model likelihood via Monte Carlo Markov chain (MCMC) sampling.
In Sec. 2 we discuss the details of our chemical evolution model, including the prescription for inside-out growth and radial gradients in SFE. We also comment on the resulting time evolution of the metallicity gradient in the models and the effects of the four model parameters on the metallicity gradient. In Sec. 3 we describe our Bayesian fitting strategy and the observed degeneracies in the inferred best-fit models. In section 4 we discuss how the best-fit model parameters compare with theoretical predictions, focusing specifically on the outflow loading factor.

The bathtub chemical evolution approach
In this work we make use of the bathtub chemical evolution model and consider a galaxy as a collection of independent radial annuli. Within each annulus we adopt the instantaneous recycling approximation (Tinsley 1980). In this simplified framework one assumes that all stars more massive than M long−lived (generally taken to be 1 M ) die instantaneously, and those of lower masses live forever. We further posit that the metals produced by the previous generation of stars are immediately and uniformly mixed with the pre-existing interstellar medium (ISM) of the region considered. Following standard notation we adopt the oxygen yield per stellar generation (y) and return fraction (R) calculated by Vincenzo et al. (2016) using the Kroupa et al. (1993) IMF, respectively (y, R) = (0.0105, 0.285). For the rest of this work we characterise the yield normalising to the total mass of gas taking part in star formation, which we denote as p and is trivially related to y by y = p/(1 − R).
Within the instantaneous recycling approximation, denoting the oxygen fraction (by mass) in the ISM as Z, the gas mass as Σ g , the star formation rate as Σ SFR , the stellar mass as Σ , the outflow rate as O and the inflow rate as I, each annulus is described by the following set of constitutive equations ) in our adopted chemical evolution model with exponentially decreasing inflow rate. Model tracks with different colours have different infall timescales. In this model, after an initial period of gas accumulation, where the inflow rate is larger than the SFR, the gas mass decreases with time and part of the mass in converted into stars. The total mass of the inflow is the same for all the models, leading to galaxies with very similar stellar masses at late times. The metallicity increases rapidly at early times but quickly reaches an equilibrium value.
where Z acc is the metallicity of the accreting gas. Together with Eqs. 1-3, we will adopt the assumptions of the 'ideal bathutb' model, namely: (i) A linear star formation relation, with star formation efficiency (SFE) ν which is constant in time.
(ii) Outflow rate proportional to the SFR through a constant (in time) outflow loading factor (λ) Combining equations 1-3, we can re-write the time evolution of the gas-phase metallicity Z as where to get to the final expression we have assumed that accretion is pristine (Z acc = 0). This assumption is adopted for the rest of this work.

Time dependence of the inflow rate and resulting star formation history
Chemical evolution models aimed at reproducing the metallicity gradient in the Milky Way generally assume a faster assembly time for the inner disc, in order to mimic the theoretical expectation of inside-out growth (Larson 1976). A simple way of implementing inside-out growth is to assume an exponentially declining accretion rate, with an infall timescale (τ inf ) which increases with galactocentric radius (Chiosi 1980;Matteucci & Francois 1989;Boissier & Prantzos 1999;Chiappini et al. 2001) This parametrization of the time dependence of the inflow rate is entirely predicated on its simplicity and does not have an a priori physical motivation. Other popular assumptions for the time evolution of the accretion rate include taking a constant inflow rate (Peng & Maiolino 2014), using a redshift-dependent inflow rate which is proportional to the dark matter accretion rate computed in numerical simulations (Forbes et al. 2014), assuming the inflow rate necessary to reproduce the redshift dependence of the star formation main sequence (Leitner 2012;Lilly & Carollo 2016) or assuming that the inflow rate is proportional to the SFR. The latter choice has been repeatedly used in recent literature (Dayal et al. 2013;Kudritzki et al. 2015) because it simplifies the equations of chemical evolution, but prevents us from studying the non-equilibrium behavior of the system. In this work we consider the full time evolution of the solutions to the bath-tub model and not only their behaviour near equilibrium (i.e. dΣ g /dt ∼ 0). We discuss some of the differences between these alternative assumptions and their relation to equilibrium in Appendix A.
Assuming eq. 7 and integrating eq. 1 -3 with respect to time, we derive analytical time-dependent solutions for this chemical evolution model given in Table 1. Since the constitutive equations of our model are first order ordinary differential equations, the solutions are trivially obtained by standard methods and we omit the derivation. 1 The solutions have four free parameters: the star formation 1 Some details regarding the derivation of our analytical solutions are pre-  Table 1. Exact analytical time-dependent solution of the exponential infall models used in this paper. The relevant timescales as the equilibrium timescale τ eq ≡ 1 ν(1−R+λ) and the critical timescale τ −1 c ≡ τ −1 eq − τ −1 inf .

Galaxy property Solution
1−e −t/τc efficiency ν, the outflow loading factor λ , the inflow timescale τ inf and the normalisation of the inflow rate I 0 .
In Fig. 1 we show the time evolution of different physical quantities (the inflow rate, gas mass, stellar mass and metallicity) in this model, considering three different inflow timescales (τ inf = 2, 4, 20 Gyr). The inflow rate is normalised so that the total mass of gas accreted between t = 0 and 14 Gyr is the same in each model, and is set to one in arbitrary units. The other parameters are held fixes at (ε, λ) = (0.5 Gyr −1 , 1.0). Because of this normalisation, the total stellar mass at late times is nearly the same between different models, with small differences due to the different final gas masses and fraction of mass expelled due to outflows.
Since SFR ∝ M gas in our model, the time evolution of the gas fraction tracks the star formation history (SFH) of the system. Exponential infall models produce SFHs similar to the popular SFR(t) ∝ t e −t/τ 'delayed SFH' parameterization, which is in reasonable agreement with the mean SFH obtained by inverting the star formation main sequence (Leitner 2012;Ciesla et al. 2017) and expectations from simulations (Simha et al. 2014). In our models the gas mass increases linearly with time at early times, as gas accumulates in the system faster than it can be processed. At late times, on the other hand, the SFH follows the exponential decay of the inflow rate, as star formation is limited by the available gas supply.
The history of chemical enrichment in these models can also be divided into two phases. During the first phase metallicity increases rapidly as the metals quickly pollute the pristine gas and SFRs are high. At late times, however, the metallicity reaches an equilibrium value, since chemical enrichment is balanced by metal consumption from star formation and expulsion by outflows. This stage of 'chemical equilibrium' at late times is a general feature of gas regulatory models which include inflows and outflows (Peng & Maiolino 2014;Weinberg et al. 2017). In our models the equilibrium abundance depends on the three parameters (ν, λ, τ inf ). As can be seen from Fig. 1, longer infall timescales correspond to more extended SFH and lower equilibrium metallicities. A more detailed discussion of the equilibrium solutions and their significance in our models is presented in Appendix A.

Infall rate and timescale
In this work we use the parametrisation of the infall timescale adopted for the Milky Way models of Matteucci & Francois (1989) the ones derived in this work, after taking the difference in notation into account. The solutions in Weinberg et al. (2017) are slightly different because the authors regard star formation history, and not the mass accretion rate, as fundamental, and the star formation history obtained in our model does not match exactly any of the simple cases discussed in their paper. and subsequent revisions thereof. This formalism adopts an infall timescale which increases linearly with radius, where a is the infall timescale at the galaxy centre (r=0) and b represents the linear gradient of the infall timescale. A positive b is required to mimic inside-out growth. The choice of this particular functional form is again dictated by its simplicity and is only weakly constrained post-facto by its ability to fit current abundance and gas fraction data in our Galaxy. We note that even when radial flows are explicitly modelled, the inclusion of radial flows does not lead to inside-out growth, but simply to a different 'effective accretion' profile (see the discussion in e.g. Pezzulli & Fraternali 2016).
In addition to the infall timescale, our model depends on the normalisation of the accretion rate profile I 0 (r). This normalising factor must have a radial dependence in order to generate a negative gradient in the stellar mass surface density. While most models assume I 0 (r) = A exp(−r/h), where h is a scale-length determined by fitting to the data, no simple prescription for the radial dependence of I 0 (r) is capable of generating a disc which remains exponential at all times. However, for suitably high values of a and b this standard choice of the normalisation parameter generates discs which are roughly exponential, especially at large radii.
Fortunately, the normalisation of the inflow rate only has an effect on extensive quantities (like M gas or M ), but not on quantities which are ratios of the above (like sSFR=SFR/M , f gas or 12+log(O/H)). We can demonstrate this explicitly in the case of metallicity by noting the the solution in Table 1 does not depend on I 0 . 2 In this work we only fit the metallicity gradient and therefore do not consider the normalisation of the inflow rate as a free parameter.

The star formation law and efficiency
While star formation is most directly associated to the molecular phase of the ISM (Kennicutt & Evans 2012), for the purposes of chemical evolution the relevant gas mass to consider is the total mass of gas diluting the metals. We assume that this consists of both atomic and molecular gas, with negligible mass in the ionised phase. Since atomic and molecular gas have different radial profiles, with the molecular gas being more centrally concentrated (Leroy et al. 2009;Bigiel & Blitz 2012), our model must take into account the different radial profiles of the star forming and the total gas component. In this work we parametrise this by using a linear star formation law (Eq. 4), and a star formation efficiency which decreases with radius. 3 We consider two alternative parametrisations of the star formation efficiency and its radial dependence. The first is based on the orbital timescale, while the second assumes a fixed SFE for molecular gas and a radially decreasing molecular gas fraction. In the following we describe these models in more detail.
(i) A classical implementation of the formation law is obtained assuming that the depletion time is proportional to the orbital 2 Note that this is only true for a linear star formation law of the form of eq. 4 and is not the case if one assumes the relation between SFR and gas mass to be given by a power law of the type SFR ∝ M k gas . 3 A super-linear star formation law could also be used to a similar end, but this would prevent us from generating analytical solutions to the constitutive equations of the bathtub model, and is therefore not considered here. Table 2. Free parameters in the adopted chemical evolution model. (1) and (2) The star formation efficiency (ν) as a function of radius for different models considered in this work. The blue curve corresponds to the assumption ν ∝ V/r. The rotation curve is parametrised using a tanh model, leading to the SFE expression presented in eq. 10. The red curve shows an alternative model where the SFE decreases linearly with r/R e . This model is a good representation of the observed SFE radial gradient in nearby galaxies (red data points, from Bigiel et al. 2008). For illustration purposes the red curve shown in figure represents the best fit to the observational data, and the blue curve is fixed to have the same SFE at r = 0. timescale (Silk 1997;Kennicutt 1998). Under this assumption one may write the star formation efficiency as where V(r) is the rotational velocity at radius r. The rotation curve is a direct observable, which can be derived from the MaNGA data, but for simplicity we use a hyperbolic tangent model to represent a galaxy's rotation curve. While not strictly physically motivated, this model is found to reproduce the shapes of rotation curves of local galaxies to high accuracy (Andersen & Bershady 2013;Westfall et al. 2014). We fix the scale length of the rising part of the rotation curve to be the same as the exponential disc scale length, which is close to the relation observed to hold in local galaxies Amorisco & Bertin (2010). Our model for the SFE is therefore given by where h is the exponential disc scale length and ν 0 is a free parameter of the model, and corresponds to the star formation efficiency at r=0. In Fig. 2 we show the SFE as a function of radius for a model galaxy using this SFE parametrization (solid blue line). In the rest of the paper we refer to this model as the ν ∝ V/r model. (ii) If the SFE depends on the free fall time of individual molecular clouds, and the mass spectrum of giant molecular clouds is roughly independent of the galactic environment the clouds live in, then we expect SFR ∝ M H2 . This model is broadly supported by observations of the gas content of local galaxies on kpc-scales (Bigiel et al. 2008;Leroy et al. 2009). The ability of the ISM to form a molecular component is likely driven by the hydrostatic gas pressure and the interstellar radiation field. Analytical recipes exist to compute these quantities based on other observables (Elmegreen 1993;Blitz & Rosolowsky 2006;McKee & Krumholz 2010). In this work, however, we wish to use the simplest possible prescription motivated by available data. To this end we fit the radial dependence of the SFE from Bigiel et al. (2008) with a linear model, which is found to be a good representation of the data. In particular, we assume SFR/M H2 = 2.0 Gyr and take the radial dependence of M H2 /M HI from Fig. 13 of Bigiel et al. (2008). The redial dependence of the SFE is therefore determined entirely by the radial variation in M H2 /M HI .
In Fig. 2 we show the SFE from the Bigiel et al. (2008) data (red dots) and our best linear fit. In order to convert the R 25 (radius where the galaxies reaches 25th magnitude in r-band) values used in Bigiel et al. (2008) to an effective radius (R e ), we assume the galaxies in the Bigiel et al. (2008) sample to be exponential discs with canonical central surface brightness of 21.65 magnitude arcsec −2 (Freeman 1970). In this model the SFE is therefore set to vary linearly with radius according to The best-fit parameters obtained fitting the Bigiel et al. (2008) data are ν 0,c = 0.45 Gyr −1 and ν 0 = 0.15 Gyr −1 . While this SFE model has two free parameters, ν 0,c and ν 0 , in this work we take ν 0 as a free parameter and fix ν 0,c to its best-fit value from the Bigiel et al. data. This choice is motivated by the desire to keep only one free parameter in the star formation law and by the fact that fixing ν 0 generates a radial SFE dependence very similar to the ν ∝ V/r star formation model (eq. 10, see Fig.  2). By using a model with free ν 0 , on the other hand, we are able to test whether real metallicity gradients are best described by a steeper or shallower (or even flat) SFE gradient. The second SFE parametrization used in this paper is therefore given by equation 11 with ν 0,c = 0.45 Gyr −1 . In the following we refer to this as the linearly decreasing SFE model.

The outflow loading factor
The outflow loading factor may be expected to depend on galactocentric distance, increasing towards the galaxy outskirts, where the local escape velocity may be lower. In this work, however, we refrain from introducing an ill-characterised radial dependence for the outflow lading factor and assume it to be constant as a function of radius.

Return R Yield y
Gas disk M g # inf = a + b × radius Figure 3. An illustration of the main components of the chemical evolution model described in this work. At the core of the model lie the equations of the 'bathtub' or 'gas regulatory' model, where star formation is regulated by inflow of pristine gas, the star formation efficiency of the disc gas (ν) and star formation driven outflows (with loading factor λ). In order to mimic the inside-out growth of the disc, the infall timescale is assumed to be function of radius, with timescale τ inf = a + b r. Inner regions of the galaxy therefore form both earlier and faster. As described in Table 2, we consider two different models for the radial variation of the star formation efficiency.

Summary of the model
In summary, in this work we fit metallicity gradients with two sets of chemical evolution models, which differ in their treatment of the radial dependence of the SFE (the ν ∝ V/r model and the linearly decreasing SFE model). Both models have four free parameters, whose definitions and units are summarised in Table 2. In Fig. 3 we present a graphical summary of the main features of our chemical evolution framework, which highlights the similarities to the bathtub model of Lilly et al. (2013).

Time evolution of the metallicity gradient
In this subsection we explore the time evolution of the metallicity gradient and other physical quantities predicted by our chemical evolution model and the effect of varying its free parameters. We focus on the model with ν ∝ V/r but similar trends are obtained by studying the linearly decreasing SFE model. In Fig. 4a we show the metallicity gradient at three different times (t=1.0, 3.0, 14.0 Gyr) for the ν ∝ V/r model and example values of model parameters (a; b; ν 0 ; λ) = (5 Gyr; 1 Gyr/kpc; 0.5 Gyr −1 ; 1.0). While these parameter values have been chosen to be approximately representative of real galaxies, they are only used here for illustrative purposes. Fig. 4a demonstrates that our model generally predicts a flattening of the metallicity gradient over time. Panel c of Fig. 4 shows that metallicity increases quickly at early times at all radii, with larger radii taking longer to reach the equilibrium metallicity value, as already noted in Sec. 2.2.
In Fig. 4b we show the sSFR radial profiles predicted by our chemical evolution model. At early times sSFR is high, and the radial profile is nearly flat. As the system evolves, however, the sSFR profile develops a dip at small galactocentric radii, indicative of gas exhaustion in the central regions of the galaxy. While in this work we do not fit observed sSFR profiles, we note that the shapes of the sSFR gradients produced by our chemical evolution model are at least qualitatively consistent with those observed in local (Spindler et al. 2018;Belfiore et al. 2018) and high redshift (Wang et al. 2017;Tacchella et al. 2018) galaxies.
Finally, in Fig. 4d we show the SFHs of galactic regions at different galactocentric distances. The SFHs have been normalised to their maximum value. The figure demonstrates the inside-out growth prescription embedded in our model, where regions at larger radii have both delayed (i.e. the peaks SFR occurs at later times) and more extended SFHs.
We next discuss the effect of the four free parameters a, b, ν 0 , λ on the time evolution of the metallicity gradient. In Fig. 5 we show the metallicity gradient at different times (1.0, 4.0 and 14.0 Gyr). In each panel one of the model parameters is varied and the other ones are kept fixed. The models shown in dashed lines correspond to the parameters values (a; b; ν 0 ; λ) = (5 Gyr; 1 Gyr/kpc; 0.5 Gyr −1 ; 1.) and are the same in all four panels. The main findings from this analysis are summarised below.
(i) The a parameter only affects the metallicity of the central region at late times. A small value of a corresponds to a shorter infall timescale for the central regions and, therefore, a higher metallicity in the centre.
(ii) The b parameter mostly affects the slope of the metallicity gradient at late times. At early times the metallicity is mostly driven by the ability of the system to process the gas (via star formation and outflows), so the b parameter does not affect the early evolution of the metallicity gradient. At late times, however, metallicity is driven by the availability of gas, which in turn depends on the inflow rate. The b parameter, therefore, determines how fast the metallicity of outer regions catches up with the inner regions. A large value of b implies a larger difference in the infall timescale between the centre and the outskirts and, therefore, a steeper metallicity gradient.
(iii) The value of the SFE at r = 0 (ν 0 ) determines how fast gas can be processed into stars and, therefore, mostly impacts the early evolution of the system. Higher ν 0 implies faster star formation and consequent enrichment, thus leading to higher metallicity at early times. At late times, the inner regions have already reached their equilibrium metallicity. A high ν 0 therefore mostly affects the outer regions, allowing them to experience sufficient star formation to be chemically enriched. High ν 0 at late times therefore corresponds to flatter gradients, which are the natural state of evolved systems in this model. (iv) The outflow loading factor λ strongly affects the shape of the metallicity gradient and the maximum metallicity reached by the galaxy at both early and late times, although its impact is most significant at late times. A higher outflow loading factor leads to lower metallicities, as a larger fraction of the gas reservoir is expelled, therefore preventing further chemical enrichment. A larger loading factor also produces flatter gradients, as the outflow expels gas from the high-SFR central regions, preventing their early-time enrichment.

Metallicity gradients in the nearby Universe
In this work we fit the metallicity radial profiles of star forming galaxies derived by Belfiore et al. (2017), making use of 550 galaxies from the MaNGA survey (Bundy et al. 2015;Yan et al. 2016), part of SDSS-IV (Blanton et al. 2017). Belfiore et al. (2017) find a mild change in the slope of the metallicity gradient as a function of mass, with low-mass galaxies having flatter gradients. Their data also shows a flattening and/or metallicity drop in the centres of massive galaxies (log(M /M ) > 10.5). More recently, Sánchez-Menguiano et al. (2017) confirmed the presence of an inner drop in the metallicity gradient for massive galaxies using a sample of 102 galaxies observed at higher spatial resolution with the MUSE integral field spectrograph on the ESO Very Large Telescope. Albeit offering lower spatial resolution, the MaNGA dataset is unique in being representative of the local population of star forming galaxies in the stellar mass range log(M /M ) = [9.0 − 11.0], and is therefore the dataset of choice in this paper. Belfiore et al. (2017) select star forming galaxies to be moderately face on (major to minor axis ratio greater than 0.4) and exclude interacting and merging galaxies. They calculate metallicity for each star forming region using the Maiolino et al. (2008) Maiolino et al. (2008) abundances, but discuss the differences obtained fitting the Pettini & Pagel (2004) abundance data in Sec. 4.2. A discussion on the effect of the metallicity calibration on our results is therefore postponed to that section.
Stacked profiles in mass bins are obtained by computing the robust estimate of the median profile (using Tukey's biweight, Beers et al. 1990) and standard deviation within each mass bin. Here we fit the data as a function of physical distance (in kpc) from the galaxy centre. When required, the effective radius is taken to be the median effective radius of the galaxies in each mass bin.

The fitting approach
In light of the discussion in Sec. 2.4 we expect significant degeneracies to exist between a, b, ν 0 , and λ, since these parameters conspire in setting the both normalisation and the slope of the metallicity gradient. In fact, one of the aims of this work is to reveal the degeneracies inherent in bathtub chemical evolution models. To this aim, we make use of an MCMC sampling method to explore the four-dimensional parameter space and efficiently characterize the uncertainties associated with the derived parameters. In detail,  The sampler is initialized around the position in parameter space which provides a best fit to the data, calculated using a the optimize.minimize procedure. We fit the metallicity gradients in each mass bin independently, without constraining the model parameter to vary smoothly with mass. The acceptance fractions (i.e. fraction of times a suggested step is approved in the evolution of the Markov chain) is between 0.3 and 0.5 for all the mass bins, indicating reasonable performance for the MCMC sampler. Convergence of the MCMC chain is also evaluated using the Gelman-Rubin diagnostic,R. This metric compares the dispersion within the chain to the dispersion between chains sampling the same posterior.R tends to 1 when convergence is achieved. We findR < 1.08 for all four free parameters.
In Fig. 6 we show the posterior probability density functions (PDF) obtained fitting the metallicity gradient in the mass bin log(M /M ) = 9.75 − 10.00 with the ν ∝ V/r SFE model as an example of the kind of degeneracies unveiled by the MCMC analysis. The degeneracy contours appear different for different mass bins, but some general properties are already evident in the example in Fig. 6. In particular, the a and b parameters, determining the gas infall timescale, cannot be inferred very precisely from the data. In this example the PDF for b parameter covers a large fraction of the prior range. The PDFs for ν 0 and λ, on the other hand, are relatively well-constrained around the best-fit values. The most significant degeneracies appear between b, λ and ν 0 . A higher value of b generates a steep gradient at late times, which can also be obtained by a slight decrease of the outflow loading factor, or of ν 0 (see Fig. 5). The error bars correspond to the 16th and 84th percentiles of the PDF. Also plotted the median ν 0 obtained by Bigiel et al. (2008) for a small sample of local star forming galaxies.

The best fit model parameters
Focusing first on the ν ∝ V/r SFE model, we show in Fig. 7 the best fit models for each mass bin (solid lines), superimposed on the MaNGA metallicity profiles in mass bins (circles with error bars). It is clear from this figure that the model with ν ∝ V/r provides excellent fits to the data across all mass bins. The reduced χ 2 values for each mass bin lie in the range between 0.3 and 2.4, with an average χ 2 across all mass bins of 1.0.
Our models are capable of matching the change in shape of the metallicity gradients as a function of stellar mass, fitting both the steep gradients in the mass range log(M /M ) = 9.5 − 10.5 and the high-mass galaxies, which show a flattening of the metallicity gradient in the central regions. The data for the lowest mass bin shows a mildly inverted gradient, which is also well-fitted by our models. However, the PDFs for a, b and ν 0 in the lowest-mass bin are roughly flat over the prior range and only the outflow loading factor λ shows a PDF with a well-defined peak for this mass bin (see Fig. B1). In the mass range log(M /M ) = 9.25 − 10.00 a small break is evident in the slope of the model metallicity gradients at r ∼ 2.0 kpc. This corresponds to the disc scale-length h, and to the change in slope of the rotation curve, as parametrized by the ν ∝ V/r model.
In Fig. 8 we show the medians of the inferred posterior PDFs for the four model parameters as a function of stellar mass. The error bars represent the 16th and 84th percentiles of the posterior PDFs. We note two regimes, which roughly correspond to high-mass (log(M /M ) > 10.25) and low-mass galaxies. At low masses a and b are not well-determined and the outflow loading factor λ is a decreasing function of mass. At high masses, roughly corresponding to the onset of the flattening of the metallicity gradient in the central regions, b is low and λ is marginally consistent with being zero. Interestingly, ν 0 is very well-constrained in the range 0.5-0.7 Gyr −1 across the whole mass range. These values of ν 0 are comparable to the observed value of 0.45 Gyr −1 (Bigiel et al. 2008). Considering that we assumed an uninformative prior in the range [0, 4] Gyr −1 , we consider the fact that inferred ν 0 lies close to the measured value as an additional success of the model. As noted above, the lowest mass bin is an outlier, and the inferred high median value of ν 0 is entirely due to the flat posterior PDF. In Fig. 9 (left panel) we show the equivalent results for the linearly decreasing SFE model. This model is less successful at reproducing in detail the shape of the MaNGA metallicity radial profiles, with values of the reduced χ 2 going from 0.4 to 7.7 and an average χ 2 over all mass bins of 2.5. The model struggles in particular to reproduce galaxies of intermediate mass log(M /M ) = 10.0 − 10.5, where the shape of the metallicity gradient changes from steep to flat in the inner regions.
The parameters inferred using the linearly decreasing SFE model are shown on the right panel of 9. Several trends are found to be in common with the ν ∝ V/r model. In particular, λ shows a decrease with mass, going from ∼ 1 at log(M /M ) = 9.0 to zero at high masses. ν 0 , the slope of the SFE decrease in units of r/R e , has only a mild mass dependence and the average value is 0.11 Gyr −1 , in reasonable agreement with the value of 0.15 Gyr −1 derived in Sec. 2.3.2 from the data of Bigiel et al. (2008).

DISCUSSION
In this work we have demonstrated that our simple chemical evolution models, based on the gas-regulatory formalism and containing only four free parameters, are capable of reproducing the change in shape of metallicity radial profiles for galaxies of different stellar masses at z = 0 as observed by the MaNGA survey. Of the two SFE parameterizations considered in this work, the model with ν ∝ V/r produces the best fit to the data. Moreover, the inferred SFE is close to the SFE measured in galaxies in the local Universe by Bigiel et al. (2008). While the assumption of inside-out growth is supported by our parameter inference (b>0), the overall constraints on the parameters setting the infall timescale (a and b) are weak, their mass dependence appears somewhat different between the ν ∝ V/r and the linearly decreasing SFE model. In this section we therefore do not discuss our inference on these parameters. On the other hand, taken at face value, our models are capable of inferring the value of the outflow loading factor with good precision. We therefore focus this discussion on comparing our inferred outflow loading factor with results from the literature and discussing possible systematic uncertainties, such as the value of the nucleosynthetic yield or the gas-phase metallicity calibration used.
Finally we compare our results with other recent work based on both more sophisticated analytical models and hydrodynamic simulations.

The outflow loading factor
In the literature there are at least two different approaches to measuring the outflow loading factor, which can be broadly defined in both observations and simulations. The first approach aims to measure the instantaneous outflows loading factor by relating the state of the outflowing gas directly to an ongoing star formation event. Measurements of outflow rates based on the kinematics of the ionised or molecular gas close to the galactic discs of starburst galaxies fall into this category (Heckman et al. 2000;Veilleux et al. 2005;Heckman et al. 2015;Förster Schreiber et al. 2019). Hydrodynamical codes which assume sub-grid prescriptions for launching winds also generally quote the outflow loading factor directly related to a star formation event (also referred to as the loading factor 'at injection', see Pillepich et al. 2018). The shortcoming of this approach is that this outflow loading factor does not take the fate of the outflowing gas into account, since a large fraction of this gas may be quickly re-integrated into the disc and therefore promptly made available for future star formation. This means that the instantaneous outflow loading factor cannot be directly related to the baryon and metal deficit of galaxies.
Alternatively one can define an average cumulative outflow loading factor as the ratio between the star formation rate and the amount of gas leaving the galaxy's halo (or crossing a surface at a specific distance from the centre of the halo) over a defined timescale (Muratov et al. 2015). This outflow loading factor is directly related to the amount of baryons and metals expelled by a galaxy, and therefore more closely comparable to the outflow loading factor used in chemical evolution models. In presence of recycling, the time averaged cumulative outflow loading factor will be lower than the instantaneous one. In this work one may interpret, albeit approximately, the outflow loading factor computed here as a average of the instantaneous loading factor over the SFH of the galaxy.
Taking these differences into account, we show in Fig. 10 the outflow loading factor inferred in this work as blue and red circles with error bars, corresponding to the ν ∝ V/r and the linearly decreasing SFE model respectively. See Table 3 for the tabulated values of the loading factors and their errors. We also show in Fig.  10 the outflow loading factors inferred from measurements of the local mass-metallicity relation by authors using different analytical models (solid lines, Peeples & Shankar 2011;Lilly et al. 2013;Zahid et al. 2014). For consistency with previous literature, the halo mass and virial velocities are obtained from the stellar mass using the formalism and equations of Peeples & Shankar (2011). It is worth noting that different authors make use of different metallicity calibrations and oxygen nucleosynthetic yields, which would affect their inference for the outflow loading factor. Considering these systematic uncertainties and the differences in the modeling framework, the outflow loading factors obtained in this work are in reasonable agreement with the range of values present in the literature.
Coloured triangles in Fig. 10 refer to the loading factors inferred 'directly' from observations of star forming galaxies at z ∼ 0 (black upwards triangles, from Heckman et al. 2015, blue rightpointing triangles from Chisholm et al. 2017) and z = 0.6 − 2.7 (red right-pointing triangles, from Förster Schreiber et al. 2019). These determinations refer to instantaneous loading factors, measured by studying UV and Hα line emission respectively. We note that large systematics may affect these determinations, due to uncertainties in the density and geometry of the outflows and because they only refer to a specific phase of the ISM. However, partially because of the large intrinsic scatter, these loading factors are in good general agreement with the loading factors determined in this work.
The dashed lines in Fig. 10 show the values for the outflow loading factors employed or measured in hydrodynamical simulations by Davé et al. (2011) andMuratov et al. (2015) for galaxies in dark matter halos of different masses. Other simulators only quote loading factors at injection (e.g. Vogelsberger et al. 2013 andPillepich et al. 2018 for the loading factors at injection for the Illustris and Illustris-TNG simulations respectively), which can be up to an order of magnitude larger. We predict however, that since Illustris and TNG reproduce the mass-metallicity relation for galaxies (Vogelsberger et al. 2013;Torrey et al. 2019), a direct measurement of cumulative loading factor would be in much better agreement with other measurements of the loading factor in the literature. While other theoretical estimates of the outflow loading factor still lie above most of the empirically-determined values, we will show in the next section that changing the oxygen yield and/or the adopted metallicity calibration one may infer higher loading factors from the observations as well.
It is also worth noting that relaxing the assumption that outflows share the metallicity of the surrounding ISM will have an impact on the loading factor inferred in this work and other studies based on fitting the mass-metallicity relation. Based on a sample of five galaxies with high signal-to-noise UV spectroscopy, Chisholm et al. (2018) find that for galaxies with log(M /M ) > 9.0 have outflow metallicities ∼ 2.6 time higher than the metallicity of the ISM gas in the host. Unfortunately introducing metal-enriched outflows requires new solution to the constitutive equations of our model, so we do not explore this issue in detail here.
Finally, we note that the assumption of a loading factor that does not change with time (as adopted in this work) is not a bad one. To test this, we parametrised the instantaneous loading factor as a power law in virial velocity. We then use the SFH of each model galaxy to derive a stellar mass, halo mass and virial velocity as a function of time following the formalism in Peeples & Shankar (2011). We find that assuming either λ ∝ 1/V vir or λ ∝ 1/V 2 vir the SFH-averaged loading factor (calculated at redshift zero) is within 20% of the instantaneous loading factor.

The effect of the yield, IMF and the abundance scale
Both the assumed nucleosynthetic yield and the zero-point of the gas phase abundance scale are expected to have a large effect on the determination of the outflow loading factor. Nearly all oxygen in the Universe is produced by massive stars (M > 8 M ) dying as Type II supernovae. Uncertainties in the oxygen yield arise from the systematic uncertainties in predicting the amount of newly synthesized oxygen by Type II supernovae of fixed progenitor mass, but also from the integration over the IMF and the choice of range of stellar masses to integrate over.
Significant uncertainties persist in modern determinations of the oxygen yield per stellar generation, which can lead to yields varying up to a factor of three for reasonable choices of parameters (Vincenzo et al. 2016). In order to test the impact a higher oxygen yield would have on our analysis we have re-fitted the ν ∝ V/r model to the metallicity profiles data using y O = 0.037, the value expected from a Chabrier (2003) IMF (our default yield is y O = 0.0105). The return fraction was also adjusted to R = 0.455, as appropriate for this choice of IMF. The resulting outflow loading factor for different mass bin is shown in Fig. 11 (green data points), together with the loading factors previously inferred in Sec. 3.3. As expected, the new yield increases λ to values ranging from ∼ 3.5 for log(M /M ) = 9.0 to 1.5 at high masses.
Finally we consider the effect of the gas-phase metallicity calibration on the derived loading factor. Well-known systematics affect the measurement of gas-phase metallicity from strong line ratios (see for example the discussion in Blanc et al. 2015). These systematics have the largest effect on the determination of the metallicity zero-point, with the Maiolino et al. (2008) calibration based on R23 leading to metallicities ∼ 0.2 dex higher than the Pettini & Pagel (2004) calibration based on O3N2. We therefore repeat our analysis for the ν ∝ V/r model using the metallicity radial profiles calculated using the Pettini & Pagel (2004) calibration by Belfiore et al. (2017). The data and the resulting best-fit models are shown in Fig. 11, right panel. Echoing Belfiore et al. (2017), we note that the metallicity gradients calculated using the Pettini & Pagel (2004) calibration have similar shapes to those calculated using the Maiolino et al. (2008) calibration. Differences include the fact that the lowest mass bin does not show an inverted gradient and the highest mass bin shows a clear plateau, but a less pronounced inversion at small radii. As can be seen from Fig. 11, our models produce excellent fits to the data. The parameter most affected by the change in metallicity calibration is again λ, although we also find a slightly lower mean ν 0 (0.38 Gyr −1 ) than for the fit to the Maiolino et al. (2008) calibration data. The resulting outflow loading factor for different mass bins is plotted in Fig. 11, left panel (orange). λ now ranges from ∼ 1.9 at low masses to 0.4 at high masses.
The loading factors obtained with the different parameter choices discussed in this section are reported for all mass bins in Table 3.

Limitations and comparison with other models
The model described in this work represents an attempt to describe chemical evolution of disc galaxies in the simplest possible terms. Each of the assumptions described in Sec. 2.3 represents a simplification, since important physical processes are neglected.
As already noted in Sec. 2.3.1, it is difficult to generate an exponential disc following naive disc assembly prescriptions and neglecting radial flows. However, radial flows in discs are a general consequence of angular momentum conservation, since material from the halo accreting onto the disc at a specific radius will not necessarily share the angular moment of the disc at the point of impact (Mayor & Vigroux 1981;Lacey & Fall 1985;Spitoni & Matteucci 2011;Pezzulli & Fraternali 2016). Unfortunately the velocities predicted for these radial flows are of a few km/s, and are observationally challenging to distinguish for other non-axisymmetric disturbances in discs (Wong et al. 2004;Schmidt et al. 2016). We note, moreover, that to our knowledge there exists no analytical model of disc formation and chemical evolution which naturally produces an exponential disc, even when radial flows are included. Models where the discs are exponential at all time steps (e.g. Pezzulli & Fraternali 2016;Bilitewski & Schönrich 2012) need to explicitly assume them to be so.
While we successfully fit metallicity gradients, even in the absence of radial flows, the stellar mass profiles of our model galaxies tend to flatten and therefore deviate from an exponential profile within the inner few kpc. This is a natural consequence of inside-out growth in the bath-tub model. The inflow rate in the central regions of galaxies decreases more quickly that in the outskirts, leading to a decrease in SFR and a flattening mass profile. For the same reason, in our models the sSFR always gently increases at large radii. It is interesting to note that using the best-fit model parameters we have derived, the predicted sSFR profiles fail to match in detail the ones observed by the MaNGA survey (Belfiore et al. 2018), especially at small and large radii. The introduction of radial flows, which we delay to future work, may contribute to bringing the model closer to the observations, by providing more gas in the central regions at late times.
The effect of galaxy mergers on metallicity gradients is also neglected in this work. Merging and interacting galaxies are observed to have flatter metallicity gradients , as a result of inward gas flows triggered by tidal interactions Torrey et al. 2012). Fu et al. (2013) make use of the Munich L-GALAXIES semi-analytical model with a simple prescription for disc disruption during mergers and find that time since the last merger is the quantity that correlates most strongly with the metallicity gradient at redshift zero.
Finally, the procedure for mixing metals into the ISM also has MaNGA data model ( V/r) Figure 11. Left: The outflow loading factor as a function of stellar mass computed in this work, using different SFE models (ν ∝ V /r in red, linearly decreasing SFE model in blue, same as in Fig. 10), different oxygen yield (y O = 0.037, as predicted for a Chabrier (2003) IMF, green) and using the Pettini & Pagel (2004) metallicity calibration based on O3N2 for the metallicity gradients data (orange). Right: Same as Fig. 7, but using the metallicity gradients derived from the Pettini & Pagel (2004) calibration based on O3N2. an impact on the derived abundances. In this work we assume that nucleosynthetic products are instantly mixed with the cold ISM in each annulus. However, a fraction of the newly-produced metals may be directly expelled into the hot halo gas (Chisholm et al. 2018), without fist mixing with the cold galaxy ISM, as we have assumed here. Enriched accretion of gas from the halo at late times leads to flatter gradients and a plateau in metallicity in the outer disc. Bresolin et al. (2012), for example, argue that the metallicity on the outer disc of nearby galaxies flattens to a value of around 0.35 Z . Similar conclusions on the flattening of metallicity gradients at large radii are notably reached by Sánchez et al. (2014). The change in slope of the metallicity gradient as a function of mass has not yet been extensively explored in hydrodynamical models. Based on a sample of 32 zoom-in simulations, of which only 9 were evolved to redshift zero, Ma et al. (2016) find a mild steepening of the metallicity gradient with stellar mass, in qualitative agreement with observations at high redshift (Stott et al. 2014).
More recently, Tissera et al. (2018) compared their predictions from the EAGLE cosmological simulation (Schaye et al. 2015) with z ∼ 0 MaNGA observations of Belfiore et al. (2017), demonstrating that EAGLE galaxies have systematically shallower gradients than observed. The EAGLE simulations also shows a large fraction of galaxies with positive metallicity gradients (∼ 40%), which is not found in observations of the local Universe (Pérez-Montero et al. 2016). Tissera et al. (2018) suggest that the overly flat gradients produced in EAGLE could be due to the roughly flat SFE radial profile in the simulated galaxies, at odds with current observations. It is also possible, as argued in Ma et al. (2016), that the 'effective feedback' model implemented in the EAGLE simulation may artificially mix metals on large scales, thus preventing strong metallicity gradients from forming. The development of more physically-motivated models for feedback and ISM physics may therefore be needed in order to reproduce the changes in slope of the metallicity gradients observed by MaNGA.

CONCLUSIONS
In this work we have developed analytical chemical evolution models, based on the bathtub model formalism, to describe radial metallicity profiles in local galaxies. We bridge the gap between previous bathtub models, mostly aimed at describing the chemical evolution of galactic systems as a whole (e.g. Bouché et al. 2010;Lilly et al. 2013), and classical chemical evolution models developed for the Milky Way galaxy (e.g. Chiappini et al. 2001). In particular, we adopt the inside-out growth formalism of Matteucci & Francois (1989), which posits a radially-dependent infall timescale, and develop two models for the radial dependence of the SFE. In one version of the model we assume that the SFE is inversely proportional to the orbital timescale (the ν ∝ V/r model), and in the second one we assume a constant SFE for the molecular gas (i.e. SFR/M H2 = const) and a molecular gas fraction which decreases with radius (the linearly decreasing SFE model), motivated by the data from Bigiel et al. (2008).
For either SFE parametrization, our models are described by four free parameters. Two of the parameters describe the infall timescale and its radial dependence (a and b). For the ν ∝ V/r model, the SFE at the centre of the galaxy is taken as a free parameter, while for the linearly decreasing SFE mode the slope of the radial gradient of the SFE is assumed to be free. The final free parameter is the outflow loading factor.
We have studied the effect of varying these parameter on the metallicity gradient and its time evolution. Overall, our models predict a flattening of the metallicity radial profile with time, in general agreement with results from hydrodynamical simulations and classical chemical evolution models with a radially decreasing SFE. However, all four parameters conspire to set the final degree of chemical enrichment and the slope of the metallicity gradient at late times, pointing to significant degeneracies.
We compare our models with the metallicity radial profiles measured by Belfiore et al. (2017) for star forming galaxies in the MaNGA survey. We perform the fit within a Bayesian framework and explore the parameter space via MCMC sampling. We summarise the main conclusions from this analysis below.
(i) Both SFE parametrisations produce good fits to the data, with the ν ∝ V/r model being favoured in terms of χ 2 . Notably, our models are capable of reproducing the details of the changes in shape of the metallicity radial profiles over the entire mass range log(M /M )=[9.0-11.0] covered by the observations.
(ii) We find significant degeneracies between model parameters. Partly as a consequence of that, the inference for the parameters describing the infall rate and its radial dependence is weak.
(iii) For both the ν ∝ V/r and the linearly decreasing SFE model we find the best-fit parameters describing the SFE have only a weak mass dependence and are in reasonable agreement with the observations of Bigiel et al. (2008).
(iv) For the adopted value of the nucleosynthetic yield (y O = 0.0105, assuming a Kroupa et al. 1993 IMF), the outflow loading factor is found to vary from nearly unity at log(M /M ) = 9.0 to close to zero at log(M /M ) = 11.0. These loading factors are in good agreement with previous determinations of the loading factor based on the mass-metallicity relation of local galaxies and with 'direct' measurements of the loading factors of local and highredshift star forming galaxies.
(v) A higher value of the yield (y O = 0.037, as expected from a Chabrier 2003 IMF) leads to higher inferred loading factors, going from ∼ 3.5 for log(M /M ) = 9 to close to ∼ 1.5 for log(M /M ) = 11.0 . The choice of the gas-phase metallicity calibration also has an effect on the inference on the outflow loading factor. Higher loading factors are obtained making use of the Pettini & Pagel (2004) O3N2 metallicity calibration instead of the adopted Maiolino et al. (2008) calibration based on R23.
Although our models are successful at reproducing the data and provide physical insight into the effect of different parameters, they do not include all the physics relevant to metallicity gradients. We expect that next generation of hydrodynamical simulations will be able to study the changes in shape of the metallicity gradients as a function of mass and quantify the impact of the physics which is missing from our simplified framework. The metallicity converges towards its equilibrium value at t > τ eq = 1.16 Gyr (red dashed lines) for the choice of parameters adopted in this plot, (ν, λ) = (0.5 Gyr −1 , 1.0). Also shown in the plot as blue dashed line the time t/τ eq = 3. We find that for t/τ eq > 3 model parameters are sufficiently close to their equilibrium values to justify the equilibrium assumption.

APPENDIX A: SOLUTIONS TO NOTABLE CHEMICAL EVOLUTION MODELS AND THE ROLE EQUILIBRIUM
In this Appendix we aim to develop a physical understanding for the solutions of the chemical evolution model presented in this work. We start from notable solutions of simple models and comment on how the solution to the model presented in this work are related to them, especially at late times when the systems tends to equilibrium.
In the presence of inflows and outflows, the simplest gas regulatory models are 'equilibrium' models, where the gas mass of the system is taken to be constant in time (dΣ g /dt = 0, Finlator & Davé 2008;Genel et al. 2008;Bouché et al. 2010;Genel et al. 2012;Davé et al. 2012). Assuming dΣ g /dt = 0 Eq. 1 reduces to Under these assumption at late times equation 6 reduces to Lilly et al. (2013) have highlighted that equilibrium is a good assumption for gas-poor, chemically evolved, low-redshift galaxies, but not for gas-rich dwarfs or galaxies at high redshift. In these systems the SFR cannot adjust itself fast enough compared to the high rate of accretion and the amount of mass in the gas reservoir must evolve.
If the timescale over which the accretion rate changes is much longer than other timescales in the system, one may assume the inflow rate to be constant to first order. Under these assumptions, Peng & Maiolino (2014) demonstrated that one can define a natural timescale for the chemical evolution of the system (the equilibrium timescale, τ eq ), given by For the sake of completeness, we provide below a brief recap on how to obtain analytical solution to the constitutive equations of the bathtub model in the case of constant accretion rate. The evolution of the gas content (Eq. 2) becomes dΣ g dt + Σ g τ eq = I.
This is a first order ordinary differential equation with integrating factor e t/τ eq and solution Σ g = Iτ eq (1 − e −t/τ eq ).
Substituting into equation 6 we obtain a first order ordinary differential equation for the time evolution of metallicity dZ dt + Z τ eq (1 − e −t/τ eq ) = p ν, which may be solved with integrating factor e t/τ eq − 1. The final time evolution of the metallicity can therefore be written as Z = p ν τ eq − p ν t e −t/τ eq 1 − e −t/τ eq .
This solution was already presented in Belfiore et al. (2016). Confusingly, it is slightly different from the solution originally derived by Peng & Maiolino (2014), who assume that the gas mass is slowly varying in deriving their equation 35, while our solution does not make this assumption.
In Fig. A1 we show the time evolution for a number of fundamental parameters (I, M gas , M , 12 + log(O/H)) in this model. The gas phase metallicity of the system increases quickly at early times, and for t >> τ eq the system tends to the equilibrium metallicity given by Z = p ν τ eq (in equilibrium). (A8) The value of τ eq is noted in Fig. A1 as a red dashed line. In practice, in order to test whether the equilibrium condition (t >> τ eq ) is met we find that the value of t/τ eq = 3 provides a reasonable boundary (blue dashed line in figure). For example, for the choice of parameters adopted in Fig. A1 the metallicity is within 80% of its equilibrium value by t/τ eq = 2.7. The gas content, on the other hand, reaches its equilibrium value on a slightly faster timescale. For example, in this model the gas content is within 80% of its equilibrium value by t/τ eq = 1.6. In order to obtain a time-dependent solution for the equations of chemical evolution using the exponential infall prescription, as we have done in this work, it is useful to define a new timescale, τ c , given by Finding solutions to the constitutive equations of the bathtub model then proceeds in a similar way as for the constant infall rate model. In particular, in the exponential infall model the time evolution of gas phase metallicity is given by Remarkably this equation is the same as A7, if one substitutes τ eq with the new timescale τ c . τ c can therefore be thought as the natural timescale for the exponential infall model to reach the equilibrium metallicity. In this model, at late times the metallicity also converges to its equilibrium value, now given by Z = p ν τ c (in equilibrium).
Solutions for the time evolution of other quantities are summarised in Table 1 of Sec. 2.2. Figure A2. The radial dependence of τ c using the best-fit parameters for the ν ∝ V /r model fit to the metallicity gradients (see Sec. 3.3). Different colours corresponds to different mass bins, as described in the legend. The dashed black dashed lines corresponds to t/τ c = 3 and can be used as a rough demarcation between regions in equilibrium (below the line) and regions out of equilibrium (above the line).
Let us now consider the best fit parameters obtained from fitting metallicity gradients with the ν ∝ V/r model. In this model τ eq increases with radius, since it is inversely proportional to ν.
We find τ eq ∼ 1 − 2 Gyr in the centres of galaxies, increasing to 4 − 8 Gyr at R = 2 R e (excluding the lowest mass bin, which has anomalously high ν, resulting in low τ eq ). τ c follows a similar radial gradient, with some changes due to the effect of τ inf . Given the definition of τ c , τ inf has the largest effect on τ c when τ inf ∼ τ eq . In the inner regions of galaxies τ inf is a few Gyr, comparable to τ eq , and therefore τ c is appreciable larger than τ eq .
In Fig. A2 we show the radial variation of τ c using the bestfit model parameters from Sec. 3.3 using the ν ∝ V/r model. Each color represents a different mass bin. In order to give a rough idea of the regions where the galaxies are close to equilibrium, the dashed black line represents t/τ c = 3.0. To first order, regions lying below this line can be assumed to be in equilibrium, while regions lying above this line have not yet reached equilibrium. As can be seen from Fig. A2, the inner regions of galaxies are predicted to be in equilibrium (at t = 14 Gyr), while the outskirts increasingly deviate from equilibrium conditions. This is generally true for all mass bins, expect the lowest mass galaxies, as already noted above.
In Fig. A3 we show the best-fit metallicity gradient models (same as Fig. 7), but distinguishing between regions in equilibrium (solid black lines) and regions outside equilibrium (dashed black lines). Here we consider regions to be in equilibrium if the difference between the equilibrium metallicity (Eq. A10) and the metallicity at t=14 Gyr is less than 0.1 dex. Again we find that the inner regions of galaxies have already reached their equilibrium metallicity at t=14 Gyr and the outer regions are still not in equilibrium.
This analysis demonstrates, therefore, that the ability to capture the non-equilibrium evolution of the system is key in reproducing the shapes of the metallicity gradients in our modelling framework. An equilibrium model may, on the other hand, be successful at reproducing the abundances in the central regions of galaxies. Figure A3. Same as Fig. 7, but dividing highlighting whether each radial regions is the model is or not in equilibrium (solid black and dashed black lines respectively). For the purposes of this plot regions are defined to be in equilibrium if their metallicity is within 0.1 dex of the equilibrium metallicity (Eq. A11).

APPENDIX B: CORNER PLOTS FOR ALL MASS BINS
In this appendix we present corner plots showing the posterior PDFs for all mass bins using the ν ∝ V/r (Fig. B1) and linearly decreasing SFE model (Fig. B2).