#include <StochasticDustEmissionCalculator.hpp>
Public Member Functions | |
~StochasticDustEmissionCalculator () | |
size_t | allocatedBytes () const |
Array | emissivity (const Array &Jv) const |
void | precalculate (SimulationItem *item, const Array &lambdav, const Array &sigmaabsv, string grainType, double bulkDensity, double meanMass, const StoredTable< 1 > &enthalpy) |
Private Attributes | |
Array | _Bcmbv |
vector< const SDE_Calculator * > | _calculatorsA |
vector< const SDE_Calculator * > | _calculatorsB |
vector< const SDE_Calculator * > | _calculatorsC |
Array | _emlambdav |
vector< string > | _grainTypes |
const SDE_TemperatureGrid * | _gridA |
const SDE_TemperatureGrid * | _gridB |
const SDE_TemperatureGrid * | _gridC |
vector< double > | _maxEnthalpyTemps |
vector< double > | _meanMasses |
Array | _rfdlambdav |
Array | _rflambdav |
StochasticDustEmissionCalculator is a helper class to calculate the combined emissivity spectrum
The class handles multiple representative grains that together describe a dust mixture. These are called bins because the calculator is typically used to handle the various grain size bins in a dust mix. The calculator assumes that, for each material type, the size distribution is discretized into a sufficient number of size bins. The calculator also requires access to enthalpy data for the various dust grain materials in the dust mix.
A client of the class must first call the precalculate() function for each bin to supply the absorption cross sections and enthalpy data for the representative grain population corresponding to that bin. The emissivity() function can then be used to obtain the combined emissivity spectrum for the representative grains in all bins. The embedding radiation field is specified by the mean intensities
Using the discretization of the dust composition and size distribution into a range of representative grains (size bins) and the output wavelength grid described above, in addition to a specialized temperature grid constructed by this class, the emissivity in an interstellar radiation field
with
The probabilities
We define a transition matrix
where
If the simulation's configuration requests the inclusion of the cosmic microwave background (CMB) as an additional source for dust heating, the corresponding term is added to the heating matrix element, similar to the treatment of the energy balance equation in the EquilibriumDustEmissionCalculator class. We assume that cooling transitions occur only to the next lower level, so that
The diagonal matrix elements are defined as
however as we will see below there is no need to explicitly calculate these values.
Assuming a steady state situation, the probabilities
along with the normalization condition
where
StochasticDustEmissionCalculator::~StochasticDustEmissionCalculator | ( | ) |
The destructor destructs the data structures allocated by the precalculate() function.
size_t StochasticDustEmissionCalculator::allocatedBytes | ( | ) | const |
This function returns the size of the memory, in bytes, allocated by the precalculate() function so far. This information can be used for logging purposes.
This function returns the emissivity spectrum per hydrogen atom
void StochasticDustEmissionCalculator::precalculate | ( | SimulationItem * | item, |
const Array & | lambdav, | ||
const Array & | sigmaabsv, | ||
string | grainType, | ||
double | bulkDensity, | ||
double | meanMass, | ||
const StoredTable< 1 > & | enthalpy | ||
) |
This function precalculates and stores information used to calculate the emissivity spectrum for a particular bin (i.e. representative grain) to be handled by the calculator. It must be called once for each bin.
When it is first called, the function uses its first argument to obtain the simulation's radiation field and dust emission wavelength grids, and it builds a set of temperature grids for use in the calculator: a coarse grid for quickly determining the appropriate temperature range, and medium and fine grids for performing the actual probability calculations.
The second and third function arguments specify the absorption cross sections
The function stores the absorption cross sections interpolated on the radiation field and dust emission wavelength grids and it precalculates Planck-integrated absorption cross sections on each of the constructed temperature grids through integration over the fine wavelength grid specified as an argument. Furthermore, the function precalculates the heating and cooling rates used for the stochastic probability calculations, barring the input radiation field dependency, again on each of the constructed temperature grids.