
[Sponsors] 
November 1, 2010, 09:00 
Wrong calculation of nut in the kOmegaSST turbulence model

#1 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 11 
Hello all,
lately there were a few threads coming up in the forums (eg. http://www.cfdonline.com/Forums/ope...latplate.html or http://www.cfdonline.com/Forums/ope...behaviour.html) discussing an unusual behavior of the kOmegaSST turbulence model when using meshes that had near wall y+ values of 1 and below. While the kOmegaSST turbulence model was originally implemented in OpenFOAM for the use with wall functions, this implementation actually should also work (with satisfying accuracy) in the near wall regions without the use of any damping functions (as with many other turbulence model based on k and omega, see [1]). Also computations by the NASA show a very good behavior of the kOmegaSST turbulence model applied on very fine grids without the use of wallfunctions. To further investigate the uncommon behavior of the kOmegaSST model in OpenFOAM I tried to reproduce the aforementioned NASA flat plate test case. I used three different grids for this case:
The results for the skin friction coefficient can be seen in the first attachement. As already discovered by the member cboss in the thread http://www.cfdonline.com/Forums/ope...latplate.html , the grid independent solution for the skin friction coefficient (when using grids with a wall y+ of the order of 1) seems to be too high. This made me look deeper into the source code of kOmegaSST and I found the problem: The magnitude of the strain rate tensor is defined as [2] In OpenFOAM the function mag() calculates the magnitude of the strain rate tensor differently: (see programmer's guide) So the difference between these two methods is a factor of . In the production term G for the k equation of the kOmegaSST model in OpenFOAM this discrepancy is being considered by setting Code:
volScalarField S2 = magSqr(symm(fvc::grad(U_))); volScalarField G("RASModel::G", nut_*2*S2); [3], this factor is missing in turbulenceModels/incompressible/RAS/kOmegaSST.C, lines 240 and 392: Code:
nut_ = a1_*k_/max(a1_*omega_, F2()*mag(symm(fvc::grad(U_)))); Code:
nut_ = a1_*k_/max(a1_*omega_, F2()*sqrt(S2)); The correct calculation of nut requires the intruduction of the missing factor , to be consistent with OpenFOAM's calculation of the strain rate tensor magnitude: Code:
nut_ = a1_*k_/max(a1_*omega_, F2()*sqrt(scalar(2))*mag(symm(fvc::grad(U_)))); Code:
nut_ = a1_*k_/max(a1_*omega_, F2()*sqrt(scalar(2)*S2)); In the third attachement the wallnormal distribution of the dimensionless eddy viscosity for the original and the corrected kOmegaSST implementation can be seen at the location of x=0.97m. The original model clearly overpredicted the eddy viscosity at y>0.005m, while the corrected calculation of nut now yields results more closely to the reference data of the NASA calculations. So far I've only tested the incompressible version of the kOmegaSST model. I am not entirely sure if the same problem exists with the compressible kOmegaSST implementation  the source code looks a bit different, I have to take a deeper look at it some time. I hope, this little correction resolves the issues encountered when applying the kOmegaSST model to very fine meshes, fully releasing the power of OpenFOAM's new blended wall functions, making the kOmegaSST turbulence model applicable to a wider range of y+ values. Greetings, Felix. [1] WILCOX, David C.: "Turbulence Modeling for CFD", 3rd Edition, p. 178 [2] http://turbmodels.larc.nasa.gov/sst.html [3] http://cfd.mace.manchester.ac.uk/flo...SSTpaper.pdf 

November 1, 2010, 09:06 

#2 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 11 
Sorry about the transparent background of the attached PNG images. Here are the images with a white background.


November 5, 2010, 04:46 

#3 
New Member
Peter
Join Date: Aug 2010
Posts: 16
Rep Power: 9 
Hey! I found another post concerning this (#4 onwards):
http://www.cfdonline.com/Forums/ope...komegasst.html It is not a mistake in the implementation, the programmer just used another paper as reference 

November 11, 2010, 13:58 

#4 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 11 
Hey, Peter,
I searched through different Papers regarding the Menter SST turbulence model and couldn't find another definition of S other than there. Are you sure about that special paper with another definition of nut? It truely puzzles me, why just this definition was used in the implementation for OpenFOAM, when Menter's original definition of the stress limiter in the nut equation (like I stated above) leads to much better results (at least for wall bounded flows)? Greetings, Felix 

November 14, 2010, 16:58 

#5 
New Member
Peter
Join Date: Aug 2010
Posts: 16
Rep Power: 9 
Hi Felix,
unfortunately, I don't have the paper, so I can't tell you if the implemented model is consistent with the paper. You can find the name of the paper within the headerfile of the SSTcode: Menter, F., Esch, T. "Elements of Industrial Heat Transfer Prediction" 16th Brazilian Congress of Mechanical Engineering (COBEM), Nov. 2001 If you have a look on the topic I posted above, you will get more information, they were discussing the same problem, beginning with post number 4. For further information I suggest contacting Henry, the person who implemented the SSTmodel. He answered a lot of questions about this model in the topic posted above. Peter 

November 15, 2010, 05:08 

#6 
Member
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 10 
Hi Peter and Felix,
It seems that the issue has been corrected in the 1.7.x version last thursday. Commit: https://github.com/OpenCFD/OpenFOAM...f7a0b26d64265d 

February 8, 2011, 09:07 

#7 
Member
José
Join Date: Jan 2011
Posts: 73
Rep Power: 8 
Dear Felix,
I am running OpenFOAM 1.7.1 and I would like to include this change you mention on the first message of this thread in order to improve the drag coefficient calculation. But, to be honest I don´t know how to do it (I am running it from a cluster where I don´t have the permission of modifying files, so I should do my own solver by copypasting files and recompiling). Could you explain me how? Or maybe there ir any other thread where this is explained... Thank you for your attention. Regards, José 

February 8, 2011, 09:10 

#8 
Senior Member

José
it is fixed in 1.7.1 (read last post)
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

February 8, 2011, 10:17 

#9 
Member
José
Join Date: Jan 2011
Posts: 73
Rep Power: 8 
Hello!
I checked on the file kOmegaSST.C in the cluster whre I am working it was not fixed there... :S. 

February 8, 2011, 11:02 

#10 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 11 
Hello, José,
the kOmegaSST turbulence model was fixed in OF 1.7.x which is being regularly updated and realeased via git. OF 1.7.1 doesn't have the newest changes and additions that 1.7.x has. To change kOmegaSST without actually modifying the original files you probably have to compile your own library and put it into the $FOAM_USER_LIBBIN directory. This tutorial will help you: http://openfoamwiki.net/index.php/Si....28OF1.4.1.29 Hint: you can use the source files of the gitrepository if you like: https://github.com/OpenCFD/OpenFOAM.../RAS/kOmegaSST Greetings, Felix. 

February 14, 2011, 11:18 

#11 
Member
José
Join Date: Jan 2011
Posts: 73
Rep Power: 8 
Hello Felix,
I hope everything is ok. I am still working on studying flow around airfoils and I would like to apply any transition model for the boundary layer. I have read on some other threads that there is not any of these models implemented in OpenFOAM yet. is it true? or does it exist any? If not...do you know if the transition point can be fixed somehow in OpenFOAM? Thank you very much for your help. Regards, José 

February 15, 2011, 06:01 

#12 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 11 
Hello, José,
there currently is no possibility to simulate laminarturbulent transition within the standard distribution of OpenFOAM. Defining tripterms or something like that is not possible, too, since this is rather challenging on unstructured meshes. I was working on an implementation of the gammaReTheta transition model developed by Langtry and Menter and it looks promising. The implementation still needs a lot of testing which I haven't found the time for lately, so it's status is currently frozen. You might be lucky and find someone else who implemented and fully verified a transitional model in OpenFOAM. Nonetheless these nonlocal transition models are pretty sensitive to freestream turbulence intensities (FSTI). If you're lacking data of FSTI, the location of transition onset pretty much relies on guesswork which I am not a real big fan of, to be honest. In a nutshell: unfortunately it's not possible to simulate transiton with OF 1.7.1. (except for DNS, of course) Greetings, Felix. 

February 17, 2011, 04:50 

#13  
Senior Member

Quote:
I spend a lot of time in the past in trying to simulate transitional flows over airfoils with SST, so I have some freestream turbulence data and airfoils Cf measurements that could help in developing your transitional model. If you want, you can share your pieces of code, and I can try to validate it. Maybe it could be an opportunity to have a transitional model in OF! Ivan 

February 23, 2011, 10:36 

#14 
Member
Join Date: Oct 2010
Location: Naples
Posts: 50
Rep Power: 9 
Hello,
I am preparing my thesis on the possibility of implementing a transitional model for OF. So I can add to try to test your file, felix. Also would you give to me a great help! 

February 23, 2011, 11:35 

#15 
Member
José
Join Date: Jan 2011
Posts: 73
Rep Power: 8 
Dear Felix and "salvoblack",
I am doing my thesis about a study of thick airfoils and based on some results obtained with CFX I need to take into account transition if I want to get good/acceptable results. Felix, if you have something already implemented I could try to apply it on my cases and of course send you the results I would get so you could use them as part of your validation if it works. I know this is the easiest way for me and that maybe it does not sound good for you. But, anyway, I was thinking on starting to change the komega SST turbulence model on Monday next week to apply this transition by fixing the transition point. So I had thought on fixing the value of nut to 0 in the values inside what it should be the laminar boundary layer. Then, I would apply some kind of smoothing between the values of nut between this laminar boundary layer and the turbulent one. My problem here it comes, I am new in making changes in OpenFOAM´s code and I would like to ask you something. How to select these cells where I want to fix this nut to 0? (let´s say they will be from the x coordinate where the airfoil start to the one where transition begins, and for vel=0 to vel=0.99*vel_fluid). Maybe you can send me an example of such a code, because I understand that explaining it may be cumbersome. If you don´t want to send any of these through the forum, I can always give you my email. Thank you very much for your help. I really look forward to reading your answer. Regards, José 

February 23, 2011, 12:48 

#16 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 11 
Hello, everybody,
I didn't expect there to be such a high demand after the transitional model I tried to implement. It's the gammaReTheta turbulence model based upon the komega SST model and two additional transport equations to predict laminarturbulent transition. Since transition is a highly complicated phenomena, the model strongly depends upon correlations and even minor changes can drastically change the model's predictive behaviour. I strongly recommend to you to read the dissertation of Robert Langtry ("A CorrelationBased Transition Model using Local Variables for Unstructured Parallelized CFD codes", Stuttgart University) before using my implementation. It's important to understand the physics of this turbulence model! I only tested the model on different test cases available through the ERCOFTAC database. These cases were all flat plate test cases with zero pressure gradient and different freestream turbulence intensity levels. I attached plots of skin friction coefficient for three different cases I calculated (T3A, T3AM, T3B). The results are okay but there seem to be problems with too high Cfvalues in the laminar and turbulent regime, especially visible for the T3AM and T3B cases. While other authors had similar problems, I think there's still something wrong with my implementation or how OF handles wall shear stresses. I doublechecked everything but I came to no success and for now my time for checking the model is up. Long story short: I will upload the code tomorrow. BUT it is unfinished and untested. I did no calculations for nonzero pressure gradient cases and I didn't simulate anything else than flat plates! Please don't expect to be more accurate with this model  it could even be that you get worse results. Please bear this warning in mind, this turbulence model is powerful but no magic bullet. Anyway, if you stumble upon something which might improve the model's performance in OF, feel free to share your ideas. Greetings, Felix. 

February 23, 2011, 14:01 

#17 
Member
José
Join Date: Jan 2011
Posts: 73
Rep Power: 8 
Dear Felix,
Thank you for your information! I look forward to try your code! I will tell you what I will get with it! Regards, José 

February 24, 2011, 07:52 

#18 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 11 
Hello, everyone,
I posted the code in this thread: http://www.cfdonline.com/Forums/ope...nalflows.html Please continue to discuss this issue there since this thread originally wasn't about simulating transition. Greetings, Felix. 

March 9, 2011, 14:33 

#19 
Member
Timo K.
Join Date: Feb 2010
Location: University of Stuttgart
Posts: 66
Rep Power: 9 
Hello all,
I'm running a simulation of a standard guide vane. When I use the old version of the SSTmodel (without this factor sqrt(2) in nut, red curve), my simulation converges very well, but the loss in total pressure is more than 10% higher than the same simulation with a commercial code (CC). So inserting this factor like in the current version leads to a very unstable result, green curve. But this is closer to the result of the CC. So I've found in the help of the CC or also in this newer paper (okay about SAS) "Development and Application of SSTSAS Turbulence Model in the DESIDER Project"; Egorov, Menter; 2008 that the production term in the omegaequation is not like in OF: Code:
gamma(F1)*2*S2 Code:
gamma(F1)*omega_/k_*nut_2*S2 But running a diffuser with this last version (with sqrt(2) and modified omegaequation) I don't get the expected separation. Is there a switch between the "version", like depending on the pressure gradient or something like that? Has anybody experience with this or any comments? Thanks in advance. Cheers 

March 15, 2011, 09:24 

#20 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 11 
Hello, Timo,
I checked the paper and couldn't find any info about how they calculate the eddy viscosity. Do they apply the usual formula, applying a stress limiter (like in OF)? or do they use a formulation without the application of a stress limiter term? If it's the latter case, then both omega source term definitions in OF and your commercial code are equal. Otherwise, this seems to me like the omega source term implementation of the Wilcoxkomega turbulence model (see http://turbmodels.larc.nasa.gov/wilcox.html ). Since both turbulence models are related, a deviation of Menter's formulation shouldn't be too much of an issue. When using the original implementation in OF, the omega source term is everywhere equal to . With your implementation it is additionally dependent on wall distance  viz. close to the wall (where F2=1) it is approx. , further away from the wall it is the same like in the original implementation. Maybe this behavior improves your numerical stability. I currently don't have the time to go deeper into it, sorry. So much about the theortetical stuff... what I don't understand is what you mean by "unstable result, but closer to the result of the cc". If you have a result which is actually quite close to the results of the cc (that don't neccesarily have to be correct!) then why did you change the code? I don't understand the term unstable  unstable simulations usually lead to unphysical results or crashes. Regarding the separation point: is this the same case or were you speaking about two different cases? Is separation better predicted when not using your modification? Couldn't this be a shortcoming of the SST model in general? Of course does your modification alter the turbulence model's capabilities. It's still a model (amongst the two equation turbulence models one with the most closure coefficients!), so it's difficult to get it to perform nicely for every testcase. Sorry about these pretty general answers, but I can't be more specific without more knowledge about grids, numerical schemes, fluid properties etc. Greetings, Felix. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Use of k omega turbulence model  john_w  OpenFOAM Running, Solving & CFD  2  September 22, 2009 05:15 
Discussion: Reason of Turbulence!!  Wen Long  Main CFD Forum  3  May 15, 2009 09:52 
Fan heater model: what turbulence source to use?  andy20  Main CFD Forum  0  March 2, 2008 13:46 
Advanced Turbulence Modeling in Fluent, Realizable kepsilon Model  Jonas Larsson  FLUENT  5  March 13, 2000 04:27 