Skip to content

Commit 59a4910

Browse files
authored
Merge pull request #189 from bendudson/more-docs
Adding documentation
2 parents 9695f46 + 063408e commit 59a4910

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

docs/sphinx/tests.rst

+64
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,67 @@ stationary at the initial jump location. Left state
139139
:math:`\left(\rho_L, u_L, p_L\right) = \left(1, -19.59745,
140140
1000.0\right)` Right state :math:`\left(\rho_R, u_R, p_R\right) =
141141
\left(1, -19.59745, 0.01\right)`. Result at time :math:`t = 0.03`.
142+
143+
Drift wave
144+
----------
145+
146+
``tests/integrated/drift-wave``
147+
148+
This calculates the growth rate and frequency of a resistive drift
149+
wave with finite electron mass.
150+
151+
The equations solved are:
152+
153+
.. math::
154+
155+
\begin{aligned}
156+
\frac{\partial n_i}{\partial t} =& -\nabla\cdot\left(n_i\mathbf{v}_{E\times B}\right) \\
157+
n_e =& n_i \\
158+
\frac{\partial}{\partial t}\nabla\cdot\left(\frac{n_0 m_i}{B^2}\nabla_\perp\phi\right) =& \nabla_{||}J_{||} = -\nabla_{||}\left(en_ev_{||e}\right) \\
159+
\frac{\partial}{\partial t}\left(m_en_ev_{||e}\right) =& -\nabla\cdot\left(m_en_ev_{||e} \mathbf{b}v_{||e}\right) + en_e\partial_{||}\phi - \partial_{||}p_e - 0.51\nu_{ei}n_im_ev_{||e}
160+
\end{aligned}
161+
162+
Linearising around a stationary background with constant density :math:`n_0` and temperature :math:`T_0`,
163+
using :math:`\frac{\partial}{\partial t}\rightarrow -i\omega` gives:
164+
165+
.. math::
166+
167+
\begin{aligned}
168+
\tilde{n} =& \frac{k_\perp}{\omega}\frac{n_0}{BL_n}\tilde{\phi} \\
169+
\tilde{\phi} =& -\frac{k_{||}}{\omega k_\perp^2}\frac{eB^2}{m_i}\tilde{v_{||e}} \\
170+
\omega m_e \tilde{v_{||e}} =& -ek_{||}\tilde{\phi} + ek_{||}\frac{T_o}{n_0}\tilde{n} - i0.51\nu_{ei}m_e\tilde{v_{||e}}
171+
\end{aligned}
172+
173+
174+
where the radial density length scale coming from the radial
175+
:math:`E\times B` advection of density is defined as
176+
177+
.. math::
178+
179+
\frac{1}{L_n} \equiv \frac{1}{n_0}\frac{\partial n_0}{\partial r}
180+
181+
Substituting and rearranging gives:
182+
183+
.. math::
184+
185+
i\left(\frac{\omega}{\omega*}\right)^3 \frac{\omega_*}{0.51\nu_{ei}} = \left(\frac{\omega}{\omega_*} - 1\right)\frac{i\sigma_{||}}{\omega_*} + \left(\frac{\omega}{\omega*}\right)^2
186+
187+
or
188+
189+
.. math::
190+
191+
\frac{\omega_*}{0.51\nu_{ei}}\left(\frac{\omega}{\omega_*}\right)^3 + i\left(\frac{\omega}{\omega_*}\right)^2 - \frac{\sigma_{||}}{\omega_*}\left(\frac{\omega}{\omega_*}\right) + \frac{\sigma_{||}}{\omega_*} = 0
192+
193+
where
194+
195+
.. math::
196+
197+
\begin{aligned}
198+
\omega_* =& \frac{k_\perp T_0}{BL_n} \\
199+
\sigma_{||} =& \frac{k_{||}^2}{k_\perp^2}\frac{\Omega_i\Omega_e}{0.51\nu_{ei}} \\
200+
\Omega_s =& eB / m_s
201+
\end{aligned}
202+
203+
This is a cubic dispersion relation, so we find the three roots (using
204+
NumPy), and choose the root with the most positive growth rate
205+
(imaginary component of :math:`\omega`).

0 commit comments

Comments
 (0)