-
Notifications
You must be signed in to change notification settings - Fork 867
Fix #2203: Improve Spanwise Section Error Handling in Turbomachinery Simulations #2459
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4974,6 +4974,13 @@ | |
max = 0; | ||
SU2_MPI::Allreduce(&MyMin, &min, 1, MPI_DOUBLE, MPI_MIN, SU2_MPI::GetComm()); | ||
SU2_MPI::Allreduce(&MyMax, &max, 1, MPI_DOUBLE, MPI_MAX, SU2_MPI::GetComm()); | ||
if (nSpan < 2) { | ||
string marker_name = (marker_flag == INFLOW) ? "INFLOW" : "OUTFLOW"; | ||
SU2_MPI::Error("Failed to compute spanwise sections for " + marker_name + | ||
". Found " + to_string(nSpan) + " nodes along the periodic boundary edge from hub to shroud. " + | ||
"At least 2 nodes are required. Check your mesh for correct hub-to-shroud edge definition.", | ||
CURRENT_FUNCTION); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is in the equispaced section of the if statement, it should go with the other error message and run if the automatic section fails to calculate any value of nSpanWiseSections in three dimensions, i.e.
|
||
|
||
/*--- compute height value for each spanwise section---*/ | ||
delta = (max - min) / (nSpanWiseSections[marker_flag - 1] - 1); | ||
|
@@ -4988,9 +4995,9 @@ | |
SPRINTF(buf, "nSpan inflow %u, nSpan outflow %u", nSpanWiseSections[INFLOW - 1], | ||
nSpanWiseSections[OUTFLOW - 1]); | ||
SU2_MPI::Error( | ||
string(" At the moment only turbomachinery with the same amount of span-wise section can be simulated\n") + | ||
buf, | ||
CURRENT_FUNCTION); | ||
string("Turbomachinery simulation requires equal spanwise sections at INFLOW and OUTFLOW. ") + buf + | ||
"\nThis is likely a mesh issue. Ensure that the periodic boundaries from hub to shroud are consistently defined in the mesh.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not likely a mesh issue, it is a mesh issue! |
||
CURRENT_FUNCTION); | ||
} else { | ||
config->SetnSpanWiseSections(nSpanWiseSections[OUTFLOW - 1]); | ||
} | ||
|
Check warning
Code scanning / CodeQL
Comparison result is always the same Warning