Skip to content

Commit 63f7af0

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into heat_solver_fixes
2 parents 6ed646f + 1261014 commit 63f7af0

35 files changed

Lines changed: 1197 additions & 950 deletions

Common/include/CConfig.hpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,9 @@ class CConfig {
11621162
su2double *Gas_Composition, /*!< \brief Initial mass fractions of flow [dimensionless] */
11631163
pnorm_heat; /*!< \brief pnorm for heat-flux. */
11641164
bool frozen, /*!< \brief Flag for determining if mixture is frozen. */
1165-
ionization; /*!< \brief Flag for determining if free electron gas is in the mixture. */
1165+
ionization, /*!< \brief Flag for determining if free electron gas is in the mixture. */
1166+
vt_transfer_res_limit, /*!< \brief Flag for determining if residual limiting for source term VT-transfer is used. */
1167+
monoatomic; /*!< \brief Flag for monoatomic mixture. */
11661168
string GasModel, /*!< \brief Gas Model. */
11671169
*Wall_Catalytic; /*!< \brief Pointer to catalytic walls. */
11681170

@@ -5262,6 +5264,16 @@ class CConfig {
52625264
*/
52635265
bool GetIonization(void) const { return ionization; }
52645266

5267+
/*!
5268+
* \brief Indicates whether the VT source residual is limited.
5269+
*/
5270+
bool GetVTTransferResidualLimiting(void) const { return vt_transfer_res_limit; }
5271+
5272+
/*!
5273+
* \brief Indicates if mixture is monoatomic.
5274+
*/
5275+
bool GetMonoatomic(void) const { return monoatomic; }
5276+
52655277
/*!
52665278
* \brief Information about computing and plotting the equivalent area distribution.
52675279
* \return <code>TRUE</code> or <code>FALSE</code> depending if we are computing the equivalent area.

Common/include/option_structure.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ enum ENUM_MAIN_SOLVER {
200200
FEM_LES = 29, /*!< \brief Definition of the finite element Large Eddy Simulation Navier-Stokes' (LES) solver. */
201201
MULTIPHYSICS = 30,
202202
NEMO_EULER = 41, /*!< \brief Definition of the NEMO Euler solver. */
203-
NEMO_NAVIER_STOKES = 42 /*!< \brief Definition of the NEMO NS solver. */
203+
NEMO_NAVIER_STOKES = 42 /*!< \brief Definition of the NEMO NS solver. */
204204
};
205205
static const MapType<string, ENUM_MAIN_SOLVER> Solver_Map = {
206206
MakePair("NONE", NO_SOLVER)

Common/src/CConfig.cpp

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ CConfig::CConfig(istream &case_buffer, unsigned short val_software, bool verb_hi
140140

141141
}
142142

143-
144143
CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], unsigned short val_software, unsigned short val_iZone, unsigned short val_nZone, bool verb_high) {
145144

146145
caseName = config->GetCaseName();
@@ -356,7 +355,6 @@ void CConfig::addEnumOption(const string name, unsigned short & option_field, co
356355
return;
357356
}
358357

359-
360358
// input_size is the number of options read in from the config file
361359
template <class Tenum>
362360
void CConfig::addEnumListOption(const string name, unsigned short & input_size, unsigned short * & option_field, const map<string, Tenum> & enum_map) {
@@ -1165,6 +1163,10 @@ void CConfig::SetConfig_Options() {
11651163
addBoolOption("FROZEN_MIXTURE", frozen, false);
11661164
/* DESCRIPTION: Specify if there is ionization */
11671165
addBoolOption("IONIZATION", ionization, false);
1166+
/* DESCRIPTION: Specify if there is VT transfer residual limiting */
1167+
addBoolOption("VT_RESIDUAL_LIMITING", vt_transfer_res_limit, false);
1168+
/* DESCRIPTION: Specify if the gas is monoatomic */
1169+
addBoolOption("MONOATOMIC", monoatomic, false);
11681170
/* DESCRIPTION: List of catalytic walls */
11691171
addStringListOption("CATALYTIC_WALL", nWall_Catalytic, Wall_Catalytic);
11701172
/*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients \ingroup Config*/
@@ -3561,6 +3563,10 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
35613563
SU2_MPI::Error("Only USER_DEFINED_NONEQ fluid model can be used with the NEMO solver. Mutation++ library will soon be available.", CURRENT_FUNCTION);
35623564
}
35633565

3566+
if (nemo && Kind_TransCoeffModel != WILKE ) {
3567+
SU2_MPI::Error("Only WILKE transport model is stable for the NEMO solver.", CURRENT_FUNCTION);
3568+
}
3569+
35643570
if (!ideal_gas && !nemo) {
35653571
if (Kind_Upwind_Flow != ROE && Kind_Upwind_Flow != HLLC && Kind_Centered_Flow != JST) {
35663572
SU2_MPI::Error("Only ROE Upwind, HLLC Upwind scheme, and JST scheme can be used for Non-Ideal Compressible Fluids", CURRENT_FUNCTION);
@@ -4990,6 +4996,8 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
49904996
(Kind_Solver == INC_RANS) ||
49914997
(Kind_Solver == EULER) ||
49924998
(Kind_Solver == NAVIER_STOKES) ||
4999+
(Kind_Solver == NEMO_EULER) ||
5000+
(Kind_Solver == NEMO_NAVIER_STOKES) ||
49935001
(Kind_Solver == RANS) ||
49945002
(Kind_Solver == DISC_ADJ_EULER) ||
49955003
(Kind_Solver == DISC_ADJ_RANS) ||
@@ -5600,15 +5608,15 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
56005608
case NEMO_EULER:
56015609
if (Kind_Regime == COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Euler equations." << endl;
56025610
if(Kind_FluidModel == USER_DEFINED_NONEQ){
5603-
if ((GasModel != "N2") && (GasModel != "AIR-5"))
5604-
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5.", CURRENT_FUNCTION);
5611+
if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "ARGON"))
5612+
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5, ARGON.", CURRENT_FUNCTION);
56055613
}
56065614
break;
56075615
case NEMO_NAVIER_STOKES:
56085616
if (Kind_Regime == COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Navier-Stokes equations." << endl;
56095617
if(Kind_FluidModel == USER_DEFINED_NONEQ){
5610-
if ((GasModel != "N2") && (GasModel != "AIR-5"))
5611-
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5.", CURRENT_FUNCTION);
5618+
if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "ARGON"))
5619+
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5, ARGON.", CURRENT_FUNCTION);
56125620
}
56135621
break;
56145622
case FEM_LES:
@@ -6126,7 +6134,7 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
61266134
if (Kind_Upwind_Flow == SLAU2) cout << "Simple Low-Dissipation AUSM 2 solver for the flow inviscid terms."<< endl;
61276135
if (Kind_Upwind_Flow == FDS) cout << "Flux difference splitting (FDS) upwind scheme for the flow inviscid terms."<< endl;
61286136
if (Kind_Upwind_Flow == AUSMPLUSUP) cout << "AUSM+-up solver for the flow inviscid terms."<< endl;
6129-
if (Kind_Upwind_Flow == AUSMPLUSUP2) cout << "AUSM+-up2 solver for the flow inviscid terms."<< endl;
6137+
if (Kind_Upwind_Flow == AUSMPLUSUP2) cout << "AUSM+-up2 solver for the flow inviscid terms."<< endl;
61306138
if (Kind_Upwind_Flow == AUSMPWPLUS) cout << "AUSMPWPLUS solver for the flow inviscid terms."<< endl;
61316139

61326140
if (Kind_Solver == EULER || Kind_Solver == DISC_ADJ_EULER ||

SU2_CFD/include/CMarkerProfileReaderFVM.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* \brief Header file for the class CMarkerProfileReaderFVM.
44
* The implementations are in the <i>CMarkerProfileReaderFVM.cpp</i> file.
55
* \author T. Economon
6-
* \version 6.2.0 "Falcon"
6+
* \version 7.0.7 "Blackbird"
77
*
88
* The current SU2 release has been coordinated by the
99
* SU2 International Developers Society <www.su2devsociety.org>

SU2_CFD/include/fluid/

Whitespace-only changes.

SU2_CFD/include/fluid/CMutationTCLib.hpp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,19 @@ class CMutationTCLib : public CNEMOGas {
3838

3939
private:
4040

41-
string GasModel;
41+
vector<su2double> Cv_ks, /*!< \brief Species specific heats at constant volume. */
42+
es, /*!< \brief Species energies. */
43+
omega_vec, /*!< \brief Dummy vector for vibrational energy source term. */
44+
h_RT; /*!< \brief Enthalpy divided by R*T. */
45+
46+
su2double Tref; /*!< \brief Reference temperature. */
4247

4348
public:
4449

4550
/*!
4651
* \brief Constructor of the class.
4752
*/
48-
CMutationTCLib(const CConfig* config);
53+
CMutationTCLib(const CConfig* config, unsigned short val_nDim);
4954

5055
/*!
5156
* \brief Destructor of the class.
@@ -93,7 +98,7 @@ class CMutationTCLib : public CNEMOGas {
9398
/*!
9499
* \brief Get species enthalpies.
95100
*/
96-
vector<su2double>& GetSpeciesEnthalpy(su2double val_T, su2double *val_eves) final;
101+
vector<su2double>& GetSpeciesEnthalpy(su2double val_T, su2double val_Tve, su2double *val_eves) final;
97102

98103
/*!
99104
* \brief Get species diffusion coefficients.
@@ -105,7 +110,6 @@ class CMutationTCLib : public CNEMOGas {
105110
*/
106111
su2double GetViscosity() final;
107112

108-
109113
/*!
110114
* \brief Get T-R and V-E thermal conductivities vector.
111115
*/
@@ -114,21 +118,21 @@ class CMutationTCLib : public CNEMOGas {
114118
/*!
115119
* \brief Get translational and vibrational temperatures vector.
116120
*/
117-
vector<su2double>& GetTemperatures(vector<su2double>& rhos, su2double rhoEmix, su2double rhoEve, su2double rhoEvel) final;
121+
vector<su2double>& GetTemperatures(vector<su2double>& val_rhos, su2double rhoE, su2double rhoEve, su2double rhoEvel) final;
118122

119123
/*!
120-
* \brief Get derivative of pressure w.r.t. conservative variables.
124+
* \brief Get species molar mass.
121125
*/
122-
void GetdPdU(su2double *V, vector<su2double>& val_eves, su2double *val_dPdU) final;
126+
vector<su2double>& GetSpeciesMolarMass() final;
123127

124128
/*!
125-
* \brief Get derivative of temperature w.r.t. conservative variables.
129+
* \brief Get reference temperature.
126130
*/
127-
void GetdTdU(su2double *V, su2double *val_dTdU) final;
131+
vector<su2double>& GetRefTemperature() final;
128132

129133
/*!
130-
* \brief Get derivative of vibrational temperature w.r.t. conservative variables.
134+
* \brief Get species formation enthalpy.
131135
*/
132-
void GetdTvedU(su2double *V, vector<su2double>& val_eves, su2double *val_dTvedU) final;
136+
vector<su2double>& GetSpeciesFormationEnthalpy() final;
133137

134-
};
138+
};

SU2_CFD/include/fluid/CNEMOGas.hpp

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ class CNEMOGas : public CFluidModel {
3939

4040
protected:
4141

42-
bool frozen; /*!< \brief Indicates if mixture is frozen. */
43-
42+
bool frozen, /*!< \brief Indicates if mixture is frozen. */
43+
ionization; /*!< \brief Presence of charged species in gas mixture. */
44+
45+
string Kind_GasModel; /*!< \brief String gas model. */
4446

4547
unsigned short nSpecies, /*!< \brief Number of species in the gas mixture. */
4648
nHeavy, /*!< \brief Number of heavy particles in gas */
@@ -77,14 +79,16 @@ class CNEMOGas : public CFluidModel {
7779
hs, /*!< \brief Species enthalpies */
7880
MolarFractions, /*!< \brief Species molar fractions */
7981
ws, /*!< \brief Species net production rates */
80-
DiffusionCoeff; /*!< \brief Species diffusion coefficients*/
82+
DiffusionCoeff, /*!< \brief Species diffusion coefficients*/
83+
Enthalpy_Formation, /*!< \brief Enthalpy of formation */
84+
Ref_Temperature; /*!< \brief Reference temperature for thermodynamic relations */
8185

8286
public:
8387

8488
/*!
8589
* \brief Constructor of the class.
8690
*/
87-
CNEMOGas(const CConfig* config);
91+
CNEMOGas(const CConfig* config, unsigned short val_nDim);
8892

8993
/*!
9094
* \brief Set mixture thermodynamic state.
@@ -97,16 +101,16 @@ class CNEMOGas : public CFluidModel {
97101
/*!
98102
* \brief Set mixture thermodynamic state.
99103
* \param[in] P - Pressure.
104+
* \param[in] Ms - Mass fraction of the gas.
100105
* \param[in] T - Translational/Rotational temperature.
101106
* \param[in] Tve - Vibrational/Electronic temperature.
102107
*/
103108
void SetTDStatePTTv(su2double P, const su2double *val_massfrac, su2double val_temperature, su2double val_temperature_ve);
104109

105-
106110
/*!
107111
* \brief Get species T-R specific heats at constant volume.
108112
*/
109-
virtual vector<su2double>& GetSpeciesCvTraRot() = 0;
113+
virtual const vector<su2double>& GetSpeciesCvTraRot() = 0;
110114

111115
/*!
112116
* \brief Get species V-E specific heats at constant volume.
@@ -136,7 +140,7 @@ class CNEMOGas : public CFluidModel {
136140
/*!
137141
* \brief Get species enthalpies.
138142
*/
139-
virtual vector<su2double>& GetSpeciesEnthalpy(su2double val_T, su2double *val_eves) = 0;
143+
virtual vector<su2double>& GetSpeciesEnthalpy(su2double val_T, su2double val_Tve, su2double *val_eves) = 0;
140144

141145
/*!
142146
* \brief Get species diffusion coefficients.
@@ -156,32 +160,37 @@ class CNEMOGas : public CFluidModel {
156160
/*!
157161
* \brief Get translational and vibrational temperatures vector.
158162
*/
159-
virtual vector<su2double>& GetTemperatures(vector<su2double>& rhos, su2double rhoEmix, su2double rhoEve, su2double rhoEvel) = 0;
163+
virtual vector<su2double>& GetTemperatures(vector<su2double>& val_rhos, su2double rhoEmix, su2double rhoEve, su2double rhoEvel) = 0;
160164

161165
/*!
162166
* \brief Get speed of sound.
163167
*/
164-
su2double GetSoundSpeed();
168+
su2double ComputeSoundSpeed();
165169

166170
/*!
167171
* \brief Get pressure.
168172
*/
169-
su2double GetPressure();
173+
su2double ComputePressure();
174+
175+
/*!
176+
* \brief Get gas constant.
177+
*/
178+
su2double ComputeGasConstant();
170179

171180
/*!
172181
* \brief Get derivative of pressure w.r.t. conservative variables.
173182
*/
174-
virtual void GetdPdU(su2double *V, vector<su2double>& val_eves, su2double *val_dPdU){}
183+
void ComputedPdU(su2double *V, vector<su2double>& val_eves, su2double *val_dPdU);
175184

176185
/*!
177186
* \brief Get derivative of temperature w.r.t. conservative variables.
178187
*/
179-
virtual void GetdTdU(su2double *V, su2double *val_dTdU){}
188+
void ComputedTdU(su2double *V, su2double *val_dTdU);
180189

181190
/*!
182191
* \brief Get derivative of vibrational temperature w.r.t. conservative variables.
183192
*/
184-
virtual void GetdTvedU(su2double *V, vector<su2double>& val_eves, su2double *val_dTvedU){}
193+
void ComputedTvedU(su2double *V, vector<su2double>& val_eves, su2double *val_dTvedU);
185194

186195
/*!
187196
* \brief Set the translational temperature.
@@ -198,11 +207,6 @@ class CNEMOGas : public CFluidModel {
198207
*/
199208
inline void SetEves(vector<su2double>& val_eves) { eves = val_eves; }
200209

201-
/*!
202-
* \brief Get gas constant.
203-
*/
204-
su2double GetGasConstant();
205-
206210
/*!
207211
* \brief Get rhoCvtr.
208212
*/
@@ -221,7 +225,15 @@ class CNEMOGas : public CFluidModel {
221225
/*!
222226
* \brief Get species molar mass.
223227
*/
224-
inline vector<su2double>& GetMolarMass() { return MolarMass; }
228+
virtual const vector<su2double>& GetSpeciesMolarMass() = 0;
225229

230+
/*!
231+
* \brief Get reference temperature.
232+
*/
233+
virtual const vector<su2double>& GetRefTemperature() = 0;
226234

227-
};
235+
/*!
236+
* \brief Get species formation enthalpy.
237+
*/
238+
virtual const vector<su2double>& GetSpeciesFormationEnthalpy() = 0;
239+
};

0 commit comments

Comments
 (0)