Skip to content

Commit a5256e2

Browse files
author
Shubham shukla
authored
Merge branch 'develop' into fix/relevant-bugs-and-robustness
2 parents 403f81f + e109712 commit a5256e2

17 files changed

+478
-86
lines changed

Common/include/CConfig.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ class CConfig {
763763
SST_OPTIONS *SST_Options; /*!< \brief List of modifications/corrections/versions of SST turbulence model.*/
764764
SA_OPTIONS *SA_Options; /*!< \brief List of modifications/corrections/versions of SA turbulence model.*/
765765
LM_OPTIONS *LM_Options; /*!< \brief List of modifications/corrections/versions of SA turbulence model.*/
766+
ROUGHSST_MODEL Kind_RoughSST_Model; /*!< \brief List of modifications/corrections/versions of rough-wall boundary conditions for SST turbulence model.*/
766767
unsigned short nSST_Options; /*!< \brief Number of SST options specified. */
767768
unsigned short nSA_Options; /*!< \brief Number of SA options specified. */
768769
unsigned short nLM_Options; /*!< \brief Number of SA options specified. */
@@ -10173,6 +10174,10 @@ class CConfig {
1017310174
*/
1017410175
LM_ParsedOptions GetLMParsedOptions() const { return lmParsedOptions; }
1017510176

10177+
/*!
10178+
* \brief Get rough-wall boundary conditions for SST.
10179+
*/
10180+
ROUGHSST_MODEL GetKindRoughSSTModel() const { return Kind_RoughSST_Model; }
1017610181

1017710182
/*!
1017810183
* \brief Get parsed option data structure for data-driven fluid model.

Common/include/geometry/meshreader/CSU2ASCIIMeshReaderBase.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,22 @@ class CSU2ASCIIMeshReaderBase : public CMeshReaderBase {
8181
* elements). \param[in,out] config - Problem configuration where some metadata is updated (e.g. AoA). \returns True
8282
* if single_pass was successful.
8383
*/
84-
bool ReadMetadata(const bool single_pass, CConfig* config);
84+
bool ReadMetadata(bool single_pass, CConfig* config);
8585

8686
/*!
8787
* \brief Reads the grid points from an SU2 zone into linear partitions across all ranks.
8888
*/
89-
virtual void ReadPointCoordinates(const bool single_pass = false);
89+
virtual void ReadPointCoordinates(bool single_pass = false);
9090

9191
/*!
9292
* \brief Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.
9393
*/
94-
virtual void ReadVolumeElementConnectivity(const bool single_pass = false);
94+
virtual void ReadVolumeElementConnectivity(bool single_pass = false);
9595

9696
/*!
9797
* \brief Reads the surface (boundary) elements from the SU2 zone.
9898
*/
99-
virtual void ReadSurfaceElementConnectivity(const bool single_pass = false);
99+
virtual void ReadSurfaceElementConnectivity(bool single_pass = false);
100100

101101
/*!
102102
* \brief Helper function to find the current zone in an SU2 ASCII mesh object.

Common/include/geometry/meshreader/CSU2ASCIIMeshReaderFEM.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@
3737
* \brief Reads a native SU2 ASCII grid into linear partitions for the finite element solver (FEM).
3838
* \author T. Economon, E. van der Weide
3939
*/
40-
class CSU2ASCIIMeshReaderFEM : public CSU2ASCIIMeshReaderBase {
40+
class CSU2ASCIIMeshReaderFEM final : public CSU2ASCIIMeshReaderBase {
4141
private:
4242
/*!
4343
* \brief Reads the grid points from an SU2 zone into linear partitions across all ranks.
4444
*/
45-
void ReadPointCoordinates();
45+
void ReadPointCoordinates(bool) override;
4646

4747
/*!
4848
* \brief Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.
4949
*/
50-
void ReadVolumeElementConnectivity();
50+
void ReadVolumeElementConnectivity(bool) override;
5151

5252
/*!
5353
* \brief Reads the surface (boundary) elements from one section of an SU2 zone into linear partitions across all
5454
* ranks.
5555
*/
56-
void ReadSurfaceElementConnectivity();
56+
void ReadSurfaceElementConnectivity(bool) override;
5757

5858
public:
5959
/*!

Common/include/geometry/meshreader/CSU2ASCIIMeshReaderFVM.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* \brief Reads a native SU2 ASCII grid into linear partitions for the finite volume solver (FVM).
3838
* \author T. Economon
3939
*/
40-
class CSU2ASCIIMeshReaderFVM : public CSU2ASCIIMeshReaderBase {
40+
class CSU2ASCIIMeshReaderFVM final : public CSU2ASCIIMeshReaderBase {
4141
private:
4242
/*!
4343
* \brief Splits a single surface actuator disk boundary into two separate markers (repeated points).

Common/include/option_structure.hpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,22 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne
11011101
return SSTParsedOptions;
11021102
}
11031103

1104+
/*!
1105+
* \brief SST rough-wall boundary conditions Options
1106+
*/
1107+
enum class ROUGHSST_MODEL {
1108+
WILCOX1998, /*!< \brief Wilcox 1998 boundary conditions for rough walls. */
1109+
WILCOX2006, /*!< \brief Wilcox 2006 boundary conditions for rough walls / default version if roughness is applied. */
1110+
LIMITER_KNOPP, /*!< \brief Knopp eddy viscosity limiter. */
1111+
LIMITER_AUPOIX, /*!< \brief Aupoix eddy viscosity limiter. */
1112+
};
1113+
static const MapType<std::string, ROUGHSST_MODEL> RoughSST_Model_Map = {
1114+
MakePair("WILCOX1998", ROUGHSST_MODEL::WILCOX1998)
1115+
MakePair("WILCOX2006", ROUGHSST_MODEL::WILCOX2006)
1116+
MakePair("LIMITER_KNOPP", ROUGHSST_MODEL::LIMITER_KNOPP)
1117+
MakePair("LIMITER_AUPOIX", ROUGHSST_MODEL::LIMITER_AUPOIX)
1118+
};
1119+
11041120
/*!
11051121
* \brief SA Options
11061122
*/
@@ -2030,10 +2046,6 @@ enum class WALL_TYPE {
20302046
SMOOTH, /*!< \brief Smooth wall */
20312047
ROUGH, /*!< \brief Rough wall */
20322048
};
2033-
static const MapType<std::string, WALL_TYPE> WallType_Map = {
2034-
MakePair("SMOOTH", WALL_TYPE::SMOOTH)
2035-
MakePair("ROUGH", WALL_TYPE::ROUGH)
2036-
};
20372049

20382050
/*!
20392051
* \brief Types of objective functions

Common/src/CConfig.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,8 @@ void CConfig::SetConfig_Options() {
11401140
/*!\brief SST_OPTIONS \n DESCRIPTION: Specify SA turbulence model options/corrections. \n Options: see \link SA_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/
11411141
addEnumListOption("SA_OPTIONS", nSA_Options, SA_Options, SA_Options_Map);
11421142

1143+
/*!\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*/
1144+
addEnumOption("KIND_ROUGHSST_MODEL", Kind_RoughSST_Model, RoughSST_Model_Map, ROUGHSST_MODEL::WILCOX1998);
11431145
/*!\brief KIND_TRANS_MODEL \n DESCRIPTION: Specify transition model OPTIONS: see \link Trans_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/
11441146
addEnumOption("KIND_TRANS_MODEL", Kind_Trans_Model, Trans_Model_Map, TURB_TRANS_MODEL::NONE);
11451147
/*!\brief SST_OPTIONS \n DESCRIPTION: Specify LM transition model options/correlations. \n Options: see \link LM_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4482,7 +4482,7 @@ void CPhysicalGeometry::SetRCM_Ordering(CConfig* config) {
44824482
* which is equivalent to incrementing an integer marking the end of the
44834483
* result and the start of the queue. ---*/
44844484
vector<char> InQueue(nPoint, false);
4485-
vector<unsigned long> AuxQueue, Result;
4485+
vector<unsigned long> Result;
44864486
Result.reserve(nPoint);
44874487
unsigned long QueueStart = 0;
44884488

@@ -4521,21 +4521,19 @@ void CPhysicalGeometry::SetRCM_Ordering(CConfig* config) {
45214521

45224522
/*--- Add all adjacent nodes to the queue in increasing order of their
45234523
degree, checking if the element is already in the queue. ---*/
4524-
AuxQueue.clear();
4524+
auto currEnd = Result.end();
45254525
for (auto iNode = 0u; iNode < nodes->GetnPoint(AddPoint); iNode++) {
45264526
const auto AdjPoint = nodes->GetPoint(AddPoint, iNode);
45274527
if (!InQueue[AdjPoint]) {
4528-
AuxQueue.push_back(AdjPoint);
4528+
Result.push_back(AdjPoint);
45294529
InQueue[AdjPoint] = true;
45304530
}
45314531
}
4532-
if (AuxQueue.empty()) continue;
45334532

4534-
/*--- Sort the auxiliar queue based on the number of neighbors (degree). ---*/
4535-
stable_sort(AuxQueue.begin(), AuxQueue.end(), [&](unsigned long iPoint, unsigned long jPoint) {
4533+
/*--- Sort the new points based on the number of neighbors (degree). ---*/
4534+
stable_sort(currEnd, Result.end(), [&](unsigned long iPoint, unsigned long jPoint) {
45364535
return nodes->GetnPoint(iPoint) < nodes->GetnPoint(jPoint);
45374536
});
4538-
Result.insert(Result.end(), AuxQueue.begin(), AuxQueue.end());
45394537
}
45404538
}
45414539
reverse(Result.begin(), Result.end());

Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFEM.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ CSU2ASCIIMeshReaderFEM::CSU2ASCIIMeshReaderFEM(CConfig* val_config, unsigned sho
3737

3838
/*--- Read the volume connectivity and distribute it
3939
linearly over the MPI ranks. ---*/
40-
ReadVolumeElementConnectivity();
40+
ReadVolumeElementConnectivity({});
4141

4242
/*--- Read the coordinates of the points that are needed
4343
on this MPI rank. ---*/
44-
ReadPointCoordinates();
44+
ReadPointCoordinates({});
4545

4646
/*--- Read the surface connectivity and store the surface elements whose
4747
corresponding volume element is stored on this MPI rank. ---*/
48-
ReadSurfaceElementConnectivity();
48+
ReadSurfaceElementConnectivity({});
4949
}
5050

5151
CSU2ASCIIMeshReaderFEM::~CSU2ASCIIMeshReaderFEM() = default;
5252

53-
void CSU2ASCIIMeshReaderFEM::ReadPointCoordinates() {
53+
void CSU2ASCIIMeshReaderFEM::ReadPointCoordinates(bool) {
5454
/*--- Loop over the local elements to determine the global
5555
point IDs to be stored on this rank. --*/
5656
unsigned long ind = 0;
@@ -113,7 +113,7 @@ void CSU2ASCIIMeshReaderFEM::ReadPointCoordinates() {
113113
mesh_file.close();
114114
}
115115

116-
void CSU2ASCIIMeshReaderFEM::ReadVolumeElementConnectivity() {
116+
void CSU2ASCIIMeshReaderFEM::ReadVolumeElementConnectivity(bool) {
117117
/* Get a partitioner to help with linear partitioning. */
118118
CLinearPartitioner elemPartitioner(numberOfGlobalElements, 0);
119119

@@ -213,7 +213,7 @@ void CSU2ASCIIMeshReaderFEM::ReadVolumeElementConnectivity() {
213213
mesh_file.close();
214214
}
215215

216-
void CSU2ASCIIMeshReaderFEM::ReadSurfaceElementConnectivity() {
216+
void CSU2ASCIIMeshReaderFEM::ReadSurfaceElementConnectivity(bool) {
217217
/*--- Determine the vector to hold the faces of the local elements. ---*/
218218
vector<CFaceOfElement> localFaces;
219219
DetermineFacesVolumeElements(localFaces);

SU2_CFD/include/solvers/CTurbSSTSolver.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ class CTurbSSTSolver final : public CTurbSolver {
5353
CSolver **solver_container,
5454
const CConfig *config,
5555
unsigned short val_marker);
56-
56+
5757
/*!
5858
* \brief Compute a suitable under-relaxation parameter to limit the change in the solution variables over
5959
* a nonlinear iteration for stability.
6060
* \param[in] config - Definition of the particular problem.
6161
*/
62-
void ComputeUnderRelaxationFactor(const CConfig *config);
62+
void ComputeUnderRelaxationFactor(const CConfig *config) override;
6363

6464
public:
6565
/*!

SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ void CFEM_DG_EulerSolver::SetNondimensionalization(CConfig *config,
10651065
ModVel_FreeStreamND = sqrt(ModVel_FreeStreamND); config->SetModVel_FreeStreamND(ModVel_FreeStreamND);
10661066

10671067
Viscosity_FreeStreamND = Viscosity_FreeStream / Viscosity_Ref; config->SetViscosity_FreeStreamND(Viscosity_FreeStreamND);
1068-
Thermal_Conductivity_FreeStreamND = Thermal_Conductivity_FreeStream / Conductivity_Ref;
1068+
Thermal_Conductivity_FreeStreamND = Thermal_Conductivity_FreeStream / Conductivity_Ref;
10691069
config->SetThermalConductivity_FreeStreamND(Thermal_Conductivity_FreeStreamND);
10701070
SpecificHeat_Cp_FreeStreamND = SpecificHeat_Cp_FreeStream / Gas_Constant_Ref;
10711071
config->SetSpecificHeatCp_FreeStreamND(SpecificHeat_Cp_FreeStreamND);
@@ -9457,6 +9457,8 @@ void CFEM_DG_EulerSolver::ComputeInviscidFluxesFace(CConfig *config
94579457
numerics->ComputeResidual(flux, Jacobian_i, Jacobian_j, config);
94589458
}
94599459
}
9460+
/*--- Just to avoid compilers complaining about dangling pointers. ---*/
9461+
numerics->SetPrimitive(nullptr, nullptr);
94609462

94619463
for (unsigned short iVar = 0; iVar < nVar; iVar++) {
94629464
delete [] Jacobian_i[iVar];

0 commit comments

Comments
 (0)