
[Sponsors] 
April 24, 2016, 08:46 
Wall function usage

#1 
New Member
Gerd
Join Date: Nov 2015
Posts: 3
Rep Power: 3 
Since the documentation on the use of wall functions (or BCs for turbulence models in general) in OpenFOAM is rather small I tried to write up a little summary of what is posted in the internet (for kEpsilon, kOmegaSST & SA).
As this may also be interesting to other people and I would be interested in feedback, please find the summary below: Basics: If the grid near the wall is fine enough (~y+<1 everywhere and at least 45 nodes below y+=5) wall functions are not needed. For kEpsilon a lowRe version is required, SA and kOmegaSST should be applicable also for low Re numbers (though this is under discussion for the OpenFOAM implementation: http://www.cfdonline.com/Forums/ope...penfoam2.html). For coarser grids (30<y+<100) wall functions exploit the universal logarithmic wall law to model the transition from the laminar nearwall flow to the fully developed turbulent flow. Basically the type of wall function is chosen in the nut file by the nutxxx wall functions:  nutWallFunction (seems to be the most basic wall function without further requirements): highRe wallfunction based on k.  nutkWallFunction (standard for kEpsilon/kOmega, probably requires an equation for k...): nutkWallFunction sets the turbulent viscosity in the first node point based on the logarithmic law ( based on the turbulent kinetic energy close to the wall)  nutUWallFunction: in comparison to nutkWallFunction this wall function calculates yPlus based on the velocity close to the wall (not k)  nutUSpaldingWallFunction (standard for SA turbulence model, called nutSpalartAllmarasWallFunction in earlier version, original reference is doi:10.1115/1.3641728): continuous wallfunction which should cover the complete y+ range from O(1) to somewhere of O(10). Might be the best choice (together with low Re kEpsilon, kOmegaSST or SA, when y+ varies for different parts of the wall.  nutLowReWallFunction (code comment: "Sets nut to zero, and provides an access function to calculate y+." ): Dummy wall function required for the calculation of yPlusRAS in simulations which resolve the near wall flow (however, there are varying opinions about this in the internet). For epsilon, omega, k, ... one uses the corresponding wall functions exist:  epsilonWallFuncion for epsilon ( (fixed value e=0 or better e=1e8(?) for lowRe calculations): calculate (for each timestep) the first grid point value by using an algebraic expression derived from the classical logarithmic lawof the wall approach  kqRWallFunction for k, q, R in code: Boundary condition for turbulence k, Q, and R when using wall functions. Simply acts as a zero gradient condition. (appears to be applicable down to yPlus~1, but one should use a fixed value with k=0 or a very small value for y+<1)  omegaWallFunction for omega; Not really a wall function but the b.c. defined by Menter for Omega, i.e. should be used always for kOmega model, independent of y+) omegawall=60*nu/(beta*y^2), with nu=kinematic viscosity at the wall, beta=0.075 and y=normal distance between the first fluid node and the nearest wall> very large value for omega) The "value" which is specified for the wall functions is only an initial conditions To check my understanding I did some comparisons of simulations with OF 2.4/3.0 to Wieghardt's flat plate Cf measurements: 

August 19, 2016, 08:27 

#2 
Senior Member
Join Date: Mar 2015
Posts: 210
Rep Power: 4 
Hello Gerd,
thank you for this summary. However, I do not understand the legends of your plots. Could you explain or correct them respectively? Best regards, Kate 

August 19, 2016, 08:50 

#3 
Member
benoit paillard
Join Date: Mar 2010
Posts: 56
Rep Power: 8 
Hi all,
Very interesting topic. Here are my findings for steady NACA 0012 with various turbumence models and simpleFoam 2.4:  The usual y+=1 value is actually around 10 for me with 1/7th power law.  I could not obtain acceptable results with y+ above 10 with wall functions. The attached graph illustrates these results. 

August 19, 2016, 09:02 

#4  
Senior Member
Join Date: Mar 2015
Posts: 210
Rep Power: 4 
Hello Benoit,
this is interesting stuff. You wrote you used various turbulence models. Which ones did you use actually? The 1/7 power law is for determining the turbulent boundary layer thickness as far as I know. I think I am not getting it in this context. How do you obtain your y+ values? Best regards, Kate Quote:


August 22, 2016, 06:44 

#5 
Member
benoit paillard
Join Date: Mar 2010
Posts: 56
Rep Power: 8 
Hi Kate,
The model used were kepsilon, komega SST and SA in their default OF 2.4 implementations. kepsilon was a bit off and the other were ok. Regarding the 1/7th law, you're right, sorry for the wrong wording. The x axis in the graph shown are the target y+ from which I compute my first cell height. The actual value after simulation is somewhat lower but similar, for instance 8 instead of 10. I'm more interested in this approach since I need to know robustly how accurate I am in automatic optimization for instance, without the need to manually check each run. I am quite interested to know if someone has had better results with wall functions and large y+. It is quite possible that my poor results comes from a mistake from my side. 

August 22, 2016, 16:01 

#6 
New Member
Gerd
Join Date: Nov 2015
Posts: 3
Rep Power: 3 
Hi Kate!
In my simulation I tried different values for the inlet boundary condition of k/epsilon/omega/nut. In the plots I give the curves for the simulations with different turbulent influx to show that this causes a certain variation but I did not add the actual numbers I used. That means the three curves for kepsilon only differ in the turbulence influx but have the same y+ of around 70, the same is true for the first three curves in the komega results (black, light blue and green) and the black and blue curve in the SA plot. In the SA plot I also compare simulations where the "Ashford correction" (a parameter for this model) is switched on and off. Does this help you? If you are interested I can also look up the actual numbers I used for the turbulence influx. Best regards 

August 22, 2016, 16:05 

#7  
New Member
Gerd
Join Date: Nov 2015
Posts: 3
Rep Power: 3 
Hi Benn,
if you are interested we can exchange our input files, to check whether something looks faulty. Best regards Gerd Quote:


September 5, 2016, 05:25 

#8  
Senior Member
Join Date: Mar 2015
Posts: 210
Rep Power: 4 
Quote:
Hello Gerd, thanks for the explanation. So the main result from you study is that one should vary the turbulent inflow parameters to see what influence they have on the simulation. I agree. The actual numbers alone are not so important for me, but the method of how you chose these numbers would be interesting. Personally, most of the time, I make a first estimation using the CFDOnline Wiki articles. Best regards, Kate 

September 5, 2016, 05:32 

#9  
Senior Member
Join Date: Mar 2015
Posts: 210
Rep Power: 4 
Quote:
Hello Benoit and thanks for your answer! Which method do you use to get the actual y+ values after the simulation? Moreover, it is my understanding that wall functions should only be used for y+ > 30. Do you agree on that? Also it would be interesting at which AoA you are simulating? Best regards, Kate 

September 6, 2016, 04:46 

#10 
Member
benoit paillard
Join Date: Mar 2010
Posts: 56
Rep Power: 8 
yPlusRAS or simpleFoam postProcess on latest versions is what I use to get the actual y+ value.
The results shown are for AoA = 10°. My understanding was the same as your, until I tried it, and got the very unexpected graphs shown before. 

September 8, 2016, 08:21 

#11  
Senior Member
Join Date: Mar 2015
Posts: 210
Rep Power: 4 
Quote:
What Reynolds number do you have in your case? Maybe you have a pure laminar bl along until the trailing edge? Best regards, Kate 

September 8, 2016, 08:37 

#12 
Member
benoit paillard
Join Date: Mar 2010
Posts: 56
Rep Power: 8 
Hi Kate,
Detailed results on this topic can be found here : http://ntrs.nasa.gov/archive/nasa/ca...9880002254.pdf The curves I sent are for Re=1e6, so I doubt laminar BL has anything to do with it. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Enhanced Wall Treatment  paduchev  FLUENT  19  April 10, 2016 09:57 
whats the cause of error?  immortality  OpenFOAM Running, Solving & CFD  11  April 22, 2014 12:32 
Radiation interface  hinca  CFX  15  January 26, 2014 18:11 
channelFoam for a 3D pipe  AlmostSurelyRob  OpenFOAM  3  June 24, 2011 13:06 
Problem with rhoSimpleFoam  matteo_gautero  OpenFOAM Running, Solving & CFD  0  February 28, 2008 07:51 