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

#include <spaceDiscr.h>

Public Member Functions

 SpaceDiscr ()
 
 ~SpaceDiscr ()
 
void AllocateMemory (Equations equsType, int nNodes)
 
void DissipInit (int irk, int nNodes, REAL beta)
 
void DissipRoe1 (const Geometry &geometry, const FluidProps &fluidProps, REAL beta)
 
void DissipRoe1Prec (const Geometry &geometry, const FluidProps &fluidProps, const Precond &precond, REAL beta)
 
void DissipRoe2 (const Geometry &geometry, const FluidProps &fluidProps, REAL beta)
 
void DissipRoe2Prec (const Geometry &geometry, const FluidProps &fluidProps, const Precond &precond, REAL beta)
 
void FluxRoe1 (const Geometry &geometry, const FluidProps &fluidProps)
 
void FluxRoe2 (const Geometry &geometry, const FluidProps &fluidProps)
 
void FluxWalls (const Geometry &geometry, const FluidProps &fluidProps)
 
void FluxViscous (const Geometry &geometry, const FluidProps &fluidProps, REAL beta)
 
void Gradients (const Geometry &geometry, const FluidProps &fluidProps)
 
void GradientsVisc (const Geometry &geometry, const FluidProps &fluidProps)
 
void LimiterRefvals (const Geometry &geometry, const FluidProps &fluidProps, const BndConds &bndConds)
 
void LimiterInit (const Geometry &geometry, const FluidProps &fluidProps)
 
void Limiter (const Geometry &geometry, const FluidProps &fluidProps)
 
void GetGradU (int i, NODE &du) const
 
void GetGradV (int i, NODE &dv) const
 

Public Attributes

int order
 
REAL limfac
 
REAL epsEntr
 
CONSVARSrhs
 

Detailed Description

Encompasses data and functions related to spatial discretization of the governing equations (Roe's upwind scheme).

Constructor & Destructor Documentation

SpaceDiscr::SpaceDiscr ( )

Initializes data of spatial discretization.

SpaceDiscr::~SpaceDiscr ( )

Finishes and cleans up the memory.

Member Function Documentation

void SpaceDiscr::AllocateMemory ( Equations  equsType,
int  nNodes 
)

Allocates all necessary memory.

Parameters
equsTypeequations solved (Euler or Navier-Stokes)
nNodestotal number of grid nodes
Exceptions
std::bad_allocfailed memory allocation
void SpaceDiscr::DissipInit ( int  irk,
int  nNodes,
REAL  beta 
)

Initializes the artificial dissipation vector at all grid nodes.

Parameters
irkstage of the Runge-Kutta scheme
nNodestotal number of grid nodes
betadissipation-blending coefficient
void SpaceDiscr::DissipRoe1 ( const Geometry geometry,
const FluidProps fluidProps,
REAL  beta 
)

Computes upwind dissipation according to 1st-order Roe's flux-difference splitting scheme.

Parameters
geometrygeometrical data
fluidPropsfluid properties
betadissipation-blending coefficient
void SpaceDiscr::DissipRoe1Prec ( const Geometry geometry,
const FluidProps fluidProps,
const Precond precond,
REAL  beta 
)

Computes upwind dissipation according to 1st-order Roe's flux-difference splitting scheme. The dissipation terms are multiplied by a preconditioning matrix for low Mach numbers (see Eq. (9.54)).

Parameters
geometrygeometrical data
fluidPropsfluid properties
precondlow Mach-number preconditioning
betadissipation-blending coefficient
void SpaceDiscr::DissipRoe2 ( const Geometry geometry,
const FluidProps fluidProps,
REAL  beta 
)

Computes upwind dissipation according to 2nd-order Roe's flux-difference splitting scheme. Values are extrapolated to the dual faces using Venkat's limiter function.

Parameters
geometrygeometrical data
fluidPropsfluid properties
betadissipation-blending coefficient
void SpaceDiscr::DissipRoe2Prec ( const Geometry geometry,
const FluidProps fluidProps,
const Precond precond,
REAL  beta 
)

Computes upwind dissipation according to 2nd-order Roe's flux-difference splitting scheme. Values are extrapolated to the dual faces using Venkat's limiter function. The dissipation terms are multiplied by a preconditioning matrix for low Mach numbers (see Eq. (9.54)).

Parameters
geometrygeometrical data
fluidPropsfluid properties
precondlow Mach-number preconditioning
betadissipation-blending coefficient
void SpaceDiscr::FluxRoe1 ( const Geometry geometry,
const FluidProps fluidProps 
)

Computes the convective fluxes using average of fluxes at control volume's faces. The left and right fluxes are computed directly from values at nodes "i" and "j". This is sufficient for a 1st-order Roe scheme.

Parameters
geometrygeometrical data
fluidPropsfluid properties
void SpaceDiscr::FluxRoe2 ( const Geometry geometry,
const FluidProps fluidProps 
)

Computes the convective fluxes using average of fluxes at control volume's faces. The left and right fluxes are computed from reconstructed and limited values at nodes "i" and "j". This is required for a 2nd-order Roe scheme (see Subsection 4.3.3).

Parameters
geometrygeometrical data
fluidPropsfluid properties
void SpaceDiscr::FluxViscous ( const Geometry geometry,
const FluidProps fluidProps,
REAL  beta 
)

Computes viscous fluxes for the Navier-Stokes equations and adds them to the dissipation variable (diss). Gradients at the faces of the control volumes are obtained by a modified averaging of node-based gradients (see Section 5.4.2).

Parameters
geometrygeometrical data
fluidPropsfluid properties
betadissipation-blending coefficient
void SpaceDiscr::FluxWalls ( const Geometry geometry,
const FluidProps fluidProps 
)

Computes convective fluxes in the normal direction at solid walls.

Parameters
geometrygeometrical data
fluidPropsfluid properties
void SpaceDiscr::GetGradU ( int  i,
NODE du 
) const
inline

Returns gradients of u-velocity with respect to x and y.

Parameters
inode index
dudu/dx and du/dy
void SpaceDiscr::GetGradV ( int  i,
NODE dv 
) const
inline

Returns gradients of v-velocity with respect to x and y.

Parameters
inode index
dvdv/dx and dv/dy
void SpaceDiscr::Gradients ( const Geometry geometry,
const FluidProps fluidProps 
)

Computes gradients of the density, u, v, and of the pressure with respect to the x- and y-coordinates. Gradients are evaluated at the grid nodes.

Parameters
geometrygeometrical data
fluidPropsfluid properties
void SpaceDiscr::GradientsVisc ( const Geometry geometry,
const FluidProps fluidProps 
)

Computes gradients of the density, u, v, pressure and of the temperature with respect to the x- and y-coordinates. Gradients are evaluated at the grid nodes.

Parameters
geometrygeometrical data
fluidPropsfluid properties
void SpaceDiscr::Limiter ( const Geometry geometry,
const FluidProps fluidProps 
)

Evaluates limiter functions (Venkatakrishnan's limiter, Eq. (5.67)).

Parameters
geometrygeometrical data
fluidPropsfluid properties
void SpaceDiscr::LimiterInit ( const Geometry geometry,
const FluidProps fluidProps 
)

Computes minimum and maximum values of density, u, v, and pressure for all direct neighbors "j" of node "i" (min/max_j U_j in Eq. (5.61)). This is used later in SpaceDiscr::Limiter to evaluate the limiter functions.

Parameters
geometrygeometrical data
fluidPropsfluid properties
void SpaceDiscr::LimiterRefvals ( const Geometry geometry,
const FluidProps fluidProps,
const BndConds bndConds 
)

Computes reference values of limited variables (density, u, v, pressure) and of the control volumes. The reference values are used to normalize variables within the limiter functions (Roe's upwind scheme).

Parameters
geometrygeometrical data
fluidPropsfluid properties
bndCondsboundary conditions

Member Data Documentation

REAL SpaceDiscr::epsEntr

entropy correction coefficient

REAL SpaceDiscr::limfac

limiter coefficient

int SpaceDiscr::order

order of the scheme (1 or 2)

CONSVARS* SpaceDiscr::rhs

residuals (right-hand side)


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