-
Notifications
You must be signed in to change notification settings - Fork 849
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
Fix SA and SST wall functions #1204
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.
Hi, just a few things from scrolling through the code. But I like that you stay close to the given paper and also sometimes give equation numbers. Otherwise there is still a lot of commented code but that's what WIP is for ;)
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.
Yey wall functions. I know it is still WIP but few comments below.
du_gust_dy = WindGustDer_i[1]; | ||
//du_gust_dz = WindGustDer_i[2]; | ||
du_gust_dt = WindGustDer_i[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.
kudos for picking up "feature requests" from CFD online 👍
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 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.
Did you ever check if the 3D version worked? Otherwise we gained deadcode for no reason...
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
…to fix_wallfunctions
update master
I updated the code based on your comments. I have to rerun the validation test case that I have to see if it still matches with the experimental data. I also have to check the compressible vs incompressible implementation. |
Thanks @bigfooted, I fixed the conflicts (albeit not very well judging from the broken compilation) and left some more comments some more important than others. |
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
refvel Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
const bool Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
spaces Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
/*--- Wall shear stress values (wall functions) ---*/ | ||
|
||
numerics->SetTauWall(nodes->GetTauWall(iPoint), | ||
nodes->GetTauWall(jPoint)); |
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 add or modify some test cases (comp and incomp) I will need to modify the vectorized numerics to support this and it would be helpful to have a good reference.
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, I have the flat plate test case for this (Schubauer & Klebanoff), will add this
TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg
Outdated
Show resolved
Hide resolved
SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke, Mean_Laminar_Viscosity, Mean_Eddy_Viscosity); | ||
SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke, | ||
Mean_Laminar_Viscosity, Mean_Eddy_Viscosity); | ||
if (config->GetQCR()) AddQCR(nDim, &Mean_GradPrimVar[1], tau); | ||
if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall); |
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've been looking into making the wall functions compatible with the vectorized classes.
I got confused, however, because it looks like the tau wall was not considered in the incompressible viscous numerics.
But your validation results looked good... So, either this makes them better, or it is not needed (here and in the other 2 viscous classes that use it).
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 #1120 @EduardoMolina also added the "tau wall logic" to the incompressible class but he changed the implementation in the 3 classes to only consider tau wall if only one of the two points has it.
Which means that for edges connecting two wall points tau wall is not considered... might be worth re-running some tests?
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 think in the case of RANS wall functions, the tauwall values that you mention are always overwritten by the tauwall computed at the end of CIncNSSolver::SetTauWall_WF(..). The function addtauwall is used only for the LES implementation.
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.
Tau wall is computed in that function as part of the preprocessing, to then be used in the numerics, I don't see any other place in the code where the computed tau wall can influence the solution.
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 that test case to go I guess.
SU2_CFD/src/solvers/CIncNSSolver.cpp
Outdated
notConvergedCounter++; | ||
cout << "Warning: Y+ did not converge within the max number of iterations!" << endl; |
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 was trying this on the CRM and these messages were showing up a lot, so I made some changes to print only one message with totals.
I also copied the "safe values" you had for the compressible version.
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 Pedro, Yes, they are present only for the first 10 iterations or so usually. Maybe we can introduce verbosity levels for such messages.
SU2_CFD/src/solvers/CNSSolver.cpp
Outdated
if (Y_Plus_Start < 5.0) { | ||
cout << "skipping stress due to wall model" << endl; | ||
continue; | ||
if (Y_Plus_Start < Y_Plus) { | ||
skipCounter++; | ||
} | ||
|
||
while (fabs(diff) > tol) { | ||
else while (fabs(diff) > tol) { |
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 also made this logic the same as the incomp solver, it seemed that certain quantities would not be computed otherwise.
Hopefully this was the right thing to do and not the opposite.
Thanks @pcarruscag and @TobiKattmann ! I will add the testcase and some small things in a new PR! |
Proposed Changes
Give a brief overview of your contribution here in a few sentences.
Fixes (I think) the current implementation of the wall model. Some work still needs to be done, regarding compressible vs incompressible and validation of heated walls.
Related Work
Resolve any issues (bug fix or feature request), note any related PRs, or mention interactions with the work of others, if any.
related to #1155
Also took some ideas from feature_WallModelLES
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.