agnwinds/python — pull request #129 by jhmatthews (2014-11-24 19:17:47+00:00)
Title: added factors of geo.fill to routines which increment heating estimators

When microclumping was first implemented- and even when I updated the routines- we only included factors of geo.fill in the calculated opacities in the following routines:

* in calculate_ds when we use opacities to work out when a photon scatters, both in continuum and line opacities
* in the tau_sobolev which is passed to the routines which calculate the bb/line heating- in both macro-atom and normal mode

We therefore failed to include factors of geo.fill when incrementing some of our heating estimators for each cell. This request should be discussed before merging. I have added the following factors of geo.fill:

* in kappa_compton, kappa_ind_comp in compton.c. These propagate correctly into the routines which calculate the heating in macro-atom (bf_estimators_increment) and non macro-atom (radiation) mode.
* in kappa_ff and kappa_bf, as above
* removed some factors in radiation() as the factor is now intrinsic to the relevant kappa routine
* in the calculation of bf opacities in calculate_ds and radiation

This may have a significant impact on the clumped models I've run, so take those results with a pinch of salt.

There's an outstanding problem here which is that I believe some volumes are not done consistently, i.e. they use the actual volume of the cell when they should use the filled volume. This is true of both diagnostic quantities like the IP, but also normalisations which we do in macro-atoms. I'm not sure these instances will affect actual resulting calculations but they should be done self-consistently. I'm trying to review any instance where we calculate things based on densities and volumes.