Skip to content

Discussion: Change chemistry API to enable advection of metallicity (gimzo-mvf, shadowswift)

For moving mesh hydro and any hydro scheme with non-zero mass fluxes between particles, we should probably advect the metals used for the chemistry. This would be similar to what @mivkov is already doing in GEARRT (see here and here).

So following this example, we could add a new function to the chemistry API, e.g. chemistry_update_mass_fluxes(...), which could be called by the relevant hydro schemes at the flux exchange calculations, and apply those fluxes in the kick. This would also require extending the chemistry_part_data struct to store those fluxes.

Current status:

The approach discussed here has been implemented for the EAGLE chemistry scheme, see !1825 (merged) and the GEAR and AGORA shemes (!1853 (merged)). The necessary additions (no-ops) have been made to make the none and QLA chemistry schemes work with all hydro schemes. Any hydro scheme that performs mass fluxes (in master currently only gizmo-mfv) will currently not compile with the GEAR-diffusion chemistry scheme.

To-do/questions:

  • Do we need to advect other quantities tracked by the chemistry schemes as well? (e.g. mass_from_SNIa, metal_mass_fraction_from_SNIa... in EAGLE)
  • Adapt GEAR-diffusion
  • How to treat diffusion (only relevant for the GEAR-diffusion chemistry scheme)?
Edited by Yolan Uyttenhove
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information