Package ComboCode :: Package cc :: Package modeling :: Package profilers :: Module Density
[hide private]
[frames] | no frames]

Module Density

source code

Module for calculating density structures and molecular abundances as a function of radius.

Author: R. Lombaert

Classes [hide private]
  Density
An interface for the density profile as a function of radius.
  DustToGas
An interface for the dust-to-gas ratio profile as a function of radius.
Functions [hide private]
float
mean_molecular_weight(fH, fHe)
Calculate the mean molecular weight, given the fractional abundances fH = n(H)/n(H2) and fHe = n(He)/n(Htot) with n(Htot) = n(H) + n(H2)
source code
array/float
dens_mdot(r, mdot, v)
Calculate the mass density profile based on mass-loss rate (Msun/yr) and expansion velocity (cm/s).
source code
Variables [hide private]
  __package__ = 'ComboCode.cc.modeling.profilers'
Function Details [hide private]

mean_molecular_weight(fH, fHe)

source code 

Calculate the mean molecular weight, given the fractional abundances fH = n(H)/n(H2) and fHe = n(He)/n(Htot) with n(Htot) = n(H) + n(H2)

Derived from: rho_gas / n(gas) = mu * m_H

Parameters:
  • fH (float/array) - The fractional abundance of atomic hydrogen with respect to molecular hydrogen. fH = n(H)/n(H2). Can be a constant or a radially dependent value.
  • fHe (float/array) - The fractional abundance of helium with respect to total hydrogen number density. fHe = n(He)/(n(H)+2*n(H2)). Can be a constant or a radially dependent value.
Returns: float
The mean molecular weight in units of m_H

dens_mdot(r, mdot, v)

source code 

Calculate the mass density profile based on mass-loss rate (Msun/yr) and expansion velocity (cm/s).

Based on conservation of mass.

Parameters:
  • r (array) - The radial points (cm)
  • mdot (Mdot()/float) - The mass-loss-rate profile or as a single value (constant mass loss) (Msun/yr)
  • v (Velocity()/float) - The velocity profile or as a single value (constant velocity) (cm/s)
Returns: array/float
The density profile (g/cm3)