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

yPlus NACA 0012 Airfoil

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2019, 02:20
Default yPlus NACA 0012 Airfoil
  #1
Member
 
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9
badwalgurpreet is on a distinguished road
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.
badwalgurpreet is offline   Reply With Quote

Old   March 6, 2019, 03:41
Default
  #2
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8
yambanshee is on a distinguished road
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.
yambanshee is offline   Reply With Quote

Old   March 6, 2019, 04:06
Default
  #3
Member
 
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9
badwalgurpreet is on a distinguished road
Quote:
Originally Posted by yambanshee View Post
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.
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 ?
badwalgurpreet is offline   Reply With Quote

Old   March 6, 2019, 04:22
Default
  #4
Senior Member
 
Join Date: Mar 2014
Posts: 112
Rep Power: 12
mzzmrt is on a distinguished road
This shows the capability of the Spalding's law of the wall you used (nutUSpaldingWallFunction)...
mzzmrt is offline   Reply With Quote

Old   March 6, 2019, 04:38
Default
  #5
Member
 
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9
badwalgurpreet is on a distinguished road
Quote:
Originally Posted by mzzmrt View Post
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.
badwalgurpreet is offline   Reply With Quote

Old   March 6, 2019, 04:52
Default
  #6
Senior Member
 
Join Date: Mar 2014
Posts: 112
Rep Power: 12
mzzmrt is on a distinguished road
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
mzzmrt is offline   Reply With Quote

Old   March 6, 2019, 12:36
Default
  #7
Member
 
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9
badwalgurpreet is on a distinguished road
Quote:
Originally Posted by mzzmrt View Post
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 ?
badwalgurpreet is offline   Reply With Quote

Old   March 8, 2019, 02:35
Default
  #8
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8
yambanshee is on a distinguished road
Quote:
Originally Posted by badwalgurpreet View Post
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.
yambanshee is offline   Reply With Quote

Reply

Tags
naca 0012, simplefoam, yplus


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SU2 AOA optimization 454514566@qq.com SU2 9 March 7, 2022 17:17
Ffd_control_point_2d feiyi SU2 4 September 30, 2019 13:42
High drag for airfoil compared to XFOIL and wind tunnel data Ry10 SU2 15 October 30, 2016 18:27
2way fsi over naca 0012 airfoil drooleybob FLUENT 3 June 27, 2016 22:42
2D FFD Optimization RLangtry SU2 2 August 5, 2014 10:48


All times are GMT -4. The time now is 15:12.