Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New turbo ouputs #2011

Merged
merged 67 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8e9b705
Reimplemented turboperformance calculations
Tushma Apr 6, 2023
fc34fdf
Merge branch 'remove_legacy_output' of https://github.com/su2code/SU2…
Tushma Apr 6, 2023
4744927
Updated turboperformance methods & history output
Tushma Apr 14, 2023
d742e5d
Merge branch 'develop' into new_turbo_outputs
pcarruscag Apr 14, 2023
7e6619c
Changes to address comments
Tushma Apr 17, 2023
c8a8089
Merge branch 'new_turbo_outputs' of https://github.com/su2code/SU2 in…
Tushma Apr 17, 2023
1d5c4fc
typo
Tushma Apr 17, 2023
f60220d
Fixed mass flow rate computation
Tushma Apr 19, 2023
6f1e09b
Some tidying and build warning fixes
Tushma Apr 20, 2023
b38da56
format changes
Tushma Apr 20, 2023
9e02f88
SU2_OMP_PARALLEL formatting in CTurboOutput
Tushma Apr 20, 2023
42f05a1
Removed vscode auto addition
Tushma Apr 20, 2023
b94ada3
Updated transonic stator test case to fix reg test
joshkellyjak Apr 20, 2023
0fa99f3
updated all turbo cases
joshkellyjak Apr 20, 2023
71b6283
Fixed calculation bug for uneven blade spanwisediv
joshkellyjak Apr 24, 2023
1652112
Merge branch 'develop' into new_turbo_outputs
joshkellyjak Apr 24, 2023
f36f430
Running AD cases
joshkellyjak Apr 25, 2023
9cbb710
Merge branch 'new_turbo_outputs' of https://github.com/su2code/SU2 in…
joshkellyjak Apr 25, 2023
01dc39e
Update reg tests, fix threading bug
joshkellyjak Apr 25, 2023
979b08d
Further reg test and formatting updates
joshkellyjak Apr 26, 2023
a8b948a
Updated screen output, addressed some comments
joshkellyjak May 17, 2023
84f4617
Removed unused var
joshkellyjak May 17, 2023
ed2f39c
Merge branch 'develop' into new_turbo_outputs
bigfooted May 17, 2023
61fe58a
Fixed TURBOMACHINERY special folder output
joshkellyjak May 17, 2023
a5bdb92
Fixed config input for MZ cases
joshkellyjak May 22, 2023
1e7ca73
header changes from prior
joshkellyjak May 22, 2023
0dec5a3
Merge branch 'new_turbo_outputs' of https://github.com/su2code/SU2 in…
joshkellyjak May 22, 2023
63e4508
codi update
joshkellyjak Jun 28, 2023
57add71
Merge branch 'develop' of https://github.com/su2code/SU2 into new_tur…
joshkellyjak Jun 28, 2023
f5346ff
Merge branch 'develop' of https://github.com/su2code/SU2 into new_tur…
joshkellyjak Jun 28, 2023
a2b1a1f
Merge branch 'develop' into new_turbo_outputs
joshkellyjak Aug 3, 2023
d57281f
Comments
joshkellyjak Aug 3, 2023
8a3455b
comments
joshkellyjak Aug 3, 2023
737709e
better solution to mz history output
joshkellyjak Aug 4, 2023
1139556
Merge branch 'develop' into new_turbo_outputs
bigfooted Aug 8, 2023
26f44c6
Data race fix
joshkellyjak Aug 23, 2023
0947f63
Fixed heap use after free and vertex structure out
joshkellyjak Aug 30, 2023
0ad25a3
Merge remote-tracking branch 'origin/develop' into new_turbo_outputs
joshkellyjak Aug 30, 2023
9b386b0
Updated reg tests
joshkellyjak Aug 31, 2023
fa1096f
Added catch for dummy driver in turbopreprocessing
joshkellyjak Aug 31, 2023
3fd1ab2
Merge branch 'develop' into new_turbo_outputs
joshkellyjak Sep 6, 2023
a7d6699
Merge remote-tracking branch 'origin/master' into new_turbo_outputs
joshkellyjak Sep 6, 2023
ebe8ea2
Merge branch 'new_turbo_outputs' of https://github.com/su2code/SU2 in…
joshkellyjak Sep 6, 2023
7e29da6
Update SU2_CFD/include/output/COutput.hpp
pcarruscag Sep 23, 2023
8bad923
Changes to address comments
joshkellyjak Oct 26, 2023
4bfcf7b
Fixing what I broke
joshkellyjak Oct 26, 2023
69ac587
Merge branch 'develop' into new_turbo_outputs
joshkellyjak Oct 26, 2023
f5b9698
Changes to address comments
joshkellyjak Nov 8, 2023
bd700dd
Merge branch 'develop' into new_turbo_outputs
joshkellyjak Nov 9, 2023
b9334b1
Fix merge error
joshkellyjak Nov 9, 2023
9ea23be
submodule update
joshkellyjak Nov 9, 2023
70756d9
Merge branch 'develop' into new_turbo_outputs
bigfooted Nov 12, 2023
a1bb719
Merge branch 'develop' into new_turbo_outputs
joshkellyjak Dec 20, 2023
244b51c
Merge remote-tracking branch 'origin/develop' into new_turbo_outputs
joshkellyjak Jan 10, 2024
e0e61c6
github-adv-security comments
joshkellyjak Jan 16, 2024
efeabbd
codeql check & singlezone bugfix
joshkellyjak Jan 16, 2024
36c730f
typo
joshkellyjak Jan 16, 2024
463d001
better way
joshkellyjak Jan 16, 2024
b7e6cd4
Merge branch 'new_turbo_outputs' of https://github.com/su2code/SU2 in…
joshkellyjak Jan 22, 2024
00bd823
Added catch to prevent segfault when not including TURBO_PERF_KIND
joshkellyjak Jan 22, 2024
7eb2d36
bug fix and update reg tests
joshkellyjak Jan 30, 2024
10f814f
unused var
joshkellyjak Jan 30, 2024
f844493
semi-colon
joshkellyjak Jan 30, 2024
89d410c
update regtest values
joshkellyjak Jan 31, 2024
c9c8449
too many zeros
joshkellyjak Jan 31, 2024
2388374
indentation and reorganising of output function called for improved s…
joshkellyjak Feb 1, 2024
9629bb2
changes to address comments
joshkellyjak Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
joshkellyjak marked this conversation as resolved.
Show resolved Hide resolved
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;
pcarruscag marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
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
Loading