Previous topic

hyperion.densities.PowerLawEnvelope

Next topic

hyperion.densities.BipolarCavity

This Page

hyperion.densities.UlrichEnvelope

class hyperion.densities.UlrichEnvelope(mdot=None, rho_0=None, rmin=None, rmax=None, rc=None, ambient_density=0.0, star=None)

This class implements the density structure for a rotationally flattened and infalling envelope, with a density given by:

\rho(r,\theta) = \frac{\dot{M}_{\rm env}}{4\pi\left(G M_{\star} R_{\rm c}^3\right)^{1/2}}\left(\frac{r}{ R_{\rm c}}\right)^{-3/2}\left(1 + \frac{\mu}{\mu_0}\right)^{-1/2}\left(\frac{\mu}{\mu_0} + \frac{2\mu_0^2 R_{\rm c}}{r}\right)^{-1} = \rho_0^{\rm env}\left(\frac{r}{ R_{\rm c}}\right)^{-3/2}\left(1 + \frac{\mu}{\mu_0}\right)^{-1/2}\left(\frac{\mu}{\mu_0} + \frac{2\mu_0^2 R_{\rm c}}{r}\right)^{-1}

where $mu_0$ is given by the equation for the streamline:

\mu_0^3 + \mu_0\left(\frac{r}{ R_{\rm c}} - 1\right) - \mu\left(\frac{r}{ R_{\rm c}}\right) = 0

Once the UlrichEnvelope class has been instantiated, the parameters for the density structure can be set via attributes:

>>> from hyperion.util.constants import msun, au, pc
>>> envelope = UlrichEnvelope()
>>> envelope.rho_0 = 1.e-19
>>> envelope.rmin = 0.1 * au
>>> envelope.rmax = pc

UlrichEnvelope instances can only be used with spherical polar grids at this time.

Attributes

mdot infall rate (g/s)
rho_0 density factor (g/cm^3)
rmin inner radius (cm)
rc inner radius (cm)
rmax outer radius (cm)
cavity BipolarCavity instance
star central star instance (needs a mass attribute)
dust dust properties (filename or dust object)

Methods

density(grid[, ignore_cavity]) Return the density grid
outermost_radius(rho) Find the outermost radius at which the density of the envelope has fallen to rho (in the midplane).
midplane_cumulative_density(r) Find the cumulative column density as a function of radius.
add_bipolar_cavity() Add a bipolar cavity to the envelope.

Methods (detail)

density(grid, ignore_cavity=False)

Return the density grid

Parameters :

grid : SphericalPolarGrid instance.

The spherical polar grid object containing information about the position of the grid cells.

Returns :

rho : np.ndarray

A 3-dimensional array containing the density of the envelope inside each cell. The shape of this array is the same as grid.shape.

outermost_radius(rho)

Find the outermost radius at which the density of the envelope has fallen to rho (in the midplane).

Parameters :

rho : float

The density for which to determine the radius

Returns :

r : float

The radius at which the density has fallen to rho

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 :

r : np.ndarray

Array of values of the radius up to which to tabulate the cumulative density.

Returns :

rho : np.ndarray

Array of values of the cumulative density.

add_bipolar_cavity()

Add a bipolar cavity to the envelope.

Returns :

cavity : BipolarCavity instance

The bipolar cavity instance, which can then be used to set the parameters of the cavity.