diff --git a/doc/user-manual/bibliography.bib b/doc/user-manual/bibliography.bib index 0ef1811..878b7ee 100644 --- a/doc/user-manual/bibliography.bib +++ b/doc/user-manual/bibliography.bib @@ -51,4 +51,15 @@ howpublished = {\url{https://gmsh.info/}}, } +@Article{welford1962note, + author = {Welford, BP}, + journal = {Technometrics}, + title = {Note on a method for calculating corrected sums of squares and products}, + year = {1962}, + number = {3}, + pages = {419--420}, + volume = {4}, + publisher = {Taylor \& Francis}, +} + @Comment{jabref-meta: databaseType:bibtex;} diff --git a/doc/user-manual/fpakc_UserManual.pdf b/doc/user-manual/fpakc_UserManual.pdf index a84376f..66aba8b 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 b41f809..e5c0d4f 100644 --- a/doc/user-manual/fpakc_UserManual.tex +++ b/doc/user-manual/fpakc_UserManual.tex @@ -1,4 +1,4 @@ -\documentclass[10pt,a4paper,oneside]{book} +\documentclass[10pt,a4paper,twoside]{book} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} @@ -22,6 +22,7 @@ Author = {Jorge Gonzalez} } } +\usepackage[margin=1in]{geometry} % Reduces margins of the document % Allows breaking of URL in bibliography. \setcounter{biburllcpenalty}{7000} \setcounter{biburlucpenalty}{8000} @@ -260,6 +261,18 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Electromagnetic field} WIP. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \section{Average scheme} + Particle-in-cell codes has 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 amount 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} @@ -642,7 +655,7 @@ make \item \textbf{initialTime}: Real. Units of $\unit{s}$. Initial simulation time. - If no value is provided, the initial time is set to $\unit[0]{s}$. + 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: @@ -684,6 +697,17 @@ make File must be located at \textbf{output.path}. \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 determine the different interactions among species.