blueCFD / Core

Coordination repository for the blueCFD-Core: Issue tracking, Wiki, project webpage and miscellaneous scripts
http://bluecfd.github.io/Core
53 stars 10 forks source link

postProcess yPlus gives 0 #127

Closed ethren closed 2 years ago

ethren commented 5 years ago

hello I am using blueCFD OpenFOAM 5.x on Windows 7. I've conducted a simulation of flow around naca airfoil using the SA turbulence model. The simulation finished (The link to download the case is given below) and everything went well except when I want to calculate the y+: simpleFoam -postProcess -func 'yPlus'

I get the following:

Create time

Create mesh for time = 0

SIMPLE: convergence criteria
    field U      tolerance 1e-06
    field p      tolerance 1e-06
    field "(k|epsilon|omega|nuTilda)"    tolerance 1e-06

Time = 0
Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model SpalartAllmaras
Selecting patchDistMethod meshWave
RAS
{
    RASModel        SpalartAllmaras;
    turbulence      on;
    printCoeffs     on;
    sigmaNut        0.66666;
    kappa           0.41;
    Cb1             0.1355;
    Cb2             0.622;
    Cw2             0.3;
    Cw3             2;
    Cv1             7.1;
    Cs              0.3;
}

No MRF models present

yPlus yPlus write:
    writing object yPlus
    patch airfoil y+ : min = 0, max = 0, average = 0

Time = 10000
Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model SpalartAllmaras
RAS
{
    RASModel        SpalartAllmaras;
    turbulence      on;
    printCoeffs     on;
    sigmaNut        0.66666;
    kappa           0.41;
    Cb1             0.1355;
    Cb2             0.622;
    Cw2             0.3;
    Cw3             2;
    Cv1             7.1;
    Cs              0.3;
}

No MRF models present

yPlus yPlus write:
    writing object yPlus
    patch airfoil y+ : min = 0, max = 0, average = 0

End

As you can see, y+ is 0 (min , average, and max)

You can find the case here: case_naca_sa PS: I uploaded everything except the mesh because you can generate it from blockMeshDict.

wyldckat commented 5 years ago

Quick answer: No wall treatment is used on the airfoil patch, which is why there is no yPlus calculation - see file nuTilda:

    airfoil
    {
        type            fixedValue;
        value           uniform 0;
    }

Therefore this is a limitation in OpenFOAM itself and not a limitation in the port we provide in blueCFD-Core.

I don't remember the exact details of how y+ is calculated, but I vaguely remember that wall shear stress can be used to calculate the core value needed for y+...

ethren commented 5 years ago

@wyldckat Thank you very much for your reply dear Bruno. I have to change the type to zeroGradient

wyldckat commented 5 years ago

zeroGradient might not be a good option either. To answer to your first question that you then deleted: yes, I meant turbulence wall function... I'm so used to think that it's a way to treat the flow adjacent to the wall, that I wrote wall treatment.

The list of turbulence wall functions that exist in v5: https://cpp.openfoam.org/v5/group__grpWallFunctions.html