Metallicity distribution in a leaky box (source code)

= Metallicity distribution in a leaky box
{title2=$p(Z)=y_e^{-1}e^{-Z/y_e}$}

For initially pristine gas, zero bulk mass return, a constant <stellar yield> $y$ and a well-mixed <galactic outflow> of <mass-loading factor> $\nu$, gas conservation gives $dM_g=-(1+\nu)dM_s$ and metal accounting gives $M_g\,dZ=y\,dM_s$. Consequently $M_g=M_{g,0}e^{-Z/y_e}$ with $y_e=y/(1+\nu)$. Since $dM_s/dZ=M_g/y$, complete depletion gives a normalized mass-weighted <metallicity distribution function> $p(Z)=e^{-Z/y_e}/y_e$ and mean <stellar metallicity> $y_e$. A time-independent <initial mass function> makes the distribution of surviving tracers proportional to this distribution; a sample selected by light need not have the same weights.