I am running a 2-D airfoil simulation at M=0.3, Re = 6e6, and I want to set up my simulation with y+ ~ 30 to use the SST turbulence model effectively. When I run yPlusRAS, I get the following values for yPlus: min: 2.89107 max: 48.1331 average: 18.4332. I plotted yPlus vs x/c to find the locations where y+ deviates most from the desired value, and now I want to plot y vs x/c to find out how I can alter the mesh to achieve a more consistent y+. However, when I run yPlusRAS the data I get in the 'y' file is not of much use:
y+ = u* y / nu
u* = sqrt(tau_w / rho)
tau_w = mu * (du/dy)@y=0
I calculate a different tau_w than OF when I use OF's wallGradU for (du/dy)@y=0;
I calculate a different y+ than OF when I use OF's tau_w & y.
I think it is clear that y is not being calculated properly, at least not output to file properly, and it does not make sense to me that tau_w is not reproducible. I believe that y+ is being reported properly, but I am frustrated that I cannot reproduce it. I think y is wrong because this website:
Suggests I need a y of 0.0001356 m to get y+ = 30, and that is the number I used to generate the mesh. Has anyone tried to calculate y+ manually like this and succeeded? I would appreciate any advice that could be offered.
Have you seen this thread?
yPlusRANS gives you ystar ( and yes this is confusing),
you should be able to calculate yPlus using the tool from Niklas in post 8.
The file "y" that it produces is identical. The file "yPlus" that it produces gives me lower values of y+, that are zero in some cases. Unfortunately, without an accurate list of y values it is not possible to check the y+ calculation manually. Any ideas?
yPlusRAS: min: 2.70987 max: 40.6757 average: 17.2329
yPlus: min: 0 max: 36.9822 average: 9.29129
A second issue is the calculation of tau_w: I cannot reproduce this from dU/dx, which concerns me for two reasons: 1) I use tau_w in determining y+ manually, and 2) I use tau_w in determining Cd. Any advice?
Sorry for my late answer,
I think the y values are given in the cell centers which should explain
your value on the wing. I get a list in my y file with values for the cells.
So you can use the spreadsheet view in paraview and select a cell to get the exact cell value and then compare to the yPlus value
This was useful for me: http://www.paraview.org/Wiki/Data_Selection
Overview yPlus methods
I spend some hours to find out what the yPlusRAS utility is doing. I calculated yplus with four different methods:
1) yPlusRAS utility
2) ystar from the k at the wall: y*= Cmu^0.25*k^0.5*rho*y_wall /mu.
3) yplus using the wallShearStress utility: y+=tau^0.5*rho*y_wall /mu
4) yplus using the wallgradU utility: y+=(mu*du/dy)^0.5*rho*y_wall /mu
- The tau openfoam is calculating is nu*du/dy. Multiplying with rho will give the wallShear stress in Pa as in most formulas in books and on the web.
- Use the cell center (height of the cell devided by two) for y_wall.
I get exactly the same values for method 1) and 2). Method 3) and 4) are giving different results, see plot.
Looking in the code, the wallGradU utility is using:
wallGradU.boundaryField()[patchi] = -U.boundaryField()[patchi].snGrad();
which is the same as in the yplus utility going around on this forum. The wallShearStress utility is using:
wallShearStress.boundaryField()[patchi] = (-mesh.Sf().boundaryField()[patchi]/mesh.magSf().boundaryField()[patchi]) & Reff.boundaryField()[patchi];
But what is correct? I don't know yet. However, I think I will use the yPlusRAS utility since fluent is doing the same.
For 3) and 4) to be the same, you must consider mut (compressible) or nut (incompressible). See this thread:
As for 1 & 2 and 3 & 4 being different from each other, that is the subject of many threads - yPlusRAS calculates y* and not y+.
So using the corrected yPlus Utility from here: http://www.cfd-online.com/Forums/ope...earstress.html
calculates the right y+ values for a completed simulation am I right ?
My question is how do we now determine the Y distance which will be varying through out the airfoil and implement it within the mesh ? for capturing the flow better closer to the airfoil.
It has been a while since I looked at it but I believe you are correct, that utility will calculate y+ in place of y*, though the Fluent guide states that the two should be similar under some conditions - I do not recall what conditions, though - suggest you check the guide.
As for determining the wall distance of the first layer of cells, you could calculate the minimum required distance to achieve the maximum desired y+ and apply that single value all over the airfoil, or calculate it by cell on the airfoil (probably unnecessary and difficult to mesh).
Hope this helps. Good luck!
|All times are GMT -4. The time now is 13:20.|