CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   pimpleFOAM setup for airfoil stall analysis (https://www.cfd-online.com/Forums/openfoam-solving/228045-pimplefoam-setup-airfoil-stall-analysis.html)

ColourAshRed June 18, 2020 02:35

pimpleFOAM setup for airfoil stall analysis
 
Hi all!

I am trying to simulate the flow over a NACA0012 airfoil at stall and post stall, in 2D, using the k-omegaSST model. I understand that the flow separation is inherently a 3D phenomenon but I would still like to know if this approach can work for achieving initial estimates of the cl and cd at high angles of attack. I have only used simpleFoam earlier so I am very new to pimpleFoam.

I used the fvSchemes and fvSolution that I found in a previous thread on a similar topic, but that didn't seem to work for me. I tried the fvSchemes and fvSolution from the wingMotion tutorial too, but the calculations stop after a single iteration.

My yPlus is 1, and I'm using an O-grid generated from Pointwise.

If someone could help me find out what it is that I can do to run this simulation successfully, I would be really grateful. Thanks in advance!

Here's my setup:

fvSolution
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "pcorr.*"
    {
        solver          GAMG;
        tolerance        0.02;
        relTol          0;
        smoother        GaussSeidel;
    }

    p
    {
        $pcorr;
        tolerance        1e-7;
        relTol          0.01;
    }

    pFinal
    {
        $p;
        tolerance        1e-7;
        relTol          0;
    }

    "(U|k|omega)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-06;
        relTol          0.1;
    }

    "(U|k|omega)Final"
    {
        $U;
        tolerance      1e-06;
        relTol          0;
    }

    cellDisplacement
    {
        solver          GAMG;
        tolerance      1e-5;
        relTol          0;
        smoother        GaussSeidel;
    }
}

PIMPLE
{
    correctPhi          yes;
    nOuterCorrectors    2;
    nCorrectors        1;
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    fields
    {
        p              0.3;
    }
    equations
    {
        "(U|k|omega)"  0.7;
        "(U|k|omega)Final" 1.0;
    }
}

cache
{
    grad(U);
}

fvSchemes
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default Euler;
}

gradSchemes
{
    default        Gauss linear;
    grad(p)        Gauss linear;
    grad(U)        Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)      Gauss linearUpwind grad(U);
    div(phi,k)      Gauss limitedLinear 1;
    div(phi,omega)  Gauss limitedLinear 1;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear limited corrected 0.5;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

wallDist
{
    method meshWave;
}

controlDict
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application    pimpleFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        5;

deltaT          1e-5;

writeControl    adjustableRunTime;

writeInterval  1e-2;

purgeWrite      0;

writeFormat    binary;

writePrecision  10;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo          0.9;

functions
{
    #includeFunc residuals
    #includeFunc forceCoeffsIncompressible
    #includeFunc forcesIncompressible
}

k
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 1e-6;

boundaryField
{
    BaseAndTop
    {
        type            empty;
    }
   
    inlet-outlet
    {
        type            freestream;
        freestreamValue uniform 1e-6;
    }

    airfoil
    {
        type            fixedValue;
        value          uniform 1e-10;
    }
}

omega
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 -1 0 0 0 0];

internalField  uniform 1e3;

boundaryField
{
    BaseAndTop
    {
        type            empty;
    }
   
    inlet-outlet
    {
        type            freestream;
        freestreamValue uniform 1;
    }

    airfoil
    {
        type            omegaWallFunction;
        value          $internalField;
    }
}

I cannot figure out what I'm doing wrong, and really, really need help with this.
Thanks in advance!

dlahaye June 18, 2020 02:56

/opt/OpenFOAM/OpenFOAM-v1906/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012

ColourAshRed June 18, 2020 03:12

Quote:

Originally Posted by dlahaye (Post 774961)
/opt/OpenFOAM/OpenFOAM-v1906/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012

Hi Domenico

What you have suggested is to use rhoSimpleFoam.. I will try it out, thanks. However, I am also keen on understanding how to make this case work with pimpleFoam or pisoFoam.

Have you tried such a simulation before? I'd love to know.
Thanks

dlahaye June 18, 2020 03:15

pimpleFoam and pisoFoam are incompressible solvers. They are doomed to fail for sufficiently high Mach number.

ColourAshRed June 18, 2020 03:19

Quote:

Originally Posted by dlahaye (Post 774963)
pimpleFoam and pisoFoam are incompressible solvers. They are doomed to fail for sufficiently high Mach number.

Okay, understood. However, my Mach number here is only 0.03 (10.28 m/s). I should have described this earlier. So it's incompressible flow.

dlahaye June 18, 2020 03:28

Lowering Mach in tutorial case to run pimpleFoam, see how it fares, then return to your case with new eyes?

sandrobrad March 12, 2022 06:31

Hello all,
I want to apologize beforehand due to my offtopic question. I'm just want to ask Ashmita how did you get the pointwise software? I just checked in their website but I was not able to get a license because I'm an Student and they only provide the software to proffesionals(correct me if I am wrong). Thanks in advance for your answer.


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