agnwinds / python

This is the repository for Python, the radiative transfer code used to winds in AGN and other syatems
GNU General Public License v3.0
24 stars 25 forks source link

Don't record Compton heating as a contributor to kpkt_abs #1050

Closed jhmatthews closed 4 months ago

jhmatthews commented 4 months ago

This is a (hopefully temporary) fix for the problems we have been having with TDE models where the wind (or k->r) luminosity in spectral cycles is much higher than it should be (or compared to the ion cycles).

The issue is that we include Compton and induced Compton heating as a contributor to kpkt_abs, although we don't actually allow r->k transitions from Compton, or k->r transitions. This means the ionization cycles were sort of doing things "correctly" in that they aren't modelling the flow of energy through the thermal pool from Compton processes (correctly in the case that they are dominant and roughly balance each other, or are both negligible). However, in the spectral cycles we have all this extra energy in kpkt_abs which has to come out somewhere, so it comes out in all the free-free and bound-free processes and so on.

Note, that we do reweight packets when Compton scatters happen, the thing that is missing is the machinery to allow Compton processes to communcate correctly/self-consistently with the k-packet pool.

This current fix simply moves a line of code up so that kpkt_abs is not incremented by Compton heating. This should be considered a "bandaid" solution and in the near future we should improve this.

See also #53 and #295

kslong commented 4 months ago

Please create an issue for this. While this may be OK for the moment, it needs to be high on our priority list to fix.

jhmatthews commented 4 months ago

Yep, on my todo list.

jhmatthews commented 4 months ago

Merging this, but we should sort this out properly as discussed in #1053