Skip to content

Commit 4d2854a

Browse files
authored
Merge pull request #1555 from su2code/feature_NEMO_chem
NEMO: Native Air-7 gas model implementation for inviscid flows
2 parents 56cb526 + a7d2274 commit 4d2854a

13 files changed

Lines changed: 617 additions & 80 deletions

File tree

Common/include/CConfig.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,31 +1657,31 @@ class CConfig {
16571657
su2double GetHeat_Flux_Ref(void) const { return Heat_Flux_Ref; }
16581658

16591659
/*!
1660-
* \brief Get the value of the frestream temperature.
1660+
* \brief Get the value of the freestream temperature.
16611661
* \return Freestream temperature.
16621662
*/
16631663
su2double GetTemperature_FreeStream(void) const { return Temperature_FreeStream; }
16641664
/*!
1665-
* \brief Get the value of the frestream vibrational-electronic temperature.
1666-
* \return Freestream temperature.
1665+
* \brief Get the value of the freestream vibrational-electronic temperature.
1666+
* \return Freestream vibe-el temperature.
16671667
*/
16681668
su2double GetTemperature_ve_FreeStream(void) const { return Temperature_ve_FreeStream; }
16691669

16701670
/*!
1671-
* \brief Get the value of the frestream temperature.
1672-
* \return Freestream temperature.
1671+
* \brief Get the value of the freestream energy.
1672+
* \return Freestream energy.
16731673
*/
16741674
su2double GetEnergy_FreeStream(void) const { return Energy_FreeStream; }
16751675

16761676
/*!
1677-
* \brief Get the value of the frestream temperature.
1678-
* \return Freestream temperature.
1677+
* \brief Get the value of the freestream viscosity.
1678+
* \return Freestream viscosity.
16791679
*/
16801680
su2double GetViscosity_FreeStream(void) const { return Viscosity_FreeStream; }
16811681

16821682
/*!
1683-
* \brief Get the value of the frestream temperature.
1684-
* \return Freestream temperature.
1683+
* \brief Get the value of the freestream density.
1684+
* \return Freestream density.
16851685
*/
16861686
su2double GetDensity_FreeStream(void) const { return Density_FreeStream; }
16871687

@@ -1759,8 +1759,8 @@ class CConfig {
17591759
su2double GetPressure_Ref(void) const { return Pressure_Ref; }
17601760

17611761
/*!
1762-
* \brief Get the value of the reference pressure for non-dimensionalization.
1763-
* \return Reference pressure for non-dimensionalization.
1762+
* \brief Get the value of the reference energy for non-dimensionalization.
1763+
* \return Reference energy for non-dimensionalization.
17641764
*/
17651765
su2double GetEnergy_Ref(void) const { return Energy_Ref; }
17661766

Common/src/CConfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5860,8 +5860,8 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
58605860
case MAIN_SOLVER::NEMO_EULER:
58615861
if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Euler equations." << endl;
58625862
if (Kind_FluidModel == SU2_NONEQ){
5863-
if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "ARGON"))
5864-
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5, ARGON.", CURRENT_FUNCTION);
5863+
if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "AIR-7") && (GasModel != "ARGON"))
5864+
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5, AIR-7, ARGON.", CURRENT_FUNCTION);
58655865
}
58665866
break;
58675867
case MAIN_SOLVER::NEMO_NAVIER_STOKES:

SU2_CFD/src/fluid/CNEMOGas.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ su2double CNEMOGas::ComputeGasConstant(){
119119

120120
su2double Mass = 0.0;
121121

122-
// TODO - extend for ionization
123122
for (iSpecies = 0; iSpecies < nSpecies; iSpecies++)
124123
Mass += MassFrac[iSpecies] * MolarMass[iSpecies];
125124
GasConstant = Ru / Mass;
@@ -184,7 +183,7 @@ void CNEMOGas::ComputedPdU(const su2double *V, const vector<su2double>& val_eves
184183
/*--- Rename for convenience ---*/
185184
su2double rhoCvtr = V[RHOCVTR_INDEX];
186185
su2double rhoCvve = V[RHOCVVE_INDEX];
187-
T = V[T_INDEX];
186+
T = V[T_INDEX];
188187

189188
/*--- Pre-compute useful quantities ---*/
190189
su2double CvtrBAR = 0.0;
@@ -204,8 +203,8 @@ void CNEMOGas::ComputedPdU(const su2double *V, const vector<su2double>& val_eves
204203
val_dPdU[iSpecies] = T*Ru/MolarMass[iSpecies] + Ru*conc/rhoCvtr *
205204
(-Cvtrs[iSpecies]*(T-Ref_Temperature[iSpecies]) -
206205
ef + 0.5*sqvel);
207-
208206
}
207+
209208
if (ionization) {
210209
for (iSpecies = nEl; iSpecies < nSpecies; iSpecies++) {
211210
// evibs = Ru/MolarMass[iSpecies] * thetav[iSpecies]/(exp(thetav[iSpecies]/Tve)-1.0);
@@ -261,10 +260,6 @@ void CNEMOGas::ComputedTdU(const su2double *V, su2double *val_dTdU){
261260
val_dTdU[iSpecies] = (-ef + 0.5*v2 + Cvtrs[iSpecies]*(Ref_Temperature[iSpecies]-T)) / rhoCvtr;
262261
}
263262

264-
if (ionization) {
265-
SU2_MPI::Error("NEED TO IMPLEMENT dTdU for IONIZED MIX",CURRENT_FUNCTION);
266-
}
267-
268263
/*--- Momentum derivatives ---*/
269264
for (iDim = 0; iDim < nDim; iDim++)
270265
val_dTdU[nSpecies+iDim] = -V[VEL_INDEX+iDim] / V[RHOCVTR_INDEX];

0 commit comments

Comments
 (0)