CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Wall function usage

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 3 Post By G_German

Reply
 
LinkBack Thread Tools Display Modes
Old   April 24, 2016, 08:46
Default Wall function usage
  #1
New Member
 
Gerd
Join Date: Nov 2015
Posts: 3
Rep Power: 3
G_German is on a distinguished road
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 4-5 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.cfd-online.com/Forums/ope...penfoam-2.html).
For coarser grids (30<y+<100) wall functions exploit the universal logarithmic wall law to model the transition from the laminar near-wall 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): high-Re wall-function 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 wall-function 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=1e-8(?) for lowRe calculations):
calculate (for each timestep) the first grid point value by using an algebraic expression derived from the classical logarithmic law-of 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:
Attached Images
File Type: png kEpsilon.png (61.0 KB, 60 views)
File Type: png kOmegaSST.png (73.8 KB, 54 views)
File Type: png SA.png (80.8 KB, 47 views)
kalle, clktp and kuabay like this.
G_German is offline   Reply With Quote

Old   August 19, 2016, 08:27
Default
  #2
Senior Member
 
Join Date: Mar 2015
Posts: 210
Rep Power: 4
KateEisenhower is on a distinguished road
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
KateEisenhower is offline   Reply With Quote

Old   August 19, 2016, 08:50
Default
  #3
Member
 
benoit paillard
Join Date: Mar 2010
Posts: 56
Rep Power: 8
bennn is on a distinguished road
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.
Attached Images
File Type: png ClCdypExp.eps.png (53.2 KB, 34 views)
bennn is offline   Reply With Quote

Old   August 19, 2016, 09:02
Default
  #4
Senior Member
 
Join Date: Mar 2015
Posts: 210
Rep Power: 4
KateEisenhower is on a distinguished road
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:
Originally Posted by bennn View Post
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.
KateEisenhower is offline   Reply With Quote

Old   August 22, 2016, 06:44
Default
  #5
Member
 
benoit paillard
Join Date: Mar 2010
Posts: 56
Rep Power: 8
bennn is on a distinguished road
Hi Kate,

The model used were k-epsilon, komega SST and SA in their default OF 2.4 implementations. k-epsilon 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.
bennn is offline   Reply With Quote

Old   August 22, 2016, 16:01
Default
  #6
New Member
 
Gerd
Join Date: Nov 2015
Posts: 3
Rep Power: 3
G_German is on a distinguished road
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 k-epsilon 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 k-omega 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
Quote:
Originally Posted by KateEisenhower View Post
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
G_German is offline   Reply With Quote

Old   August 22, 2016, 16:05
Default
  #7
New Member
 
Gerd
Join Date: Nov 2015
Posts: 3
Rep Power: 3
G_German is on a distinguished road
Hi Benn,

if you are interested we can exchange our input files, to check whether something looks faulty.

Best regards

Gerd

Quote:
Originally Posted by bennn View Post
Hi Kate,

The model used were k-epsilon, komega SST and SA in their default OF 2.4 implementations. k-epsilon 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.
G_German is offline   Reply With Quote

Old   September 5, 2016, 05:25
Default
  #8
Senior Member
 
Join Date: Mar 2015
Posts: 210
Rep Power: 4
KateEisenhower is on a distinguished road
Quote:
Originally Posted by G_German View Post
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 k-epsilon 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 k-omega 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

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 CFD-Online Wiki articles.

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   September 5, 2016, 05:32
Default
  #9
Senior Member
 
Join Date: Mar 2015
Posts: 210
Rep Power: 4
KateEisenhower is on a distinguished road
Quote:
Originally Posted by bennn View Post
Hi Kate,

The model used were k-epsilon, komega SST and SA in their default OF 2.4 implementations. k-epsilon 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.

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
KateEisenhower is offline   Reply With Quote

Old   September 6, 2016, 04:46
Default
  #10
Member
 
benoit paillard
Join Date: Mar 2010
Posts: 56
Rep Power: 8
bennn is on a distinguished road
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.
bennn is offline   Reply With Quote

Old   September 8, 2016, 08:21
Default
  #11
Senior Member
 
Join Date: Mar 2015
Posts: 210
Rep Power: 4
KateEisenhower is on a distinguished road
Quote:
Originally Posted by bennn View Post
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.
Benoit, I am currently working on a similar case. Like you, I get reasonable results when using wall functions on a resolved boundary layer mesh (Spalart Allmaras turbulence modeling). As I said, my results look reasonable, I cannot say if they are yet.

What Reynolds number do you have in your case? Maybe you have a pure laminar bl along until the trailing edge?

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   September 8, 2016, 08:37
Default
  #12
Member
 
benoit paillard
Join Date: Mar 2010
Posts: 56
Rep Power: 8
bennn is on a distinguished road
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.
bennn is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 11:17.