Unstruct2D  1.0
Solution of 2-D Euler- and Navier-Stokes Equations on Unstructured Triangular Grids
 All Classes Files Functions Variables Typedefs Enumerations Macros
Output Class Reference

#include <output.h>

Public Member Functions

 Output ()
 
void Flowfield (const Geometry &geometry, const FluidProps &fluidProps, const BndConds &bndConds, int iter) const
 
void Surfaces (const Geometry &geometry, const FluidProps &fluidProps, const BndConds &bndConds, const SpaceDiscr &spaceDiscr, int iter) const
 
void OpenConvergence ()
 
void WriteConvergence (int iter, REAL drho, REAL drmax, int idrmax, REAL cl, REAL cd, REAL cm, REAL mflow, REAL mfratio)
 
void CloseConvergence ()
 
std::string GetVarName (int index) const
 
void StoreFlowType (FlowType flowType)
 

Public Attributes

std::string title
 
std::string fnameFlow
 
std::string fnameSurf
 
std::string fnameConv
 
bool varOn [MXQUANT]
 

Static Public Attributes

static const int MXQUANT =13
 
static const int MXQFIELD =11
 

Detailed Description

Encompasses data and functions required to output plot data and the convergence history. The plot data itself is provided by the class Solver.

Constructor & Destructor Documentation

Output::Output ( )

Initializes data related to plot output.

Member Function Documentation

void Output::CloseConvergence ( )

Closes file with the convergence history.

void Output::Flowfield ( const Geometry geometry,
const FluidProps fluidProps,
const BndConds bndConds,
int  iter 
) const

Writes out selected quantities for the whole flow field in Vis2D format.

Parameters
geometrygeometrical data
fluidPropsfluid properties
bndCondsboundary conditions
itercurrent iteration
Exceptions
std::runtime_errorfile cannot be opened
std::string Output::GetVarName ( int  index) const
inline

Returns name of a plot variable as a string.

Parameters
indexindex of the variable
void Output::OpenConvergence ( )

Opens file for the convergence history and writes the header.

Exceptions
std::runtime_errorfile cannot be opened
void Output::StoreFlowType ( FlowType  flowType)
inline

Stores the type of flow for later use when saving flow results.

Parameters
flowTypetype of flow (external or internal)
void Output::Surfaces ( const Geometry geometry,
const FluidProps fluidProps,
const BndConds bndConds,
const SpaceDiscr spaceDiscr,
int  iter 
) const

Writes out selected values at walls and symmetry boundaries in Vis2D format.

Parameters
geometrygeometrical data
fluidPropsfluid properties
bndCondsboundary conditions
spaceDiscrspatial discretization
itercurrent iteration
Exceptions
std::runtime_errorfile cannot be opened
void Output::WriteConvergence ( int  iter,
REAL  drho,
REAL  drmax,
int  idrmax,
REAL  cl,
REAL  cd,
REAL  cm,
REAL  mflow,
REAL  mfratio 
)

Writes current convergence results to a file.

Parameters
iteriteration number
drhochange of the density residual (2-norm)
drmaxmaximum change of the density residual
idrmaxindex of the node with the largest residual
cllift coefficient
cddrag coefficient
cmpitching moment coefficient
mflowaverage mass flow rate
mfratioratio of mass flow at outlet to mass flow at inlet

Member Data Documentation

std::string Output::fnameConv

convergence history (+ .v2d)

std::string Output::fnameFlow

flow field (+ 5 digit iteration number + .v2d)

std::string Output::fnameSurf

quantities along wall surface(s) (+ 5 digit iteration number + .v2d)

const int Output::MXQFIELD =11
static

no. of plot variables in the field (cf and Cp only at the boundaries)

const int Output::MXQUANT =13
static

total number of plot variables

std::string Output::title

title of the simulation case

bool Output::varOn[MXQUANT]

on/off switches of the plot variables


The documentation for this class was generated from the following files: