Commit d2e0c2dc authored by Dave Moxey's avatar Dave Moxey
Browse files

Improve filter output, fix filter documentation, remove unnecessary use of...

Improve filter output, fix filter documentation, remove unnecessary use of \checkmark in deference to \cmark
parent f0750d32
......@@ -51,34 +51,34 @@ installed system-wide).
\begin{center}
\begin{tabular}{lccccl}
\toprule
Package & Req. & \multicolumn{3}{c}{Installation} & Note \\ \cline{3-5}
& & Sys. & User & Auto. & \\
& & \multicolumn{3}{c}{Installation} & \\ \cmidrule(r){3-5}
Package & Req. & Sys. & User & Auto. & Note \\
\midrule
C++ compiler & \checkmark & \checkmark & & & gcc, icc, etc \\
CMake $>2.8.7$ & \checkmark & \checkmark & \checkmark & & Ncurses
C++ compiler & \cmark & \cmark & & & gcc, icc, etc \\
CMake $>2.8.7$ & \cmark & \cmark & \cmark & & Ncurses
GUI optional
\\
BLAS & \checkmark & \checkmark & \checkmark & & Or MKL,
BLAS & \cmark & \cmark & \cmark & & Or MKL,
ACML, OpenBLAS
\\
LAPACK & \checkmark & \checkmark & \checkmark & & \\
Boost $>1.49$ & \checkmark & \checkmark & \checkmark & \checkmark & Compile
LAPACK & \cmark & \cmark & \cmark & & \\
Boost $>1.49$ & \cmark & \cmark & \cmark & \cmark & Compile
with iostreams
\\
ModMETIS & \checkmark & & & \checkmark & \\
FFTW $>3.0$ & & \checkmark & \checkmark & \checkmark & For
ModMETIS & \cmark & & & \cmark & \\
FFTW $>3.0$ & & \cmark & \cmark & \cmark & For
high-performance FFTs\\
ARPACK $>2.0$ & & \checkmark & \checkmark & & For
ARPACK $>2.0$ & & \cmark & \cmark & & For
arnoldi algorithms\\
OpenMPI & & \checkmark & & & For
OpenMPI & & \cmark & & & For
parallel execution\\
GSMPI & & & & \checkmark & For
GSMPI & & & & \cmark & For
parallel execution\\
PetSC & & & \checkmark & \checkmark &
PetSC & & & \cmark & \cmark &
Alternative linear solvers\\
Scotch & & \checkmark & \checkmark & \checkmark &
Scotch & & \cmark & \cmark & \cmark &
Alternative mesh partitioning\\
VTK $>5.8$ & & \checkmark & \checkmark & & Visualisation
VTK $>5.8$ & & \cmark & \cmark & & Visualisation
utilities\\
\bottomrule
\end{tabular}
......@@ -209,33 +209,33 @@ Framework).
\begin{center}
\begin{tabular}{lccccl}
\toprule
Package & Req. & \multicolumn{3}{c}{Installation} & Note \\ \cline{3-5}
& & MacPorts & User & Auto. & \\
& & \multicolumn{3}{c}{Installation} & \\ \cmidrule(r){3-5}
Package & Req. & MacPorts & User & Auto. & Note \\
\midrule
Xcode & \checkmark & & & & gcc, icc, etc \\
CMake $>2.8.7$ & \checkmark & \checkmark & \checkmark & & Ncurses
Xcode & \cmark & & & & gcc, icc, etc \\
CMake $>2.8.7$ & \cmark & \cmark & \cmark & & Ncurses
GUI optional \\
BLAS & \checkmark & & & & Part of
BLAS & \cmark & & & & Part of
Xcode \\
LAPACK & \checkmark & & & & Part of
LAPACK & \cmark & & & & Part of
Xcode \\
Boost $>1.49$ & \checkmark & \checkmark & \checkmark & \checkmark & Compile
Boost $>1.49$ & \cmark & \cmark & \cmark & \cmark & Compile
with iostreams
\\
ModMETIS & \checkmark & & & \checkmark & \\
FFTW $>3.0$ & & \checkmark & \checkmark & \checkmark & For
ModMETIS & \cmark & & & \cmark & \\
FFTW $>3.0$ & & \cmark & \cmark & \cmark & For
high-performance FFTs\\
ARPACK $>2.0$ & & \checkmark & \checkmark & & For
ARPACK $>2.0$ & & \cmark & \cmark & & For
arnoldi algorithms\\
OpenMPI & & \checkmark & & & For
OpenMPI & & \cmark & & & For
parallel execution\\
GSMPI & & & & \checkmark & For
GSMPI & & & & \cmark & For
parallel execution\\
PetSC & & \checkmark & \checkmark & \checkmark &
PetSC & & \cmark & \cmark & \cmark &
Alternative linear solvers\\
Scotch & & & \checkmark & \checkmark &
Scotch & & & \cmark & \cmark &
Alternative mesh partitioning\\
VTK $>5.8$ & & \checkmark & \checkmark & &
VTK $>5.8$ & & \cmark & \cmark & &
Visualisation utilities\\
\bottomrule
\end{tabular}
......
......@@ -29,11 +29,9 @@ openany, % A chapter may start on either a recto or verso page.
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
% \usepackage{tikz} % Figures
\usepackage{graphicx} % Include figures
\usepackage{makeidx}
\usepackage{import}
\usepackage{amssymb}
%%% PAGE LAYOUT
%%%-----------------------------------------------------------------------------
......
\section{Filters}
This section defines a range of useful utilities which can be used when specific solvers are run. These are enclosed within the
\inltt{FILTERS} tag. In this section we give an overview of the modules currently available and the fundamental set-up.
\subsection{Aerodynamic Forces module}
This filter evaluates the aerodynamic forces along a specific surface when the IncompressibleNavierStokes solver. is used The forces are projected along the cartesian axes and the pressure and viscous contributions are computed in each direction. Inside the \inltt{FILTERS} tag we specify the specific filter \inltt{AeroForces} followed by the specific \inltt{PARAMETERS}:
\begin{enumerate}
\item \inltt{OutputFile} specifies the name of the file where the aerodynamic forces are plotted.
\item \inltt{Frequency} specifies the number of steps to print the aerodynamic forces.
\item \inltt{Boundary} specifies the boundary surfaces where we want to evaluate the aerodynamic forces.
\end{enumerate}
An example is given below:
\begin{lstlisting}[style=XMLStyle]
<FILTERS>
<FILTER TYPE="AeroForces">
<PARAM NAME="OutputFile">DragLift.frc</PARAM>
<PARAM NAME="OutputFrequency">10</PARAM>
<PARAM NAME="Boundary"> B[1,2] </PARAM>
</PARAM>
</FILTER>
</FILTERS>
Filters are a method for calculating a variety of useful quantities from the
field variables as the solution evolves in time, such as time-averaged fields
and extracting the field variables at certain points inside the domain. Each
filter is defined in a \inltt{FILTER} tag inside a \inltt{FILTERS} block which
lies in the main \inltt{NEKTAR} tag. In this section we give an overview of the
modules currently available and how to set up these filters in the session file.
Here is an example \inltt{FILTER}:
\begin{lstlisting}[style=XMLStyle,gobble=2]
<FILTER TYPE="FilterName">
<PARAM NAME="Param1"> Value1 </PARAM>
<PARAM NAME="Param2"> Value2 </PARAM>
</FILTER>
\end{lstlisting}
During the execution a file named DragLift.frc will be created and the value of the aerodynamic forces on boundaries 1 and 2, defined in the \inltt{GEOMETRY} section, will be plotted every 10 time steps .
\subsection{Averaged Fields module}
This filter allows you to compute the averaged fields during time-stepping. Inside the \inltt{FILTERS} tag we specify the specific filter \inltt{AverageFields} followed by the specific \inltt{PARAMETERS}:
\begin{enumerate}
\item \inltt{OutputFile} specifies the name of the file containing the averaged fields.
\item \inltt{SampleFrequency} specifies the number of instantaneous fields used to evaluate the averaged solution.
\item \inltt{OutputFrequency} specifies the number of steps to print the averaged fields.
\end{enumerate}
\begin{lstlisting}[style=XMLStyle]
<FILTERS>
<FILTER TYPE="AverageFields">
<PARAM NAME="OutputFile">MyAverageField</PARAM>
<PARAM NAME="OutputFrequency">100</PARAM>
<PARAM NAME="SampleFrequency"> 10 </PARAM>
</PARAM>
</FILTER>
</FILTERS>
A filter has a name -- in this case, \inltt{FilterName} -- together with
parameters which are set to user-defined values. Each filter expects different
parameter inputs, although where functionality is similar, the same parameter
names are shared between filter types for consistency.
In the following we document the filters implemented. Note that some filters are
solver-specific and will therefore only work for a given subset of the available
solvers.
\subsection{Time-averaged fields}
This filter computes time-averaged fields for each variable defined in the
session file. Time averages are computed by either taking a snapshot of the
field every timestep, or alternatively at a user-defined number of timesteps
$N$. An output is produced at the end of the simulation into
\inltt{session\_avg.fld}, or alternatively every $M$ timesteps as defined by the
user, into a sequence of files \inltt{session\_*\_avg.fld}, where \inltt{*} is
replaced by a counter. This latter option can be useful to observe statistical
convergence rates of the averaged variables.
The following parameters are supported:
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \texttt{session} &
Prefix of the output filename to which average fields are written.\\
\inltt{SampleFrequency} & \xmark & 1 &
Number of timesteps at which the average is calculated, $N$.\\
\inltt{OutputFrequency} & \xmark & \texttt{NumSteps} &
Number of timesteps after which output is written, $M$.\\
\bottomrule
\end{tabularx}
\end{center}
As an example, consider:
\begin{lstlisting}[style=XMLStyle,gobble=2]
<FILTER TYPE="AverageFields">
<PARAM NAME="OutputFile">MyAverageField</PARAM>
<PARAM NAME="OutputFrequency">100</PARAM>
<PARAM NAME="SampleFrequency"> 10 </PARAM>
</FILTER>
\end{lstlisting}
This will create a MyAverageField.fld file averaging the instantaneous fields every 10 time steps. The averaged field is instead plotted every 100 time steps.
This will create a file named \inltt{MyAverageField.fld} averaging the
instantaneous fields every 10 time steps. The averaged field is however only
output every 100 time steps.
\subsection{Check Points module}
\subsection{Checkpoint fields}
The Check Points filter can be used to print the solution during the time integration. Inside the \inltt{FILTERS} tag we specify \inltt{Checkpoint}, followed by the specific \inltt{PARAMETERS}:
\begin{enumerate}
\item \inltt{OutputFile} specifies the name of the file containing the fields at a specific time step.
\item \inltt{OutputFrequency} specifies the number of steps to print the fields.
\end{enumerate}
For example, to print the fields every 100 time steps we can specify:
\begin{lstlisting}[style=XMLStyle]
<FILTERS>
<FILTER TYPE="Checkpoint">
<PARAM NAME="OutputFile">IntermediateFields</PARAM>
<PARAM NAME="OutputFrequency">100</PARAM>
</PARAM>
</FILTER>
</FILTERS>
The checkpoint filter writes a checkpoint file, containing the instantaneous
state of the solution fields at at given timestep. This can subsequently be used
for restarting the simulation or examining time-dependent behaviour. This
produces a sequence of files, by default named \inltt{session\_*.chk}, where
\inltt{*} is replaced by a counter. The initial condition is written to
\inltt{session\_0.chk}.
\begin{notebox}
This functionality is equivalent to setting the \inltt{IO\_CheckSteps}
parameter in the session file.
\end{notebox}
The following parameters are supported:
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \texttt{session} &
Prefix of the output filename to which the checkpoints are written.\\
\inltt{OutputFrequency} & \cmark & - &
Number of timesteps after which output is written.\\
\bottomrule
\end{tabularx}
\end{center}
For example, to output the fields every 100 timesteps we can specify:
\begin{lstlisting}[style=XMLStyle,gobble=2]
<FILTER TYPE="Checkpoint">
<PARAM NAME="OutputFile">IntermediateFields</PARAM>
<PARAM NAME="OutputFrequency">100</PARAM>
</FILTER>
\end{lstlisting}
\subsection{History Points module}
\subsection{History points}
The history points filter can be used to evaluate the value of the fields in
specific points of the domain as the solution evolves in time. This produces a
file called \inltt{session.his}. For each timestep, and then each history point,
a line is output containing the current solution time, followed by the value of
each of the field variables. Commented lines are created at the top of the file
containing the location of the history points and the order of the variables.
The following parameters are supported:
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \texttt{session} &
Prefix of the output filename to which the checkpoints are written.\\
\inltt{OutputFrequency} & \xmark & 1 &
Number of timesteps after which output is written.\\
\inltt{OutputPlane} & \xmark & 0 &
If the simulation is homogeneous, the plane on which to evaluate the
history point. (No Fourier interpolation is currently implemented.)\\
\inltt{Points } & \cmark & - &
A list of the history points. These should always be given in three
dimensions. \\
\bottomrule
\end{tabularx}
\end{center}
For example, to output the value of the solution fields at three points
$(1,0.5,0)$, $(2,0.5,0)$ and $(3,0.5,0)$ into a file \inltt{TimeValues.his}
every 10 timesteps, we use the syntax:
\begin{lstlisting}[style=XMLStyle,gobble=2]
<FILTER TYPE="HistoryPoints">
<PARAM NAME="OutputFile">TimeValues</PARAM>
<PARAM NAME="OutputFrequency">10</PARAM>
<PARAM NAME="Points">
1 0.5 0
2 0.5 0
3 0.5 0
</PARAM>
</FILTER>
\end{lstlisting}
The history points filters can be used to evaluate the value of the fields in specific points of the domain during time-stepping. Inside the \inltt{FILTERS} tag we specify \inltt{HistoryPoints}, followed by the specific \inltt{PARAMETERS}:
\subsection {Threshold value}
The threshold value filter writes a field output containing a variable $m$,
defined by the time at which the solution first exceeds a specified threshold
value.
\begin{notebox}
This filter assumes that the solution field to be examined is the first
specified in the session file.
\end{notebox}
The following parameters are supported:
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \cmark & - &
Prefix of the output filename to which the checkpoints are written.\\
\inltt{ThresholdValue} & \cmark & - &
Specifies the threshold value.\\
\inltt{InitialValue} & \cmark & - &
Specifies the initial time.\\
\bottomrule
\end{tabularx}
\end{center}
An example is given below:
\begin{enumerate}
\item \inltt{OutputFile} specifies the name of the file containing the values of the fields in the specific history points.
\item \inltt{OutputFrequency} specifies the number of steps to print the values of the fields.
\item \inltt{Points} specifies the coordinates of the specific points line by line.
\end{enumerate}
An example is provided below:
\begin{lstlisting}[style=XMLStyle]
<FILTERS>
<FILTER TYPE="HistoryPoints">
<PARAM NAME="OutputFile">TimeValues</PARAM>
<PARAM NAME="OutputFrequency">10</PARAM>
<PARAM NAME="Points">
1 0.5 0
2 0.5 0
3 0.5 0
</PARAM>
</FILTER>
</FILTERS>
\end{lstlisting}
\subsection{Modal Energy module}
<FILTER TYPE="ThresholdMax">
<PARAM NAME="ThresholdValue"> 0.1 </PARAM>
<PARAM NAME="InitialValue"> 0.4 </PARAM>
<PARAM NAME="OutputFile"> ThresholdFile </PARAM>
</FILTER>
\end{lstlisting}
The modal energy filter can be used to evaluate the kinetic energy of the system and how it distributed along every mode of the Fourier expansion. Note that this filter is specific to the IncompressibleNavierStokes solver. Inside the \inltt{FILTERS} tag we specify \inltt{ModalEnergy}, followed by the specific \inltt{PARAMETERS}:
which produces a field file \inltt{ThresholdFile.fld}.
\subsection{Modal energy}
\begin{notebox}
This filter is only supported for the incompressible Navier-Stokes solver.
\end{notebox}
This filter calculates the time-evolution of the kinetic energy. In the case of
a two- or three-dimensional simulation this is defined as
\[
E_k(t) = \frac{1}{2} \int_{\Omega} \|\mathbf{u}\|^2\, dx
\]
However if the simulation is written as a one-dimensional homogeneous expansion
so that
\[
\mathbf{u}(\mathbf{x},t) = \sum_{k=0}^N \mathbf{\hat{u}}_k(t)e^{2\pi ik\mathbf{x}}
\]
then we instead calculate the energy spectrum
\[
E_k(t) = \frac{1}{2} \int_{\Omega} \|\mathbf{\hat{u}}_k\|^2\, dx.
\]
Note that in this case, each component of $\mathbf{\hat{u}}_k$ is a complex
number and therefore $N = \inltt{HomModesZ}/2$ lines are output for each
timestep. This is a particularly useful tool in examining turbulent and
transitional flows which use the homogeneous extension. In either case, the
resulting output is written into a file called \inltt{session.mdl} by default.
The following parameters are supported:
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \inltt{session} &
Prefix of the output filename to which the energy spectrum is written.\\
\inltt{OutputFrequency} & \xmark & 1 &
Number of timesteps after which output is written.\\
\bottomrule
\end{tabularx}
\end{center}
An example syntax is given below:
\begin{lstlisting}[style=XMLStyle,gobble=2]
<FILTER TYPE="ModalEnergy">
<PARAM NAME="OutputFile">EnergyFile</PARAM>
<PARAM NAME="OutputFrequency">10</PARAM>
</FILTER>
\end{lstlisting}
\begin{enumerate}
\item \inltt{OutputFile} specifies the name of the file containing the values of the modal energy.
\item \inltt{OutputFrequency} specifies the number of steps to print the values of the energy.
\end{enumerate}
\subsection{Aerodynamic forces}
\begin{notebox}
This filter is only supported for the incompressible Navier-Stokes solver.
\end{notebox}
This filter evaluates the aerodynamic forces along a specific surface. The
forces are projected along the Cartesian axes and the pressure and viscous
contributions are computed in each direction.
The following parameters are supported:
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \inltt{session} &
Prefix of the output filename to which the forces are written.\\
\inltt{Frequency} & \xmark & 1 &
Number of timesteps after which output is written.\\
\inltt{Boundary} & \cmark & - &
Boundary surfaces on which the forces are to be evaluated.\\
\bottomrule
\end{tabularx}
\end{center}
An example is provided below:
An example is given below:
\begin{lstlisting}[style=XMLStyle]
<FILTERS>
<FILTER TYPE="ModalEnergy">
<PARAM NAME="OutputFile">EnergyFile</PARAM>
<PARAM NAME="OutputFrequency">10</PARAM>
</PARAM>
</FILTER>
</FILTERS>
\end{lstlisting}
This will plot the value of the temporal evolution of the energy and how it is splits on every mode.
\subsection {Threshold Value module}
The threshold value filter outputs the time when the solution first exceeds a threshold value. Inside the \inltt{FILTERS} tag we specify \inltt{ThresholdMax}, followed by the specific \inltt{PARAMETERS}:
\begin{enumerate}
\item \inltt{ThresholdValue} specifies the threshold value.
\item \inltt{InitialValue} specifies the initial time.
\item \inltt{OutputFile} specifies the output file.
\end{enumerate}
An example is given below:
\begin{lstlisting}[style=XMLStyle]
<FILTERS>
<FILTER TYPE="ThresholdMax">
<PARAM NAME="ThresholdValue "> 0.1 </PARAM>
<PARAM NAME="InitialValue"> 0.4 </PARAM>
<PARAM NAME="OutputFile"> ThresholdFile </PARAM>
</PARAM>
</FILTER>
</FILTERS>
\end{lstlisting}
<FILTER TYPE="AeroForces">
<PARAM NAME="OutputFile">DragLift.frc</PARAM>
<PARAM NAME="OutputFrequency">10</PARAM>
<PARAM NAME="Boundary"> B[1,2] </PARAM>
</FILTER>
\end{lstlisting}
During the execution a file named \inltt{DragLift.frc} will be created and the
value of the aerodynamic forces on boundaries 1 and 2, defined in the
\inltt{GEOMETRY} section, will be output every 10 time steps.
\subsection{Kinetic energy and enstrophy}
\begin{notebox}
This filter is only supported for the incompressible and compressible
Navier-Stokes solvers \textbf{in three dimensions}.
\end{notebox}
The purpose of this filter is to calculate the kinetic energy and enstrophy
%
\[
E_k = \frac{1}{2\mu(\Omega)}\int_{\Omega} \|\mathbf{u}\|^2\, dx, \qquad
\mathcal{E} = \frac{1}{2\mu(\Omega)}\int_{\Omega} \|\mathbf{\omega}\|^2\, dx
\]
%
where $\mu(\Omega)$ is the volume of the domain $\Omega$. This produces a file
containing the time-evolution of the kinetic energy and enstrophy fields. By
default this file is called \inltt{session.eny} where \inltt{session} is the
session name.
The following parameters are supported:
%
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \texttt{session.eny} &
Output file name to which the energy and enstrophy are written.\\
\inltt{OutputFrequency} & \cmark & - &
Number of timesteps at which output is written.\\
\bottomrule
\end{tabularx}
\end{center}
%
To enable the filter, add the following to the \inltt{FILTERS} tag:
%
\begin{lstlisting}[style=XMLStyle,gobble=2]
<FILTER TYPE="Energy">
<PARAM NAME="OutputFrequency"> 1 </PARAM>
</FILTER>
\end{lstlisting}
......@@ -177,7 +177,8 @@ namespace Nektar
if (m_comm->GetRank() == 0)
{
m_outFile << setw(10) << time << setw(20) << Ek;
m_outFile << setw(10) << time
<< setw(19) << scientific << setprecision(11) << Ek;
}
bool waveSpace[3] = {
......@@ -230,7 +231,8 @@ namespace Nektar
if (m_comm->GetRank() == 0)
{
m_outFile << setw(20) << Ek << endl;
m_outFile << setw(19) << setprecision(11)
<< scientific << Ek << endl;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment