-
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] Supersonic inlet profile #1652
base: develop
Are you sure you want to change the base?
[WIP] Supersonic inlet profile #1652
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.
Actually this is more involved than I thought.
If you can attend the developer meeting next Tuesday at 10am Pacific time (https://meet.jit.si/SU2_DevMeeting) I can try to give directions.
Otherwise I suggest that you avoid intersections between supersonic inlets and walls.
@@ -2524,6 +2524,7 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns | |||
su2double *Inlet_XCG = new su2double [config->GetnMarker_All()](); | |||
su2double *Inlet_YCG = new su2double [config->GetnMarker_All()](); | |||
su2double *Inlet_ZCG = new su2double [config->GetnMarker_All()](); | |||
su2double *Inlet_Velocity = new su2double [config->GetnMarker_All()](); |
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.
This function does not need to be modified.
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.
I'll attend the meeting. Upon thinking about it more, I think I will be breaking my inlet into two domains, one that uses the subsonic inlet feature (directly above the wall) and one that would use the new supersonic inlet feature (above the subsonic region). That way, the supersonic inlet profile will not be meeting the no-slip wall and contain subsonic flow.
I just committed a second round of changes that I would appreciate some feedback on. Compilation is successful with these changes, however, upon testing, I receive the following message: Error in "void CConfig::SetConfig_Parsing(std::istream&)":Line 271 SPECIFIED_SUPERSONIC_INLET_PROFILE: invalid option name. Check current SU2 options in config_template.cfg. I had already adjusted CConfig.cpp to include supersonic inlet profile inputs, but apparently I am not implementing everything I need to. I'm unsure where else I would need to make changes. Any suggestions? |
Hi! For some reason the files that you edited are not in the directories that they belong in, but are residing in the main SU2 directory. You have to move each of the files to the correct directory. |
Whoops, thanks for letting me know! I'll fix that shortly. |
OK, great. |
Upon implementing these changes, the compilation of the code failed due to multiple variables receiving conflicting declarations. After using just the variables @pcarruscag made and re-compiling, I receive multiple errors regarding the assignment of read-only variables, so I had to remove the "const" before a few lines to allow for compilation. Is this alright? Also, any ideas about why SPECIFIED_SUPERSONIC_INLET_PROFILE is not being accepted as an option even though it's defined in CConfig.cpp? |
Why did you introduce supersonic-specific options? The inlet file allows specifying profiles for all markers, and a marker will not have 2 boundary conditions. From what I saw we just need to interpret the values in a different way. |
I introduced supersonic specific options because, from my understanding, anything written in INLET_FILENAME in the .cfg file will be treated as a subsonic inlet, even if the marker tag is assigned to a supersonic inlet (including both profiles in the same inlet file results in immediate divergence). I wanted the static temperature, static pressure, and velocity vector to be read into SU2 for the supersonic profile and the total temperature, total pressure, and unit flow vector to be read for the subsonic profile. I figured that placing these different values in different files would be the easiest way to circumvent the issue stated above. |
I see, that should not be necessary because internally we can check that the marker is supersonic instead of subsonic and give the values a different interpretation. |
@@ -1015,6 +1015,40 @@ su2double CTurbSSTSolver::GetInletAtVertex(su2double *val_inlet, | |||
} | |||
} | |||
|
|||
} else if (val_kind_marker == SUPERSONIC_INLET) { | |||
|
|||
unsigned short tke_position = nDim+2+nDim; |
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.
I would try to avoid these declarations (ndim+ndim). It may be a bit selfish of me here, but this wont work for NEMO or INC. Im not sure the incompressible solver could be used here.
It may be beneficial to add to the variable index (CIndices)?
@@ -9427,3 +9437,4 @@ void CEulerSolver::GatherInOutAverageValues(CConfig *config, CGeometry *geometry | |||
} | |||
} | |||
} | |||
|
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.
Velocity2 = 0.0; | ||
for (iDim = 0; iDim < nDim; iDim++) | ||
Velocity2 += Velocity[iDim]*Velocity[iDim]; |
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.
Velocity2 = 0.0; | |
for (iDim = 0; iDim < nDim; iDim++) | |
Velocity2 += Velocity[iDim]*Velocity[iDim]; | |
Velocity2 = GeometryToolbox::SquaredNorm(nDim, Velocity); |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still a relevant issue please comment on it to restart the discussion. Thank you for your contributions. |
Proposed Changes
Give a brief overview of your contribution here in a few sentences.
This is a draft pull request for the implementation of a supersonic inlet profile feature. So far, the only changes made have been in CEulerSolver.cpp, where the uniform temperature, pressure, and velocity at the inlet for a supersonic inlet BC have been replaced with vertex values (please verify I did this correctly).
Related Work
Resolve any issues (bug fix or feature request), note any related PRs, or mention interactions with the work of others, if any.
I have been in communication with @bigfooted regarding the first steps for this implementation. I created a feature request for this on 5/25/2022.
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.