Package ComboCode :: Package cc :: Package modeling :: Package physics :: Module EnergyBalance
[hide private]
[frames] | no frames]

Module EnergyBalance

source code

Module for calculating the energy balance.

Author: R. Lombaert, H. Olofsson & M. Maercker (Chalmers, Sweden)

For the use of the EnergyBalance module, please contact one of the three authors listed here.

Classes [hide private]
  EnergyBalance
The energy balance class.
Functions [hide private]
array/float
dTdr(T, r, v, gamma, rates=None, warn=1)
The differential equation for the kinetic temperature profile.
source code
Variables [hide private]
  k_b = 1.3806488e-16
  mh = 1.672621777e-24
  __package__ = 'ComboCode.cc.modeling.physics'
Function Details [hide private]

dTdr(T, r, v, gamma, rates=None, warn=1)

source code 

The differential equation for the kinetic temperature profile.

Currently only takes into account adiabatic expansion.

This function is used by EnergyBalance to iterate and solve the ODE.

Parameters:
  • T (float) - The temperature at which to evaluate the differential equation
  • r (array/float) - The radial point(s) (cm)
  • v (Velocity()) - The velocity profile object
  • gamma (Profiler()) - The adiabatic coefficient profile as function of T
  • rates (Profiler()) - The heating and cooling rates, summed up (erg/s/cm3, H-C). Includes the density factor, without the velocity component. This speeds up iteration, limiting the radial grid evaluation where possible. Default if only adiabatic cooling is taken into account.

    (default: None)

  • warn (bool) - Warn when extrapolation occurs in an interpolation object. Not applicable to functional evaluation, or gamma in which case the extrapolation is deemed safe (constant value at low and high end temperatures consistent with diatomic gases)

    (default: 1)

Returns: array/float
The derivative with respect to radius (K/cm)