%<*TokamakPurpose>
\label{sec:tokamakprinciple}
Tokamaks are machines with a strong magnetic field whose mission is to, one day, become fusion reactors fuelling clean and safe power plants. The basic task of a tokamak reactor is to heat and confine its fuel, a 50:50 mixture of deuterium and tritium, allowing thermonuclear fusion reactions to take place. These reactions generate heat (14.1 MeV per reaction) which is subsequently converted into electricity via the standard steam-turbine cycle.

One of the main challenges in current tokamak research is to confine the burning fuel. Although the fuel is very thin (its density is 5-8 orders of magnitude lower than the density of air), its temperature is extremely high, up to $\sim$100 million K. This is to ensure that when deuterium and tritium nuclei collide, they have sufficient energy to overcome the repulsive electrostatic barrier and fuse, hence \textit{thermonuclear} fusion. Such high temperatures mean that the fuel is in the state of plasma, a collection of ionized nuclei and free electrons, and also that it must never directly touch the reactor walls. (For one, the plasma would cool down and cease to exist; for two, the reactor walls might melt.) Tokamaks confine the fuel using the Lorentz force $q \textbf{v} \times \textbf{B}$, which forces charged particles to rotate around magnetic field lines rather than travel across them freely. Thus the strong magnetic field confines the plasma in the centre of the tokamak chamber.
%</TokamakPurpose>


%<*TokamakPrinciple>
\begin{figure}[ht]
\centerline{\resizebox{\textwidth}{!}{\rotatebox{0}{\includegraphics{TokamakConcept/drawing.pdf}}}}
	\caption{Basic components of the GOLEM tokamak.}
	\label{fig:tokamak}
\end{figure}

The basic structure of a tokamak is shown in figure \ref{fig:tokamak} (more information can be found e.g. in \cite{wesson99science}). Tokamaks comprise three essential parts: a vacuum chamber, toroidal field coils, and a transformer. The \emph{vacuum chamber} (or vacuum vessel) has the shape of a torus of the size approximately 1-20 m across; its purpose is to contain the plasma while allowing limited access through diagnostic ports. Around the vacuum chamber are wrapped dozens of \emph{toroidal magnetic field coils}, which generate the confining toroidal magnetic field $B_t$ (0.5-5 T). Finally, the \emph{transformer} creates and heats the plasma by inducing a loop voltage $U_{l}$ (several V) inside the vacuum chamber and then driving a plasma current $I_p$ (kA to MA).

Because of this structure, the duration of tokamak plasma existence is intrinsically limited. The plasma can only exist so long as the plasma current $I_p$ is driven, because the ohmic heating $P_{OH} = U_{l}.I_p$ sustains its high temperature in spite of continuous heat losses. (It also ensures plasma stability, but that is outside the scope of this manual.) And since driving a current in the secondary coil (plasma) requires a monotonically changing current in the primary coil (shown in figure \ref{fig:tokamak}), which cannot be done forever, at some point the primary coil current reaches a maximum and the transformer stops transforming. Presently the plasma current dies out, the plasma cools down, electrons and ions recombine into a neutral gas and the plasma ceases to exist. Therefore, tokamak plasmas are created in so called \emph{discharges}, or \emph{shots} for short. Discharge duration strongly depends on the machine --- on GOLEM it is $<20$ ms, on the largest machines it is $>1$ s.
% The plasma current creates its own, poloidal magnetic field which is smaller than, but comparable to, the external toroidal magnetic field. As a result, the total magnetic field in a tokamak has the shape of slowly winding helices.
%</TokamakPrinciple>




%<*GOLEMParameters>
The GOLEM tokamak is a rather small machine with a low magnetic field and a (relatively to other tokamaks) low plasma temperature. Its major radius (distance from the machine centre to the vessel centre) is $R = 40$\,cm and its minor radius (distance from the plasma vessel centre to the limiter, and therefore the maximum plasma column radius) is $a = 8.5$\,cm. The resulting plasma volume is approximately $V_p=80$ l. Its toroidal magnetic field $B_t$ can rise up to $0.5$\,T and its plasma current $I_{p}$ can reach $8$\,kA. The resulting electron density $n_e$ is of the order of $10^{18}$\,m$^{-3}$\footnote{In the context of tokamaks, density is given in the number of particles per cubic metre (m$^{-3}$).}, while the electron temperature $T_e$ can reach several tens of electronvolts\footnote{In the context of tokamaks, plasma temperature is typically given in electronvolts (eV), which is a unit of energy, not temperature. 1 eV is the energy gained by an electron by traversing a potential fall of 1 V. That may not seem like much, but when the typical kinetic energy of gas particles is 1 eV, the gas temperature is 11 600 K. To make matters more confusing, plasma temperature is sometimes given in eV, sometimes in J, and sometimes in K. The conversion is $T$ [J] = $k_BT$ [K] = $k_BT/e$ [eV], where $k_B$ is the Boltzmann constant and $e$ is the elementary charge. Within this manual, plasma temperature is consistently given in eV.}.
%</GOLEMParameters>


%<*ConfinementTimeTheory>
Confining the energy stored in the plasma is a tokamak's prime duty. The fewer losses are allowed (via radiation, plasma particles escaping the confinement etc.), the better the tokamak. The energy stored in the plasma may be approximated as
\begin{equation}\label{eq:Wp}
W_p = \frac{1}{3}en_eT_eV_p
\end{equation}
where $e$ is the elementary charge [C], $n_e$ is the electron density [m$^{-3}$], $T_e$ is the central electron temperature [eV] and $V_p$ is the plasma volume [m$^3$]. The equation is derived assuming equal shares of energy between ions and electrons, a parabolic profile in electron temperature and only 2 degrees of freedom (a consequence of the magnetic geometry). During a tokamak discharge, this energy is continually lost and the losses must be fully replenished by heating, $P_{heating} \approx P_{loss}$. If the heating is suddenly turned off, the plasma will start losing energy exponentially, $W_{p} = W_{p0} . \mathrm{e}^{-t/\tau_E}$, as illustrated by figure \ref{fig:tauE}. The slower the energy decay is, the better the plasma energy is confined. The confinement quality is therefore characterised by the quantity $\tau_E$, which is called the energy confinement time, or just the confinement time.\footnote{Note that the confinement time tells you nothing about discharge duration! Of course, machines with better plasma confinement are generally able to perform longer discharges, but the actual number of seconds can be very unrelated. Typically $\tau_E$ is orders of magnitude shorter than the discharge duration.} The higher the confinement time is, the better the tokamak.
%</ConfinementTimeTheory>




%<*ConfinementTimeCalculation>
Your ultimate task at GOLEM will be to measure its confinement time $\tau_E$, and to see whether it depends on the toroidal field magnitude $B_t$. (Hint: it should.) The trick to the calculation of $\tau_E$ is that energy is lost from the plasma regardless of whether it is being heated or not. The loss power is always $P_{loss} = W_{p}/\tau_E$. Therefore, in the (quasi)stationary phase of the GOLEM discharge
\begin{equation}\label{eq:powerbalance}
P_{heating} = P_{loss} = W_{p}/\tau_E.
\end{equation}
There is only one source of heating at GOLEM, and that is the ohmic heating $P_{heating} = U_{l}I_p$. Thus, the energy confinement time $\tau_E$ may be calculated by combining equations \eqref{eq:powerbalance} and \eqref{eq:Wp} as
\begin{equation}
\tau_E = \frac{en_eT_eV_p}{3U_{l}I_p}.
\end{equation}
You will measure $U_{l}$, $I_p$ and $B_t$ using your own improvised diagnostics (or, in the case of remote experiment, using standard GOLEM diagnostics). The electron density $n_e$, measured by an interferometer, can be loaded directly from the GOLEM database as \texttt{electron\_density}. The central electron temperature $T_e$ may be calculated in the following fashion.

\begin{figure}[t]
\centering \includegraphics[width=0.6\linewidth]{EnergConfTime/fig.pdf}
	\caption{Time evolution of total plasma energy $W_p$ after heating is turned off, showing the meaning of the energy confinement time $\tau_E$.}
	\label{fig:tauE}
\end{figure}
%</ConfinementTimeCalculation>






%<*ElectronTemperatureMeasurement>
The central electron temperature of a pure hydrogen plasma is given by Spitzer's formula \cite{nrlformulary}:
\begin{equation}
\label{eq:SpitzerTe}
T_{e}=0.9\cdot R_p^{-\frac{2}{3}}
\end{equation}
where $R_p$ [$\Omega$] is the plasma resistivity. Reverting the equation, one finds that the plasma resistivity falls as $T_e$ increases; in contrast, metal resistivity increases with temperature. This is because in metals, increased temperature means stronger vibration of the atomic lattice, which hinders the conducting electrons, while in plasmas increased electron velocity lowers the Coulomb interaction cross-section, decreasing the friction. To calculate the plasma resistivity, one simply uses Ohm's law for the plasma circuit: $U_{l} = R_p I_p$. (This applies only in the stationary phase of the discharge, where inductivity effects can be neglected.)
%</ElectronTemperatureMeasurement>
