[WIP] Langtry and Menter transition model
Hi, all.
This PR is resuming the #1592 I'm not familiar with the git, so the branch is unfortunately merged.
"[WIP] Develop for Langtry and Menter transition model. https://github.com/su2code/SU2/pull/1592" was merged while trying to update my remote repository to v7.40. I'm not good at using GitHub, so I'm sorry for this situation.
My remote repository(forked) is not synchronized with v7.40, and I don't know what the problem is. So, I will delete the forked repository and fork it again to PR with the same name and content. Fortunately, the LM model updated to v7.40 obtained the same residuals and results as the previous v7.3.1.
Current State
Code is well running and, validation is almost done.
V&V cases: T3A, T3A-, NLF
Flow conditions are the reference from: https://doi.org/10.2514/6.2022-3679.
The grids of T3A and NLF cases are provided by TMW(Transition Model Workshop). And I made the grid of T3A- myself.
To validate the LM model, the simulation results of SU2 are compared with the results of Fluent19.0 with a similar numerical setting.
Here is the numerical scheme :
| Fluent | SU2 | |
|---|---|---|
| Flux | Roe-FDS | L2ROE |
| Gradient | Least Squares Cell Based | WEIGHTED_LEAST_SQUARES |
| Spatial Discretization Flow | Third-order MUSCL | MUSCL_FLOW |
| Spatial Discretization Turbulence | First-order Upwind | MUSCL_NO |
Some high-resolution grid-level results are missed because I don't have enough computational resources. Here is Result
T3A :

T3A-: The gird test result is not converged, but It's enough to compare the model.

NLF :
AoA 0 case is shown. In this case, the flow separation occurred on the upper surface. So, not fully converged, and I show only Fine level grid results according to the number of iterations.
Zoom to the separation region :

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.
- [x] I am submitting my contribution to the develop branch.
- [x] My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
- [x] My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
- [x] 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.
Thanks @sun5k, the merge conflicts were probably a bit challenging because some files were moved with the other work we were doing on turbulence. I had a look at the code and it looks like you did a nice job of modernizing the transition implementation :+1: and the verification against Fluent also looks good. Given that this is an improvement in all directions (better code, feature that works, same amount of code) I encourage you to make the final push so that we can integrate it into develop. As you see the GitHub tests are failing because of compiler warnings (unused variables and so on, you should be able to see the logs) let me know if you need some help. Then we need at least one regression test, for example one of the coarser grids in your V&V, and with that we should be able to finish this PR!
After that please consider adding your results to our V&V page https://su2code.github.io/vandv/home/
@sun5k Great work!
Recently I was looking around the 3rd Annual SU2 conference web page(#1683), and I came across a presentation that seemed to be related to this PR.
SU2conference : Day2 The title: Implementation of γ-Re θ transition model within SU2: model validation and the presenter is Andrea Rausa.
I'd like to see the presentation above the presentation. The 2nd SU2 conference presentation video was uploaded. So, Is the 3rd SU2 conference video going to be uploaded?
@sun5k @rois1995 we now have 2 PR's on the same subject. This one is already reviewed, and I am not keen on wasting work (mine and others). The way I see it this PR followed the way we encourage for contributions to SU2, draft PR, etc, and thus it should be integrated. So, @sun5k can you finish the little things missing here? That way PR #1788 can then build on top of this.
@sun5k @rois1995 we now have 2 PR's on the same subject. This one is already reviewed, and I am not keen on wasting work (mine and others). The way I see it this PR followed the way we encourage for contributions to SU2, draft PR, etc, and thus it should be integrated. So, @sun5k can you finish the little things missing here? That way PR #1788 can then build on top of this.
Oh, @rois1995 has significant progress in the LM model. I didn't know about this progress because I missed the SU2 conference in 2022. Now, I'm making the V&V and tutorial cases in my repository. So, at least tomorrow, I will PR to V&V, Tutorials, and TestCases.
After PR of the V&V, Tutorials, and TestCases, I thought almost done about this PR #1751. Is there anything else I should do with this PR #1751?
Have a look at unresolved conversations from @TobiKattmann and at my comment on Sep 7
Sorry, I already modify the code which you and @Tobikattmann mentioned. I didn't know about I should click on the "Resolve conversation" button.
Recently I was looking around the 3rd Annual SU2 conference web page(#1683), and I came across a presentation that seemed to be related to this PR.
SU2conference : Day2 The title: Implementation of γ-Re θ transition model within SU2: model validation and the presenter is Andrea Rausa.
I'd like to see the presentation above the presentation. The 2nd SU2 conference presentation video was uploaded. So, Is the 3rd SU2 conference video going to be uploaded?
Hi @sun5k, I'm sorry but I've just seen this message. I have uploaded a link to the presentation to my pull request. If you need anything then feel free to ask.
@sun5k please take care of the two comments above from my last review, and add regressions for your 2 tutorials (see what is done in TestCases/tutorials.py. Then I think we can merge this PR!
@sun5k please take care of the two comments above from my last review, and add regressions for your 2 tutorials (see what is done in TestCases/tutorials.py. Then I think we can merge this PR!
I'm seeing TestCases/tutorials.py. I have some questions about the code. In the tutorials.py in transition flat plate for the BC model.
tutorial_trans_flatplate = TestCase('transitional_flatplate_tutorial')
tutorial_trans_flatplate.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate"
tutorial_trans_flatplate.cfg_file = "transitional_BC_model_ConfigFile.cfg"
tutorial_trans_flatplate.test_iter = 0
tutorial_trans_flatplate.test_vals = [-22.021786, -15.330766, 0.000000, 0.023952] #last 4 columns
tutorial_trans_flatplate.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_trans_flatplate.timeout = 1600
tutorial_trans_flatplate.tol = 0.00001
tutorial_trans_flatplate.no_restart = True
test_list.append(tutorial_trans_flatplate)
I guess, "tutorial_trans_flatplate.test_iter" is a number of iterations, "tutorial_trans_flatplate.su2_exec" is the command for SU2_CFD, "tutorial_trans_flatplate.timeout" is the maximum program running time, "tutorial_trans_flatplate.tol" is a tolerance for convergence criteria, "tutorial_trans_flatplate.no_restart" is a restart option.
I can't understand this whole sentence. "tutorial_trans_flatplate.test_vals = [-22.021786, -15.330766, 0.000000, 0.023952]"
Could you explain what's meaning?
I can't understand this whole sentence. "tutorial_trans_flatplate.test_vals = [-22.021786, -15.330766, 0.000000, 0.023952]"
This is the line with the nr of iterations, residuals, etc. If you run the case, you will see them printed to the screen. The values in *.test_vals should match with the values on the screen that you get at iteration number *.test_iter The test values are read from the end to the beginning, so if the array contains only one value, this should be the last value that is reported by SU2. In the example that you give for the tutorial_trans_flatplate, there are 4 values, which should match the last 4 values printed by SU2
By the way, you can run python serial_regression.py or any of the other regression tests on your local machine to see what it does, although for some cases you might see a difference in residuals due to differences with the version compiled for github/docker. If you want to run the regression test exactly in the same environment as on github, you need to use docker.
@pcarruscag @WallyMaier
Thanks for the thorough code review. The AFT(= e^N) transition model is being worked on by someone else, so the next step will probably implement a k-w-Gamma transition model.