-
Notifications
You must be signed in to change notification settings - Fork 854
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
Wrong spanwise sections calculation in Turbomachinery simulation #2203
Comments
I am not so familiar with turbomachinery but it looks like all spanwisesection initialization is done in CPhysicalGeometry.cpp. I think it initializes in the function ComputeNSpan. This function is called in CDriver like this:
So you should get an initialized value for inflow and outflow. |
Hi Nijso! Thanks for your suggestion. Currently I just hardcoded a section of that script as follows:
This modification was firstly suggested by @MKursatUzuner but I'm pasting it in here to have another source in case the topic opened in CFD Online gets deleted. |
Adding here for future reference, I have also encountered this before and ususally it is a mesh issue, I have solved this by regenerating my mesh and running the .cgns to .su2 conversion again and this resolved the issue. I have also experienced an issue where the NSpan is calculated is much larger (maybe max value of unisgned short I'm not sure). @LorenzoFabris if you notice this issue with any meshes try regenerating but keep the original and we can try and determine the difference between the two? I will also keep an eye out for this problem and do the same. |
Sure, we'll keep an eye on that. |
The issue likely stems from CPhysicalGeometry.cpp, where spanwise sections are initialized. A snippet from #1219 shows:
Instead of failing, the code should: Determine the maximum number of spanwise sections between inflow and outflow. |
Please review my suggestions. |
The spanwise sections is computed automatically based on the number of nodes in a mesh along the edge on a periodic boundary that connects the hub to the shroud. The original issue posted occurs when the ComputeNSpan function cannot determine the location of the nodes along this edge, it is usually a mesh issue that can be resolved by regenerating the mesh. Not entirely sure what you mean by interpolate to ensure continuity but the issue with this method would be that you are trying to extract solver information between vertices that don't exist in the solution. If, for example, you have a boundary with 10 spanwise section and its corresponding boundary has 20 elements, how do you extract solution variables that exist in the spaces between the elements of the boundary with lesser sections? The reason why this error throws is because large sections of the turbomachinery code run on this assumption of equal spanwise sections due to simplicity of implementation. It would be quite tricky to refactor large sections of the code to enable INFLOW/OUTFLOW boundaires with different spanwise sections, and it is uncommon for dedicated turbomachinery meshing software to output meshes like this anyway. |
The error stems from ComputeNSpan failing to detect nodes along the periodic boundary edge due to a malformed mesh, and the solver correctly requires equal sections. We can Enhance ComputeNSpan to throw a descriptive error |
I agree, feel free to open a PR. Additionally there is a Google Summer of Code project that aims to remove some of the assumptions present in setting the turbovertex structre you may be interested in. https://www.cfd-online.com/Forums/su2-news-announcements/259420-gsoc-2025-projects.html |
I am gathering more details on this issue and will open a PR soon. |
Describe the bug
A general centrifugal compressor multi-zone case is simulated.
The computational domain is composed by the following zones (for this case, no return channel geometry is included):
The code prints out the following error:
However, spanwise nodes are indeed 57 (checked manually and on Autogrid).
A possible solution is indicated here, but it is not a definitive one as it's dependent on the spanwise nodes number hard-coding.
Different SU2 version were tested, both on Win10 and Ubuntu 20.04, but the issue persisted only to be resolved similarly to the way showed here below.
Additional files
error.txt -> SU2 initialization up to the error
Bug report checklist
Desktop:
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: