-
Notifications
You must be signed in to change notification settings - Fork 849
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
Update turbo ramps #2419
base: develop
Are you sure you want to change the base?
Update turbo ramps #2419
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just some minor stuff and it's good to go.
@@ -96,6 +96,7 @@ Johannes Blühdorn | |||
JonathanSmith1936 | |||
Joseph Signorelli | |||
Josy P. Pullockara | |||
Joshua A. Kelly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
H is before Y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling my own name is a challenge on occasion
/*! | ||
* \brief Get the final translation velocity of the mesh in the y-direction | ||
* \return Velocity of the mesh in the y-direction | ||
*/ | ||
su2double GetFinalTranslation_Rate_Y() const { return FinalTranslation_Rate_Y;} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be removed now? And maybe some of the older functions to set/get Z rotation?
@@ -1886,6 +1886,17 @@ enum TURBO_MARKER_TYPE{ | |||
OUTFLOW = 2 /*!< \brief flag for outflow marker for compute turboperformance. */ | |||
}; | |||
|
|||
enum TURBO_RAMP_TYPE{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum TURBO_RAMP_TYPE{ | |
enum class TURBO_RAMP_TYPE{ |
GRID = 1, /*!< \brief flag for rotational/translational ramps */ | ||
BOUNDARY = 2 /*!< \brief flag for pressure/mass flow ramps*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GRID = 1, /*!< \brief flag for rotational/translational ramps */ | |
BOUNDARY = 2 /*!< \brief flag for pressure/mass flow ramps*/ | |
GRID, /*!< \brief flag for rotational/translational ramps */ | |
BOUNDARY /*!< \brief flag for pressure/mass flow ramps*/ |
enum TURBO_RAMP_COEFF{ | ||
INITIAL_VALUE = 0, /*!< \brief intial value of the ramp */ | ||
UPDATE_FREQ = 1, /*<! \brief update frequency of the ramp */ | ||
FINAL_ITER = 2 /*<! \brief final iteration of the ramp */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FINAL_ITER = 2 /*<! \brief final iteration of the ramp */ | |
FINAL_ITER = 2 /*<! \brief final iteration of the ramp */ |
BOUNDARY = 2 /*!< \brief flag for pressure/mass flow ramps*/ | ||
}; | ||
|
||
enum TURBO_RAMP_COEFF{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document that these are used to access the entries in the coefficient ramps and thus are numbered in a particular way.
@@ -4355,25 +4355,55 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i | |||
nSpan_iZones = new unsigned short[nZone]; | |||
} | |||
|
|||
/*--- Interface for handling turbo ramps ---*/ | |||
if(GetGrid_Movement() && RampMotionFrame && !DiscreteAdjoint){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency please
if(GetGrid_Movement() && RampMotionFrame && !DiscreteAdjoint){ | |
if (GetGrid_Movement() && RampMotionFrame && !DiscreteAdjoint) { |
|
||
if(RampOutlet && !DiscreteAdjoint) { | ||
for (iMarker = 0; iMarker < nMarker_Giles; iMarker++){ | ||
if (Kind_Data_Giles[iMarker] == STATIC_PRESSURE || Kind_Data_Giles[iMarker] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker] == RADIAL_EQUILIBRIUM ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (Kind_Data_Giles[iMarker] == STATIC_PRESSURE || Kind_Data_Giles[iMarker] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker] == RADIAL_EQUILIBRIUM ) | |
switch (Kind_Data_Giles[iMarker]) { |
const long unsigned rampFreq = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::UPDATE_FREQ)); | ||
const long unsigned finalRamp_Iter = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::FINAL_ITER)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you can't auto these?
const long unsigned rampFreq = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::UPDATE_FREQ)); | |
const long unsigned finalRamp_Iter = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::FINAL_ITER)); | |
const unsigned long rampFreq = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::UPDATE_FREQ)); | |
const unsigned long finalRamp_Iter = SU2_TYPE::Int(config->GetRamp_Coeff(ramp_flag, TURBO_RAMP_COEFF::FINAL_ITER)); |
/*!\brief RAMP_OUTLET_PRESSURE\n DESCRIPTION: option to ramp up or down the rotating frame velocity value*/ | ||
addBoolOption("RAMP_OUTLET_PRESSURE", RampOutletPressure, false); | ||
rampOutPres_coeff[0] = 100000.0; rampOutPres_coeff[1] = 1.0; rampOutPres_coeff[2] = 1000.0; | ||
/*!\brief RAMP_OUTLET_PRESSURE_COEFF \n DESCRIPTION: the 1st coeff is the staring outlet pressure, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add entries to the deprecated options so that users with old configs are pointed to the new option.
Proposed Changes
The turbomachinery ramps were missing the option to ramp the translation rate in 2D and the ability to ramp the outlet mass flow, these have been added and the function has been made more general to accomodate these additions. It should be much easier to add ramps in the future.
Related Work
N/A
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --all
to format old commits.