Documentation 6b54b78464
Loading...
Searching...
No Matches
CScalarFlux_SA< Double, FlowIndices, nDim, nVar > Class Template Reference

Convection and diffusion of the Spalart-Allmaras model, non-conservative and with a diagonal (but asymmetric) diffusion coefficient. More...

#include <turb_sa_edge_flux.hpp>

Inheritance diagram for CScalarFlux_SA< Double, FlowIndices, nDim, nVar >:
[legend]

Public Types

using Base = CUpwScalarBase< Double, CScalarFlux_SA, FlowIndices, nDim, nVar >
 
using Int = typename Base::Int
 
- Public Types inherited from CUpwScalarBase< Double, CScalarFlux_SA< Double, FlowIndices, nDim, nVar >, FlowIndices, nDim, nVar >
using Double = Double
 
using Int = typename CLaneTraits< Double >::Int
 

Public Member Functions

 CScalarFlux_SA (const CConfig &config)
 
template<class VariableType , size_t Size>
void finalizeFlux (const FlowIndices &, const ScalarFluxOptions &opt, Int, const EdgeSide< VariableType > &, Int, const EdgeSide< VariableType > &, const Double &a0, const Double &a1, const CPair< Double > &, const CPair< CScalarValues< Double, Size > > &phi, EdgeResidual< Double, nVar > &res) const
 SA convection, plus the centered advection of the backscatter equations when nVar > 1.
 
Double fn (const Double &zeta) const
 fn, the positivity-preserving correction to the SA-neg diffusion coefficient (Allmaras, Johnson & Spalart), 1 when nu_tilde is not negative enough to need it.
 
template<class VariableType >
CPair< Vector< Double, nVar > > coefficients (const FlowIndices &idx, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j, const CPair< Double > &rho) const
 Diffusion coefficients of both orientations of the edge.
 
template<class Coefficients , size_t Size>
void coefficientJacobians (const ScalarFluxOptions &opt, const Coefficients &, const Vector< Double, Size > &projGrad, EdgeResidual< Double, nVar > &res) const
 Extra Jacobian terms from the dependence of the diffusion coefficient on nu_tilde.
 
- Public Member Functions inherited from CUpwScalarBase< Double, CScalarFlux_SA< Double, FlowIndices, nDim, nVar >, FlowIndices, nDim, nVar >
 CUpwScalarBase (const CConfig &config, size_t nEqn_=nVar_)
 Constructor, inherited by the model with using Base::Base.
 
EdgeResidual< Double, nVar > ComputeFlux (const ScalarFluxOptions &opt, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j, const Vector< Double, nDim > &normal, const Double &massFlux) const
 
void ComputeFlux (const ScalarFluxOptions &opt, Int iEdge, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j, const Vector< Double, nDim > &normal, const Double &massFlux, UpdateType updateType, Double updateMask, CSysVector< su2double > &vector, CSysVector< su2double > &vectorDiff, SparseMatrixType &matrix) const
 Compute the flux of an edge and write it to the linear system.
 

Static Public Attributes

static constexpr bool Conservative = false
 
static constexpr bool DiagonalDiffusion = true
 
static constexpr bool DiffusionReadsDensity = true
 The kinematic viscosities below.
 
- Static Public Attributes inherited from CUpwScalarBase< Double, CScalarFlux_SA< Double, FlowIndices, nDim, nVar >, FlowIndices, nDim, nVar >
static constexpr int nDim
 
static constexpr size_t nVar
 
static constexpr size_t Size
 Backing size, for the model to size the containers its coefficients() returns; nVar itself is Dynamic for a runtime model and never usable as a container size.
 
static constexpr bool DiffusionReadsDensity
 Whether the model's diffusion coefficients read the density, beyond the reading that Conservative already implies. A model that declares neither never gathers it.
 

Additional Inherited Members

- Protected Types inherited from CUpwScalarBase< Double, CScalarFlux_SA< Double, FlowIndices, nDim, nVar >, FlowIndices, nDim, nVar >
using Base = CUpwScalarFlux< Double, CScalarFlux_SA< Double, FlowIndices, nDim, nVar >, FlowIndices, nDim_, nVar_ >
 
- Protected Types inherited from CUpwScalarFlux< Double, Derived, FlowIndices, nDim, nVar >
using Int = typename CLaneTraits< Double >::Int
 
- Protected Types inherited from CAvgGradScalarBase< Double, Derived, FlowIndices, nDim, nVar >
using Int = typename CLaneTraits< Double >::Int
 
- Protected Member Functions inherited from CUpwScalarFlux< Double, Derived, FlowIndices, nDim, nVar >
 CUpwScalarFlux (const CConfig &)
 
template<class VariableType , size_t Size>
void finalizeFlux (const FlowIndices &, const ScalarFluxOptions &opt, Int, const EdgeSide< VariableType > &, Int, const EdgeSide< VariableType > &, const Double &a0, const Double &a1, const CPair< Double > &rho, const CPair< CScalarValues< Double, Size > > &phi, EdgeResidual< Double, nVar > &res) const
 Upwind convection of the transported variable, weighted by the density for a conservative model.
 
- Protected Member Functions inherited from CAvgGradScalarBase< Double, Derived, FlowIndices, nDim, nVar >
template<class VariableType >
void diffusionTerms (const FlowIndices &idx, const ScalarFluxOptions &opt, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j, const CPair< Double > &rho, const Vector< Double, nDim > &normal, const Vector< Double, nDim > &vector_ij, EdgeResidual< Double, nVar > &res) const
 
template<class... Ts>
void coefficientJacobians (Ts &&...) const
 Contribution of the derivatives of the coefficients themselves.
 
template<class... Ts>
void extraDiffusionTerms (Ts &&...) const
 Diffusion of a model that transports more than one gradient, of states it synthesises from its own containers.
 
- Protected Attributes inherited from CUpwScalarBase< Double, CScalarFlux_SA< Double, FlowIndices, nDim, nVar >, FlowIndices, nDim, nVar >
const FlowIndices idx
 
const size_t nEqn
 Equations of the model, which a dynamic one gives to its base.
 
const su2double kappa
 MUSCL reconstruction parameters, read from CConfig once per construction (i.e. once per nonlinear iteration, see CScalarSolver::EdgeFluxResidual) instead of per edge; this is also where the scalar limiter's freezing (GetLimiterIter) is resolved, by collapsing its type to NONE once frozen. The flow limiter is not frozen this way: once the flow solver stops recomputing it, it keeps applying the last values it has.
 
const su2double umusclRamp
 
const su2double kappaFlow
 
const LIMITER limiterType
 
const LIMITER limiterTypeFlow
 
const bool musclFlow
 

Detailed Description

template<class Double, class FlowIndices, int nDim, size_t nVar>
class CScalarFlux_SA< Double, FlowIndices, nDim, nVar >

Convection and diffusion of the Spalart-Allmaras model, non-conservative and with a diagonal (but asymmetric) diffusion coefficient.

Note
SA writes its own convective term rather than using the inherited CUpwScalarFlux one, because with stochastic backscatter active (nVar 4) the three Langevin equations are advected with a centered flux, unlike the plain upwind SA equation itself.

Member Typedef Documentation

◆ Base

template<class Double , class FlowIndices , int nDim, size_t nVar>
using CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::Base = CUpwScalarBase<Double, CScalarFlux_SA, FlowIndices, nDim, nVar>

◆ Int

template<class Double , class FlowIndices , int nDim, size_t nVar>
using CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::Int = typename Base::Int

Constructor & Destructor Documentation

◆ CScalarFlux_SA()

template<class Double , class FlowIndices , int nDim, size_t nVar>
CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::CScalarFlux_SA ( const CConfig &  config)
inlineexplicit

Member Function Documentation

◆ coefficientJacobians()

template<class Double , class FlowIndices , int nDim, size_t nVar>
template<class Coefficients , size_t Size>
void CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::coefficientJacobians ( const ScalarFluxOptions &  opt,
const Coefficients &  ,
const Vector< Double, Size > &  projGrad,
EdgeResidual< Double, nVar > &  res 
) const
inline

Extra Jacobian terms from the dependence of the diffusion coefficient on nu_tilde.

Note
Skipped for SA-neg, whose fn-corrected coefficient was found (upstream, pre-migration) to diverge with exact Jacobians; frozen (TSL-only) Jacobians are used there instead. Skipped for standard SA too unless USE_ACCURATE_TURB_JACOBIANS is set, matching the pre-migration default of using frozen Jacobians there as well.

◆ coefficients()

template<class Double , class FlowIndices , int nDim, size_t nVar>
template<class VariableType >
CPair< Vector< Double, nVar > > CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::coefficients ( const FlowIndices &  idx,
Int  iPoint,
const EdgeSide< VariableType > &  side_i,
Int  jPoint,
const EdgeSide< VariableType > &  side_j,
const CPair< Double > &  rho 
) const
inline

Diffusion coefficients of both orientations of the edge.

Note
The coefficient is not symmetric: it uses the transported variable of the row it is going to be used for (the quadratic, non-conservative part of the diffusion term). Coefficients past index 0 are left at zero, the backscatter equations have no diffusion.

◆ finalizeFlux()

template<class Double , class FlowIndices , int nDim, size_t nVar>
template<class VariableType , size_t Size>
void CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::finalizeFlux ( const FlowIndices &  ,
const ScalarFluxOptions &  opt,
Int  ,
const EdgeSide< VariableType > &  ,
Int  ,
const EdgeSide< VariableType > &  ,
const Double &  a0,
const Double &  a1,
const CPair< Double > &  ,
const CPair< CScalarValues< Double, Size > > &  phi,
EdgeResidual< Double, nVar > &  res 
) const
inline

SA convection, plus the centered advection of the backscatter equations when nVar > 1.

◆ fn()

template<class Double , class FlowIndices , int nDim, size_t nVar>
Double CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::fn ( const Double &  zeta) const
inline

fn, the positivity-preserving correction to the SA-neg diffusion coefficient (Allmaras, Johnson & Spalart), 1 when nu_tilde is not negative enough to need it.

Member Data Documentation

◆ Conservative

template<class Double , class FlowIndices , int nDim, size_t nVar>
constexpr bool CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::Conservative = false
staticconstexpr

◆ DiagonalDiffusion

template<class Double , class FlowIndices , int nDim, size_t nVar>
constexpr bool CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::DiagonalDiffusion = true
staticconstexpr

◆ DiffusionReadsDensity

template<class Double , class FlowIndices , int nDim, size_t nVar>
constexpr bool CScalarFlux_SA< Double, FlowIndices, nDim, nVar >::DiffusionReadsDensity = true
staticconstexpr

The kinematic viscosities below.


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