Skip to content

Conversation

@sun5k
Copy link
Contributor

@sun5k sun5k commented Sep 5, 2022

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. #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
The CFL number is set constant value.

Some high-resolution grid-level results are missed because I don't have enough computational resources.
Here is Result

T3A :

image
image
image
image

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

image
image
image
image

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.
image
Zoom to the separation region :
image

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.

  • 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 have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

update LM Model for v7.40
@pcarruscag pcarruscag changed the title Develop for Langtry and Menter transition model. [WIP] Langtry and Menter transition model Sep 5, 2022
@pr-triage pr-triage bot removed the PR: unreviewed label Sep 5, 2022
@pcarruscag
Copy link
Member

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 👍 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/

cleaning
@WallyMaier
Copy link
Contributor

@sun5k Great work!

sun5k and others added 9 commits September 7, 2022 23:40
Co-authored-by: Wally Maier <wallytmaier@gmail.com>
Cleaning the code.

Co-authored-by: Wally Maier <wallytmaier@gmail.com>
Cleaning the code.

Co-authored-by: Wally Maier <wallytmaier@gmail.com>
Cleaning the code.

Co-authored-by: Wally Maier <wallytmaier@gmail.com>
Cleaning the code.

Co-authored-by: Wally Maier <wallytmaier@gmail.com>
Cleaning the code.

Co-authored-by: Wally Maier <wallytmaier@gmail.com>
code cleaning
Copy link
Contributor

@TobiKattmann TobiKattmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sun5k ,
thanks for this fresh push on this feature. Below a few stylistic comments which are easily incorporated and just require a little attention to detail. Please also apply the general idea of my comments wherever possible and reasonable.

A regression test to your work is certainly necessary, but as you already have nice results this should not be too much effort. As pedro mentioned, an addition to the V&V repository would be absolutely awesome :)

Thanks for this work so far, Tobi

Bonus: When you apply clang-format to the fully added files (and maybe CTransLMSolver.cpp), you might note the style and apply that to other places in this PR.

sun5k and others added 6 commits September 12, 2022 20:50
….hpp

Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
@pcarruscag pcarruscag changed the title [WIP] Langtry and Menter transition model Langtry and Menter transition model Oct 27, 2022
@pcarruscag
Copy link
Member

@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
Copy link
Contributor Author

sun5k commented Oct 28, 2022

@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?

@bigfooted
Copy link
Contributor

bigfooted commented Oct 28, 2022

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.

sun5k added 5 commits October 28, 2022 16:06
Remove unused variables and modify Set_Intermittency() function.
Modify function
Tutorial cases for Langtry and Menter transition model.
T3A- to T3Am
Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding the test.
Please add your name to the file AUTHORS.md

Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change INNER_ITER= 10000 to ITER= 10000 on both config files via a new PR to Tutorials, this is why the cases are running for too long.
The test script modifies the number of iterations, but it looks for ITER instead of INNER_ITER.

sun5k added 2 commits October 29, 2022 11:40
Add my name.
Change number of the iteration.
@sun5k sun5k merged commit f0dcb86 into su2code:develop Oct 30, 2022
@sun5k
Copy link
Contributor Author

sun5k commented Oct 30, 2022

@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.

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.

6 participants