#include <XRayIonicGasMix.hpp>

Classes | |
| struct | FluorescenceParam |
| struct | IonParam |
| struct | ResonantParam |
Public Types | |
| enum class | ElectronScattering : int { None , Free , FreeWithPolarization , FreeBound } |
| Public Types inherited from MaterialMix | |
| enum class | DynamicStateType { None , Primary , Secondary , PrimaryIfMergedIterations } |
| enum class | MaterialType { Dust , Electrons , Gas } |
Public Member Functions | |
| XRayIonicGasMix (SimulationItem *parent, string ions, vector< double > abundances, double temperature, ElectronScattering electronScattering, bool resonantScattering, bool setup) | |
| ~XRayIonicGasMix () | |
| const vector< double > & | abundances () const |
| ElectronScattering | electronScattering () const |
| bool | hasPolarizedScattering () const override |
| bool | hasResonantScattering () const override |
| bool | hasScatteringDispersion () const override |
| double | indicativeTemperature (const MaterialState *state, const Array &Jv) const override |
| string | ions () const |
| double | mass () const override |
| MaterialType | materialType () const override |
| double | opacityAbs (double lambda, const MaterialState *state, const PhotonPacket *pp) const override |
| double | opacityExt (double lambda, const MaterialState *state, const PhotonPacket *pp) const override |
| double | opacitySca (double lambda, const MaterialState *state, const PhotonPacket *pp) const override |
| bool | peeloffScattering (double &I, double &Q, double &U, double &V, double &lambda, Direction bfkobs, Direction bfky, const MaterialState *state, const PhotonPacket *pp) const override |
| void | performScattering (double lambda, const MaterialState *state, PhotonPacket *pp) const override |
| bool | resonantScattering () const |
| bool | scatteringEmulatesSecondaryEmission () const override |
| double | sectionAbs (double lambda) const override |
| double | sectionExt (double lambda) const override |
| double | sectionSca (double lambda) const override |
| void | setupSelfBefore () override |
| vector< StateVariable > | specificStateVariableInfo () const override |
| double | temperature () const |
| Public Member Functions inherited from MaterialMix | |
| virtual double | asymmpar (double lambda) const |
| virtual Array | emissionSpectrum (const MaterialState *state, const Array &Jv) const |
| virtual DisjointWavelengthGrid * | emissionWavelengthGrid () const |
| virtual Array | emissivity (const Array &Jv) const |
| virtual bool | hasContinuumEmission () const |
| virtual DynamicStateType | hasDynamicMediumState () const |
| virtual bool | hasExtraSpecificState () const |
| virtual bool | hasLineEmission () const |
| virtual bool | hasNegativeExtinction () const |
| virtual bool | hasPolarizedAbsorption () const |
| virtual bool | hasPolarizedEmission () const |
| virtual bool | hasStochasticDustEmission () const |
| virtual void | initializeSpecificState (MaterialState *state, double metallicity, double temperature, const Array ¶ms) const |
| bool | isDust () const |
| bool | isElectrons () const |
| bool | isGas () const |
| virtual bool | isSpecificStateConverged (int numCells, int numUpdated, int numNotConverged, MaterialState *currentAggregate, MaterialState *previousAggregate) const |
| virtual Array | lineEmissionCenters () const |
| virtual Array | lineEmissionMasses () const |
| virtual Array | lineEmissionSpectrum (const MaterialState *state, const Array &Jv) const |
| virtual vector< SnapshotParameter > | parameterInfo () const |
| virtual const Array & | sectionsAbs (double lambda) const |
| virtual const Array & | sectionsAbspol (double lambda) const |
| virtual const Array & | thetaGrid () const |
| virtual UpdateStatus | updateSpecificState (MaterialState *state, const Array &Jv) const |
| Public Member Functions inherited from SimulationItem | |
| template<class T> | |
| T * | find (bool setup=true) const |
| template<class T> | |
| T * | interface (int upLevels, int downLevels, bool setup) const |
| virtual string | itemName () const |
| void | setup () |
| string | typeAndName () const |
| Public Member Functions inherited from Item | |
| Item (const Item &)=delete | |
| virtual | ~Item () |
| void | addChild (Item *child) |
| const vector< Item * > & | children () const |
| virtual void | clearItemListProperty (const PropertyDef *property) |
| void | destroyChild (Item *child) |
| virtual bool | getBoolProperty (const PropertyDef *property) const |
| virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
| virtual double | getDoubleProperty (const PropertyDef *property) const |
| virtual string | getEnumProperty (const PropertyDef *property) const |
| virtual int | getIntProperty (const PropertyDef *property) const |
| virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
| virtual Item * | getItemProperty (const PropertyDef *property) const |
| virtual string | getStringProperty (const PropertyDef *property) const |
| int | getUtilityProperty (string name) const |
| virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
| Item & | operator= (const Item &)=delete |
| Item * | parent () const |
| virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
| virtual void | setBoolProperty (const PropertyDef *property, bool value) |
| virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
| virtual void | setDoubleProperty (const PropertyDef *property, double value) |
| virtual void | setEnumProperty (const PropertyDef *property, string value) |
| virtual void | setIntProperty (const PropertyDef *property, int value) |
| virtual void | setItemProperty (const PropertyDef *property, Item *item) |
| virtual void | setStringProperty (const PropertyDef *property, string value) |
| void | setUtilityProperty (string name, int value) |
| virtual string | type () const |
Protected Member Functions | |
| XRayIonicGasMix () | |
| Protected Member Functions inherited from MaterialMix | |
| MaterialMix () | |
| Configuration * | config () const |
| Random * | random () const |
| Protected Member Functions inherited from SimulationItem | |
| SimulationItem () | |
| virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
| virtual void | setupSelfAfter () |
| Protected Member Functions inherited from Item | |
| Item () | |
Private Types | |
| using | BaseType |
| using | ItemType |
Private Member Functions | |
| int | indexForLambda (double lambda) const |
| void | setScatteringInfoIfNeeded (PhotonPacket *pp, const MaterialState *state, const double lambda) const |
| double | vtherm (int Z) const |
Private Attributes | |
| vector< double > | _abundances |
| ElectronScatteringHelper::Helper * | _com |
| ArrayTable< 2 > | _cumsigmascavv |
| DipolePhaseFunction * | _dpf |
| ElectronScattering | _electronScattering |
| vector< FluorescenceParam > | _fluorescenceParamv |
| vector< IonParam > | _ionParamv |
| string | _ions |
| Array | _lambdav |
| int | _numElec |
| int | _numFluo |
| int | _numIons |
| int | _numLine |
| vector< ResonantParam > | _resonantParamv |
| bool | _resonantScattering |
| Array | _sigmaextv |
| Array | _sigmascav |
| double | _temperature |
| vector< double > | _vthermv |
Friends | |
| class | ItemRegistry |
The XRayIonicGasMix class describes the material properties of a partially ionized gas in the X-ray wavelength range, taking into account the effects of photo-absorption, fluorescence, recombination, electron scattering, and resonant scattering. It supports the line production and transfer for the Lyman-series of hydrogen-like ions and the K-series of helium-like ions. It is largely an extension of the XRayAtomicGasMix class, supporting all ions instead of just the neutral atoms. To avoid the use of this material mix outside of the regime for which it has been designed, all cross sections are forced to zero below 4.3 eV and above 500 keV (corresponding approximately to a wavelength range from 2.5 pm to 290 nm).
The class assumes a gas containing a mixture of (ionized) elements with atomic numbers ranging from 1 (hydrogen) to 30 (zinc). Including fully ionized ions, this results in a total of 495 possible ions. Not all ions have to be used, the user can specify what ions are included with the ions property. The abundances of the ions are specified in the ski file as a constant through the abundances property. If an abundance is set to zero, the corresponding ion is not used in the mix. The spatial density distribution of the gas is determined by the product of the number density and the abundances of the ions in use. The temperature of the gas can also be configured by the user as a constant property. In other words, the abundances and the temperature are considered to be spatially constant (for a given medium component), while the overall density can obviously vary across space as usual.
Photo-absorption and fluorescence
Photo-absorption by an ion is the process where the energy of a photon is used to liberate a bound electron from one of the electron shells of the atom. This class supports photo-absorption by any of the 495 ions in the gas for any of the electron shells, i.e. up to the K, L, M, or N shell depending on the ion.
Fluorescence (in this context) is the process where an electron from a higher energy level "falls" into an empty space created by photo-absorption, emitting a new photon with a different energy. For each electron shell and for each possible fluorescence transition towards that shell, the yield defines the probability that such fluorescence event occurs after an electron has been liberated in that shell. This class supports the following fluorescence lines, all with energies above \(4.3 \, \text{eV}\): K \(_{\alpha_2}\), K \(_{\alpha_1}\), K \(_{\beta_3}\), K \(_{\beta_1}\), L \(_{\beta_4}\), L \(_{\beta_3}\), L \(_{1,2}\), L \(_{1,3}\), L \(_{\eta}\), L \(_{l}\), L \(_{\gamma_5}\), L \(_{\beta_6}\), L \(_{\beta_1}\), L \(_{\alpha_2}\), L \(_{\alpha_1}\), M \(_{1,2}\), M \(_{1,3}\), M \(_{2,4}\), M \(_{3,4}\), M \(_{3,5}\) M \(_{2}\)N \(_{1}\), M \(_{3}\)N \(_{1}\) These transitions are not all the same as those in the XRayAtomicGasMix class, and even transitions that are the same may yield slightly different results, as the resources are obtained from different sources.
Similar to the XRayAtomicGasMix, certain elements have intrinsic line shape data associated with them. For this class, this is limited to the K \(_{\alpha_1}\) and K \(_{\alpha_2}\) lines for the Fe ions.
Because fluorescence only occurs as the result of a photo-absorption event, this class implements fluorescence as a form of scattering (where the wavelength of the photon being scattered changes) as opposed to emission. This allows both photo-absorption and fluorescence to be treated during primary emission. A possible drawback is that the weaker fluorescence lines will be represented by a fairly small number of photon packets.
Recombination
For hydrogen-like and helium-like ions, photo-absorption cannot be followed by fluorescence since the ion will have no excited electrons left. Instead it can be followed by a radiative recombination event either to the ground state or to an excited level, which will then cascade down to the ground state. This class assumes instantaneous recombination and only implements the Lyman-series and He-like K-series photons produced from cascades from the level \(i\) to the ground state. This will thus only result in line emission and no continuum emission. This allows for this process to be modelled the same way as fluorescence.
Scattering by bound electrons
Electrons bound to the atoms or free in the gas scatter incoming X-ray photons. This process can be elastic (Rayleigh scattering) or inelastic (Compton scattering). This class, however, always treats this process as inelastic (Compton) scattering, completely ignoring elastic (Rayleigh) scattering. The user can select one of four implementations for electron scattering, these are:
When using the Free or FreeWithPolarization implementations, all electrons are treated the same regardless of ionization state, so that a material mix with Fe+0 has the same electron scattering cross section as a material mix with Fe+26. For FreeBound, on the other hand, the scattering cross section for a given ion depends on the number of free and bound electrons.
Resonant scattering
Resonant scattering is the process where a photon is absorbed and re-emitted by a bound electron in an ion, promoting it from the ground state ( \(n=1\)) to an excited level ( \(n \leq 10\)) and back again. This class implements these transitions for all hydrogen-like ions and helium-like ions up to atomic number 30. For hydrogen-like ions, the 18 prominent electric-dipole transition lines fine-structure levels are included for each ion (e.g., Ly \(\alpha_1\), Ly \(\alpha_2\), Ly \(\beta_1\), Ly \(\beta_2\), \(\ldots\), Ly \(\theta_1\), Ly \(\theta_2\), Ly \(\iota_1\), Ly \(\iota_2\)). The magnetic-dipole transition lines between the metastable level (2s \(^2S_{1/2}\)) and the ground level for \(Z\geq14\), where these lines are non-negligible, are also included. For helium-like ions, the He \(\alpha\) \(w\), \(x\), \(y\) and \(z\) lines and several prominent higher K-series lines (e.g., He \(\beta\), He \(\gamma\), \(\ldots\), etc.) are included.
These transitions may occur either as a direct transition from and to the ground state or via a radiative cascade. Direct transitions correspond to coherent scattering events, while cascades are incoherent and erase information about the initial photon packet. When a cascade occurs, we ignore all intermediate photons produced by radiative decays between excited states, keeping only the final transition to the ground state. This means we can also model the cascade as a single scattering event. The branching data, determining the probability of an (in)coherent transition, is obtained from the SPEX database Kaastra et al. (2024).
Configuring the simulation
In addition to a medium component configured with the material mix represented by this class, simulations will usually include primary sources and possibly a dust medium. There is, however, no need to include secondary emission, so the simulation mode can be set to "ExtinctionOnly" and there is no need to store the radiation field. Only if the user option resonantScattering is enabled does the simulation mode need to be set to "LyaExtinctionOnly". The resulting continuum spectrum and absorption and emission features can be recorded by a single instrument configured with a high-resolution wavelength grid, or separate instruments can be configured with wavelength grids to resolve specific features of interest.
Although there is no secondary emission phase, fluorescence emission and Lyman recombination, which are modelled as scattering, do contribute to the secondary emission spectrum. To study these processes separately from the background continuum, configure the instrument to record flux components separately and consider the secondary emission component, which includes these lines in addition to any flux scattered from them. To ensure that low-intensity lines are properly included in this flux, set the advanced property minWeightReduction in the PhotonPacketOptions section to a value of 1e10 or so. With the default value of 1e4, low-intensity line photon packets are killed before having a chance to register in the instruments.
The input model must define the spatial distribution of the number density. The user can then define the abundances of the ions in the gas in this material mix. The spatial density is simply the product of the number density and the abundances of the ions in use.
If this material mix is associated with a subclass of ImportedMedium, the spatial density distribution is read from an input file. In that case, the ski file attributes importMetallicity, importTemperature, and importVariableMixParams must be left at 'false'. For example, if bulk velocities are also imported for this medium component (i.e. importVelocity is 'true'), the column order would be
\[ ..., n, v_\mathrm{x}, v_\mathrm{y}, v_\mathrm{z} \]
When a separate XRayIonicGasMix is required for each spatial cell, refer to the XRayIonicGasMixFamily class.
The relative abundances of the present ions and the temperature of the gas are configured in the ski file as constant properties. In other words, the abundances and the temperature are considered to be spatially constant (for a given medium component). Because of this all the cross sections per hydrogen atom for this material mix are calculated during setup and the result stored, discretized on a high-resolution wavelength grid for later retrieval.
Photo-absorption cross section
The total photo-absorption cross section per hydrogen atom for this material mix is obtained by accumulating the photo-absorption cross sections for all shells and for all individual elements, weighted by element abundance, and convolved with a Gaussian profile reflecting each element's thermal velocity.
Verner and Yakovlev (1995, 1996) provide analytic fits to the photo-absorption cross sections \(\sigma_{ph}(E)\) as a function of photon energy \(E\) for all the ions up to Z=30:
\[\begin{aligned} \sigma_{ph}(E) &= \begin{cases} 0 & E < E_\mathrm{th} \\ \sigma_0 \, F(y) & E_\mathrm{th} \le E < E_\mathrm{max}\\ 0 & E_\mathrm{max} \le E \end{cases}, \\ y &= \frac{E}{E_0}\\ F(y) &= \left[(y-1)^2+y_{\rm w}^2 \right]y^{-Q} \left(1+ \sqrt{(y/y_{\rm a})} \right )^{-P}, \\ Q&=5.5+l-0.5P, \end{aligned} \]
with \(E_\mathrm{th}\) the tabulated ionization threshold energy, \(E_\mathrm{max}\) the constant maximum energy (500 keV) for the formula to be valid, \(\sigma_0\), \(E_0\), \(y_{\rm w}\), \(y_{\rm a}\) and \(P\) five tabulated fitting parameters, and \(l\) the subshell orbital quantum number ( \(l=0, 1, 2, 3\) for s, p, d, f orbitals respectively).
Fluorescence cross section
The total fluorescence cross section per hydrogen atom for this material mix is obtained similarly, but now including only the K, L and M shell photo-absorption cross sections for each ion, multiplied by the appropriate fluorescence yields in addition to the element abundance. These yields are obtained from Kaastra & Mewe (1993) for all ions up to Z=30, from neutral down to B-like.
As mentioned earlier, the Fe ions have intrinsic line shape data for the K \(_{\alpha_1}\) and K \(_{\alpha_2}\) lines. The line shape data was obtained from Pinheiro et al. (2023). Consequently, the energies and fluorescence yields for these lines are also taken from this source. Additional line shapes were available for the Fe ions, but the corresponding yields differed significantly from those used for the other lines in Kaastra & Mewe (1993) and were therefore not included.
Recombination cross section
The total recombination cross section per hydrogen-like or helium-like ion for this material mix is obtained the exact same way as for fluorescence. The yields are now temperature-dependent however, but since the temperature is assumed to be constant this is simply read during the setup. The temperature-dependent yields are obtained from Mao & Kaastra (2016).
Electron scattering - cross section and phase function
As described above, this class provides several implementations for the scattering of X-ray photons by the electrons bound to the atoms or free in the gas. These implementations involve two types of scattering: free- and bound-electron Compton scattering. Note that, in all cases, the listed cross sections must be multiplied by the abundance of the corresponding ion.
For free-electron Compton scattering, the cross section for an ion with atomic number \(Z\) given by \(Z\,\sigma_\mathrm{C}\), where \(\sigma_\mathrm{C}\) is the (wavelength-dependent) Compton cross section for a single free electron. The implementation of the scattering events is delegated to the ComptonPhaseFunction class; see there for more information on the cross section and phase function for free-electron Compton scattering.
For bound-electron Compton scattering, the cross sections \(\sigma_{CS, Z}(E)\) are available in tabulated form as a function of the incoming photon energy \(E\). The normalised scattering phase function for element \(Z\) is given by
\[ \Phi_{CS, Z}(\theta, E)= \frac{3}{4}\, \frac{\sigma_T} {\sigma_{CS, Z}(E)}\Big[C^3(\theta, E) + C(\theta,E) -C^2(\theta, E)\sin^2\theta\Big] \cdot S_Z(q), \]
where the incoherent scattering functions \(S_Z(q)\) are tabulated as a function of the dimensionless momentum transfer parameter \(q\),
\[q = \frac{E}{12.4\,\mathrm{keV}}\sin(\theta/2),\]
with \(\theta\) the scattering angle, and the Compton factor defined as
\[ C(\theta, E) = {\Big[{1+\frac{E}{m_ec^2}(1-\cos \theta)\Big]}}^{-1}. \]
The Free and FreeWithPolarization implementations use the free-electron Compton scattering cross section for all electrons (bound or free). Whilst the FreeBound implementation uses a weighted sum of the free- and bound-electron Compton scattering cross sections for each ion, based on the charge state of that ion. The cross section can be summarized as follows:
\[ \sigma_{FB, Z, N}(E) = (1-\frac{N}{Z}) \sigma_{F, Z}(E) + \frac{N}{Z} \sigma_{B, Z}(E) \]
where \(Z\) and \(N\) are the atomic number and number of bound electrons and the subscripts \(FB\), \(F\) and \(B\) refer to the FreeBound, free- and bound-electron Compton scattering.
Electron scattering - photon energy shift
Compton scattering is inelastic, meaning that the photon transfers a fraction of its energy to the electron involved in the interaction. The energy shift can again be described by free- or bound-electron Compton scattering.
For free-electron Compton scattering, the energy shift \(E'/E\) is given by the Compton factor \(C(\theta, E)\) defined above. The implementation is delegated to the ComptonPhaseFunction class.
For bound-electron Compton scattering, the energy shift is mostly determined by the momentum distribution of the target electrons, which are bound to the atomic nucleus. As a result, the final photon energy is no longer uniquely defined by the incoming photon energy and the scattering angle, but also depends on the initial momentum of the target electron:
\[ E' = {\Big({1+\frac{E}{m_ec^2} \, \left(1-\cos \theta\right) - \frac{p_\text{z} c}{m_ec^2}2\sin \frac{\theta}{2}}\Big)}^{-1} \; E, \]
with \(p_\text{z}\) the momentum of the target electron before scattering projected on the scattering vector \(\bf{k}_\text{out}-\bf{k}_\text{in}\).
The momentum distribution of bound electrons in atom \(Z\) is characterised by the corresponding Compton profile \(J_Z(p_\text{z}c)\), which can be interpreted as a probability density function for the projected electron momentum \(p_\text{z}c\). Compton profiles for all atoms in the photo-absorbing gas are tabulated by Biggs+75.
In addition, the energy transfer from the photon to the electron should be large enough to liberate an electron, i.e. larger than the ionization potential \(I_b\) of the outer electrons of element Z. This condition is fulfilled only when \(p_\text{z}c < p_zc_{max}\), with
\[p_zc_{max} = \frac{-m_ec^2I_b+E\cdot(E-I_b)\cdot(1-\cos\theta)}{2\cdot(E-I_b)\cdot \sin(\theta/2)}.\]
This equation is undefined for \(\theta=0\), but this scattering angle will never occur as the scattering phase function is zero for \(\theta=0\). Following Namito+94, the probability density function for \(p_\text{z}c\) should be truncated at \(p_zc_{max}\).
The Free and FreeWithPolarization implementations apply free-electron Compton scattering for all electrons (bound or free). Whilst the FreeBound implementation stochastically selects free- or bound-electron Compton scattering for each photon weighted using the cross section of free- and bound-electron Compton scattering.
Resonant scattering - cross section and phase function
The resonant transitions are broadened both thermally and intrinsically. The resulting cross section is described by a Voigt profile, the implementation of this is delegated to the LyUtils and VoigtProfile namespaces. The data for the line energies and Einstein A coefficients are obtained from the SPEX database Kaastra et al. (2024).
\[\begin{aligned} \sigma(\lambda) &= \sigma_0\, V(a,x), \\ \sigma_0 &= \frac{g\,\lambda_0^3\,A}{8\sqrt{2}\,\pi^{3/2}\,v_\mathrm{th}}, \\ x &= \frac{c}{\sqrt{2}\,v_\mathrm{th}}\,\frac{\lambda_0-\lambda}{\lambda}, \\ a &= \frac{\lambda_0\,\Gamma}{4\sqrt{2}\,\pi\,v_\mathrm{th}}, \end{aligned} \]
with \(V(a,x)\) the Voigt profile, \(\lambda_0\) the rest-frame transition wavelength, \(A\) the Einstein A coefficient, \(g=2J_\mathrm{upper}+1\) the statistical weight of the upper level, \(v_\mathrm{th}\) the thermal velocity, and \(\Gamma\) the natural line width.
Resonant scattering in an electric-dipole transition is described as a linear combination of an isotropic and a dipole M"{u}ller matrix. The relative weights of these two components are determined by the total angular momentum of the lower level, \(J\), and by \(\Delta J = J_\mathrm{upper}-J_\mathrm{lower}\). With the notation used here, \(E_1\) is the weight of the isotropic component and \(E_2\) is the weight of the dipole component.
Weights of the isotropic ( \(E_1\)) and dipole ( \(E_2\)) components in the M"{u}ller matrix for resonant scattering.
| \(\Delta J\) | \(E_1\) | \(E_2\) |
|---|---|---|
| \(1\) | \(\displaystyle \frac{1}{10} \frac{3J(6J+7)}{(J+1)(2J+1)}\) | \(\displaystyle \frac{1}{10} \frac{(2J+5)(J+2)}{(J+1)(2J+1)}\) |
| \(0\) | \(\displaystyle \frac{1}{10} \frac{3(2J^2+2J+1)}{J(J+1)}\) | \(\displaystyle \frac{1}{10} \frac{(2J-1)(2J+3)}{J(J+1)}\) |
| \(-1\) | \(\displaystyle \frac{1}{10} \frac{3(J+1)(6J-1)}{J(2J+1)}\) | \(\displaystyle \frac{1}{10} \frac{(2J-3)(J-1)}{J(2J+1)}\) |
For example, the H-like Ly \(_{\alpha_1}\) transition has \(J=1/2\) and \(\Delta J=1\), and therefore \(E_1=E_2=1/2\); the scattered photon is emitted with equal weights for the isotropic and dipole components. The H-like Ly \(_{\alpha_2}\) transition has \(J=1/2\) and \(\Delta J=0\), giving \(E_1=1\) and \(E_2=0\); the scattered photon is emitted isotropically. For the He-like He \(\alpha\) \(w\) and \(y\) lines, the lower level has \(J=0\) and the upper level has \(J=1\), so that \(E_1=0\) and \(E_2=1\); the scattering is described entirely by the dipole component.
The dipole component always includes polarization. Therefore, the ElectronScattering property does not affect this treatment in any way. The implementation of the dipole phase function can be found in the DipolePhaseFunction class. If \(E_2=0\), the scattered photon is emitted isotropically.
If the scattering is coherent (no-cascade) the wavelength shift is determined by:
\[ \lambda' = \lambda \frac{(1 - \boldsymbol{k}_\mathrm{out} \cdot \boldsymbol{v}_\mathrm{atom} / c)}{(1 - \boldsymbol{k}_\mathrm{in} \cdot \boldsymbol{v}_\mathrm{atom} / c)} \]
otherwise (cascade) the wavelength shift is only determined by the outgoing direction:
\[ \lambda' = \lambda (1 - \boldsymbol{k}_\mathrm{out} \cdot \boldsymbol{v}_\mathrm{atom} / c) \]
Performing scattering
The function performing an actual scattering event randomly selects one of the supported scattering channels (i.e. scattering by an electron, fluorescence line emission following a photo-absorption event or scattering by a resonant line). The relative probabilities for these transitions as a function of incoming photon packet wavelength are also calculated during setup. The selected transition determines the scattering mechanism. For electrons, the appropriate scattering function is used (free- or bound-electron Compton). For fluorescence, the emission direction is isotropic, and the outgoing wavelength is the fluorescence wavelength. For the resonant lines, the direction can be either isotropic and unpolarized or following a dipole phase function for both direction and polarization. The outcome is determined by the total angular momentum of the lower level \(J\) and the difference in the total angular momentum between the upper and lower levels \(\Delta J\).
Temperature
As is the case for the XRayAtomicGasMix class, the temperature configured for this material mix is a constant value. It does not affect the ionization state of the gas. Instead, the temperature determines the thermal dispersion, or broadening, of the photo-absorption edges, the fluorescence and recombination line emission, and the resonant scattering lines.
For electron scattering and fluorescence events, the implementation is straightforward. Once a channel has been randomly selected, the magnitude of the interacting atom's thermal velocity is taken from a precalculated table and a velocity vector is sampled from the Maxwell distribution.
Recombination is treated the exact same as fluorescence except that its temperature-dependent yield is obtained from a table during setup.
For photo-absorption, the situation is much more involved. In principle, the full cross section curve for each ionization transition must be convolved with a Gaussian kernel of appropriate width. In practice, the cross section curves are very smooth except for the step at the threshold energy. The effect of the convolution is therefore limited to energies near the threshold energy, replacing the infinitely steep step by a sigmoid function. Considering that the convolution of a step function with a Gaussion is given by the error function, this class uses the following approximation. With \(E_\mathrm{th}\) the threshold energy and \(E_\mathrm{s}\) the energy dispersion corresponding to the thermal velocity of the atom being ionized, the cross section near \(E_\mathrm{th}\) is replaced by
\[ \sigma_{ph}'(E) = \frac{\sigma_{ph}(E_\mathrm{th} +2 E_\mathrm{s})} {2} \, \left[ 1+ \mathrm{erf} ( \frac{E - E_\mathrm{th}} {E_\mathrm{s}} ) \right] \qquad \mathrm{for} \; E_\mathrm{th} -2 E_\mathrm{s} < E < E_\mathrm{th} +2 E_\mathrm{s}. \]
The sigmoid is scaled by the value of the actual cross section at the end of the interval, achieving good continuity at that point in most cases, including all important transitions.
The thermal broadening present in the resonant scattering is already built into the Voigt profile, its implementation can be found in the LyUtils and VoigtProfile namespaces.
For resonant scattering both the cross section and photon energy shift are dependent on the temperature. If branching occurs, i.e. there is a cascade prior to a final transition to the ground state, then the photon energy is simply shifted from its final transition wavelength. When branching does not occur, i.e. the scattering is coherent, then the photon energy is shifted according to the sampled atom velocity. The implementation of this is delegated to the LyUtils and VoigtProfile namespaces.
When an item of this type is used, the names provided by the conditional value expression "GasMix" are inserted into the name sets used for evaluating Boolean expressions.
|
strong |
The enumeration type indicating the implementation used for scattering by electrons.
None : "ignore electrons".
Free : "use free-electron Compton scattering for all electrons".
FreeWithPolarization : "use free-electron Compton scattering with support for polarization".
FreeBound : "use an interpolation of free- and bound-electron Compton scattering".
|
inlineprotected |
Default constructor for concrete Item subclass XRayIonicGasMix: "A gas mix supporting hydrogen- and helium-like ions at X-ray wavelengths".
|
explicit |
This explicit constructor is used to create a new instance of the class. It is used by the XRayIonicGasMixFamily class to create a new instance for each cell.
| XRayIonicGasMix::~XRayIonicGasMix | ( | ) |
The destructor destructs the phase function helpers that were created during setup.
|
inline |
This function returns the value of the discoverable double list property abundances: "the abundances of the ions in the same order as the ions property".
|
inline |
This function returns the value of the discoverable ElectronScattering enumeration property electronScattering: "implementation of scattering by electrons".
The default value for this property is given by the conditional value expression "Free".
This property is displayed only if the Boolean expression "Level3" evaluates to true after replacing the names by true or false depending on their presence.
|
overridevirtual |
This function returns true if this material mix supports polarization during scattering events. For this class, the function returns true if the electronScattering property has been set to FreeWithPolarization or if the resonantScattering property is set to true.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns true if scattering for this material mix is resonant. For this class, the function returns true if the resonantScattering property is set to true.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns true, indicating that a scattering interaction for this material mix may (and usually does) adjust the wavelength of the interacting photon packet.
Reimplemented from MaterialMix.
|
private |
This function returns the index in the private wavelength grid corresponding to the specified wavelength. The parameters for converting a wavelength to the appropriate index are stored in data members during setup.
|
overridevirtual |
This function returns an indicative temperature of the material mix when it would be embedded in a given radiation field. The implementation in this class ignores the radiation field and returns the (spatially constant) temperature configured for this material mix.
Reimplemented from MaterialMix.
|
inline |
This function returns the value of the discoverable string property ions: "the names of the ions for each element (e.g. H,He+,Fe+25,..)".
|
overridevirtual |
This function returns the mass of a hydrogen atom.
Implements MaterialMix.
|
overridevirtual |
This function returns the fundamental material type represented by this material mix, which is MaterialType::Gas.
Implements MaterialMix.
|
overridevirtual |
This function returns the absorption (i.e. \(\sigma_\mathrm{ext} - \sigma_\mathrm{sca}\)) opacity at the given wavelength and material state, using the abundances and temperature configured for this material mix. The photon packet properties are not used.
Implements MaterialMix.
|
overridevirtual |
This function returns the extinction opacity at the given wavelength and material state, using the abundances and temperature configured for this material mix. The photon packet properties are not used.
Implements MaterialMix.
|
overridevirtual |
This function returns the scattering (i.e. electron scattering, fluorescence, resonant scattering) opacity at the given wavelength and material state, using the abundances and temperature configured for this material mix. The photon packet properties are not used.
Implements MaterialMix.
|
overridevirtual |
This function calculates the contribution of the medium component associated with this material mix to the peel-off photon luminosity, polarization state, and wavelength shift for the given wavelength, geometry, material state, and photon properties. The contributions to the Stokes vector components are stored in the I, Q, U, V arguments, which are guaranteed to be initialized to zero by the caller. If there is wavelength shift, the new wavelength value replaces the incoming value of the lambda argument.
The function first calls the private setScatteringInfoIfNeeded() function to establish a random scattering channel and atom velocity for this event. In case the selected channel is electron scattering, the peel-off bias weight and wavelength shift are determined by the Compton phase function and the selected atom velocity. For fluorescence, the peel-off bias weight is trivially one because emission is isotropic and unpolarized, and the outgoing wavelength is determined by Doppler-shifting the rest wavelength of the selected fluorescence transition for the selected atom velocity. For resonant scattering the peel-off bias weight and polarization are determined by its isotropic or dipole phase function, and the wavelength is shifted accordingly depending on whether the scattering is coherent or through a cascade.
Reimplemented from MaterialMix.
|
overridevirtual |
This function performs a scattering event on the specified photon packet in the spatial cell and medium component represented by the specified material state and the receiving material mix. It first calls the private setScatteringInfoIfNeeded() function to establish a random scattering channel and atom velocity for this event.
In case the selected channel is electron scattering, the outgoing direction and adjusted wavelength are determined by the Compton phase function and the selected atom velocity. For fluorescence, emission is isotropic, so the outgoing direction is randomly chosen from the isotropic distribution. The outgoing wavelength is determined by Doppler-shifting the rest wavelength of the selected fluorescence transition for the selected atom velocity. For resonant scattering, the emission direction and polarization are determined by its isotropic or dipole phase function. The wavelength is shifted depending on whether the scattering is coherent or occurs through a cascade. Coherent scattering depends on both the incoming and outgoing directions, whereas a cascade removes the incoming photon information and depends only on the outgoing direction.
Reimplemented from MaterialMix.
|
inline |
This function returns the value of the discoverable Boolean property resonantScattering: "enable resonant line scattering for hydrogen- and helium-like ions".
The default value for this property is given by the conditional value expression "false".
This property is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
This property is relevant only if the Boolean expression "simulationModeLyaExtinctionOnly" evaluates to true after replacing the names by true or false depending on their presence.
|
overridevirtual |
This function returns true, indicating that a scattering interaction for this material mix may emulate secondary emission. This is used to implement fluorescence as scattering.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns the absorption (i.e. \(\sigma_\mathrm{ext} - \sigma_\mathrm{sca}\)) cross section per hydrogen atom at the given wavelength and using the abundances and temperature configured for this material mix.
Implements MaterialMix.
|
overridevirtual |
This function returns the extinction cross section per hydrogen atom at the given wavelength and using the abundances and temperature configured for this material mix.
Implements MaterialMix.
|
overridevirtual |
This function returns the scattering (i.e. electron scattering, fluorescence, resonant scattering) cross section per hydrogen atom at the given wavelength and using the abundances and temperature configured for this material mix.
Implements MaterialMix.
|
private |
This private function draws a random scattering channel and atom velocity and stores this information in the photon packet's scattering information record, unless a previous peel-off stored this already. For fluorescence transitions that support a nonzero line width, the function also draws a random wavelength from the line shape. For a resonant scattering event it determines whether a cascade occurs and if the phase function is isotropic or a dipole.
|
overridevirtual |
This function precalculates relevant cross sections and relative contributions over a high-resolution wavelength grid. It also stores persistent data that is used during the simulation to perform scattering.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns a list of StateVariable objects describing the specific state variables used by the receiving material mix. For this class, the function returns just the descriptor for the number density.
Implements MaterialMix.
|
inline |
This function returns the value of the discoverable double property temperature: "the temperature of the gas in K".
This property represents a physical quantity of type "temperature".
The minimum value for this property is "[3".
The maximum value for this property is "1e9]".
The default value for this property is given by the conditional value expression "1e4".
This property is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
|
private |
This function returns the precalculated thermal velocity of the atom with the specified atomic number \(Z\).