Documentation 6b54b78464
Loading...
Searching...
No Matches
common.hpp File Reference

Common convection-related methods. More...

Go to the source code of this file.

Functions

template<class ReconVarType , class PrimVarType , size_t nDim, class VariableType >
CPair< ReconVarType > reconstructPrimitives (const Int &iEdge, const Int &iPoint, const Int &jPoint, const su2double &gamma, const su2double &gasConst, const bool muscl, const su2double &kappa, const su2double &umusclRamp, const LIMITER limiterType, const CPair< PrimVarType > &V1st, const VectorDbl< nDim > &vector_ij, const VariableType &solution, Double &nonPhysical)
 Retrieve primitive variables for points i/j, reconstructing them if needed.
 
template<size_t nDim, class RandomAccessIterator >
MatrixDbl< nDim+2 > pMatrix (const Double &gamma, const Double &density, const RandomAccessIterator &velocity, const Double &projVel, const Double &speedSound, const VectorDbl< nDim > &normal)
 Compute and return the P tensor (compressible flow, ideal gas).
 
template<size_t nDim, class RandomAccessIterator >
MatrixDbl< nDim+2 > pMatrixInv (const Double &gamma, const Double &density, const RandomAccessIterator &velocity, const Double &projVel, const Double &speedSound, const VectorDbl< nDim > &normal)
 Compute and return the inverse P tensor (compressible flow, ideal gas).
 
template<class PrimVarType , class ConsVarType , size_t nDim>
VectorDbl< nDim+2 > inviscidProjFlux (const PrimVarType &V, const ConsVarType &U, const VectorDbl< nDim > &normal)
 Convective projected (onto normal) flux (compressible flow).
 
template<size_t nDim, class RandomAccessIterator >
MatrixDbl< nDim+2 > inviscidProjJac (const Double &gamma, RandomAccessIterator velocity, const Double &energy, const VectorDbl< nDim > &normal, const Double &scale)
 Jacobian of the convective flux (compressible flow, ideal gas).
 
template<class VariableType >
Double roeDissipation (const Int &iPoint, const Int &jPoint, const ENUM_ROELOWDISS type, const VariableType &solution)
 (Low) Dissipation coefficient for Roe schemes.
 
template<class VariableType , class T >
Double correctedSpectralRadius (const Int &iPoint, const Int &jPoint, const Double &avgLambda, const T &stretchParam, const VariableType &solution)
 Correct spectral radius (avgLambda) for stretching.
 
template<class VariableType , size_t nVar>
void scalarDissipationJacobian (const VariableType &V, const Double &gamma, Double dissipConst, MatrixDbl< nVar > &jac)
 Update of a flux Jacobian due to a scalar dissipation term.
 

Detailed Description

Common convection-related methods.

Author
P. Gomes, F. Palacios, T. Economon
Version
8.5.0 "Harrier"

SU2 Project Website: https://su2code.github.io

The SU2 Project is maintained by the SU2 Foundation (http://su2foundation.org)

Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)

SU2 is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

SU2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with SU2. If not, see http://www.gnu.org/licenses/.

Function Documentation

◆ correctedSpectralRadius()

template<class VariableType , class T >
Double correctedSpectralRadius ( const Int &  iPoint,
const Int &  jPoint,
const Double &  avgLambda,
const T &  stretchParam,
const VariableType &  solution 
)
inline

Correct spectral radius (avgLambda) for stretching.

◆ inviscidProjFlux()

template<class PrimVarType , class ConsVarType , size_t nDim>
VectorDbl< nDim+2 > inviscidProjFlux ( const PrimVarType &  V,
const ConsVarType &  U,
const VectorDbl< nDim > &  normal 
)
inline

Convective projected (onto normal) flux (compressible flow).

◆ inviscidProjJac()

template<size_t nDim, class RandomAccessIterator >
MatrixDbl< nDim+2 > inviscidProjJac ( const Double &  gamma,
RandomAccessIterator  velocity,
const Double &  energy,
const VectorDbl< nDim > &  normal,
const Double &  scale 
)
inline

Jacobian of the convective flux (compressible flow, ideal gas).

◆ pMatrix()

template<size_t nDim, class RandomAccessIterator >
MatrixDbl< nDim+2 > pMatrix ( const Double &  gamma,
const Double &  density,
const RandomAccessIterator &  velocity,
const Double &  projVel,
const Double &  speedSound,
const VectorDbl< nDim > &  normal 
)
inline

Compute and return the P tensor (compressible flow, ideal gas).

◆ pMatrixInv()

template<size_t nDim, class RandomAccessIterator >
MatrixDbl< nDim+2 > pMatrixInv ( const Double &  gamma,
const Double &  density,
const RandomAccessIterator &  velocity,
const Double &  projVel,
const Double &  speedSound,
const VectorDbl< nDim > &  normal 
)
inline

Compute and return the inverse P tensor (compressible flow, ideal gas).

◆ reconstructPrimitives()

template<class ReconVarType , class PrimVarType , size_t nDim, class VariableType >
CPair< ReconVarType > reconstructPrimitives ( const Int &  iEdge,
const Int &  iPoint,
const Int &  jPoint,
const su2double &  gamma,
const su2double &  gasConst,
const bool  muscl,
const su2double &  kappa,
const su2double &  umusclRamp,
const LIMITER  limiterType,
const CPair< PrimVarType > &  V1st,
const VectorDbl< nDim > &  vector_ij,
const VariableType &  solution,
Double &  nonPhysical 
)
inline

Retrieve primitive variables for points i/j, reconstructing them if needed.

Note
Density and enthalpy are recomputed from ideal gas EOS.
Parameters
[in]iEdge,iPoint,jPoint- Edge and its nodes.
[in]gamma- Heat capacity ratio.
[in]gasConst- Specific gas constant.
[in]muscl- If true, reconstruct, else simply fetch.
[in]kappa- Blending coefficient for MUSCL reconstruction.
[in]umusclRamp- MUSCL 1st-2nd order ramp times Newton-Krylov relaxation.
[in]limiterType- Type of flux limiter.
[in]V1st- Pair of compressible flow primitives for nodes i,j.
[in]vector_ij- Distance vector from i to j.
[in]solution- Entire solution container (a derived CVariable).
[out]nonPhysical- Signals that the edge is treated as non-physical.
Returns
Pair of primitive variables.

◆ roeDissipation()

template<class VariableType >
Double roeDissipation ( const Int &  iPoint,
const Int &  jPoint,
const ENUM_ROELOWDISS  type,
const VariableType &  solution 
)
inline

(Low) Dissipation coefficient for Roe schemes.

◆ scalarDissipationJacobian()

template<class VariableType , size_t nVar>
void scalarDissipationJacobian ( const VariableType &  V,
const Double &  gamma,
Double  dissipConst,
MatrixDbl< nVar > &  jac 
)
inline

Update of a flux Jacobian due to a scalar dissipation term.