CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

About dimensionless wall distance

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2011, 18:43
Default About dimensionless wall distance
  #1
New Member
 
Join Date: Feb 2011
Posts: 20
Rep Power: 15
L1011 is on a distinguished road
Hi all!

For long I have been using "best-practices" on the dimensionless wall distance (y+) to define order of magnitude for the size of my cells in boundary layers region(typically y+<1).

Today, I would like here to ask you two questions:

  1. Where this criterion comes from? How is it linked to the physical behavior of boundary layers?
  2. How can we evaluate the y+ as a function of the Reynolds number and characteristic length (there are some tools available on-line to do that but they are more like black boxes to me!)?
Thank you for your help!

L1011
L1011 is offline   Reply With Quote

Old   February 16, 2011, 19:00
Default
  #2
New Member
 
Christophe Sibuet Watters
Join Date: Feb 2011
Posts: 2
Rep Power: 0
chriswatt is on a distinguished road
Hi there

the definition of y+ is y+ = y * u_tau / mu ; in some way, this is equivalent to a Reynolds number, based on the distance y and the velocity u_tau. u_tau is a velocity that is characteristic of the velocity within the eddies forming the turbulence. the scale of u_tau are similar to the scale of the eddies velocities if you like. when y+ is close to 1, it means that the turbulent Reynolds number based on these scales is small, small enough so that viscosity plays an important role, instead of turbulent advection. So it is very similar to other types of flows (remember, Reynolds number indicate ratio between "intertia forces" and "viscous forces"). For some turbulence models, you need to put the first grid node at these levels of y+ to ensure you are in the zone where viscosity plays an important role, which is called the viscous sublayer... if you are using a law of the wall, then you must not put the first grid node in this zone, but rather in the log-law region. check any good book on turbulence on the subject. I recommend the book of Wilcox (Turbulence modelling in CFD) as a starter.

Regarding your second question, to evaluate y+, you need to evaluate u_tau. u_tau is defined as sqrt(Tau_W / rho ) where Tau_W is the shear stress at the wall. Tau_W is the sum of the shear stress due to viscosity and to turbulent Reynolds stresses. So if you use a turbulence model like k-epsilon or any other model that use the boussinesq approx, what you need to do is evaluate the local velocity gradients, and then multiply these by the local turbulent viscosity, and you are almost fixed

Finally, it is not a trivial thing to select the location of the first grid node (y+=1). it is a recursive work. First you make a guess, then you make a calculation, then you have to recheck the y+ value... if it is too high or too low, then you have to move it. I suggest to check the influence of the location of this first grid node (study y+=0.1, 1.0, 2.0...) as well. Depending on the problem, it can have an effect... and yes, you are at the border of the present knowledge regarding turbulence modelling with RANS models....

hope it helps ! Good luck with your analysis
chriswatt is offline   Reply With Quote

Old   February 16, 2011, 19:27
Default
  #3
New Member
 
Join Date: Feb 2011
Posts: 20
Rep Power: 15
L1011 is on a distinguished road
Thanks chriswatt for your lighting answer!
L1011 is offline   Reply With Quote

Old   February 16, 2011, 19:57
Default
  #4
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
Here is my method. yy is the physical distance, re is the Reynolds number, xx is the location where you want y+ calculated, and len is the length used for non dimensionalization. As you can see, yy is a function of where you want the value calculated. For example, yy will be smaller at the beginning of the airfoil as apposed to the trailing edge. That is the one thing I find annoying about the y+=1 rule, no one says where to apply it! Unless the expectation is that the height of the first grid point should vary over the entire surface. Which is not likely to happen.

Anyway...

double yy = GetYPlusOne(re*xx/len)*xx;

And the function GetYPlusOne is as follows. (Von Karmen's equation is used to determine cf and it is iterated on with Newton-Raphson method to solve.)

/* method */ static public double GetYPlusOne(double Re) {
// make original guess using Schlichting formula
double cf = 0.455/Math.pow(Math.log10(Re),2.58);

// use newton iteration to solve Von Karmen's equation
// 1.0/sqrt(cf) = 1.7 + 4.15*log10(cf*Re)
double fac = 4.15/Math.log(10.0);
for (int ii=0;ii<100;ii++) {
double df = 1.7 + fac*Math.log(cf*Re) - 1.0/Math.sqrt(cf);
if (Math.abs(df) < 1.0e-12)
break;
double dfdcf = fac/(cf*Re) + 0.5/Math.pow(cf,1.5);
double dcf = -df/dfdcf;
if (cf + dcf <= 0.0)
cf *= 0.5;
else
cf += dcf;
}

// return height (y/L)
return 1.0/(Re*Math.sqrt(0.5*cf));
}

This gets you started. Then, as mentioned in the reply above, it is good to run a few cases with smaller yy values to see if the skin friction has converged. Depending on how you generate your grid, you may need to add more points close to the surface as you reduce your yy value.
Martin Hegedus is offline   Reply With Quote

Old   February 16, 2011, 22:22
Default Hi
  #5
Member
 
Dynampally Pavitran
Join Date: Mar 2010
Location: India
Posts: 74
Rep Power: 16
pavitran is on a distinguished road
The above posts give a very good explanation about the yplus. I would like to share some of my experience with the yplus effect on results.
  1. First of all it is very hard to achieve same yplus value at every point on the surface eg. airfoil, therefore we look for average yplus value.
  2. The effect of yplus at 1, 0.1 and 0.2 will be very minimal on the results. I have noticed this, when I was doing 2D airfoil analysis.
  3. Moreover going for yplus values below 1, will result in pushing more cells inside the viscous sublayer, which is not required. And it reduces the number of cells in the outer part of the boundary layer.
  4. Since in viscous sub layer, the velocity profile is almost linear(u+=y+), therefore we can have fewer cells in this layer.
pavitran is offline   Reply With Quote

Old   February 25, 2011, 10:55
Default
  #6
Administrator
 
pete's Avatar
 
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10
pete will become famous soon enough
The code given by Martin solves the Karman-Schoenherr equation in order to approximate the total skin-friction coefficient and from that compute the needed wall-distance for a desired y-plus value. This is the same formula used in the very popular Viscous Grid Spacing Calculator by Bill Jones, NASA. However, I think that it would be better to use one of the many explicit formulas to estimate the local skin-friction coefficient instead, since that is really what you are interested in. I have added a few of these approximations of the local skin-friction for a turbulent boundary layer to CFD-Wiki here.
pete is offline   Reply With Quote

Old   February 25, 2011, 13:00
Default
  #7
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
Quote:
Originally Posted by pete View Post
The code given by Martin solves the Karman-Schoenherr equation in order to approximate the total skin-friction coefficient...
Are you sure that this is the total skin-friction coefficient...

The equation, 1.0/sqrt(cf) = 1.7 + 4.15*log10(cf*Re), is equation [38] from Karman's "Turbulence and Skin Friction" (Journal of the Aeronautical Sciences, Vol 1, No. 1, Jan. 1934) The equation is a straight line representation of the measurements in Figure 11 of that paper. A quote from the paper "In Fig. 11 are plotted the values of the local friction coefficients according to measurements of G. Kempf. These experiments are very remarkable because the values of the local friction were obtained by direct measurements of the force acting on small movable plates arranged at different points of a very long pontoon." The figure uses "cf" (i.e. little c) in it's axis. Also, in Table I of that paper, are shown calculated values for Rx, Cf, and cf. The values for Rx and cf fit into equation [38].

Granted, equation [38] in the paper shows "Cf" (i.e. big c) but, from all the other information, it appears to be a typo.

The mean friction, equation [39] (by Schoenherr), is given by.

0.242/sqrt(Cf) = log10(Cf*Re) (which is close to 1.0/sqrt(Cf) = 4.15*log10(Cf*Re))
Martin Hegedus is offline   Reply With Quote

Old   February 25, 2011, 16:10
Default
  #8
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
OK, after doing a quick search on the internet, the Karman-Schoenherr equation for the total skin friction is

1.0/sqrt(Cf) = 4.13*log10(Cf*Re)

and not

1.0/sqrt(cf) = 1.7 + 4.15*log10(cf*Re)

After checking Dr. Jones source code for his y+ calculator it appears both he and I are solving for the local skin friction. We are not using the total skin friction.

Edit: After digging further I'm not really sure what the Karman-Schoenherr equation is.
Martin Hegedus is offline   Reply With Quote

Old   February 25, 2011, 19:59
Default
  #9
Administrator
 
pete's Avatar
 
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10
pete will become famous soon enough
Yes, you are probably correct Martin, thanks for clearing that up. It is not every day that you learn basic boundary layer theory again :-) I just assumed that you were using the implicit Karman-Schoenherr equation as given in Schlichting for the total skin-friction coefficient on a flat-plate with zero pressure gradient. The equation I am refering to is just the one you wrote in your response. I guess that the version you are using is the same equation, but for local skin-friction coefficient instead. Have you got any special reason to use this implicit equation that requires a numercial solution instead of one of the explicit correlations I wrote down in CFD-Wiki?
pete is offline   Reply With Quote

Old   February 25, 2011, 21:09
Default
  #10
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
Quote:
Originally Posted by pete View Post
Have you got any special reason to use this implicit equation that requires a numercial solution instead of one of the explicit correlations I wrote down in CFD-Wiki?
Not really, I just have it coded up. I'm not an expert with boundary layer theory, but from what I understand it is a "better" equation to compare to and that some of the other explicit formulations are in a sense fits to it. And it is cool because it is a classic. It would be interesting to see how a RANS code compares to it and the other formulations. But, in the end, I gather they are all fits to experiments and none of them really apply to a real world geometry. After all, skin friction is a function of the geometry and where the stagnation and separation points are. And there can be reversed flow to. The best methodology is to just take a stab at the surface grid spacing with this formula, or the others you mentioned, and then run some cases with smaller grid spacing to see if one is happy with the convergence of skin friction.

Hmm, maybe I'll compare my SA RANS code to it. I'll keep you posted.
Martin Hegedus is offline   Reply With Quote

Old   February 26, 2011, 01:29
Default
  #11
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
A discussion of y+ at the CFL3D web page. SST is more sensitive to y+ spacing than SA

http://cfl3d.larc.nasa.gov/Cfl3dv6/c...flatplateyplus
Martin Hegedus is offline   Reply With Quote

Old   February 26, 2011, 03:18
Default
  #12
Administrator
 
pete's Avatar
 
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10
pete will become famous soon enough
Yes, and to assess Y+ you need a good approximation for C_f. But why use an implicit equation for C_f that requires a numercial solution, when there are several explicit formulas to approxmate C_f? Do you think that the implicit equation you recommended gives a more correct C_f estimation? The other formulas are quite classic also. I guess that there are many other issues to think about if you want to make your C_f approximation more accurate - pressure gradients, corner-effects, ... Comparing with a CFD code is questionable. You can't really trust the results from a turbulence model any more than correlations based on experimental measurements.
pete is offline   Reply With Quote

Old   February 26, 2011, 13:23
Default
  #13
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
Quote:
Originally Posted by pete View Post
Yes, and to assess Y+ you need a good approximation for C_f. But why use an implicit equation for C_f that requires a numercial solution, when there are several explicit formulas to approxmate C_f? Do you think that the implicit equation you recommended gives a more correct C_f estimation?
Oh, sorry, at no point did I want to imply not to use an explicit formula.

General comment to all readers. I plotted up the various cf formulas given on the wiki page and compared them to the implicit formula. The Schlichting, Schultz-Grunov, and implicit method are close to one another between Re 1e4 and 1e10. (Note: Log base 10 should be used for the Schlichting and Schultz-Grunov equations.) The implicit method lies between the Schlichting and Schultz-Grunov results. Between 1e5 and 1e6 the 1/7 power law correlates well with the other three methods. Beyond 1e6 the 1/7 method diverges from the other three.

Quote:
The other formulas are quite classic also.
Agreed.

Quote:
I guess that there are many other issues to think about if you want to make your C_f approximation more accurate - pressure gradients, corner-effects, ... Comparing with a CFD code is questionable. You can't really trust the results from a turbulence model any more than correlations based on experimental measurements.
Agreed. I did not mean to imply that the cf calculated from a CFD code would compare well to the equations.

Sorry, maybe I misunderstood. I didn't think that the topic, as posted by L1011, was about getting a good cf approximation. After all, the initial off surface grid spacing estimate that results from the estimated cf value is just an initial guess.
Martin Hegedus is offline   Reply With Quote

Old   February 26, 2011, 13:44
Default
  #14
Administrator
 
pete's Avatar
 
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10
pete will become famous soon enough
Many thanks for your detailed investigation about the various methods to assess C_f. Could you perhaps even share your resilts with us by adding your plot to the CFD-Wiki page?

I'm sorry about stealing this thread a bit. The reason I did is that over the years we at CFD Online have got many many questions about Y+ and how the NASA web-page works. The word "Y-plus" is even the most frequent search term used on the forums.

The NASA web-page is mainly focused on compressible applications and many are working on incompressible flows. I have been thiniking that it would be nice to write a new y+/wall-distance estimation tool which is more general, and make it available on CFD Online. The basis for this is to decide what method to use to estimate C_f. Perhaps we could even offer a few alternatives and link to a good explanation of the various methods on CFD-Wiki.
pete is offline   Reply With Quote

Old   February 26, 2011, 13:48
Default
  #15
Member
 
jk
Join Date: Jun 2009
Posts: 64
Rep Power: 17
jyothishkumar is on a distinguished road
Dear Mr Martin,

I am writing a FV (colocated grid) based incompressible flow solver. I am trying to implement the high Re k epsilon turbulence model. I am finding the value of utou as follows:

For standard wall func. k epsilon turb. model we have the following expression:

(U/utou) = (1/karman_const) * ln(Ey+) where y+ = ro * first cell ydistance * utou/meu. I am using newton raphson iteration for finding utou. i am assuming the initial value of utou as 0.00001 and when it undergoes iteration (say second iteration itself) i am getting a negative value of utou and when it enter in to log expression i am getting an error (obviously). How to avoid these negative thing Can you please help me in this regard.

thanks in advance

Jyothishkumar
jyothishkumar is offline   Reply With Quote

Old   February 26, 2011, 14:16
Default
  #16
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
Quote:
Originally Posted by jyothishkumar View Post
Dear Mr Martin,

I am writing a FV (colocated grid) based incompressible flow solver. I am trying to implement the high Re k epsilon turbulence model. I am finding the value of utou as follows:

For standard wall func. k epsilon turb. model we have the following expression:

(U/utou) = (1/karman_const) * ln(Ey+) where y+ = ro * first cell ydistance * utou/meu. I am using newton raphson iteration for finding utou. i am assuming the initial value of utou as 0.00001 and when it undergoes iteration (say second iteration itself) i am getting a negative value of utou and when it enter in to log expression i am getting an error (obviously). How to avoid these negative thing Can you please help me in this regard.

thanks in advance

Jyothishkumar
Dear Jyothishkumar,

Sorry, I'm not going to solve your problem for you!

But, when I run into problems with Newton-Raphson's method it is usually because I messed up the derivative. Once that is cleared up, then it's my starting point.

Tips,

1) Investigate your function. Plot up your function and see what it looks like. If it is something wild you'll need to be very careful with your starting point or go for a different methodology all together.
2) Check your derivative. To do this I usually compare my derivative against the numerical approximation for it, i.e. (f(x+0.5*eps)-f(x-0.5*eps))/eps, where eps is some small values such as 1.0e-6. (Note: I do my calculations in double precision)
3) If you are in a region where your derivative is small, you will probably be getting into trouble soon.
4) You may also need to put limits on your walking distance (i.e. dx).
Martin Hegedus is offline   Reply With Quote

Old   February 26, 2011, 14:45
Default
  #17
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
Quote:
Originally Posted by pete View Post
The NASA web-page is mainly focused on compressible applications and many are working on incompressible flows. I have been thiniking that it would be nice to write a new y+/wall-distance estimation tool which is more general, and make it available on CFD Online. The basis for this is to decide what method to use to estimate C_f. Perhaps we could even offer a few alternatives and link to a good explanation of the various methods on CFD-Wiki.
I think it would be nice to see a good explanation and some examples. It is too bad that the NASA y+ calculator does not say more in regards to the formulation or how to use it (i.e. best practices). Especially since it seems to be used so much. As mentioned in an earlier post, the y+ results depends on where along the body one calculates the value. I usually use a value that is 1/4 of the length of interest. For example, 1/4 of the fuselage length, 1/4 or the body diameter (for higher angles with body shed vorticity) or 1/4 of the mean chord. But, it is just a starting point.

It seems that the CFL3D link provided above is for a subsonic case. The drag plot, http://cfl3d.larc.nasa.gov/Cfl3dv6/2...s/cd_cfl3d.gif, shows how the SST and SA model results vary with initial grid spacing. The page also makes reference to NASA TM-110446. The recommendation for the SST model is that an initial grid spacing less than y+=1 be used. For the SA model, a y+=1 is adequate.
Martin Hegedus is offline   Reply With Quote

Old   April 25, 2011, 07:43
Default
  #18
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16
rob3rt 0ng is on a distinguished road
Hi All,

There are couple of fundamental things that I have yet to understand and will be very grateful if you could help to clear the air.

Firstly, according to the u+ vs y+ plot that y+<11.6 or so is laminar so if I want to run a turbulent case why would I need to set the y+<1 (according to many other discussions I found in the forum), isn't it suppose to be around 30ish?

Secondly, i'm using OpenFOAM and the way I adjust the y of my hex block patches or walls is to play around with the simpleGrading. I find it odd that the results after a couple of hundreds iterations that the y values at different patches or walls give are different.

Lastly, i've got y+ values after a couple iterations normally low at the inlet and high towards the outlet so does this mean that I have to refine the mesh near to the outlet?

Thanks very much for your time and attention

Robert
rob3rt 0ng is offline   Reply With Quote

Old   May 7, 2011, 22:21
Default
  #19
New Member
 
Mike
Join Date: Apr 2011
Posts: 22
Rep Power: 15
josip76 is on a distinguished road
Hi, thanks for the post ive found it very helpful but once you get the location of the initial point off the wall using y+=1 (I used the mid chord x value in my calculations) how do i find an appropriate ratio with which to increase the distance between my point's spacing as I continue outward from the surafce for instance 1.2 or 1.4 ect...?
josip76 is offline   Reply With Quote

Old   May 8, 2011, 03:21
Default
  #20
Administrator
 
pete's Avatar
 
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10
pete will become famous soon enough
It depends a bit on your solver what ratio is acceptable. But as a general rule of thumb I would recommend to aim at max 1.2 increase in cell height and never go above 1.25.
pete is offline   Reply With Quote

Reply


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
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
DIMENSIONLESS WALL DISTANCE kuba Main CFD Forum 0 December 12, 2006 13:42
MACRO FOR DIMENSIONLESS WALL DISTANCE Y+ ? Wael FLUENT 7 October 6, 2005 05:24
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


All times are GMT -4. The time now is 04:23.