Functions | |
| std::pair< Vec, double > | sampleAtomVelocity (double lambda, double center, double vth, double a, double T, double nH, Direction kin, Configuration *config, Random *random) |
| double | section (double lambda, double center, double vth, double A, double a, double g) |
| double | shiftWavelength (double lambda, const Vec &vatom, const Direction &kin, const Direction &kout) |
This namespace offers utility functions for the resonant scattering of photons by a specific atomic or ionic transition, such as the hydrogen Lyman-alpha line or one of the many X-ray resonance lines supported by the XRayIonicGasMix class. The functions are generic in the transition's rest-frame wavelength, Einstein A-coefficient, and statistical weight, which are passed in as arguments rather than hard-coded.
When a photon resonant with a transition is absorbed by an ion in the transition's lower level, the ion is excited to the upper level and a new photon of (nearly) the same rest-frame wavelength is emitted almost immediately as a result of the subsequent downward transition. This happens fast enough that we can consider the combined process as a single scattering event.
Scattering cross section
The cross section for resonant scattering of a photon by a single ion can be derived using quantum mechanical considerations, resulting in a sharply peaked profile as a function of the photon wavelength in the ion's rest frame. Because each ion has its own velocity, a photon with a given wavelength in the gas rest frame will appear Doppler shifted to a slightly different wavelength for each ion in the gas. To compute the cross section for a collection of moving ions, we must therefore convolve the single-ion cross section with the ion velocity distribution, which in turn depends on the gas temperature.
Assuming a Maxwell-Boltzmann velocity distribution, we define the thermal Doppler width \(v_\mathrm{th}\) as
\[ v_\mathrm{th} = \sqrt{\frac{2 k_\mathrm{B} T}{m}} \]
where \(k_\mathrm{B}\) is the Boltzmann constant, \(m\) is the mass of the scattering ion, and \(T\) is the temperature of the gas. We then introduce the dimensionless frequency variable \(x\), defined as
\[ x = \frac{\nu - \nu_0}{\nu_0} \,\frac{c}{v_\mathrm{th}} = \frac{v_\mathrm{p}}{v_\mathrm{th}} \]
where \(\nu=c/\lambda\) is the regular frequency variable, \(\nu_0=c/\lambda_0\) is the frequency at the transition's rest-frame center, \(\lambda_0\) is the corresponding rest-frame wavelength, and \(c\) is the speed of light in vacuum. The last equality introduces the velocity shift \(v_\mathrm{p}\) of the photon frequency relative to the line center, defined by
\[ \frac{v_\mathrm{p}}{c} = \frac{\nu - \nu_0}{\nu_0} \approx -\frac{\lambda - \lambda_0}{\lambda_0} \]
where the approximate equality holds for \(v_\mathrm{p}\ll c\).
After neglecting some higher order terms, the convolution of the single-ion profile with the Maxwell-Boltzmann velocity distribution yields the following expression for the velocity-weighted scattering cross section \(\sigma(x)\) as a function of the dimensionless photon frequency \(x\):
\[ \sigma(x) = \sigma_0\,H(a,x) \]
where the cross section at the line center \(\sigma_0\) is given by
\[ \sigma_0 = \frac{g\,\lambda_0^3\,A}{8\,\pi^{3/2}\, v_\mathrm{th}}, \]
with \(g\) the statistical weight of the upper level and \(A\) the Einstein A-coefficient of the transition; the Voigt parameter \(a\) is given by
\[ a = \frac{\lambda_0\,\Gamma}{4\pi\,v_\mathrm{th}} \]
with \(\Gamma\) the natural line width; and the Voigt function \(H(a,x)\) is defined and evaluated by the VoigtProfile class, which also provides the sampling algorithm used below.
Frequency shift due to atom velocity
In most astrophysical conditions, the energy of the resonant photon before and after scattering is identical in the frame of the interacting ion. This is because the life time of the upper level is very short so that it is not perturbed over this short time interval. Because of the random thermal motion of the ion, energy conservation in the ion's frame translates to a change in the energy of the incoming and outgoing photon that depends on the velocity of the ion and the scattering direction. Given the velocity of the ion \(\bf{v}\), we define the dimensionless ion velocity as \({\bf{u}}={\bf{v}}/v_\mathrm{th}\). Denoting the propagation direction and dimensionless frequency of the photon before (after) scattering with \(\bf{k}_\mathrm{in}\) and \(x_\mathrm{in}\) ( \(\bf{k}_\mathrm{out}\) and \(x_\mathrm{out}\)), the resulting frequency change can be written as
\[x_\mathrm{out} = x_\mathrm{in} - {\bf{u}}\cdot{\bf{k}}_\mathrm{in} + {\bf{u}}\cdot{\bf{k}}_\mathrm{out} \]
This analysis ignores the energy transferred from the photon to the ion through recoil, an approximation that is justified in regular astrophysical conditions.
Assuming a Maxwell-Boltzmann velocity distribution for the ions, the two components of the dimensionless ion velocity \(\bf{u}\) that are orthogonal to the incoming photon direction \(\bf{k}_\mathrm{in}\) have a Gaussian probability distribution with zero mean and a standard deviation of \(1/\sqrt{2}\). The parallel component is more complicated: its probability distribution given \(x_\mathrm{in}\) is proportional to both the Gaussian ion velocity distribution and the single-ion scattering cross section, reflecting the preference for photons to be scattered by ions to which they appear close to resonance; sampling this component is delegated to VoigtProfile::sample().
Unlike a treatment specific to a single, fixed transition, the functions in this namespace do not themselves select between the isotropic and dipole scattering phase functions – since that choice depends on the angular-momentum quantum numbers of the transition being scattered, which vary between the resonance lines supported by a caller such as XRayIonicGasMix, the caller determines the phase function on its own (for example from the transition's total angular momentum) and uses sampleAtomVelocity() below only for the atom velocity itself.
| std::pair< Vec, double > LyUtils::sampleAtomVelocity | ( | double | lambda, |
| double | center, | ||
| double | vth, | ||
| double | a, | ||
| double | T, | ||
| double | nH, | ||
| Direction | kin, | ||
| Configuration * | config, | ||
| Random * | random ) |
This function draws a random ion velocity as seen by an incoming photon resonant with a transition with rest-frame central wavelength center, Doppler width vth, and Voigt parameter a (all as defined in the documentation above), from the appropriate probability distributions, reflecting the preference for photons to be scattered by ions to which they appear close to resonance. The return value is a pair: the first item is the atom velocity, and the second item is the dimensionless photon frequency in the rest frame of the interacting ion (see the documentation above), which a caller can use, for example, to select between the isotropic and dipole phase functions for a transition where that choice depends on the core/wing distinction rather than on angular-momentum quantum numbers. Unlike a treatment specific to a single transition, this function does not itself select between the isotropic and dipole phase functions – that decision, if needed, is left to the caller (see the documentation above).
The lambda argument specifies the photon packet wavelength as it is perceived in the local gas frame. The T and nH arguments specify the gas temperature and the number density of the scattering species in the current spatial cell; together with the globally configured acceleration scheme (exposed as Configuration::lyaAccelerationScheme() and Configuration::lyaAccelerationStrength(), named for its original Lyman-alpha context but applied here regardless of which transition is being sampled), these optionally bias the sampled velocity towards the line wings so as to reduce the number of scattering events needed to escape a very optically thick medium. Note that T and vth both relate to the same physical temperature but are independent arguments because they enter the calculation differently: vth (specific to the scattering ion's mass) sets the width of the dimensionless frequency scale, while T enters the acceleration scheme's own scaling relation directly.
The function proceeds as follows:
| double LyUtils::section | ( | double | lambda, |
| double | center, | ||
| double | vth, | ||
| double | A, | ||
| double | a, | ||
| double | g ) |
This function returns the resonant scattering cross section \(\sigma(\lambda)\) for a single transition, given the photon wavelength lambda in the local gas rest frame, the transition's rest-frame central wavelength center, Einstein A-coefficient A, and upper-level statistical weight g, and the Doppler width vth and Voigt parameter a corresponding to the gas temperature and the mass of the scattering ion, all as defined in the documentation above. The vth argument must be the Doppler width \(\sqrt{2k_\mathrm{B}T/m}\), not the thermal velocity \(\sqrt{k_\mathrm{B}T/m}\), and a must be constructed using that same vth (see the documentation above).
| double LyUtils::shiftWavelength | ( | double | lambda, |
| const Vec & | vatom, | ||
| const Direction & | kin, | ||
| const Direction & | kout ) |
This function returns the Doppler-shifted wavelength in the gas bulk rest frame after a resonant scattering event, given the incoming wavelength in the gas bulk rest frame, the velocity of the interacting ion, and the incoming and outgoing photon packet directions.