Skip to content

Commit ed6ce1c

Browse files
authored
Merge branch 'develop' into release_v8.3.0
2 parents 9635285 + 4e9fa0a commit ed6ce1c

File tree

19 files changed

+205
-126
lines changed

19 files changed

+205
-126
lines changed

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ João Loureiro
9595
Johannes Blühdorn
9696
JonathanSmith1936
9797
Joseph Signorelli
98+
Joshua A. Kelly
9899
Josy P. Pullockara
99100
Kedar Naik
100101
Kürşat Yurt

Common/include/CConfig.hpp

Lines changed: 49 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,12 +1084,19 @@ class CConfig {
10841084
unsigned short *nSpan_iZones; /*!< \brief number of span-wise sections for each zones */
10851085
bool turbMixingPlane; /*!< \brief option for turbulent mixingplane */
10861086
bool SpatialFourier; /*!< \brief option for computing the fourier transforms for subsonic non-reflecting BC. */
1087-
bool RampRotatingFrame; /*!< \brief option for ramping up or down the Rotating Frame values */
1088-
bool RampOutletPressure; /*!< \brief option for ramping up or down the outlet pressure */
1087+
bool RampMotionFrame; /*!< \brief option for ramping up or down the motion Frame values */
1088+
bool RampOutlet; /*!< \brief option for ramping up or down the outlet values */
1089+
bool RampRotatingFrame; /*!< \brief option for ramping up or down the motion Frame values */
1090+
bool RampTranslationFrame; /*!< \brief option for ramping up or down the outlet values */
1091+
bool RampOutletMassFlow; /*!< \brief option for ramping up or down the motion Frame values */
1092+
bool RampOutletPressure; /*!< \brief option for ramping up or down the outlet values */
10891093
su2double AverageMachLimit; /*!< \brief option for turbulent mixingplane */
10901094
su2double FinalRotation_Rate_Z; /*!< \brief Final rotation rate Z if Ramp rotating frame is activated. */
1095+
su2double FinalTranslation_Rate_Y; /*!< \brief Final translation rate Y if Ramp translation frame is activated. */
10911096
su2double FinalOutletPressure; /*!< \brief Final outlet pressure if Ramp outlet pressure is activated. */
1097+
su2double FinalOutletMassFlow; /*!< \brief Final outlet mass flow rate if Ramp outlet mass flow rate is activated */
10921098
su2double MonitorOutletPressure; /*!< \brief Monitor outlet pressure if Ramp outlet pressure is activated. */
1099+
su2double MonitorOutletMassFlow; /*!< \brief Monitor outlet mass flow rate if ramp outlet mass flow rate is activated. */
10931100
array<su2double, N_POLY_COEFFS> cp_polycoeffs{{0.0}}; /*!< \brief Array for specific heat polynomial coefficients. */
10941101
array<su2double, N_POLY_COEFFS> mu_polycoeffs{{0.0}}; /*!< \brief Array for viscosity polynomial coefficients. */
10951102
array<su2double, N_POLY_COEFFS> kt_polycoeffs{{0.0}}; /*!< \brief Array for thermal conductivity polynomial coefficients. */
@@ -1139,8 +1146,8 @@ class CConfig {
11391146
jst_coeff[2], /*!< \brief artificial dissipation (flow) array for the COption class. */
11401147
ffd_coeff[3], /*!< \brief artificial dissipation (flow) array for the COption class. */
11411148
mixedout_coeff[3], /*!< \brief default mixedout algorithm coefficients for the COption class. */
1142-
rampRotFrame_coeff[3], /*!< \brief ramp rotating frame coefficients for the COption class. */
1143-
rampOutPres_coeff[3], /*!< \brief ramp outlet pressure coefficients for the COption class. */
1149+
rampMotionFrameCoeff[3], /*!< \brief ramp motion frame coefficients for the COption class. */
1150+
rampOutletCoeff[3], /*!< \brief ramp outlet value coefficients for the COption class. */
11441151
jst_adj_coeff[2], /*!< \brief artificial dissipation (adjoint) array for the COption class. */
11451152
mesh_box_length[3], /*!< \brief mesh box length for the COption class. */
11461153
mesh_box_offset[3], /*!< \brief mesh box offset for the COption class. */
@@ -5109,45 +5116,34 @@ class CConfig {
51095116
void SetKind_PerformanceAverageProcess(unsigned short new_AverageProcess) { Kind_PerformanceAverageProcess = new_AverageProcess; }
51105117

51115118
/*!
5112-
* \brief Get coeff for Rotating Frame Ramp.
5113-
* \return coeff Ramp Rotating Frame.
5119+
* \brief Get Motion Frame Ramp option.
5120+
* \return Ramp Motion Frame option.
51145121
*/
5115-
su2double GetRampRotatingFrame_Coeff(unsigned short iCoeff) const { return rampRotFrame_coeff[iCoeff];}
5122+
bool GetRampMotionFrame(void) const { return RampMotionFrame; }
51165123

51175124
/*!
5118-
* \brief Get Rotating Frame Ramp option.
5119-
* \return Ramp Rotating Frame option.
5125+
* \brief Get outflow ramp option.
5126+
* \return Ramp outflow option.
51205127
*/
5121-
bool GetRampRotatingFrame(void) const { return RampRotatingFrame;}
5128+
bool GetRampOutflow(void) const { return RampOutlet; }
51225129

51235130
/*!
5124-
* \brief Get coeff for Outlet Pressure Ramp.
5125-
* \return coeff Ramp Outlet Pressure.
5126-
*/
5127-
su2double GetRampOutletPressure_Coeff(unsigned short iCoeff) const { return rampOutPres_coeff[iCoeff];}
5128-
5129-
/*!
5130-
* \brief Get final Outlet Pressure value for the ramp.
5131-
* \return final Outlet Pressure value.
5132-
*/
5133-
su2double GetFinalOutletPressure(void) const { return FinalOutletPressure; }
5134-
5135-
/*!
5136-
* \brief Get final Outlet Pressure value for the ramp.
5137-
* \return Monitor Outlet Pressure value.
5138-
*/
5139-
su2double GetMonitorOutletPressure(void) const { return MonitorOutletPressure; }
5140-
5141-
/*!
5142-
* \brief Set Monitor Outlet Pressure value for the ramp.
5143-
*/
5144-
void SetMonitorOutletPressure(su2double newMonPres) { MonitorOutletPressure = newMonPres;}
5131+
* \brief General interface for accessing ramp coefficient information
5132+
* \return coeff for ramps
5133+
*/
5134+
su2double GetRampCoeff(RAMP_TYPE ramp_flag, RAMP_COEFF val_coeff) const {
5135+
if (ramp_flag == RAMP_TYPE::GRID) return rampMotionFrameCoeff[val_coeff];
5136+
else if (ramp_flag == RAMP_TYPE::BOUNDARY) return rampOutletCoeff[val_coeff];
5137+
else return 0;
5138+
};
51455139

51465140
/*!
5147-
* \brief Get Outlet Pressure Ramp option.
5148-
* \return Ramp Outlet pressure option.
5141+
* \brief Generic interface for setting monitor outlet values for the ramp.
51495142
*/
5150-
bool GetRampOutletPressure(void) const { return RampOutletPressure;}
5143+
void SetMonitorValue(su2double newMon_val) {
5144+
if (RampOutletPressure) MonitorOutletPressure = newMon_val;
5145+
else if (RampOutletMassFlow) MonitorOutletMassFlow = newMon_val;
5146+
}
51515147

51525148
/*!
51535149
* \brief Get mixedout coefficients.
@@ -6136,6 +6132,16 @@ class CConfig {
61366132
*/
61376133
void SetRotation_Rate(unsigned short iDim, su2double val) { Rotation_Rate[iDim] = val;}
61386134

6135+
/*!
6136+
* \brief General interface for setting the rate of motion in grid ramps
6137+
* \param[in] ramp_flag - flag for type of ramp
6138+
* \param[in] val - new value of rate of motion
6139+
*/
6140+
void SetRate(su2double val) {
6141+
if (RampRotatingFrame) Rotation_Rate[2] = val;
6142+
else if (RampTranslationFrame) Translation_Rate[1] = val;
6143+
}
6144+
61396145
/*!
61406146
* \brief Get the rotation rate of the marker.
61416147
* \param[in] iMarkerMoving - Index of the moving marker (as specified in Marker_Moving)
@@ -6230,16 +6236,16 @@ class CConfig {
62306236
su2double GetMarkerPlunging_Ampl(unsigned short iMarkerMoving, unsigned short iDim) const { return MarkerPlunging_Ampl[3*iMarkerMoving + iDim];}
62316237

62326238
/*!
6233-
* \brief Get the angular velocity of the mesh about the z-axis.
6234-
* \return Angular velocity of the mesh about the z-axis.
6239+
* \brief Generic interface for retrieving final value of a turbomachinery ramp
6240+
* \return Final value of a specified ramp
62356241
*/
6236-
su2double GetFinalRotation_Rate_Z() const { return FinalRotation_Rate_Z;}
6237-
6238-
/*!
6239-
* \brief Set the angular velocity of the mesh about the z-axis.
6240-
* \param[in] newRotation_Rate_Z - new rotation rate after computing the ramp value.
6241-
*/
6242-
void SetRotation_Rate_Z(su2double newRotation_Rate_Z);
6242+
su2double GetFinalValue(RAMP_TYPE ramp_flag) const {
6243+
if (ramp_flag == RAMP_TYPE::GRID && RampRotatingFrame) return FinalRotation_Rate_Z;
6244+
else if (ramp_flag == RAMP_TYPE::GRID && RampTranslationFrame) return FinalTranslation_Rate_Y;
6245+
else if (ramp_flag == RAMP_TYPE::BOUNDARY && RampOutletPressure) return FinalOutletPressure;
6246+
else if (ramp_flag == RAMP_TYPE::BOUNDARY && RampOutletMassFlow) return FinalOutletMassFlow;
6247+
else return 0.0;
6248+
}
62436249

62446250
/*!
62456251
* \brief Get the Harmonic Balance frequency pointer.

Common/include/geometry/CGeometry.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,19 @@ class CGeometry {
954954
*/
955955
void SetCustomBoundary(CConfig* config);
956956

957+
/*!
958+
* \brief General interface for setting the velocity in the geometry during motion ramps
959+
* \param[in] config - config class
960+
* \param[in] ramp_flag - flag for type of ramp
961+
* \param[in] print - bool to print update to screen
962+
*/
963+
void SetVelocity(CConfig* config, bool print) {
964+
if (config->GetKind_GridMovement() == ENUM_GRIDMOVEMENT::ROTATING_FRAME)
965+
SetRotationalVelocity(config, print);
966+
else if (config->GetKind_GridMovement() == ENUM_GRIDMOVEMENT::STEADY_TRANSLATION)
967+
SetTranslationalVelocity(config, print);
968+
};
969+
957970
/*!
958971
* \brief Set cartesian grid velocity based on rotational speed and axis.
959972
* \param[in] config - Definition of the particular problem.

Common/src/CConfig.cpp

Lines changed: 62 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,20 +1638,20 @@ void CConfig::SetConfig_Options() {
16381638
* the 2nd coefficient is the tolerance for the Newton method, 3rd coefficient is the maximum number of
16391639
* iteration for the Newton Method.*/
16401640
addDoubleArrayOption("MIXEDOUT_COEFF", 3, mixedout_coeff);
1641-
/*!\brief RAMP_ROTATING_FRAME\n DESCRIPTION: option to ramp up or down the rotating frame velocity value*/
1642-
addBoolOption("RAMP_ROTATING_FRAME", RampRotatingFrame, false);
1643-
rampRotFrame_coeff[0] = 0; rampRotFrame_coeff[1] = 1.0; rampRotFrame_coeff[2] = 1000.0;
1644-
/*!\brief RAMP_ROTATING_FRAME_COEFF \n DESCRIPTION: the 1st coeff is the staring velocity,
1645-
* the 2nd coeff is the number of iterations for the update, 3rd is the number of iteration */
1646-
addDoubleArrayOption("RAMP_ROTATING_FRAME_COEFF", 3, rampRotFrame_coeff);
1641+
/*!\brief RAMP_MOTION_FRAME\n DESCRIPTION: option to ramp up or down the frame of motion velocity value*/
1642+
addBoolOption("RAMP_MOTION_FRAME", RampMotionFrame, false);
1643+
rampMotionFrameCoeff[0] = 100.0; rampMotionFrameCoeff[1] = 1.0; rampMotionFrameCoeff[2] = 1000.0;
1644+
/*!\brief RAMP_MOTION_FRAME_COEFF \n DESCRIPTION: the 1st coeff is the staring outlet value,
1645+
* the 2nd coeff is the number of iterations for the update, 3rd is the number of total iteration till reaching the final outlet pressure value */
1646+
addDoubleArrayOption("RAMP_MOTION_FRAME_COEFF", 3, rampMotionFrameCoeff);
16471647
/* DESCRIPTION: AVERAGE_MACH_LIMIT is a limit value for average procedure based on the mass flux. */
16481648
addDoubleOption("AVERAGE_MACH_LIMIT", AverageMachLimit, 0.03);
1649-
/*!\brief RAMP_OUTLET_PRESSURE\n DESCRIPTION: option to ramp up or down the rotating frame velocity value*/
1650-
addBoolOption("RAMP_OUTLET_PRESSURE", RampOutletPressure, false);
1651-
rampOutPres_coeff[0] = 100000.0; rampOutPres_coeff[1] = 1.0; rampOutPres_coeff[2] = 1000.0;
1652-
/*!\brief RAMP_OUTLET_PRESSURE_COEFF \n DESCRIPTION: the 1st coeff is the staring outlet pressure,
1649+
/*!\brief RAMP_OUTLET\n DESCRIPTION: option to ramp up or down the Giles outlet value*/
1650+
addBoolOption("RAMP_OUTLET", RampOutlet, false);
1651+
rampOutletCoeff[0] = 100000.0; rampOutletCoeff[1] = 1.0; rampOutletCoeff[2] = 1000.0;
1652+
/*!\brief RAMP_OUTLET_COEFF \n DESCRIPTION: the 1st coeff is the staring outlet value,
16531653
* the 2nd coeff is the number of iterations for the update, 3rd is the number of total iteration till reaching the final outlet pressure value */
1654-
addDoubleArrayOption("RAMP_OUTLET_PRESSURE_COEFF", 3, rampOutPres_coeff);
1654+
addDoubleArrayOption("RAMP_OUTLET_COEFF", 3, rampOutletCoeff);
16551655
/*!\brief MARKER_MIXINGPLANE \n DESCRIPTION: Identify the boundaries in which the mixing plane is applied. \ingroup Config*/
16561656
addStringListOption("MARKER_MIXINGPLANE_INTERFACE", nMarker_MixingPlaneInterface, Marker_MixingPlaneInterface);
16571657
/*!\brief TURBULENT_MIXINGPLANE \n DESCRIPTION: Activate mixing plane also for turbulent quantities \ingroup Config*/
@@ -3111,6 +3111,14 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
31113111
newString.append("SPECIES_USE_STRONG_BC is deprecated. Use MARKER_SPECIES_STRONG_BC= (marker1, ...) instead.\n\n");
31123112
else if (!option_name.compare("DEAD_LOAD"))
31133113
newString.append("DEAD_LOAD is deprecated. Use GRAVITY_FORCE or BODY_FORCE instead.\n\n");
3114+
else if (!option_name.compare("RAMP_OUTLET_PRESSURE"))
3115+
newString.append("RAMP_OUTLET_PRESSURE is deprectaed. Use RAMP_OUTLET instead");
3116+
else if (!option_name.compare("RAMP_OUTLET_PRESSURE_COEFF"))
3117+
newString.append("RAMP_OUTLET_PRESSURE_COEFF is deprectaed. Use RAMP_OUTLET_COEFF instead");
3118+
else if (!option_name.compare("RAMP_ROTATION_FRAME"))
3119+
newString.append("RAMP_ROTATION_FRAME is deprectaed. Use RAMP_MOTION_FRAME instead");
3120+
else if (!option_name.compare("RAMP_ROTATION_FRAME_COEFF"))
3121+
newString.append("RAMP_ROTATION_FRAME_COEFF is deprectaed. Use RAMP_MOTION_FRAME_COEFF instead");
31143122
else if (!option_name.compare("INC_INLET_USENORMAL"))
31153123
newString.append("INC_INLET_USENORMAL is deprecated. Use INLET_USE_NORMAL instead (compatible with all solvers).\n\n");
31163124
else {
@@ -4399,25 +4407,65 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
43994407
nSpan_iZones = new unsigned short[nZone];
44004408
}
44014409

4410+
RampOutletPressure = false;
4411+
RampOutletMassFlow = false;
4412+
RampRotatingFrame = false;
4413+
RampTranslationFrame = false;
4414+
4415+
/*--- Interface for handling turbo ramps ---*/
4416+
if (GetGrid_Movement() && RampMotionFrame && !DiscreteAdjoint) {
4417+
if (Kind_GridMovement == ENUM_GRIDMOVEMENT::ROTATING_FRAME) RampRotatingFrame = true;
4418+
else if (Kind_GridMovement == ENUM_GRIDMOVEMENT::STEADY_TRANSLATION) RampTranslationFrame = true;
4419+
}
4420+
4421+
if(RampOutlet && !DiscreteAdjoint) {
4422+
for (iMarker = 0; iMarker < nMarker_Giles; iMarker++){
4423+
switch (Kind_Data_Giles[iMarker]) {
4424+
case STATIC_PRESSURE: case STATIC_PRESSURE_1D: case RADIAL_EQUILIBRIUM:
4425+
RampOutletPressure = true;
4426+
break;
4427+
case MASS_FLOW_OUTLET:
4428+
RampOutletMassFlow = true;
4429+
break;
4430+
}
4431+
}
4432+
}
4433+
44024434
/*--- Set number of TurboPerformance markers ---*/
44034435
if(GetGrid_Movement() && RampRotatingFrame && !DiscreteAdjoint){
44044436
FinalRotation_Rate_Z = Rotation_Rate[2];
44054437
if(abs(FinalRotation_Rate_Z) > 0.0){
4406-
Rotation_Rate[2] = rampRotFrame_coeff[0];
4438+
Rotation_Rate[2] = rampMotionFrameCoeff[RAMP_COEFF::INITIAL_VALUE];
4439+
}
4440+
}
4441+
4442+
if(GetGrid_Movement() && RampTranslationFrame && !DiscreteAdjoint){
4443+
FinalTranslation_Rate_Y = Translation_Rate[1];
4444+
if(abs(FinalTranslation_Rate_Y) > 0.0){
4445+
Translation_Rate[1] = rampMotionFrameCoeff[RAMP_COEFF::INITIAL_VALUE];
44074446
}
44084447
}
44094448

44104449
if(RampOutletPressure && !DiscreteAdjoint){
44114450
for (iMarker = 0; iMarker < nMarker_Giles; iMarker++){
44124451
if (Kind_Data_Giles[iMarker] == STATIC_PRESSURE || Kind_Data_Giles[iMarker] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker] == RADIAL_EQUILIBRIUM ){
44134452
FinalOutletPressure = Giles_Var1[iMarker];
4414-
Giles_Var1[iMarker] = rampOutPres_coeff[0];
4453+
Giles_Var1[iMarker] = rampOutletCoeff[RAMP_COEFF::INITIAL_VALUE];
44154454
}
44164455
}
44174456
for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++){
44184457
if (Kind_Data_Riemann[iMarker] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker] == RADIAL_EQUILIBRIUM){
44194458
FinalOutletPressure = Riemann_Var1[iMarker];
4420-
Riemann_Var1[iMarker] = rampOutPres_coeff[0];
4459+
Riemann_Var1[iMarker] = rampOutletCoeff[RAMP_COEFF::INITIAL_VALUE];
4460+
}
4461+
}
4462+
}
4463+
4464+
if(RampOutletMassFlow && !DiscreteAdjoint){
4465+
for (iMarker = 0; iMarker < nMarker_Giles; iMarker++){
4466+
if (Kind_Data_Giles[iMarker] == MASS_FLOW_OUTLET){
4467+
FinalOutletMassFlow = Giles_Var1[iMarker];
4468+
Giles_Var1[iMarker] = rampOutletCoeff[RAMP_COEFF::INITIAL_VALUE];
44214469
}
44224470
}
44234471
}
@@ -5460,9 +5508,6 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
54605508
default:
54615509
break;
54625510
}
5463-
5464-
RampOutletPressure = false;
5465-
RampRotatingFrame = false;
54665511
}
54675512

54685513
/* 2nd-order MUSCL is not possible for the continuous adjoint

SU2_CFD/include/iteration/CFluidIteration.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,14 @@ class CFluidIteration : public CIteration {
108108
unsigned short val_iInst) override;
109109

110110
/*!
111-
* \brief Monitors turbo computation (pressure and turbo ramps).
111+
* \brief Monitors and updates ramps
112112
* \param[in] geometry_container - Geometrical definition of the problem
113113
* \param[in] config_container - Defintion of the particular problem
114114
* \param[in] ExtIter - The current iteration of the problem
115115
* \param[in] iZone - The current zone
116+
* \param[in] ramp_flag - Flag indicating type of ramp (grid or boundary)
116117
*/
117-
void TurboMonitor(CGeometry**** geometry_container, CConfig** config_container, unsigned long ExtIter, unsigned short iZone);
118+
void UpdateRamp(CGeometry**** geometry_container, CConfig** config_container, unsigned long iter, unsigned short iZone, RAMP_TYPE ramp_flag);
118119

119120
/*!
120121
* \brief Computes turboperformance.

SU2_CFD/include/iteration/CTurboIteration.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,5 @@ class CTurboIteration : public CFluidIteration {
6868
* \brief Initialises turboperformance classes.
6969
*/
7070
void InitTurboPerformance(CGeometry *geometry, CConfig** config, CFluidModel *fluid);
71+
7172
};

0 commit comments

Comments
 (0)