#include <EquilibriumDustEmissionCalculator.hpp>
Public Member Functions | |
size_t | allocatedBytes () const |
Array | emissivity (const Array &Jv) const |
double | equilibriumTemperature (int b, const Array &Jv) const |
int | numBins () const |
void | precalculate (SimulationItem *item, const Array &lambdav, const Array &sigmaabsv) |
Private Attributes | |
Array | _Bcmbv |
Array | _emlambdav |
vector< Array > | _emsigmaabsvv |
vector< Array > | _planckabsvv |
Array | _rfdlambdav |
Array | _rflambdav |
vector< Array > | _rfsigmaabsvv |
Array | _Tv |
EquilibriumDustEmissionCalculator is a helper class to calculate the equilibrium temperature \(T_{\text{eq}}\) and the emissivity spectrum \(\varepsilon_{\lambda}\) of representative dust grain populations embedded in a given radiation field \(J_\lambda\).
The class is equipped to handle multiple (in principle independent) representative grains. These are called bins because the calculator is typically used to handle the various grain size bins in a dust mix. Indeed, the equilibrium temperature and the emissivity spectrum are nonlinear functions of the grain properties, and thus a single representative grain cannot usually accurately represent a dust mix.
A client of the class must first call the precalculate() function for each bin (in order of bin index \(b\)) to supply the absorption cross sections for the representative grain population corresponding to that bin. The equilibriumTemperature() function can then be used to obtain the equilibrium temperature for a given bin, and the emissivity() function can be used to obtain the combined emissivity spectrum for the representative grains in all bins. In both cases, the embedding radiation field is specified by the mean intensities \((J_\lambda)_k\), which must be discretized on the simulation's radiation field wavelength grid as returned by the Configuration::radiationFieldWLG() function. The emissivity spectrum \((\varepsilon_\lambda)_\ell\) produced by the second function is discretized on the wavelength grid returned by the Configuration::dustEmissionWLG() function.
The equilibrium temperature \(T_{\text{eq},b}\) for bin with index \(b\) is obtained from the energy balance equation,
\[ \int_0^\infty \varsigma_{\lambda,b}^{\text{abs}}\, J_\lambda\, {\text{d}}\lambda = \int_0^\infty \varsigma_{\lambda,b}^{\text{abs}}\, B_\lambda(T_{\text{eq},b})\, {\text{d}}\lambda \]
where \(B_\lambda(T)\) is the Planck function. The left-hand side is integrated over the radiation field wavelength grid, and the right-hand side is precalculated for a range of temperatures through integration over the wavelength grid and cross sections passed to the precalculate() function. 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 left-hand side of the energy balance equation:
\[ \int_0^\infty \varsigma_{\lambda,b}^{\text{abs}}\, \left[ B_\lambda\left((1+z) T_\mathrm{CMB}^{z=0}\right) + J_\lambda\right] \, {\text{d}}\lambda = \int_0^\infty \varsigma_{\lambda,b}^{\text{abs}}\, B_\lambda(T_{\text{eq},b})\, {\text{d}}\lambda \]
where \(z\) is the redshift at which the simulated model resides and \(T_\mathrm{CMB}^{z=0} = 2.725\,\mathrm{K}\).
The equilibrium emissivity spectrum of all bins combined embedded in a radiation field \(J_\lambda\) can then be written as
\[ \varepsilon_\lambda = \sum_{b=0}^{N_{\text{bins}}-1} \varsigma_{\lambda,b}^{\text{abs}}\, B_\lambda(T_{\text{eq},b}) \]
with \(\varsigma_{\lambda,b}^{\text{abs}}\) the absorption cross section of the \(b\)'th representative grain and \(T_{\text{eq},b}\) the equilibrium temperature of that grain.
size_t EquilibriumDustEmissionCalculator::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 \((\varepsilon_\lambda)_\ell\) of the dust mix (or rather of the corresponding mixture of representative grain populations) when embedded in the radiation field specified by the mean intensities \((J_\lambda)_k\), assuming that the dust grains are in local thermal equilibrium. The input and output arrays are discretized on the wavelength grids returned by the Configuration::radiationFieldWLG() and Configuration::dustEmissionWLG() functions, repectively. If the precalculate() function has not been called for at least one bin, the behavior of this function is undefined.
double EquilibriumDustEmissionCalculator::equilibriumTemperature | ( | int | b, |
const Array & | Jv | ||
) | const |
This function returns the equilibrium temperature \(T_{\text{eq},b}\) of the representative grain corresponding to the bin with specified index \(b\) when embedded in the radiation field specified by the mean intensities \((J_\lambda)_k\), which must be discretized on the simulation's radiation field wavelength grid as returned by the Configuration::radiationFieldWLG() function. If the precalculate() function has not been called for the specified bin, the behavior of this function is undefined.
int EquilibriumDustEmissionCalculator::numBins | ( | ) | const |
This function returns the number of bins (i.e. representative grains) added by the precalculate() function so far.
void EquilibriumDustEmissionCalculator::precalculate | ( | SimulationItem * | item, |
const Array & | lambdav, | ||
const Array & | sigmaabsv | ||
) |
This function precalculates and stores information used to calculate the equilibrium temperature and emissivity spectrum for a particular bin (i.e. representative grain) to be handled by the calculator. It must be called once for each bin; the order of the calls establishes the order of the bin index \(b\).
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 temperature grid for use in the calculator.
The second and third function arguments specify the absorption cross sections \(\varsigma^\text{abs}_i\) for the representative grain corresponding to the current bin on some fine wavelength grid \(\lambda_i\). 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 an appropriate temperature grid through integration over the fine wavelength grid specified as an argument.