-
Notifications
You must be signed in to change notification settings - Fork 905
Adding new roughness boundary conditions for SST #2573
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
base: develop
Are you sure you want to change the base?
Conversation
|
Thanks for the contribution! Can you add the new config options to config_template.cfg and add the flat plate setup? You can add the .cfg file to this PR, and the mesh and a converged restart file to a PR for the TestCases repository. |
pcarruscag
left a comment
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 testcase please, something of verification quality, are there known results from literature for flatplates?
Common/include/option_structure.hpp
Outdated
| NONE, /*!< \brief No option / default. */ | ||
| WILCOX1998, /*!< \brief Wilcox 1998 boundary conditions for rough walls / default. */ |
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.
Both are default?
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 will fix this issue. When surface roughness is used, the Wilcox boundary condition should be the default. To align with the current implementation, I will set WILCOX2006 as the default boundary condition.
Common/include/option_structure.hpp
Outdated
| ROUGHSSTParsedOptions.wilcox2006 = IsPresent(ROUGHSST_OPTIONS::WILCOX2006); | ||
| ROUGHSSTParsedOptions.limiter_knopp = IsPresent(ROUGHSST_OPTIONS::LIMITER_KNOPP); | ||
| ROUGHSSTParsedOptions.limiter_aupoix = IsPresent(ROUGHSST_OPTIONS::LIMITER_AUPOIX); |
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.
you don't check for 1998? Is it valid if all of these are true?
| /*--- Aupoix eddy viscosity limiter ---*/ | ||
| else if (roughsstParsedOptions.limiter_aupoix) { | ||
|
|
||
| su2double k0Plus = ( 1.0 /sqrt( constants[6])) * tanh(((log((kPlus +EPS ) / 30.0) / log(10.0)) + 1.0 - 1.0*tanh( (kPlus + EPS) / 125.0))*tanh((kPlus + EPS) / 125.0)); |
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.
why log / log(10) instead of log10(...)?
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 the implementation, the current expression is retained to remain consistent with the formulation in the reference paper, even though it would be mathematically equivalent to using a base-10 logarithm.
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.
Put a comment if you like, but this is log10, thanks.
| solution[1] = FrictionVel*FrictionVel*S_R/(laminar_viscosity/density); | ||
| } | ||
| /*--- Knopp eddy viscosity limiter ---*/ | ||
| else if (roughsstParsedOptions.limiter_knopp) { |
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.
The options are mutually exclusive so allowing a list of enums in the config is not the most appropriate.
Better to change to a single enum option?
If it ever becomes possible to specify a list, the config syntax will still be compatible.
| S_R = (200/(kPlus+EPS))*(200/(kPlus+EPS)); | ||
| else | ||
| S_R = 100/(kPlus+EPS) + ((200/(kPlus+EPS))*(200/(kPlus+EPS)) - 100/(kPlus+EPS))*exp(5-kPlus); |
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.
Use the pow function please
| S_R = (200/(kPlus+EPS))*(200/(kPlus+EPS)); | |
| else | |
| S_R = 100/(kPlus+EPS) + ((200/(kPlus+EPS))*(200/(kPlus+EPS)) - 100/(kPlus+EPS))*exp(5-kPlus); | |
| S_R = pow(200/(kPlus+EPS), 2); | |
| else | |
| S_R = 100/(kPlus+EPS) + (pow(200/(kPlus+EPS), 2) - 100/(kPlus+EPS))*exp(5-kPlus); |
|
|
||
| su2double solution[2]; |
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.
| su2double solution[2]; | |
| su2double solution[2] = {}; | |
Thanks for the reply. I added just one entry to select the boundary condition at the wall, which is "ROUGHSST_OPTIONS", since surface roughness is specified using the existing entry "WALL_ROUGHNESS". As shown in the document attached to the PR, the present test case is the NASA ZPG Flat Plate test case with the addition of surface roughness to verify the effects of different boundary conditions for rough walls for the SST model. I will upload the test case in a PR for the TestCases repository. |
I will add the test case, and in this paper, it is possible to find an overview of the effects of the boundary conditions for rough walls for the SST model on a fully turbulent flat plate test case, including the boundary conditions that I have implemented. |
|
Hi @pcarruscag and @bigfooted, As part of this pull request, I’ve a validation test case for the new roughness boundary condition in the SST model. Could you please grant me temporary access or let me know the preferred procedure for contributing this test case? Thanks a lot for your help! |
|
I've invited you to the SU2 organization |
|
Hi! I’ve opened a pull request at su2code/TestCases#178, where I’ve uploaded the validation test case for the newly implemented boundary conditions. The results obtained with the different boundary conditions are presented in terms of the log-law profiles and velocity shift, confirming the findings reported in the literature. |
|
Great, can you add regression tests to *_regression.py scripts? |
| su2double limiter = a1*Solution(iPoint,1) / (F2(iPoint)*vorticity_mag + EPS); | ||
| limiter = min(1.0, limiter); | ||
| SST_Limiter(iPoint) = limiter; |
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.
@marcosch27 can you leave this for another PR please?
We already use a lot of memory, especially for adjoint, so I'm not keen on adding more storage just to output values.
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.
Ok, that's clear, I've removed all the changes related to the SST limiter output.
39274fc to
26ce36f
Compare
pcarruscag
left a comment
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.
Thank you for the tests, I think it's good to go after these minor comments.
| % Monotonic Upwind Scheme for Conservation Laws (TVD) in the turbulence equations. | ||
| % Required for 2nd order upwind schemes (NO, YES) | ||
| MUSCL_TURB= NO | ||
| % | ||
| % Slope limiter (VENKATAKRISHNAN, MINMOD) | ||
| SLOPE_LIMITER_TURB= VENKATAKRISHNAN | ||
| % | ||
| % Time discretization (EULER_IMPLICIT) |
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.
Can you cleanup the unused/default options please? Take a look at our other config files to see what I mean.
| % Monotonic Upwind Scheme for Conservation Laws (TVD) in the turbulence equations. | |
| % Required for 2nd order upwind schemes (NO, YES) | |
| MUSCL_TURB= NO | |
| % | |
| % Slope limiter (VENKATAKRISHNAN, MINMOD) | |
| SLOPE_LIMITER_TURB= VENKATAKRISHNAN | |
| % | |
| % Time discretization (EULER_IMPLICIT) | |
| MUSCL_TURB= NO |
| % Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG, | ||
| % BARTH_JESPERSEN, VAN_ALBADA_EDGE) |
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 no longer put the lists of options in all configs because then if we remove or add an option everything is out of date.
| % Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG, | |
| % BARTH_JESPERSEN, VAN_ALBADA_EDGE) |
| % Multi-Grid Levels (0 = no multi-grid) | ||
| MGLEVEL= 0 | ||
| % | ||
| % Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE) | ||
| MGCYCLE= V_CYCLE | ||
| % | ||
| % Multi-grid pre-smoothing level | ||
| MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) | ||
| % | ||
| % Multi-grid post-smoothing level | ||
| MG_POST_SMOOTH= ( 2, 2, 2, 2) | ||
| % | ||
| % Jacobi implicit smoothing of the correction | ||
| MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) | ||
| % | ||
| % Damping factor for the residual restriction | ||
| MG_DAMP_RESTRICTION= 0.8 | ||
| % | ||
| % Damping factor for the correction prolongation | ||
| MG_DAMP_PROLONGATION= 0.8 |
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.
None of this is used if the level is 0, etc.
| % Case description: Turbulent flow over flat plate with zero pressure gradient % | ||
| % Author: Thomas D. Economon % | ||
| % Institution: Stanford University % | ||
| % Date: 2011.11.10 % | ||
| % File Version 5.0.0 "Raven" % |
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.
You can probably grab and modify our most recent config for a flatplate to make it easier to cleanup the files
| nodes->SetSolution(iPoint,solution); | ||
| LinSysRes.SetBlock_Zero(iPoint); | ||
|
|
||
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.
TestCases/serial_regression.py
Outdated
| # FLAT PLATE, ROUGHNESS BC KNOPP SST | ||
| turb_flatplate_sst_roughBCKnopp = TestCase('turb_sst_flatplate_roughBCKnopp') | ||
| turb_flatplate_sst_roughBCKnopp.cfg_dir = "rans/flatplate/roughness/bc_knopp" | ||
| turb_flatplate_sst_roughBCKnopp.cfg_file = "turb_SST_flatplate_roughBCKnopp.cfg" | ||
| turb_flatplate_sst_roughBCKnopp.test_iter = 10 | ||
| turb_flatplate_sst_roughBCKnopp.test_vals = [10.000000, 0.053020, -3.454853, -0.684543, -0.886080, 2.140376, 1.043068, 4.808919, -0.203494, 0.053645] | ||
| test_list.append(turb_flatplate_sst_roughBCKnopp) | ||
|
|
||
| # FLAT PLATE, ROUGHNESS BC AUPOIX SST | ||
| turb_flatplate_sst_roughBCAupoix = TestCase('turb_sst_flatplate_roughBCAupoix') | ||
| turb_flatplate_sst_roughBCAupoix.cfg_dir = "rans/flatplate/roughness/bc_aupoix" | ||
| turb_flatplate_sst_roughBCAupoix.cfg_file = "turb_SST_flatplate_roughBCAupoix.cfg" | ||
| turb_flatplate_sst_roughBCAupoix.test_iter = 10 | ||
| turb_flatplate_sst_roughBCAupoix.test_vals = [10.000000, 0.053252, -3.575414, -0.761810, -0.998912, 2.003238, 0.907276, 4.807309, -0.197354, 0.051349] | ||
| test_list.append(turb_flatplate_sst_roughBCAupoix) |
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.
Move a couple of these tests to parallel_regression, please, so that all actions take more or less the same time.
| WALL_ROUGHNESS = (wall, 400e-6) | ||
| KIND_ROUGHSST_MODEL = WILCOX2006 | ||
| MATH_PROBLEM= DIRECT | ||
| RESTART_SOL= NO |
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.
You are adding restart files to the testcases repo, so the cases should probably be restarted? (which is good to track converged values instead of just a few iterations)
| RESTART_SOL= NO | |
| RESTART_SOL= YES |
| with: | ||
| # -t <Tutorials-branch> -c <Testcases-branch> | ||
| args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} | ||
| args: -b ${{github.ref}} -t develop -c feature_turb_flatplate_SST_RoughBCs -s ${{matrix.testscript}} |
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.
Remember to revert this to develop
Proposed Changes
Hello everyone,
This PR is one of two contributions resulting from my Master’s Thesis.
In this PR, I’ve added new roughness boundary conditions for the SST turbulence model, based on the approach described in this paper by Aupoix.
The attached PDF includes documentation as well as validation results for a fully turbulent flat plate test case. If needed, I can add a validation test case to the SU2 suite.
Please let me know if any modifications are needed.
Related Work
PR Checklist
pre-commit run --allto format old commits.