MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
FvSysEqnEEGas< nDim > Class Template Reference

#include <fvcartesiansyseqneegas.h>

Inheritance diagram for FvSysEqnEEGas< nDim >:
[legend]
Collaboration diagram for FvSysEqnEEGas< nDim >:
[legend]

Classes

struct  AdditionalVariables
 Static indices for accessing additional variables. More...
 
struct  ConservativeVariables
 Static indices for accessing conservative variables in nDim spatial dimensions. More...
 
struct  FluxVariables
 Static indices for accessing flux variables. More...
 
struct  PrimitiveVariables
 Static indices for accessing primitive variables in nDim spatial dimensions. More...
 

Public Member Functions

 FvSysEqnEEGas (const MInt solverId, const MInt noSpecies)
 
template<MInt stencil = AUSM>
void Ausm (const MInt orientation, const MFloat upwindCoefficient, const MFloat A, const MFloat *const leftVars, const MFloat *const rightVars, const MFloat *const NotUsed(srfcCoeff), MFloat *const flux)
 
void AusmBndryCorrection (const MInt orientation, const MFloat A, const MFloat *const leftVars, const MFloat *const rightVars, MFloat *const flux)
 
template<MInt stencil>
void viscousFlux (const MInt orientation, const MFloat A, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat *const srfcCoeff, const MFloat f0, const MFloat f1, MFloat *const flux)
 
template<MInt stencil>
void viscousFlux (const MInt, const MFloat, const MBool, const MFloat *const, const MFloat *const, const MFloat *const, const MFloat *const, const MFloat *const, const MFloat *const, const MFloat *const, const MFloat *const, const MFloat *const, const MFloat, const MFloat, MFloat *const)
 
void viscousFluxFivePoint (const MInt orientation, const MFloat A, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat *const srfcCoeff, const MFloat f0, const MFloat f1, MFloat *const flux)
 
void computePrimitiveVariables (const MFloat *const cvarsCell, MFloat *const pvarsCell, const MFloat *const avarsCell)
 
void computeConservativeVariables (const MFloat *const pvarsCell, MFloat *const cvarsCell, const MFloat *const NotUsed(avarsCell))
 
std::vector< std::vector< MFloat > > conservativeSlopes (const MFloat *const pvarsCell, const MFloat *const cvarsCell, const MFloat *const avarsCell, const MFloat *const slopesCell)
 
- Public Member Functions inherited from FvSysEqnNS< nDim >
 FvSysEqnNS (const MInt solverId, const MInt noSpecies)
 
template<MInt scheme = AUSM>
void Ausm (const MInt orientation, const MFloat upwindCoefficient, const MFloat A, const MFloat *const leftVars, const MFloat *const rightVars, const MFloat *const srfcCoeff, MFloat *const flux)
 
void Ausm_ (const MInt orientation, const MFloat upwindCoefficient, const MFloat A, const MFloat *const leftVars, const MFloat *const rightVars, const MFloat *const NotUsed(srfcCoeff), MFloat *const flux)
 
void AusmPlus_ (const MInt orientation, const MFloat upwindCoefficient, const MFloat A, const MFloat *const leftVars, const MFloat *const rightVars, const MFloat *const NotUsed(srfcCoeff), MFloat *const flux)
 
void Slau_ (const MInt orientation, const MFloat NotUsed(upwindCoefficient), const MFloat A, const MFloat *const leftVars, const MFloat *const rightVars, const MFloat *const NotUsed(srfcCoeff), MFloat *const flux)
 
void AusmBndryCorrection (const MInt orientation, const MFloat A, const MFloat *const leftVars, const MFloat *const rightVars, MFloat *const flux)
 
void AusmALECorrection (const MInt orientation, const MFloat A, MFloat *const flux, MFloat *const surfVars, const MFloat *const bndrySurfVars)
 
template<MInt centralizeScheme>
void centralizeSurfaceVariables (MFloat *const varL, MFloat *const varR, const MInt orientation, const MFloat levelFac)
 
template<MInt stencil>
void viscousFlux (const MInt orientation, const MFloat A, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat *const srfcCoeff, const MFloat f0, const MFloat f1, MFloat *const flux)
 
template<MInt stencil>
void viscousFlux (const MInt orientation, const MFloat A, const MBool isBndry, const MFloat *const surfaceCoords, const MFloat *const coord0, const MFloat *const coord1, const MFloat *const cellVars0, const MFloat *const cellVars1, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat f0, const MFloat f1, MFloat *const flux)
 
void viscousFluxFivePoint (const MInt orientation, const MFloat A, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat *const NotUsed(srfcCoeff), const MFloat f0, const MFloat f1, MFloat *const flux)
 
void viscousFluxThreePoint (const MInt orientation, const MFloat A, const MBool isBndry, const MFloat *const surfaceCoords, const MFloat *const coord0, const MFloat *const coord1, const MFloat *const cellVars0, const MFloat *const cellVars1, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat f0, const MFloat f1, MFloat *const flux)
 
void viscousFluxStabilized (const MInt orientation, const MFloat A, const MBool isBndry, const MFloat *const surfaceCoords, const MFloat *const coord0, const MFloat *const coord1, const MFloat *const cellVars0, const MFloat *const cellVars1, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat f0, const MFloat f1, MFloat *const flux)
 Computes the viscous fluxes using a five-point stencil (less dissipative) blended with a compact stencil (increased stability). Short: (1-enhanceThreePointViscFluxFactor)*FIVE_POINT + enhanceThreePointViscFluxFactor*THREE_POINT Default for centralizeViscousFlux is 0.1 if not defined in property file. More...
 
template<MInt stencil>
void wmViscousFluxCorrection (const MInt orientation, const MFloat A, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat f0, const MFloat f1, MFloat *const flux, MFloat const mue_wm)
 
void wmViscousFluxCorrectionFivePoint (const MInt orientation, const MFloat A, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat f0, const MFloat f1, MFloat *const flux, MFloat const mue_wm)
 
void computePrimitiveVariables (const MFloat *const cvarsCell, MFloat *const pvarsCell, const MFloat *const NotUsed(avarsCell))
 
void computeConservativeVariables (const MFloat *const pvarsCell, MFloat *const cvarsCell, const MFloat *const NotUsed(avarsCell))
 
std::vector< std::vector< MFloat > > conservativeSlopes (const MFloat *const pvarsCell, const MFloat *const cvarsCell, const MFloat *const avarsCell, const MFloat *const slopesCell)
 
void computeVolumeForces (const MInt, MFloat *, MFloat *, const MFloat, const MFloat *const, const MInt, const MInt *const, const MFloat *const, const MInt, MFloat)
 
constexpr MFloat speedOfSound (const MFloat density, const MFloat pressure)
 Speed of sound: a = sqrt(gamma * pressure / density) More...
 
constexpr MFloat speedOfSoundSquared (const MFloat density, const MFloat pressure)
 speed of sound squared a^2 = gamma * pressure / density More...
 
constexpr MFloat speedOfSound (const MFloat temperature)
 Speed of sound: a = sqrt(T) More...
 
constexpr MFloat temperature_ES (const MFloat density, const MFloat pressure)
 Temperature: T = gamma * pressure / density (equation of state - ideal gas law) More...
 
constexpr MFloat pressure_ES (const MFloat temperture, const MFloat density)
 pressure: p = rho * T / gamma (equation of state - ideal gas law) More...
 
constexpr MFloat density_ES (const MFloat pressure, const MFloat temperature)
 density: rho = gamma * p / T (equation of state - ideal gas law) More...
 
constexpr MFloat temperature_IR (const MFloat Ma)
 Temperature: T = 1 / (1 + (gamma - 1)/2 * Ma^2) (isentropic relationship) More...
 
constexpr MFloat pressure_IR (const MFloat temperature)
 
constexpr MFloat pressure_IRit (const MFloat pressure, const MFloat massFlux)
 
constexpr MFloat density_IR (const MFloat temperature)
 density: rho = T^(1/(gamma -1 )) (isentropic relationship) More...
 
constexpr MFloat density_IR_P (const MFloat pressure)
 density: rho = (p * gamma)^(1/gamma) (isentropic relationship) More...
 
constexpr MFloat pressure (const MFloat density, const MFloat momentumDensitySquared, const MFloat energyDensity)
 
constexpr MFloat internalEnergy (const MFloat pressure, const MFloat density, const MFloat velocitySquared)
 
constexpr MFloat pressureEnergy (const MFloat pressure)
 
constexpr MFloat enthalpy (const MFloat pressure, const MFloat density)
 enthalpy from primitive variables More...
 
constexpr MFloat entropy (const MFloat pressure, const MFloat density)
 entropy from primitive variables More...
 
constexpr MFloat CroccoBusemann (const MFloat Ma, const MFloat x)
 Crocco-Busemann relation. More...
 
constexpr MFloat vanDriest (const MFloat Ma)
 van-Driest Transformation (correspods to R*H) More...
 
constexpr MFloat sutherlandLaw (const MFloat T)
 
MFloat computeTimeStepEulerMagnitude (const MFloat rho, const std::array< MFloat, nDim > u, const MFloat p, const MFloat C, const MFloat dx)
 
constexpr MFloat gamma_Ref ()
 
constexpr MFloat cp_Ref ()
 
constexpr MFloat cv_Ref ()
 
constexpr MFloat p_Ref ()
 
constexpr MFloat computeTimeStepDiffusion (const MFloat diffusion_coefficient, const MFloat C, const MFloat dx)
 

Public Attributes

ConservativeVariablesCV = nullptr
 
FluxVariablesFV = nullptr
 
PrimitiveVariablesPV = nullptr
 
AdditionalVariablesAV = nullptr
 
MFloat m_muInfinity
 
MFloat m_Re0
 
- Public Attributes inherited from FvSysEqnNS< nDim >
MFloat m_Re0 = {}
 
MFloat m_muInfinity = {}
 
ConservativeVariablesCV = nullptr
 
FluxVariablesFV = nullptr
 
PrimitiveVariablesPV = nullptr
 
AdditionalVariablesAV = nullptr
 
SurfaceCoefficientsSC = nullptr
 

Static Public Attributes

static constexpr MBool hasAV = true
 
static constexpr MBool hasSC = false
 
- Static Public Attributes inherited from FvSysEqnNS< nDim >
static constexpr MInt m_noRansEquations = 0
 
static constexpr MInt m_ransModel = NORANS
 
static constexpr MBool hasAV = false
 
static constexpr MBool hasSC = false
 
static const MUint index0 [nDim]
 
static const MUint index1 [nDim]
 

Private Types

using Base = FvSysEqnNS< nDim >
 

Private Member Functions

void readProperties ()
 

Static Private Member Functions

static constexpr std::array< MInt, nDim > getArray012 ()
 

Private Attributes

MFloat m_EEGasEps
 
MUint m_noSpecies
 
MInt m_solverId
 
MFloat m_F1BGammaMinusOne
 
MFloat m_gamma
 
MFloat m_gammaMinusOne
 
MFloat m_gFGMOrPr
 
MFloat m_referenceTemperature
 
MFloat m_sutherlandConstant
 
MFloat m_sutherlandConstantThermal
 
MFloat m_sutherlandPlusOne
 
MFloat m_sutherlandPlusOneThermal
 

Static Private Attributes

static const MUint index0 [nDim]
 
static const MUint index1 [nDim]
 

Additional Inherited Members

- Protected Member Functions inherited from FvSysEqnNS< nDim >
void readProperties ()
 
- Static Protected Member Functions inherited from FvSysEqnNS< nDim >
static MFloat sgn (MFloat val)
 
static constexpr std::array< MInt, nDim > getArray012 ()
 
- Protected Attributes inherited from FvSysEqnNS< nDim >
MUint m_noSpecies
 
MInt m_solverId
 
MFloat m_gamma = 1.4
 
MFloat m_gammaMinusOne = m_gamma - 1
 
MFloat m_F1BGammaMinusOne = 1 / m_gammaMinusOne
 
MFloat m_FGammaBGammaMinusOne = m_gamma / m_gammaMinusOne
 
MFloat m_F1BGamma = 1 / m_gamma
 
MFloat m_Pr = 0.72
 
MFloat m_F1BPr = 1 / m_Pr
 
MFloat m_referenceTemperature = {}
 
MFloat m_sutherlandPlusOne = {}
 
MFloat m_sutherlandConstant = {}
 
MFloat m_sutherlandPlusOneThermal = {}
 
MFloat m_sutherlandConstantThermal = {}
 
MFloat m_gFGMOrPr = {}
 
MFloat m_enhanceThreePointViscFluxFactor {}
 
MFloat m_centralizeSurfaceVariablesFactor = 0.0
 

Detailed Description

template<MInt nDim>
class FvSysEqnEEGas< nDim >

Definition at line 22 of file fvcartesiansyseqneegas.h.

Member Typedef Documentation

◆ Base

template<MInt nDim>
using FvSysEqnEEGas< nDim >::Base = FvSysEqnNS<nDim>
private

Definition at line 77 of file fvcartesiansyseqneegas.h.

Constructor & Destructor Documentation

◆ FvSysEqnEEGas()

template<MInt nDim>
FvSysEqnEEGas< nDim >::FvSysEqnEEGas ( const MInt  solverId,
const MInt  noSpecies 
)

Definition at line 11 of file fvcartesiansyseqneegas.cpp.

11 : FvSysEqnNS<nDim>(solverId, noSpecies) {
12 CV = new ConservativeVariables();
13 PV = new PrimitiveVariables();
14 FV = new FluxVariables();
15
17}
PrimitiveVariables * PV
FluxVariables * FV
ConservativeVariables * CV

Member Function Documentation

◆ Ausm()

template<MInt nDim>
template<MInt stencil>
void FvSysEqnEEGas< nDim >::Ausm ( const MInt  orientation,
const MFloat  upwindCoefficient,
const MFloat  A,
const MFloat *const  leftVars,
const MFloat *const  rightVars,
const MFloat *const   NotUsedsrfcCoeff,
MFloat *const  flux 
)
inline

Definition at line 211 of file fvcartesiansyseqneegas.h.

213 {
214 // catch the primitive variables rho and p,
215 // compute speed of sound, and interface mach number
216 const MFloat RHOL = leftVars[PV->RHO];
217 const MFloat PL = leftVars[PV->P];
218 const MFloat AL = sqrt(m_gamma * mMax(MFloatEps, PL / mMax(MFloatEps, RHOL)));
219 const MFloat ML = leftVars[orientation] / AL;
220
221 const MFloat ALPHAL = mMax(mMin(leftVars[PV->Y[0]], F1), F0);
222
223 const MFloat RHOR = rightVars[PV->RHO];
224 const MFloat PR = rightVars[PV->P];
225 const MFloat AR = sqrt(m_gamma * mMax(MFloatEps, PR / mMax(MFloatEps, RHOR)));
226 const MFloat MR = rightVars[orientation] / AR;
227
228 const MFloat ALPHAR = mMax(mMin(rightVars[PV->Y[0]], F1), F0);
229
230 // calculation of the resulting pressure and mach number on the surface
231 const MFloat MLR = 0.5 * (ML + MR);
232 const MFloat PLR = PL * (0.5 + upwindCoefficient * ML) + PR * (0.5 - upwindCoefficient * MR);
233
234 const MFloat ALPHALR = 0.5 * (ALPHAL + ALPHAR);
235
236 // calculation of the left and right rho*a
237 const MFloat RHO_AL = RHOL * AL;
238 const MFloat RHO_AR = RHOR * AR;
239
240 // calculation of the resulting mass flux through the surface
241 const MFloat RHO_U2 = 0.25 * (MLR * (RHO_AL + RHO_AR) + fabs(MLR) * (RHO_AL - RHO_AR));
242 const MFloat AbsRHO_U2 = fabs(RHO_U2);
243
244 std::array<MFloat, nDim> pFactor{};
245 pFactor[orientation] = 1.0;
246
247 for(MUint n = 0; n < nDim; n++) {
248 flux[FV->A_RHO_VV[n]] = ALPHALR
249 * (RHO_U2 * (leftVars[PV->VV[n]] + rightVars[PV->VV[n]])
250 + AbsRHO_U2 * (leftVars[PV->VV[n]] - rightVars[PV->VV[n]]))
251 * A;
252 flux[FV->P_RHO_VV[n]] = PLR * pFactor[n] * A;
253 }
254
255 flux[FV->A_RHO] = ALPHALR * 2.0 * RHO_U2 * A;
256}
constexpr T mMin(const T &x, const T &y)
Definition: functions.h:90
constexpr T mMax(const T &x, const T &y)
Definition: functions.h:94
uint32_t MUint
Definition: maiatypes.h:63
double MFloat
Definition: maiatypes.h:52
static constexpr std::array< MInt, nDim > A_RHO_VV
static constexpr std::array< MInt, nDim > P_RHO_VV
static constexpr std::array< MInt, nDim > VV

◆ AusmBndryCorrection()

template<MInt nDim>
void FvSysEqnEEGas< nDim >::AusmBndryCorrection ( const MInt  orientation,
const MFloat  A,
const MFloat *const  leftVars,
const MFloat *const  rightVars,
MFloat *const  flux 
)
inline

Definition at line 259 of file fvcartesiansyseqneegas.h.

261 {
262 for(MInt n = 0; n < nDim; n++) {
263 flux[FV->A_RHO_VV[n]] = F0;
264 }
265 flux[FV->A_RHO] = F0;
266}
int32_t MInt
Definition: maiatypes.h:62

◆ computeConservativeVariables()

template<MInt nDim>
void FvSysEqnEEGas< nDim >::computeConservativeVariables ( const MFloat *const  pvarsCell,
MFloat *const  cvarsCell,
const MFloat *const   NotUsedavarsCell 
)
inline

Definition at line 342 of file fvcartesiansyseqneegas.h.

344 {
345 cvarsCell[CV->A_RHO] = pvarsCell[PV->RHO] * pvarsCell[PV->A];
346 for(MInt vel = 0; vel < nDim; vel++) {
347 cvarsCell[CV->A_RHO_VV[vel]] = cvarsCell[CV->A_RHO] * pvarsCell[PV->VV[vel]];
348 }
349}

◆ computePrimitiveVariables()

template<MInt nDim>
void FvSysEqnEEGas< nDim >::computePrimitiveVariables ( const MFloat *const  cvarsCell,
MFloat *const  pvarsCell,
const MFloat *const  avarsCell 
)
inline

Definition at line 324 of file fvcartesiansyseqneegas.h.

325 {
326 MFloat fRhoAlpha = F0;
327 if(cvarsCell[CV->A_RHO] > -m_EEGasEps) {
328 fRhoAlpha = F1 / mMax(cvarsCell[CV->A_RHO], m_EEGasEps);
329 } else {
330 fRhoAlpha = F1 / cvarsCell[CV->A_RHO];
331 }
332
333 for(MInt vel = 0; vel < nDim; ++vel) {
334 pvarsCell[PV->VV[vel]] = cvarsCell[CV->A_RHO_VV[vel]] * fRhoAlpha;
335 }
336 pvarsCell[PV->RHO] = pvarsCell[PV->P] * m_gamma + avarsCell[AV->DC]; // density
337
338 pvarsCell[PV->A] = cvarsCell[CV->A_RHO] / pvarsCell[PV->RHO]; // alpha
339}
AdditionalVariables * AV

◆ conservativeSlopes()

template<MInt nDim>
std::vector< std::vector< MFloat > > FvSysEqnEEGas< nDim >::conservativeSlopes ( const MFloat *const  pvarsCell,
const MFloat *const  cvarsCell,
const MFloat *const  avarsCell,
const MFloat *const  slopesCell 
)
inline

Definition at line 353 of file fvcartesiansyseqneegas.h.

355 {
356 mTerm(1, AT_,
357 "SysEqnEEGas has not been tested with adaptation. The computation of the conservative variables should be "
358 "adjusted. Terminating.");
359 std::vector<std::vector<MFloat>> dQ(CV->noVariables, std::vector<MFloat>(nDim));
360 return dQ;
361}
void mTerm(const MInt errorCode, const MString &location, const MString &message)
Definition: functions.cpp:29

◆ getArray012()

template<MInt nDim>
static constexpr std::array< MInt, nDim > FvSysEqnNS< nDim >::getArray012 ( )
inlinestaticconstexprprivate

Definition at line 316 of file fvcartesiansyseqnns.h.

316 {
317 IF_CONSTEXPR(nDim == 2) {
318 std::array<MInt, 2> a = {0, 1};
319 return a;
320 }
321 else {
322 std::array<MInt, 3> a = {0, 1, 2};
323 return a;
324 }
325 }
Definition: contexttypes.h:19

◆ readProperties()

template<MInt nDim>
void FvSysEqnEEGas< nDim >::readProperties
private

Definition at line 20 of file fvcartesiansyseqneegas.cpp.

20 {
21 m_EEGasEps = 1.0e-10;
22 m_EEGasEps = Context::getSolverProperty<MFloat>("EEGasEps", m_solverId, AT_, &m_EEGasEps);
23}

◆ viscousFlux() [1/2]

template<MInt nDim>
template<MInt stencil>
void FvSysEqnEEGas< nDim >::viscousFlux ( const MInt  orientation,
const MFloat  A,
const MFloat *const  vars0,
const MFloat *const  vars1,
const MFloat *const  slope0,
const MFloat *const  slope1,
const MFloat *const  srfcCoeff,
const MFloat  f0,
const MFloat  f1,
MFloat *const  flux 
)
inline

Definition at line 38 of file fvcartesiansyseqneegas.h.

40 {
41 if(stencil == FIVE_POINT) {
42 viscousFluxFivePoint(orientation, A, vars0, vars1, slope0, slope1, srfcCoeff, f0, f1, flux);
43 } else {
44 TERMM(1, "Viscous Flux Scheme not implemented.");
45 }
46 }
void viscousFluxFivePoint(const MInt orientation, const MFloat A, const MFloat *const vars0, const MFloat *const vars1, const MFloat *const slope0, const MFloat *const slope1, const MFloat *const srfcCoeff, const MFloat f0, const MFloat f1, MFloat *const flux)
@ FIVE_POINT
Definition: enums.h:184

◆ viscousFlux() [2/2]

template<MInt nDim>
template<MInt stencil>
void FvSysEqnEEGas< nDim >::viscousFlux ( const  MInt,
const  MFloat,
const  MBool,
const MFloat * const  ,
const MFloat * const  ,
const MFloat * const  ,
const MFloat * const  ,
const MFloat * const  ,
const MFloat * const  ,
const MFloat * const  ,
const MFloat * const  ,
const MFloat * const  ,
const  MFloat,
const  MFloat,
MFloat * const   
)
inline

Definition at line 50 of file fvcartesiansyseqneegas.h.

53 {
54 if(stencil == THREE_POINT) {
55 TERMM(1, "Three point viscous Flux Scheme not implemented for SysEqnEEGas.");
56 } else {
57 TERMM(1, "Viscous Flux Scheme not implemented.");
58 }
59 }
@ THREE_POINT
Definition: enums.h:184

◆ viscousFluxFivePoint()

template<MInt nDim>
void FvSysEqnEEGas< nDim >::viscousFluxFivePoint ( const MInt  orientation,
const MFloat  A,
const MFloat *const  vars0,
const MFloat *const  vars1,
const MFloat *const  slope0,
const MFloat *const  slope1,
const MFloat *const  srfcCoeff,
const MFloat  f0,
const MFloat  f1,
MFloat *const  flux 
)
inline

Definition at line 269 of file fvcartesiansyseqneegas.h.

273 {
274 static const MFloat F1BRe0 = F1 / m_Re0;
275
276 const MFloat rho = F1B2 * (vars0[PV->RHO] + vars1[PV->RHO]);
277 const MFloat F1Brho = F1 / rho;
278 const MFloat p = F1B2 * (vars0[PV->P] + vars1[PV->P]);
279 const MFloat alpha = F1B2 * (vars0[PV->A] + vars1[PV->A]);
280
281 // Temperature on the surface T = gamma * p / rho
282 const MFloat T = m_gamma * p * F1Brho;
283
284 // Indices for the orientations
285 const MUint id0 = orientation;
286 const MUint id1 = index0[orientation];
287 const MUint id2 = index1[orientation];
288
289 // Compute A / Re
290 const MFloat dAOverRe = A * F1BRe0;
291
292 // calculate the viscosity with the sutherland law mue = T^3/2 * (1+S/T_0)(T + S/T_0)
293 const MFloat mue = (T * sqrt(T) * m_sutherlandPlusOne) / (T + m_sutherlandConstant);
294
295 // Compute the stress terms
296 const MUint s00 = id0 * nDim + id0;
297 const MUint s01 = id0 * nDim + id1;
298 const MUint s10 = id1 * nDim + id0;
299 const MUint s11 = id1 * nDim + id1;
300
301 std::array<MFloat, nDim> tau{};
302 if(nDim == 2) {
303 tau[id0] =
304 mue * alpha * (f0 * (F4B3 * slope0[s00] - F2B3 * slope0[s11]) + f1 * (F4B3 * slope1[s00] - F2B3 * slope1[s11]));
305 tau[id1] = mue * alpha * (f0 * (slope0[s01] + slope0[s10]) + f1 * (slope1[s01] + slope1[s10]));
306 } else if(nDim == 3) {
307 const MUint s22 = id2 * nDim + id2;
308 const MUint s02 = id0 * nDim + id2;
309 const MUint s20 = id2 * nDim + id0;
310 tau[id0] = mue * alpha
311 * (f0 * (F4B3 * slope0[s00] - F2B3 * (slope0[s11] + slope0[s22]))
312 + f1 * (F4B3 * slope1[s00] - F2B3 * (slope1[s11] + slope1[s22])));
313 tau[id1] = mue * alpha * (f0 * (slope0[s01] + slope0[s10]) + f1 * (slope1[s01] + slope1[s10]));
314 tau[id2] = mue * alpha * (f0 * (slope0[s02] + slope0[s20]) + f1 * (slope1[s02] + slope1[s20]));
315 }
316
317 // Compute the flux
318 for(MUint n = 0; n < nDim; n++) {
319 flux[FV->A_RHO_VV[n]] -= dAOverRe * tau[n];
320 }
321}
static const MUint index1[nDim]
static const MUint index0[nDim]
constexpr std::underlying_type< FcCell >::type p(const FcCell property)
Converts property name to underlying integer value.

Member Data Documentation

◆ AV

template<MInt nDim>
AdditionalVariables* FvSysEqnEEGas< nDim >::AV = nullptr

Definition at line 113 of file fvcartesiansyseqneegas.h.

◆ CV

template<MInt nDim>
ConservativeVariables* FvSysEqnEEGas< nDim >::CV = nullptr

Definition at line 110 of file fvcartesiansyseqneegas.h.

◆ FV

template<MInt nDim>
FluxVariables* FvSysEqnEEGas< nDim >::FV = nullptr

Definition at line 111 of file fvcartesiansyseqneegas.h.

◆ hasAV

template<MInt nDim>
constexpr MBool FvSysEqnEEGas< nDim >::hasAV = true
staticconstexpr

Definition at line 108 of file fvcartesiansyseqneegas.h.

◆ hasSC

template<MInt nDim>
constexpr MBool FvSysEqnEEGas< nDim >::hasSC = false
staticconstexpr

Definition at line 109 of file fvcartesiansyseqneegas.h.

◆ index0

template<MInt nDim>
const MUint FvSysEqnNS< nDim >::index0[nDim]
staticprivate

Definition at line 350 of file fvcartesiansyseqnns.h.

◆ index1

template<MInt nDim>
const MUint FvSysEqnNS< nDim >::index1[nDim]
staticprivate

Definition at line 353 of file fvcartesiansyseqnns.h.

◆ m_EEGasEps

template<MInt nDim>
MFloat FvSysEqnEEGas< nDim >::m_EEGasEps
private

Definition at line 97 of file fvcartesiansyseqneegas.h.

◆ m_F1BGammaMinusOne

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_F1BGammaMinusOne
private

Definition at line 296 of file fvcartesiansyseqnns.h.

◆ m_gamma

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_gamma
private

Definition at line 294 of file fvcartesiansyseqnns.h.

◆ m_gammaMinusOne

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_gammaMinusOne
private

Definition at line 295 of file fvcartesiansyseqnns.h.

◆ m_gFGMOrPr

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_gFGMOrPr
private

Definition at line 306 of file fvcartesiansyseqnns.h.

◆ m_muInfinity

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_muInfinity

Definition at line 330 of file fvcartesiansyseqnns.h.

◆ m_noSpecies

template<MInt nDim>
MUint FvSysEqnNS< nDim >::m_noSpecies
private

Definition at line 289 of file fvcartesiansyseqnns.h.

◆ m_Re0

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_Re0

Definition at line 329 of file fvcartesiansyseqnns.h.

◆ m_referenceTemperature

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_referenceTemperature
private

Definition at line 301 of file fvcartesiansyseqnns.h.

◆ m_solverId

template<MInt nDim>
MInt FvSysEqnNS< nDim >::m_solverId
private

Definition at line 291 of file fvcartesiansyseqnns.h.

◆ m_sutherlandConstant

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_sutherlandConstant
private

Definition at line 303 of file fvcartesiansyseqnns.h.

◆ m_sutherlandConstantThermal

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_sutherlandConstantThermal
private

Definition at line 305 of file fvcartesiansyseqnns.h.

◆ m_sutherlandPlusOne

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_sutherlandPlusOne
private

Definition at line 302 of file fvcartesiansyseqnns.h.

◆ m_sutherlandPlusOneThermal

template<MInt nDim>
MFloat FvSysEqnNS< nDim >::m_sutherlandPlusOneThermal
private

Definition at line 304 of file fvcartesiansyseqnns.h.

◆ PV

template<MInt nDim>
PrimitiveVariables* FvSysEqnEEGas< nDim >::PV = nullptr

Definition at line 112 of file fvcartesiansyseqneegas.h.


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