Thompson
Thompson Date: 03/06/23
Authors: Alessandro A. Trani, Daria Gangardt
Module that uses the equations from Thompson 2005 to produce a self-gravitating Active Galactic Nuclei disc
Contains ThompsonAGN class, which creates an AGN disc object, documented below.
- class pagn.Thompson.ThompsonAGN(Mbh=1.98847e+38, sigma=None, epsilon=0.001, m=0.2, xi=1.0, X=0.7, Rout=6.172e+18, Mdot_out=2.0163459832179886e+25, Rin=None, opacity='combined', debug=False, xtol=1e-10, rootm='lm')
- L_Edd()
Method to calculate the Eddington luminosity given a mass and hydrogen abundance
- Returns:
L – Eddington luminosity of the Super Massive Black Hole (SMBH) fuelling the AGN in watts.
- Return type:
float
- __init__(Mbh=1.98847e+38, sigma=None, epsilon=0.001, m=0.2, xi=1.0, X=0.7, Rout=6.172e+18, Mdot_out=2.0163459832179886e+25, Rin=None, opacity='combined', debug=False, xtol=1e-10, rootm='lm')
Class that creates an AGN disc object using the equations from Thompson et al. 2005.
- Parameters:
Mbh (float, optional (default: 1e8*ct.MSun)) – Mass of the Super Massive Black Hole (SMBH) fuelling the AGN in kg.
sigma (float, optional (default: None)) – Stellar velocity dispersion. If None, calculated using M-Sigma relation. Input in m/s.
epsilon (float, optional (default: 0.1)) – Star formation radiative efficiency parameter.
m (float, optional (default: 0.2)) – Fraction of local sound speed, conveys angular momentum transport efficiency in AGN.
xi (float, optional (default: 1.)) – Fraction of pressure from supernovae in total radiated pressure.
X (float, optional (default: 0.7)) – Hydrogen abundance of gas in AGN disk.
Rout (float, optional (default: 200*ct.pc)) – Radius at which accretion rate is no longer constant in outer region of AGN disc. If None, set to 1e7 Schwarzchild radii. Input in m.
Mdot_out (float, optional (default: 320*ct.MSun/ct.yr)) – Accretion rate at Rout. If None, scaled to critical accretion rate. Input is in kg/s.
Rin (float, optional (default: None)) – Radius of inner boundary of AGN disc. If None, set as 6 gravitational radii of SMBH. Else, input is in m.
opacity (string/tuple, optional (default: 'combined')) –
Which opacity table to use. Options are “semenov”, which extrapolates values from Semenov et al. 2003 only, “combined”, which combines the Semenov et al. 2003 values with the Badnell et al. 2005 values, or a custom table of values entered as a tuple made up of three arrays:
(opacity 2D array, density 1D array, temperature 1D array). For the custom table, inputs must be in SI units.
debug (bool, optional (default: False)) – Enter debug regime. Code will check root finder operations by printing solutions at every value of r.
xtol (float, optional (default: 1e-10)) – Tolerance in the root finding method.
rootm (string, optional (default: 'lm')) – Root finding method to be used for both star and no star formation regimes.
- no_starformation(x, set=True)
The system of equations to find the [log10(T), log10(rho)] values, assuming no starformation, pulling known quantities from member variables, using self.i as grid index
- Parameters:
x (array) – Array of [log10(T), log10(rho)] guesses.
set (bool, optional (default: True)) – Flag on whether to set member values with current solutions. Set to False when debugging.
- Returns:
sols – 2d array of equilibrium solutions that needs to be zero
- Return type:
array
- plot(params='all')
Simple disk plotting method, can be used to check that disk has been evolved correctly.
- Parameters:
params (str or list of str, optional (default: "all")) – List of parameters to plot, can be any parameter combination from [‘h’, ‘rho’, ‘tau’, ‘T’]
- plot_mdot()
Simple accretion rate plotting method, can be used to check that disk has been evolved correctly and that the accretion rate is high enough to form a luminous AGN disk
- plot_roots_no_star(guess=None, zoomguess=False)
Plots current solution space for root finder in the no star formation regime.
- Parameters:
guess (array, optional (default: None)) – Array of log10(cs), log10(T) guesses to be plotted on solution space.
zoomguess (bool, optional (default: False)) – Flag to zoom in on given guess in plot.
- plot_roots_yes_star(guess=None, zoomguess=False)
Plots current solution space for root finder in the star formation regime.
- Parameters:
guess (array, optional (default: None)) – Array of log10(T), log10(eta) guesses to be plotted on solution space.
zoomguess (bool, optional (default: False)) – Flag to zoom in on given guess in plot.
- solve_disk(N=10000.0)
Method to evolve the AGN disc, from outer boundary inwards, using Thompson et al. 2005 equations.
- Parameters:
N (float, optional (default: 1e4)) – Disc radial resolution.
- yes_starformation(x, set=True)
The system of equations to find the [log10(T), log10(eta)] values, assuming star formation, pulling known quantities from member variables, using self.i as grid index
- Parameters:
x (array) – Array of [log10(T), log10(eta)] guesses.
set (bool, optional (default: True)) – Flag on whether to set member values with current solutions. Set to False when debugging.
- Returns:
sols – 2d array of equilibrium solutions that needs to be zero
- Return type:
array