diff --git a/README.md b/README.md index 88cfbef..149ac51 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,36 @@ The codefpakc makes use of finite elements to generate meshes in complex geometr # User Manual -You will find the user manual in the *doc* folder. +You will find the user manual in the *doc/user-manual/* folder. It contains information about the installation of fpkac, how to run the software, the example cases distributed with the code and how the code operates. # Installation -To install the software ... +Once you have been added to the fpakc gitlab repository, and have added an ssh key to your account, you will be able to clone the repository using: +``` +git clone git@gitlab.com:/fpakc.git +``` +in which you have to substitute `` for your gitlab username. + +Go into the new downloaded directory with +``` +cd fpakc +``` +Clone the json-fortran repository with: +``` +git clone https://github.com/jacobwilliams/json-fortran.git +``` +This will create the `json-fortran-8.2.0` directory. Go into this new folder and create a new `build-gfortran` directory, enter it and execute: +``` +cmake ../ +``` +Once it finish, just compile the json-fortran library with +``` +make +``` +This creates the `include` and `lib` folders that contain the required files for fpakc compilation. + +Go back to the fpakc root folder and execute +``` +make +``` +to compile the code. If everything is correct, an executable named `fpakc` will be generated. diff --git a/doc/user-manual/fpakc_UserManual.pdf b/doc/user-manual/fpakc_UserManual.pdf index ad23cd1..0e70306 100644 Binary files a/doc/user-manual/fpakc_UserManual.pdf and b/doc/user-manual/fpakc_UserManual.pdf differ diff --git a/doc/user-manual/fpakc_UserManual.tex b/doc/user-manual/fpakc_UserManual.tex index 24407d8..ac366ed 100644 --- a/doc/user-manual/fpakc_UserManual.tex +++ b/doc/user-manual/fpakc_UserManual.tex @@ -175,15 +175,25 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Elastic collision} + 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. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{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. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - \subsection{Ionization} + \subsection{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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Recombination} + When an electron and an ion interact, there is a possibility for them to be recombined into a neutral particle. + The photon emitted by this process is not modeled yet. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Scattering} @@ -269,9 +279,10 @@ make \section{Running the code} To run a case, simply execute: \begin{lstlisting} -./fpakc path-to-input-file.json +./fpakc path/to/input-file.json \end{lstlisting} - in a command line. + 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}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -578,12 +589,20 @@ make %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Example runs\label{ch:exampleRuns}} \section{1D Cathode} + Emission from a 1D cathond in both, cartesian and radial coordinates. + Both cases insert the same amount of electrons from the minimum coordinate and have the same boundary conditions for particles and the electrostatic field. + This case is useful to ilustrate hoy \acrshort{fpakc} can deal with different geometries by just modifiying some parameters in the input file. + The same mesh file (\lstinline|mesh.msh|) is used for both cases. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{ALPHIE Grid system} + Two-dimensional axialsymmetry case to study the counterflow of electrons and Argon ions going trhough 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} + Simple case of neutral Argon flow around a cylinder in a 2D axialsymmetry geometry. + Elastic collisions between argon particles are included as default. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \printglossaries diff --git a/runs/1D_Cathode/inputCart.json b/runs/1D_Cathode/inputCart.json index 7672b41..95c5e52 100644 --- a/runs/1D_Cathode/inputCart.json +++ b/runs/1D_Cathode/inputCart.json @@ -30,11 +30,11 @@ ], "boundaryEM": [ {"name": "Cathode", "type": "dirichlet", "potential": -10.0, "physicalSurface": 1}, - {"name": "Infinit", "type": "dirichlet", "potential": 0.0, "physicalSurface": 2} + {"name": "Infinite", "type": "dirichlet", "potential": 0.0, "physicalSurface": 2} ], "inject": [ {"name": "Cathode Electron", "species": "Electron", "flow": 9.0e-5, "units": "A", "v": 27500.0, "T": [2500.0, 2500.0, 2500.0], - "velDist": ["Maxwellian", "Maxwellian", "Maxwellian"], "n": [ 1, 0, 0], "physicalSurface": 1} + "velDist": ["Maxwellian", "Maxwellian", "Maxwellian"], "n": [ 1, 0, 0], "physicalSurface": 1} ], "case": { "tau": [1.0e-11], diff --git a/runs/1D_Cathode/inputRad.json b/runs/1D_Cathode/inputRad.json index f83baf1..95b53a9 100644 --- a/runs/1D_Cathode/inputRad.json +++ b/runs/1D_Cathode/inputRad.json @@ -22,7 +22,7 @@ ], "boundary": [ {"name": "Cathode", "physicalSurface": 1, "bTypes": [ - {"type": "absorption"} + {"type": "absorption"} ]}, {"name": "Infinite", "physicalSurface": 2, "bTypes": [ {"type": "transparent"} diff --git a/runs/ALPHIE_Grid/mesh.geo b/runs/ALPHIE_Grid/mesh.geo new file mode 100644 index 0000000..87caea7 --- /dev/null +++ b/runs/ALPHIE_Grid/mesh.geo @@ -0,0 +1,114 @@ +Lz = 0.0100; +Lr = 0.0006; +zg1 = 0.0025; +tg1 = 0.0004; +rg1 = 0.0005; +dg = 0.0025; +zg2 = zg1+tg1+dg; +tg2 = tg1; +rg2 = rg1; + +Lcell = 0.0001; + +Point(1) = { 0, 0, 0, 1}; +Point(2) = { zg1, 0, 0, 1}; +Point(3) = {zg1+tg1, 0, 0, 1}; +Point(4) = { zg2, 0, 0, 1}; +Point(5) = {zg2+tg2, 0, 0, 1}; +Point(6) = { Lz, 0, 0, 1}; +Point(7) = { Lz, rg2, 0, 1}; +Point(8) = { Lz, Lr, 0, 1}; +Point(9) = {zg2+tg2, Lr, 0, 1}; +Point(10) = {zg2+tg2, rg2, 0, 1}; +Point(11) = { zg2, rg2, 0, 1}; +Point(12) = { zg2, Lr, 0, 1}; +Point(13) = {zg1+tg1, Lr, 0, 1}; +Point(14) = {zg1+tg1, rg1, 0, 1}; +Point(15) = { zg1, rg1, 0, 1}; +Point(16) = { zg1, Lr, 0, 1}; +Point(17) = { 0, Lr, 0, 1}; +Point(18) = { 0, rg1, 0, 1}; + +Line(1) = {1, 2}; +Line(2) = {2, 3}; +Line(3) = {3, 4}; +Line(4) = {4, 5}; +Line(5) = {5, 6}; +Line(6) = {6, 7}; +Line(7) = {7, 8}; +Line(8) = {8, 9}; +Line(9) = {9, 10}; +Line(10) = {10, 11}; +Line(11) = {11, 12}; +Line(12) = {12, 13}; +Line(13) = {13, 14}; +Line(14) = {14, 15}; +Line(15) = {15, 16}; +Line(16) = {16, 17}; +Line(17) = {17, 18}; +Line(18) = {18, 1}; +Line(19) = {2, 15}; +Line(20) = {3, 14}; +Line(21) = {4, 11}; +Line(22) = {5, 10}; +Line(23) = {10, 7}; +Line(24) = {14, 11}; +Line(25) = {18, 15}; + +Line Loop(1) = {1, 19, -25, 18}; +Plane Surface(1) = {1}; +Line Loop(2) = {2, 20, 14,-19}; +Plane Surface(2) = {2}; +Line Loop(3) = {3, 21, -24,-20}; +Plane Surface(3) = {3}; +Line Loop(4) = {4, 22, 10,-21}; +Plane Surface(4) = {4}; +Line Loop(5) = {5, 6, -23,-22}; +Plane Surface(5) = {5}; +Line Loop(6) = {23, 7, 8, 9}; +Plane Surface(6) = {6}; +Line Loop(7) = {24, 11, 12, 13}; +Plane Surface(7) = {7}; +Line Loop(8) = {25, 15, 16, 17}; +Plane Surface(8) = {8}; + +Physical Line(1) = {18, 17}; +Physical Line(2) = {6, 7}; +Physical Line(3) = {16, 12, 8}; +Physical Line(4) = {15, 14, 13}; +Physical Line(5) = {11, 10, 9}; +Physical Line(6) = {1, 2, 3, 4, 5}; + +Physical Surface(1) = {1}; +Physical Surface(2) = {2}; +Physical Surface(3) = {3}; +Physical Surface(4) = {4}; +Physical Surface(5) = {5}; +Physical Surface(6) = {6}; +Physical Surface(7) = {7}; +Physical Surface(8) = {8}; + +Transfinite Line {1, 25, 16} = zg1/Lcell + 1 Using Progression 1; +Transfinite Line {2, 14, 4, 10} = tg1/Lcell + 1 Using Progression 1; +Transfinite Line {3, 24, 12} = dg/Lcell + 1 Using Progression 1; +Transfinite Line {5, 23, 8} = (Lz-tg2-zg2)/Lcell + 1 Using Progression 1; +Transfinite Line {18, 19, 20, 21, 22, 6} = rg1/Lcell + 1 Using Progression 1; +Transfinite Line {17, 15, 13, 11, 9, 7} = (Lr-rg1)/Lcell + 1 Using Progression 1; + + +#Transfinite Surface{1}; +#Recombine Surface {1}; +#Transfinite Surface{2}; +#Recombine Surface {2}; +#Transfinite Surface{3}; +#Recombine Surface {3}; +#Transfinite Surface{4}; +#Recombine Surface {4}; +#Transfinite Surface{5}; +#Recombine Surface {5}; +#Transfinite Surface{6}; +#Recombine Surface {6}; +#Transfinite Surface{7}; +#Recombine Surface {7}; +#Transfinite Surface{8}; +#Recombine Surface {8};