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

#1 
New Member
Gerd
Join Date: Nov 2015
Posts: 7
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: 244
Rep Power: 5 
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: 60
Rep Power: 9 
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: 244
Rep Power: 5 
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: 60
Rep Power: 9 
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: 7
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: 7
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: 244
Rep Power: 5 
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: 244
Rep Power: 5 
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: 60
Rep Power: 9 
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: 244
Rep Power: 5 
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: 60
Rep Power: 9 
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. 

February 10, 2017, 20:09 

#13 
New Member
VIJAYA KUMAR G
Join Date: Jun 2016
Location: Chennai, India
Posts: 18
Rep Power: 3 
Hi
I am trying to do the same case of Flow past a flat plate with U =33 m/s (Weighardt data). Mesh: y+ < 1 Refinement at Inlet for development of boundary layer Using 'simpleFoam' steady state solver My conditions are as follows 1) k  fixedValue ~ 0 at Walls  TKE with Intensity of 5% at Inlet 2) omega  omegaWallFunction with high initial value (as you have mentioned) at wall  Calculated based on nut/nu ratio at 'Inlet' 3) nut  fixedValue ~ 0 at walls  'calculated' condition at other patches. Correct me where I am going wrong, and also is it possible to share your kOmegaSST files. Regards Vijay 

February 10, 2017, 20:12 
Flow Past a Plate with kOmegaSST and y+1

#14  
New Member
VIJAYA KUMAR G
Join Date: Jun 2016
Location: Chennai, India
Posts: 18
Rep Power: 3 
Quote:
Hi Can you share your files or can you specify the boundary conditions used for kOmegaSST with y+ ~ 1 I am trying the same 'Flow Past Flat Plate; but predictions are bad. (Attached the Cf plot) Regards Vijaya Kumar G 

February 14, 2017, 16:03 

#15 
New Member
Gerd
Join Date: Nov 2015
Posts: 7
Rep Power: 3 
Hi Vijay,
I attached my boundary conditions, but yours seem ok. Cheers Gerd 

February 15, 2017, 04:19 
Inlet Conditions of k,Omega and nut

#16  
New Member
VIJAYA KUMAR G
Join Date: Jun 2016
Location: Chennai, India
Posts: 18
Rep Power: 3 
Quote:
Can you specify how you calculated (relations used) the inlet conditions of k, omega and nut for the resolved boundary layer condition (y+ ~ 1) ? That would be helpful. I think I'm missing some beat over there. Regards Vijaya Kumar G 

February 18, 2017, 04:14 

#17  
New Member
Gerd
Join Date: Nov 2015
Posts: 7
Rep Power: 3 
Quote:
I took inlet conditions I found in the literature and used the relation w=e/k to convert the conditions between ke and kw simulations. Regards Gerd 

February 18, 2017, 17:48 

#18  
New Member
VIJAYA KUMAR G
Join Date: Jun 2016
Location: Chennai, India
Posts: 18
Rep Power: 3 
Quote:
Sorry for bugging you. Can you give me the exact relations you used, I think I'm missing something there. Vijay 

February 19, 2017, 02:18 

#19 
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 259
Rep Power: 4 
Dear Vijay,
this pages https://www.cfdonline.com/Wiki/Turb...ary_conditions explains how to calculate initial values for k and eps. Youn need to click a few links to get fomulae for dependend variables. Procedure is  calculate the hdydraulic diameter  calculate Re from it  calculate the turbulent length scale (=the size of the large eddies). For freestream velocity it is better guessing it than using the formula for pipe flow. The larges value you should take into account is the size of the problem.  calculate the turbulence intensity Now you have everything for the calculation of k and eps (and omega too). For calculation of the y value of the finest mesh near the surface I recommend the calculator http://www.pointwise.com/yplus/ If you have further questions please do not hesitate to ask.
__________________
Uwe Pilz  Sie ahnen nicht, wieviel Poesie in der Berechnung einer Logarithmentafel enthalten ist (Carl Friedrich Gauß) 

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 