\documentclass[10pt,a4paper,twoside]{book}
%\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{wrapfig}
\usepackage{units}
\usepackage[block=ragged,backend=bibtex]{biblatex}
\usepackage[acronym,toc,automake]{glossaries}
\usepackage[hidelinks]{hyperref}
\usepackage[version=4]{mhchem}
\hypersetup{
  breaklinks = true,                                               % Allows break links in lines
  colorlinks = true,                                               % Colours links instead of ugly boxes
  urlcolor   = blue,                                               % Colour for external hyperlinks
  linkcolor  = blue,                                               % Colour of internal links
  citecolor  = blue,                                               % Colour of citations
  pdfinfo    = {
    Title    = {fpakc User Manual},
    Author   = {Jorge Gonzalez}
  }
}
\usepackage[margin=1in]{geometry} % Reduces margins of the document
% Allows breaking of URL in bibliography.
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}

\makeglossaries

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newacronym{fpakc}{fpakc}{Finite element PArticle Code}
\newacronym{mpi}{MPI}{Message Passing Interface}
\newacronym{gpu}{GPU}{Graphics Processing Unit}
\newacronym{cpu}{CPU}{Central Processing Unit}
\newacronym{json}{JSON}{JavaScript Object Notation}
\newacronym{io}{I/O}{input/output}
\newacronym{mcc}{MCC}{Monte-Carlo Collisions}
\newacronym{cs}{CS}{Coulomb Scattering}
\newacronym{vtu}{VTU}{Visualization Toolkit for unstructured grids}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newglossaryentry{openmp}{name={OpenMP},description={Shared-memory parallelization}}
\newglossaryentry{gfortran}{name={GFortran},description={Open-source compiler for fortran source code}}
\newglossaryentry{ifort}{name={ifort},description={Intel\textsuperscript{\textregistered} Fortran compiler}}
\newglossaryentry{opensource}{name={Open Source},description={Source code that is made freely available for possible modification and redistribution}}
\newglossaryentry{openblas}{name={OpenBLAS},description={Open-source implementation of BLAS and LAPACK APIs}}
\newglossaryentry{git}{name={Git},description={Git is a distributed version-control system for tracking changes in a set of files}}
\newglossaryentry{gitlab}{name={GitLab},description={GitLab is a web-based lifecycle tool that provides a \Gls{git}-repository manager}}
\newglossaryentry{gmsh}{name={Gmsh},description={A three-dimensional finite element mesh generator with built-in pre- and post-processing facilities.}}
\newglossaryentry{gnuplot}{name={Gnuplot},description={A portable command-line driven graphing utility for Linux, OS/2, MS Windows, OSX, VMS, and many other platforms.}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliography{bibliography}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
  \title{\includegraphics{figures/logos/fpakc}\\\vspace{2cm}fpakc User Manual}
  \author{Jorge Gonzalez}
  \date{\today\\v0.1}
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
  \maketitle
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \tableofcontents
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \chapter{Introduction}
    \section{About fpakc}
      The \Gls{fpakc} is a simulation tool that models species in plasma (ions, electrons and neutrals) following the trajectories of macro-particles as they move and interact between them and the boundaries of the domain.
      Particles properties are scattered into a finite element mesh in 1, 2 or three dimensions, with the possibility to choose different geometries.
      The official repository can be found at: \url{https://gitlab.com/JorgeGonz/fpakc.git}.
      The code is currently in the very early steps of development and further refinements are expected very soon.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Main Guidelines}
      The \acrshort{fpakc} environment aims to be a fully functional tool for the simulation of plasmas from a kinetic point of view.
      The main guidelines in the creation of the code are:
      \begin{enumerate}
        \item The code is \Gls{opensource} and freely distributed. This means the code can be used and modified by anyone.
               Nevertheless, the official version distributed in the official repository will be managed by the developed team, which members have to be given direct permission by the lead developer.
              \acrshort{fpakc} is distributed with a GNU General Public License v3.0 that covers all files in the repository.
              Moreover, there should always be an open-source free alternative for external tools required by the program (post-processing, mesh generation, input file generation \ldots).
        \item \acrshort{fpakc} is coded in a \textit{understandable} way.
              This means that the code is required to be written in a clear way that is easy to understand and maintain.
              Variables and procedure names need to be self-understanding.
              This eases the process of fixing bugs and improving the codes by a large team of developers.
              For more information, please refer to the \acrshort{fpakc} Coding Style document.
        \item \acrshort{fpakc} requires being ease to use.
              Input files are required to be in a \textit{human} format, meaning that the different options can be easily understood without constant reference to the user guide.
              \acrshort{fpakc} is aimed to be used in a wide range of applications and by various scientists: from well-established ones to newcomers to the field and also students.
      \end{enumerate}
    
      These are foundation stones of \acrshort{fpakc} and its development and should always be followed, at least for the releases in the official repository.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{How to collaborate}
      Right now, development of \acrshort{fpakc} is closed to third parties until a stable version with the basic functionality is released.
      However, if you have a huge interest in the project please contact \href{mailto:jorge.gonzalez@upm.com}{jorge.gonzalez@upm.com}.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \chapter{Operation Scheme}
    \section{The Particle Method}
      \Gls{fpakc} uses macro-particles to simulate the dynamics of different plasma species (mainly ions, electrons and neutrals).
      These macro-particles could represent a large amount of real particles.
      For now own, macro-particles will be referred as just particles by abuse of language.
      During the initiation phase, the input and mesh file(s) are reading.
      If an initial distribution for a species is specified in the input file, particles to match that distribution are loaded into the cells.
      
      The general steps performed in each iteration are:
      \begin{enumerate}
        \item Firstly, new particles are introduced into the domain as specified in the input file.
        \item Particles are then pushed, accounting for possible acceleration by external forces.
              During this process, if a particle changes cell, it is found using the connectivity between elements.
              If a particle encounters a boundary instead a new cell, the interaction between the boundary and the wall are computed.
              A particle may abandon the computational domain and is no longer accounted for.
        \item Next, collisions for the particles inside each cell are carried out.
              This may include different collision processes for each particle.
              Monte-Carlo collisions (elastic, ionization, charge-exchange$\ldots$) can be carried out in a specific mesh, to better adjust to the cell size required, similar to the mean-free path.
              Although not yet implemented, Coulomb scattering will always be performed in the mesh used for scattering, which cell size should be in the order of the Debye length.
        \item A new array containing all particles inside the numerical domain is obtained.
        \item Finally, particle properties are scattered among the mesh nodes.
              These properties are density, momentum and the stress tensor.
        \item If requested, the electromagnetic field is computed.
        \item If the number of iteration requires writing output files, it is done after all steps for the particles are completed.
      \end{enumerate}
    
      \Gls{fpakc} has the capability to configure all the behaviour of the simulation via the input file.
      Parameters as injection, the kind of pusher used for each species, boundary conditions or collisions are user-input parameters and will be described in Chap.~\ref{ch:input_file}.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Injection of new particles}
      \acrshort{fpakc} has the capability of injecting particles at different velocities, temperatures, distributions and mass flows in boundary sections defined by the user.
      Particles are distributed uniformly along the edge.
      Their velocities are computed from the distribution function selected by the user.
    
      The injection of particles is controlled in the \lstinline|moduleInject| module.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Pushing}
      Particles are pushed in the selected domain.
      Velocity and position are updated according to the old particle values and the external forces.
      All the push routines for the different geometries can be found in \lstinline|moduleSolver|.
      The pushers included in \Gls{fpakc} are:
      
      \begin{itemize}
      \item 3D Cartesian pusher.
            Moving particles in a simple 3D Cartesian space.
        
      \item 2D Cylindrical.
            When a 2D cylindrical geometry is used ($z$, $r$), a Boris solver\cite{boris1970relativistic} is used to move particles accounting for the effect of the symmetry axis.
            This pusher removes the issue with particles going to infinite velocity when $r \rightarrow 0$ by pushing the particles in Cartesian space and then converting it to $r-z$ geometry.
            Velocity in the $\theta$ direction is updated for collision processes, although the dynamic in the angular direction is assumed as symmetric.
        
      \item 2D Cartesian pusher.
            Moving particles in a simple 2D Cartesian space.
        
      \item 1D Radial pusher.
            Same implementation as 2D cylindrical pusher but direction $z$ is ignored.

      \item 1D Cartesian pusher.
            Moving particles in a simple 1D Cartesian space. Same implementation as in 2D Cartesian but $y$ direction is ignored.
      
      \end{itemize}
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Find new cell}      
      Once the position and velocity of the particle are updated, the new cell that contains the particle is searched.
      This is done by a neighbour search, starting from the previous cell containing the particle.
      In the process of finding the new cell, a particle might encounter a boundary.
      When the particle interacts with the boundary, the particle may continue its life in the simulation or might be eliminated from it.
      Once that the new cell is found or that the particle life has been terminated, the pushing is complete.
      If a secondary mesh is used for the Monte-Carlo Collision method, the new cell in that mesh in which the particle reside is also found by the same method, although no interaction with the boundaries is accounted for this step.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Variable Weighting Scheme\label{sec:weightingScheme}}
      One of the issues in particle simulations, specially for axial-symmetrical cases, is that due to the disparate volume of cells, specially close to the axis, the statistics in some cells is usually poor.
      To try to fix that, the possibility to include a Variable Weighting Scheme in the simulations is available in \Gls{fpakc}.
      These schemes detect when a particle changes cells and split it if necessary to improve statistics.
      The use of a Variable Weighting Scheme is defined by the user in the input file.
      
      Beware that this can increase the number of particles in the simulation and increase computational time.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Interaction between species}\label{ssec:collisions}
      For each cell, interaction among the particles in it are carried out.
      \Gls{fpakc} distinguish between two types of interactions: \acrfull{mcc} and \acrfull{cs}.
      \acrshort{mcc} refers to the process in which two particles interact in short range.
      These processes include, but are not limited to: elastic collisions, ionization/recombination, charge-exchange, excitation/de-excitation\ldots
      A secondary mesh, with cell sizes in the range of the mean-free path, can be used for this type of collision.
      \acrshort{cs} refers to the large range interaction that a charged species suffer do to the charge of other particles.
      The interactions between the different species is defined by the user.
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{\acrlong{mcc}}
        For each cell, the maximum number of collisions between particle is computed.
        For each collision, a random pair of particles is chosen.
        A loop over all possible collisions for the pair of particles chosen is performed.
        If a random number is above the probability of collision for that specific type, the collision takes place.
        If not, the next type for the particle pair is checked.
              
        Below are described the type of collision process implemented in \acrshort{fpakc}:
        \begin{itemize}
          \item Elastic.
                In this type of collision, particles exchange energy due to hard-sphere model.
                Total energy is conserved.
                Resulting velocity directions are chosen from Maxwellian distribution functions.
                This interaction is useful for short-range collisions as neutral-neutral and charged-neutral elastic collisions.
      
          \item Charge Exchange.
                When an ion interacts with a neutral particle, an electron is exchanged between the two particles with no exchange of energy.
                This is called a resonant charge-exchange.
        
          \item Electron Impact Ionization.
                When the relative energy between a neutral and an electron is above the ionization threshold, there is a probability that the neutral particle will become ionized.
                This ionization emits and additional electron

          \item Recombination.
                When an electron and an ion interact, there is a possibility for them to be recombined into a neutral particle.
                The photons emitted by this process are not modelled yet.
        \end{itemize}
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     \subsection{\acrlong{cs}}
       A simple linearization of the Coulomb operator based on Ref.~\cite{sherlock2008monte} is implemented.
       This method assumes that the species involved in the scattering process have a Maxwellian distribution.
       The method is made to conserve momentum and kinetic energy based on the approach in Ref.~\cite{lemons2009small} for self (same species) and intra (different species) collisions.
       
       The user must specify the charged species that will interact together.
       The Coulomb logarithm involved in these processes is currently set to a fix value of $10$.
       
       This method is not valid for situations in which the distribution functions are far from Maxwellian.
        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Reset of particle array}
      Once that the pushing is complete, the array of particles that remain inside the domain is copied to a new array.
      The new array containing only the particles inside the domain will be the one used in the next steps.
      In this section, particles are assigned to the list of particles inside each individual cell.
      Unfortunately, this is done right now without parallelization and is very CPU consuming.
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Probing}\label{sec:probing}
      As default, \gls{fpakc} outputs information of macroscopic quantities (density, velocity, temperature\ldots) in the finite element mesh.
      However, a lot of information can be extracted from the particle distribution function.
      Thus, a probing method is provided to extract the distribution function in a specific position.
      
      The particles inside a cell in which the input position is located are distributed into a 3D velocity grid.
      The user can decide the grid width and the number of points in each direction.
      The distribution function will be calculated and wrote with a time step decided by the user.
      
      If a particle velocity resides outside the velocity grid (in any direction), it will not be added to the tally of the distribution function.
      Due to the limitation of only considering particles in the cell, and not neighbour particles, two probes for the same species at different positions but in the same cell will output the same results.
      A more advance method considering distance between the particles and the probe position as well as particles in neighbour cells could be implemented to improve the statistics of the distribution function.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Scattering}
      The properties of each particle are deposited in the nodes from the containing cell.
      This process depends on the cell type, but in general, each node receives a proportional part of the particle properties as a function of the particle position inside the cell.
      The figure \ref{fig:scatteringQuad} shows how a particle at a generic position $p(x_1, x_2)$ inside the cell is scattered to the four nodes.
      \begin{wrapfigure}{l}{0.4\textwidth}
        \centering
        \includegraphics{figures/scatteringQuad}
        \caption{\label{fig:scatteringQuad}Example of how a particle is weighted in a quadrilateral cell.}
      \end{wrapfigure}
      Each node receives a proportional part of the area formed by dividing the cell in for rectangles, using as an additional vertex the particle position.
      These properties are dimensionless, but they are converted to the correct units once the output is printed.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Electromagnetic field}
      WIP.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Average scheme}
      Particle-in-cell codes have an intrinsic statistical noise associated with them.
      Although this can be reduced by increasing the number of particles, this also increases the CPU requirements of the case.
      
      It is quite common that most cases reach a quasi-steady state after a number of iterations and time-average results can be obtained after to improve analysis, plotting and restarting the case using these time-average results as new species backgrounds.
      Although this is possible to do once the simulation is finished with post-processing tools, this is limited to the number of iterations printed.
      
      \Gls{fpakc} implements a simple average scheme that, after a start time provided by the user, scores a mean and standard deviation of all the main species properties, and the electromagnetic field.
      This scheme is based on the Welford's online algorithm~\cite{welford1962note}.
      The averaged data is written in the same format as the input mesh at the end of the simulation.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
  \chapter{Installation}
    \section{Required Packages}
      To properly compile \gls{fpakc}, the following packages are required.
      \subsection{Gfortran}
        The \Gls{opensource} free compiler \Gls{gfortran}\cite{gfortranURL} from GCC is the basic way to compile \acrshort{fpakc}.
        It is distributed with all GNU/Linux distributions.
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{Ifort}
        The \Gls{ifort}\cite{ifortURL} compiler is a proprietary Fortran compiler developed by Intel\textsuperscript{\textregistered}.
        The makefile distributed with \Gls{fpakc} is prepared to be used with ifort with minor modifications.
        However, \Gls{gfortran} is recommended for compiling fpakc.
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{OpenBlas}
        \Gls{openblas}\cite{openblasURL} is used by \acrshort{fpakc} to solve the electromagnetic field in the finite element mesh.
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{JSON-Fortran}
        To read \acrshort{json}\cite{jsonURL} input files in Fortran, the API JSON-Fortran\cite{jsonfortranURL} is used.
        This needs to be compiled and placed in a folder accessible from the root directory of \Gls{fpakc}.
        The same compiler as the one used to compile \Gls{fpakc} needs to be used to generate a compatible library.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{Gmsh}
        Although \Gls{gmsh}\cite{gmshURL} is not required to compile and run \Gls{fpakc}, it is the default tool to generate finite element meshes and post-processing.
        Right now, the only \acrshort{io} format available in \Gls{fpakc} is the v2.0 \lstinline|.msh| format.
        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Installation steps}
      Once you have been added to the \Gls{fpakc} \Gls{gitlab} repository, and have added an ssh key to your account, you will be able to clone the repository using:
      \begin{lstlisting}
git clone git@gitlab.com:<YourGitLabUsername>/fpakc.git
      \end{lstlisting}
      in which you have to substitute \lstinline|<YourGitLabUsername>| for your \Gls{gitlab} username.
      
      Go into the new downloaded directory with
      \begin{lstlisting}
cd fpakc
      \end{lstlisting}
      Clone the json-fortran repository with:
      \begin{lstlisting}
git clone https://github.com/jacobwilliams/json-fortran.git
      \end{lstlisting}
      This will create the  \lstinline|json-fortran-8.2.0| directory.
      Go into this new folder and create a new \lstinline|build-gfortran| directory, enter it and execute:
      \begin{lstlisting}
cmake ../
      \end{lstlisting}
      Once it finish, just compile the json-fortran library with
      \begin{lstlisting}
make
      \end{lstlisting}
      This creates the \lstinline|include| and \lstinline|lib| folders that contain the required files for \acrshort{fpakc} compilation.
      
      Go back to the \acrshort{fpakc} root folder and execute
      \begin{lstlisting}
make
      \end{lstlisting}
      to compile the code.
      If everything is correct, an executable named \textit{fpakc} will be generated.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Running the code}
      To run a case, simply execute:
      \begin{lstlisting}
./fpakc path/to/input-file.json
      \end{lstlisting}
      in a command line from the root \acrshort{fpakc} folder.
      Substitute \lstinline|path/to/input-file.json| with the path to the input file of the case you want to run.
      The examples in the run directory are presented in Chapter \ref{ch:exampleRuns}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \chapter{Input File}\label{ch:input_file}
    The input files for \Gls{fpakc} is divided between to files: a mesh file and a case file.
    The mesh file contains the descriptions for the different elements composing a mesh (nodes, edges and volumes).
    The case file contains the required information to define a simulation case: reference parameters, initial state, injection of particles, boundary conditions, species, number of iterations\ldots
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Mesh file}
      \Gls{fpakc} accepts right now the version 2.0 of \Gls{gmsh} mesh format \lstinline|.msh| in ASCII format.
      This file contains information about the nodes, edges and volumes that define the finite element mesh used by \Gls{fpakc} to scatter particle properties and compute the self-consistent electromagnetic field.
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Case file}
      The required format for the case file is \Gls{json}.
      \Gls{json} is a case-sensitive format, so input must be written with the correct capitalization.
      The basic structure and options available for the case file are explained below.
      The order of the objects and variables is irrelevant, but the structure needs to be maintained.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{output}
        The object \textbf{output} in the \Gls{json} case file determines the different options to define how and when the simulation produces files:
        The available options are:
        \begin{itemize}
          \item \textbf{path}: Character.
                               Path for the output files. This path is also used to locate the mesh input file.
          \item \textbf{folder}: Character.
                                 Base name of the folder in which output files are placed.
                                 The date and time is appended to this name.
                                 If none is provided, only the date and time is written as the folder name.
          \item \textbf{triggerOutput}: Integer.
                                        Determines the number of iterations between writing output files for macroscopic quantities.
          \item \textbf{cpuTime}: Logical. 
                                  Determines if the \Gls{cpu} time per iteration is written into a file.
                                  Each row in the file determine the iteration, number of particles in the simulation and the multiple times spend per action.
                                  Each action in the iteration (pushing, collisions, weighting\ldots) has its own column.
          \item \textbf{triggerCPUTime}: Integer.
                                          Determines the number of iterations between writing \Gls{cpu} time for macroscopic quantities.
                                          This option is irrelevant if \textbf{cpuTime} is set to \textit{false}.
          \item \textbf{numColl}: Logical.
                                  Determines if the number of collisions per cell are outputted in a separated file.
                                  Trigger between writings is the same as in \textbf{triggerOutput}.
          \item \textbf{EMField}: Logical.
                                  Determines if the electromagnetic field is printed.
          \item \textbf{probes}: Array of objects.
                                 Defines the probes employed for obtaining the distribution function at specific positions.
                                 See Sec.~\ref{sec:probing} for more information.
                                 The object is structured as follows:
                                 \begin{itemize}
                                   \item \textbf{species}: Character.
                                                           Species name as defined in \textbf{species} array.
                                   \item \textbf{position}: Real.
                                                            Array of dimension $3$.
                                                            Units in $\unit{m}$.
                                                            Indicates the position of the probing.
                                   \item \textbf{timeStep}: Real
                                                            Units in $\unit{s}$.
                                                            Optional.
                                                            Time step for output of the distribution function.
                                                            If none is provided, the minimum time step of the case is used.
                                   \item \textbf{velocity\_1, velocity\_2, velocity\_3}: Real.
                                                                                         Array of dimension $2$.
                                                                                         Velocity range (minimum-maximum) in which the distribution function will be interpolated.
                                                                                         The subscripts 1, 2, 3 indicate the three directions of the case.
                                   \item \textbf{points}: Integer.
                                                          Array of dimension $3$.
                                                          Number of points in each direction.
                                 \end{itemize}
        \end{itemize}
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{geometry}
        The object \textbf{geometry} contains information about the type of geometry, the mesh file format and the mesh filename.
        The accepted parameters are:
        \begin{itemize}
          \item \textbf{dimension}: Integer.
                                    Number of spatial dimensions of the geometry.
                                    Current values are: $0$, $1$, $2$ or $3$.
                                    Zero dimension is a fictitious volume.
                                    Geometry used mostly to test collisional effects.
                                    No boundary or EM field is solved.
                                    No injection can be implemented.
                                    Initial state must be read from file.
                                    No mesh file is required.
                                    The optional argument \textbf{geometry.volume} can be used to set a value for the fictitious volume.
                                    Otherwise, the volume is set to 1 in non-dimensional units.
          \item \textbf{type}: Character.
                               Type of geometry.
                               Current accepted vaules are
                               \begin{itemize}
                                 \item \textbf{Cart}: Cartesian coordinates.
                                                      Available for \textbf{geometry.dimension} $1$, $2$ and $3$.
                                                      The coordinates $x$, $y$ and $z$ correspond to $x$, $y$ and $z$ respectively.
                                 \item \textbf{Cyl}:  Cylindrical coordinates ($z \hyphen r$) with symmetry axis at $r = 0$.
                                                      Only available for \textbf{geometry.dimension} $2$.
                                                      The coordinates $x$ and $y$ correspond to  $z$ and $r$ respectively.
                                 \item \textbf{Rad}:  One-dimensional radial space ($r$).
                                                      Only available for \textbf{geometry.dimension} $1$.
                                                      The coordinates $x$ corresponds to $r$.
                               \end{itemize}
          \item \textbf{meshType}: Character.
                                   Format of mesh file.
                                   The output will be written in the same format as specified here.
                                   Accepted formats are:
                                   \begin{itemize}
                                     \item \textbf{gmsh2}: \Gls{gmsh} file format in version 2.0. This has to be in ASCII format.
                                     \item \textbf{vtu}: \Gls{vtu} file format. This has to be in ASCII format.
                                     \item \textbf{text}: Plain text file format only intended for 1D cases.
                                                          This has to be in ASCII format and comma separated.
                                                          The first column represents the position and the second column the physical ID of the node.
                                                          Values have to be $1$ (left boundary), $2$ (right boundary), or $0$ (no boundary.)
                                   \end{itemize}
          \item \textbf{meshFile}: Character.
                                   Mesh filename.
                                   This file is searched in the path \textbf{output.path} and must contain the file extension.
          \item \textbf{volume}:   Real.
                                   Units of $\unit{m^{-3}}$.
                                   Used to set a fictitious volume for the $0$ dimension.
                                   Ignored in the other cases.
        \end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{species}
        The array object \textbf{species} contains the data relevant to identify the different species in the simulation.
        Multiple species can be defined as elements in the array.
        For each species, the following parameters need to be defined:
        \begin{itemize}
          \item \textbf{name}: Character.
                               Name of the species.
          \item \textbf{type}: Character.
                               Defines the type of species.
                               Current values are:
                               \begin{itemize}
                                 \item \textbf{neutral}: Neutral species.
                                 \item \textbf{charged}: Charged species.
                                                         The parameter \textbf{charge} is required for this type of species.
                               \end{itemize}
          \item \textbf{mass}: Real.
                               Particle mass in $\unit{kg}$.
          \item \textbf{charge}: Real. 
                                 Particle charge in elementary charge units.
                                 This parameter is only relevant if \textbf{type} is \textbf{charged}.
          \item \textbf{ion}: Character.
                              Name of species resulting of ionizing the current one.
          \item \textbf{neutral}: Character.
                                  Name of species resulting of neutralizing the current one.
        \end{itemize}
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{boundaries}
        The object \textbf{boundaries} has two main arrays that define the particle boundaries and the ones that must be applied to the electromagnetic field.
        \begin{itemize}
        \item \textbf{particles}. Array of objects.
          Different models for interaction between particles and edges.
          \begin{itemize}
            \item \textbf{name}: Character.
              Name of the boundary.
            \item \textbf{type}: Character.
              Model for the interaction between particles and the edge.
              Available options are:
              \begin{itemize}
                \item \textbf{reflection}: Elastic reflection of particles.
                \item \textbf{absorption}: Particle is eliminated from the domain.
                  The particle is first moved into the edge and its properties are scattered among the edge nodes.
                \item \textbf{transparent}: Particle abandon the numerical domain.                  
                \item \textbf{axis}: Identifies the symmetry axis for 2D cylindrical simulations.
                  If , for some reason, a particle interacts with this axis, it is reflected.
                \item \textbf{wallTemperature}: Reflective wall with constant temperature that exchange heat with particles.
                Required parameters are:
                
                \textbf{temperature}: Real.
                  Units of $\unit{K}$.
                  Temperature wall.
                  
                \textbf{specificHeat}: Real.
                   Units of $\unit{J kg^{-1} K^{-1}}$.
                   Specific heat capacity of the material.
                   
                \item \textbf{ionization}: Per each particle crossing the surface with this type of boundary, a number of ionization events are calculated.
                  A pair of ion-electron is generated for each ionization event, taking as a reference a neutral background.
                  The available input is:
                  
                  \textbf{neutral}: Object.
                    Information about the neutral background.
                    Required parameters are:
                    \begin{itemize}
                      \item \textbf{ion}: Character.
                        Species name of the ion generated as defined in object \textbf{species}.
                        Required parameter.
                      \item \textbf{mass}: Real.
                        Units in $\unit{kg}$.
                        Mass of neutral species.
                        If missing, the mass of the ion is used
                      \item \textbf{density}: Real.
                        Units in $\unit{m^{-3}}$.
                        Density of neutral background.
                        Required parameter.
                      \item \textbf{velocity}: Real.
                        Units in $\unit{m s^{-1}}$.
                        Array of dimension $3$.
                        Mean velocity of neutral background.
                        Required parameter.
                      \item \textbf{temperature}: Real.
                        Units in $\unit{K}$.
                        Temperature of neutral background.
                        Required parameter.                        
                    \end{itemize}
                    
                  \textbf{effectiveTime}: Real.
                    Units in $\unit{s}$.
                    As the particle is no longer simulated once it crossed the boundary, this time represents the effective time in which the particle produces ionization processes in the neutral background.
                    Required parameter.
                    
                  \textbf{energyThreashold}: Real.
                    Units in $\unit{eV}$.
                    Ionization energy threshold for the simulated process.
                    Required parameter.
                    
                  \textbf{electronSecondary}. Character.
                    Name of the species for the secondary electrons produced.
                    I none is provided, the input species is used.
                    
                  \textbf{crossSection}: Character.
                    Complete path to the cross-section data for the ionization process.
            \end{itemize}
          \end{itemize}
        \item \textbf{EM}. Array of objects.determines the boundary conditions for the electromagnetic field.
          As with the \textbf{boundary} definition, these must be linked to an edge identified in the mesh file.
          The variables for each array element are:
          \begin{itemize}
            \item \textbf{name}: Character.
                                 Name of the boundary.
            \item \textbf{type}: Character.
              Type of boundary.
              Accepted values are:
              \begin{itemize}
                \item \textbf{dirichlet}: Constant value of electric potential on the surface.
                
                  \textbf{potential}: Real.
                  Fixed potential for Dirichlet boundary condition.
                  
                \item \textbf{dirichletTime}: Constant value of the electric potential with a time variable profile.
                   The value of \textbf{boundaryEM.potential} will be multiplied for the corresponding value in the file \textbf{boundaryEM.temporalProfile}.
                                   
                   \textbf{potential}: Real.
                   Fixed potential for Dirichlet boundary condition.
                   
                   \textbf{temporalProfile}: Character.
                     Filename of the 2 column file containing the time variable profile.
                     File must be located in \textbf{output.path}.
                     The first column is the time in $\unit{s}$.
                     The second column is the factor that will multiply the value of the boundary.
                     
              \end{itemize}
          
          \end{itemize}
          
        \end{itemize}
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{inject}
        The array \textbf{inject} specifies the injection of particles from different surfaces.
        The injection of particles needs to be associated to a physicalSurface in the mesh file.
        Multiple injections can be associated to the same surface.
        \begin{itemize}
          \item \textbf{name}: Character.
                               Name of the injection.
          \item \textbf{species}: Character.
                                  Name of the species that is being injected.
          \item \textbf{flow}: Real.
                               Flow of particles going through the surface.
          \item \textbf{units}: Character.
                                Units for the \textbf{flow} parameter.
                                Available values are:
                                \begin{itemize}
                                  \item \textbf{A}: Ampere.
                                  \item \textbf{Am2}: Ampere per square meter.
                                                      This value will be multiplied by the area of injection.
                                  \item \textbf{sccm}: Standard cubic centimetre.
                                  \item \textbf{part/s}: Particles (real) per second.
                                \end{itemize}
          \item \textbf{v}: Real.
                            Units of $\unit{m s^{-1}}$.
                            Module of velocity vector.
          \item \textbf{n}: Real.
                            Array dimension $3$.
                            Direction of injection.
                            If no value is provided, the normal of the edge is used as the direction of injection.
                            This vector is normalized to $1$ by the code.
          \item \textbf{velDist}: Character.
                                  Array dimension $3$.
                                  Type of distribution function used to obtain injected particle velocity:
                                  \begin{itemize}
                                    \item \textbf{Maxwellian}: Maxwellian distribution of temperature \textbf{T} and mean \textbf{v} times the value of \textbf{n} in the specified direction.
                                    \item \textbf{Half-Maxwellian}: Half-Maxwellian distribution of temperature \textbf{T} and mean \textbf{v} times the value of \textbf{n} in the specified direction.
                                                                    Only considers the positive part of the half-Maxwellian.
                                    \item \textbf{Delta}: Dirac's delta distribution function. All particles are injected with velocity \textbf{v} times the value of \textbf{n} in the specified direction.
                                  \end{itemize}
          \item \textbf{T}: Real.
                            Units of $\unit{K}$
                            Array dimension $3$.
                            Temperature in each direction.
          \item \textbf{physicalSurface}: Integer.
                                          Identification of the edge in the mesh file.
          \item \textbf{particlesPerEdge}: Integer.
                                           Optional.
                                           Number of particles to be injected by each edge in the numerical domain.
                                           The weight of the particles for each edge will modified by the surface of the edge to ensure the right flux is injected.
                                           If no value is provided, the number of particles to inject per edge will be calculated with the species weight and the surface of the edge respect to the total one.
        \end{itemize}        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{reference}
        This object indicates the reference values used by \Gls{fpakc} to scale the problem variables.
        The required parameters are:
        \begin{itemize}
          \item \textbf{density}: Real.
                                  Reference density in $\unit{m^-3}$.
          \item \textbf{mass}: Real.
                               Reference particle mass in $\unit{kg}$.
          \item \textbf{temperature}: Real.
                                      Reference temperature in $\unit{K}$.
          \item \textbf{radius}: Real.
                                 Reference atomic radius in $\unit{m}$.
          \item \textbf{crossSection}: Real.
                                       Reference cross-section in $\unit{m^2}$.
                                       If this value is present, radius is ignored.
        \end{itemize}
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{solver}
        This object determines the input parameters for the solvers used in the case, both for particle pushers and electromagnetic field.
        Accepted variables are:
        \begin{itemize}
          \item \textbf{tau}: Real.
                              Units of $\unit{s}$.
                              Array dimension 'number of species'.
                              Defines the different time steps for each species.
                              Even if all time steps are equal, they need to be defined as an array.
          \item \textbf{finalTime}: Real.
                                    Units of $\unit{s}$.
                                    Final simulation time.
          \item \textbf{initialTime}: Real.
                                      Units of $\unit{s}$.
                                      Initial simulation time.
                                      If no value is provided, the initial time is set to $\unit[0.0]{s}$.
          \item \textbf{pusher}: Character.
                                 Array dimension 'number of species'.
                                 Indicates the type of pusher used for each species:
                                 \begin{itemize}
                                   \item \textbf{Neutral}: Pushes a particle without any external force.
                                   \item \textbf{Electrostatic}: Pushes a particle, including the effect of the electrostatic field.
                                   \item \textbf{Electromagnetic}: Pushes a particle, accounting for the electromagnetic field.
                                 \end{itemize}
          \item \textbf{WeightingScheme}: Character.
                                          Indicates the variable weighting scheme to be used in the simulation.
                                          Check Section \ref{sec:weightingScheme} for more information.
                                          If this variable is not present, no scheme is used.
                                          The current available schemes are:
                                          \begin{itemize}
                                            \item \textbf{Volume}: Modifies particle weight as a function of cell volume.
                                          \end{itemize}
          \item \textbf{EMSolver}: Character.
                                   Determines the solver for the electromagnetic field.
                                   If no value is supplied, no field is solved.
                                   \begin{itemize}
                                      \item \textbf{Electrostatic}: Solves the Poison equation to obtain the self-consistent electrostatic potential.
                                      \item \textbf{ConstantB}: Assumes a constant magnetic field in all the domain.
                                                                It solves the Poisson equation as in the \textbf{solver.EMSolver} option.
                                   \end{itemize}
          \item \textbf{B}: Real.
                            Units of $\unit{T}$.
                            Array of dimension $3$.
                            Provides the value of constant magnetic field for the option \textbf{solver.EMSolver} \textbf{ConstantB}.
          \item \textbf{initial}: Array of objects.
                                  Determines initial values for the species.
                                  Required values are:
                                  \begin{itemize}
                                    \item \textbf{species}: Character.
                                                            Name of species as defined in the object \textbf{species}.
                                    \item \textbf{file}: Character.
                                                         Output file from previous run used as an initial state for the species.
                                                         The file format must be the same as in \textbf{geometry.meshType}
                                                         Initial particles are assumed to have a Maxwellian distribution.
                                                         File must be located in \textbf{output.path}.
                                    \item \textbf{particlesPerCell}: Integer.
                                                                     Optional.
                                                                     Initial number of particles per cell.
                                                                     If not, the number of particles per cell will be assigned based on the species weight and the cell volume.
                                  \end{itemize}
        \end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{average}
        This object determines the use of an average scheme.
        If this object exists in the input file, average will be written at the end of the simulation.
        Acceptable values are:
        \begin{itemize}
          \item \textbf{startTime}: Real.
                                    Units in $\unit{s}$.
                                    Simulation physical time in which average scheme will start to compute the mean and standard validation.
                                    If no value is provided, the initial time is set to $\unit[0.0]{s}$.
        \end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{interactions}\label{ssec:input_interactions}
        This object determines the different interactions among species.
        Acceptable values are:
        \begin{itemize}
          \item \textbf{folderCollisions}: Character.
                                           Indicates the path to in which the cross-section tables are allocated.
          \item \textbf{meshCollisions}: Character.
                                         Determines a specific mesh for \acrshort{mcc} processes.
                                         The file needs to be located in the folder \textbf{output.folder}.
                                         If this value is not present, the mesh defined in \textbf{geometry.meshFile} is used for \acrshort{mcc}.
                                         The format of this mesh needs to be the same as the one defined in \textbf{geometry.meshType}.
          \item \textbf{timeStep}: Real.
                                   Units of $\unit{s}$.
                                   Time step to calculate MCC.
                                   If no time is provided, the minimum time step is used.
          \item \textbf{collisions}: Array of objects.
                                     Contains the different short range interactions (\acrshort{mcc}).
                                     Multiple collision types can be defined for each pair of species.
                                     Each object in the array is defined by:
                                     \begin{itemize}
                                       \item \textbf{species\_i}, \textbf{species\_j}: Character.
                                                                                       Define the two species involved in the collision processes.
                                                                                       Order is indiferent.
                                       \item \textbf{cTypes}: Array of objects.
                                                              Defines all the collisions between \textbf{species\_i} and \textbf{species\_j}.
                                                              Required values are:
                                                              \begin{itemize}
                                                                \item \textbf{type}: Character.
                                                                                     Collision type.
                                                                                     Accepted values are \textbf{elastic}, \textbf{chargeExchange}, \textbf{ionization} and \textbf{recombination}.
                                                                                     Please refer to Sec.~\ref{ssec:collisions} for a description of the different collision types.
                                                                \item \textbf{crossSection}: Character.
                                                                                             File in \textbf{interactions.folderCollisions} that contains the cross-section data as a 1D table of relative energy (in $\unit{eV}$) and cross-section (in $\unit{m^-2}$).
                                                                \item \textbf{energyThreshold}: Real.
                                                                                                Energy threshold of the collisional process in $\unit{eV}$.
                                                                                                Only valid for \textbf{ionization} and \textbf{recombination} processes.
                                                                \item \textbf{electron}: Character.
                                                                                         Name of species designed as electrons.
                                                                                         Only valid for \textbf{ionization} and \textbf{recombination} processes.
                                                                \item \textbf{electronSecondary}: Character.
                                                                                                  Optional.
                                                                                                  Name of species designed as secondary electrons.
                                                                                                  If none provided, \textbf{electron} is used.
                                                                                                  Only valid for \textbf{ionization}.
                                                              \end{itemize}
                                     \end{itemize}
          \item \textbf{Coulomb}: Array of objects.
                                  Contains the information about which species must use the Coulomb linear scattering.
                                  This method assumes a Maxwellian distribution for all species involved.
                                  Each object in the array is defined by:
                                  \begin{itemize}
                                    \item \textbf{species\_i}, \textbf{species\_j}: Character.
                                                                                    Define the two species involved in the collision processes.
                                                                                    Order is indifferent.
                                  
                                  \end{itemize}
        \end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \subsection{parallel}
        This object contains the information related to parallelization of \Gls{fpakc}.
        Current values accepted are:
        \begin{itemize}
          \item \textbf{OpenMP}: Object.
                                 Defines the parameters for the \Gls{openmp} shared memory parallelization.
                                 \begin{itemize}
                                    \item \textbf{nThreads}: Integer.
                                                             Number of threads to be used by \Gls{openmp}.
                                                             Try to match this to the number of threads of the \acrshort{cpu} used.
                                 \end{itemize}
                                 
        \end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \chapter{Example runs}\label{ch:exampleRuns}
    This chapter presents a description of the different example files distributed with \acrshort{fpakc}.
    All examples in the repository have a \lstinline|README.txt| file and a reference output.
    Plotting of the output is done with \Gls{gnuplot} or \Gls{gmsh}.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{1D Emissive Cathode (1D\_Cathode)}
      Emission from a 1D cathode in both, Cartesian and radial coordinates.
      Both cases insert the same number of electrons from the minimum coordinate and have the same boundary conditions for particles and the electrostatic field.
      This case is useful to illustrate how \acrshort{fpakc} can deal with different geometries by just modifying some parameters in the input file.
      The same mesh file (\lstinline|mesh.msh|) is used for both cases.
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{0D \ce{Ar}-\ce{Ar+} Elastic Collision (0D\_Argon)}
      Test case to check the 0D geometry that includes the elastic collision between \ce{Ar} and \ce{Ar+}.
      Initial states are read from the \lstinline|Argon_Initial.dat| and \lstinline|Argon+_Initial.dat|.
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{ALPHIE Grid system (ALPHIE\_Grid)}
      Two-dimensional axial-symmetry case to study the counterflow of electrons and Argon ions going through the ALPHIE grid system.
      A \lstinline|mesh.geo| file is provided to easily modify the parameters of the grid system and generate a new mesh with \Gls{gmsh}.
      
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \section{Flow around cylinder (cylFlow)}
      Simple case of neutral Argon flow around a cylinder in a 2D axial-symmetry geometry.
      Elastic collisions between argon particles are included.
      Two cases are presented here: one in which the same mesh (\lstinline|meshSingle.msh|) for scattering and collisions is used (\lstinline|input.json|) and a second one (\lstinline|inputDualMesh.json|) in which a mesh is used for scattering (\lstinline|mesh.msh|) and a second one is used only for collisions (\lstinline|meshColl.msh|).
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \printglossaries

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \printbibliography

\end{document}
