Skip to content
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

Supersonic inlet profile #2327

Merged
merged 11 commits into from
Aug 10, 2024
Merged

Supersonic inlet profile #2327

merged 11 commits into from
Aug 10, 2024

Conversation

pcarruscag
Copy link
Member

@pcarruscag pcarruscag commented Jul 20, 2024

Proposed Changes

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

@ShukaiWang1110
Copy link

ShukaiWang1110 commented Jul 20, 2024

flat plate test.zip
I did a plat plate test, which could work without inlet profile, however, when I input the inlet profile with uniform value(should be same as no-input), it still diverged immediately. I was looking through the function 'LoadInletProfile' in CSolver.cpp these days, maybe there should be some changes around? Because there is a determination of inlet type, which SUPERSONIC_BC doesn't belong to, I am not that sure if it effects. I attached all the testing files, including mesh, config, profile dat, etc. Please take a look and let's debug on this.

@pcarruscag
Copy link
Member Author

Thanks, I missed that part and noticed a couple other places, the case doesn't diverge anymore.

@ShukaiWang1110
Copy link

Thanks Pedro, the case indeed doesn't diverge, but a Segmentation Fault occurs, was the version 7.5.1 I am using? Any ideas?

@pcarruscag
Copy link
Member Author

This branch is based on the "develop" branch.

@ShukaiWang1110
Copy link

@pcarruscag Hi Pedro, just still want to make sure one thing, does the function the function 'LoadInletProfile' in CSolver.cpp needed to be changed? Since you didn't commit it. From the Valgrind output, a segment error occurred while reading the inletUNI.dat file. This is usually because the memory address attempted to be accessed is 0x0, which means there is a null pointer reference. The segment error occurs in the CConfig::GetInlet_Ptotal function and is due to accessing a null pointer. Maybe you can give me some suggestions and there's no need to change the version at this moment. Thanks!

@ShukaiWang1110
Copy link

@pcarruscag Hi Pedro, sorry to bother you again, I read the "develop" branch and noticed that you made some changes a month ago, such as redefined InletPtotal instead of the previous Inlet_Ptotal, I guess is to disambiguate some definition? And the error I got probably related with it. In this case, I think I should better also use the "develop" version. Is the building process same as here? https://su2code.github.io/docs_v7/Build-SU2-Linux-MacOS/#configuration-and-compilation.

@bigfooted
Copy link
Contributor

Hi @ShukaiWang1110,
In SU2, we have different branches:

  • The master branch are official releases. They get a version number and are also released with precompiled executables. This is for instance "SU2 v.8.0"
  • A new master branch is created from the latest develop branch. Developers are usually working with the develop branch to have access to the latest implementations. New implementations are committed to the develop branch.
  • When a developer wants to implement something new, they create a new branch from develop, implement their thing, and merge it again with develop. You see that happening here, in the top of the page you see

pcarruscag wants to merge 2 commits into develop from supersonic_profile

You see in the section Files Changed the changes compared to the current develop branch. This shows that this branch is up to date with current develop, only the new changes for the inlet profile show up.

I did not go through the code yet, but when you run it without having an inlet.dat file present, it should create one for you filled with a uniform profile. When you then use this file unaltered, does that work?

@ShukaiWang1110
Copy link

ShukaiWang1110 commented Jul 21, 2024

Hi @ShukaiWang1110, In SU2, we have different branches:

  • The master branch are official releases. They get a version number and are also released with precompiled executables. This is for instance "SU2 v.8.0"
  • A new master branch is created from the latest develop branch. Developers are usually working with the develop branch to have access to the latest implementations. New implementations are committed to the develop branch.
  • When a developer wants to implement something new, they create a new branch from develop, implement their thing, and merge it again with develop. You see that happening here, in the top of the page you see

pcarruscag wants to merge 2 commits into develop from supersonic_profile

You see in the section Files Changed the changes compared to the current develop branch. This shows that this branch is up to date with current develop, only the new changes for the inlet profile show up.

I did not go through the code yet, but when you run it without having an inlet.dat file present, it should create one for you filled with a uniform profile. When you then use this file unaltered, does that work?

Hi, I got how the branches work. In this case, I first downloaded the 'develop' branch to make sure everything is consitent with Pedro, and then I downloaded and replaced the 6 new committed files that related to the supersonic inlet profile development. The code should be totally the same at this point. And I did a flat plate test, which actually I need to fill a uniform profile, since the code would only generated an empty one. However, a segment error still occurs, and I attached the error file with Valgrind output. After eliminating the difference of different branches(versions), I guess you may have the same error? The test files are on the above conversations so that you may also take a try. Thanks for the help!
error.txt
@pcarruscag @bigfooted

@ShukaiWang1110
Copy link

Hi @ShukaiWang1110, In SU2, we have different branches:

  • The master branch are official releases. They get a version number and are also released with precompiled executables. This is for instance "SU2 v.8.0"
  • A new master branch is created from the latest develop branch. Developers are usually working with the develop branch to have access to the latest implementations. New implementations are committed to the develop branch.
  • When a developer wants to implement something new, they create a new branch from develop, implement their thing, and merge it again with develop. You see that happening here, in the top of the page you see

pcarruscag wants to merge 2 commits into develop from supersonic_profile

You see in the section Files Changed the changes compared to the current develop branch. This shows that this branch is up to date with current develop, only the new changes for the inlet profile show up.
I did not go through the code yet, but when you run it without having an inlet.dat file present, it should create one for you filled with a uniform profile. When you then use this file unaltered, does that work?

Hi, I got how the branches work. In this case, I first downloaded the 'develop' branch to make sure everything is consitent with Pedro, and then I downloaded and replaced the 6 new committed files that related to the supersonic inlet profile development. The code should be totally the same at this point. And I did a flat plate test, which actually I need to fill a uniform profile, since the code would only generated an empty one. However, a segment error still occurs, and I attched the error file with Valgrind output. The test files are on the above conversations so that you may also take a try. Thanks for the help! error.txt

From the error, I think The SU2_CFD encountered an invalid memory read operation during an attempt to read the inletUNI.dat file, causing the program to crash with a segment error (SIGSEGV). The specific error occurs in the CConfig::GetInletPtotal function, which seems attempts to access memory that has not been properly initialized or allocated. Any ideas? @pcarruscag @bigfooted

@ShukaiWang1110
Copy link

Hi, good news! I made it run by changing the' if (config->GetMarker_All_KindBC(iMarker) != KIND_MARKER) continue;' to ' if (config->GetMarker_All_KindBC(iMarker) != KIND_MARKER || config->GetMarker_All_KindBC(iMarker) == SUPERSONIC_INLET) continue;' which is line 3590 in CSolver.cpp. See if this is the right answer. @pcarruscag @bigfooted

@ShukaiWang1110
Copy link

WechatIMG206
Best picture for this week

@pcarruscag
Copy link
Member Author

Always harder than it seems initially, the example profile file will not be 100% in case there are mixed inlet types, but this should be good enough for now.

@ShukaiWang1110
Copy link

Always harder than it seems initially, the example profile file will not be 100% in case there are mixed inlet types, but this should be good enough for now.

Yes, it's definitely a satisfying development for now. Thanks for everything and I will attend the coming conference with the new data assimilation results.

@pcarruscag pcarruscag merged commit 1843a75 into develop Aug 10, 2024
35 checks passed
@pcarruscag pcarruscag deleted the supersonic_profile branch August 10, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants