-
Notifications
You must be signed in to change notification settings - Fork 848
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
Update CTurbSSTSolver.cpp to fix bug on calculating MuT #2453
Update CTurbSSTSolver.cpp to fix bug on calculating MuT #2453
Conversation
Yep, setStrainMag updates the flownodes only. Can you update the regression tests? |
A flatplate case is listed below. |
@@ -230,7 +230,7 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai | |||
const su2double dist = geometry->nodes->GetWall_Distance(iPoint); | |||
|
|||
const su2double VorticityMag = max(GeometryToolbox::Norm(3, flowNodes->GetVorticity(iPoint)), 1e-12); | |||
const su2double StrainMag = max(nodes->GetStrainMag(iPoint), 1e-12); | |||
const su2double StrainMag = max(flowNodes->GetStrainMag(iPoint), 1e-12); |
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.
Have you looked for other uses of GetStrainMag to check if they are ok?
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 have checked the other part of code and they are all ok.
Here are the results from the nasa website. It looks like they also see a difference between SA and SST, maybe you can check if this corresponds to your results Our validation case is here: |
The case above is just the SU2 validation case, with a finer mesh. |
Are you confident that this is converging? Two orders of magnitude seems rather small, maybe this could explain the discrepancy you are observing? |
From the CD, I think the case has converged. |
Cool, I eagerly await the results! |
This also fixes an issue I found in #2446. Thank you! |
The case is not converging but stalling, this can also be a reason that drag is not going down. maybe reduce the cfl. |
Converging well or not, this was certainly a bug. |
Actually I know a little about that. |
ok, those results, especially Cf_x, look pretty convincing. What did you change? |
For updating regression tests, you will se a lot of cases that use the SST model that now have different results:
So you will need to change the 'stored' values in Testcases/parallel_regression.py, serial_regression.py, etc. with the 'computed' values. You can download the logfiles from github and use them to update the regression files. |
I use the config and mesh files in https://github.com/su2code/VandV/tree/master/rans/flatplate. |
Beautiful! |
I have tried a lot but I failed to do that. I am not very familiar with the Github process. Maybe someone more skilled can help with updating the regression files. |
I'll merge into another branch where we need to update tests for SST |
59f3561
into
su2code:fix_cornernode_normal
Proposed Changes
When calculating the turb viscosity MuT for the SST 2003 version, the variable StrainMag is needed. However, in the current code, we use the wrong CVariable class to get the StrainMag so that we only get 0. The turb variable class should be replaced by the flow variable class.

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.
pre-commit run --all
to format old commits.