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

Convection and diffusion of a mass fraction, conservative with a diagonal, i/j-symmetric diffusion matrix. Unlike SA/SST/LM, the equation count is only known at runtime (one per transported species), so this is the framework's first Dynamic-nVar model: nEqn is passed to the base explicitly, and coefficients() loops to it rather than to a compile-time nVar. More...

#include <species_edge_flux.hpp>

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

Public Types

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

Public Member Functions

 CScalarFluxSpeciesBase (const CConfig &config)
 
template<class VariableType >
CPair< Vector< Double, Base::Size > > 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, an i/j average of (rho * mass diffusivity) per species, plus a turbulent (mu_t/Sc_t) contribution shared by every species, when a turbulence model is active; identical for both edge sides.
 
- Public Member Functions inherited from CUpwScalarBase< Double, Derived, 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 = true
 
static constexpr bool DiagonalDiffusion = true
 
- Static Public Attributes inherited from CUpwScalarBase< Double, Derived, 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.
 

Protected Member Functions

template<class VariableType >
Double turbulentDiffusivity (const FlowIndices &idx, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j) const
 Turbulent contribution to the diffusivity, shared by every species and, in the flamelet model, by the preferential diffusion terms.
 
- 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.
 

Additional Inherited Members

- Protected Types inherited from CUpwScalarBase< Double, Derived, FlowIndices, nDim, nVar >
using Base = CUpwScalarFlux< Double, Derived, 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 Attributes inherited from CUpwScalarBase< Double, Derived, 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 Derived, class FlowIndices, int nDim, size_t nVar>
class CScalarFluxSpeciesBase< Double, Derived, FlowIndices, nDim, nVar >

Convection and diffusion of a mass fraction, conservative with a diagonal, i/j-symmetric diffusion matrix. Unlike SA/SST/LM, the equation count is only known at runtime (one per transported species), so this is the framework's first Dynamic-nVar model: nEqn is passed to the base explicitly, and coefficients() loops to it rather than to a compile-time nVar.

Note
This carries no finalizeFlux of its own: the inherited CUpwScalarFlux one is exactly flux(iVar) = a0*rho_i*Y_i(iVar) + a1*rho_j*Y_j(iVar), Conservative weighting by density, which is the model's whole convective term.
It takes the most derived class as a parameter so that the flamelet model, which adds a preferential diffusion term to the same coefficients, is a sibling rather than a copy.

Member Typedef Documentation

◆ Base

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

◆ Int

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

Constructor & Destructor Documentation

◆ CScalarFluxSpeciesBase()

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

Member Function Documentation

◆ coefficients()

template<class Double , class Derived , class FlowIndices , int nDim, size_t nVar>
template<class VariableType >
CPair< Vector< Double, Base::Size > > CScalarFluxSpeciesBase< Double, Derived, 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, an i/j average of (rho * mass diffusivity) per species, plus a turbulent (mu_t/Sc_t) contribution shared by every species, when a turbulence model is active; identical for both edge sides.

◆ turbulentDiffusivity()

template<class Double , class Derived , class FlowIndices , int nDim, size_t nVar>
template<class VariableType >
Double CScalarFluxSpeciesBase< Double, Derived, FlowIndices, nDim, nVar >::turbulentDiffusivity ( const FlowIndices &  idx,
Int  iPoint,
const EdgeSide< VariableType > &  side_i,
Int  jPoint,
const EdgeSide< VariableType > &  side_j 
) const
inlineprotected

Turbulent contribution to the diffusivity, shared by every species and, in the flamelet model, by the preferential diffusion terms.

Member Data Documentation

◆ Conservative

template<class Double , class Derived , class FlowIndices , int nDim, size_t nVar>
constexpr bool CScalarFluxSpeciesBase< Double, Derived, FlowIndices, nDim, nVar >::Conservative = true
staticconstexpr

◆ DiagonalDiffusion

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

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