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

Wall Function

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2010, 16:52
Question Wall Function
  #1
New Member
 
Pooven
Join Date: Nov 2009
Location: Durban, South Africa
Posts: 9
Rep Power: 17
Pooven is on a distinguished road
Hi there, this is a really novice question: would one specify the friction acting against the fluid flow in the wall function specification? That is, for some given patch specified in the wall function file, would one specifiy the friction in the 'value' field?

Thank you for taking the time to read this.
Pooven is offline   Reply With Quote

Old   December 9, 2010, 19:56
Default
  #2
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 16
Hagen is on a distinguished road
Hello Pooven,

From what I understand of the Wall function treatment of OpenFOAM (nutWallFunction) the wallShearStress is derived from:

tau_wall = rho * (nu + nut) * mag(grad(U))_w with
nut = nu * ((y+ * k) / ln( E * y+) - 1)

With tau_wall you can then determine the friction coefficient.

I don't know exactly what you mean with wall function file? Could you explain that.

I hope that helps a little,
Hagen
Hagen is offline   Reply With Quote

Old   December 10, 2010, 04:29
Default
  #3
New Member
 
Pooven
Join Date: Nov 2009
Location: Durban, South Africa
Posts: 9
Rep Power: 17
Pooven is on a distinguished road
Thank you for your reply Hagen. It's much appreciated. By wall function file I was referring to the 0/nut file (for incompressible RAS). This is where the wall function is specified right? So for example for:

movingWall
{
type nutWallFunction;
value uniform 0;
}


Would I specify the friction coefficient in the value field? I've been trying to get more familiar with CFD, but I'm obviouly not doing such a good job; you said that I could determine the friction coefficient from tau_wall but wouldn't I actually need to know what the friction coefficient is before running the simulation?

Thank you once again for lending me some of your time
Pooven is offline   Reply With Quote

Old   December 10, 2010, 05:54
Default
  #4
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by Pooven View Post
Thank you for your reply Hagen. It's much appreciated. By wall function file I was referring to the 0/nut file (for incompressible RAS). This is where the wall function is specified right? So for example for:

movingWall
{
type nutWallFunction;
value uniform 0;
}


Would I specify the friction coefficient in the value field? I've been trying to get more familiar with CFD, but I'm obviouly not doing such a good job; you said that I could determine the friction coefficient from tau_wall but wouldn't I actually need to know what the friction coefficient is before running the simulation?

Thank you once again for lending me some of your time
Hi, I see a little bit of confusion here...You are referring to nut as a "friction coefficient", am I right? Well, in the literature the friction coefficient (or, more properly, the skin friction coefficient) is a non-dimensional measure of the wall shear stress. Instead, nut is simply the conventional name given to the eddy viscosity in the RANS turbulence modeling. However, talking about the value of nut in your 0/nut file, this is only an initial value (so, in practice, it's quite arbitrary), because after the first iteration the solver you are using will start to evaluate nut directly from the turbulent quantities or, as in your case, from a simplified wall-function approach.

Hope this helps

Best Regards

V.
vkrastev is offline   Reply With Quote

Old   December 10, 2010, 10:14
Default
  #5
New Member
 
Pooven
Join Date: Nov 2009
Location: Durban, South Africa
Posts: 9
Rep Power: 17
Pooven is on a distinguished road
Hi V, thank you for explaining that. Is there a way to determine the most optimal initial value for nut? I suppose 0 would be okay for all simulations (since the initial value is arbitrary) then?

If I may, I have another two questions: how does one know which of the wall functions to choose? nutWallFunction, nutRoughWallFunction, nutSpalartAllmarasStandardRoughWallFunction, nutSpalartAllmarasStandardWallFunction and nutSpalartAllmarasWallFunction are mentioned in the documentation but I suppose the CFD user would need to know when they are applicable... perhaps there's some resource I could read to better understand how to choose the correct function?

So where would I specify the friction coefficient (or friction force)? My initial approach was to define it in the /0/U file: within the boundaryField sub-dictionary, for the value field of the patch, I'd specify the friction coefficient. Would this be correct?

Thank you again for the assistance.
Pooven is offline   Reply With Quote

Old   December 10, 2010, 10:54
Default
  #6
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by Pooven View Post
I suppose 0 would be okay for all simulations (since the initial value is arbitrary) then?
Yes, it would be generally ok.

Quote:
Originally Posted by Pooven View Post
If I may, I have another two questions: how does one know which of the wall functions to choose? nutWallFunction, nutRoughWallFunction, nutSpalartAllmarasStandardRoughWallFunction, nutSpalartAllmarasStandardWallFunction and nutSpalartAllmarasWallFunction are mentioned in the documentation but I suppose the CFD user would need to know when they are applicable... perhaps there's some resource I could read to better understand how to choose the correct function?
nutWallFunction and nutRoughWallFunction are quite standard stuff (the latter can take into account for wall roughness) and, in general, thay give satisfactory results for most of commonly encountered incompressible flows. The other options you mentioned are more "specialistic" ones, but honestly I cannot give you any advice about them, since I haven't gone into much deeper (none in terms of theoretical background neither in terms of the OF implementation)

Quote:
Originally Posted by Pooven View Post
So where would I specify the friction coefficient (or friction force)? My initial approach was to define it in the /0/U file: within the boundaryField sub-dictionary, for the value field of the patch, I'd specify the friction coefficient. Would this be correct?
I'm sorry, but still I cannot understand what are you thinking of with "friction coefficient"...Can you explain it more clearly?

V.
vkrastev is offline   Reply With Quote

Old   December 10, 2010, 11:05
Default
  #7
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Hi, Friction Coefficient is used in Darcy-Weisbach phenomenological equation. This coefficient is not used in law-of-the-wall models because it is completely modeled by them.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   December 10, 2010, 11:06
Default
  #8
New Member
 
Pooven
Join Date: Nov 2009
Location: Durban, South Africa
Posts: 9
Rep Power: 17
Pooven is on a distinguished road
Hi again V

You've been extremely helpful, thank you! I'm trying to model air flow at the boundary level and I'm a bit unsure as to where I'd model the friction effect caused by the ground. I estimate the friction velocity from the logarithmic velocity profile and I'm wondering if it would be okay to specify this in the /0/U file?
Pooven is offline   Reply With Quote

Old   December 10, 2010, 11:24
Default
  #9
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by Pooven View Post
Hi again V

You've been extremely helpful, thank you! I'm trying to model air flow at the boundary level and I'm a bit unsure as to where I'd model the friction effect caused by the ground. I estimate the friction velocity from the logarithmic velocity profile and I'm wondering if it would be okay to specify this in the /0/U file?
Ok, so if I understand you properly you want to model airflow over solid ground, am I right? If it so, than you have two options: 1) to use a High-Re turbulence model (such as, for instance, the standard k-epsilon one) with wall functions for k, epsilon (or omega) and nut; 2) to resolve directly the boundary layer with a low-Re turbulence model (such as the Launder-Sharma k-epsilon), without any additional wall modeling. In both cases, as Santiago said up above, you don't need to specify any friciton coefficient as a bc (the proper condition for U is simply a no slip condition at the solid wall). About the case 1), what kind of wall function is more suitable to your case depends from what do you want to model (is the wall rough? at what level of detail do you want to model this eventual roughness? and so on...). Of course, wichever the case, you must specify the correct value for the kinematic viscosity in the /constant/transportProperties dictionary.

Regards

V.
vkrastev is offline   Reply With Quote

Old   December 13, 2010, 06:23
Default
  #10
New Member
 
Pooven
Join Date: Nov 2009
Location: Durban, South Africa
Posts: 9
Rep Power: 17
Pooven is on a distinguished road
Thanks for taking the time to reply. It took me a while to understand, but I think it finally makes sense... the friction would depend on the fluid speed anyway so it would change as the iterations progress...

Yes you are correct V, I want to model the airflow over solid ground. For both options (thank you for that again), how would I then take into account the land cover? I mean, it would change from area to area and that would have a bearing on the friction right?

Also, I only have a wind speed reading at 1 point, so I initialize U by filling the mesh with that 1 wind speed reading - would this be okay?
Pooven is offline   Reply With Quote

Old   December 13, 2010, 09:54
Default
  #11
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by Pooven View Post
For both options (thank you for that again), how would I then take into account the land cover? I mean, it would change from area to area and that would have a bearing on the friction right?
In the first case, if you want to use a roughWallFunction than you have to define properly the roughness parameter of your "landscape": since I have no practical experience with this kind of approach, I advice you to have a look here http://www.cfd-online.com/Forums/ope...ocumented.html and in other similar treads in the forum.
In the second case you MUST define the ground surface very carefully and then use a very fine surface-fitted grid (first node away from the wall at a non-dimensional distance y+ of about 1) to solve the boundary layer properly: in this case, with a sufficiently accurate geometry and grid definition, the solver will do all the "hard work" (but, of course, at a very high computational cost) and there will be no need to use a simplified modeling approach (such as the roughWallFunction approach).


Quote:
Originally Posted by Pooven View Post
Also, I only have a wind speed reading at 1 point, so I initialize U by filling the mesh with that 1 wind speed reading - would this be okay?
What do you mean with "at 1 point"? If you have some data about the mean direction and intensity of the wind at a given altitude, a kind of approach could be an extrapolation of the approximate free-stream velocity and the imposition of this velocity (in intensity and direction) as your "inlet" condition. But, however, I have to admit that my experience with atmospheric boundary layers is not so extended, so maybe you could ask someone else here in the forum for much detailed hints

Hope this helps

V.
vkrastev is offline   Reply With Quote

Old   December 14, 2010, 06:25
Default
  #12
New Member
 
Pooven
Join Date: Nov 2009
Location: Durban, South Africa
Posts: 9
Rep Power: 17
Pooven is on a distinguished road
Thank you V, you've been a tremendous help Outstanding really. Things make much more sense now! Thank you all.
Pooven is offline   Reply With Quote

Old   February 10, 2011, 02:42
Default
  #13
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16
rob3rt 0ng is on a distinguished road
Hi All,

I am wondering what is the range of values for Reynolds number to be considered low or high turbulent from this formula, turbulent Re = (rho*k^2)/(epsilon*mu)?

Also, why can't I use wall functions if I use RAS/KE Launder-Sharma? so far I've set of all my walls (bottom, outer, top, and wall) conditions as zeroGradient but getting rather a not very good result.

Your feedback will be very appreciated.

Thanks and regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   February 10, 2011, 06:44
Default
  #14
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by rob3rt 0ng View Post
Hi All,

I am wondering what is the range of values for Reynolds number to be considered low or high turbulent from this formula, turbulent Re = (rho*k^2)/(epsilon*mu)?

Since for a given flow k and epsilon assume different values in space and time, this formula can return only local informations about the turbulence level of the flow itself (which means that you can have a relatively low global Reynolds number but with locally high levels of turbulence somewhere in your domain). However, about the distinction between High and Low-Re turbulence models, Low-Re simply means that the model can be consistently integrated in regions where the local level of turbulence (and thus the local turbulent Reynolds number) is "damped" by viscous and/or wall-blocking effects (i. e. very close to a solid wall). On the other hand, High-Re models are usually derivated assuming fully developed turbulent flows (flows with high levels of local turbulence), which render them not reliable in Low-Re regions of the flow.


Quote:
Originally Posted by rob3rt 0ng View Post
Also, why can't I use wall functions if I use RAS/KE Launder-Sharma? so far I've set of all my walls (bottom, outer, top, and wall) conditions as zeroGradient but getting rather a not very good result.
The Launder-Sharma model is a modified k-epsilon model, with some ad-hoc corrections for the integration through the viscous sublayer. To use it properly, a sufficently fine grid must be employed near the walls (y+<1) and adequate boundary conditions must be set at the walls themselves. In particular, with the OpenFOAM implementation of the model you have to set:

-Very low (fixed) values for k and epsilon (something like 10^-10 should be appropriate)
- No slip condition for the velocity field [fixedValue (0 0 0)]
- zeroGradient condition for p

Hope this helps

V.
fumiya, mgg and smog like this.
vkrastev is offline   Reply With Quote

Old   February 11, 2011, 06:56
Default
  #15
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16
rob3rt 0ng is on a distinguished road
Hi Vesselin,

Thanks very much for your helpful feedback.

Is there a way to check yPlus values with low Re Launder Sharma model? although there is a code available in here http://www.cfd-online.com/Forums/ope...us-values.html
And since I should be more concerned with the distance normal to the wall, does that mean I should only consider the top wall yPlus average value?

Also, I've got a slightly modified energy equation to the laminar one. I added the turbulent kinetic equation ((mu*(gradU + gradU.T()) && gradU)/(rho0*Cp0)) and rate of dissipation (turbulence->epsilon()/Cp0) on the RHS of the TEqn.H and I left the pEqn.H and UEqn.H as they were for the laminar case from porousSimpleFoam. Do they look right to you?

Thanks once again and with regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   August 19, 2011, 01:07
Default nutWallFunction in OpenFOAM
  #16
New Member
 
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16
jiez is on a distinguished road
Hi Hagen,

Do you have any idea about where the following nut equation for wall treatment (nutWallFunction in OpenFOAM) comes from? I mean which paper.
nut = nu * ((y+ * k) / ln( E * y+) - 1)

Thanks,

Jie
jiez is offline   Reply With Quote

Old   August 19, 2011, 01:07
Default
  #17
New Member
 
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16
jiez is on a distinguished road
Hi Jie,

You will find a good summary in Int.J. of Heat and Fluid flow 23 (2002) 148-160. (Craft, Gerasimov, Launder, Iacovides)
I think you will need the following relation in order to derive the OpenFOAM wall function:
tau_w = rho (nu + nut) gradU
I hope this will help a little bit.

Good luck,
Hagen
jiez is offline   Reply With Quote

Old   August 19, 2011, 01:08
Default
  #18
New Member
 
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16
jiez is on a distinguished road
Thanks Hagen, Progress in the generalization of wall-function treatments is a helpful paper.

However, from that paper, nut near wall is calculated as nut = nu * Cmu * Ct * (yPlus - yPL) (if yPlus > yPL )
where Cmu=0.09, Ct=2.55, yPL=10.8

It is quite different from the expression
nut = nu * ((yPlus * k) / ln( E * yPlus) - 1) (if yPlus > yPL)
where k=0.41, E=9.8

Thus, I think there must be some other paper talking about this.

Thanks very much,

Jie
jiez is offline   Reply With Quote

Old   August 19, 2011, 01:08
Default
  #19
New Member
 
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16
jiez is on a distinguished road
Hi Jie,

thanks for your response. The formulation for nut you refer to is used for the new wall function approach, which is introduced in this paper. Forget about this part. OpenFOAM does not use this generalized wall function. However, this paper provides a good overview over the conventional wall function approach in the first and second section.
It has been a while since I derived this myself but I think you can the derive the OpenFOAM wall function from the expression for tau_wall in the paper.

Good luck,
Hagen
jiez is offline   Reply With Quote

Old   August 19, 2011, 01:12
Default
  #20
New Member
 
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16
jiez is on a distinguished road
Hi All,

If anyone has useful information about the new wall treatment used in OpenFOAM 1.7.x and later version for nut (i.e nutWallFunction), please post here.

Thanks in advance!

Jie
jiez is offline   Reply With Quote

Reply

Tags
friction, wall function


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 14:06
Need some wall function approaches! yka8150 Main CFD Forum 0 September 22, 2009 00:08
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 07:27
Wall function tod Phoenics 1 May 19, 2003 06:05


All times are GMT -4. The time now is 09:38.