Skip to content

Commit e2312f7

Browse files
authored
Merge branch 'develop' into fix_inc_rotatingframe
2 parents a4856d7 + 78363e1 commit e2312f7

60 files changed

Lines changed: 1393 additions & 1165 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Common/include/CConfig.hpp

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

@@ -5142,21 +5144,19 @@ class CConfig {
51425144
bool GetHold_GridFixed(void) const { return Hold_GridFixed; }
51435145

51445146
/*!
5147+
* \author H. Kline
51455148
* \brief Get the kind of objective function. There are several options: Drag coefficient,
51465149
* Lift coefficient, efficiency, etc.
51475150
* \note The objective function will determine the boundary condition of the adjoint problem.
5151+
* \param[in] val_obj
51485152
* \return Kind of objective function.
51495153
*/
5150-
unsigned short GetKind_ObjFunc(void) const { return Kind_ObjFunc[0]; }
5154+
unsigned short GetKind_ObjFunc(unsigned short val_obj = 0) const { return Kind_ObjFunc[val_obj]; }
51515155

51525156
/*!
5153-
* \author H. Kline
5154-
* \brief Get the kind of objective function. There are several options: Drag coefficient,
5155-
* Lift coefficient, efficiency, etc.
5156-
* \note The objective function will determine the boundary condition of the adjoint problem.
5157-
* \return Kind of objective function.
5157+
* \brief Similar to GetKind_ObjFunc but returns the corresponding string.
51585158
*/
5159-
unsigned short GetKind_ObjFunc(unsigned short val_obj) const { return Kind_ObjFunc[val_obj]; }
5159+
string GetName_ObjFunc(unsigned short val_obj = 0) const;
51605160

51615161
/*!
51625162
* \author H. Kline
@@ -5185,12 +5185,6 @@ class CConfig {
51855185
*/
51865186
su2double GetCoeff_ObjChainRule(unsigned short iVar) const { return Obj_ChainRuleCoeff[iVar]; }
51875187

5188-
/*!
5189-
* \author H. Kline
5190-
* \brief Get the flag indicating whether to comput a combined objective.
5191-
*/
5192-
bool GetComboObj(void);
5193-
51945188
/*!
51955189
* \brief Get the kind of sensitivity smoothing technique.
51965190
* \return Kind of sensitivity smoothing technique.
@@ -5277,6 +5271,16 @@ class CConfig {
52775271
*/
52785272
bool GetIonization(void) const { return ionization; }
52795273

5274+
/*!
5275+
* \brief Indicates whether the VT source residual is limited.
5276+
*/
5277+
bool GetVTTransferResidualLimiting(void) const { return vt_transfer_res_limit; }
5278+
5279+
/*!
5280+
* \brief Indicates if mixture is monoatomic.
5281+
*/
5282+
bool GetMonoatomic(void) const { return monoatomic; }
5283+
52805284
/*!
52815285
* \brief Information about computing and plotting the equivalent area distribution.
52825286
* \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: 22 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*/
@@ -3563,6 +3565,10 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
35633565
SU2_MPI::Error("Only USER_DEFINED_NONEQ fluid model can be used with the NEMO solver. Mutation++ library will soon be available.", CURRENT_FUNCTION);
35643566
}
35653567

3568+
if (nemo && Kind_TransCoeffModel != WILKE ) {
3569+
SU2_MPI::Error("Only WILKE transport model is stable for the NEMO solver.", CURRENT_FUNCTION);
3570+
}
3571+
35663572
if (!ideal_gas && !nemo) {
35673573
if (Kind_Upwind_Flow != ROE && Kind_Upwind_Flow != HLLC && Kind_Centered_Flow != JST) {
35683574
SU2_MPI::Error("Only ROE Upwind, HLLC Upwind scheme, and JST scheme can be used for Non-Ideal Compressible Fluids", CURRENT_FUNCTION);
@@ -4986,6 +4992,8 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
49864992
(Kind_Solver == INC_RANS) ||
49874993
(Kind_Solver == EULER) ||
49884994
(Kind_Solver == NAVIER_STOKES) ||
4995+
(Kind_Solver == NEMO_EULER) ||
4996+
(Kind_Solver == NEMO_NAVIER_STOKES) ||
49894997
(Kind_Solver == RANS) ||
49904998
(Kind_Solver == DISC_ADJ_EULER) ||
49914999
(Kind_Solver == DISC_ADJ_RANS) ||
@@ -5596,15 +5604,15 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
55965604
case NEMO_EULER:
55975605
if (Kind_Regime == COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Euler equations." << endl;
55985606
if(Kind_FluidModel == USER_DEFINED_NONEQ){
5599-
if ((GasModel != "N2") && (GasModel != "AIR-5"))
5600-
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5.", CURRENT_FUNCTION);
5607+
if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "ARGON"))
5608+
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5, ARGON.", CURRENT_FUNCTION);
56015609
}
56025610
break;
56035611
case NEMO_NAVIER_STOKES:
56045612
if (Kind_Regime == COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Navier-Stokes equations." << endl;
56055613
if(Kind_FluidModel == USER_DEFINED_NONEQ){
5606-
if ((GasModel != "N2") && (GasModel != "AIR-5"))
5607-
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5.", CURRENT_FUNCTION);
5614+
if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "ARGON"))
5615+
SU2_MPI::Error("The GAS_MODEL given as input is not valid. Choose one of the options: N2, AIR-5, ARGON.", CURRENT_FUNCTION);
56085616
}
56095617
break;
56105618
case FEM_LES:
@@ -6122,7 +6130,7 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
61226130
if (Kind_Upwind_Flow == SLAU2) cout << "Simple Low-Dissipation AUSM 2 solver for the flow inviscid terms."<< endl;
61236131
if (Kind_Upwind_Flow == FDS) cout << "Flux difference splitting (FDS) upwind scheme for the flow inviscid terms."<< endl;
61246132
if (Kind_Upwind_Flow == AUSMPLUSUP) cout << "AUSM+-up solver for the flow inviscid terms."<< endl;
6125-
if (Kind_Upwind_Flow == AUSMPLUSUP2) cout << "AUSM+-up2 solver for the flow inviscid terms."<< endl;
6133+
if (Kind_Upwind_Flow == AUSMPLUSUP2) cout << "AUSM+-up2 solver for the flow inviscid terms."<< endl;
61266134
if (Kind_Upwind_Flow == AUSMPWPLUS) cout << "AUSMPWPLUS solver for the flow inviscid terms."<< endl;
61276135

61286136
if (Kind_Solver == EULER || Kind_Solver == DISC_ADJ_EULER ||
@@ -9297,6 +9305,13 @@ short CConfig::FindInterfaceMarker(unsigned short iInterface) const {
92979305
return -1;
92989306
}
92999307

9308+
string CConfig::GetName_ObjFunc(unsigned short val_obj) const {
9309+
for (auto item : Objective_Map)
9310+
if (item.second == static_cast<ENUM_OBJECTIVE>(Kind_ObjFunc[val_obj]))
9311+
return item.first;
9312+
return string();
9313+
}
9314+
93009315
void CConfig::Tick(double *val_start_time) {
93019316

93029317
#ifdef PROFILE

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8425,7 +8425,7 @@ void CPhysicalGeometry::ComputeMeshQualityStatistics(CConfig *config) {
84258425
const unsigned long jPoint = edges->GetNode(iEdge,1);
84268426

84278427
const unsigned long GlobalIndex_i = nodes->GetGlobalIndex(iPoint);
8428-
const unsigned long GlobalIndex_j = nodes->GetGlobalIndex(iPoint);
8428+
const unsigned long GlobalIndex_j = nodes->GetGlobalIndex(jPoint);
84298429

84308430
/*-- Area normal for the current edge. Recall that this normal
84318431
is computed by summing the normals of adjacent faces along

Common/src/linear_algebra/CSysSolve.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ unsigned long CSysSolve<ScalarType>::CG_LinSolver(const CSysVector<ScalarType> &
246246
norm_r = r.norm();
247247
norm0 = b.norm();
248248
if ((norm_r < tol*norm0) || (norm_r < eps)) {
249-
if (master) cout << "CSysSolve::ConjugateGradient(): system solved by initial guess." << endl;
249+
if (master && !mesh_deform) cout << "CSysSolve::ConjugateGradient(): system solved by initial guess." << endl;
250250
return 0;
251251
}
252252

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/drivers/CDiscAdjSinglezoneDriver.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* SU2 Project Website: https://su2code.github.io
99
*
10-
* The SU2 Project is maintained by the SU2 Foundation
10+
* The SU2 Project is maintained by the SU2 Foundation
1111
* (http://su2foundation.org)
1212
*
1313
* Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md)
@@ -42,6 +42,7 @@ class CDiscAdjSinglezoneDriver : public CSinglezoneDriver {
4242
unsigned short RecordingState; /*!< \brief The kind of recording the tape currently holds.*/
4343
unsigned short MainVariables, /*!< \brief The kind of recording linked to the main variables of the problem.*/
4444
SecondaryVariables; /*!< \brief The kind of recording linked to the secondary variables of the problem.*/
45+
int MainSolver; /*!< \brief Index of the main adjoint solver. */
4546
su2double ObjFunc; /*!< \brief The value of the objective function.*/
4647
CIteration* direct_iteration; /*!< \brief A pointer to the direct iteration.*/
4748

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+
};

0 commit comments

Comments
 (0)