smutch / meraxes

The Meraxes semi-analytic galaxy formation model.
GNU General Public License v3.0
4 stars 6 forks source link

ISM metal enrichment from supernova #96

Closed s-balu closed 7 months ago

s-balu commented 7 months ago

Hi all,

I think raising an issue is the best practice to ask about the code. If not please do let me know. I was looking into the SN feedback enrichment of the ISM in galaxies and I see that in the following line here we are sometimes moving the new_metals into the HotGas component. Any insights into why this is being done?

https://github.com/meraxes-devs/meraxes/blob/e55a751c9deaf7769e2d64af0c9ac0cc4f9a0b9a/src/physics/supernova_feedback.c#L53

EMventura commented 7 months ago

So this is something not done by me, but the reason for this is that, if there is no cold gas, the metals will be put into the hot gas otherwise we'd have a cold gas reservoir made entirely by metals

s-balu commented 7 months ago

yes, that makes sense. thanks

smutch commented 7 months ago

I think @EMventura is right and that was probably the original thinking behind this choice. My very vague recollection is that it is a numerical stability driven choice too. We add recycled cold gas into the cold gas reservoir immediately before this conditional addition of the metals. If we have less than 1 solar mass of recycled gas, then the produced metals must be tiny. We are bordering on numerical issues when working out the fractional metallicity in that case. Does that make sense?