-
Notifications
You must be signed in to change notification settings - Fork 841
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
Bas-Cakmakcioglu (BC) Transition Model #326
Conversation
New option for ENUM_TRANS_MODEL (BC = 2) for Bas-Cakmakcioglu Model (Line 640-648)
nu_tilde_Inf and nu_tilde_Engine variables are modified for Bas-Cakmakcioglu transition model.
BC Model added to CSourcePieceWise_TurbSA::ComputeResidual. IMPORTANT NOTE ********* A research paper is written and currently under review by the ASME Journal of Fluids Engineering. ****************************** The idea behind the creation of BC model: " Earlier, Menter et al.’s 2-equation “engineering transition model” (gamma-ReThetat model) had set the pace in CFD design and prediction codes mostly used in industrial turbomachinery flows. This successful model was followed by some other two- and three-equation models in the literature that further strengthen Menter et al’s approach. Yet, it was noticed by Menter and by some authors, including our group, that the second equation (Re_Thetat) is rather redundant, and the 2-equation model could be reduced back into a 1-equation model (gamma-model). Thus, Menter et al. produced their 1-equation model (gamma-intermittency) without sacrificing accuracy, but with increased efficiency. Having our research group’s strong ties with industrial design applications, further simplification would have appeared quite a possibility to devise an algebraic (or a zero-equation) model that only solves for an intermittency function (gamma). This observation would be supported by the fact that while turbulent production and diffusion mechanisms are already represented by the underlying turbulence model (herein the Spalart-Allmaras model), why one choose to fabricate two more extra transition equations? Since the so-called engineering transition models all use the same experimental correlation between the so-called vorticity Reynolds number and momentum thickness Reynolds number, as long as this correlation is maintained, algebraic model should also succeed. Evidently, this observation and the attendant approach in the paper have led to some remarkably good results especially for airfoils at low Reynolds numbers. As a result, we would like propose our much simplified algebraic engineering transition model approach to industrial CFD design applications community." Some Test Cases for BC Model including grid files, configuration files are included under the TEST_CASES folder. Please contact me if you have any questions/ideas/comments about our model. Also, if you have any test case you have (especially 3-D), I would be more than happy to assist you solving it. Feel free to use this model in your applications, and please cite us in your work. Sincerely, Samet Cakmakcioglu (e-mail: [email protected])
These folders include grid files and configuration files for various BC transition test cases.
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.
Hi Samet,
thank you for this contribution. Below you find some comments on your implementation from my side. Can you maybe give us some results (maybe add a picture here that compares your results with experimental data ) so that we get an impression of your method.
We also need a regression test for that. I think we can simply take one of your test cases for that. If you need any help with this, please let us know.
Thanks !
@@ -534,6 +534,14 @@ void CSourcePieceWise_TurbSA::ComputeResidual(su2double *val_residual, su2double | |||
// AD::SetPreaccIn(TurbVar_i[0]); | |||
// AD::SetPreaccIn(TurbVar_Grad_i[0], nDim); | |||
// AD::SetPreaccIn(Volume); AD::SetPreaccIn(dist_i); | |||
|
|||
//Added by Cakmakcioglu, for BC Transition Model 10/30/2106 |
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.
We will certainly acknowledge your contribution at the correct place, so I dont think that these comments are necessary (same holds for all the other comments). You could add your name to the header of the file or in solver_structure.hpp in the comment for the SA solver.
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.
Dr. Albring, thank you very much for your feedback. This is certainly my bad, as I have no previous experience with github, and did not know that you can see my changes that easily! This is why I have added these comment lines, thought that it would be helpful for others to keep track of the additions that I made. I apologize for that. I certainly know that you always appreciate all the contributions to the code.
The comment lines are deleted.
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.
No problem. But you can imagine if everybody does this, then the files quickly get flooded by comments :)
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.
indeed :)
/*--- Factor_nu_Inf in [3.0, 5.0] ---*/ | ||
|
||
Factor_nu_Inf = config->GetNuFactor_FreeStream(); | ||
nu_tilde_Inf = Factor_nu_Inf*Viscosity_Inf/Density_Inf; | ||
if (transition) { | ||
nu_tilde_Inf = 0.005*Factor_nu_Inf*Viscosity_Inf/Density_Inf; //Modified for BC transition model. Cakmakcioglu 10/30/2016 |
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.
Please correctly align the code here.
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.
corrected, thank you.
@@ -0,0 +1,58 @@ | |||
VARIABLES = Rex Cf |
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.
All files that are not config files (like experimental data, mesh files etc) should be moved to the TestCases repository.
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.
Under TestCases folder, I tried to create a sub folder named transition_test_cases. These files along with configuration files and grid files are all seems to be under the transition_test_cases folder. If it is wrong way, would you please help me on this? Thanks.
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.
There is a separate repository for the test case files. I can move the files there tmrw.
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.
That would be great! thank you for helping me on this matter.
% Specify turbulent model (NONE, SA, SA_NEG, SST) | ||
KIND_TURB_MODEL= SA | ||
KIND_TRANS_MODEL= BC | ||
%FREESTREAM_INTERMITTENCY = 0.9 |
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 remove these commented lines.
% | ||
% Specify turbulent model (NONE, SA, SA_NEG, SST) | ||
KIND_TURB_MODEL= SA | ||
KIND_TRANS_MODEL= BC |
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.
Add a comment here for this option.
@@ -534,6 +534,14 @@ void CSourcePieceWise_TurbSA::ComputeResidual(su2double *val_residual, su2double | |||
// AD::SetPreaccIn(TurbVar_i[0]); | |||
// AD::SetPreaccIn(TurbVar_Grad_i[0], nDim); | |||
// AD::SetPreaccIn(Volume); AD::SetPreaccIn(dist_i); | |||
|
|||
//Added by Cakmakcioglu, for BC Transition Model 10/30/2106 | |||
bool transition = (config->GetKind_Trans_Model() == BC); |
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 add this variable as a field to the numerics class and set it in the constructor (then it is consistent).
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.
In fact, I am a beginner C++ user, so I am not sure if I understood this correctly.
I have defined "transition" in numerics_structure.hpp, and changed this part of the code as needed. Hope this it what you meant.
this change is made upon Dr. Albring's suggestion.
changes made according to Dr. Albring's suggestions.
Dear all, |
Samet, Great to hear from you again. Thanks for submitting your work! Did you ever have a chance to try the NREL Phase VI wind turbine blade? This could be a good 3D test case, and I believe we have a grid or two lying around... Tom |
Hello Dr. Economon, Before starting the NREL case, I decided to check the caradonna_tung test case to see how to set grid movement configurations etc.. Although I have successfully run the case with euler equations, I could not do so with the navier-stokes equations as the case stopped running with error "Convective scheme not implemented (turbulent)". This is why I could not solve the NREL test case. If I am missing something, would you please help me on the issue? Samet |
Thanks for fixing these things and the attached pdf. The results look great ! In case you have some parameters that you might want to have as an config option, feel free to add them or just let us know. |
Dr. Albring, our model do not require any other config option for now. If needed in the future, I would definitely ask you some help. Thank you for your reviews. Please let me know if any other things need to be fixed. |
@@ -526,7 +526,9 @@ CSourcePieceWise_TurbSA::CSourcePieceWise_TurbSA(unsigned short val_nDim, unsign | |||
CSourcePieceWise_TurbSA::~CSourcePieceWise_TurbSA(void) { } | |||
|
|||
void CSourcePieceWise_TurbSA::ComputeResidual(su2double *val_residual, su2double **val_Jacobian_i, su2double **val_Jacobian_j, CConfig *config) { | |||
|
|||
|
|||
transition = (config->GetKind_Trans_Model() == BC); |
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.
Just move this to the routine CSourcePieceWise_TurbSA::CSourcePieceWise_TurbSA(...) and then its fine.
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.
right, will do it this evening.
Samet, the error you get for the caradonna tung case is probably because the definition of the numerical scheme for the turbulence model is missing in the config file. Just copy it from another case. |
well, that is the thing that I was missing! thank you for bringing that into my attention Dr. Albring. now i can simulate the NREL wind turbine case with my model as soon as i have an appropriate geometry (if you have it and can share, i would give it a try in the evening when i get home). |
Dr. Albring, |
Samet, I can help you with the NREL case and the output. We are in the middle of rewriting those routines, so it will be very easy to register and output new variables to the viz. files soon (another week or less). Tom |
I added the necessary files (the exp. data and the .su2 files) to the TestCases repository, so you can remove them from here. And please rename the folder to "transition". Thanks! |
Dr. Economon, Samet |
I'll do you one better. Here is a mesh and config file for the NREL Phase VI: http://stanford.edu/~economon/dropbox/nrel.tgz. It's been a while since I have run that to convergence, so it may need some tweaking. Give it a try and let me know. It's ~3 million grid nodes, so you'll likely need a few cores... |
Thank you very much Dr. Economon, I really appreciate that. Now I will play around with it, and will let you know about the progress. |
Dr. Economon, |
Thanks for putting those results together, Samet. For more comparisons, you might also check out the paper by Langtry, et al., "Predicting 2D Airfoil and 3D Wind Turbine Rotor Performance using a Transition Model for General CFD Codes" that contains this exact case. Another interesting paper is Potsdam, "Unstructured Mesh CFD Aerodynamic Analysis of the NREL Phase VI Rotor." We can also look at the surface streamlines to compare with some of the results in these papers. |
Dr. Economon, |
Dr. Economon, |
Just checking: @talbring were your requested changes addressed? |
Sorry for the delay. I am fine with the changes! I dont know if @economon has some comments on the results. But I agree with Samet, that we can also let the community apply this to other test cases! |
I agree that we should get this in soon and allow others to give it a try. I have just one more request, Samet: in order to protect your nice contribution to the code, it is best to have at least one of the test cases connected to our regression test system. That way, we will be alerted right away if a future commit affects the correctness of your model. Can you please add at least one of the cases to the regression suite? This is done by adding the case(s) to the serial_regression.py and parallel_regression.py files. I think that it is fairly straightforward to add one by pattern-matching the existing cases, but please let me know if you have trouble. |
Dr. Economon, I have tried to add Schubauer-Klebanoff natural transition case for regression tests as you requested. Should there be any problem, please let me know. |
By the way, I can fork the TestCases repo and commit the grid files etc myself, if it would be much better. Please let me know. |
Yep, please do the latter. You can find the test case repo here: https://github.com/su2code/TestCases. Note that, by construction, it has the same directory structure as the TestCases/ directory under the SU2 repo. If you submit a pull request there to the develop branch with your new grid(s), we can merge it in right away. |
Dr. Economon, |
Great. Sorry for the delay. Just merged those in under the TestCases repo, so let's rerun the tests here and see if everything passes, ok? I'll restart it now. |
No problem at all, Dr. Economon. Now everything seems good, and it is ready to merge. Hope it would be useful to the community. Thank you and Dr. Albring for your support! |
Thanks again for all of your hard work and integration, Samet. This is a very nice contribution to the open source community. Merging now. |
An algebraic transition model that relies on local information, herein named as BC model, is added. The model uses Spalart-Allmaras model as the baseline model. BC model does not solve for any transport equations as in LM model, but instead, it uses the already transported S-A variable, nu_t. The model achieves its purpose by modifying the production term of the S-A.
IMPORTANT: A research paper is written about our model, and submitted to ASME Journal of Fluids Engineering, and currently it is under review. If you need detailed information regarding to the model, please contact me from [email protected]
Under the TestCases folder, I have added three test cases. Feel free to test the transition model for your own test cases. I also have T106 turbine cascade test case with successful results, and I can share it with you if requested. Please do not hesitate to contact me if you have more test cases (especially 3-D transition cases) that you would like me to solve. I would be more than happy to hear back your comments/suggestions.
Sincerely,
Samet C. Cakmakcioglu