NLTE treatment
NLTE treatment of lines is available both in ~LTEPlasma and the ~NebularPlasma class. This can be enabled by specifying
which species should be treated as NLTE with a simple list of tuples (e.g. [(20,1)] for Ca II).
First let’s dive into the basics:
There are two rates to consider from a given level.
\[ \begin{align}\begin{aligned}\begin{split}r_{\textrm{upper}\rightarrow\textrm{lower}} &= \underbrace{A_{ul} n_u}_\textrm{spontaneous emission}
+ \underbrace{B_{ul} n_u \bar{J}_\nu}_\textrm{stimulated emission} +
\underbrace{C_{ul} n_u n_e}_\textrm{collisional deexcitation}\\
&= n_u \underbrace{(A_{ul} + B_{ul}\bar{J}_\nu + C_{ul} n_e)}_{r_{ul}} \\\end{split}\\\begin{split}r_{\textrm{lower}\rightarrow\textrm{upper}} &= \underbrace{B_{lu} n_l \bar{J}_\nu}_\textrm{stimulated absorption} +
\underbrace{C_{lu}\,n_l\,n_e}_\textrm{collisional excitation}\\
&= n_l \underbrace{(B_{lu}\bar{J}_\nu + C_{ul}n_e)}_{r_{lu}},\end{split}\end{aligned}\end{align} \]
where \(\bar{J}_\nu\) (in LTE this is \(B(\nu, T)\)) denotes the mean intensity at the frequency of the line and
\(n_e\) the number density of electrons.
Next, we calculate the rate of change of a level by adding up all outgoing and all incoming transitions from level \(j\).
\[\frac{dn_j}{dt} = \underbrace{\sum_{i \ne j} r_{ij}}_\textrm{incoming rate} -
\underbrace{\sum_{i \ne j} r_{ji}}_\textrm{outgoing rate}\]
In a statistical equilibrium, all incoming rates and outgoing rates add up to 0 (\(\frac{dn_j}{dt}=0\)). We use this to
calculate the level populations using the rate coefficients (\(r_ij, r_ji\)).
\[\begin{split}\left(
\begin{matrix}
-(\cal{r}_{12} + \dots + \cal{r}_{1j}) & \dots & \cal{r}_{j1}\\
\vdots & \ddots & \vdots \\
\cal{r}_{1j} & \dots & - (\cal{r} _{j1} + \dots + \cal{r} _{j, j-1}) \\
\end{matrix}
\right)
%
\left(
\begin{matrix}
n_1\\
\vdots\\
n_j\\
\end{matrix}
\right)
%
=
%
\left(
\begin{matrix}
0\\
0\\
0\\
\end{matrix}
\right)\end{split}\]
with the additional constraint that all the level number populations need to add up to the current ion population \(N\), we change this to
\[\begin{split}\left(
\begin{matrix}
1 & 1 & \dots \\
\vdots & \ddots & \vdots \\
\cal{r}_{1j} & \dots & - (\cal{r} _{j1} + \dots + \cal{r} _{j, j-1}) \\
\end{matrix}
\right)
%
\left(
\begin{matrix}
n_1\\
\vdots\\
n_j\\
\end{matrix}
\right)
%
=
%
\left(
\begin{matrix}
N\\
0\\
0\\
\end{matrix}
\right)\end{split}\]
For a three-level atom we have:
\[ \begin{align}\begin{aligned}\begin{split}\frac{dn_1}{dt} &= \underbrace{n_2 r_{21} + n_3 r_{31}}_\textrm{incoming rate}
- \underbrace{(n_1 r_{12} + n_1 r_{13})}_\textrm{outgoing rate} = 0\\\end{split}\\\begin{split}\frac{dn_2}{dt} &= \underbrace{n_1 r_{12} + n_3 r_{32}}_\textrm{incoming rate}
- \underbrace{(n_2 r_{21} + n_2 r_{23})}_{outgoing rate} = 0\\\end{split}\\\frac{dn_3}{dt} &= \underbrace{n_1 r_{13} + n_2 r_{23}}_\textrm{incoming rate}
- \underbrace{(n_3 r_{32} + n_3 r_{31})}_\textrm{outgoing rate} = 0,\end{aligned}\end{align} \]
which can be written in matrix from:
\[\begin{split}\left(\begin{matrix}
-(r_{12} + r_{13}) & r_{21} & r_{31}\\
r_{12} & -(r_{21} + r_{23}) & r_{32}\\
r_{13} & r_{23} & -(r_{31} + r_{32}) \\
\end{matrix}\right)
\left(
\begin{matrix}
n_1\\
n_2\\
n_3\\
\end{matrix}
\right)
=
\left(
\begin{matrix}
0\\
0\\
0\\
\end{matrix}
\right)\end{split}\]
To solve for the level populations, we need an additional constraint: \(n_1 + n_2 + n_3 = N\). By setting \(N = 1\), we can get the relative rates:
\[\begin{split}\left(\begin{matrix}
1 & 1 & 1\\
r_{12} & -(r_{21} + r_{23}) & r_{32}\\
r_{13} & r_{23} & -(r_{31} + r_{32}) \\
\end{matrix}\right)
\left(
\begin{matrix}
n_1\\
n_2\\
n_3\\
\end{matrix}
\right)
=
\left(
\begin{matrix}
1\\
0\\
0\\
\end{matrix}
\right)\end{split}\]
Now we go back and look at the rate coefficients used for a level population — as an example \(\frac{dn_2}{dt}\):
\[\begin{split}\frac{dn_2}{dt} &= n_1 r_{12} - n_2 (r_{21} + r_{23}) + n_3 r_{32}\\
&= n_1 B_{12} \bar{J}_{12} + n_1 C_{12} n_e - n_2 A_{21} - n_2 B_{21} \bar{J}_{21} - n_2 C_{21} n_e\\
- n_2 B_{23} \bar{J}_{23} - n_2 C_{23} n_e + n_3 A_{32} + n_3 B_{32} \bar{J}_{32} + n_3 C_{32} n_e,\\
+ n_3 A_{32} + n_3 C_{32} n_e,\end{split}\]
Next, we will group the stimulated emission and stimulated absorption terms, as we can assume \(\bar{J_{12}} = \bar{J_{21}}\):
\[\begin{split}\frac{dn_2}{dt} &= n_1 \bigg{(}B_{12} \bar{J}_{12}
\underbrace{\bigg{(}1 - \frac{n_2}{n_1}\frac{B_{21}}{B_{12}}\bigg{)}}_\text{stimulated emission term}
+ C_{12} n_e\bigg{)}\\
- n_2 \bigg{(}A_{21} + C_{23} n_e + n_2 B_{23} \bar{J}_{23}
\underbrace{\bigg{(}1 - \frac{n_3}{n_2}\frac{B_{32}}{B_{23}}\bigg{)}}_\text{stimulated emission term}\bigg{)}
+ n_3 (A_{32} + C_{32} n_e)\end{split}\]