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

NACA 0012 Airfoil, simpleFoam, Spalart Allmaras

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2019, 15:56
Default NACA 0012 Airfoil, simpleFoam, Spalart Allmaras
  #1
Member
 
Gurpreet Singh
Join Date: Jan 2017
Posts: 31
Rep Power: 5
badwalgurpreet is on a distinguished road
Hi OpenFOAM Users,

I was trying to validate NACA 0012 (at different angles of attack) simulation case using OpenFOAM (Version 5.0x). I created Mesh on Pointwise and run this simulation and compared results of (Coefficient of Lift and Drag ) with experimental results that I got from ............

" https://turbmodels.larc.nasa.gov/NAC...on_expdata.dat "

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.1764
(5): Kinematic Viscosity = 1.57599*10^-5
(6): Reynolds Number = 6.0 *10^6
(7): Turbulence model used: Spalart-Allmaras
(8): Solver : simpleFoam
(9): O Grid used (Domain Size = 550 )
(10) : Wall Function used : nutUSpaldingWallFunction
(11) : Vhord Length = 1.8157


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

The coefficient of Lift is very close to Experimental results and the percentage difference between Simulation and Experimental results were in the range of 1 - 3 % as I increase the angle of attack from 2 degree to 12 degrees.

But Cd results were not good as compare to Experimental results. As I increase the angle of attack, the percentage difference between Simulation and Experimental results were in the range of 8 - 22 % as I increase the angle of attack from 2 degree to 12 degrees.

I would like to get valuable suggestions from the OpenFOAM experts. I am struggling
to get accurate results of Cd since last 2 months and I have also tried other mesh types like C type as well.

I am attaching here all the input files for NACA 0012 case simulated at A.O.A = 6.09 degrees.



Code:
/*--------------------------------*- 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;
    }
}


// ************************************************************************* //



Code:
/*--------------------------------*- 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;
    }
}


// ************************************************************************* //


Code:
/*--------------------------------*- 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;
    }
}


// ************************************************************************* //

Code:
/*--------------------------------*- 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.7844 5.52501 0);

boundaryField
{
    airfoil
    {
        type            noSlip;
    }
    farfield
    {
        type            freestream;
        freestreamValue uniform (51.7844 5.52501 0);
        value           uniform (51.7844 5.52501 0);
    }
    frontAndback
    {
        type            empty;
    }
}


// ************************************************************************* //



Code:
 /*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

transportModel  Newtonian;

rho             [1 -3 0 0 0 0 0] 1.1764; // Interpolated Value of rho at T = 300 k or 27 degree Celcius (values calculated from  P.Number =760, Fluid Mechanics by Munson, Young)

nu              [0 2 -1 0 0 0 0] 1.57599456e-05; // Interpolated Value of nu at T = 300 k or 27 degree Celcius

// ************************************************************************* //


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType RAS;

RAS
{
    RASModel        SpalartAllmaras;

    turbulence      on;

    printCoeffs     on;
}

// ************************************************************************* //


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss linearUpwind grad(U);
    div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda);
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}


// ************************************************************************* //


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-06;
        relTol          0.1;
        smoother        GaussSeidel;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps         2;
        tolerance       1e-08;
        relTol          0.1;
    }

    nuTilda
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps         2;
        tolerance       1e-08;
        relTol          0.1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;

    residualControl
    {
        p               1e-5;
        U               1e-5;
        nuTilda         1e-5;
    }
}

relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.7;
        nuTilda         0.7;
    }
}


// ************************************************************************* //

Code:
   /*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.x-68e8507efb72
Exec   : checkMesh
Date   : Apr 02 2019
Time   : 12:51:16
Host   : "gurpreet"
PID    : 5595
I/O    : uncollated
Case   : /home/gurpreet/Music/NACA0012-OGrid-SpalartAllmaras-differentAnglesofAttack/NACA0012AoA=6.09
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           188328
    internal points:  0
    faces:            374262
    internal faces:   185934
    cells:            93366
    faces per cell:   6
    boundary patches: 3
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     93366
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    airfoil             798      1596     ok (non-closed singly connected)  
    farfield            798      1596     ok (non-closed singly connected)  
    frontAndback        186732   188328   ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-507.947 -508.461 0) (509.358 508.461 1)
    Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
    Mesh has 2 solution (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (5.45386e-22 5.06118e-19 3.34258e-15) OK.
    Max cell openness = 7.27387e-16 OK.
    Max aspect ratio = 25.5172 OK.
    Minimum face area = 3.72576e-07. Maximum face area = 176.546.  Face area magnitudes OK.
    Min volume = 3.72576e-07. Max volume = 176.546.  Total volume = 812666.  Cell volumes OK.
    Mesh non-orthogonality Max: 13.0044 average: 0.547432
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 4.24249, 1 highly skew faces detected which may impair the quality of the results
  <<Writing 1 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

Code:
  After running the simulation , I got following values of yPlus

yPlus Min =3.92176 , yPlus Max =	126.818,  yPlus Ave =	53.5354

Please give me your valuable comments on this case so that I can run this case again to get the close values of Cd compare to experimental results.
badwalgurpreet is offline   Reply With Quote

Old   April 2, 2019, 23:50
Default
  #2
Member
 
Gurpreet Singh
Join Date: Jan 2017
Posts: 31
Rep Power: 5
badwalgurpreet is on a distinguished road
Can anybody provide me valuable comments on this topic ?
badwalgurpreet is offline   Reply With Quote

Old   April 3, 2019, 01:51
Default
  #3
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 185
Rep Power: 6
sheaker is on a distinguished road
Hello. Let me just quote myself:


Quote:
Originally Posted by sheaker View Post

I think You need a transitional model like k-omega SST or gamma re theta.
In Spalart-Allmaras model flow is fully turbulent everywhere so drag coefficient is overestimated.

Please correct me if I am wrong.

Best regards,
Oskar
sheaker is offline   Reply With Quote

Old   April 3, 2019, 01:56
Default
  #4
Member
 
Gurpreet Singh
Join Date: Jan 2017
Posts: 31
Rep Power: 5
badwalgurpreet is on a distinguished road
Hi Sheaker,

Thanks a lot for your valuable suggestiob on this topic. I looked number of forum question related to this topic but did not reach to conclusion. But I will work on your advice.

Did You try this Turbulent model?
badwalgurpreet is offline   Reply With Quote

Old   April 3, 2019, 02:15
Default
  #5
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 185
Rep Power: 6
sheaker is on a distinguished road
Unfortunately not.
I was trying to get right drag value without success. Then I asked my university teacher about this issue. He said that the reason is fully turbulent flow around airfoil and suggest me to use gamma re theta turbulence model. I was using openFoam 1.6ext without gamma re theta so I didn't tried it.



(Now, 3years later, I am trying to use transitional model in Fluent to get drag coefficient but there are issues with mesh generation.)


Best regards,
Oskar
sheaker is offline   Reply With Quote

Old   April 3, 2019, 02:59
Default
  #6
Member
 
Gurpreet Singh
Join Date: Jan 2017
Posts: 31
Rep Power: 5
badwalgurpreet is on a distinguished road
Thanks a lot Sheaker for your quick reply. I will work on KOmega SST turbulence model and will post my results.
badwalgurpreet is offline   Reply With Quote

Old   April 3, 2019, 12:11
Default
  #7
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 185
Rep Power: 6
sheaker is on a distinguished road
Quote:
Originally Posted by badwalgurpreet View Post
Thanks a lot Sheaker for your quick reply. I will work on KOmega SST turbulence model and will post my results.
It would be great to hear if You managed to get right drag coefficient.


Best regards,
Oskar
sheaker is offline   Reply With Quote

Old   September 23, 2019, 00:55
Default
  #8
Member
 
chengan.wang
Join Date: Jan 2016
Location: china
Posts: 33
Rep Power: 6
wangchengan2003 is on a distinguished road
Send a message via Skype™ to wangchengan2003
Hello Gurpreet Singh,
I am working on the similar problem like you. I create the mesh with pointwise, too. I use checkmesh to make a examination, it looks fine
Quote:
Overall number of cells of each type: hexahedra: 14014 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology airFoil2D 154 308 ok (non-closed singly connected) farfield 154 308 ok (non-closed singly connected) frontAndBack 28028 28336 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-4.99867 -5.67032 0) (6.78888 5.66637 3) Mesh (non-empty, non-wedge) directions (1 1 0) Mesh (non-empty) directions (1 1 0) All edges aligned with or perpendicular to non-empty directions. Boundary openness (-1.85094e-17 2.46792e-17 -2.22841e-16) OK. Max cell openness = 4.12267e-15 OK. Max aspect ratio = 170.167 OK. Minimum face area = 4.43442e-08. Maximum face area = 1.67744. Face area magnitudes OK. Min volume = 1.33032e-07. Max volume = 0.378026. Total volume = 313.461. Cell volumes OK. Mesh non-orthogonality Max: 17.8429 average: 1.07748 Non-orthogonality check OK. Face pyramids OK. Max skewness = 1.9585 OK. Coupled point location match (average 0) OK. Mesh OK. End

But when the mesh files are taken into the calcualtion case,

Quote:
smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 156.2, No Iterations 1000 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 4.72215, No Iterations 1000 GAMG: Solving for p, Initial residual = 1, Final residual = 2.66928e+147, No Iterations 1000 time step continuity errors : sum local = 1.37947e+146, global = 9.17194e+129, cumulative = 9.17194e+129 #0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::GaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:? #4 Foam::GaussSeidelSmoother::smooth(Foam::Field<doub le>&, Foam::Field<double> const&, unsigned char, int) const at ??:? #5 Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:? #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? #8 Foam::fvMatrix<double>::solve() at ??:? #9 Foam::incompressible::RASModels::SpalartAllmaras:: correct() at ??:? #10 ? at ??:? #11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #12 ? at ??:? Floating point exception (core dumped)
When I use Construct2D or snappyHexmesh, the case could run without problem. Could you show me the way you create mesh with pointwise? If it is possible, you could send your files to my email: wangchengan2003@163.com
Thank you very much!
wangchengan2003 is offline   Reply With Quote

Old   September 26, 2019, 13:48
Default
  #9
Member
 
Arthur
Join Date: Aug 2014
Location: Italy
Posts: 38
Rep Power: 7
Artur.Ant is on a distinguished road
You can also try to pass to more accurate divSchemes.
Have you tried to use Gauss linear for all div(...)?
Artur.Ant is offline   Reply With Quote

Old   September 26, 2019, 13:52
Default
  #10
Member
 
Arthur
Join Date: Aug 2014
Location: Italy
Posts: 38
Rep Power: 7
Artur.Ant is on a distinguished road
Remember also that if you are interested in drag it is very important to solve correctly the velocity near the wall.
You should solve viscous sublayer with k-omega or k-omegaSST (how sheaker has already mentioned).
For good results I recommend to put at least 10 cells in the region with y+<1.
Artur.Ant is offline   Reply With Quote

Reply

Tags
naca 0012, simplefoam, spalart allamras

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
2D NACA 0012 Airfoil Validation Case (NASA) jp3g12 OpenFOAM Running, Solving & CFD 21 October 2, 2019 18:27
Ffd_control_point_2d feiyi SU2 4 September 30, 2019 13:42
yPlus NACA 0012 Airfoil badwalgurpreet OpenFOAM Running, Solving & CFD 7 March 8, 2019 02:35
High drag for airfoil compared to XFOIL and wind tunnel data Ry10 SU2 15 October 30, 2016 18:27
2D FFD Optimization RLangtry SU2 2 August 5, 2014 10:48


All times are GMT -4. The time now is 09:57.