Skip to content

Commit 9629bb2

Browse files
committed
changes to address comments
1 parent 2388374 commit 9629bb2

9 files changed

Lines changed: 72 additions & 90 deletions

File tree

Common/include/option_structure.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,12 +1780,12 @@ 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 = {
17911791
MakePair("AXIAL", TURBOMACHINERY_TYPE::AXIAL)

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 41 additions & 41 deletions
Large diffs are not rendered by default.

SU2_CFD/include/iteration/CIteration.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ class CIteration {
251251
unsigned short val_iInst) {
252252
return false;
253253
}
254-
255254
/*!
256255
* \brief A virtual member.
257256
* \param[in] output - Pointer to the COutput class.

SU2_CFD/include/output/CTurboOutput.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class CTurbomachineryState {
136136

137137
su2double GetRelMachValue() const { return Norm(RelMach); }
138138

139-
su2double Norm(vector<su2double> const& u) const {
139+
su2double Norm(const vector<su2double>& u) const {
140140
su2double accum = 0.;
141141
for (auto i = 0u; i < u.size(); ++i) {
142142
accum += u[i] * u[i];
@@ -227,7 +227,7 @@ class CTurbomachineryStagePerformance {
227227

228228
su2double GetEulerianWork() const { return EulerianWork; }
229229

230-
const su2double& GetNormEntropyGen() const { return NormEntropyGen; }
230+
su2double GetNormEntropyGen() const { return NormEntropyGen; }
231231

232232
su2double GetTotalStaticPressureRatio() const { return TotalStaticPressureRatio; }
233233

@@ -250,9 +250,7 @@ class CTurboOutput {
250250
public:
251251
CTurboOutput(CConfig** config, const CGeometry& geometry, CFluidModel& fluidModel);
252252

253-
vector<vector<shared_ptr<CTurbomachineryBladePerformance>>>
254-
255-
const GetBladesPerformances() const { return BladesPerformances; }
253+
const vector<vector<shared_ptr<CTurbomachineryBladePerformance>>>& GetBladesPerformances() const { return BladesPerformances; }
256254

257255
void ComputeTurbomachineryPerformance(vector<vector<CTurbomachineryCombinedPrimitiveStates>> const primitives);
258256
};

SU2_CFD/src/drivers/CMultizoneDriver.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ void CMultizoneDriver::StartSolver() {
181181
Preprocess(TimeIter);
182182

183183
/*--- Run a block iteration of the multizone problem. ---*/
184-
185184
Run();
186185

187186
/*--- Update the solution for dual time stepping strategy ---*/
@@ -288,10 +287,10 @@ void CMultizoneDriver::RunGaussSeidel() {
288287
}
289288

290289
/*--- Loop over the number of outer iterations ---*/
291-
for (auto iOuter_Iter = 0ul; iOuter_Iter < driver_config->GetnOuter_Iter(); iOuter_Iter++){
290+
for (auto iOuter_Iter = 0ul; iOuter_Iter < driver_config->GetnOuter_Iter(); iOuter_Iter++) {
292291

293292
/*--- Loop over the number of zones (IZONE) ---*/
294-
for (iZone = 0; iZone < nZone; iZone++){
293+
for (iZone = 0; iZone < nZone; iZone++) {
295294

296295
/*--- In principle, the mesh does not need to be updated ---*/
297296
UpdateMesh = 0;

SU2_CFD/src/iteration/CFluidIteration.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "../../include/iteration/CFluidIteration.hpp"
2929
#include "../../include/output/COutput.hpp"
3030

31-
3231
void CFluidIteration::Preprocess(COutput* output, CIntegration**** integration, CGeometry**** geometry,
3332
CSolver***** solver, CNumerics****** numerics, CConfig** config,
3433
CSurfaceMovement** surface_movement, CVolumetricMovement*** grid_movement,
@@ -231,7 +230,6 @@ bool CFluidIteration::Monitor(COutput* output, CIntegration**** integration, CGe
231230
config[val_iZone], config[val_iZone]->GetTimeIter(), config[val_iZone]->GetOuterIter(),
232231
config[val_iZone]->GetInnerIter());
233232

234-
/*--- If convergence was reached --*/
235233
StopCalc = output->GetConvergence();
236234

237235
/* --- Checking convergence of Fixed CL mode to target CL, and perform finite differencing if needed --*/

SU2_CFD/src/output/CFlowCompOutput.cpp

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ CFlowCompOutput::CFlowCompOutput(const CConfig *config, unsigned short nDim) : C
9595
cauchySerie.resize(convFields.size(), vector<su2double>(nCauchy_Elems, 0.0));
9696
}
9797
}
98-
9998
}
10099

101100
void CFlowCompOutput::SetHistoryOutputFields(CConfig *config){
@@ -480,7 +479,6 @@ void CFlowCompOutput::LoadHistoryData(CConfig *config, CGeometry *geometry, CSol
480479
SetCustomOutputs(solver, geometry, config);
481480

482481
SetCustomAndComboObjectives(FLOW_SOL, config, solver);
483-
484482
}
485483

486484
bool CFlowCompOutput::SetInitResiduals(const CConfig *config){
@@ -635,15 +633,11 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
635633

636634
/*--- Writing Span wise inflow thermodynamic quantities. ---*/
637635
spanwise_performance_filename = "TURBOMACHINERY/inflow_spanwise_thermodynamic_values.dat";
638-
char buffer[50];
639-
if (nZone > 1){
640-
unsigned short lastindex = spanwise_performance_filename.find_last_of(".");
641-
spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
642-
SPRINTF (buffer, "_%d.dat", SU2_TYPE::Int(val_iZone));
643-
spanwise_performance_filename.append(string(buffer));
636+
if (nZone > 1) {
637+
spanwise_performance_filename.append("_" + std::to_string(val_iZone) + ".dat");
638+
} else {
639+
spanwise_performance_filename.append(".dat");
644640
}
645-
646-
647641
file.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
648642
file.setf(ios::scientific);
649643
file.precision(12);
@@ -682,13 +676,11 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
682676

683677
/*--- Writing Span wise outflow thermodynamic quantities. ---*/
684678
spanwise_performance_filename = "TURBOMACHINERY/outflow_spanwise_thermodynamic_values.dat";
685-
if (nZone > 1){
686-
unsigned short lastindex = spanwise_performance_filename.find_last_of(".");
687-
spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
688-
SPRINTF (buffer, "_%d.dat", SU2_TYPE::Int(val_iZone));
689-
spanwise_performance_filename.append(string(buffer));
679+
if (nZone > 1) {
680+
spanwise_performance_filename.append("_" + std::to_string(val_iZone) + ".dat");
681+
} else {
682+
spanwise_performance_filename.append(".dat");
690683
}
691-
692684
file.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
693685
file.setf(ios::scientific);
694686
file.precision(12);
@@ -728,13 +720,11 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
728720

729721
/*--- Writing Span wise inflow kinematic quantities. ---*/
730722
spanwise_performance_filename = "TURBOMACHINERY/inflow_spanwise_kinematic_values.dat";
731-
if (nZone > 1){
732-
unsigned short lastindex = spanwise_performance_filename.find_last_of(".");
733-
spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
734-
SPRINTF (buffer, "_%d.dat", SU2_TYPE::Int(val_iZone));
735-
spanwise_performance_filename.append(string(buffer));
723+
if (nZone > 1) {
724+
spanwise_performance_filename.append("_" + std::to_string(val_iZone) + ".dat");
725+
} else {
726+
spanwise_performance_filename.append(".dat");
736727
}
737-
738728
file.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
739729
file.setf(ios::scientific);
740730
file.precision(12);
@@ -793,14 +783,12 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
793783
file.close();
794784

795785
/*--- Writing Span wise outflow thermodynamic quantities. ---*/
796-
spanwise_performance_filename = "TURBOMACHINERY/outflow_spanwise_kinematic_values.dat";
797-
if (nZone > 1){
798-
unsigned short lastindex = spanwise_performance_filename.find_last_of(".");
799-
spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
800-
SPRINTF (buffer, "_%d.dat", SU2_TYPE::Int(val_iZone));
801-
spanwise_performance_filename.append(string(buffer));
802-
}
803-
786+
spanwise_performance_filename = "TURBOMACHINERY/outflow_spanwise_kinematic_values";
787+
if (nZone > 1) {
788+
spanwise_performance_filename.append("_" + std::to_string(val_iZone) + ".dat");
789+
} else {
790+
spanwise_performance_filename.append(".dat");
791+
}
804792
file.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
805793
file.setf(ios::scientific);
806794
file.precision(12);

TestCases/parallel_regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ def main():
10441044
### Turbomachinery ###
10451045
######################################
10461046

1047-
# Jones APU Turbocharger restart
1047+
# Jones APU Turbocharger restart
10481048
Jones_tc_restart = TestCase('jones_turbocharger_restart')
10491049
Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger"
10501050
Jones_tc_restart.cfg_file = "Jones_restart.cfg"

TestCases/serial_regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ def main():
852852
### Turbomachinery ###
853853
######################################
854854

855-
# Jones APU Turbocharger restart
855+
# Jones APU Turbocharger restart
856856
Jones_tc_restart = TestCase('jones_turbocharger_restart')
857857
Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger"
858858
Jones_tc_restart.cfg_file = "Jones_restart.cfg"

0 commit comments

Comments
 (0)