flaresimulations / synthesizer

Synthesizer - a code for creating synthetic astrophysical observables
https://flaresimulations.github.io/synthesizer/
GNU General Public License v3.0
17 stars 9 forks source link

Should use dust mass as a gas particle property, not DTM #360

Closed christopherlovell closed 1 year ago

christopherlovell commented 1 year ago

Currently, we store dust-to-metals ratio on each gas particle, and use this to calculate the dust mass by combining with the gas particle mass and metallicity (e.g. in the LOS calculation). Some simulations, e.g. Simba, have a live dust model that explicitly follows the dust mass. We should, by default, store the dust mass on each particle; for simulations without this property, this mass should be calculated on load in assuming some dust-to-metals ratio. This will simplify all downstream tasks and imaging.

Thought / comments welcome

stephenmwilkins commented 1 year ago

Agree. Might be elegant to have a method on gas particles that generates it for a given DTM though. We might also want to future proof to allow different types of dust.

christopherlovell commented 1 year ago

Yeah. In future, however, there will be sims with a separate dust fluid, rather than advected with the gas particles, so depends to what degree we want to future proof things without over complicating them for now.

I've started by just doing this calculation in the gas particle class __init__. We should spin this out to a method if required. Even for sims with their own dust we will want the option of swapping in a fixed dtm to see the impact.