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

2D airfoil simulations overpredicting drag

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Yann
  • 1 Post By Yann
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2024, 15:53
Default 2D airfoil simulations overpredicting drag
  #1
New Member
 
Katherine
Join Date: Feb 2016
Posts: 20
Rep Power: 10
kaszt is on a distinguished road
Hi,

I'm interested in simulating simple 2-D flow over a NACA0012 airfoil, starting with an AoA of 12 degrees. I'm using the k-omega SST turbulence model for closure, with the freestream velocity at 100 m/s, corresponding to a Re # of ~6.6 million. I've used a separate script to setup the mesh with OpenFOAM's blockMesh capabilities, and have been working on refining the mesh to a sufficient point without being too computationally intensive. However, throughout this effort, I have consistently been over-predicting the drag by several orders of magnitude. Comparing with a similar Re # from inviscid results obtained from XFLR5, Cd should be around 0.013, but I am getting around 0.17, an order-of-magnitude of 10 higher. The lift coefficient is a bit better, at 1.09 (XFLR5 is around 1.3). Without comparing to other results I know the drag is wrong. I've included the controlDict file here:


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

application     rhoPimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         5;

deltaT          2e-5;

writeControl     adjustableRunTime;

    //div(phi,U)      bounded Gauss linear;
    //div(div(phi,U)) Gauss linear;

writeInterval   0.005;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep    yes;

maxCo        1.5;

functions
{
    #includeFunc residuals
    #includeFunc forces
    #includeFunc forceCoefficients
}



// ************************************************************************* //
The fvSolution and fvScheme files can be seen below:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  10
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        smoother        GaussSeidel;
        tolerance       1e-6;
        relTol          0.01;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    "(rho|U|k|omega|e)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-6;
        relTol          0.1;
    }

    "(rho|U|k|omega|e)Final"
    {
        $U;
        relTol          0;
    }
}

SIMPLE
{
    residualControl
    {
        p               1e-4;
        U               1e-4;
        "(k|omega|e)"   1e-4;
    }

    nNonOrthogonalCorrectors 0;
}

PIMPLE
{
    nCorrectors              2;
    nNonOrthogonalCorrectors 0;
    nOuterCorrectors         10;
}

relaxationFactors
{
    equations
    {
        ".*"     0.3;
    }
}

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  10
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;

    limited         cellLimited Gauss linear 1;
    grad(U)         $limited;
    grad(k)         $limited;
    grad(omega)     $limited;
}

divSchemes
{
    default             none;

    div(phi,U)          Gauss linearUpwind limited;

    turbulence          Gauss linearUpwind limited;
    energy              Gauss linearUpwind limited;

    div(phi,k)          $turbulence;
    div(phi,omega)      $turbulence;

    div(phi,e)          $energy;
    div(phi,K)          $energy;
    div(phi,Ekp)        $energy;
    div(phi,(p|rho))    $energy;

    div((phi|interpolate(rho)),p) Gauss upwind;

    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}

// ************************************************************************* //
I wanted to ask the community what I might be missing. Has anyone run into problems with overestimating drag for airfoil simulations with OF? Any comments, feedback, or suggestions would be much appreciated. Thank you!
Attached Images
File Type: png alpha_cl_polar_CFD_XFLR5_compare.png (30.3 KB, 12 views)
File Type: png cl_cd_polar_CFD_XFLR5_compare.png (30.0 KB, 8 views)
kaszt is offline   Reply With Quote

Old   May 31, 2024, 07:30
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello,

How is defined your forceCoeffs function? Couldn't it be an issue with the reference frame used to compute the coefficients? (liftDir and dragDir?)

Yann
wkernkamp likes this.
Yann is offline   Reply With Quote

Old   June 1, 2024, 02:31
Default
  #3
New Member
 
Katherine
Join Date: Feb 2016
Posts: 20
Rep Power: 10
kaszt is on a distinguished road
It could be, I can definitely look into that. Here is the forceCoefficients and forces definitions:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      Force;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
forceCoefficients
    {
        type        forceCoeffs;
        functionObjectLibs  ("libforces.so");
        writeControl   timeStep;
        writeInterval  1;
        patches     ("surfaces");
        
        writeFields no;
        
        log         true;
        patches     ("surface");
        pName       p;
        UName       U;
        dragDir     (1 0 0);
        liftDir     (0 1 0);
        pitchAxis   (0 0 1);
        CofR        (-0.75 0 0);
        magUInf     100; // free stream velocity; inlet condition!!
        lRef        1;
        Aref        1; //0.79; // cross sectional area; should be this instead of 1
    
        rhoName    rhoInf; // of-v301       
        rho        rhoInf; // of-v1706
        rhoInf      1.205; 
        origin      (0 0 0);
    
        coordinateRotation
        {
            type        EulerRotation
            degrees     true;
            rotation    (0 0 0);
        }
        
        binData
        {
            nBin    90; //output data into 20 bins
            direction   (1 0 0); // bin direction
            format  gnuplot;
            cumulative  yes;
        }
    }
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      Force;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
forces
    {
        type        forces;
        functionObjectLibs  ("libforces.so");
        writetControl   timeStep;
        writeInterval  1;
        patches     ("surface");
        pName       p;
        UName       U;
        rhoName    rhoInf; // of-v301       
        rho        rhoInf; // of-v1706
        rhoInf      1.205;
        log         true;
        CofR        (-0.75 0 0); // origin for moment calculation
        
        writeFields no;
        
        binData
        {
            nBin    90; //output data into 20 bins
            direction   (1 0 0); // bin direction
            format  gnuplot;
            cumulative  yes;
        }
    }


// ************************************************************************* //
kaszt is offline   Reply With Quote

Old   June 1, 2024, 05:45
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
How is your reference frame defined?
Is it aligned with the inlet flow and you're moving the airfoil to simulate different aoa, or is it aligned with the airfoil and you're changing the inlet flow to change aoa?

To get proper force coefficients your dragDir and liftDir parameters have to be defined according to the inlet flow direction.
Yann is offline   Reply With Quote

Old   June 17, 2024, 14:01
Default
  #5
New Member
 
Katherine
Join Date: Feb 2016
Posts: 20
Rep Power: 10
kaszt is on a distinguished road
Thanks for your comment - that makes sense. I'm changing the inlet flow to change the angle of attack, and so the reference frame is coded now to be aligned with the airfoil. I can try changing dragDir and liftDir to be aligned with the inlet velocity then and see if this makes a difference. By chance, have you tried this? Thanks!
kaszt is offline   Reply With Quote

Old   June 18, 2024, 04:51
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Quote:
Originally Posted by kaszt View Post
By chance, have you tried this? Thanks!
Sure, AFAIK this is always how we compute aerodynamic coefficients on airfoils or aircraft.
kaszt likes this.
Yann is offline   Reply With Quote

Old   June 28, 2024, 16:51
Default
  #7
New Member
 
Katherine
Join Date: Feb 2016
Posts: 20
Rep Power: 10
kaszt is on a distinguished road
Thanks for your message - yes, that's correct, and I did update things to compute the forces in the body-reference frame for the airfoil. Lift is still reasonable but unfortunately drag is still high. I am curious if anyone else ran into this issue. Thanks!
kaszt is offline   Reply With Quote

Old   June 30, 2024, 06:23
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello,

As far as I know on airfoils it is usually harder to get a good agreement on drag than it is on lift.
But of course it depends on how far you are from your reference values.

By the way, have you checked this?
https://doc.openfoam.com/2312/exampl...lent/naca0012/
kaszt likes this.
Yann is offline   Reply With Quote

Old   June 30, 2024, 06:36
Post Negative lift coefficient
  #9
New Member
 
Puttanna
Join Date: Jun 2024
Posts: 1
Rep Power: 0
Puttanna pujar is on a distinguished road
Hello
I'm doing simulation for co flow jet airfoil in which lift coefficient is negative.. can someone help me please!!
Puttanna pujar is offline   Reply With Quote

Reply

Tags
airfoil 2d, overpredicting, unsteady compressible


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
Calculation of Drag Coefficient for Airfoil fredi Main CFD Forum 3 September 28, 2021 08:57
High drag for airfoil compared to XFOIL and wind tunnel data Ry10 SU2 15 October 30, 2016 18:27
Drag on an Airfoil Easyqus FLUENT 0 January 31, 2016 18:17
Drag prediction for Naca 23012 airfoil Ravel Bogatec CFX 17 February 15, 2008 01:21
Airfoil Drag Force wowakai Main CFD Forum 3 October 13, 1998 20:27


All times are GMT -4. The time now is 21:20.