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

Properly include Compton processes in k-packet machinery #1053

Open jhmatthews opened 4 months ago

jhmatthews commented 4 months ago

Currently, (see #1050) we don't properly include Compton processes in the k-packet machinery. Specifically, prior to #1050 being merged, 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.

When #1050 is merged, the code will work correctly in the limits that Compton processes approximately balance, or Compton processes are not particularly important.

We DO reweight photons upon Compton scatters. In non-macro atom mode, this should all be being done consistently in asymptotic limits (see #295).

A possible approach is to allow Compton heating to create k-packets (in both ion and spectral cycles) and then include Compton cooling as a sink term in kpkt. The steps needed to do this are:

I can probably code this up (I've done most of it already) but I don't know if I'll have time to test it thoroughly.

An aside, I don't think "reweighting" in an angular sense is done correctly in extract mode for Compton scattering at the moment.

kslong commented 4 months ago

I am surprised by the last comment, given the detailed comparisons we have done with Sedona. Do you have a simple example that suggests this, hopefully a 1-d wind model that I can mimic in Sedona.