Skip to content

Commit b23b91b

Browse files
authored
Merge branch 'develop' into ad_tool_updates
2 parents ad9c697 + e554994 commit b23b91b

46 files changed

Lines changed: 1474 additions & 294 deletions

Some content is hidden

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

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ BasedOnStyle: Google
22
PointerAlignment: Left
33
DerivePointerAlignment: false
44
ColumnLimit: 120
5-
SortIncludes: Never
5+
SortIncludes: false

Common/include/CConfig.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class CConfig {
7171
unsigned short Kind_PerformanceAverageProcess; /*!< \brief Kind of mixing process.*/
7272
unsigned short Kind_MixingPlaneInterface; /*!< \brief Kind of mixing process.*/
7373
unsigned short Kind_SpanWise; /*!< \brief Kind of span-wise section computation.*/
74-
unsigned short *Kind_TurboMachinery; /*!< \brief Kind of turbomachynery architecture.*/
7574
unsigned short iZone, nZone; /*!< \brief Number of zones in the mesh. */
7675
unsigned short nZoneSpecified; /*!< \brief Number of zones that are specified in config file. */
7776
su2double Highlite_Area; /*!< \brief Highlite area. */
@@ -435,6 +434,9 @@ class CConfig {
435434
Max_DeltaTime, /*!< \brief Max delta time. */
436435
Unst_CFL; /*!< \brief Unsteady CFL number. */
437436

437+
TURBO_PERF_KIND *Kind_TurboPerf; /*!< \brief Kind of turbomachynery architecture.*/
438+
TURBOMACHINERY_TYPE *Kind_TurboMachinery;
439+
438440
/* Gradient smoothing options */
439441
su2double SmoothingEps1; /*!< \brief Parameter for the identity part in gradient smoothing. */
440442
su2double SmoothingEps2; /*!< \brief Parameter for the Laplace part in gradient smoothing. */
@@ -5118,7 +5120,7 @@ class CConfig {
51185120
* \brief Get the kind of turbomachinery architecture.
51195121
* \return Kind of turbomachinery architecture.
51205122
*/
5121-
unsigned short GetKind_TurboMachinery(unsigned short val_iZone) const { return Kind_TurboMachinery[val_iZone]; }
5123+
TURBOMACHINERY_TYPE GetKind_TurboMachinery(unsigned short val_iZone) const { return Kind_TurboMachinery[val_iZone]; }
51225124

51235125
/*!
51245126
* \brief Get the kind of turbomachinery architecture.
@@ -5233,7 +5235,7 @@ class CConfig {
52335235
void SetnSpanWiseSections(unsigned short nSpan) { nSpanWiseSections = nSpan;}
52345236

52355237
/*!
5236-
* \brief set number span-wise sections to compute 3D BC and performance for turbomachinery.
5238+
* \brief get number span-wise sections to compute 3D BC and performance for turbomachinery.
52375239
*/
52385240
unsigned short GetnSpan_iZones(unsigned short iZone) const { return nSpan_iZones[iZone];}
52395241

@@ -5258,7 +5260,7 @@ class CConfig {
52585260
* \brief get marker kind for Turbomachinery performance calculation.
52595261
* \return kind index.
52605262
*/
5261-
unsigned short GetKind_TurboPerf(unsigned short index);
5263+
TURBO_PERF_KIND GetKind_TurboPerf(unsigned short val_iZone) const { return Kind_TurboPerf[val_iZone]; };
52625264

52635265
/*!
52645266
* \brief get outlet bounds name for Turbomachinery performance calculation.

Common/include/geometry/CGeometry.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,15 @@ class CGeometry {
772772
*/
773773
inline virtual void GatherInOutAverageValues(CConfig* config, bool allocate) {}
774774

775+
/*!
776+
* \brief Store all the turboperformance in the solver in ZONE_0.
777+
* \param[in] donor_geometry - Solution from the donor mesh.
778+
* \param[in] target_geometry - Solution from the target mesh.
779+
* \param[in] donorZone - counter of the donor solution
780+
*/
781+
inline virtual void SetAvgTurboGeoValues(const CConfig* donor_config, CGeometry* donor_geometry,
782+
unsigned short donorZone){};
783+
775784
/*!
776785
* \brief Set max length.
777786
* \param[in] config - Definition of the particular problem.

Common/include/geometry/CPhysicalGeometry.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,14 @@ class CPhysicalGeometry final : public CGeometry {
408408
*/
409409
void GatherInOutAverageValues(CConfig* config, bool allocate) override;
410410

411+
/*!
412+
* \brief Store all the turboperformance in the solver in ZONE_0.
413+
* \param[in] donor_geometry - Solution from the donor mesh.
414+
* \param[in] target_geometry - Solution from the target mesh.
415+
* \param[in] donorZone - counter of the donor solution
416+
*/
417+
void SetAvgTurboGeoValues(const CConfig* donor_config, CGeometry* donor_geometry, unsigned short donorZone) override;
418+
411419
/*!
412420
* \brief Set the edge structure of the control volume.
413421
* \param[in] config - Definition of the particular problem.

Common/include/option_structure.hpp

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,19 +1780,33 @@ static const MapType<std::string, SPANWISE_TYPE> SpanWise_Map = {
17801780
/*!
17811781
* \brief Types of mixing process for averaging quantities at the boundaries.
17821782
*/
1783-
enum TURBOMACHINERY_TYPE {
1784-
AXIAL = 1, /*!< \brief axial turbomachinery. */
1785-
CENTRIFUGAL = 2, /*!< \brief centrifugal turbomachinery. */
1786-
CENTRIPETAL = 3, /*!< \brief centripetal turbomachinery. */
1787-
CENTRIPETAL_AXIAL = 4, /*!< \brief mixed flow turbine. */
1788-
AXIAL_CENTRIFUGAL = 5 /*!< \brief mixed flow turbine. */
1783+
enum class TURBOMACHINERY_TYPE {
1784+
AXIAL, /*!< \brief axial turbomachinery. */
1785+
CENTRIFUGAL, /*!< \brief centrifugal turbomachinery. */
1786+
CENTRIPETAL, /*!< \brief centripetal turbomachinery. */
1787+
CENTRIPETAL_AXIAL, /*!< \brief mixed flow turbine. */
1788+
AXIAL_CENTRIFUGAL /*!< \brief mixed flow turbine. */
17891789
};
17901790
static const MapType<std::string, TURBOMACHINERY_TYPE> TurboMachinery_Map = {
1791-
MakePair("AXIAL", AXIAL)
1792-
MakePair("CENTRIFUGAL", CENTRIFUGAL)
1793-
MakePair("CENTRIPETAL", CENTRIPETAL)
1794-
MakePair("CENTRIPETAL_AXIAL", CENTRIPETAL_AXIAL)
1795-
MakePair("AXIAL_CENTRIFUGAL", AXIAL_CENTRIFUGAL)
1791+
MakePair("AXIAL", TURBOMACHINERY_TYPE::AXIAL)
1792+
MakePair("CENTRIFUGAL", TURBOMACHINERY_TYPE::CENTRIFUGAL)
1793+
MakePair("CENTRIPETAL", TURBOMACHINERY_TYPE::CENTRIPETAL)
1794+
MakePair("CENTRIPETAL_AXIAL", TURBOMACHINERY_TYPE::CENTRIPETAL_AXIAL)
1795+
MakePair("AXIAL_CENTRIFUGAL", TURBOMACHINERY_TYPE::AXIAL_CENTRIFUGAL)
1796+
};
1797+
1798+
/*!
1799+
* \brief Types of Turbomachinery performance Type.
1800+
*/
1801+
enum class TURBO_PERF_KIND{
1802+
TURBINE, /*!< \brief Turbine Performance. */
1803+
COMPRESSOR, /*!< \brief Compressor Performance. */
1804+
PROPELLOR /*!< \brief Propellor Performance. */
1805+
};
1806+
static const MapType<std::string, TURBO_PERF_KIND> TurboPerfKind_Map = {
1807+
MakePair("TURBINE", TURBO_PERF_KIND::TURBINE)
1808+
MakePair("COMPRESSOR", TURBO_PERF_KIND::COMPRESSOR)
1809+
MakePair("PROPELLOR", TURBO_PERF_KIND::PROPELLOR)
17961810
};
17971811

17981812
/*!

Common/src/CConfig.cpp

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,9 @@ void CConfig::SetConfig_Options() {
16271627
/*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachinery architecture.
16281628
\n OPTIONS: see \link TurboMachinery_Map \endlink \n Default: AXIAL */
16291629
addEnumListOption("TURBOMACHINERY_KIND",nTurboMachineryKind, Kind_TurboMachinery, TurboMachinery_Map);
1630+
/*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachynery Performance Calculations.
1631+
\n OPTIONS: see \link TurboPerfKind_Map \endlink \n Default: TURBINE */
1632+
addEnumListOption("TURBO_PERF_KIND", nTurboMachineryKind, Kind_TurboPerf, TurboPerfKind_Map);
16301633
/*!\brief MARKER_SHROUD \n DESCRIPTION: markers in which velocity is forced to 0.0.
16311634
* \n Format: (shroud1, shroud2, ...)*/
16321635
addStringListOption("MARKER_SHROUD", nMarker_Shroud, Marker_Shroud);
@@ -4020,6 +4023,11 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
40204023
SU2_MPI::Error("Giles Boundary conditions can only be used with turbomachinery markers", CURRENT_FUNCTION);
40214024
}
40224025

4026+
/*--- Check if turbomachinery performance kind is specified with turbo markers ---*/
4027+
if (GetBoolTurbomachinery() && !(nTurboMachineryKind/nZone == 1)){
4028+
SU2_MPI::Error("Insufficient TURBO_PERF_KIND options specified with turbomachinery markers", CURRENT_FUNCTION);
4029+
}
4030+
40234031
/*--- Check for Boundary condition available for NICFD ---*/
40244032

40254033
if ((!ideal_gas) && (!noneq_gas)) {
@@ -6906,16 +6914,16 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
69066914

69076915
default:
69086916
break;
6917+
}
69096918
}
6910-
}
6911-
else {
6912-
if (Time_Domain) {
6913-
cout << "Dynamic structural analysis."<< endl;
6914-
cout << "Time step provided by the user for the dynamic analysis(s): "<< Time_Step << "." << endl;
6915-
} else {
6916-
cout << "Static structural analysis." << endl;
6919+
else {
6920+
if (Time_Domain) {
6921+
cout << "Dynamic structural analysis."<< endl;
6922+
cout << "Time step provided by the user for the dynamic analysis(s): "<< Time_Step << "." << endl;
6923+
} else {
6924+
cout << "Static structural analysis." << endl;
6925+
}
69176926
}
6918-
}
69196927

69206928
if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) ||
69216929
(Kind_Solver == MAIN_SOLVER::INC_EULER) || (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) ||

0 commit comments

Comments
 (0)