Documentation a537f1bdf2
Loading...
Searching...
No Matches
common.hpp File Reference

Helper functions for viscous methods. More...

Go to the source code of this file.

Functions

template<size_t nVar, size_t nDim, class GradientType >
MatrixDbl< nVar, nDim > averageGradient (const Int &iPoint, const Int &jPoint, const GradientType &gradient)
 Average gradients at i/j points.
 
template<size_t nVar, size_t nDim, class PrimitiveType >
void correctGradient (const PrimitiveType &V, const VectorDbl< nDim > &vector_ij, const Double &dist2_ij, MatrixDbl< nVar, nDim > &avgGrad)
 Correct average gradient with the directional derivative to avoid decoupling.
 
template<size_t nVar, size_t nDim>
MatrixDbl< nDim > stressTensor (const Double &viscosity, const MatrixDbl< nVar, nDim > &grad)
 Compute the stress tensor.
 
template<class PrimitiveType , class MatrixType , size_t nDim, class... Ts>
void addPerturbedRSM (const PrimitiveType &V, const MatrixType &grad, const Double &turb_ke, MatrixDbl< nDim, nDim > &tau, Ts... uq_args)
 Add perturbed stress tensor.
 
template<class MatrixType , size_t nDim>
void addQCR (const MatrixType &grad, MatrixDbl< nDim > &tau, Double turb_fraction)
 SA-QCR2000 modification of the stress tensor.
 
template<class Container , size_t nDim>
void addTauWall (const Int &iPoint, const Int &jPoint, const Container &tauWall, const VectorDbl< nDim > &unitNormal, MatrixDbl< nDim > &tau)
 Scale the stress tensor according to the target (from a wall function) magnitude in the tangential direction.
 
template<size_t nVar, size_t nDim, class PrimitiveType >
MatrixDbl< nDim, nVar > stressTensorJacobian (const PrimitiveType &V, const VectorDbl< nDim > &normal, const Double &dist_ij)
 Jacobian of the stress tensor (compressible flow).
 
template<size_t nVar, size_t nDim, class PrimitiveType >
VectorDbl< nVar > viscousFlux (const PrimitiveType &V, const MatrixDbl< nDim > &tau, const VectorDbl< nDim > &heatFlux, const VectorDbl< nDim > &normal)
 Viscous flux for compressible flows.
 

Detailed Description

Helper functions for viscous methods.

Author
P. Gomes, C. Pederson, A. Bueno, 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

◆ addPerturbedRSM()

template<class PrimitiveType , class MatrixType , size_t nDim, class... Ts>
void addPerturbedRSM ( const PrimitiveType &  V,
const MatrixType &  grad,
const Double &  turb_ke,
MatrixDbl< nDim, nDim > &  tau,
Ts...  uq_args 
)
inline

Add perturbed stress tensor.

Note
Not inlined because it is not easy to vectorize properly, due to tred2 and tql2.

◆ addQCR()

template<class MatrixType , size_t nDim>
void addQCR ( const MatrixType &  grad,
MatrixDbl< nDim > &  tau,
Double  turb_fraction 
)
inline

SA-QCR2000 modification of the stress tensor.

◆ addTauWall()

template<class Container , size_t nDim>
void addTauWall ( const Int &  iPoint,
const Int &  jPoint,
const Container &  tauWall,
const VectorDbl< nDim > &  unitNormal,
MatrixDbl< nDim > &  tau 
)
inline

Scale the stress tensor according to the target (from a wall function) magnitude in the tangential direction.

◆ averageGradient()

template<size_t nVar, size_t nDim, class GradientType >
MatrixDbl< nVar, nDim > averageGradient ( const Int &  iPoint,
const Int &  jPoint,
const GradientType &  gradient 
)
inline

Average gradients at i/j points.

◆ correctGradient()

template<size_t nVar, size_t nDim, class PrimitiveType >
void correctGradient ( const PrimitiveType &  V,
const VectorDbl< nDim > &  vector_ij,
const Double &  dist2_ij,
MatrixDbl< nVar, nDim > &  avgGrad 
)
inline

Correct average gradient with the directional derivative to avoid decoupling.

◆ stressTensor()

template<size_t nVar, size_t nDim>
MatrixDbl< nDim > stressTensor ( const Double &  viscosity,
const MatrixDbl< nVar, nDim > &  grad 
)
inline

Compute the stress tensor.

Note
Second viscosity term ignored.

◆ stressTensorJacobian()

template<size_t nVar, size_t nDim, class PrimitiveType >
MatrixDbl< nDim, nVar > stressTensorJacobian ( const PrimitiveType &  V,
const VectorDbl< nDim > &  normal,
const Double &  dist_ij 
)
inline

Jacobian of the stress tensor (compressible flow).

◆ viscousFlux()

template<size_t nVar, size_t nDim, class PrimitiveType >
VectorDbl< nVar > viscousFlux ( const PrimitiveType &  V,
const MatrixDbl< nDim > &  tau,
const VectorDbl< nDim > &  heatFlux,
const VectorDbl< nDim > &  normal 
)
inline

Viscous flux for compressible flows.