diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp
index 52d9d462bf41..433f019efe39 100644
--- a/Common/include/CConfig.hpp
+++ b/Common/include/CConfig.hpp
@@ -701,6 +701,8 @@ class CConfig {
unsigned short nConfig_Files; /*!< \brief Number of config files for multiphysics problems. */
string *Config_Filenames; /*!< \brief List of names for configuration files. */
+ SST_OPTIONS *SST_Options; /*!< \brief List of modifications/corrections/versions of SST turbulence model.*/
+ unsigned short nSST_Options; /*!< \brief number of SST options specified. */
WALL_FUNCTIONS *Kind_WallFunctions; /*!< \brief The kind of wall function to use for the corresponding markers. */
unsigned short **IntInfo_WallFunctions; /*!< \brief Additional integer information for the wall function markers. */
su2double **DoubleInfo_WallFunctions; /*!< \brief Additional double information for the wall function markers. */
@@ -1135,8 +1137,7 @@ class CConfig {
unsigned short nScreenOutput, /*!< \brief Number of screen output variables (max: 6). */
nHistoryOutput, nVolumeOutput; /*!< \brief Number of variables printed to the history file. */
bool Multizone_Residual; /*!< \brief Determines if memory should be allocated for the multizone residual. */
-
- bool using_uq; /*!< \brief Using uncertainty quantification with SST model */
+ SST_ParsedOptions sstParsedOptions; /*!< \brief additional parameters for the SST turbulence model */
su2double uq_delta_b; /*!< \brief Parameter used to perturb eigenvalues of Reynolds Stress Matrix */
unsigned short eig_val_comp; /*!< \brief Parameter used to determine type of eigenvalue perturbation */
su2double uq_urlx; /*!< \brief Under-relaxation factor */
@@ -8980,12 +8981,6 @@ class CConfig {
*/
bool GetPrintInlet_InterpolatedData(void) const { return PrintInlet_InterpolatedData; }
- /*!
- * \brief Get information about using UQ methodology
- * \return TRUE means that UQ methodology of eigenspace perturbation will be used
- */
- bool GetUsing_UQ(void) const { return using_uq; }
-
/*!
* \brief Get the amount of eigenvalue perturbation to be done
* \return Value of the uq_delta_b parameter
@@ -9622,10 +9617,16 @@ class CConfig {
*/
unsigned short GetKind_Grad_Linear_Solver_Prec(void) const { return Kind_Grad_Linear_Solver_Prec; }
- /*!
+ /*!
* \brief Get max number of iterations of the for the gradient smoothing.
* \return Max number of iterations of the linear solver for the gradient smoothing.
*/
unsigned long GetGrad_Linear_Solver_Iter(void) const { return Grad_Linear_Solver_Iter; }
+ /*!
+ * \brief Get parsed SST option data structure.
+ * \return SST option data structure.
+ */
+ SST_ParsedOptions GetSSTParsedOptions() const { return sstParsedOptions; }
+
};
diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp
index 296dc05a5941..afb1fe643d48 100644
--- a/Common/include/option_structure.hpp
+++ b/Common/include/option_structure.hpp
@@ -92,8 +92,8 @@ const unsigned int INST_0 = 0; /*!< \brief Definition of the first instance per
const su2double STANDARD_GRAVITY = 9.80665; /*!< \brief Acceleration due to gravity at surface of earth. */
const su2double UNIVERSAL_GAS_CONSTANT = 8.3144598; /*!< \brief Universal gas constant in J/(mol*K) */
-const su2double BOLTZMANN_CONSTANT = 1.3806503E-23; /*! \brief Boltzmann's constant [J K^-1] */
-const su2double AVOGAD_CONSTANT = 6.0221415E26; /*!< \brief Avogardro's constant, number of particles in one kmole. */
+const su2double BOLTZMANN_CONSTANT = 1.3806503E-23; /*!< \brief Boltzmann's constant [J K^-1] */
+const su2double AVOGAD_CONSTANT = 6.0221415E26; /*!< \brief Avogadro's constant, number of particles in one kmole. */
const su2double EPS = 1.0E-16; /*!< \brief Error scale. */
const su2double TURB_EPS = 1.0E-16; /*!< \brief Turbulent Error scale. */
@@ -912,12 +912,11 @@ static const MapType Limiter_Map = {
enum class TURB_MODEL {
NONE, /*!< \brief No turbulence model. */
SA, /*!< \brief Kind of Turbulent model (Spalart-Allmaras). */
- SA_NEG, /*!< \brief Kind of Turbulent model (Spalart-Allmaras). */
+ SA_NEG, /*!< \brief Kind of Turbulent model (Negative Spalart-Allmaras). */
SA_E, /*!< \brief Kind of Turbulent model (Spalart-Allmaras Edwards). */
SA_COMP, /*!< \brief Kind of Turbulent model (Spalart-Allmaras Compressibility Correction). */
SA_E_COMP, /*!< \brief Kind of Turbulent model (Spalart-Allmaras Edwards with Compressibility Correction). */
SST, /*!< \brief Kind of Turbulence model (Menter SST). */
- SST_SUST /*!< \brief Kind of Turbulence model (Menter SST with sustaining terms for free-stream preservation). */
};
static const MapType Turb_Model_Map = {
MakePair("NONE", TURB_MODEL::NONE)
@@ -927,7 +926,6 @@ static const MapType Turb_Model_Map = {
MakePair("SA_COMP", TURB_MODEL::SA_COMP)
MakePair("SA_E_COMP", TURB_MODEL::SA_E_COMP)
MakePair("SST", TURB_MODEL::SST)
- MakePair("SST_SUST", TURB_MODEL::SST_SUST)
};
/*!
@@ -952,19 +950,119 @@ inline TURB_FAMILY TurbModelFamily(TURB_MODEL model) {
case TURB_MODEL::SA_E_COMP:
return TURB_FAMILY::SA;
case TURB_MODEL::SST:
- case TURB_MODEL::SST_SUST:
return TURB_FAMILY::KW;
}
return TURB_FAMILY::NONE;
}
+/*!
+ * \brief SST Options
+ */
+enum class SST_OPTIONS {
+ NONE, /*!< \brief No SST Turb model. */
+ V1994, /*!< \brief 1994 Menter k-w SST model. */
+ V2003, /*!< \brief 2003 Menter k-w SST model. */
+ V1994m, /*!< \brief 1994m Menter k-w SST model. */
+ V2003m, /*!< \brief 2003m Menter k-w SST model. */
+ SUST, /*!< \brief Menter k-w SST model with sustaining terms. */
+ V, /*!< \brief Menter k-w SST model with vorticity production terms. */
+ KL, /*!< \brief Menter k-w SST model with Kato-Launder production terms. */
+ UQ, /*!< \brief Menter k-w SST model with uncertainty quantification modifications. */
+};
+static const MapType SST_Options_Map = {
+ MakePair("NONE", SST_OPTIONS::NONE)
+ MakePair("V1994m", SST_OPTIONS::V1994m)
+ MakePair("V2003m", SST_OPTIONS::V2003m)
+ /// TODO: For now we do not support "unmodified" versions of SST.
+ //MakePair("V1994", SST_OPTIONS::V1994)
+ //MakePair("V2003", SST_OPTIONS::V2003)
+ MakePair("SUSTAINING", SST_OPTIONS::SUST)
+ MakePair("VORTICITY", SST_OPTIONS::V)
+ MakePair("KATO-LAUNDER", SST_OPTIONS::KL)
+ MakePair("UQ", SST_OPTIONS::UQ)
+};
+
+/*!
+ * \brief Structure containing parsed SST options.
+ */
+struct SST_ParsedOptions {
+ SST_OPTIONS version = SST_OPTIONS::V1994; /*!< \brief Enum SST base model. */
+ SST_OPTIONS production = SST_OPTIONS::NONE; /*!< \brief Enum for production corrections/modifiers for SST model. */
+ bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */
+ bool uq = false; /*!< \brief Bool for using uncertainty quantification. */
+ bool modified = false; /*!< \brief Bool for modified (m) SST model. */
+};
+
+/*!
+ * \brief Function to parse SST options.
+ * \param[in] SST_Options - Selected SST option from config.
+ * \param[in] nSST_Options - Number of options selected.
+ * \param[in] rank - MPI rank.
+ */
+inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigned short nSST_Options, int rank) {
+ SST_ParsedOptions SSTParsedOptions;
+
+ auto IsPresent = [&](SST_OPTIONS option) {
+ const auto sst_options_end = SST_Options + nSST_Options;
+ return std::find(SST_Options, sst_options_end, option) != sst_options_end;
+ };
+
+ const bool found_1994 = IsPresent(SST_OPTIONS::V1994);
+ const bool found_2003 = IsPresent(SST_OPTIONS::V2003);
+ const bool found_1994m = IsPresent(SST_OPTIONS::V1994m);
+ const bool found_2003m = IsPresent(SST_OPTIONS::V2003m);
+
+ const bool default_version = !found_1994 && !found_1994m && !found_2003 && !found_2003m;
+
+ const bool sst_1994 = found_1994 || found_1994m || default_version;
+ const bool sst_2003 = found_2003 || found_2003m;
+
+ /*--- When V2003m or V1994m is selected, we automatically select sst_m. ---*/
+ const bool sst_m = found_1994m || found_2003m || default_version;
+
+ const bool sst_sust = IsPresent(SST_OPTIONS::SUST);
+ const bool sst_v = IsPresent(SST_OPTIONS::V);
+ const bool sst_kl = IsPresent(SST_OPTIONS::KL);
+ const bool sst_uq = IsPresent(SST_OPTIONS::UQ);
+
+ if (sst_1994 && sst_2003) {
+ SU2_MPI::Error("Two versions (1994 and 2003) selected for SST_OPTIONS. Please choose only one.", CURRENT_FUNCTION);
+ } else if (sst_2003) {
+ SSTParsedOptions.version = SST_OPTIONS::V2003;
+ } else {
+ SSTParsedOptions.version = SST_OPTIONS::V1994;
+
+ if (rank==MASTER_NODE) {
+ std::cout <<
+ "WARNING: The current SST-1994m model is inconsistent with literature. We recommend using the SST-2003m model.\n"
+ "In SU2 v8 the 2003m model will become default, and the inconsistency will be fixed." << std::endl;
+ }
+ }
+
+ // Parse production modifications
+ if ((int(sst_v) + int(sst_kl) + int(sst_uq)) > 1) {
+ SU2_MPI::Error("Please select only one SST production term modifier (VORTICITY, KATO-LAUNDER, or UQ).", CURRENT_FUNCTION);
+ } else if (sst_v) {
+ SSTParsedOptions.production = SST_OPTIONS::V;
+ } else if (sst_kl) {
+ SSTParsedOptions.production = SST_OPTIONS::KL;
+ } else if (sst_uq) {
+ SSTParsedOptions.production = SST_OPTIONS::UQ;
+ }
+
+ SSTParsedOptions.sust = sst_sust;
+ SSTParsedOptions.modified = sst_m;
+ SSTParsedOptions.uq = sst_uq;
+ return SSTParsedOptions;
+}
+
/*!
* \brief Types of transition models
*/
enum class TURB_TRANS_MODEL {
NONE, /*!< \brief No transition model. */
LM, /*!< \brief Kind of transition model (Langtry-Menter (LM) for SST and Spalart-Allmaras). */
- BC /*!< \brief Kind of transition model (BAS-CAKMAKCIOGLU (BC) for Spalart-Allmaras). */
+ BC /*!< \brief Kind of transition model (BAS-CAKMAKCIOGLU (BC) for Spalart-Allmaras). */
};
static const MapType Trans_Model_Map = {
MakePair("NONE", TURB_TRANS_MODEL::NONE)
@@ -1002,7 +1100,6 @@ static const MapType SGS_Model_Map = {
MakePair("VREMAN", TURB_SGS_MODEL::VREMAN)
};
-
/*!
* \brief Types of window (weight) functions for cost functional
*/
diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp
index 8e88bd852be0..b03edf579d4d 100644
--- a/Common/src/CConfig.cpp
+++ b/Common/src/CConfig.cpp
@@ -1089,6 +1089,9 @@ void CConfig::SetConfig_Options() {
addMathProblemOption("MATH_PROBLEM", ContinuousAdjoint, false, DiscreteAdjoint, discAdjDefault, Restart_Flow, discAdjDefault);
/*!\brief KIND_TURB_MODEL \n DESCRIPTION: Specify turbulence model \n Options: see \link Turb_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/
addEnumOption("KIND_TURB_MODEL", Kind_Turb_Model, Turb_Model_Map, TURB_MODEL::NONE);
+ /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SST turbulence model options/corrections. \n Options: see \link SST_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/
+ addEnumListOption("SST_OPTIONS", nSST_Options, SST_Options, SST_Options_Map);
+
/*!\brief KIND_TRANS_MODEL \n DESCRIPTION: Specify transition model OPTIONS: see \link Trans_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/
addEnumOption("KIND_TRANS_MODEL", Kind_Trans_Model, Trans_Model_Map, TURB_TRANS_MODEL::NONE);
@@ -2829,9 +2832,6 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Volume solution files */
addEnumListOption("OUTPUT_FILES", nVolumeOutputFiles, VolumeOutputFiles, Output_Map);
- /* DESCRIPTION: Using Uncertainty Quantification with SST Turbulence Model */
- addBoolOption("USING_UQ", using_uq, false);
-
/* DESCRIPTION: Parameter to perturb eigenvalues */
addDoubleOption("UQ_DELTA_B", uq_delta_b, 1.0);
@@ -2944,7 +2944,6 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
}
if (TokenizeString(text_line, option_name, option_value)) {
-
/*--- See if it's a python option ---*/
if (option_map.find(option_name) == option_map.end()) {
@@ -3054,6 +3053,10 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
string out = option_map[option_name]->SetValue(option_value);
if (out.compare("") != 0) {
+ /*--- valid option, but deprecated value ---*/
+ if ((!option_name.compare("KIND_TURB_MODEL")) && (option_value[0]=="SST_SUST"))
+ errorString.append("Option KIND_TURB_MODEL=SST_SUST is deprecated. Use KIND_TURB_MODEL=SST, SST_OPTIONS=SUSTAINING instead.\n");
+
errorString.append(out);
errorString.append("\n");
err_count++;
@@ -3395,9 +3398,14 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= INC_RANS", CURRENT_FUNCTION);
}
+ /*--- Postprocess SST_OPTIONS into structure. ---*/
+ if (Kind_Turb_Model==TURB_MODEL::SST) {
+ sstParsedOptions = ParseSSTOptions(SST_Options, nSST_Options, rank);
+ }
+
/*--- Check if turbulence model can be used for AXISYMMETRIC case---*/
- if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST && Kind_Turb_Model != TURB_MODEL::SST_SUST){
- SU2_MPI::Error("Axisymmetry is currently only supported for KIND_TURB_MODEL chosen as SST or SST_SUST", CURRENT_FUNCTION);
+ if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST){
+ SU2_MPI::Error("Axisymmetry is currently only supported for KIND_TURB_MODEL chosen as SST", CURRENT_FUNCTION);
}
/*--- Set the boolean Wall_Functions equal to true if there is a
@@ -4670,18 +4678,6 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
Finite_Difference_Mode = false;
- /* --- Throw error if UQ used for any turbulence model other that SST --- */
-
- if (Kind_Solver == MAIN_SOLVER::RANS && Kind_Turb_Model != TURB_MODEL::SST && Kind_Turb_Model != TURB_MODEL::SST_SUST && using_uq){
- SU2_MPI::Error("UQ capabilities only implemented for NAVIER_STOKES solver SST turbulence model", CURRENT_FUNCTION);
- }
-
- /* --- Throw error if invalid componentiality used --- */
-
- if (using_uq && (eig_val_comp > 3 || eig_val_comp < 1)){
- SU2_MPI::Error("Componentality should be either 1, 2, or 3!", CURRENT_FUNCTION);
- }
-
/*--- If there are not design variables defined in the file ---*/
if (nDV == 0) {
@@ -5870,8 +5866,30 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
case TURB_MODEL::SA_E: cout << "Edwards Spalart Allmaras" << endl; break;
case TURB_MODEL::SA_COMP: cout << "Compressibility Correction Spalart Allmaras" << endl; break;
case TURB_MODEL::SA_E_COMP: cout << "Compressibility Correction Edwards Spalart Allmaras" << endl; break;
- case TURB_MODEL::SST: cout << "Menter's SST" << endl; break;
- case TURB_MODEL::SST_SUST: cout << "Menter's SST with sustaining terms" << endl; break;
+ case TURB_MODEL::SST:
+ cout << "Menter's k-omega SST";
+ if (sstParsedOptions.version == SST_OPTIONS::V1994) cout << "-1994";
+ else cout << "-2003";
+ if (sstParsedOptions.modified) cout << "m";
+ if (sstParsedOptions.sust) cout << " with sustaining terms, and";
+
+ switch (sstParsedOptions.production) {
+ case SST_OPTIONS::KL:
+ cout << " with Kato-Launder production";
+ break;
+ case SST_OPTIONS::V:
+ cout << " with Vorticity production";
+ break;
+ case SST_OPTIONS::UQ:
+ cout << "\nperturbing the Reynold's Stress Matrix towards " << eig_val_comp << " component turbulence";
+ if (uq_permute) cout << " (permuting eigenvectors)";
+ break;
+ default:
+ cout << " with no production modification";
+ break;
+ }
+ cout << "." << endl;
+ break;
}
if (QCR) cout << "Using Quadratic Constitutive Relation, 2000 version (QCR2000)" << endl;
if (Kind_Trans_Model == TURB_TRANS_MODEL::BC) cout << "Using the revised BC transition model (2020)" << endl;
@@ -5883,10 +5901,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
case SA_ZDES: cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; break;
case SA_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break;
}
- if (using_uq){
- cout << "Perturbing Reynold's Stress Matrix towards "<< eig_val_comp << " component turbulence"<< endl;
- if (uq_permute) cout << "Permuting eigenvectors" << endl;
- }
break;
case MAIN_SOLVER::NEMO_EULER:
if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Euler equations." << endl;
diff --git a/SU2_CFD/include/numerics/CNumerics.hpp b/SU2_CFD/include/numerics/CNumerics.hpp
index 16adc07a6ec4..3d2dbd7dde5b 100644
--- a/SU2_CFD/include/numerics/CNumerics.hpp
+++ b/SU2_CFD/include/numerics/CNumerics.hpp
@@ -1,6 +1,6 @@
/*!
* \file CNumerics.hpp
- * \brief Delaration of the base numerics class, the
+ * \brief Declaration of the base numerics class, the
* implementation is in the CNumerics.cpp file.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
@@ -180,8 +180,8 @@ class CNumerics {
su2double roughness_i = 0.0, /*!< \brief Roughness of the wall nearest to point i. */
roughness_j = 0.0; /*!< \brief Roughness of the wall nearest to point j. */
- su2double MeanPerturbedRSM[3][3];/*!< \brief Perturbed Reynolds stress tensor */
- bool using_uq; /*!< \brief Flag for UQ methodology */
+ su2double MeanPerturbedRSM[3][3]; /*!< \brief Perturbed Reynolds stress tensor */
+ SST_ParsedOptions sstParsedOptions; /*!< \brief additional options for the SST turbulence model */
unsigned short Eig_Val_Comp; /*!< \brief Component towards which perturbation is perfromed */
su2double uq_delta_b; /*!< \brief Magnitude of perturbation */
su2double uq_urlx; /*!< \brief Under-relaxation factor for numerical stability */
diff --git a/SU2_CFD/include/numerics/NEMO/NEMO_sources.hpp b/SU2_CFD/include/numerics/NEMO/NEMO_sources.hpp
index 2d78b0f1a54e..b3f31a53fc33 100644
--- a/SU2_CFD/include/numerics/NEMO/NEMO_sources.hpp
+++ b/SU2_CFD/include/numerics/NEMO/NEMO_sources.hpp
@@ -1,6 +1,6 @@
/*!
* \file NEMO_sources.hpp
- * \brief Delarations of numerics classes for source-term integration.
+ * \brief Declarations of numerics classes for source-term integration.
* \author C. Garbacz, W. Maier, S. Copeland.
* \version 7.3.1 "Blackbird"
*
diff --git a/SU2_CFD/include/numerics/NEMO/convection/roe.hpp b/SU2_CFD/include/numerics/NEMO/convection/roe.hpp
index 3b99d96d3830..032cf7f4f594 100644
--- a/SU2_CFD/include/numerics/NEMO/convection/roe.hpp
+++ b/SU2_CFD/include/numerics/NEMO/convection/roe.hpp
@@ -1,6 +1,6 @@
/*!
* \file roe.hpp
- * \brief Delarations of numerics classes for Roe-type schemes in NEMO.
+ * \brief Declarations of numerics classes for Roe-type schemes in NEMO.
* \author S.R. Copeland, W. Maier, C. Garbacz
* \version 7.3.1 "Blackbird"
*
diff --git a/SU2_CFD/include/numerics/continuous_adjoint/adj_convection.hpp b/SU2_CFD/include/numerics/continuous_adjoint/adj_convection.hpp
index faa25d5dd6bd..21ad7fdef41d 100644
--- a/SU2_CFD/include/numerics/continuous_adjoint/adj_convection.hpp
+++ b/SU2_CFD/include/numerics/continuous_adjoint/adj_convection.hpp
@@ -1,6 +1,6 @@
/*!
* \file adj_convection.hpp
- * \brief Delarations of numerics classes for continuous adjoint
+ * \brief Declarations of numerics classes for continuous adjoint
* convective discretization. Implemented in adj_convection.cpp.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/continuous_adjoint/adj_diffusion.hpp b/SU2_CFD/include/numerics/continuous_adjoint/adj_diffusion.hpp
index 63901c78d8b4..3056084ad98d 100644
--- a/SU2_CFD/include/numerics/continuous_adjoint/adj_diffusion.hpp
+++ b/SU2_CFD/include/numerics/continuous_adjoint/adj_diffusion.hpp
@@ -1,6 +1,6 @@
/*!
* \file adj_diffusion.hpp
- * \brief Delarations of numerics classes for continuous adjoint
+ * \brief Declarations of numerics classes for continuous adjoint
* diffusion discretization. Implemented in adj_diffusion.cpp.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/continuous_adjoint/adj_sources.hpp b/SU2_CFD/include/numerics/continuous_adjoint/adj_sources.hpp
index 150e2fad3fc5..ef72d41f402b 100644
--- a/SU2_CFD/include/numerics/continuous_adjoint/adj_sources.hpp
+++ b/SU2_CFD/include/numerics/continuous_adjoint/adj_sources.hpp
@@ -1,6 +1,6 @@
/*!
* \file adj_sources.hpp
- * \brief Delarations of numerics classes for continuous adjoint
+ * \brief Declarations of numerics classes for continuous adjoint
* source term integration. Implemented in adj_sources.cpp.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/flow/convection/centered.hpp b/SU2_CFD/include/numerics/flow/convection/centered.hpp
index 21d84bf929f2..03ff9ba32291 100644
--- a/SU2_CFD/include/numerics/flow/convection/centered.hpp
+++ b/SU2_CFD/include/numerics/flow/convection/centered.hpp
@@ -1,6 +1,6 @@
/*!
* \file centered.hpp
- * \brief Delaration of numerics classes for centered schemes,
+ * \brief Declaration of numerics classes for centered schemes,
* the implementation is in centered.cpp.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/flow/convection/fvs.hpp b/SU2_CFD/include/numerics/flow/convection/fvs.hpp
index de5c0be1a992..53ab59c8378f 100644
--- a/SU2_CFD/include/numerics/flow/convection/fvs.hpp
+++ b/SU2_CFD/include/numerics/flow/convection/fvs.hpp
@@ -1,6 +1,6 @@
/*!
* \file fvs.hpp
- * \brief Delarations of classes for Flux-Vector-Spliting schemes,
+ * \brief Declarations of classes for Flux-Vector-Spliting schemes,
* the implementations are in fvs.cpp.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/flow/convection/roe.hpp b/SU2_CFD/include/numerics/flow/convection/roe.hpp
index 10fdf40c7d2d..541d26e0746d 100644
--- a/SU2_CFD/include/numerics/flow/convection/roe.hpp
+++ b/SU2_CFD/include/numerics/flow/convection/roe.hpp
@@ -1,6 +1,6 @@
/*!
* \file roe.hpp
- * \brief Delarations of numerics classes for Roe-type schemes,
+ * \brief Declarations of numerics classes for Roe-type schemes,
* implemented in roe.cpp.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/flow/flow_diffusion.hpp b/SU2_CFD/include/numerics/flow/flow_diffusion.hpp
index 0cf74e90ebea..8a20fdf40124 100644
--- a/SU2_CFD/include/numerics/flow/flow_diffusion.hpp
+++ b/SU2_CFD/include/numerics/flow/flow_diffusion.hpp
@@ -1,6 +1,6 @@
/*!
* \file flow_diffusion.hpp
- * \brief Delarations of numerics classes for viscous flux computation.
+ * \brief Declarations of numerics classes for viscous flux computation.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
*
diff --git a/SU2_CFD/include/numerics/flow/flow_sources.hpp b/SU2_CFD/include/numerics/flow/flow_sources.hpp
index 7bdfbde7a732..8ca0accf23d7 100644
--- a/SU2_CFD/include/numerics/flow/flow_sources.hpp
+++ b/SU2_CFD/include/numerics/flow/flow_sources.hpp
@@ -1,6 +1,6 @@
/*!
* \file flow_sources.hpp
- * \brief Delarations of numerics classes for source-term integration.
+ * \brief Declarations of numerics classes for source-term integration.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
*
diff --git a/SU2_CFD/include/numerics/heat.hpp b/SU2_CFD/include/numerics/heat.hpp
index 12e215021852..a7b2dd8cf78e 100644
--- a/SU2_CFD/include/numerics/heat.hpp
+++ b/SU2_CFD/include/numerics/heat.hpp
@@ -1,6 +1,6 @@
/*!
* \file heat.hpp
- * \brief Delarations of numerics classes for heat transfer problems.
+ * \brief Declarations of numerics classes for heat transfer problems.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
*
diff --git a/SU2_CFD/include/numerics/scalar/scalar_convection.hpp b/SU2_CFD/include/numerics/scalar/scalar_convection.hpp
index 5a982e2adc93..99c9314adbf5 100644
--- a/SU2_CFD/include/numerics/scalar/scalar_convection.hpp
+++ b/SU2_CFD/include/numerics/scalar/scalar_convection.hpp
@@ -1,6 +1,6 @@
/*!
* \file scalar_convection.hpp
- * \brief Delarations of numerics classes for discretization of
+ * \brief Declarations of numerics classes for discretization of
* convective fluxes in scalar problems.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/scalar/scalar_sources.hpp b/SU2_CFD/include/numerics/scalar/scalar_sources.hpp
index a7ea39c15370..73164b955c99 100644
--- a/SU2_CFD/include/numerics/scalar/scalar_sources.hpp
+++ b/SU2_CFD/include/numerics/scalar/scalar_sources.hpp
@@ -1,6 +1,6 @@
/*!
* \file scalar_sources.hpp
- * \brief Delarations of numerics classes for integration of source terms in scalar problems.
+ * \brief Declarations of numerics classes for integration of source terms in scalar problems.
* \version 7.3.1 "Blackbird"
*
* SU2 Project Website: https://su2code.github.io
diff --git a/SU2_CFD/include/numerics/species/species_convection.hpp b/SU2_CFD/include/numerics/species/species_convection.hpp
index 9344921139de..506dd163963a 100644
--- a/SU2_CFD/include/numerics/species/species_convection.hpp
+++ b/SU2_CFD/include/numerics/species/species_convection.hpp
@@ -1,6 +1,6 @@
/*!
* \file species_convection.hpp
- * \brief Delarations of numerics classes for discretization of
+ * \brief Declarations of numerics classes for discretization of
* convective fluxes in species problems.
* \author T. Kattmann
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/species/species_sources.hpp b/SU2_CFD/include/numerics/species/species_sources.hpp
index c160844ad68a..08fe32b02949 100644
--- a/SU2_CFD/include/numerics/species/species_sources.hpp
+++ b/SU2_CFD/include/numerics/species/species_sources.hpp
@@ -1,6 +1,6 @@
/*!
* \file species_sources.hpp
- * \brief Delarations of numerics classes for integration of source
+ * \brief Declarations of numerics classes for integration of source
* terms in species problems.
* \author T. Kattmann
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/transition.hpp b/SU2_CFD/include/numerics/transition.hpp
index 34dc0fb9e5b0..2e2681a0afba 100644
--- a/SU2_CFD/include/numerics/transition.hpp
+++ b/SU2_CFD/include/numerics/transition.hpp
@@ -1,6 +1,6 @@
/*!
* \file transition.hpp
- * \brief Delarations of numerics classes for transition problems.
+ * \brief Declarations of numerics classes for transition problems.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
*
diff --git a/SU2_CFD/include/numerics/turbulent/turb_convection.hpp b/SU2_CFD/include/numerics/turbulent/turb_convection.hpp
index 913ef24a7c31..47279c0181e0 100644
--- a/SU2_CFD/include/numerics/turbulent/turb_convection.hpp
+++ b/SU2_CFD/include/numerics/turbulent/turb_convection.hpp
@@ -1,6 +1,6 @@
/*!
* \file turb_convection.hpp
- * \brief Delarations of numerics classes for discretization of
+ * \brief Declarations of numerics classes for discretization of
* convective fluxes in turbulence problems.
* \author F. Palacios, T. Economon
* \version 7.3.1 "Blackbird"
diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp
index fe581827e121..9fb9b2985371 100644
--- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp
+++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp
@@ -564,6 +564,7 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
/*--- Closure constants ---*/
const su2double sigma_k_1, sigma_k_2, sigma_w_1, sigma_w_2, beta_1, beta_2, beta_star, a1, alfa_1, alfa_2;
+ const su2double prod_lim_const;
/*--- Ambient values for SST-SUST. ---*/
const su2double kAmb, omegaAmb;
@@ -637,7 +638,6 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
su2double val_omega_Inf, const CConfig* config)
: CNumerics(val_nDim, 2, config),
idx(val_nDim, config->GetnSpecies()),
- sustaining_terms(config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST),
axisymmetric(config->GetAxisymmetric()),
sigma_k_1(constants[0]),
sigma_k_2(constants[1]),
@@ -649,6 +649,7 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
a1(constants[7]),
alfa_1(constants[8]),
alfa_2(constants[9]),
+ prod_lim_const(constants[10]),
kAmb(val_kine_Inf),
omegaAmb(val_omega_Inf) {
/*--- "Allocate" the Jacobian using the static buffer. ---*/
@@ -717,7 +718,6 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
const su2double beta_blended = F1_i * beta_1 + (1.0 - F1_i) * beta_2;
if (dist_i > 1e-10) {
- /*--- Production ---*/
su2double diverg = 0.0;
for (unsigned short iDim = 0; iDim < nDim; iDim++)
@@ -725,20 +725,53 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
/*--- If using UQ methodolgy, calculate production using perturbed Reynolds stress matrix ---*/
- su2double StrainMag = StrainMag_i;
+ const su2double VorticityMag = GeometryToolbox::Norm(3, Vorticity_i);
+ su2double P_Base = 0;
- if (using_uq) {
- ComputePerturbedRSM(nDim, Eig_Val_Comp, uq_permute, uq_delta_b, uq_urlx, PrimVar_Grad_i + idx.Velocity(),
+ /*--- Apply production term modifications ---*/
+ switch (sstParsedOptions.production) {
+ case SST_OPTIONS::UQ:
+ ComputePerturbedRSM(nDim, Eig_Val_Comp, uq_permute, uq_delta_b, uq_urlx, PrimVar_Grad_i + idx.Velocity(),
Density_i, Eddy_Viscosity_i, ScalarVar_i[0], MeanPerturbedRSM);
- StrainMag = PerturbedStrainMag(ScalarVar_i[0]);
+ P_Base = PerturbedStrainMag(ScalarVar_i[0]);
+ break;
+
+ case SST_OPTIONS::V:
+ P_Base = VorticityMag;
+ break;
+
+ case SST_OPTIONS::KL:
+ P_Base = sqrt(StrainMag_i*VorticityMag);
+ break;
+
+ default:
+ /*--- Base production term for SST-1994 and SST-2003 ---*/
+ P_Base = StrainMag_i;
+ break;
}
- su2double pk = Eddy_Viscosity_i * pow(StrainMag, 2) - 2.0 / 3.0 * Density_i * ScalarVar_i[0] * diverg;
- pk = max(0.0, min(pk, 20.0 * beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0]));
+ /*--- Production limiter. ---*/
+ const su2double prod_limit = prod_lim_const * beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0];
- const su2double VorticityMag = GeometryToolbox::Norm(3, Vorticity_i);
- const su2double zeta = max(ScalarVar_i[1], VorticityMag * F2_i / a1);
- su2double pw = alfa_blended * Density_i * max(pow(StrainMag, 2) - 2.0 / 3.0 * zeta * diverg, 0.0);
+ su2double P = Eddy_Viscosity_i * pow(P_Base, 2);
+
+ if (sstParsedOptions.version == SST_OPTIONS::V1994) {
+ /*--- INTRODUCE THE SST-V1994m BUG WHERE DIVERGENCE TERM WILL BE REMOVED ---*/
+ P -= 2.0 / 3.0 * Density_i * ScalarVar_i[0] * diverg;
+ }
+ su2double pk = max(0.0, min(P, prod_limit));
+
+ const auto& eddy_visc_var = sstParsedOptions.version == SST_OPTIONS::V1994 ? VorticityMag : StrainMag_i;
+ const su2double zeta = max(ScalarVar_i[1], eddy_visc_var * F2_i / a1);
+
+ /*--- Production limiter only for V2003, recompute for V1994. ---*/
+ su2double pw;
+ if (sstParsedOptions.version == SST_OPTIONS::V1994) {
+ /*--- INTRODUCE THE SST-V1994m BUG WHERE DIVERGENCE TERM WILL BE REMOVED ---*/
+ pw = alfa_blended * Density_i * max(pow(P_Base, 2) - 2.0 / 3.0 * zeta * diverg, 0.0);
+ } else {
+ pw = (alfa_blended * Density_i / Eddy_Viscosity_i) * pk;
+ }
/*--- Sustaining terms, if desired. Note that if the production terms are
larger equal than the sustaining terms, the original formulation is
@@ -746,8 +779,7 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
where the sustaining terms are simply added. This latter approach could
lead to problems for very big values of the free-stream turbulence
intensity. ---*/
-
- if (sustaining_terms) {
+ if (sstParsedOptions.sust) {
const su2double sust_k = beta_star * Density_i * kAmb * omegaAmb;
const su2double sust_w = beta_blended * Density_i * omegaAmb * omegaAmb;
pk = max(pk, sust_k);
diff --git a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp
index b408ef9bd8de..d0a73ea43faa 100644
--- a/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp
+++ b/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp
@@ -101,7 +101,7 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD {
correct(iMesh == MESH_0),
useSA_QCR(config.GetQCR()),
wallFun(config.GetWall_Functions()),
- uq(config.GetUsing_UQ()),
+ uq(config.GetSSTParsedOptions().uq),
uq_permute(config.GetUQ_Permute()),
uq_eigval_comp(config.GetEig_Val_Comp()),
uq_delta_b(config.GetUQ_Delta_B()),
diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl
index 0860f66e88ec..68efa356d5ed 100644
--- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl
+++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl
@@ -406,8 +406,7 @@ void CFVMFlowSolverBase::Viscous_Residual_impl(unsigned long iEdge, CGeome
CNumerics *numerics, CConfig *config) {
const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
- const bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) ||
- (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ const bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
CVariable* turbNodes = nullptr;
if (tkeNeeded) turbNodes = solver_container[TURB_SOL]->GetNodes();
@@ -1317,7 +1316,7 @@ void CFVMFlowSolverBase::BC_Sym_Plane(CGeometry* geometry, CSolver** solve
visc_numerics->SetPrimVarGradient(nodes->GetGradient_Primitive(iPoint), CMatrixView(Grad_Reflected));
/*--- Turbulent kinetic energy. ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0));
@@ -1483,7 +1482,7 @@ void CFVMFlowSolverBase::BC_Fluid_Interface(CGeometry* geometry,
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0));
diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp
index a45c7257537e..9859be36c21c 100644
--- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp
+++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp
@@ -37,7 +37,8 @@
*/
class CTurbSSTSolver final : public CTurbSolver {
private:
- su2double constants[10] = {0.0}; /*!< \brief Constants for the model. */
+ su2double constants[11] = {0.0}; /*!< \brief Constants for the model. */
+ SST_ParsedOptions sstParsedOptions;
/*!
* \brief Compute nu tilde from the wall functions.
diff --git a/SU2_CFD/include/variables/CTurbSSTVariable.hpp b/SU2_CFD/include/variables/CTurbSSTVariable.hpp
index fc494d42cf52..f01ba994b4b4 100644
--- a/SU2_CFD/include/variables/CTurbSSTVariable.hpp
+++ b/SU2_CFD/include/variables/CTurbSSTVariable.hpp
@@ -40,10 +40,11 @@ class CTurbSSTVariable final : public CTurbVariable {
protected:
su2double sigma_om2;
su2double beta_star;
+ su2double prod_lim_const;
VectorType F1;
VectorType F2; /*!< \brief Menter blending function for blending of k-w and k-eps. */
VectorType CDkw; /*!< \brief Cross-diffusion. */
-
+ SST_ParsedOptions sstParsedOptions;
public:
/*!
* \brief Constructor of the class.
@@ -53,7 +54,7 @@ class CTurbSSTVariable final : public CTurbVariable {
* \param[in] npoint - Number of points/nodes/vertices in the domain.
* \param[in] ndim - Number of dimensions of the problem.
* \param[in] nvar - Number of variables of the problem.
- * \param[in] constants -
+ * \param[in] constants - sst model constants
* \param[in] config - Definition of the particular problem.
*/
CTurbSSTVariable(su2double kine, su2double omega, su2double mut, unsigned long npoint,
diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp
index 2a24ced729db..f945e9df1830 100644
--- a/SU2_CFD/src/drivers/CDriver.cpp
+++ b/SU2_CFD/src/drivers/CDriver.cpp
@@ -1240,7 +1240,6 @@ void CDriver::InstantiateTurbulentNumerics(unsigned short nVar_Turb, int offset,
case TURB_MODEL::SA_COMP: comp_spalart_allmaras = true; break;
case TURB_MODEL::SA_E_COMP: e_comp_spalart_allmaras = true; break;
case TURB_MODEL::SST: menter_sst = true; break;
- case TURB_MODEL::SST_SUST: menter_sst = true; break;
}
/*--- If the Menter SST model is used, store the constants of the model and determine the
diff --git a/SU2_CFD/src/numerics/CNumerics.cpp b/SU2_CFD/src/numerics/CNumerics.cpp
index 17dd415f78d5..6f2589811eaa 100644
--- a/SU2_CFD/src/numerics/CNumerics.cpp
+++ b/SU2_CFD/src/numerics/CNumerics.cpp
@@ -36,9 +36,7 @@ CNumerics::CNumerics(void) {
Proj_Flux_Tensor = nullptr;
tau = nullptr;
-
- using_uq = false;
-
+
nemo = false;
}
@@ -69,7 +67,7 @@ CNumerics::CNumerics(unsigned short val_nDim, unsigned short val_nVar,
Dissipation_ij = 1.0;
/* --- Initializing variables for the UQ methodology --- */
- using_uq = config->GetUsing_UQ();
+ sstParsedOptions = config->GetSSTParsedOptions();
Eig_Val_Comp = config->GetEig_Val_Comp();
uq_delta_b = config->GetUQ_Delta_B();
uq_urlx = config->GetUQ_URLX();
diff --git a/SU2_CFD/src/numerics/flow/flow_diffusion.cpp b/SU2_CFD/src/numerics/flow/flow_diffusion.cpp
index 4d9c4e32f135..789e24231189 100644
--- a/SU2_CFD/src/numerics/flow/flow_diffusion.cpp
+++ b/SU2_CFD/src/numerics/flow/flow_diffusion.cpp
@@ -130,7 +130,7 @@ void CAvgGrad_Base::SetStressTensor(const su2double *val_primvar,
* for the turbulent part of tau. Otherwise both the laminar and turbulent
* parts of tau can be computed with the total viscosity. --- */
- if (using_uq){
+ if (sstParsedOptions.uq) {
// laminar part
ComputeStressTensor(nDim, tau, val_gradprimvar+1, val_laminar_viscosity);
// add turbulent part which was perturbed
@@ -426,7 +426,7 @@ CNumerics::ResidualType<> CAvgGrad_Flow::ComputeResidual(const CConfig* config)
/*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/
- if (using_uq){
+ if (sstParsedOptions.uq) {
ComputePerturbedRSM(nDim, Eig_Val_Comp, uq_permute, uq_delta_b, uq_urlx,
Mean_GradPrimVar+1, Mean_PrimVar[nDim+2], Mean_Eddy_Viscosity,
Mean_turb_ke, MeanPerturbedRSM);
@@ -611,7 +611,7 @@ CNumerics::ResidualType<> CAvgGradInc_Flow::ComputeResidual(const CConfig* confi
/*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/
- if (using_uq){
+ if (sstParsedOptions.uq) {
ComputePerturbedRSM(nDim, Eig_Val_Comp, uq_permute, uq_delta_b, uq_urlx,
Mean_GradPrimVar+1, Mean_PrimVar[nDim+2], Mean_Eddy_Viscosity,
Mean_turb_ke, MeanPerturbedRSM);
@@ -941,7 +941,7 @@ CNumerics::ResidualType<> CGeneralAvgGrad_Flow::ComputeResidual(const CConfig* c
/*--- If using UQ methodology, set Reynolds Stress tensor and perform perturbation ---*/
- if (using_uq){
+ if (sstParsedOptions.uq) {
ComputePerturbedRSM(nDim, Eig_Val_Comp, uq_permute, uq_delta_b, uq_urlx,
Mean_GradPrimVar+1, Mean_PrimVar[nDim+2], Mean_Eddy_Viscosity,
Mean_turb_ke, MeanPerturbedRSM);
diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp
index 8675f7567729..99bca4bd7a66 100644
--- a/SU2_CFD/src/output/CFlowOutput.cpp
+++ b/SU2_CFD/src/output/CFlowOutput.cpp
@@ -2098,10 +2098,11 @@ void CFlowOutput::WriteForcesBreakdown(const CConfig* config, const CSolver* flo
break;
case TURB_MODEL::SST:
file << "Menter's SST\n";
- break;
- case TURB_MODEL::SST_SUST:
- file << "Menter's SST with sustaining terms\n";
- break;
+ // add the submodels here
+ //file << "Menter's SST with sustaining terms\n";
+ if (config->GetSSTParsedOptions().sust)
+ cout << "Menter's SST with sustaining terms" << endl;
+ break;
}
break;
default:
diff --git a/SU2_CFD/src/output/output_structure_legacy.cpp b/SU2_CFD/src/output/output_structure_legacy.cpp
index cad2a47064cc..e11a09a861af 100644
--- a/SU2_CFD/src/output/output_structure_legacy.cpp
+++ b/SU2_CFD/src/output/output_structure_legacy.cpp
@@ -479,7 +479,7 @@ void COutputLegacy::SetConvHistory_Header(ofstream *ConvHist_file, CConfig *conf
case TURB_MODEL::SA:case TURB_MODEL::SA_NEG:case TURB_MODEL::SA_E: case TURB_MODEL::SA_COMP: case TURB_MODEL::SA_E_COMP:
SPRINTF (turb_resid, ",\"Res_Turb[0]\"");
break;
- case TURB_MODEL::SST:case TURB_MODEL::SST_SUST:
+ case TURB_MODEL::SST:
SPRINTF (turb_resid, ",\"Res_Turb[0]\",\"Res_Turb[1]\"");
break;
default: break;
@@ -488,7 +488,7 @@ void COutputLegacy::SetConvHistory_Header(ofstream *ConvHist_file, CConfig *conf
case TURB_MODEL::SA:case TURB_MODEL::SA_NEG:case TURB_MODEL::SA_E: case TURB_MODEL::SA_COMP: case TURB_MODEL::SA_E_COMP:
SPRINTF (adj_turb_resid, ",\"Res_AdjTurb[0]\"");
break;
- case TURB_MODEL::SST:case TURB_MODEL::SST_SUST:
+ case TURB_MODEL::SST:
SPRINTF (adj_turb_resid, ",\"Res_AdjTurb[0]\",\"Res_AdjTurb[1]\"");
break;
default: break;
@@ -863,7 +863,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file,
if (turbulent) {
switch (config[val_iZone]->GetKind_Turb_Model()) {
case TURB_MODEL::SA: case TURB_MODEL::SA_NEG: case TURB_MODEL::SA_E: case TURB_MODEL::SA_E_COMP: case TURB_MODEL::SA_COMP: nVar_Turb = 1; break;
- case TURB_MODEL::SST: case TURB_MODEL::SST_SUST: nVar_Turb = 2; break;
+ case TURB_MODEL::SST: nVar_Turb = 2; break;
default: break;
}
}
@@ -885,7 +885,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file,
if (turbulent) {
switch (config[val_iZone]->GetKind_Turb_Model()) {
case TURB_MODEL::SA: case TURB_MODEL::SA_NEG: case TURB_MODEL::SA_E: case TURB_MODEL::SA_E_COMP: case TURB_MODEL::SA_COMP: nVar_AdjTurb = 1; break;
- case TURB_MODEL::SST: case TURB_MODEL::SST_SUST: nVar_AdjTurb = 2; break;
+ case TURB_MODEL::SST: nVar_AdjTurb = 2; break;
default: break;
}
}
@@ -1783,7 +1783,7 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file,
switch (config[val_iZone]->GetKind_Turb_Model()) {
case TURB_MODEL::SA: case TURB_MODEL::SA_NEG: case TURB_MODEL::SA_E: case TURB_MODEL::SA_E_COMP: case TURB_MODEL::SA_COMP: cout << " Res[nu]"; break;
- case TURB_MODEL::SST: case TURB_MODEL::SST_SUST: cout << " Res[kine]" << " Res[omega]"; break;
+ case TURB_MODEL::SST: cout << " Res[kine]" << " Res[omega]"; break;
default: break;
}
@@ -2825,7 +2825,6 @@ void COutputLegacy::SpecialOutput_ForcesBreakdown(CSolver *****solver, CGeometry
case TURB_MODEL::SA_COMP: Breakdown_file << "Compressibility Correction Spalart Allmaras" << "\n"; break;
case TURB_MODEL::SA_E_COMP: Breakdown_file << "Compressibility Correction Edwards Spalart Allmaras" << "\n"; break;
case TURB_MODEL::SST: Breakdown_file << "Menter's TURB_MODEL::SST" << "\n"; break;
- case TURB_MODEL::SST_SUST: Breakdown_file << "Menter's TURB_MODEL::SST with sustaining terms" << "\n"; break;
default: break;
}
break;
@@ -6084,7 +6083,7 @@ void COutputLegacy::WriteTurboPerfConvHistory(CConfig *config){
string inMarker_Tag, outMarker_Tag, inMarkerTag_Mix;
unsigned short nZone = config->GetnZone();
bool turbulent = ((config->GetKind_Solver() == MAIN_SOLVER::RANS) || (config->GetKind_Solver() == MAIN_SOLVER::DISC_ADJ_RANS));
- bool menter_sst = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool menter_sst = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
unsigned short nBladesRow, nStages;
unsigned short iStage;
diff --git a/SU2_CFD/src/solvers/CAdjEulerSolver.cpp b/SU2_CFD/src/solvers/CAdjEulerSolver.cpp
index b3af8510c6ce..74a6a8a0fdb1 100644
--- a/SU2_CFD/src/solvers/CAdjEulerSolver.cpp
+++ b/SU2_CFD/src/solvers/CAdjEulerSolver.cpp
@@ -3325,7 +3325,7 @@ void CAdjEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container,
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
/*--- Gradient and limiter of Adjoint Variables ---*/
diff --git a/SU2_CFD/src/solvers/CAdjNSSolver.cpp b/SU2_CFD/src/solvers/CAdjNSSolver.cpp
index 773fc9a30225..be10e5cb2755 100644
--- a/SU2_CFD/src/solvers/CAdjNSSolver.cpp
+++ b/SU2_CFD/src/solvers/CAdjNSSolver.cpp
@@ -773,8 +773,8 @@ void CAdjNSSolver::Viscous_Sensitivity(CGeometry *geometry, CSolver **solver_con
Enthalpy = solver_container[FLOW_SOL]->GetNodes()->GetEnthalpy(iPoint);
/*--- Turbulent kinetic energy ---*/
-
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ /// TODO: This does not seem to be consistent with the primal treatment.
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
val_turb_ke = solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0);
else
val_turb_ke = 0.0;
diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp
index 4029ad0a96db..05ec686661e7 100644
--- a/SU2_CFD/src/solvers/CEulerSolver.cpp
+++ b/SU2_CFD/src/solvers/CEulerSolver.cpp
@@ -788,7 +788,7 @@ void CEulerSolver::SetNondimensionalization(CConfig *config, unsigned short iMes
bool viscous = config->GetViscous();
bool gravity = config->GetGravityForce();
bool turbulent = (config->GetKind_Turb_Model() != TURB_MODEL::NONE);
- bool tkeNeeded = (turbulent && (config->GetKind_Turb_Model() == TURB_MODEL::SST || config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST));
+ bool tkeNeeded = (turbulent && config->GetKind_Turb_Model() == TURB_MODEL::SST);
bool free_stream_temp = (config->GetKind_FreeStreamOption() == FREESTREAM_OPTION::TEMPERATURE_FS);
bool reynolds_init = (config->GetKind_InitOption() == REYNOLDS);
bool aeroelastic = config->GetAeroelastic_Simulation();
@@ -4289,7 +4289,7 @@ void CEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_container,
bool implicit = config->GetKind_TimeIntScheme() == EULER_IMPLICIT;
bool viscous = config->GetViscous();
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool tkeNeeded = config->GetKind_Turb_Model() == TURB_MODEL::SST;
su2double *Normal = new su2double[nDim];
@@ -4499,7 +4499,7 @@ void CEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_container,
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
@@ -4543,8 +4543,8 @@ void CEulerSolver::BC_Riemann(CGeometry *geometry, CSolver **solver_container,
bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
bool viscous = config->GetViscous();
- bool gravity = (config->GetGravityForce());
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool gravity = config->GetGravityForce();
+ bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
su2double *Normal, *FlowDirMix, TangVelocity, NormalVelocity;
Normal = new su2double[nDim];
@@ -4987,7 +4987,7 @@ void CEulerSolver::BC_Riemann(CGeometry *geometry, CSolver **solver_container,
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
@@ -5058,7 +5058,7 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain
unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker));
bool viscous = config->GetViscous();
bool gravity = (config->GetGravityForce());
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
su2double *Normal, *turboNormal, *UnitNormal, *FlowDirMix, FlowDirMixMag, *turboVelocity;
Normal = new su2double[nDim];
@@ -5501,7 +5501,7 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
@@ -6398,7 +6398,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
@@ -6465,7 +6465,8 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
su2double Gas_Constant = config->GetGas_ConstantND();
INLET_TYPE Kind_Inlet= config->GetKind_Inlet();
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
+
su2double *Normal = new su2double[nDim];
/*--- Loop over all the vertices on this boundary marker ---*/
@@ -6723,7 +6724,7 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
//
// /*--- Turbulent kinetic energy ---*/
//
-// if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+// if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
// visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
// solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
//
@@ -6763,7 +6764,8 @@ void CEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container,
su2double Gas_Constant = config->GetGas_ConstantND();
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
bool gravity = (config->GetGravityForce());
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
+
su2double *Normal = new su2double[nDim];
/*--- Loop over all the vertices on this boundary marker ---*/
@@ -6897,7 +6899,7 @@ void CEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container,
//
// /*--- Turbulent kinetic energy ---*/
//
-// if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+// if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
// visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
// solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
//
@@ -6934,7 +6936,7 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con
bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
su2double *Normal = new su2double[nDim];
su2double *Velocity = new su2double[nDim];
@@ -7042,7 +7044,7 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con
//
// /*--- Turbulent kinetic energy ---*/
//
-// if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+// if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
// visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
// solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
//
@@ -7164,7 +7166,7 @@ void CEulerSolver::BC_Supersonic_Outlet(CGeometry *geometry, CSolver **solver_co
//
// /*--- Turbulent kinetic energy ---*/
//
-// if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+// if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
// visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
// solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
//
@@ -7202,7 +7204,7 @@ void CEulerSolver::BC_Engine_Inflow(CGeometry *geometry, CSolver **solver_contai
unsigned short Kind_Engine_Inflow = config->GetKind_Engine_Inflow();
su2double Gas_Constant = config->GetGas_ConstantND();
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
su2double Baseline_Press = 0.75 * config->GetPressure_FreeStreamND();
bool Engine_HalfModel = config->GetEngine_HalfModel();
@@ -7384,7 +7386,7 @@ void CEulerSolver::BC_Engine_Inflow(CGeometry *geometry, CSolver **solver_contai
//
// /*--- Turbulent kinetic energy ---*/
//
-// if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+// if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
// visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
// solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
//
@@ -7418,7 +7420,7 @@ void CEulerSolver::BC_Engine_Exhaust(CGeometry *geometry, CSolver **solver_conta
su2double Gas_Constant = config->GetGas_ConstantND();
bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
su2double DampingFactor = config->GetDamp_Engine_Exhaust();
su2double Baseline_Press = 0.75 * config->GetPressure_FreeStreamND();
@@ -7635,7 +7637,7 @@ void CEulerSolver::BC_Engine_Exhaust(CGeometry *geometry, CSolver **solver_conta
//
// /*--- Turbulent kinetic energy ---*/
//
-// if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+// if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
// visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
// solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
//
@@ -7708,7 +7710,7 @@ void CEulerSolver::BC_ActDisk(CGeometry *geometry, CSolver **solver_container, C
bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
su2double Gas_Constant = config->GetGas_ConstantND();
- bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
bool ratio = (config->GetActDisk_Jump() == RATIO);
su2double SecondaryFlow = config->GetSecondaryFlow_ActDisk();
@@ -8071,7 +8073,7 @@ void CEulerSolver::BC_ActDisk(CGeometry *geometry, CSolver **solver_container, C
//
// /*--- Turbulent kinetic energy ---*/
//
-// if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+// if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
// visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
// solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
//
@@ -8134,7 +8136,7 @@ void CEulerSolver::BC_ActDisk_VariableLoad(CGeometry *geometry, CSolver **solver
const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
const auto Gas_Constant = config->GetGas_ConstantND();
- const bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ const bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
/*--- Get the actuator disk center and axis coordinates for the current marker. ---*/
for (iDim = 0; iDim < nDim; iDim++){
@@ -8615,7 +8617,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC
su2double MachTest, soundSpeed;
bool turbulent = (config->GetKind_Turb_Model() != TURB_MODEL::NONE);
bool spalart_allmaras = (config->GetKind_Turb_Model() == TURB_MODEL::SA);
- bool menter_sst = ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST));
+ bool menter_sst = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
/*-- Variables declaration and allocation ---*/
Velocity = new su2double[nDim];
diff --git a/SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp b/SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp
index 3c5570f2f7dd..aad046e1e23c 100644
--- a/SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp
+++ b/SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp
@@ -794,7 +794,7 @@ void CFEM_DG_EulerSolver::SetNondimensionalization(CConfig *config,
bool viscous = config->GetViscous();
bool grid_movement = config->GetGrid_Movement();
bool turbulent = (config->GetKind_Solver() == MAIN_SOLVER::FEM_RANS) || (config->GetKind_Solver() == MAIN_SOLVER::FEM_LES);
- bool tkeNeeded = ((turbulent) && ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST)));
+ bool tkeNeeded = ((turbulent) && ((config->GetKind_Turb_Model() == TURB_MODEL::SST) ));
bool free_stream_temp = (config->GetKind_FreeStreamOption() == FREESTREAM_OPTION::TEMPERATURE_FS);
bool reynolds_init = (config->GetKind_InitOption() == REYNOLDS);
diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp
index 631c6559fbf2..a92ec0e7b0b7 100644
--- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp
+++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp
@@ -253,7 +253,7 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i
bool viscous = config->GetViscous();
bool turbulent = ((config->GetKind_Solver() == MAIN_SOLVER::INC_RANS) ||
(config->GetKind_Solver() == MAIN_SOLVER::DISC_ADJ_INC_RANS));
- bool tkeNeeded = ((turbulent) && ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST)));
+ bool tkeNeeded = ((turbulent) && ((config->GetKind_Turb_Model() == TURB_MODEL::SST)));
bool energy = config->GetEnergy_Equation();
bool boussinesq = (config->GetKind_DensityModel() == INC_DENSITYMODEL::BOUSSINESQ);
@@ -2129,7 +2129,7 @@ void CIncEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_contain
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
@@ -2380,7 +2380,7 @@ void CIncEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
@@ -2578,7 +2578,7 @@ void CIncEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container,
/*--- Turbulent kinetic energy ---*/
- if ((config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST))
+ if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0),
solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0));
diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp
index 7f444e462760..57f5e93f8d1e 100644
--- a/SU2_CFD/src/solvers/CIncNSSolver.cpp
+++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp
@@ -291,7 +291,7 @@ unsigned long CIncNSSolver::SetPrimitive_Variables(CSolver **solver_container, c
su2double eddy_visc = 0.0, turb_ke = 0.0, DES_LengthScale = 0.0;
const TURB_MODEL turb_model = config->GetKind_Turb_Model();
- bool tkeNeeded = ((turb_model == TURB_MODEL::SST) || (turb_model == TURB_MODEL::SST_SUST));
+ bool tkeNeeded = (turb_model == TURB_MODEL::SST);
AD::StartNoSharedReading();
diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp
index 9f49ec622296..f7aa7d141712 100644
--- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp
+++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp
@@ -114,7 +114,7 @@ unsigned long CNEMONSSolver::SetPrimitive_Variables(CSolver **solver_container,C
unsigned long nonPhysicalPoints = 0;
const TURB_MODEL turb_model = config->GetKind_Turb_Model();
- //const bool tkeNeeded = (turb_model == TURB_MODEL::SST) || (turb_model == TURB_MODEL::SST_SUST);
+ //const bool tkeNeeded = (turb_model == TURB_MODEL::SST);
SU2_OMP_FOR_STAT(omp_chunk_size)
for (unsigned long iPoint = 0; iPoint < nPoint; iPoint ++) {
diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp
index 8d6e8b47ab5e..2b4ceba51623 100644
--- a/SU2_CFD/src/solvers/CNSSolver.cpp
+++ b/SU2_CFD/src/solvers/CNSSolver.cpp
@@ -133,7 +133,7 @@ unsigned long CNSSolver::SetPrimitive_Variables(CSolver **solver_container, cons
unsigned long nonPhysicalPoints = 0;
const TURB_MODEL turb_model = config->GetKind_Turb_Model();
- const bool tkeNeeded = (turb_model == TURB_MODEL::SST) || (turb_model == TURB_MODEL::SST_SUST);
+ const bool tkeNeeded = (turb_model == TURB_MODEL::SST);
AD::StartNoSharedReading();
diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp
index 67e8a172dcb4..6650234da0f9 100644
--- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp
+++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp
@@ -1,6 +1,6 @@
/*!
* \file CTurbSSTSolver.cpp
- * \brief Main subrotuines of CTurbSSTSolver class
+ * \brief Main subroutines of CTurbSSTSolver class
* \author F. Palacios, A. Bueno
* \version 7.3.1 "Blackbird"
*
@@ -40,6 +40,7 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh
string text_line;
bool multizone = config->GetMultizone_Problem();
+ sstParsedOptions = config->GetSSTParsedOptions();
/*--- Dimension of the problem --> dependent on the turbulence model. ---*/
@@ -103,9 +104,17 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh
constants[5] = 0.0828; //beta_2
constants[6] = 0.09; //betaStar
constants[7] = 0.31; //a1
- constants[8] = constants[4]/constants[6] - constants[2]*0.41*0.41/sqrt(constants[6]); //alfa_1
- constants[9] = constants[5]/constants[6] - constants[3]*0.41*0.41/sqrt(constants[6]); //alfa_2
+ if (sstParsedOptions.version == SST_OPTIONS::V1994){
+ constants[8] = constants[4]/constants[6] - constants[2]*0.41*0.41/sqrt(constants[6]); //alfa_1
+ constants[9] = constants[5]/constants[6] - constants[3]*0.41*0.41/sqrt(constants[6]); //alfa_2
+ constants[10] = 20.0; // production limiter constant
+ } else {
+ /* SST-V2003 */
+ constants[8] = 5.0 / 9.0; //gamma_1
+ constants[9] = 0.44; //gamma_2
+ constants[10] = 10.0; // production limiter constant
+ }
/*--- Initialize lower and upper limits---*/
lowerlimit[0] = 1.0e-10;
upperlimit[0] = 1.0e10;
@@ -209,30 +218,30 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
auto* flowNodes = su2staticcast_p(solver_container[FLOW_SOL]->GetNodes());
SU2_OMP_FOR_STAT(omp_chunk_size)
- for (unsigned long iPoint = 0; iPoint < nPoint; iPoint ++) {
+ for (unsigned long iPoint = 0; iPoint < nPoint; iPoint++) {
/*--- Compute blending functions and cross diffusion ---*/
- su2double rho = flowNodes->GetDensity(iPoint);
- su2double mu = flowNodes->GetLaminarViscosity(iPoint);
-
- su2double dist = geometry->nodes->GetWall_Distance(iPoint);
+ const su2double rho = flowNodes->GetDensity(iPoint);
+ const su2double mu = flowNodes->GetLaminarViscosity(iPoint);
- su2double VorticityMag = GeometryToolbox::Norm(3, flowNodes->GetVorticity(iPoint));
- VorticityMag = max(VorticityMag, 1e-12); // safety against division by zero
+ const su2double dist = geometry->nodes->GetWall_Distance(iPoint);
+ const su2double VorticityMag = max(GeometryToolbox::Norm(3, flowNodes->GetVorticity(iPoint)), 1e-12);
+ const su2double StrainMag = max(nodes->GetStrainMag(iPoint), 1e-12);
nodes->SetBlendingFunc(iPoint, mu, dist, rho);
- su2double F2 = nodes->GetF2blending(iPoint);
+ const su2double F2 = nodes->GetF2blending(iPoint);
/*--- Compute the eddy viscosity ---*/
- su2double kine = nodes->GetSolution(iPoint,0);
- su2double omega = nodes->GetSolution(iPoint,1);
- su2double zeta = min(1.0/omega, a1/(VorticityMag*F2));
- su2double muT = max(rho*kine*zeta,0.0);
+ const su2double kine = nodes->GetSolution(iPoint,0);
+ const su2double omega = nodes->GetSolution(iPoint,1);
+
+ const auto& eddy_visc_var = sstParsedOptions.version == SST_OPTIONS::V1994 ? VorticityMag : StrainMag;
+ const su2double muT = max(0.0, rho * a1 * kine / max(a1 * omega, eddy_visc_var * F2));
- nodes->SetmuT(iPoint,muT);
+ nodes->SetmuT(iPoint, muT);
}
END_SU2_OMP_FOR
diff --git a/SU2_CFD/src/solvers/CTurbSolver.cpp b/SU2_CFD/src/solvers/CTurbSolver.cpp
index 984dcf6a9500..839f7c5db2ba 100644
--- a/SU2_CFD/src/solvers/CTurbSolver.cpp
+++ b/SU2_CFD/src/solvers/CTurbSolver.cpp
@@ -103,7 +103,7 @@ void CTurbSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNum
void CTurbSolver::BC_Fluid_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
CNumerics *visc_numerics, CConfig *config) {
- const bool sst = (config->GetKind_Turb_Model() == TURB_MODEL::SST) || (config->GetKind_Turb_Model() == TURB_MODEL::SST_SUST);
+ const bool sst = (config->GetKind_Turb_Model() == TURB_MODEL::SST);
const auto nPrimVar = solver_container[FLOW_SOL]->GetnPrimVar();
su2double *PrimVar_j = new su2double[nPrimVar];
su2double solution_j[MAXNVAR] = {0.0};
diff --git a/SU2_CFD/src/variables/CTurbSSTVariable.cpp b/SU2_CFD/src/variables/CTurbSSTVariable.cpp
index 65f145125c24..9662e21a7934 100644
--- a/SU2_CFD/src/variables/CTurbSSTVariable.cpp
+++ b/SU2_CFD/src/variables/CTurbSSTVariable.cpp
@@ -32,6 +32,8 @@
CTurbSSTVariable::CTurbSSTVariable(su2double kine, su2double omega, su2double mut, unsigned long npoint, unsigned long ndim, unsigned long nvar, const su2double* constants, CConfig *config)
: CTurbVariable(npoint, ndim, nvar, config) {
+ sstParsedOptions = config->GetSSTParsedOptions();
+
for(unsigned long iPoint=0; iPoint