-
Notifications
You must be signed in to change notification settings - Fork 826
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
[WIP] Update turbo interfaces #2209
base: develop
Are you sure you want to change the base?
[WIP] Update turbo interfaces #2209
Conversation
SU2_CFD/src/solvers/CEulerSolver.cpp
Outdated
|
||
/* --- Compute avg characteristic jump --- */ | ||
if (nDim == 2){ | ||
c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); | ||
} | ||
else | ||
{ | ||
c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); | ||
} |
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.
Is the index of c_avg associated with pressure? If so we should use prim_idx.Pressure()
/* --- Compute avg characteristic jump --- */ | |
if (nDim == 2){ | |
c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); | |
} | |
else | |
{ | |
c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); | |
} | |
/*--- Compute avg characteristic jump ---*/ | |
c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); |
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.
Index of c_avg is associated with the type of wave and the travel direction across the boundary (downstream index 1-3, upstream index 4)
This reverts commit b253dc0.
@@ -138,6 +138,7 @@ class CEulerSolver : public CFVMFlowSolverBase<CEulerVariable, ENUM_REGIME::COMP | |||
su2activematrix ExtAverageNu; | |||
su2activematrix ExtAverageKine; | |||
su2activematrix ExtAverageOmega; | |||
vector<su2double> AverageMassFlowRate; |
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.
Could this be an array or su2vector?
* \param[in] val_marker - bound marker | ||
* \return Value of the mass flow rate on the surface <i>val_marker</i> | ||
*/ | ||
//inline su2double GetAverageMassFlowRate(unsigned short valMarker) const final { |
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.
Don't forget to remove the commented method
* \param[in] val_marker - boundary marker | ||
* \return Value of the mass flow rate on the surface <i>val_marker</i> | ||
*/ | ||
inline virtual su2double GetAverageMassFlowRate(unsigned short valMarker) const {return 0.0; } |
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.
inline virtual su2double GetAverageMassFlowRate(unsigned short valMarker) const {return 0.0; } | |
inline virtual su2double GetTargetMassFlowRate(unsigned short valMarker) const {return 0.0; } |
{ | ||
c_avg[4] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); | ||
} | ||
c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); |
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.
c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); | |
c_avg[nDim + 1] = 2.0*(Pressure_e-AveragePressure[val_marker][iSpan]); |
auto const MassFlowRate_e = config->GetGiles_Var1(Marker_Tag); | ||
auto const relFacMassFlowRate = config->GetGiles_Var2(Marker_Tag); | ||
|
||
Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*(AverageMassFlowRate[val_marker]-MassFlowRate_e); |
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.
Maybe try this in order to keep the units more consistent here.
Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*(AverageMassFlowRate[val_marker]-MassFlowRate_e); | |
Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*GetFluidModel()->GetdPdrho_e()*(AverageMassFlowRate[val_marker]-MassFlowRate_e); |
Proposed Changes
Update to the interface initialisation to enable both mixing plane and sliding interfaces within the same turbomachinery simulation. Addition of mass flow outlet to Giles BC.
Related Work
This issue solves a problem reported by a number of users, when simulating radial turbomachinery cases a second-order accurate solution cannot be achieved in some cases when using mixing plane interfaces. This is due to circumfrential averaging in regions where the flow exhibits large circumfrential nonuniformity and/or interspace gaps between adjacent blade-rows/zones small. This issue has been reported by @LorenzoFabris, in a presentation at the SU2 Conference 2022 "Performance Analysis and Shape Optimization of a Radial Compressor with the Open-Source Software SU2" and by myself.
Mass flow outlet included in the PR as requested by users.
TBC:
-Update APU Turbocharger test case and regression test to include this feature, add diffuser and converge 2nd order.
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.