Zfunc | R Documentation |
These functions can all be passed into SFHfunc
and ProSpectSED
. They should be a good starting point for people interested in constructing their own.
Zfunc_p2(age, Z1 = 0.02, Z2 = Z1, Z1age = 0, Z2age = Zagemax, Zagemax = 13.8, ...)
Zfunc_massmap_lin(age, Zstart = 1e-4, Zfinal = 0.02, Zagemax = 13.8, massfunc, ...)
Zfunc_massmap_box(age, Zstart = 1e-4, Zfinal = 0.02, yield = 0.03, Zagemax = 13.8,
massfunc, ...)
age |
Numeric vector; age in lookback time where 0 means now (yr). |
Z1 |
Numeric scalar; Z at 1st node (Msol/yr) [ |
Z2 |
Numeric scalar; Z at 2nd node (Msol/yr) [ |
Z1age |
Numeric scalar; age at 1st node (Gyr) [ |
Z2age |
Numeric scalar; age at 2nd node (Gyr) [ |
Zagemax |
Numeric scalar; max age allowed, Z is set to 1e-04 beyond this value (Gyr) [all]. |
Zstart |
Numeric scalar; Z at the start of star formation (Msol/yr) [ |
Zfinal |
Numeric scalar; Z at the end of star formation (Msol/yr) [ |
yield |
The yield for the closed box model, where Zfinal = Zstart - (yield x ln(gasfrac_final)). |
massfunc |
Function; mass function to have metallicity mapped back against [ |
... |
All further arguments are passed directly into massfunc, so by this mechanism you can set function specific arguments that control the star formation history etc [ |
Below are the brief functional forms.
Zfunc_p2
produces linearly varying star formation between 2 age nodes:
Z = Z1 + ((Z2-Z1)/(Z2age-Z1age))*(age-Z1age) [also 1e-4 outside of Z1age / Z2age / Zagemax]
Zfunc_massmap_lin
linearly maps the fraction of mass formed for the given SFH against the target start (Zstart) and finish (Zfinal) metallicity. Basically this means if you double you fractional mass you will also roughly double the metallicity you form stars with (assuming you start at close to 0 metallicity, which is the default). In detail Zgas = Zstart + (Zfinal - Zstart) x starfrac (where starfrac is the fraction of final stars formed at a given time, i.e. 1 today and 0 at the Big Bang by construction).
Zfunc_massmap_box
maps the fraction of mass formed to Z using Z = Zstart - (yield x ln(gasfrac)). The lowest value for the gas fraction is derived using Zfinal = Zstart - (yield x ln(gasfrac_final)), i.e. gasfrac_final = exp(-(Zfinal - Zstart)/yield). Then Zfinal = Zstart - (yield x ln((1 - starfrac) x gasfrac_final)) (where starfrac is the fraction of final stars formed at a given time, i.e. 1 today and 0 at the Big Bang by construction). Interestingly, if we use this mapping then we naturally predict a gas fraction for the galaxy today!
In all cases the output is the metallicity (Z = 1 - (X + Y), where X is the mass fraction in H and Y is the mass fraction in He) at a given age in years (where 0.02 is solar).
Aaron Robotham
SFHfunc
, ProSpectSED
, massfunc
curve(Zfunc_p2(age=x, Z1=0.03, Z2=0.01), 0, 13.8e9, xlab='Age/yr', ylab='Z',
ylim=c(0,0.03))
curve(Zfunc_massmap_lin(age=x, Zstart=0.01, Zfinal=0.03, massfunc=massfunc_snorm),
add=TRUE, col='red')
curve(Zfunc_massmap_box(age=x, Zstart=0.01, Zfinal=0.03, massfunc=massfunc_snorm),
add=TRUE, col='blue')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.