# yPlus NACA 0012 Airfoil

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

March 6, 2019, 02:20
yPlus NACA 0012 Airfoil
#1
Member

Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9
Hi OpenFOAM Users,

I was trying to validate my NACA 0012 (Angle of Attack = 10 degree) simulation case using OpenFOAM (Version 5.0x). I created Mesh on Pointwise and successfully run this simulation and compared results of (Coefficient of Lift and Drag ) with experimental results that I got from NAS Technical Report: NAS-2016-01.

The Inputs parameters were as follow:

(1): Free Stream Velocity = 52.0783 m/s
(2): Mach Number = 0.15
(3): Free Stream Pressure ( (101325 pa) and Temperature (300 k )
(4): Density of air = 1.225
(5): Kinematic Viscosity = 8.6797*10^-6
(6): Reynolds Number = 6.0 *10^6
(7): Turbulence model used: Spalart-Allmaras
(8): Solver : simpleFoam
(9): O Grid used (Domain Size = 150 times the chord length)

Before running this case, I searched CFD Forum to know about the range of the Y+ values for the Spalart-Allmaras Turbulence Model and they mentioned that Y + should be (1 -300) if the wallFunction is in use. Then I choose Y+ =95 from which I calculated the First cell Height = 0.000423416232358 (got from online Y+ calculator).

with these settings , I got very good results for Cl and Cd which I compared with NASA results.

I have few doubts in this simulation that I would like to learn from the experts.....

(1): CFD forum mentioned that y+ should be equal to 1 or in between 1 to 300.I have selected y+ =95 form which I calculated the first cell height from y plus calculator. My question is why there is two ranges for the Y+ values? Am I using the right values of Y+ for calculating the First Cell Height. Although I am getting good results for Cl and Cd. I had little confusion in using the Y+ desired value for calculating the First Cell height.

(2): After running the case, I was interested to know the actual values of Y+ and for which I run this command in terminal

" simpleFoam -postProcess -func yPlus ". This creates the yPlus dat file in postProcess folder. This gives me Minimum, Maximum and Average values of yPlus for every time step.For last time step, I got these values

Minimum yPlus = 2.621476
Maximum yPlus = 231.6536
Average yPlus = 63.08180e

My question is that what value should I watch (I mean Minimum or Maximum or Average yPlus) so that I can confirm that my calculated Y+ value from the simulation is within the range for the Spalart-Allmaras Turbulence Model.

I am attaching my nut ,nuTilda, p and U files here.

Quote:
 /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 1.94e-05; boundaryField { airfoil { type nutUSpaldingWallFunction; Cmu 0.09; kappa 0.41; E 9.8; value uniform 0; } farfield { type freestream; freestreamValue uniform 1.94e-05; value uniform 1.94e-05; } frontAndback { type empty; } } // ************************************************** *********************** //

Quote:
 /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object nuTilda; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 7.5e-05; boundaryField { airfoil { type fixedValue; value uniform 0; } farfield { type freestream; freestreamValue uniform 7.5e-05; value uniform 7.5e-05; } frontAndback { type empty; } } // ************************************************** *********************** //

Quote:
 /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { airfoil { type zeroGradient; } farfield { type freestreamPressure; value uniform 0; } frontAndback { type empty; } } // ************************************************** *********************** //

Quote:
 /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (51.2871 9.0433 0); boundaryField { airfoil { type noSlip; } farfield { type freestream; freestreamValue uniform (51.2871 9.0433 0); value uniform (51.2871 9.0433 0); } frontAndback { type empty; } } // ************************************************** *********************** //

I would like to thank you in advance for clearing my doubts.

 March 6, 2019, 03:41 #2 Senior Member   Zander Meiring Join Date: Jul 2018 Posts: 125 Rep Power: 7 The basics of it is as follows: Y+ is a non-dimensional number that normalizes the distance away from a wall in fluid flow by using the wall shear stress, density and viscosity. Turbulent boundary layers comprise of 3 main zones. The first zone is called the laminar region, or the viscous sublayer. This region exists between y+ = 0 to ~11. When one talks about low-RE turbulence modelling, or solving the boundary layer, then it is implied that you attempt to solve this region explicitly. This will lead to the greatest accuracy in your simulation, but may lead to a very small first layer height requirement. Generally, the first layer height for solving through the boundary layer is such that y+ < 1 or < 0.3 depending on turbulence model. The next zone is called the buffer layer, and is most prominent between a y+ range of 11-30. The last zone is the log-law region, which exists from roughly y+ = 30 to 300. An alternative approach to turbulence modelling is called high-RE modelling, or making use of wall functions. A wall function 'plasters on' a predefined viscous and buffer region, so that it's only required to solve the log-law region. This allows for much larger first layer heights, which can improve simulation solve time and is normally more stable to solve. The downside of this is that it means the velocity gradient next to the wall may not always be correct, which may lead to difficulties in calculating viscous drag or flow separation. The general rule of thumb for using wall functions is to ensure your y+ is between ~50 and 300, with an average between 50 and 100. I find it interesting that you got such good results using wall functions, as aerofoils are particularly difficult to get accurate drag for, especially with wall functions.

March 6, 2019, 04:06
#3
Member

Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9
Quote:
 Originally Posted by yambanshee The basics of it is as follows: Y+ is a non-dimensional number that normalizes the distance away from a wall in fluid flow by using the wall shear stress, density and viscosity. Turbulent boundary layers comprise of 3 main zones. The first zone is called the laminar region, or the viscous sublayer. This region exists between y+ = 0 to ~11. When one talks about low-RE turbulence modelling, or solving the boundary layer, then it is implied that you attempt to solve this region explicitly. This will lead to the greatest accuracy in your simulation, but may lead to a very small first layer height requirement. Generally, the first layer height for solving through the boundary layer is such that y+ < 1 or < 0.3 depending on turbulence model. The next zone is called the buffer layer, and is most prominent between a y+ range of 11-30. The last zone is the log-law region, which exists from roughly y+ = 30 to 300. An alternative approach to turbulence modelling is called high-RE modelling, or making use of wall functions. A wall function 'plasters on' a predefined viscous and buffer region, so that it's only required to solve the log-law region. This allows for much larger first layer heights, which can improve simulation solve time and is normally more stable to solve. The downside of this is that it means the velocity gradient next to the wall may not always be correct, which may lead to difficulties in calculating viscous drag or flow separation. The general rule of thumb for using wall functions is to ensure your y+ is between ~50 and 300, with an average between 50 and 100. I find it interesting that you got such good results using wall functions, as aerofoils are particularly difficult to get accurate drag for, especially with wall functions.

You mean to say that my yPlus value calculated after running the simulation shold have average value between 50- 100. I am getting average yPlus = 63.08180, which means my calculated yPlus average value falles within the acceptable range of yPlus. Am I right ?

(2): you mentioned that

For last time step, I got these values

Minimum yPlus = 2.621476

Maximum yPlus = 231.6536

Average yPlus = 63.08180e

My minimum yPlus is not within the range you mentioned above (The general rule of thumb for using wall functions is to ensure your y+ is between ~50 and 300, with an average between 50 and 100).

I am still confused. Can you please explain it in more detail ?

 March 6, 2019, 04:22 #4 Senior Member   Join Date: Mar 2014 Posts: 112 Rep Power: 11 This shows the capability of the Spalding's law of the wall you used (nutUSpaldingWallFunction)...

March 6, 2019, 04:38
#5
Member

Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9
Quote:
 Originally Posted by mzzmrt This shows the capability of the Spalding's law of the wall you used (nutUSpaldingWallFunction)...
Hi Dear,

Can you please explain it in more detail as I did not get it.

 March 6, 2019, 04:52 #6 Senior Member   Join Date: Mar 2014 Posts: 112 Rep Power: 11 This wall function is based on the 1961 paper by D.B Spalding "A Single Formula for the Law of the Wall" and it can cover sub-layers within wider yPlus ranges (mostly) successfully unless it is very large. You can also read this paper : https://ntrs.nasa.gov/archive/nasa/c...9990081113.pdf

March 6, 2019, 12:36
#7
Member

Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9
Quote:
 Originally Posted by mzzmrt This wall function is based on the 1961 paper by D.B Spalding "A Single Formula for the Law of the Wall" and it can cover sub-layers within wider yPlus ranges (mostly) successfully unless it is very large. You can also read this paper : https://ntrs.nasa.gov/archive/nasa/c...9990081113.pdf
Thanks a lot Dear Mzzmrt for your quick reply. My question is what range of yPlus values does it cover ?

March 8, 2019, 02:35
#8
Senior Member

Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 7
Quote:
 Originally Posted by badwalgurpreet Thanks a lot Zander for your quick reply. You made this doubt clear. You mean to say that my yPlus value calculated after running the simulation shold have average value between 50- 100. I am getting average yPlus = 63.08180, which means my calculated yPlus average value falles within the acceptable range of yPlus. Am I right ? (2): you mentioned that For last time step, I got these values Minimum yPlus = 2.621476 Maximum yPlus = 231.6536 Average yPlus = 63.08180e My minimum yPlus is not within the range you mentioned above (The general rule of thumb for using wall functions is to ensure your y+ is between ~50 and 300, with an average between 50 and 100). I am still confused. Can you please explain it in more detail ?

in regards to your second point, this is one of the challenges of CFD turbulence modelling. Wall shear may vary greatly over a surface which will result in a large range of y+ values for the same first layer height. In an ideal world, you would like your minimum to be greater than 50, and your maximum be less than 100. In reality, this is very difficult to obtain due to things such as the stagnation point at the leading edge of a wing. In my experience, I try to ensure that "the majority" of my cells are within the 50-100 y+ range. If you want to be more exact about it, you may want to calculate what percentage of cells fall within that range, and decide for yourself if you are happy with that. It may be that only 4 or 5 cells are out of range, or it may be that all your cells are out of range, and that it just so happens that their average is within the range.

 Tags naca 0012, simplefoam, yplus