-
Notifications
You must be signed in to change notification settings - Fork 843
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
[WIP] Inconsistencies and improvements to SST model #2329
base: develop
Are you sure you want to change the base?
Conversation
- Added production terms to SST
- Added user-defined production limiter constant for TKE
- Updated boundary conditions as in TMR page
Common/include/CConfig.hpp
Outdated
nPrandtl_Lam, /*!< \brief Number of species | ||
addDoubleOption("FREESTREAM_TURB2LAMVISCRATIO", TurbIntensityAndViscRatioFreeStream[1], 10.0); Prandtl number. */ |
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.
Was this intentionally commented, or...? If it is used, I guess this should go to line 872
nPrandtl_Lam, /*!< \brief Number of species | |
addDoubleOption("FREESTREAM_TURB2LAMVISCRATIO", TurbIntensityAndViscRatioFreeStream[1], 10.0); Prandtl number. */ | |
nPrandtl_Lam, /*!< \brief Number of species laminar Prandtl number. */ | |
addDoubleOption("FREESTREAM_TURB2LAMVISCRATIO", TurbIntensityAndViscRatioFreeStream[1], 10.0); /*!<\brief Freestream mu_turb to mu_lam viscosity ratio */ |
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.
This is just a wrong copy-paste from me. It should not be there in the first place.
Great contribution, Thanks @rois1995 ! |
If you are looking into robustness aspects too you should get in touch with @emaberman and @YairMO, seems like they have some good ideas and between the free time of 3 people a lot more can get done :) |
Hi, Regarding the cross-diffusion term (CD) that appears in Omega source term (residual). The SST model (1994/2003) is a high-Reynolds-number model. Namely, It can not predict correctly the sub-layer region (especially the correct profile of the TKE). Therefore, only a positive contribution is required. Moreover, since the SST model was design as a k-w and k-epsilon blending, the CD term "belongs" only to the k-epsilon "branch", that is why the CD term include the factor "1-F1". However, it may happen, that the factor "1-F1" is not a 100% safe guarantee. It may happen that "1-F1" is not zero in region where the CD term is negative (this happen due numerical errors). To avoid such a situation, it is a good idea to clip the CD term with zero. Otherwise, severe numerical robustness issues may rise. |
- Given option for cross diffusion limiting in W residual
Hi, The use of an Omega production limiter (about the cross-diffusion term) is correct for low-Reynolds-number (LRN) models (the approach described by Peng et al. is very naive; there are other more rigorous treatments). For high-Reynolds-number (HRN) models, the clipping should be zero, keeping the cross-diffusion term positive; thus, the current implementation is correct. Indeed, it is not exactly as it appears in Menter's original publication. The factor (1-F1) aimed to promise that the cross-diffusion term will be activated only outside the boundary layer, where it is positive (the cross-diffusion term switches its sign deep inside the boundary layer). This was also recognized by Peng et al. (first paragraph above Eq. 17). However, it may happen that the factor (1-F1)=1 where the cross-diffusion term is negative. Usually, it may happen at the wake, very near the airfoil trailing edge, where the upper and lower boundary layers merge. It is due to the imperfection of the F1 function. To summarize, the current implementation is correct, and it is perfect for HRN models. |
For the sake of clarity, "current implementation" refers to the current treatment of the production code |
What YairMO is saying, is that allowing negative cross diffusion values is incorrect for high Reynolds models and should not be an option, this is a fix used for low Reynolds models only |
Hi @YairMO, Hi @emaberman , thank you very much for your comments. I haven't found any suggestion in literature to clip to only positive values the cross-diffusion term in the w-equation. I understand that it might be more robust, but it is not the standard implementation of the SST model, which is the first thing that we need to achieve. Only then we can build on top of that to improve the robustness of SU2. Nevertheless, I tried the SWBLI test case and I compared the results across 6 different combinations: 1- develop branch, no changes When my branch is used, then the changes to the supersonic inlet BC are already in place. I haven't achieved convergence with 1, 2 and 3. More precisely, 1 diverged right away (after 30 iterations), while 2 and 3 gave "FGMRES - Orthogonalization Failed" after 900ish iterations. Here you can see the residuals for the different combinations. Unfortunately I will be busy with the AIAA Conference next week, thus I don't know how much I will be able to work on this. The next test case will be the 2D airfoil near-wake from TMR. |
Hi rois1995, First of all, enjoy your time in Las Vegas. Any paper that you are presenting? As for our discussion about the cross-diffusion term, I've emailed the "source" (Menter). I believe he will make it clear. |
Sure, thank you for checking! Regarding the SWBLI case, if I understood correctly, you have used your code with NK solver from the start and you changed the number of linear solver iterations, right? Can you also try with SST or is your implementation different only for SA? |
Yes, your understanding is correct. |
It seems that yoru implementation affects also the SST model, is it correct? Nevertheless, huge improvement wrt both this branch and develop branch results (density residual stagnates around -10)! |
Yes, it also affects the SST model. Thanks |
Hi Rois1995, I have permission to share the VFE-2 grid; please send me your private email. |
That's perfect, thank you! [email protected] |
I have a few updates. I found out that most of my FGMRES problems in this branch where related to the fact that I was using single precision for the linear system. You can see it in this graphs for the residuals of Rho. The first two curves are in mixed-precision and they stop long before reaching the minimum residual required due to divergence of the linear solver. Moreover, it seems that the 2003 model here implemented (which, simply put, considers the full reynolds stress tensor for the computation of the production of k and always considers k in the stress tensor and in the thermodynamic variables) has faster convergence and increases the recirculating zone (maybe due to the reduction of turbulence kinetic energy) which is a feature that has also been seen in [DOI:10.1017/aer.2020.93]. There are some differences between the use of the TMR boundary conditions and the ones used before. The results improve with respect to the develop in the prediction of the SFC distribution, which has results completely off from the V&V page of SU2 I may keep on checking if the implementation of the v2003 model is correct or not by searching for other test cases (probably coming from DOI:10.1017/aer.2020.93). |
How can one switch between single or double precision? |
when you execute the meson command use the flag -Denable-mixedprec=true |
I am trying to catch up on the developments in this PR but I've lost the overview. Are there still issues that we need to figure out? It looks like convergence is now recovered and results look OK? |
The 2003 version of SST seems to be working fine. However, the 1994 version is not. I get Mach 7 values on the upper symmetry boundary even on the coarser mesh. I am trying to understand what is happening. |
Maybe a stupid question, but I noticed that if I print the coordinates of the i-th point in the CTurbSSTSolver class and the problem is 2D, then the z-coordinate is not 0 but has random values. Does this affects anything in the code or it is not important since the problem is 2D? |
The z coordinate is not allocated for 3D, so you are either reading out of bounds or reading the x or y value from somewhere else. |
That's what I thought, thanks for confirming it. |
One more thing: should I change the naming scheme for the model version of SST? As it is now, the naming scheme is V+model version but the NASA TMR site says to use the V only for the vorticity form of the production term. Should we remove the V then, or maybe set it as lower case? This will break all of the configs, no problem for me to go through them all and change it though. |
Chris Rumsey made a tremendous effort to standardize popular RANS turbulence models (via the TMR website). |
No changes that break backward compatibility. |
That's what I thought. |
Common/include/CConfig.hpp
Outdated
@@ -865,7 +865,7 @@ class CConfig { | |||
nMu_Temperature_Ref, /*!< \brief Number of species reference temperature for Sutherland model. */ | |||
nMu_S, /*!< \brief Number of species reference S for Sutherland model. */ | |||
nThermal_Conductivity_Constant,/*!< \brief Number of species constant thermal conductivity. */ | |||
nPrandtl_Lam, /*!< \brief Number of species laminar Prandtl number. */ |
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 original description was correct, for species transport we can have a Prandtl number for each of the species
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.
Yeah I do not recall changing that but for sure it was wrong in my branch. Corrected, thanks!
su2double Omega_Freestream = 10 * ModVel_FreeStream / config->GetLDomain(); | ||
Tke_FreeStream = Omega_Freestream*(Viscosity_FreeStream*config->GetTurb2LamViscRatio_FreeStream())/Density_FreeStream; | ||
} else if (config->GetSSTParsedOptions().sust) { | ||
su2double Omega_Freestream = 5*ModVel_FreeStream/config->GetLength_Reynolds(); |
Check notice
Code scanning / CodeQL
Unused local variable Note
Co-authored-by: Nijso <[email protected]>
Proposed Changes
Hi everyone,
I have found some inconsistencies with respect to the literature on the implementation of the Menter's SST model. I would like to use this branch as test bench for any corrections/improvements made to the SST model.
Implementation errors found:
positive portion of the cross-diffusion term in Eq (A2)" pag. 1604. Moreover, a clipping has been introduced for large negative values of this term, as suggested in Peng, Shia-Hui, Peter Eliasson, and Lars Davidson. "Examination of the shear stress transport assumption with a low-Reynolds number k-omega model for aerodynamic flows." Eq 17.
Changes to SST model proposed:
I've seen the proposed changes to the lower limits of k and w in #2323 and I tried implementing it in my branch. However, if the implementation proposed in the respective PR is preferred then I will change mine.
Related Work
#2323 #1851
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.