Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Nektar::AUSM0Solver Class Reference

#include <AUSM0Solver.h>

Inheritance diagram for Nektar::AUSM0Solver:
Inheritance graph
[legend]
Collaboration diagram for Nektar::AUSM0Solver:
Collaboration graph
[legend]

Static Public Member Functions

static RiemannSolverSharedPtr create ()

Static Public Attributes

static std::string solverName

Protected Member Functions

 AUSM0Solver ()
virtual void v_PointSolve (double rhoL, double rhouL, double rhovL, double rhowL, double EL, double rhoR, double rhouR, double rhovR, double rhowR, double ER, double &rhof, double &rhouf, double &rhovf, double &rhowf, double &Ef)
 AUSM0 Riemann solver.
double M1Function (int A, double M)
double M2Function (int A, double M)
double M4Function (int A, double beta, double M)
double P5Function (int A, double alpha, double M)
- Protected Member Functions inherited from Nektar::CompressibleSolver
 CompressibleSolver ()
virtual void v_Solve (const int nDim, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, Array< OneD, Array< OneD, NekDouble > > &flux)
virtual void v_ArraySolve (const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, Array< OneD, Array< OneD, NekDouble > > &flux)
virtual void v_PointSolveVisc (NekDouble rhoL, NekDouble rhouL, NekDouble rhovL, NekDouble rhowL, NekDouble EL, NekDouble EpsL, NekDouble rhoR, NekDouble rhouR, NekDouble rhovR, NekDouble rhowR, NekDouble ER, NekDouble EpsR, NekDouble &rhof, NekDouble &rhouf, NekDouble &rhovf, NekDouble &rhowf, NekDouble &Ef, NekDouble &Epsf)
- Protected Member Functions inherited from Nektar::SolverUtils::RiemannSolver
SOLVER_UTILS_EXPORT RiemannSolver ()
void GenerateRotationMatrices (const Array< OneD, const Array< OneD, NekDouble > > &normals)
 Generate rotation matrices for 3D expansions.
void FromToRotation (Array< OneD, const NekDouble > &from, Array< OneD, const NekDouble > &to, NekDouble *mat)
 A function for creating a rotation matrix that rotates a vector from into another vector to.
SOLVER_UTILS_EXPORT void rotateToNormal (const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &normals, const Array< OneD, const Array< OneD, NekDouble > > &vecLocs, Array< OneD, Array< OneD, NekDouble > > &outarray)
 Rotate a vector field to trace normal.
SOLVER_UTILS_EXPORT void rotateFromNormal (const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &normals, const Array< OneD, const Array< OneD, NekDouble > > &vecLocs, Array< OneD, Array< OneD, NekDouble > > &outarray)
 Rotate a vector field from trace normal.
bool CheckScalars (std::string name)
 Determine whether a scalar has been defined in m_scalars.
bool CheckVectors (std::string name)
 Determine whether a vector has been defined in m_vectors.
bool CheckParams (std::string name)
 Determine whether a parameter has been defined in m_params.
bool CheckAuxScal (std::string name)
 Determine whether a scalar has been defined in m_auxScal.
bool CheckAuxVec (std::string name)
 Determine whether a vector has been defined in m_auxVec.

Additional Inherited Members

- Public Member Functions inherited from Nektar::SolverUtils::RiemannSolver
SOLVER_UTILS_EXPORT void Solve (const int nDim, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, Array< OneD, Array< OneD, NekDouble > > &flux)
 Perform the Riemann solve given the forwards and backwards spaces.
template<typename FuncPointerT , typename ObjectPointerT >
void SetScalar (std::string name, FuncPointerT func, ObjectPointerT obj)
void SetScalar (std::string name, RSScalarFuncType fp)
template<typename FuncPointerT , typename ObjectPointerT >
void SetVector (std::string name, FuncPointerT func, ObjectPointerT obj)
void SetVector (std::string name, RSVecFuncType fp)
template<typename FuncPointerT , typename ObjectPointerT >
void SetParam (std::string name, FuncPointerT func, ObjectPointerT obj)
void SetParam (std::string name, RSParamFuncType fp)
template<typename FuncPointerT , typename ObjectPointerT >
void SetAuxScal (std::string name, FuncPointerT func, ObjectPointerT obj)
template<typename FuncPointerT , typename ObjectPointerT >
void SetAuxVec (std::string name, FuncPointerT func, ObjectPointerT obj)
std::map< std::string,
RSScalarFuncType > & 
GetScalars ()
std::map< std::string,
RSVecFuncType > & 
GetVectors ()
std::map< std::string,
RSParamFuncType > & 
GetParams ()
- Public Attributes inherited from Nektar::SolverUtils::RiemannSolver
int m_spacedim
- Protected Attributes inherited from Nektar::CompressibleSolver
bool m_pointSolve

Detailed Description

Definition at line 43 of file AUSM0Solver.h.

Constructor & Destructor Documentation

Nektar::AUSM0Solver::AUSM0Solver ( )
protected

Definition at line 46 of file AUSM0Solver.cpp.

Referenced by create().

Member Function Documentation

static RiemannSolverSharedPtr Nektar::AUSM0Solver::create ( )
inlinestatic

Definition at line 46 of file AUSM0Solver.h.

References AUSM0Solver().

{
new AUSM0Solver());
}
double Nektar::AUSM0Solver::M1Function ( int  A,
double  M 
)
protected

Definition at line 125 of file AUSM0Solver.cpp.

Referenced by M4Function(), and P5Function().

{
double out;
if (A == 0)
{
out = 0.5 * (M + fabs(M));
}
else
{
out = 0.5 * (M - fabs(M));
}
return out;
}
double Nektar::AUSM0Solver::M2Function ( int  A,
double  M 
)
protected

Definition at line 141 of file AUSM0Solver.cpp.

Referenced by M4Function(), and P5Function().

{
double out;
if (A == 0)
{
out = 0.25 * (M + 1.0) * (M + 1.0);
}
else
{
out = -0.25 * (M - 1.0) * (M - 1.0);
}
return out;
}
double Nektar::AUSM0Solver::M4Function ( int  A,
double  beta,
double  M 
)
protected

Definition at line 157 of file AUSM0Solver.cpp.

References M1Function(), and M2Function().

Referenced by v_PointSolve().

{
double out;
if (fabs(M) >= 1.0)
{
out = M1Function(A, M);
}
else
{
out = M2Function(A, M);
if (A == 0)
{
out *= 1.0 - 16.0 * beta * M2Function(1, M);
}
else
{
out *= 1.0 + 16.0 * beta * M2Function(0, M);
}
}
return out;
}
double Nektar::AUSM0Solver::P5Function ( int  A,
double  alpha,
double  M 
)
protected

Definition at line 182 of file AUSM0Solver.cpp.

References M1Function(), and M2Function().

Referenced by v_PointSolve().

{
double out;
if (fabs(M) >= 1.0)
{
out = (1.0 / M) * M1Function(A, M);
}
else
{
out = M2Function(A, M);
if (A == 0)
{
out *= (2.0 - M) - 16.0 * alpha * M * M2Function(1, M);
}
else
{
out *= (-2.0 - M) + 16.0 * alpha * M * M2Function(0, M);
}
}
return out;
}
void Nektar::AUSM0Solver::v_PointSolve ( double  rhoL,
double  rhouL,
double  rhovL,
double  rhowL,
double  EL,
double  rhoR,
double  rhouR,
double  rhovR,
double  rhowR,
double  ER,
double &  rhof,
double &  rhouf,
double &  rhovf,
double &  rhowf,
double &  Ef 
)
protectedvirtual

AUSM0 Riemann solver.

Parameters
rhoLDensity left state.
rhoRDensity right state.
rhouLx-momentum component left state.
rhouRx-momentum component right state.
rhovLy-momentum component left state.
rhovRy-momentum component right state.
rhowLz-momentum component left state.
rhowRz-momentum component right state.
ELEnergy left state.
EREnergy right state.
rhofComputed Riemann flux for density.
rhoufComputed Riemann flux for x-momentum component
rhovfComputed Riemann flux for y-momentum component
rhowfComputed Riemann flux for z-momentum component
EfComputed Riemann flux for energy.

Reimplemented from Nektar::CompressibleSolver.

Definition at line 70 of file AUSM0Solver.cpp.

References M4Function(), Nektar::SolverUtils::RiemannSolver::m_params, and P5Function().

{
static NekDouble gamma = m_params["gamma"]();
// Left and Right velocities
NekDouble uL = rhouL / rhoL;
NekDouble vL = rhovL / rhoL;
NekDouble wL = rhowL / rhoL;
NekDouble uR = rhouR / rhoR;
NekDouble vR = rhovR / rhoR;
NekDouble wR = rhowR / rhoR;
// Left and right pressures
NekDouble pL = (gamma - 1.0) *
(EL - 0.5 * (rhouL * uL + rhovL * vL + rhowL * wL));
NekDouble pR = (gamma - 1.0) *
(ER - 0.5 * (rhouR * uR + rhovR * vR + rhowR * wR));
NekDouble cL = sqrt(gamma * pL / rhoL);
NekDouble cR = sqrt(gamma * pR / rhoR);
// Average speeds of sound
NekDouble cA = 0.5 * (cL + cR);
// Local Mach numbers
NekDouble ML = uL / cA;
NekDouble MR = uR / cA;
// Parameters for specify the upwinding
NekDouble beta = 0.0;
NekDouble alpha = 0.0;
NekDouble Mbar = M4Function(0, beta, ML) + M4Function(1, beta, MR);
NekDouble pbar = pL * P5Function(0, alpha, ML) +
pR * P5Function(1, alpha, MR);
if (Mbar >= 0.0)
{
rhof = cA * Mbar * rhoL;
rhouf = cA * Mbar * rhoL * uL + pbar;
rhovf = cA * Mbar * rhoL * vL;
rhowf = cA * Mbar * rhoL * wL;
Ef = cA * Mbar * (EL + pL);
}
else
{
rhof = cA * Mbar * rhoR;
rhouf = cA * Mbar * rhoR * uR + pbar;
rhovf = cA * Mbar * rhoR * vR;
rhowf = cA * Mbar * rhoR * wR;
Ef = cA * Mbar * (ER + pR);
}
}

Member Data Documentation

std::string Nektar::AUSM0Solver::solverName
static
Initial value:

Definition at line 52 of file AUSM0Solver.h.