|
[Sponsors] |
February 16, 2011, 18:43 |
About dimensionless wall distance
|
#1 |
New Member
Join Date: Feb 2011
Posts: 20
Rep Power: 15 |
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:
L1011 |
|
February 16, 2011, 19:00 |
|
#2 |
New Member
Christophe Sibuet Watters
Join Date: Feb 2011
Posts: 2
Rep Power: 0 |
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 |
|
February 16, 2011, 19:27 |
|
#3 |
New Member
Join Date: Feb 2011
Posts: 20
Rep Power: 15 |
Thanks chriswatt for your lighting answer!
|
|
February 16, 2011, 19:57 |
|
#4 |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
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. |
|
February 16, 2011, 22:22 |
Hi
|
#5 |
Member
Dynampally Pavitran
Join Date: Mar 2010
Location: India
Posts: 74
Rep Power: 16 |
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.
|
|
February 25, 2011, 10:55 |
|
#6 |
Administrator
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10 |
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.
|
|
February 25, 2011, 13:00 |
|
#7 | |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
Quote:
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)) |
||
February 25, 2011, 16:10 |
|
#8 |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
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. |
|
February 25, 2011, 19:59 |
|
#9 |
Administrator
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10 |
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?
|
|
February 25, 2011, 21:09 |
|
#10 | |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
Quote:
Hmm, maybe I'll compare my SA RANS code to it. I'll keep you posted. |
||
February 26, 2011, 01:29 |
|
#11 |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
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 |
|
February 26, 2011, 03:18 |
|
#12 |
Administrator
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10 |
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.
|
|
February 26, 2011, 13:23 |
|
#13 | |||
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
Quote:
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:
Quote:
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. |
||||
February 26, 2011, 13:44 |
|
#14 |
Administrator
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10 |
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. |
|
February 26, 2011, 13:48 |
|
#15 |
Member
jk
Join Date: Jun 2009
Posts: 64
Rep Power: 17 |
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 |
|
February 26, 2011, 14:16 |
|
#16 | |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
Quote:
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). |
||
February 26, 2011, 14:45 |
|
#17 | |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
Quote:
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. |
||
April 25, 2011, 07:43 |
|
#18 |
Member
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16 |
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 |
|
May 7, 2011, 22:21 |
|
#19 |
New Member
Mike
Join Date: Apr 2011
Posts: 22
Rep Power: 15 |
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...?
|
|
May 8, 2011, 03:21 |
|
#20 |
Administrator
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10 |
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.
|
|
|
|
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 |