%  \documentclass[12pt, letterpaper]{report}
% 
% 
%  \usepackage{rotating}
% \usepackage{times}
% \usepackage{amsmath}
% \usepackage{amsfonts} 
% \usepackage{amssymb} 
% \usepackage{rotating}
% \usepackage{aas_macros_srk}
% \usepackage{graphicx}
% \usepackage{epsfig}
% \usepackage{epsf}
% \usepackage{bm}
% \usepackage{natbib}
%  \usepackage{epsfig} 
%  \usepackage{natbib} %allows me to cite by author and year
%  \usepackage{aas_macros_srk} %must be included so I can use \jgr for example without issue
% %  \usepackage[toc]{appendix} 
% \DeclareGraphicsExtensions{.pdf,.png,.jpg,.tif}
% % %  \usepackage{square}
% %  \usepackage{sectsty}
% \usepackage{setspace}
%  \doublespacing
% 
% \usepackage{uiDiss_srk}
%  \begin{document}

% \Chapter{Test chapter}
% blah blah blah
% \appendix
% \appendixpage
% \addappheadtotoc
%   \begin{appendices}
% \appendix{Derivation of Hall and Pedersen Currents} 

% \chapter{Appendices}
\appendix
\Appendix{\uppercase{Hall and Pedersen Currents}}
\label{ch:app1}
% \section{Derivation of Hall and Pedersen Currents}
% \section{Derivation of Hall and Pedersen Currents} 
% \label{app1:hall_ped}

A derivation of the Hall and Pedersen currents is given to demonstrate how the plasma momentum equations and Ohm's law can be used to describe the current perpendicular to the mean magnetic field.  
A two-fluid model, in which ions and electrons are treated as separate fluids, is the simplest plasma model that captures the relevant physics.   
The two-fluid momentum equations that include electrodynamic forces and collisional forces can be written as, 
\begin{equation}
 \begin{array}{1}
m_{i}n_{i}\frac{dU_{i}}{dt} = n_{i}|q_{i}|(\mathbf{E+U_{i}\times B}) - n_{i}m_{i}\nu_{in}\mathbf{U_{i}} \\
m_{e}n_{e}\frac{dU_{e}}{dt} = -n_{e}|q_{e}|(\mathbf{E+U_{e}\times B}) - n_{e}m_{e}\nu_{en}\mathbf{U_{e}}
\end{array}
\label{eq:2fluid}
\end{equation}
where $\mathrm{\nu_{in}}$ and $\mathrm{\nu_{en}}$ are the collision frequency between ions and electrons with the atmospheric neutral atoms, respectively.   
The pressure term in the momentum equation becomes significant when considering length scales of the order of meters or smaller \citep{Bostrom:1964}.  
This can be shown by rewriting the pressure gradient as $\mathrm{\nabla p \approx nkT/L}$ and the magnetic term as $n|q|\mathbf{U_{i}\times B} \approx \mathrm{nqBU}$.  
 If these two forces are set equal to each other, then $\mathrm{ L \approx kT/UBq}$.  
Out of simplicity it is assumed that ions or electrons have the same temperature, and using nominal ionospheric parameters, then $\mathrm{L \approx 2}$ m. 
Considering that this derivation is valid for large scale sizes ($\mathrm{L_{char} >> 1.5}$ m), the pressure term will be considered negligible.
For simplicity, the perpendicular components of the velocity and electric field are assumed to be the X- and Y-axis of a right-handed Cartesian coordinate system.  
The mean magnetic field, $\mathrm{B_{o}}$, resides in the -Z direction, which is consistent with what would be observed on the Earth.  

If it is assumed that the solution is in steady-state, then the left-hand side of equation (\ref{eq:2fluid}) is approximately equal to zero.  %[give a physical reason why - timescales of collisions]
The perpendicular components of the electric field are solved in terms of the velocity components.  
For the ions, 
\begin{equation}
 \begin{array}{1}
E_{x} = U_{y} B_{o} + \alpha_{i} U_{x} \\
E_{y} = -U_{x} B_{o} +\alpha_{i} U_{y}
 \end{array}
\label{eq:efield_ion}
\end{equation}
where $\mathrm{\alpha_{i} = 1/\mu_{i} = m_{i}\nu_{in}/q_{i}}$ with $\mathrm{\mu_{i}}$ being defined as the mobility \citep{Piel:2010}.
For the electrons, a similar set of equations are found,
 \begin{equation}
 \begin{array}{1}
E_{x} = U_{y} B_{o} - \alpha_{e} U_{x} \\
E_{y} = -U_{x} B_{o} -\alpha_{e} U_{y}
 \end{array}
\label{eq:efield_el}
\end{equation}
where $\mathrm{\alpha_{e} = m_{e}\nu_{en}/q_{e}}$ is similarly defined as the inverse of the electron mobility.

To determine the Hall and Pedersen currents, the velocity components are solved as functions of the electric field.   
The velocity components can then be substituted directly into the current equation, 
\begin{equation}
 j_{\perp} = n_{i}|q_{i}| \mathbf{U_{\perp i}} - n_{e}|q_{e}| \mathbf{U_{\perp e}} = \sigma \mathbf{E_{\perp}}
\label{eq:current_eq_app}
\end{equation}
 and regrouped as a function of the electric field components.
As shown in equation (\ref{eq:current_eq_app}), Ohm's Law can then be applied to directly relate the current to the electric field. 
The conductivity tensor can be determined immediately as the coefficients of the electric field components.  
Following this procedure, equations (\ref{eq:efield_ion}) and (\ref{eq:efield_el}) can be rewritten into a 2x2 matrix equation, for the ions,
 \begin{equation}
 \begin{bmatrix}
  E_{x} \\
E_{y}
\end{bmatrix} = 
\begin{bmatrix}
\alpha_{i} & B_{o} \\
-B_{o} & \alpha_{i}
\end{bmatrix}
\begin{bmatrix}
 U_{xi} \\
U_{yi} 
\end{bmatrix};
\end{equation} 
 and for the electrons,
\begin{equation}
\begin{bmatrix}
  E_{x} \\
E_{y}
\end{bmatrix} = 
\begin{bmatrix}
-\alpha_{e} & B_{o} \\
-B_{o} & -\alpha_{e}
\end{bmatrix}
\begin{bmatrix}
 U_{xe} \\
U_{ye} 
\end{bmatrix}
\end{equation}
The inverse of the 2x2 matrix is straightforward and produces the result for the ions,
\begin{equation}
\begin{bmatrix}
 U_{xi} \\
U_{yi} 
\end{bmatrix}=
\frac{1}{\alpha_{i}^2 + B_{o}^2}
\begin{bmatrix}
\alpha_{i} & -B_{o} \\
B_{o} & \alpha_{i}
\end{bmatrix}
\begin{bmatrix}
  E_{x} \\
E_{y}
\end{bmatrix} 
\label{eq:U_ion_E}
\end{equation} 
and for the electrons,
\begin{equation}
 \begin{bmatrix}
 U_{xe} \\
U_{ye} 
\end{bmatrix}=
\frac{1}{\alpha_{i}^2 + B_{o}^2}
\begin{bmatrix}
-\alpha_{e} & -B_{o} \\
B_{o} & -\alpha_{e}
\end{bmatrix}
\begin{bmatrix}
  E_{x} \\
E_{y}
\end{bmatrix} 
\label{eq:U_electron_E}
\end{equation}  
The conductivities can now be determined using Ohm's Law.
If quasi-neutrality and single-species ions are assumed ($\mathrm q_{i}n_{i} \approx q_{e}n_{e} \approx en_{e} $) the perpendicular current becomes, 
\begin{equation}
 \mathbf{j_{\perp}(z)} = 
\begin{bmatrix}
 j_{x}(z) \\
j_{y}(z)
\end{bmatrix} 
=e n_{e}(z) 
\begin{bmatrix}
U_{xi} - U_{xe} \\
U_{yi} - U_{ye}          
\end{bmatrix}
=\mathbf{\sigma(z)}
\begin{bmatrix}
 E_{x} \\
E_{y}
\end{bmatrix}
\label{app1:eq_j_perp}
\end{equation}
Equation (\ref{app1:eq_j_perp}) can be simplified into the conductivity matrix, 
\begin{equation}
\mathbf{j_{\perp}(z)} = 
\begin{bmatrix}
 j_{x}(z) \\
j_{y}(z)
\end{bmatrix} =
\begin{bmatrix}
\sigma_{P}(z) & -\sigma_{H}(z) \\
\sigma_{H}(z) & \sigma_{P}(z) 
\end{bmatrix}
\begin{bmatrix}
 E_{x} \\
E_{y}
\end{bmatrix}
\end{equation}
where equations (\ref{eq:U_ion_E}) and (\ref{eq:U_electron_E}) can be combined and simplified into a standard form for the Pedersen conductivity \citep{Paschmann:2002}, 
\begin{equation}
\sigma_{P}(z) = e^{2} n_{e}(z) \left(\frac{\nu_{in}}{m_{i}\left(\nu^{2}_{in}+\Omega^{2}_{i}\right)} +\frac{\nu_{en}}{m_{e}\left(\nu^{2}_{en}+\Omega^{2}_{e}\right)}\right)
\label{eq:S_Ped}
\end{equation}
and the Hall conductivity \citep{Paschmann:2002}, 
\begin{equation}
\sigma_{H}(z) = e^{2} n_{e}(z) \left(\frac{\Omega_{i}}{m_{i}\left(\nu^{2}_{in}+\Omega^{2}_{i}\right)} - \frac{\Omega_{e}}{m_{e}\left(\nu^{2}_{en}+\Omega^{2}_{e}\right)}\right)
\label{eq:S_Hall}
\end{equation}
where $\mathrm{\Omega_{i}}$ and $\mathrm{\Omega_{e}}$ are the ion and electron cyclotron frequency, respectively.  
It is noted that the Hall and Pedersen conductivities are altitude dependent quantities.  
Equations (\ref{eq:S_Ped}) and (\ref{eq:S_Hall}) are consistent with forms found in \citet{Paschmann:2002}, but these equations can be reformed into the following form found in \citet{Evans:1977}.  
The Pedersen conductivity becomes,
\begin{equation}
 \sigma_{P}(z) = \frac{e n_{e}(z)}{B(z)} \left[ {\frac{{\nu}_{in}/\Omega_{i}}{1+\left(\frac{{\nu}_{in}}{\Omega_{i}}}\right)^{2} } + \frac{{\nu}_{en}/\Omega_{e}}{1+\left(\frac{{\nu}_{en}}{\Omega_{e}}}\right)^{2}  \right]%\left(\frac{{\nu_{in}}/\omega_{i}}{1+\left(\frac{\nu_{in}}{\omega_{i}}\right)^{2}\right)\right]
\label{eq:ped_evans}
\end{equation}
and the Hall conductivity, 
\begin{equation}
 \sigma_{H}(z) = \frac{e n_{e}(z)}{B(z)} \left[ {\frac{1}{1+\left(\frac{{\nu}_{in}}{\Omega_{i}}}\right)^{2}} - \frac{1}{1+\left(\frac{{\nu}_{en}}{\Omega_{e}}}\right)^{2}  \right]%\left(\frac{{\nu_{in}}/\omega_{i}}{1+\left(\frac{\nu_{in}}{\omega_{i}}\right)^{2}\right)\right]
\label{eq:hall_evans}
\end{equation}

\Appendix{\uppercase{Approximate Expression for Hall Conductivity}}
\label{app:approx_Hall}
Using the nominal values derived from Figure 2 in \citet{Bostrom:1964}, above approximately 120-140 km, the value of the Hall conductivity results from a difference between values that are approximately equal to 1 in equation (\ref{eq:hall_evans}).
Computationally, this causes an issue where the value of the Hall conductivity may switch between positive and negative values depending on the round off precision.  
To circumvent this issue, an approximate form of the Hall conductivity is derived.  
% Equation (\ref{eq:hall_evans}) can be expressed in an approximate form because we are subtracting numbers of 1-1[numerical issue]
If the variables  $\mathrm{\alpha = {\nu}_{in}/\Omega_{i}}$ and $\mathrm{\beta = {\nu}_{en}/\Omega_{e}}$ are defined. 
Equation \ref{eq:hall_evans} can be expressed over a common denominator, 
\begin{equation}
 \sigma_{H}(z) = \frac{e n_{e}(z)}{B(z)} \left[ \frac{(1+{\beta}^2) - (1+{\alpha}^2)}{(1+{\alpha}^2)(1+{\beta}^2)} \right]
\end{equation}
which can be simplified to, 
\begin{equation}
 \sigma_{H}(z) = \frac{e n_{e}(z)}{B(z)} \left[ \frac{{\beta}^2 - {\alpha}^2}{(1+{\alpha}^2)(1+{\beta}^2)} \right]
\end{equation}
Using the nominal values from \citet{Bostrom:1964} it is noted that over the full altitude range $\mathrm{\beta << 1}$.  
Therefore, $\mathrm{\beta \approx 0}$ in this approximation, so the equation for the Hall conductivity simplifies to (ignoring the minus sign),
\begin{equation}
\begin{align}
\sigma_{H}(z) &= \frac{e n_{e}(z)}{B(z)} \left[ \frac{1}{(1+{\alpha}^{-2})} \right] \\
& = \frac{e n_{e}(z)}{B(z)} \frac{1}{(1+{\Omega_{i}/\nu_in}^{-2})} 
\end{align}
\end{equation}
which is equivalent to equation equation 10 in \citet{Bostrom:1964}.  
This was the equation used to evaluate the Hall conductivity in Chapter \ref{ch:modeling}.  
%approximate forms..

% \appendix
\Appendix{\uppercase{Parallel Equipotential}}
\label{app2:parallel}
This section is a derivation that demonstrates how electric fields can map down along the geomagnetic field from the magnetosphere to the ionosphere.  
% The point is to show that in the parallel direction, electric field can be mapped along the magnetic field lines.  
This discussion follows from statements that were made in Section 2.4 of \citet{Kelley:2009}: `` If $\mathrm{sigma_{\parallel}}$ were infinite, there would be zero potential drop along the magnetic field line, and the potential difference between two field lines would be constant. '' 

To start, it is assumed that the conductivity and the parallel electric field is a function solely of the altitude (z).  
It is further assumed that a steady-state situation, such that the continuity of current equation is satisfied ($\mathrm{\nabla \cdot \mathbf{J} = 0}$).  
For simplicity, only the parallel component of current will be examined.  
This can be assumed because at altitudes well above the ionosphere because the perpendicular current is nearly zero due to the extremely low Hall and Pedersen conductivities.    

Substituting Ohm's law into the continuity of current equation, 
\begin{equation}
\nabla \cdot J = \nabla \cdot \left(\sigma_{\parallel}(z) E_{\parallel}(z)\right) = \frac{\partial}{\partial z} \left(\sigma_{\parallel}(z) E_{\parallel}(z)\right) = 0
\label{eq:app1_par_eq1}
\end{equation}
When expanded and dropping the z variable, equation (\ref{eq:app1_par_eq1}) becomes, 
\begin{equation}
 \frac{\partial \sigma_{\parallel}}{\partial z} E_{\parallel} + \sigma_{\parallel}  \frac{\partial E_{\parallel}}{\partial z} = 0
\label{eq:app1_par_eq2}
\end{equation}
and equation (\ref{eq:app1_par_eq2}) can be simplified to,
\begin{equation}
 \frac{1}{\sigma_{\parallel}}\frac{\partial \sigma_{\parallel}}{\partial z} = - \frac{1}{E_{\parallel}}\frac{\partial E_{\parallel}}{\partial z} \implies
\frac{\partial}{\partial z} \ln \left(\sigma_{\parallel}\right) = - \frac{\partial}{\partial z} \ln \left(E_{\parallel}\right)
\label{eq:app1_par_eq3}
\end{equation}
Equation (\ref{eq:app1_par_eq3}) is a first order differential equation, which can be integrated over altitude so that (ignoring the constant of integration), 
\begin{equation}
 \ln \sigma_{\parallel} = - \ln E_{\parallel} \implies \ln \left(\sigma_{\parallel} E_{\parallel} \right) = 0
\label{eq:app1_par_eq4}
\end{equation}
Equation \ref{eq:app1_par_eq4} is only satisfied when, 
\begin{equation}
\boxed{ \sigma_{\parallel} E_{\parallel} = 1}
\label{eq:app1_par_eq5}
\end{equation}
There are two key implications that follow from equation (\ref{eq:app1_par_eq5}).
First, as it can be seen that if $\mathrm{\sigma_{\parallel} \rightarrow \infty}$ then $\mathrm{E_{\parallel} \rightarrow 0}$.  
The parallel conductivity along the magnetic field lines is very high and for all practical applications may be considered infinite.  
This implies that if a parallel electric fields is set up the parallel conductivity will respond to null the parallel electric field. 
As has been discussed at length in Chapter \ref{ch2:background}, parallel electric fields are the key to auroral particle acceleration.  
% This was one of the key reasons why there was strong objections to the idea of parallel electric fields being responsible for accelerating electrons which cause discrete aurora.  

The second implication has to do with how equipotentials map between two altitudes.  
The electric field can be written as a gradient of a potential, $\mathbf{E} = - \nabla \Phi(x,y,z)$
For the parallel electric field,
\begin{equation}
 - \frac{\partial}{\partial z} \Phi(x,y,z) = \frac{1}{\sigma_{\parallel}}
\label{eq:app1_par_eq6} 
\end{equation}
However, as the conductivity is approximately infinite, then equation (\ref{eq:app1_par_eq6}) becomes, 
\begin{equation}
 - \frac{\partial}{\partial z} \Phi(x,y,z) \approx 0 \implies \Phi(x,y)
\label{eq:app1_par_eq7} 
\end{equation}
which therefore means that $\mathrm{\Phi(x,y)}$ does not have any z or altitude dependence.  
This further implies that potential contours may be dependent upon the perpendicular components and can be mapped from one altitude to another, yet retain its perpendicular structure between various altitudes.  
The condition of nearly infinite conductivity is what guarantees that magnetic field lines remain equipotentials.  
It is finally worth noting that two early papers were published by \citet{Farley:1959, Farley:1960} that discussed electrostatic mapping along magnetic field lines much greater depth.
The interested reader should refer to those papers for a more in-depth treatment of the problem.  

This derivation demonstrates how parallel electric fields will not naturally arise on nearly infinitely conducting field lines.  
However, as has been discussed extensively in Chapter \ref{ch2:background}, parallel electric fields are set up on geomagnetic field lines and accelerate electrons to create the aurora.  



% \appendix
\Appendix{\uppercase{Electrostatic Analyzer}}
\label{app1:electrostatic}
In Chapter \ref{ch3:instr_process} Section (\ref{sub:electrostatic}) the electric field between two cylindrically symmetric hemispheres was presented as $\mathrm{E_{o} \approx \Phi/\Delta r}$.  
While this approximate form is sufficient to complete the argument, determining the electric field between the two hemisphere is a boundary value problem that involves solving Laplace's equation.  
A thorough derivation of the boundary value problems is presented to obtain the exact analytic solution for the electric field and to demonstrate how the electric field depends on the physical dimensions of the top hat analyzer.  
The key point in this derivation is to demonstrate that the electric field generated between the hemispheres depends on the physical dimensions, such as the radii of the inner and outer hemisphere.    


If cylindrical symmetry (half-hemisphere) is assumed and the electric field is further assumed to be azimuthally symmetric and thin, then the Laplacian can be written as, 
\begin{equation}
 \nabla^{2}\Phi(\rho) = \frac{1}{\rho}\frac{\partial}{\partial \rho}\left[\rho \Phi(\rho)\right] = 0
\label{eq:app1_tophat_eq1}
\end{equation}
where $\mathrm{\rho}$ is the radial component.  
Equation (\ref{eq:app1_tophat_eq1}) can be integrated twice with respect to the radial component, $\mathrm{\rho}$, to produce, 
\begin{equation}
 \Phi(\rho) = A \ln(\rho) + B
\end{equation}
where A and B correspond to the constants of integration.  

To complete the solution, the boundary conditions must be applied at the inner and outer hemispheres of the detector.  
This can be represented by the two boundary conditions, 
\begin{equation}
 \begin{align}
  \Phi(r_{in}) = \Phi_{o} \\
\Phi(r_{out}) = \Phi_{sc}
 \end{align}
\label{eq:app1_tophat_eq2}
\end{equation}
where the inner electrode is held at the swept potential, usually a few hundred volts.  
The outer hemisphere is at spacecraft ground, which may be of the order of a few voltages relative to the plasma potential due to spacecraft charging.  
The boundary conditions are applied, at the inner electrode, 
\begin{equation}
 \Phi_{o} = A \ln(r_{in}) + B
\label{eq:app1_tophat_eq3}
\end{equation}
and for the outer hemisphere, 
\begin{equation}
 \Phi_{sc} = A \ln(r_{out}) + B
\label{eq:app1_tophat_eq4}
\end{equation}
At this point, the constants of integration A and B need to be solved to complete the solution.  
However, one way to simplify the solution is to note that what matters is the potential difference between the inner and outer hemisphere, $\mathrm{\Delta \Phi = \Phi_{sc} - \Phi_{o}}$.
To get the voltage difference, equation (\ref{eq:app1_tophat_eq4}) can be subtracted with equation (\ref{eq:app1_tophat_eq3}), which A to be solved for, 
\begin{equation}
 A = \frac{\Delta \Phi}{\ln(r_{out}/r_{in})}
\end{equation}
so now the equation for the potential between the hemispheres is,
\begin{equation}
 \Phi(\rho) = \frac{\Delta \Phi}{\ln(r_{out}/r_{in}}) \ln(\rho) + B
\end{equation}
In the process of determining the electric field, the integration variable B will not matter, because its derivative is equal to zero.  
So the radial electric field can be written as \citep{Pfaff:1996}, 
\begin{equation}
 E_{\rho} = - \frac{\partial \Phi(\rho)}{\partial \rho} = - \frac{\Delta \Phi}{\rho \ln(r_{out}/r_{in})}
\label{eq:app1_tophat_eq5}
\end{equation}
and this is the analytical solution for the electric field within the cylindrically symmetric tophat assuming no edge effects.  

One aspect to consider: how close does equation (\ref{eq:app1_tophat_eq5}) matches with the electric field from the approximation $\mathrm{E_{o} \approx \Phi/\Delta r}$.  
This question reduces to the difference between $\mathrm{\rho \ln(r_{out}/r_{in})}$ versus $\mathrm{r_{out} -r_{in}}$.
The inner and outer hemisphere radius as measured through mechanical drawings are 0.8898 in and 0.9449 in, respectively [R. T. Dvorsky, private communication, 2013].  
The results comparing the two radii are shown in Table \ref{app1:table1}.  
As can be seen the difference between the approximate radii ($\mathrm{\Delta r}$) and the exactly solution are similar, differing by only 20\%.
This suggests that the approximation used in Chapter \ref{ch3:instr_process} is reasonable.  

\begin{table}[t]
\centering
\caption{Radial Variable}
\vspace*{4pt}
\begin{tabular}{| c | c |} 
\hline
 ${\Delta r}$ & $\mathrm{\rho\ln(r_{out}/r_{in})}$ \\ \hline
0.0551 [in] & 0.069 [in] \\
\hline
\end{tabular}
\label{app1:table1}
\end{table}


The radial distance between the inner electrode and the outer hemisphere can also be viewed effectively as a ``gain'' applied to the potential difference.  
The factor of two is accounted for when the conversion is made to energy in the centripetal force equation.  
As shown in Table (\ref{app3:table2}) it can be seen that the gain for the approximate and exact expression are the same, when it was assumed that $\mathrm{r_{o} = r_{in}+ \Delta r /2}$.  
The typical gain factor that is determined in the pre-flight calibrations is approximately 7, so these analytical values agree well with the measured gains.  

\begin{table}[t]
\centering
\caption{Effective gains} %These gains are as a result of the radial distance and have been found to be approximately equal to 7 in the pre-flight calibration routine.}
\vspace*{4pt}
\begin{tabular}{| c | c | c |} 
\hline
Energy & $\mathrm{\frac{q \Delta \Phi r_{o}}{2 \Delta r}}$ & $\mathrm{\frac{q \Delta \Phi}{2 \ln(r_{out}/r_{in})}}$ \\ \hline
Gain & $\mathrm{\frac{1}{2 \Delta r}}$ & $\mathrm{\frac{1}{2 \ln(r_{out}/r_{in})}}$ \\ \hline
- & 8.32 & 8.32 \\
\hline
\end{tabular}
\label{app3:table2}
\end{table}

 


% %  \end{appendices}
% \bibliographystyle{agu}
% \bibliography{master_bib}
% \end{document}