This class implements the density structure for a spherically symmetric power-law envelope, with a density given by:

Once the PowerLawEnvelope class has been instantiated, the parameters for the density structure can be set via attributes:
>>> from hyperion.util.constants import msun, au, pc
>>> envelope = PowerLawEnvelope()
>>> envelope.mass = msun
>>> envelope.rmin = 0.1 * au
>>> envelope.rmax = pc
PowerLawEnvelope instances can only be used with spherical polar grids at this time.
Attributes
| mass | total mass (g) |
| rho_0 | density at r_0 (g/cm^3) |
| rmax | outer radius (cm) |
| rmin | inner radius (cm) |
| power | density power-law exponent |
| 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. |
| 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)
Return the density grid
| Parameters : | grid : SphericalPolarGrid instance.
|
|---|---|
| Returns : | rho : np.ndarray
|
Find the outermost radius at which the density of the envelope has fallen to rho.
| Parameters : | rho : float
|
|---|---|
| Returns : | r : float
|
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
|
|---|---|
| Returns : | rho : np.ndarray
|
Add a bipolar cavity to the envelope.
| Returns : | cavity : BipolarCavity instance
|
|---|