vice.milkyway ============= An object designed for running chemical evolution models of Milky Way-like spiral galaxies. Inherits from ``vice.multizone``. This object models the Milky Way as a series of concentric annuli of uniform width. A prescription for stellar migration based on the ``h277`` hydrodynamical simulation (a part of the ``g14`` simulation suite, Christensen et al. 2012) [1]_, an observationally motivated star formation law, and a scaling of the outflow mass loading factor :math:`\eta` with radius tuned to predict an observationally motivated radial abundance gradient are included by default. For details, see discussion in Johnson et al. (2021) [2]_. **Signature**: vice.milkyway(zone_width = 0.5, name = "milkyway", n_stars = 1, simple = False, verbose = False, N = 1e5, migration_mode = "diffusion") .. versionadded:: 1.2.0 .. seealso:: - ``vice.multizone`` - ``vice.toolkit.J21_sf_law`` - ``vice.toolkit.hydrodisk.hydrodiskstars`` - ``vice.singlezone`` Parameters ---------- zone_width : ``float`` [default : 0.5] The radial width of each annulus in kpc. name : ``str`` [default : "milkyway"] The name of the simulation. Output will be stored in a directory under this name with a ".vice" extension. n_stars : ``int`` [default : 1] The number of stellar populations forming in each zone at each timestep. simple : ``bool`` [default : False] If True, VICE will run the model as a series of one-zone models. If False, information at intermediate timesteps will be taken into account. verbose : ``bool`` [default : False] Run the model with verbose output. N : ``int`` [default : 1e5] An estimate of the number of total stellar populations that will be simulated. This keyword will be passed to the ``hydrodiskstars`` object implementing the stellar migration scheme. migration_mode : ``str`` [default : "diffusion"] A string denoting the time-dependence of stellar migration. This keyword will be passed to the ``hydrodiskstars`` object implementing the stellar migration scheme. Attributes ---------- annuli : ``list`` The radii representing divisions between annuli in the disk model in kpc. zone_width : ``float`` [default : 0.5] The radial width of each annulus in kpc. evolution : ```` [default : milkyway.default_evolution] A function of galactocentric radius in kpc and time in Gyr, respectively. Returns either the surface density of gas in :math:`M_\odot`, the surface density of infall, or the surface density of star formation in :math:`M_\odot yr^{-1} kpc^{-2}`. The interpretation of the return value is set by the attribute ``mode``. .. note:: This is the **only** object in the current version of VICE which formulates an evolutionary parameter in terms of surface densities. This is done because many physical quantities are reported as surface densities in the astronomical literature. The ``singlezone`` and ``multizone`` objects, however, formulate parameters in terms of mass, out of necessity for the implementation. mode : ``str`` [case-insensitive] [default : "ifr"] The interpretation of the attribute ``evolution``. Either "sfr" for star formation rate, "ifr" for infall rate, or "gas" for the ISM gas supply. elements : ``tuple`` [elements of type str] [default : ("fe", "sr", "o")] The elements to calculate abundances for in running the model. IMF : ``str`` or ```` [default : "kroupa"] The stellar initial mass function to assume. Strings denote built-in IMFs from the literature. Functions will be interpreted as a custom distribution of zero-age main sequence masses in :math:`M_\odot`. Built-in IMFs: - "kroupa": Kroupa (2001) [3]_ - "salpeter": Salpeter (1955) [4]_ mass_loading : ```` [default : milkyway.default_mass_loading] The mass loading factor as a function of galactocentric radius in kpc describing the efficiency of outflows. dt : ``float`` [default : 0.01] The timestep size in Gyr to use when running the model. bins : ``list`` [default : [-3.0, -2.95, -2.9, ... , 0.9, 0.95, 1.0]] The bins within which to sort the normalized stellar metallicity distribution function in each [X/H] and [X/Y] abundance ratio measurement. delay : real number [default : 0.15] The minimum delay time in Gyr before the onset of type Ia supernovae associated with a single stellar population. RIa : ``str`` [case-insensitive] or ```` [default : "plaw"] The SN Ia delay-time distribution (DTD) to adopt. Strings denote built-in DTDs and functions must accept time in Gyr as a parameter. smoothing : ``float`` [default : 0.0] The outflow smoothing timescale in Gyr. See discussion in Johnson & Weinberg (2020) [5]_. tau_ia : ``float`` [default : 1.5] The e-folding timescale of the SN Ia DTD. Only relevant when the attribute ``RIa == "exp"``. m_upper : ``float`` [default : 100] The upper mass limit on star formation in :math:`M_\odot`. m_lower : ``float`` [default : 0.08] The lower mass limit on star formation in :math:`M_\odot`. postMS : real number [default : 0.1] The lifetime ratio of the post main sequence to main sequence phases of stellar evolution. Z_solar : real number [default : 0.14] The adopted metallicity by mass of the sun. Other attributes are inherited from ``vice.multizone``. .. note:: The ``h277`` data is not included in VICE's distribution, but is available in its GitHub repository. When users first create a ``milkyway`` object, it will download the data automatically and store it internally for future use. With a good internet connection, this process takes about 1 minute to complete, and need not be repeated. If the download fails, it's likely it has to do with not having administrator's privileges over your system. Users in this situation should speak with their administrator, who would then be able to download their data by running the following on their system: >>> import vice >>> vice.toolkit.hydrodisk.data.download() .. note:: This object, by default, will shut off star formation at :math:`R` > 15.5 kpc by setting the star formation efficiency timescale to a very large number. This can be overridden at any time by resetting the attribute ``tau_star`` of each zone. .. note:: See documentation of ``vice.multizone`` base class for information on the implementation and required computational overhead of this and other applications of VICE's multizone capabilities. In theory, the data involved can be arbitrarily large provided the system has the space, but coarse versions of finely sampled models often require only minutes to fully integrate, simplifying the debugging process. Functions --------- run : [instancemethod] Run the simulation. default_evolution : [staticmethod] The default value of the functional attribute ``evolution``. default_mass_loading : [staticmethod] The default value of the functional attribute ``mass_loading``. Example Code ------------ >>> import vice >>> import numpy as np >>> mw = vice.milkyway(name = "example", zone_width = 1) >>> mw.n_zones 20 >>> mw.n_stars 1 >>> mw.name "example" >>> mw.run(np.linspace(0, 13.2, 1321), overwrite = True) .. [1] Christensen et al. (2012), MNRAS, 425, 3058 .. [2] Johnson et al. (2021), MNRAS, 508, 4484 .. [3] Kroupa (2001), MNRAS, 322, 231 .. [4] Salpeter (1955), ApJ, 121, 161 .. [5] Johnson & Weinberg (2020), MNRAS, 498, 1364 .. toctree:: :titlesonly: :maxdepth: 5 vice.milkyway.annuli vice.milkyway.zone_width vice.milkyway.evolution vice.milkyway.default_evolution vice.milkyway.mode vice.milkyway.elements vice.milkyway.IMF vice.milkyway.mass_loading vice.milkyway.default_mass_loading vice.milkyway.dt vice.milkyway.bins vice.milkyway.delay vice.milkyway.RIa vice.milkyway.smoothing vice.milkyway.tau_ia vice.milkyway.m_upper vice.milkyway.m_lower vice.milkyway.postMS vice.milkyway.Z_solar