hyperion.densities.AlphaDisk#
- class hyperion.densities.AlphaDisk(mass=None, rho_0=None, rmin=None, rmax=None, p=-1, beta=-1.25, h_0=None, r_0=None, cylindrical_inner_rim=True, cylindrical_outer_rim=True, mdot=None, lvisc=None, star=None, dust=None)#
This class implements the density structure for an alpha-accretion disk as implemented in Whitney et al. (2003), with a density given by:
![\rho(R,z,\phi) = \rho_0^{\rm disk}\,\left(1 - \sqrt{\frac{R_{\star}}{R}}\right)\left(\frac{R_0}{R}\right)^{\beta - p}\,\exp{\left[-\frac{1}{2}\left(\frac{z}{h(R)}\right)^2\right]} \\](../_images/math/14e88e8974c350ed590e24b287ce1e2a00dcd0a2.png)
where

The
parameter does not need to be set directly
(although it can be), and is instead automatically calculated when you set
the disk mass. The exact equation relating
to the
disk mass can be found by integrating the equation for
over three dimensions and setting the result equal
to the disk mass.Once the
AlphaDiskclass has been instantiated, the parameters for the density structure can be set via attributes:>>> from hyperion.util.constants import msun, au >>> from hyperion.densities.alpha_disk import AlphaDisk >>> disk = AlphaDisk() >>> disk.mass = 2. * msun >>> disk.rmin = 0.1 * au >>> disk.rmax = 100 * au
The difference between
FlaredDiskandAlphaDiskis that the latter includes an extra term in the density equation (
)
but most importantly that it allows for viscous accretion luminosity,
specified either via an accretion rate, or an accretion luminosity. The
relation between the accretion rate and the accretion luminosity in an
infinitesimal volume is:![\frac{d\dot{E}_{\rm acc}}{dV} = \frac{3 G M_\star \dot{M}_{\rm acc}}{\sqrt{32 \pi^3} R^3 h(R)} \left(1 - \sqrt{\frac{R_{\star}}{R}}\right) \exp{\left[-\frac{1}{2}\left(\frac{z}{h(R)}\right)^2\right]}](../_images/math/9c772414da9b70b3a271f0043a41143bf44ae9bc.png)
This is equation (4) from Whitney et al. (2003). Once integrated over the whole disk, this gives a total luminosity of:
![L_{\rm acc} = \frac{G\,M_\star\,M_{\rm acc}}{2} \left[3\left(\frac{1}{R_{\rm min}} - \frac{1}{R_{\rm max}}\right) - 2\left(\sqrt{\frac{R_\star}{R_{\rm min}^3}} - \sqrt{\frac{R_\star}{R_{\rm max}^3}}\right)\right]](../_images/math/3d433e62d7a275a0e2588dbe233b92752f3e3e16.png)
Attributes
massTotal disk mass (g)
rho_0Scale-factor for the disk density (g/cm^3)
rmininner radius (cm)
rmaxouter radius (cm)
psurface density power-law exponent
betascaleheight power-law exponent
h_0scaleheight of the disk at
r_0(cm)r_0radius at which
h_0is defined (cm)cylindrical_inner_rimWhether the inner edge of the disk should be defined as a truncation in cylindrical or spherical polar coordinates
cylindrical_outer_rimWhether the outer edge of the disk should be defined as a truncation in cylindrical or spherical polar coordinates
mdotaccretion rate (g/s)
lviscviscous accretion luminosity (ergs/s)
starcentral star instance (needs
massandradiusattributes)dustdust properties (filename or dust object)
Methods
density(grid)Return the density grid
Find the cumulative column density as a function of radius.
vertical_cumulative_density(r, theta)Find the cumulative column density as a function of theta.
accretion_luminosity(grid)Return the viscous accretion luminosity grid
Methods (detail)
- density(grid)#
Return the density grid
- Parameters:
- grid
SphericalPolarGridorCylindricalPolarGridinstance. The spherical or cylindrical polar grid object containing information about the position of the grid cells.
- grid
- Returns:
- rhonp.ndarray
A 3-dimensional array containing the density of the disk inside each cell. The shape of this array is the same as
grid.shape.
- midplane_cumulative_density(r)#
Find the cumulative column density as a function of radius.
The cumulative density is measured outwards from the origin, and in the midplane.
- Parameters:
- rnp.ndarray
Array of values of the radius up to which to tabulate the cumulative density.
- Returns:
- rhonp.ndarray
Array of values of the cumulative density.
- vertical_cumulative_density(r, theta)#
Find the cumulative column density as a function of theta.
- Parameters:
- rfloat
The spherical radius at which to calculate the cumulative density.
- thetanp.ndarray
The theta values at which to tabulate the cumulative density.
- Returns:
- rhonp.ndarray
Array of values of the cumulative density.
- accretion_luminosity(grid)#
Return the viscous accretion luminosity grid
- Parameters:
- grid
SphericalPolarGridorCylindricalPolarGridinstance. The spherical or cylindrical polar grid object containing information about the position of the grid cells.
- grid
- Returns:
- lviscnp.ndarray
A 3-dimensional array containing the viscous accretion luminosity of the disk inside each cell. The shape of this array is the same as
grid.shape.