sirocco-rt / sirocco

This is the repository for Sirocco, the radiative transfer code used to model winds in AGN and other systems
https://sirocco-rt.readthedocs.io/en/latest/
GNU General Public License v3.0
30 stars 24 forks source link

macro_xs: include more xsections for the simple ions in macro-atom mode + 3 other fixes #1091

Closed jhmatthews closed 3 months ago

jhmatthews commented 3 months ago

This PR makes four changes:

This should not be merged yet, I'd like to test the first change a bit more and also allow the user to access the bottom mode properly.

jhmatthews commented 3 months ago

This can be merged now. This fix produces much better heating and cooling matches with Cloudy in the intermediate U regime: hc_macro_xs.pdf

Compared to the old behaviour here: hc_dev_macro_problems.pdf

Regression tests produce relatively small changes (only in the macro-atom runs), e.g.: agn_macro

Please note this increases runtime in some ionization cycles, which is fairly unavoidable. In agn_macro regression test, the photon transport takes 16 seconds compared to 12 before.

jhmatthews commented 3 months ago

Final note: this includes a mode for not using macro_pops for ionization fractions. I still need to add a way for the user to actually use this.