CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to calculate y-plus? (http://www.cfd-online.com/Forums/openfoam-solving/116358-how-calculate-y-plus.html)

 rogerliu April 17, 2013 14:11

How to calculate y-plus?

My case is unsteady flow past a cylinder using LES. Re=3900
How can I calculate the y-plus?
does y-plus refer the distance from the first grid to the wall? Is it the smaller, the better?

Thanks!

 immortality April 17, 2013 17:41

hi
Type yPlusRAS or yPlusLES
If you have ras or les turbulency.

 fredo490 April 18, 2013 04:21

Hello, y+ refers to the size of the mesh next to the wall compared to the fluid behavior. This number helps you to know where is your first cell center compared to the boundary layer thickness.

If you didn't study any boundary layer theory, you have to know that a boundary layer is composed of different parts. The one very close to the wall is dominated by viscous effects (= the viscous layer) and a bit outer you have the log layer.

To get an accurate simulation, your first cell center must be inside the viscous layer. We usually consider that a y+ smaller than 4 is required. Ideally, you should have a y+ smaller than 1 on all your surface. But there is no need to go to 1e-3 !

Be careful, the size of your first cell must correspond to your turbulence model. For example a RAS k-omega SST requires a y+ smaller than 1 but a k-epsilon standard requires a y+ between 30 and 60. I don't know about LES simulation but I guess it should be smaller than 1.

To get the yPlus, you can only do it as a post treatment (because you need to compute the velocity first). To get it, simply type "yPlusRas" or "yPlusLes" depending of your turbulence model. You can also write "yPlusLes -h" to get some help.

For example: yPlusRas -latestTime -compressible will only compute the yplus for your last export and it will apply a compressible correction (only use it with a compressible solver).

To get a rough estimation of the cell size you need next to the wall, you can use this tool:
http://www.cfd-online.com/Tools/yplus.php

 immortality April 18, 2013 06:49

I wonder how we can calculate y+ at a laminar flow without any turbulent model? is it possible?

 fredo490 April 18, 2013 07:01

At first the y+ has nothing to do with CFD but it has to do with the boundary layer theory (this number was created in the 1930's). The definition is here : http://www.cfd-online.com/Wiki/Dimen...stance_(y_plus)

Yes this number has a meaning for a laminar flow but we don't really care for CFD cases. It is mainly used for turbulent flow because the models we use are based on some assumptions that need to be verified.

 VSass July 1, 2013 09:34

I have some problems calculating y+ during a compressible flow. I use Spalart-Allmaras model and the output in the results files is mut, not nut, which is prerequisite for the calculation of y+. Any ideas?

 immortality July 1, 2013 09:44

hi
search this site.there are some good threads with y+ for compressible flows.
do you use low-Re or high-Re?

 VSass July 1, 2013 10:15

I use high Re.

 immortality July 1, 2013 11:18

then use yPlusRAS -compressible its for high-Re models Vasilios.

 VSass July 1, 2013 12:10

I use yPlusRAS but it needs the "nut" values for each time step. My solution outputs "mut" files. That's the problem.

 immortality July 1, 2013 12:21

type: "yPlusRAS -compressible" not only yPlusRAS

 VSass July 1, 2013 12:25

Honestly,thanks!

 VSass July 3, 2013 05:27

Well, using yPlusRAS -compressible works, but it plots a value of "0" in the field. Mut has an accepted distribution , but how come the distribution of yPlus is zero?

 immortality July 3, 2013 08:23

where in the field? whats your case? if its something like shockTube maybe the flow has not reached there.

 caoyinyue February 26, 2014 22:23

Quote:
 Originally Posted by VSass (Post 437506) Well, using yPlusRAS -compressible works, but it plots a value of "0" in the field. Mut has an accepted distribution , but how come the distribution of yPlus is zero?
Hello, I used the yPlusLES for calculating the incompressible flow field. the distribution of yplus is alos zero. It is very strange. Have you found any solution? Could you give me some hint? Thanks very much

 Alhasan January 8, 2015 13:28

Quote:
 Originally Posted by fredo490 (Post 421448) Hello, y+ refers to the size of the mesh next to the wall compared to the fluid behavior. This number helps you to know where is your first cell center compared to the boundary layer thickness.
Hello FOAMers and Frédéric,

Edit: Continuation from http://www.cfd-online.com/Forums/ope...provement.html

Please correct me if I am wrong

From reading all the posts my understanding of y+ is that we have an approximate estimation using the online calculators and once the simulation is done using the estimated y for the required y+ we use the Existing OpenFOAM utilities to calculate the actual y+ values am I right ?

I have used the online tools to estimate my Y distance for a required y+ value of 30. Then after running my simulations the openFOAM utilities say that my y+ value is 12. so Now I believe to get much accurate flow behaviour close to the wall I have to change the size of the y again !!!.

I have completed my simulation and OpenFOAM says my y+ value is 12 and I want it to be 30. My question is how do i determine the size of my first cell that is my Y distance now !.

And also my Y distance should be varying around my geometry right ? since flow behaves differently and Y+ value after the simulation is different all around the airfoil how do I determine the Y distances for different regions.

Regards,
Hasan K.J

 petr.f. January 8, 2015 16:54

Quote:
 Originally Posted by Alhasan (Post 526625) From reading all the posts my understanding of y+ is that we have an approximate estimation using the online calculators and once the simulation is done using the estimated y for the required y+ we use the Existing OpenFOAM utilities to calculate the actual y+ values am I right ?
- Yes, that's the usual way. At first you have to decide what level of precision in turbulence modelling in boundary layer do you need (nice overview: http://www.bakker.org/dartmouth06/engs150/11-bl.pdf).

Quote:
 I have used the online tools to estimate my Y distance for a required y+ value of 30. Then after running my simulations the openFOAM utilities say that my y+ value is 12. so Now I believe to get much accurate flow behaviour close to the wall I have to change the size of the y again !!!.
- Not necessarily. It is true, that the simulation with y+ - 12 is more accurate than the one with y+ = 30, but in both cases you already don't capture behaviour in the viscous sublayer, you have to use the wall functions approach and hence model the buffer layer (at best). So the overall level of precision is the same. What differs is the refinement level of computational mesh (and the total number of cells). If you want shorter computational times then yes - re-mesh the case.

Quote:
 I have completed my simulation and OpenFOAM says my y+ value is 12 and I want it to be 30. My question is how do i determine the size of my first cell that is my Y distance now !.
- what y+ is 12? The minimal or the average?

Quote:
 And also my y+ should be varying around my geometry right ? since flow behaves differently how do I determine the y distances for different regions.
- usually you set your minimal y+ to the desired value for the largest cells in your "critical" region (e.g. the one with separation or highest velocity...) so you are estimating y+ for the "worst" case.

P.

 Alhasan January 8, 2015 17:17

2 Attachment(s)
Hey Petr,

Let me explain what I am trying to do so you will get a better idea of what is happening I have described it in a different post here: http://www.cfd-online.com/Forums/ope...provement.html

on short note im just simulating a NACA 0012 airfoil

Quote:
 Originally Posted by petr.f. (Post 526655) - what y+ is 12? The minimal or the average?
Code:

`Patch 0 named CURV1 y+ : min: 0 max: 12.6672 average: 4.48469`
I had calculated using the online Y+ estimator that for a Y+ of 30 the Y distance was 0.00033 meters for my case and I had meshed with 0.00033 as my first cell height around my airfoil using ICEM. I wanted Y+ as 30 since I wanted to use the wall functions and I have used wall functions for my simulation using KW-SST.

I have also attached an image of the Y+ and Y* distribution on the upper and lower surface of the Airfoil. I have used one of the altered yPlus utilities on the forums to find my y+ values as the existing yPlusRANS supposedly calculates y*.

I got into this Y+ checking because of the results I was getting was not great as shown in the other post I have provided link above.

- So my question is To be accurate should I have a Y+ of 30 (using WF) around the airfoil equally If yes, How will I calculate the Y distance needed for every region.

Thanks,
Hasan K.J

 petr.f. January 8, 2015 18:15

1 Attachment(s)
Hi Hasan,

you don't have to generate the mesh so that your y+ is 30 all over the profile. Actually I don't think that's even possible. From your simulations you already know the maximal velocity on the profile. I would use it for new delta s estimate for desired y+ and generate the mesh with y+ = 30 in this region (so it will be smaller in other areas).

- what are your boundary conditions for k and omega on the profile (slip wall) in the no-WF simulations?
- what is the topology of your mesh (H mesh, C mesh, O mesh) ? 200000 cells for 2D case is quite a lot. For your purpose I would go for a C-mesh with ~ 50000 cells (and that's with y+ = 1), like the one in the attached picture. Such a mesh you can get easily from Tecplot (if you have the license, not sure if they still offer time-limited demo) or Gridpro (the academic license used to be free) or with a little effort from cMesh or "simple simple airfoil mesher" - http://www.cfd-online.com/Forums/ope...-aerofoil.html

P.

 Alhasan January 8, 2015 18:35

1 Attachment(s)
Hi Petr,

Quote:
 Originally Posted by petr.f. (Post 526667) I would use it for new delta s estimate for desired y+ and generate the mesh with y+ = 30 in this region (so it will be smaller in other areas).
- What do you mean by delta s estimate ? you mean to say I have to use the new velocity to get the y distance estimate using the online calculators

Quote:
 Originally Posted by petr.f. (Post 526667) - what are your boundary conditions for k and omega on the profile (slip wall) in the no-WF simulations?
I have used fixed value on the airfoil surface wall with no slip
Code:

```    {         type            fixedValue;         value          uniform 1e-11;     }```
Quote:
 Originally Posted by petr.f. (Post 526667) what is the topology of your mesh ?
You are absolutely right 200,000 quite a lot but since I had good computation power just stuck to it how ever I had done a mesh dependency test with approximately 8 cases with no elements varying from 50,000 to 800,000.

Edit: I think my 200,000 is only as good as your 50,000 as my domain is big !!

I have used a C mesh and I have used ICEM and I have grown quite comfortable with that software as you can control the mesh very well with that software and I do have license for techplot360.

However I am interested in your meshing topology does it come under C-Mesh..? and isn't the outlet very close to the airfoil My domain is massive just to avoid any BC problems as suggested in the literature I have 10c above and 10 c below my geometry and 20c behind my airfoil as shown in the image, the mesh look ridiculously dense it is not its just paraFoam showing it like that.

I did go with the y+ of 1 for all my Mesh dependancy cases like u had suggested but the results were not promising but the result with WF looks some what reasonable and I am hoping for better results after the Y+ correction

Regards,
Hasan K.J

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