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

Storage of the Position of the Conservative Variables (RHO, RHO_VV, RHO_E) in the value vectors of the solvers ans surfaces. More...

#include <variables.h>

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

Public Member Functions

 MConservativeVariables (MInt noSpecies, MInt noRANSEq=0)
 Sets the position for the conservative variables. More...
 
 ~MConservativeVariables ()
 

Public Attributes

std::array< MInt, nDim > RHO_VV
 Pointer for the velocities so you can use them in a loop. More...
 
MIntRHO_Y = nullptr
 Position of RHO_Yi. More...
 
MInt RANS_FIRST
 first Position of RANS Variables More...
 
MIntRANS_VAR = nullptr
 Position of RANS Variables. More...
 
MInt noVariables
 The Nr. of Conservative Variables (nDim + 2) More...
 
MInt m_noSpecies
 
MInt m_noRansEquations
 
MFloat rhoUInfinity {}
 
MFloat rhoVInfinity {}
 
MFloat rhoWInfinity {}
 
MFloat rhoEInfinity {}
 
MFloat rhoInfinity {}
 
std::array< MFloat, nDim > ransInfinity {}
 
std::array< MFloat, nDim > rhoVVInfinity {}
 

Static Public Attributes

static constexpr MInt RHO_U = 0
 Position of RHO_U. More...
 
static constexpr MInt RHO_V = 1
 Position of RHO_V. More...
 
static constexpr MInt RHO_W = 2
 Position of RHO_W. More...
 
static constexpr MInt RHO_E = nDim
 Position of RHO_E. More...
 
static constexpr MInt RHO = nDim + 1
 Position of RHO. More...
 
static constexpr MInt RHO_Z = nDim + 2
 Position of RHO_Z. More...
 
static constexpr MInt RHO_C = nDim + 2
 Position of RHO_C. More...
 

Detailed Description

template<MInt nDim>
class MConservativeVariables< nDim >
Date
begin: 00.05.19 change 00.05.19 \author changed by Pascal Meysonnat to deal also with RANS

If you search for a value in a value vector you only have to type in the name of the value you are searching (e.g. variables[RHO_E])

Warning
Be careful! Some value vectors include the conservative, others the primitive Variables

Definition at line 31 of file variables.h.

Constructor & Destructor Documentation

◆ MConservativeVariables()

template<MInt nDim>
MConservativeVariables< nDim >::MConservativeVariables ( MInt  noSpecies,
MInt  noRANSEq = 0 
)
inlineexplicit

Definition at line 34 of file variables.h.

34 {
35 m_noSpecies = noSpecies;
36 m_noRansEquations = noRANSEq;
37 for(MInt i = 0; i < nDim; i++) {
38 RHO_VV[i] = RHO_U + i;
39 }
40 RHO_Y = new MInt[m_noSpecies];
41 for(MInt i = 0; i < m_noSpecies; i++) {
42 RHO_Y[i] = RHO_Z + i;
43 }
44 RANS_FIRST = nDim + 2;
45 if(m_noSpecies != 0) {
46 RANS_FIRST = nDim + 2 + m_noSpecies;
47 }
48 if(m_noRansEquations > 0) {
50 for(MInt i = 0; i < m_noRansEquations; ++i) {
51 RANS_VAR[i] = RANS_FIRST + i;
52 }
53 } else {
54 RANS_VAR = nullptr;
55 }
57 }
MInt noVariables
The Nr. of Conservative Variables (nDim + 2)
Definition: variables.h:91
static constexpr MInt RHO_U
Position of RHO_U.
Definition: variables.h:67
std::array< MInt, nDim > RHO_VV
Pointer for the velocities so you can use them in a loop.
Definition: variables.h:73
static constexpr MInt RHO_Z
Position of RHO_Z.
Definition: variables.h:79
MInt * RANS_VAR
Position of RANS Variables.
Definition: variables.h:87
MInt RANS_FIRST
first Position of RANS Variables
Definition: variables.h:85
MInt * RHO_Y
Position of RHO_Yi.
Definition: variables.h:83
int32_t MInt
Definition: maiatypes.h:62

◆ ~MConservativeVariables()

template<MInt nDim>
MConservativeVariables< nDim >::~MConservativeVariables ( )
inline

Definition at line 59 of file variables.h.

59 {
60 delete[] RHO_Y;
61 if(RANS_VAR != nullptr) {
62 delete[] RANS_VAR;
63 }
64 }

Member Data Documentation

◆ m_noRansEquations

template<MInt nDim>
MInt MConservativeVariables< nDim >::m_noRansEquations

Definition at line 93 of file variables.h.

◆ m_noSpecies

template<MInt nDim>
MInt MConservativeVariables< nDim >::m_noSpecies

Definition at line 92 of file variables.h.

◆ noVariables

template<MInt nDim>
MInt MConservativeVariables< nDim >::noVariables

Definition at line 91 of file variables.h.

◆ RANS_FIRST

template<MInt nDim>
MInt MConservativeVariables< nDim >::RANS_FIRST

Definition at line 85 of file variables.h.

◆ RANS_VAR

template<MInt nDim>
MInt* MConservativeVariables< nDim >::RANS_VAR = nullptr

Definition at line 87 of file variables.h.

◆ ransInfinity

template<MInt nDim>
std::array<MFloat, nDim> MConservativeVariables< nDim >::ransInfinity {}

Definition at line 95 of file variables.h.

◆ RHO

template<MInt nDim>
constexpr MInt MConservativeVariables< nDim >::RHO = nDim + 1
staticconstexpr

Definition at line 77 of file variables.h.

◆ RHO_C

template<MInt nDim>
constexpr MInt MConservativeVariables< nDim >::RHO_C = nDim + 2
staticconstexpr

Definition at line 81 of file variables.h.

◆ RHO_E

template<MInt nDim>
constexpr MInt MConservativeVariables< nDim >::RHO_E = nDim
staticconstexpr

Definition at line 75 of file variables.h.

◆ RHO_U

template<MInt nDim>
constexpr MInt MConservativeVariables< nDim >::RHO_U = 0
staticconstexpr

Definition at line 67 of file variables.h.

◆ RHO_V

template<MInt nDim>
constexpr MInt MConservativeVariables< nDim >::RHO_V = 1
staticconstexpr

Definition at line 69 of file variables.h.

◆ RHO_VV

template<MInt nDim>
std::array<MInt, nDim> MConservativeVariables< nDim >::RHO_VV

Definition at line 73 of file variables.h.

◆ RHO_W

template<MInt nDim>
constexpr MInt MConservativeVariables< nDim >::RHO_W = 2
staticconstexpr

Definition at line 71 of file variables.h.

◆ RHO_Y

template<MInt nDim>
MInt* MConservativeVariables< nDim >::RHO_Y = nullptr

Definition at line 83 of file variables.h.

◆ RHO_Z

template<MInt nDim>
constexpr MInt MConservativeVariables< nDim >::RHO_Z = nDim + 2
staticconstexpr

Definition at line 79 of file variables.h.

◆ rhoEInfinity

template<MInt nDim>
MFloat MConservativeVariables< nDim >::rhoEInfinity {}

Definition at line 94 of file variables.h.

◆ rhoInfinity

template<MInt nDim>
MFloat MConservativeVariables< nDim >::rhoInfinity {}

Definition at line 94 of file variables.h.

◆ rhoUInfinity

template<MInt nDim>
MFloat MConservativeVariables< nDim >::rhoUInfinity {}

Definition at line 94 of file variables.h.

◆ rhoVInfinity

template<MInt nDim>
MFloat MConservativeVariables< nDim >::rhoVInfinity {}

Definition at line 94 of file variables.h.

◆ rhoVVInfinity

template<MInt nDim>
std::array<MFloat, nDim> MConservativeVariables< nDim >::rhoVVInfinity {}

Definition at line 96 of file variables.h.

◆ rhoWInfinity

template<MInt nDim>
MFloat MConservativeVariables< nDim >::rhoWInfinity {}

Definition at line 94 of file variables.h.


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