# How to calculate y-plus?

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 17, 2013, 14:11 How to calculate y-plus? #1 New Member   Roger Liu Join Date: Nov 2012 Posts: 8 Rep Power: 6 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!

 April 17, 2013, 17:41 #2 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 hi Type yPlusRAS or yPlusLES If you have ras or les turbulency. mj20 likes this. Last edited by immortality; April 18, 2013 at 06:29.

 April 18, 2013, 04:21 #3 Senior Member   HECKMANN Frédéric Join Date: Jul 2010 Posts: 237 Rep Power: 10 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 sharonyue, vbnhfylbh, immortality and 20 others like this.

 April 18, 2013, 06:49 #4 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 I wonder how we can calculate y+ at a laminar flow without any turbulent model? is it possible?

 April 18, 2013, 07:01 #5 Senior Member   HECKMANN Frédéric Join Date: Jul 2010 Posts: 237 Rep Power: 10 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. immortality likes this.

 July 1, 2013, 09:34 #6 Member   VS Join Date: Nov 2012 Posts: 78 Rep Power: 6 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?

 July 1, 2013, 09:44 #7 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 hi search this site.there are some good threads with y+ for compressible flows. do you use low-Re or high-Re? __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked.

 July 1, 2013, 10:15 #8 Member   VS Join Date: Nov 2012 Posts: 78 Rep Power: 6 I use high Re.

 July 1, 2013, 11:18 #9 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 then use yPlusRAS -compressible its for high-Re models Vasilios. __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked.

 July 1, 2013, 12:10 #10 Member   VS Join Date: Nov 2012 Posts: 78 Rep Power: 6 I use yPlusRAS but it needs the "nut" values for each time step. My solution outputs "mut" files. That's the problem.

 July 1, 2013, 12:21 #11 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 type: "yPlusRAS -compressible" not only yPlusRAS __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked.

 July 1, 2013, 12:25 #12 Member   VS Join Date: Nov 2012 Posts: 78 Rep Power: 6 Honestly,thanks!

 July 3, 2013, 05:27 #13 Member   VS Join Date: Nov 2012 Posts: 78 Rep Power: 6 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? caoyinyue likes this.

 July 3, 2013, 08:23 #14 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 where in the field? whats your case? if its something like shockTube maybe the flow has not reached there. __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked.

February 26, 2014, 22:23
#15
New Member

caoyong
Join Date: Nov 2013
Location: Tokyo, Japan
Posts: 3
Rep Power: 5
Quote:
 Originally Posted by VSass 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

January 8, 2015, 13:28
#16
Senior Member

Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 199
Rep Power: 7
Quote:
 Originally Posted by fredo490 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.

Thanks a lot for your time and reply,

Regards,
Hasan K.J
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius

Last edited by Alhasan; February 1, 2015 at 09:44.

January 8, 2015, 16:54
#17
Member

Petr Furmanek
Join Date: Jan 2012
Location: Faenza, Italy
Posts: 65
Rep Power: 7
Quote:
 Originally Posted by Alhasan 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.

January 8, 2015, 17:17
#18
Senior Member

Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 199
Rep Power: 7
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. - 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
Attached Images
 YStar.jpg (33.3 KB, 183 views) YPlus.jpg (29.4 KB, 134 views)
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius

January 8, 2015, 18:15
#19
Member

Petr Furmanek
Join Date: Jan 2012
Location: Faenza, Italy
Posts: 65
Rep Power: 7
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).

However, after reading your other post I have two questions:
- 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.
Attached Images
 mesh.jpg (96.1 KB, 139 views)

January 8, 2015, 18:35
#20
Senior Member

Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 199
Rep Power: 7
Hi Petr,

Thanks for you reply,

Quote:
 Originally Posted by petr.f. 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. - 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. 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
Attached Images
 Screen Shot 2015-01-08 at 22.20.45.jpg (49.4 KB, 111 views)
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Hugoles OpenFOAM Post-Processing 11 September 25, 2014 19:07 kiran OpenFOAM Post-Processing 2 September 12, 2010 12:59 sbar OpenFOAM Pre-Processing 5 August 16, 2010 04:10 manish CFX 4 March 15, 2007 03:57 zhou Main CFD Forum 0 December 17, 1999 20:06

All times are GMT -4. The time now is 14:53.

 Contact Us - CFD Online - Privacy Statement - Top