Unstruct2D
1.0
Solution of 2-D Euler- and Navier-Stokes Equations on Unstructured Triangular Grids
|
#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 |
CONSVARS * | rhs |
Encompasses data and functions related to spatial discretization of the governing equations (Roe's upwind scheme).
SpaceDiscr::SpaceDiscr | ( | ) |
Initializes data of spatial discretization.
SpaceDiscr::~SpaceDiscr | ( | ) |
Finishes and cleans up the memory.
void SpaceDiscr::AllocateMemory | ( | Equations | equsType, |
int | nNodes | ||
) |
Allocates all necessary memory.
equsType | equations solved (Euler or Navier-Stokes) |
nNodes | total number of grid nodes |
std::bad_alloc | failed memory allocation |
void SpaceDiscr::DissipInit | ( | int | irk, |
int | nNodes, | ||
REAL | beta | ||
) |
Initializes the artificial dissipation vector at all grid nodes.
irk | stage of the Runge-Kutta scheme |
nNodes | total number of grid nodes |
beta | dissipation-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.
geometry | geometrical data |
fluidProps | fluid properties |
beta | dissipation-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)).
geometry | geometrical data |
fluidProps | fluid properties |
precond | low Mach-number preconditioning |
beta | dissipation-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.
geometry | geometrical data |
fluidProps | fluid properties |
beta | dissipation-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)).
geometry | geometrical data |
fluidProps | fluid properties |
precond | low Mach-number preconditioning |
beta | dissipation-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.
geometry | geometrical data |
fluidProps | fluid 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).
geometry | geometrical data |
fluidProps | fluid 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).
geometry | geometrical data |
fluidProps | fluid properties |
beta | dissipation-blending coefficient |
void SpaceDiscr::FluxWalls | ( | const Geometry & | geometry, |
const FluidProps & | fluidProps | ||
) |
Computes convective fluxes in the normal direction at solid walls.
geometry | geometrical data |
fluidProps | fluid properties |
|
inline |
Returns gradients of u-velocity with respect to x and y.
i | node index |
du | du/dx and du/dy |
|
inline |
Returns gradients of v-velocity with respect to x and y.
i | node index |
dv | dv/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.
geometry | geometrical data |
fluidProps | fluid 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.
geometry | geometrical data |
fluidProps | fluid properties |
void SpaceDiscr::Limiter | ( | const Geometry & | geometry, |
const FluidProps & | fluidProps | ||
) |
Evaluates limiter functions (Venkatakrishnan's limiter, Eq. (5.67)).
geometry | geometrical data |
fluidProps | fluid 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.
geometry | geometrical data |
fluidProps | fluid 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).
geometry | geometrical data |
fluidProps | fluid properties |
bndConds | boundary conditions |
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)