CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

How to calculate y-plus?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree20Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 17, 2013, 14:11
Default How to calculate y-plus?
  #1
New Member
 
Roger Liu
Join Date: Nov 2012
Posts: 8
Rep Power: 4
rogerliu is on a distinguished road
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!
rogerliu is offline   Reply With Quote

Old   April 17, 2013, 17:41
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
hi
Type yPlusRAS or yPlusLES
If you have ras or les turbulency.

Last edited by immortality; April 18, 2013 at 06:29.
immortality is offline   Reply With Quote

Old   April 18, 2013, 04:21
Default
  #3
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 236
Rep Power: 8
fredo490 is on a distinguished road
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
fredo490 is offline   Reply With Quote

Old   April 18, 2013, 06:49
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
I wonder how we can calculate y+ at a laminar flow without any turbulent model? is it possible?
immortality is offline   Reply With Quote

Old   April 18, 2013, 07:01
Default
  #5
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 236
Rep Power: 8
fredo490 is on a distinguished road
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.
fredo490 is offline   Reply With Quote

Old   July 1, 2013, 09:34
Default
  #6
Member
 
Vasileios Sassanis
Join Date: Nov 2012
Posts: 76
Rep Power: 4
VSass is on a distinguished road
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?
VSass is offline   Reply With Quote

Old   July 1, 2013, 09:44
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   July 1, 2013, 10:15
Default
  #8
Member
 
Vasileios Sassanis
Join Date: Nov 2012
Posts: 76
Rep Power: 4
VSass is on a distinguished road
I use high Re.
VSass is offline   Reply With Quote

Old   July 1, 2013, 11:18
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   July 1, 2013, 12:10
Default
  #10
Member
 
Vasileios Sassanis
Join Date: Nov 2012
Posts: 76
Rep Power: 4
VSass is on a distinguished road
I use yPlusRAS but it needs the "nut" values for each time step. My solution outputs "mut" files. That's the problem.
VSass is offline   Reply With Quote

Old   July 1, 2013, 12:21
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   July 1, 2013, 12:25
Default
  #12
Member
 
Vasileios Sassanis
Join Date: Nov 2012
Posts: 76
Rep Power: 4
VSass is on a distinguished road
Honestly,thanks!
VSass is offline   Reply With Quote

Old   July 3, 2013, 05:27
Default
  #13
Member
 
Vasileios Sassanis
Join Date: Nov 2012
Posts: 76
Rep Power: 4
VSass is on a distinguished road
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.
VSass is offline   Reply With Quote

Old   July 3, 2013, 08:23
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   February 26, 2014, 22:23
Default
  #15
New Member
 
caoyong
Join Date: Nov 2013
Location: Tokyo, Japan
Posts: 3
Rep Power: 3
caoyinyue is on a distinguished road
Quote:
Originally Posted by VSass View Post
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
caoyinyue is offline   Reply With Quote

Old   January 8, 2015, 13:28
Default
  #16
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 181
Rep Power: 5
Alhasan is on a distinguished road
Quote:
Originally Posted by fredo490 View Post
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 NACA0012 Validation Accuracy Improvement

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.
Alhasan is online now   Reply With Quote

Old   January 8, 2015, 16:54
Default
  #17
Member
 
Petr Furmanek
Join Date: Jan 2012
Location: Prague, Czech Republic
Posts: 60
Rep Power: 5
petr.f. is on a distinguished road
Quote:
Originally Posted by Alhasan View Post
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.
petr.f. is offline   Reply With Quote

Old   January 8, 2015, 17:17
Default
  #18
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 181
Rep Power: 5
Alhasan is on a distinguished road
Hey Petr,

Thanks for your reply,

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: NACA0012 Validation Accuracy Improvement

on short note im just simulating a NACA 0012 airfoil

Quote:
Originally Posted by petr.f. View Post
- 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
File Type: jpg YStar.jpg (33.3 KB, 32 views)
File Type: jpg YPlus.jpg (29.4 KB, 25 views)
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius
Alhasan is online now   Reply With Quote

Old   January 8, 2015, 18:15
Default
  #19
Member
 
Petr Furmanek
Join Date: Jan 2012
Location: Prague, Czech Republic
Posts: 60
Rep Power: 5
petr.f. is on a distinguished road
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" - OpenFOAM mesh generation of an aerofoil

P.
Attached Images
File Type: jpg mesh.jpg (96.1 KB, 32 views)
petr.f. is offline   Reply With Quote

Old   January 8, 2015, 18:35
Default
  #20
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 181
Rep Power: 5
Alhasan is on a distinguished road
Hi Petr,

Thanks for you reply,

Quote:
Originally Posted by petr.f. View Post
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. View Post
- 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. View Post
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
File Type: jpg Screen Shot 2015-01-08 at 22.20.45.jpg (49.4 KB, 25 views)
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius
Alhasan is online now   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem to calculate grad(U) using swak4Foam Hugoles OpenFOAM Post-Processing 11 September 25, 2014 19:07
how to calculate flow properties along the first grid point near to the wall kiran OpenFOAM Post-Processing 2 September 12, 2010 12:59
calculate values for eps and k from Re or u????? sbar OpenFOAM Pre-Processing 5 August 16, 2010 04:10
How to calculate Torque for francis turbine manish CFX 4 March 15, 2007 03:57
How to calculate density of solid phase zhou Main CFD Forum 0 December 17, 1999 20:06


All times are GMT -4. The time now is 02:41.