Skip to content

Commit

Permalink
Merge branch 'develop' into ad_tool_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfooted authored Feb 7, 2024
2 parents ad9c697 + e554994 commit b23b91b
Show file tree
Hide file tree
Showing 46 changed files with 1,474 additions and 294 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ BasedOnStyle: Google
PointerAlignment: Left
DerivePointerAlignment: false
ColumnLimit: 120
SortIncludes: Never
SortIncludes: false
10 changes: 6 additions & 4 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class CConfig {
unsigned short Kind_PerformanceAverageProcess; /*!< \brief Kind of mixing process.*/
unsigned short Kind_MixingPlaneInterface; /*!< \brief Kind of mixing process.*/
unsigned short Kind_SpanWise; /*!< \brief Kind of span-wise section computation.*/
unsigned short *Kind_TurboMachinery; /*!< \brief Kind of turbomachynery architecture.*/
unsigned short iZone, nZone; /*!< \brief Number of zones in the mesh. */
unsigned short nZoneSpecified; /*!< \brief Number of zones that are specified in config file. */
su2double Highlite_Area; /*!< \brief Highlite area. */
Expand Down Expand Up @@ -435,6 +434,9 @@ class CConfig {
Max_DeltaTime, /*!< \brief Max delta time. */
Unst_CFL; /*!< \brief Unsteady CFL number. */

TURBO_PERF_KIND *Kind_TurboPerf; /*!< \brief Kind of turbomachynery architecture.*/
TURBOMACHINERY_TYPE *Kind_TurboMachinery;

/* Gradient smoothing options */
su2double SmoothingEps1; /*!< \brief Parameter for the identity part in gradient smoothing. */
su2double SmoothingEps2; /*!< \brief Parameter for the Laplace part in gradient smoothing. */
Expand Down Expand Up @@ -5118,7 +5120,7 @@ class CConfig {
* \brief Get the kind of turbomachinery architecture.
* \return Kind of turbomachinery architecture.
*/
unsigned short GetKind_TurboMachinery(unsigned short val_iZone) const { return Kind_TurboMachinery[val_iZone]; }
TURBOMACHINERY_TYPE GetKind_TurboMachinery(unsigned short val_iZone) const { return Kind_TurboMachinery[val_iZone]; }

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

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

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

/*!
* \brief get outlet bounds name for Turbomachinery performance calculation.
Expand Down
9 changes: 9 additions & 0 deletions Common/include/geometry/CGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,15 @@ class CGeometry {
*/
inline virtual void GatherInOutAverageValues(CConfig* config, bool allocate) {}

/*!
* \brief Store all the turboperformance in the solver in ZONE_0.
* \param[in] donor_geometry - Solution from the donor mesh.
* \param[in] target_geometry - Solution from the target mesh.
* \param[in] donorZone - counter of the donor solution
*/
inline virtual void SetAvgTurboGeoValues(const CConfig* donor_config, CGeometry* donor_geometry,
unsigned short donorZone){};

/*!
* \brief Set max length.
* \param[in] config - Definition of the particular problem.
Expand Down
8 changes: 8 additions & 0 deletions Common/include/geometry/CPhysicalGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,14 @@ class CPhysicalGeometry final : public CGeometry {
*/
void GatherInOutAverageValues(CConfig* config, bool allocate) override;

/*!
* \brief Store all the turboperformance in the solver in ZONE_0.
* \param[in] donor_geometry - Solution from the donor mesh.
* \param[in] target_geometry - Solution from the target mesh.
* \param[in] donorZone - counter of the donor solution
*/
void SetAvgTurboGeoValues(const CConfig* donor_config, CGeometry* donor_geometry, unsigned short donorZone) override;

/*!
* \brief Set the edge structure of the control volume.
* \param[in] config - Definition of the particular problem.
Expand Down
36 changes: 25 additions & 11 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1780,19 +1780,33 @@ static const MapType<std::string, SPANWISE_TYPE> SpanWise_Map = {
/*!
* \brief Types of mixing process for averaging quantities at the boundaries.
*/
enum TURBOMACHINERY_TYPE {
AXIAL = 1, /*!< \brief axial turbomachinery. */
CENTRIFUGAL = 2, /*!< \brief centrifugal turbomachinery. */
CENTRIPETAL = 3, /*!< \brief centripetal turbomachinery. */
CENTRIPETAL_AXIAL = 4, /*!< \brief mixed flow turbine. */
AXIAL_CENTRIFUGAL = 5 /*!< \brief mixed flow turbine. */
enum class TURBOMACHINERY_TYPE {
AXIAL, /*!< \brief axial turbomachinery. */
CENTRIFUGAL, /*!< \brief centrifugal turbomachinery. */
CENTRIPETAL, /*!< \brief centripetal turbomachinery. */
CENTRIPETAL_AXIAL, /*!< \brief mixed flow turbine. */
AXIAL_CENTRIFUGAL /*!< \brief mixed flow turbine. */
};
static const MapType<std::string, TURBOMACHINERY_TYPE> TurboMachinery_Map = {
MakePair("AXIAL", AXIAL)
MakePair("CENTRIFUGAL", CENTRIFUGAL)
MakePair("CENTRIPETAL", CENTRIPETAL)
MakePair("CENTRIPETAL_AXIAL", CENTRIPETAL_AXIAL)
MakePair("AXIAL_CENTRIFUGAL", AXIAL_CENTRIFUGAL)
MakePair("AXIAL", TURBOMACHINERY_TYPE::AXIAL)
MakePair("CENTRIFUGAL", TURBOMACHINERY_TYPE::CENTRIFUGAL)
MakePair("CENTRIPETAL", TURBOMACHINERY_TYPE::CENTRIPETAL)
MakePair("CENTRIPETAL_AXIAL", TURBOMACHINERY_TYPE::CENTRIPETAL_AXIAL)
MakePair("AXIAL_CENTRIFUGAL", TURBOMACHINERY_TYPE::AXIAL_CENTRIFUGAL)
};

/*!
* \brief Types of Turbomachinery performance Type.
*/
enum class TURBO_PERF_KIND{
TURBINE, /*!< \brief Turbine Performance. */
COMPRESSOR, /*!< \brief Compressor Performance. */
PROPELLOR /*!< \brief Propellor Performance. */
};
static const MapType<std::string, TURBO_PERF_KIND> TurboPerfKind_Map = {
MakePair("TURBINE", TURBO_PERF_KIND::TURBINE)
MakePair("COMPRESSOR", TURBO_PERF_KIND::COMPRESSOR)
MakePair("PROPELLOR", TURBO_PERF_KIND::PROPELLOR)
};

/*!
Expand Down
24 changes: 16 additions & 8 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,9 @@ void CConfig::SetConfig_Options() {
/*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachinery architecture.
\n OPTIONS: see \link TurboMachinery_Map \endlink \n Default: AXIAL */
addEnumListOption("TURBOMACHINERY_KIND",nTurboMachineryKind, Kind_TurboMachinery, TurboMachinery_Map);
/*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachynery Performance Calculations.
\n OPTIONS: see \link TurboPerfKind_Map \endlink \n Default: TURBINE */
addEnumListOption("TURBO_PERF_KIND", nTurboMachineryKind, Kind_TurboPerf, TurboPerfKind_Map);
/*!\brief MARKER_SHROUD \n DESCRIPTION: markers in which velocity is forced to 0.0.
* \n Format: (shroud1, shroud2, ...)*/
addStringListOption("MARKER_SHROUD", nMarker_Shroud, Marker_Shroud);
Expand Down Expand Up @@ -4020,6 +4023,11 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
SU2_MPI::Error("Giles Boundary conditions can only be used with turbomachinery markers", CURRENT_FUNCTION);
}

/*--- Check if turbomachinery performance kind is specified with turbo markers ---*/
if (GetBoolTurbomachinery() && !(nTurboMachineryKind/nZone == 1)){
SU2_MPI::Error("Insufficient TURBO_PERF_KIND options specified with turbomachinery markers", CURRENT_FUNCTION);
}

/*--- Check for Boundary condition available for NICFD ---*/

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

default:
break;
}
}
}
else {
if (Time_Domain) {
cout << "Dynamic structural analysis."<< endl;
cout << "Time step provided by the user for the dynamic analysis(s): "<< Time_Step << "." << endl;
} else {
cout << "Static structural analysis." << endl;
else {
if (Time_Domain) {
cout << "Dynamic structural analysis."<< endl;
cout << "Time step provided by the user for the dynamic analysis(s): "<< Time_Step << "." << endl;
} else {
cout << "Static structural analysis." << endl;
}
}
}

if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) ||
(Kind_Solver == MAIN_SOLVER::INC_EULER) || (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) ||
Expand Down
Loading

0 comments on commit b23b91b

Please sign in to comment.