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/)
-   -   k-omega SST for wall-resolved TBL, problem with log layer. (https://www.cfd-online.com/Forums/openfoam-solving/98534-k-omega-sst-wall-resolved-tbl-problem-log-layer.html)

mevoili March 13, 2012 07:51

k-omega SST for wall-resolved TBL, problem with log layer.
 
1 Attachment(s)
Hello Foamers,

I'm trying to compute a turbulent flow on a 2-D airfoil usin RANS. I've created my mesh such that the flow is wall resolved (y+ ~ 1 ). I would like to compare different models: the first one is the Spalart-Allmaras model, and the second one is the k-omega SST model. From what I've read, those two models are good for wall-resolved turbulent flow, and especially for boundary layers experiencing adverse pressure gradients, and separating flows.

To be sure about the quality of my results, I have first computed a simple turbulent boundary layer on a plane plate, with an uniform velocity at the inflow. For the Spalart-Allmaras model, the results are very good and show the expected viscous layer and the log layer, but for the k-Omega SST model, the results aren't that good (See picture), and there is no log layer (or at least with the correct slope kappa ~ .37), and I don't know where that problem might come from (i used pisoFoam solver)...

For the boundary conditions on omega, I use the condition :

omega_wall = 10*6*nu/0.075*y^2 with y = distance to the wall of the centroid of the first cell.

gdeneyer March 13, 2012 08:07

I had the same problem a few weeks ago. I would be really happy if somebody had the solution !

Which inflow/outflow condition did you use for k and omega ?

FelixL March 13, 2012 08:16

Hello, Guillaume,


this doesn't look right. I had better results for such a simple case using the k-omega-SST-turbulence model. Can you give us more infos on your setup? (grid specs, numerical schemes, boundary conditions, initial conditions)


Greetings,
Felix

mevoili March 13, 2012 12:27

Here are my boundary and initial conditions :

inlet :
k = 1e-4;
omega = 1;
nut : calculated;
U = (1 0 0);
p : zeroGradient;

outlet :
k : zeroGradient
omega : zeroGradient;
nut : calculated;
U : zeroGradient;
p = 0;

wall :
U = (0 0 0);
p = zeroGradient;
k : zeroGradient;
omega = 10*6*nu/0.075*y^2 with y = 2.3e-4 and nu = 1e-5
nut = 0;

Initial condition : omega = 1; k = 1e-4 ; p = 0; U = (1 0 0);

I think my grid is okay since the Spalart Allmaras works well on it..

Thanks for your help

mevoili March 13, 2012 12:33

And here are my fvSolution & fvSchemes, but I don't think the problem comes from there...
fvSolution
Code:

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

solvers
{
    p
    {
        solver              GAMG;
        preconditioner        DICGaussSeidel;
        tolerance          1e-06;
        relTol              0.0001;
    nCellsInCoarsestLevel  100;
    agglomerator        faceAreaPair;
    mergeLevels        1;
    smoother        GaussSeidel;
    nPreSweeps        0;
    nPostSweeps        2;
    nFinestSweeps        2;
    }

      pFinal
    {
        solver              GAMG;
        preconditioner        DICGaussSeidel;
        tolerance          1e-06;
        relTol              0;
    nCellsInCoarsestLevel  100;
    agglomerator        faceAreaPair;
    mergeLevels        1;
    smoother        GaussSeidel;
    nPreSweeps        0;
    nPostSweeps        2;
    nFinestSweeps        2;
    }

    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-05;
        relTol          0;
    }

    k
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-05;
        relTol          0;
    }

    omega
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-05;
        relTol          0;
    }

    R
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-05;
        relTol          0;
    }
}

potentialFlow
{
    nNonOrthogonalCorrectors 3;
}

PISO
{
    nNonOrthogonalCorrectors 3;
    pRefCell        10;
    pRefValue      0;

    residualControl
    {
        p              1e-8;
        U              1e-8;
        "(k|epsilon|omega)" 1e-3;
    }
}

relaxationFactors
{
    p              0.3;
    U              0.7;
    k              0.7;
    omega          0.7;     
}


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

fvSchemes
Code:

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

ddtSchemes
{
    default        backward;
}

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

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

laplacianSchemes
{
    default        none;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(1,p) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DomegaEff,omega) Gauss linear corrected;
    laplacian(DREff,R) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
    interpolate(U)  linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p              ;
}


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


FelixL March 13, 2012 12:44

Hello, Guillaume,


thanks for the informations. For a start, I have two comments:


1. Use k = fixedValue 1e-12 (or some different, very small number) at the wall. zeroGradient usually is the wall function approach. In LowRe-formulations, k equals zero at the wall.

2. Your solution doesn't seem to be converged. Could you attach a residuals vs. time plot, please? Using simpleFoam (steady-state calculations) there were problems with the omega equation not being solved anymore after some iterations. This lead to wrong results. It can be the same in your case. I'd suggest to set the solver tolerance for omega to a very small value (1e-12, for example) and try again.


Greetings,
Felix.

mevoili March 13, 2012 13:01

Thanks for your advices, Felix, I will try to do so as soon as I can, and I will comment my results here.

mevoili March 15, 2012 05:45

2 Attachment(s)
Hella again,

I followed your advices, and my results are better than before, but I still don't get the right logarithmic slope in the log layer..

Do you have any ideas what could cause this ?

FelixL March 15, 2012 07:23

Hello, Guillaume,


a.) which OF Version are you using?
b.) did you check for grid independence when using the k-Omega-SST-model?


Greetings,
Felix.

mevoili March 15, 2012 08:19

Hi,

I'm using openFOAM 2.0.1. What do you mean by "checking for grid independence", my omega BC at the wall depends on the first cell so I'm not sure to understand what you mean? My mesh is such that the first cell is at y+ < 1, if that's the question...

Thanks
Guillaume

FelixL March 15, 2012 08:57

Hello, Guillaume,


with checking for grid independence I mean that you made sure that the discretization error is low enough to omit it when interpreting your results. When grid spacing tends to zero, the discretization error also does so the easiest way to check for grid independence is to refine the mesh by factor two in all (relevant) spatial dimensions.

This does not mean that a reasonably low y+ value is enough for your results to be accurate! There are many factors playing a role in wall bounded flows, e.g. cell expansion ratio, grid density in streamwise direction, aspect ratios, etc. That's why I want to know if your results are grid independent. Otherwise it's too hard to tell why your results are so off.


Greetings,
Felix.

mevoili March 15, 2012 09:00

I'll run a case on a finer mesh to compare results, but i used rather conventional values to generate my mesh so it should be ok...

Anne Lincke June 29, 2012 08:22

Hey,
why don't you use omegaWallFunction for omega at the wall?

Regards
Anne

mevoili July 10, 2012 18:08

Because I've created my mesh such that it is wall resolved (y+ ~ 1 ), in order to see all the detail of the boundary layer. Indeed, I want to study boundary layers, so using wall functions would be a non-sense

tcarrigan July 10, 2012 21:31

The k-omega SST turbulence model implemented in OpenFOAM is in high-Re form. There are several posts on the forums discussing the models breakdown or inaccuracy for resolved grids (y+=1).

However, I've read that you can use this model for resolved flows by coupling it with a continuous wall function like nutUSpaldingWallFunction. You would then use kqRWallFunction for k and omegaWallFunction for omega.

I've tried the above approach for turbulent flat plate flow with no success.

FelixL July 11, 2012 02:58

Quote:

Originally Posted by mevoili (Post 370703)
Because I've created my mesh such that it is wall resolved (y+ ~ 1 ), in order to see all the detail of the boundary layer. Indeed, I want to study boundary layers, so using wall functions would be a non-sense

Hello Guillaume,


I wouldn't say it's "nonsense". The omegaWallFunction works perfectly fine for both LowRe and HighRe-meshes. Take a look at the implementation or numerous other threads in this message board and you will see that for the viscous sublayer the correct asymptotic solution is used.

@tcarrigan: You should use typical LowRe-BCs when resolving the boundary layer with your mesh. I.E. U = 0; k = 1e-12; omega = omegaWallFunction; nut = calculated or nut = 1e-12

I've used these settings with lots of success for simple flat plate cases.

Another note: if you compare the OpenFOAM implementation of the SST-model with literature you'll notice that the OpenFOAM implementation doesn't differ from typical versions of the model. Since Menter's original formulations are applicable for both cases (HighRe and LowRe), OpenFOAMs implementation also is.


Greetings
Felix

tcarrigan July 11, 2012 09:44

Maybe it depends on which version of OpenFOAM you're running, Extend or OpenCFD. The break down of k-omega SST for high resolution grids was logged as a bug a while back because users assumed the implementation of the model was similar to Menter's formulation...which it was not. In that case, the model would be applicable, like you said, for both high-Re and low-Re flows without the need for wall functions.

Here is Henry's reply to the bug that was logged against 1.7.x:
http://www.openfoam.org/mantisbt/view.php?id=179#c351

If this has been addressed in 2.1, I'd like to know.

FelixL July 11, 2012 09:59

Hello Travis,


please refer to this post by the bug report author: http://www.cfd-online.com/Forums/ope...tml#post369671
As you can see, this issue is not directly connected with the SST-model implementation. It's more likely caused by the general numerics of OpenFOAM and it's sensitivity to smooth meshes. So yes, you are able to get accurate results on LowRe-meshes with the SST model, but you have to ensure your grid is smooth enough (this improves the stability and accuracy anyway).

I say it again: this issue is caused by grid irregularities not the SST model implementation itself.
Hope I could clarify this!


Greetings
Felix

aerogt3 October 16, 2012 07:46

Quote:

Originally Posted by tcarrigan (Post 370716)
The k-omega SST turbulence model implemented in OpenFOAM is in high-Re form. There are several posts on the forums discussing the models breakdown or inaccuracy for resolved grids (y+=1).

However, I've read that you can use this model for resolved flows by coupling it with a continuous wall function like nutUSpaldingWallFunction. You would then use kqRWallFunction for k and omegaWallFunction for omega.

I've tried the above approach for turbulent flat plate flow with no success.

Quote:

Originally Posted by FelixL (Post 370744)
@tcarrigan: You should use typical LowRe-BCs when resolving the boundary layer with your mesh. I.E. U = 0; k = 1e-12; omega = omegaWallFunction; nut = calculated or nut = 1e-12

I am a bit lost here with what looks like two conflicting suggestions. If I have a y+1 mesh, and I want to fully resolve the BL (no wall fcns), should I set k = 1e-XX and nut = 1e-XX, or k = kwRWallFunction, with nut set to nutUSpaldingWallFunction?

kiddmax February 2, 2014 17:51

Hi Guillaume

I have the same problem, did you solve this problem?

Best regards,
Ye


All times are GMT -4. The time now is 13:23.