30#include "../scalar/scalar_edge_flux.hpp"
41template <
class Double,
class FlowIndices,
int nDim,
size_t nVar = 2>
43 :
public CUpwScalarBase<Double, CScalarFlux_SST<Double, FlowIndices, nDim, nVar>, FlowIndices, nDim, nVar> {
74 template <
class VariableType>
90 const Double sigma_kine_i = F1_i * sigma_k1 + (1.0 - F1_i) * sigma_k2;
91 const Double sigma_kine_j = F1_j * sigma_k1 + (1.0 - F1_j) * sigma_k2;
92 const Double sigma_omega_i = F1_i * sigma_om1 + (1.0 - F1_i) * sigma_om2;
93 const Double sigma_omega_j = F1_j * sigma_om1 + (1.0 - F1_j) * sigma_om2;
95 const Double diff_kine = 0.5 * ((mu_i + sigma_kine_i * muT_i) + (mu_j + sigma_kine_j * muT_j));
96 const Double diff_omega = 0.5 * ((mu_i + sigma_omega_i * muT_i) + (mu_j + sigma_omega_j * muT_j));
98 const Double lambda_i = 2.0 * (1.0 - F1_i) * rho.
i * sigma_omega_i;
99 const Double lambda_j = 2.0 * (1.0 - F1_j) * rho.
j * sigma_omega_j;
100 D.
lambda_ij = 0.5 * (lambda_i + lambda_j);
113 D.
i(0, 0) = diff_kine;
114 D.
i(1, 1) = diff_omega;
115 D.
i(1, 0) = diff_omega_T2 + diff_omega_T3_i;
117 D.
j(0, 0) = diff_kine;
118 D.
j(1, 1) = diff_omega;
119 D.
j(1, 0) = diff_omega_T2 + diff_omega_T3_j;
133 template <
size_t Size>
A templated matrix/vector-like object.
Definition C2DContainer.hpp:374
su2double GetPrimitive(unsigned long iPoint, unsigned long iVar) const final
Get a primitive variable.
Definition CFlowVariable.hpp:95
Convection and diffusion of the Menter SST model, conservative with a coupled (but neither symmetric ...
Definition turb_sst_edge_flux.hpp:43
CCoefficients coefficients(const FlowIndices &idx, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j, const CPair< Double > &rho) const
Definition turb_sst_edge_flux.hpp:75
static constexpr bool DiagonalDiffusion
Definition turb_sst_edge_flux.hpp:46
typename Base::Int Int
Definition turb_sst_edge_flux.hpp:49
static constexpr bool Conservative
Definition turb_sst_edge_flux.hpp:45
void coefficientJacobians(const ScalarFluxOptions &opt, const CCoefficients &D, const Vector< Double, Size > &projGrad, EdgeResidual< Double, nVar > &res) const
Extra Jacobian terms from the dependence of the cross-diffusion coefficient on omega.
Definition turb_sst_edge_flux.hpp:134
Upwind convection and diffusion of a transported scalar, accumulated into one residual,...
Definition scalar_edge_flux.hpp:316
typename CLaneTraits< Double_ >::Int Int
Definition scalar_edge_flux.hpp:319
Double_ Double
Definition scalar_edge_flux.hpp:318
const FlowIndices idx
Definition scalar_edge_flux.hpp:338
double passivedouble
Definition code_config.hpp:129
#define FORCEINLINE
Definition code_config.hpp:44
FORCEINLINE ARRAY_T pow(const ARRAY_T &a, const ARRAY_T &b)
Definition special_vectorization.hpp:179
Double gatherVariables(Int iPoint, const Container &vars, size_t iVar=0)
Gather a single variable, from column iVar (0 by default) of row iPoint of a 2D container,...
Definition util.hpp:277
Simple pair type for i/j variables.
Definition util.hpp:130
T i
Definition util.hpp:131
T j
Definition util.hpp:131
Diffusion coefficients of both orientations of the edge, and the terms of the cross diffusion that th...
Definition turb_sst_edge_flux.hpp:69
Double omega_i
Definition turb_sst_edge_flux.hpp:71
Double omega_j
Definition turb_sst_edge_flux.hpp:71
Matrix< Double, nVar, nVar > i
Definition turb_sst_edge_flux.hpp:70
Double lambda_ij
Definition turb_sst_edge_flux.hpp:71
Matrix< Double, nVar, nVar > j
Definition turb_sst_edge_flux.hpp:70
Residual of one edge, accumulated by the convective and the diffusive terms.
Definition util.hpp:169
Matrix< Double, Size, Size > jac_jj
Definition util.hpp:177
Matrix< Double, Size, Size > jac_ji
Definition util.hpp:177
Matrix< Double, Size, Size > jac_ii
Definition util.hpp:177
Matrix< Double, Size, Size > jac_ij
Definition util.hpp:177
Locates the data of one endpoint of an edge.
Definition scalar_edge_flux.hpp:42
const CFlowVariable * flowNodes
Flow variables, null for solid heat transfer.
Definition scalar_edge_flux.hpp:44
const VariableType & scalarNodes
Scalar solver variables.
Definition scalar_edge_flux.hpp:43
Loop invariant flags for a scalar edge flux, built once outside the edge loop so the compiler can uns...
Definition scalar_edge_flux.hpp:55
bool oneSided
Whether only the row of i is assembled.
Definition scalar_edge_flux.hpp:63