Skip to content

Commit 58e6a59

Browse files
committed
Fix rough BCs options issues
1 parent 725c690 commit 58e6a59

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

Common/include/CConfig.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,11 +749,10 @@ class CConfig {
749749
SST_OPTIONS *SST_Options; /*!< \brief List of modifications/corrections/versions of SST turbulence model.*/
750750
SA_OPTIONS *SA_Options; /*!< \brief List of modifications/corrections/versions of SA turbulence model.*/
751751
LM_OPTIONS *LM_Options; /*!< \brief List of modifications/corrections/versions of SA turbulence model.*/
752-
ROUGHSST_OPTIONS *ROUGHSST_Options; /*!< \brief List of modifications/corrections/versions of rough-wall boundary conditions for SST turbulence model.*/
752+
ROUGHSST_MODEL Kind_RoughSST_Model; /*!< \brief List of modifications/corrections/versions of rough-wall boundary conditions for SST turbulence model.*/
753753
unsigned short nSST_Options; /*!< \brief Number of SST options specified. */
754754
unsigned short nSA_Options; /*!< \brief Number of SA options specified. */
755755
unsigned short nLM_Options; /*!< \brief Number of SA options specified. */
756-
unsigned short nROUGHSST_Options; /*!< \brief Number of rough-wall boundary conditions for SST turbulence model options specified. */
757756
WALL_FUNCTIONS *Kind_WallFunctions; /*!< \brief The kind of wall function to use for the corresponding markers. */
758757
unsigned short **IntInfo_WallFunctions; /*!< \brief Additional integer information for the wall function markers. */
759758
su2double **DoubleInfo_WallFunctions; /*!< \brief Additional double information for the wall function markers. */

Common/include/option_structure.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,26 +1104,26 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne
11041104
/*!
11051105
* \brief SST rough-wall boundary conditions Options
11061106
*/
1107-
enum class ROUGHSST_OPTIONS {
1107+
enum class ROUGHSST_MODEL {
11081108
NONE, /*!< \brief No option / default no surface roughness applied. */
11091109
WILCOX1998, /*!< \brief Wilcox 1998 boundary conditions for rough walls. */
11101110
WILCOX2006, /*!< \brief Wilcox 2006 boundary conditions for rough walls / default version if roughness is applied. */
11111111
LIMITER_KNOPP, /*!< \brief Knopp eddy viscosity limiter. */
11121112
LIMITER_AUPOIX, /*!< \brief Aupoix eddy viscosity limiter. */
11131113
};
1114-
static const MapType<std::string, ROUGHSST_OPTIONS> ROUGHSST_Options_Map = {
1115-
MakePair("NONE", ROUGHSST_OPTIONS::NONE)
1116-
MakePair("WILCOX1998", ROUGHSST_OPTIONS::WILCOX1998)
1117-
MakePair("WILCOX2006", ROUGHSST_OPTIONS::WILCOX2006)
1118-
MakePair("LIMITER_KNOPP", ROUGHSST_OPTIONS::LIMITER_KNOPP)
1119-
MakePair("LIMITER_AUPOIX", ROUGHSST_OPTIONS::LIMITER_AUPOIX)
1114+
static const MapType<std::string, ROUGHSST_MODEL> RoughSST_Model_Map = {
1115+
MakePair("NONE", ROUGHSST_MODEL::NONE)
1116+
MakePair("WILCOX1998", ROUGHSST_MODEL::WILCOX1998)
1117+
MakePair("WILCOX2006", ROUGHSST_MODEL::WILCOX2006)
1118+
MakePair("LIMITER_KNOPP", ROUGHSST_MODEL::LIMITER_KNOPP)
1119+
MakePair("LIMITER_AUPOIX", ROUGHSST_MODEL::LIMITER_AUPOIX)
11201120
};
11211121

11221122
/*!
11231123
* \brief Structure containing parsed SST rough-wall boundary conditions options.
11241124
*/
11251125
struct ROUGH_SST_ParsedOptions {
1126-
ROUGHSST_OPTIONS version = ROUGHSST_OPTIONS::NONE; /*!< \brief KWBC base model. */
1126+
ROUGHSST_MODEL version = ROUGHSST_MODEL::NONE; /*!< \brief KWBC base model. */
11271127
bool wilcox1998 = false; /*!< \brief Use Wilcox boundary conditions for rough walls (1998). */
11281128
bool wilcox2006 = false; /*!< \brief Use Wilcox boundary conditions for rough walls (2006). */
11291129
bool limiter_knopp = false; /*!< \brief Use Knopp eddy viscosity limiter. */
@@ -1137,15 +1137,15 @@ struct ROUGH_SST_ParsedOptions {
11371137
* \param[in] rank - MPI rank.
11381138
* \return Struct with SST options.
11391139
*/
1140-
inline ROUGH_SST_ParsedOptions ParseROUGHSSTOptions(ROUGHSST_OPTIONS sstbcs_option) {
1140+
inline ROUGH_SST_ParsedOptions ParseROUGHSSTOptions(ROUGHSST_MODEL sstbcs_option) {
11411141
ROUGH_SST_ParsedOptions opts;
11421142
opts.version = sstbcs_option;
11431143

11441144
switch(sstbcs_option) {
1145-
case ROUGHSST_OPTIONS::WILCOX1998: opts.wilcox1998 = true; break;
1146-
case ROUGHSST_OPTIONS::WILCOX2006: opts.wilcox2006 = true; break;
1147-
case ROUGHSST_OPTIONS::LIMITER_KNOPP: opts.limiter_knopp = true; break;
1148-
case ROUGHSST_OPTIONS::LIMITER_AUPOIX: opts.limiter_aupoix = true; break;
1145+
case ROUGHSST_MODEL::WILCOX1998: opts.wilcox1998 = true; break;
1146+
case ROUGHSST_MODEL::WILCOX2006: opts.wilcox2006 = true; break;
1147+
case ROUGHSST_MODEL::LIMITER_KNOPP: opts.limiter_knopp = true; break;
1148+
case ROUGHSST_MODEL::LIMITER_AUPOIX: opts.limiter_aupoix = true; break;
11491149
default: break;
11501150
}
11511151

Common/src/CConfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ void CConfig::SetConfig_Options() {
11311131
addEnumListOption("SA_OPTIONS", nSA_Options, SA_Options, SA_Options_Map);
11321132

11331133
/*!\brief ROUGHSST_OPTIONS \n DESCRIPTION: Specify type of boundary condition for rough walls for SST turbulence model. \n Options: see \link ROUGHSST_Options_Map \endlink \n DEFAULT: wilcox1998 \ingroup Config*/
1134-
addEnumListOption("ROUGHSST_OPTIONS", nROUGHSST_Options, ROUGHSST_Options, ROUGHSST_Options_Map);
1134+
addEnumOption("KIND_ROUGHSST_MODEL", Kind_RoughSST_Model, RoughSST_Model_Map, ROUGHSST_MODEL::NONE);
11351135
/*!\brief KIND_TRANS_MODEL \n DESCRIPTION: Specify transition model OPTIONS: see \link Trans_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/
11361136
addEnumOption("KIND_TRANS_MODEL", Kind_Trans_Model, Trans_Model_Map, TURB_TRANS_MODEL::NONE);
11371137
/*!\brief SST_OPTIONS \n DESCRIPTION: Specify LM transition model options/correlations. \n Options: see \link LM_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/
@@ -3557,7 +3557,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
35573557
/*--- Postprocess SST_OPTIONS into structure. ---*/
35583558
if (Kind_Turb_Model == TURB_MODEL::SST) {
35593559
sstParsedOptions = ParseSSTOptions(SST_Options, nSST_Options, rank);
3560-
roughsstParsedOptions = ParseROUGHSSTOptions(ROUGHSST_Options[0]);
3560+
roughsstParsedOptions = ParseROUGHSSTOptions(Kind_RoughSST_Model);
35613561
} else if (Kind_Turb_Model == TURB_MODEL::SA) {
35623562
saParsedOptions = ParseSAOptions(SA_Options, nSA_Options, rank);
35633563
}

0 commit comments

Comments
 (0)