vice.single_stellar_population¶
Simulate the nucleosynthesis of a given element from a single star cluster of given mass and metallicity. This does not take into account galactic evolution - whether or not it is depleted from inflows or ejected in winds is not considered. Only the mass of the given element produced by the star cluster is calculated.
Signature: vice.single_stellar_population(element, mstar = 1.0e+06, Z = 0.014, time = 10, dt = 0.01, m_upper = 100, m_lower = 0.08, postMS = 0.1, IMF = “kroupa”, RIa = “plaw”, delay = 0.15)
Parameters¶
- element
str
[case-insensitive] The symbol of the element to simulate the enrichment for.
- mstarreal number [default1.0e+06]
The birth mass of the star cluster in solar masses.
- Zreal number [default0.014]
The metallicity by mass of the stars in the cluster.
- timereal number [default10]
The amount of time in Gyr to run the simulation for
- dtreal number [default0.01]
The size of each timestep in Gyr
- m_upperreal number [default100]
The upper mass limit on star formation in solar masses.
- m_lowerreal number [default0.08]
The lower mass limit on star formation in solar masses.
- postMSreal number [default0.1]
The ratio of a star’s post main sequence lifetime to its main sequence lifetime.
New in version 1.1.0.
- IMF
str
[case-insensitive] [default“kroupa”] The stellar initial mass function (IMF) to assume. Strings denote built-in IMFs.
Recognized built-in IMFs:
- RIa
str
[case-insensitive] or<function>
[default“plaw”] The delay-time distribution for type Ia supernovae to adopt. Strings denote built-in distributions. Functions must accept only one numerical parameter and will be interpreted as a custom, arbitrary delay-time distribution.
Recognized built-in distributions:
“plaw”: \(R_\text{Ia} \sim t^{-1.1}\)
“exp”: \(R_\text{Ia} \sim e^{-t/\text{1.5 Gyr}}\)
Note
Functions do not need to return 0 at times smaller than the SN Ia minimum delay time.
Note
Functions do not need to be normalized. VICE will take care of this automatically.
- delayreal number [default0.15]
The minimum delay time following the formation of a single stellar population before the onset of type Ia supernovae in Gyr.
- agb_modelstring [case-insensitive] [default“cristallo11”]
A keyword denoting which table of nucleosynthetic yields from AGB stars to adopt.
Recognized Keywords:
Returns¶
- masslist
The net mass of the element in solar mass produced by the star cluster at each timestep.
- timeslist
The times in Gyr corresponding to each mass yield.
Raises¶
- ValueError
The element is not built into VICE.
mstar < 0
Z < 0
time < 0 or time > 15 [VICE does not simulate enrichment on timescales significantly longer than the age of the universe]
dt < 0
m_upper < 0
m_lower < 0
m_lower > m_upper
postMS < 0 or > 1
built-in IMF is not recognized
delay < 0
agb_model is not built into VICE
- LookupError
agb_model == “karakas10” and the atomic number of the element is larger than 29. The Karakas (2010), MNRAS, 403, 1413 study did not report yields for elements heavier than nickel.
- ArithmeticError
A functional RIa evaluated to a negative value, inf, or NaN at any given timestep.
- IOError [Only occurs if VICE’s file structure has been modified]
The AGB yield file is not found.
Example Code¶
>>> mass, times = vice.single_stellar_population("sr", Z = 0.008)
>>> mass[-1]
0.04808964406448721
>>> mass, times = vice.single_stellar_population("fe")
>>> mass[-1]
2679.816051685778