Skip to content

Commit 1dd0903

Browse files
committed
Changes for comments
1 parent 56f7c8a commit 1dd0903

4 files changed

Lines changed: 28 additions & 26 deletions

File tree

Common/include/CConfig.hpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6091,12 +6091,6 @@ class CConfig {
60916091
MarkerRotation_Rate[3 * iMarkerMoving + iDim] = val;
60926092
}
60936093

6094-
/*!
6095-
* \brief Get the final translation velocity of the mesh in the y-direction
6096-
* \return Velocity of the mesh in the y-direction
6097-
*/
6098-
su2double GetFinalTranslation_Rate_Y() const { return FinalTranslation_Rate_Y;}
6099-
61006094
/*!
61016095
* \brief Get the pitching rate of the mesh.
61026096
* \param[in] iDim - spatial component
@@ -6173,17 +6167,9 @@ class CConfig {
61736167
su2double GetMarkerPlunging_Ampl(unsigned short iMarkerMoving, unsigned short iDim) const { return MarkerPlunging_Ampl[3*iMarkerMoving + iDim];}
61746168

61756169
/*!
6176-
* \brief Get the angular velocity of the mesh about the z-axis.
6177-
* \return Angular velocity of the mesh about the z-axis.
6170+
* \brief Generic interface for retrieving final value of a turbomachinery ramp
6171+
* \return Final value of a specified ramp
61786172
*/
6179-
su2double GetFinalRotation_Rate_Z() const { return FinalRotation_Rate_Z;}
6180-
6181-
/*!
6182-
* \brief Set the angular velocity of the mesh about the z-axis.
6183-
* \param[in] newRotation_Rate_Z - new rotation rate after computing the ramp value.
6184-
*/
6185-
void SetRotation_Rate_Z(su2double newRotation_Rate_Z);
6186-
61876173
su2double GetFinalValue(TURBO_RAMP_TYPE ramp_flag) {
61886174
if (ramp_flag == TURBO_RAMP_TYPE::GRID && RampRotatingFrame) return FinalRotation_Rate_Z;
61896175
else if (ramp_flag == TURBO_RAMP_TYPE::GRID && RampTranslationFrame) return FinalTranslation_Rate_Y;

Common/include/option_structure.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,15 +1886,18 @@ enum TURBO_MARKER_TYPE{
18861886
OUTFLOW = 2 /*!< \brief flag for outflow marker for compute turboperformance. */
18871887
};
18881888

1889-
enum TURBO_RAMP_TYPE{
1890-
GRID = 1, /*!< \brief flag for rotational/translational ramps */
1891-
BOUNDARY = 2 /*!< \brief flag for pressure/mass flow ramps*/
1889+
enum class TURBO_RAMP_TYPE{
1890+
GRID, /*!< \brief flag for rotational/translational ramps */
1891+
BOUNDARY /*!< \brief flag for pressure/mass flow ramps*/
18921892
};
18931893

1894+
/*!
1895+
* \brief Coefficients of the ramp specified in the config, ordered by index in the config
1896+
*/
18941897
enum TURBO_RAMP_COEFF{
18951898
INITIAL_VALUE = 0, /*!< \brief intial value of the ramp */
18961899
UPDATE_FREQ = 1, /*<! \brief update frequency of the ramp */
1897-
FINAL_ITER = 2 /*<! \brief final iteration of the ramp */
1900+
FINAL_ITER = 2 /*<! \brief final iteration of the ramp */
18981901
};
18991902

19001903
/*!

Common/src/CConfig.cpp

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,6 +3074,14 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
30743074
newString.append("SPECIES_USE_STRONG_BC is deprecated. Use MARKER_SPECIES_STRONG_BC= (marker1, ...) instead.\n\n");
30753075
else if (!option_name.compare("DEAD_LOAD"))
30763076
newString.append("DEAD_LOAD is deprecated. Use GRAVITY_FORCE or BODY_FORCE instead.\n\n");
3077+
else if (!option_name.compare("RAMP_OUTLET_PRESSURE"))
3078+
newString.append("RAMP_OUTLET_PRESSURE is deprectaed. Use RAMP_OUTLET instead");
3079+
else if (!option_name.compare("RAMP_OUTLET_PRESSURE_COEFF"))
3080+
newString.append("RAMP_OUTLET_PRESSURE_COEFF is deprectaed. Use RAMP_OUTLET_COEFF instead");
3081+
else if (!option_name.compare("RAMP_ROTATION_FRAME"))
3082+
newString.append("RAMP_ROTATION_FRAME is deprectaed. Use RAMP_MOTION_FRAME instead");
3083+
else if (!option_name.compare("RAMP_ROTATION_FRAME_COEFF"))
3084+
newString.append("RAMP_ROTATION_FRAME_COEFF is deprectaed. Use RAMP_MOTION_FRAME_COEFF instead");
30773085
else {
30783086
/*--- Find the most likely candidate for the unrecognized option, based on the length
30793087
of start and end character sequences shared by candidates and the option. ---*/
@@ -4356,16 +4364,19 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
43564364
}
43574365

43584366
/*--- Interface for handling turbo ramps ---*/
4359-
if(GetGrid_Movement() && RampMotionFrame && !DiscreteAdjoint){
4367+
if (GetGrid_Movement() && RampMotionFrame && !DiscreteAdjoint) {
43604368
if (Kind_GridMovement == ENUM_GRIDMOVEMENT::ROTATING_FRAME) RampRotatingFrame = true;
43614369
else if (Kind_GridMovement == ENUM_GRIDMOVEMENT::STEADY_TRANSLATION) RampTranslationFrame = true;
43624370
}
43634371

43644372
if(RampOutlet && !DiscreteAdjoint) {
43654373
for (iMarker = 0; iMarker < nMarker_Giles; iMarker++){
4366-
if (Kind_Data_Giles[iMarker] == STATIC_PRESSURE || Kind_Data_Giles[iMarker] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker] == RADIAL_EQUILIBRIUM )
4367-
RampOutletPressure = true;
4368-
else if (Kind_Data_Giles[iMarker] == MASS_FLOW_OUTLET) RampOutletMassFlow = true;
4374+
switch (Kind_Data_Giles[iMarker]) {
4375+
case STATIC_PRESSURE: case STATIC_PRESSURE_1D: case RADIAL_EQUILIBRIUM:
4376+
RampOutletPressure = true;
4377+
case MASS_FLOW_OUTLET:
4378+
RampOutletMassFlow = true;
4379+
}
43694380
}
43704381
}
43714382

@@ -5448,7 +5459,9 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
54485459
}
54495460

54505461
RampOutletPressure = false;
5462+
//RampOutletMassFlow = false;
54515463
RampRotatingFrame = false;
5464+
//RampTranslationFrame = false;
54525465
}
54535466

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

SU2_CFD/src/iteration/CTurboIteration.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ void CTurboIteration::TurboRamp(CGeometry**** geometry_container, CConfig** conf
8181
/*-- Update grid velocities (ROTATING_FRAME, STEADY_TRANSLATION)*/
8282
if (ramp_flag == TURBO_RAMP_TYPE::GRID && config->GetGrid_Movement()) {
8383
const auto ini_vel = config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::INITIAL_VALUE);
84-
const long unsigned rampFreq = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::UPDATE_FREQ));
85-
const long unsigned finalRamp_Iter = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::FINAL_ITER));
84+
const auto unsigned rampFreq = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::UPDATE_FREQ));
85+
const auto unsigned finalRamp_Iter = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::FINAL_ITER));
8686

8787
// Two options needed as if finalRamp_Iter % rampFreq != 0 final value is not set correctly
8888
if((iter % rampFreq == 0 && iter < finalRamp_Iter) || (iter == finalRamp_Iter)){

0 commit comments

Comments
 (0)