sirocco-rt / sirocco

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

Boundary Layer and Power laws #307

Open kslong opened 7 years ago

kslong commented 7 years ago

it is possible to created a power law model for a BL, but the code (which I wrote) is very much a kluge. @Higginbottom, you can ding me on this. Basically to get a power law model for a BL one essentially changes the object into an AGN (at the end of get_radiation_sources.) This should be fixed.

Note that get_agn_and_bl parameters is also a kluge, and quite complicated. These problems are related to getting a better organized and more general set of inputs parameters as discussed in #222

jhmatthews commented 7 years ago

This had also occurred to me. I have thought about it a little and I think my preferred way forward would be that for any object, one would ask for disk and wind radiation, and then a number of central radiation sources. This would, in my opinion, allow greater flexibility

Disk_radiation(y=1)                                1
Wind_radiation(y=1)                               1
N_Central_rad_sources                           2
CenSrc1.geo                                         sphere
CenSrc1.sed                                         models
[geometry and sed dependent parameters]
CenSrc2.geo                                         lamp_post
CenSrc2.sed                                         powerlaw
[geometry and sed dependent parameters]

I know this is a bit of a stretch from the original issue, but I do think it would be a neater way of doing things and will affect the way forward. I understand that we might not want to change things this drastically, and that I am at the risk of sounding like a stuck record!

kslong commented 7 years ago

The underlying reason for the kluge has to do with routines in photon_gen, or rather agn.c where photons are generated for the agn model. One desires to call this routine, which mostly is not specific to an agn (but has a few specifics for AGN) having to do mainly with the lamp post model.

For what it is worth @jhmatthews my current version of the AGN file looks starts more like this

System_type(0=star,1=binary,2=agn,3=previous)   2
Disk_radiation(y=1)                        1
Wind_radiation(y=1)                        1
QSO_BH_radiation(y=1)                      1
Rad_type_for_disk(0=bb,1=models)_to_make_wind   0
Rad_type_for_agn(0=bb,1=models,3=power_law,4=cloudy_table,5=bremsstrahlung)_to_make_wind   3

### Parameters for the Central Object
mstar(msol)                                1e9
rstar(cm)                                  8.85667e+14

### Parameters for the Disk (if there is one)
disk.type(0=no.disk,1=standard.flat.disk,2=vertically.extended.disk)   1
disk.mdot(msol/yr)                         5
Disk.temperature.profile(0=standard;1=readin,2=analytic)   0
disk.radmax(cm)                            1e17
lum_agn(ergs/s)                            1e43
agn_power_law_index                        -0.9
geometry_for_pl_source(0=sphere,1=lamp_post)   0
jhmatthews commented 7 years ago

Sorry - to be clear, the above is a suggested pseudo-structure.

kslong commented 7 years ago

Yes, I understood

kslong commented 7 years ago

I want it to look more like this:

System_type(0=star,1=binary,2=agn,3=previous)   2

### Parameters for the Central Object
mstar(msol)                                1e9
rstar(cm)                                  8.85667e+14
QSO_BH_radiation(y=1)                      1
Rad_type_for_agn(0=bb,1=models,3=power_law,4=cloudy_table,5=bremsstrahlung)_to_make_wind   3
lum_agn(ergs/s)                            1e43
agn_power_law_index                        -0.9
geometry_for_pl_source(0=sphere,1=lamp_post)   0

### Parameters for the Disk (if there is one)
disk.type(0=no.disk,1=standard.flat.disk,2=vertically.extended.disk)   1
Disk_radiation(y=1)                        1
Rad_type_for_disk(0=bb,1=models)_to_make_wind   0
disk.mdot(msol/yr)                         5
Disk.temperature.profile(0=standard;1=readin,2=analytic)   0
disk.radmax(cm)                            1e17

Wind_radiation(y=1)                        1

but this is a better discussion for #222

kslong commented 7 years ago

The current situation here is that you can invoke the power law option for the boundary layer, and what is done is in this case to is to switch off the boundary layer and turn on the agn, the assumption being one does not want to have both. Probably, what should be done is to add variables that keep the boundary layer and the AGN separate, not so much because we would want to have both, but to make the coding more transparent. Also, currently code where the agn spectrum is setup is also the same code that sets up a lamp post model.