CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Problem in fvschemes divSchemes cannot use Gauss linearUpwind (https://www.cfd-online.com/Forums/openfoam-bugs/62534-problem-fvschemes-divschemes-cannot-use-gauss-linearupwind.html)

fippo_dk November 16, 2011 03:02

how do your results compare to measurements? are you under or over predicting?

In my case I over predict from 10 to 20 degrees

uli August 2, 2012 14:34

hi all

I noticed that both in both tutorial cases and posted fvschemes there is always

Code:

div(R) Gauss linear;
Is that because there is no flux (phi = rho U) in that term and should it be left like this?

I tried

Code:

div(R)          Gauss limitedLinear 1;
div(R)          Gauss QUICK;
div(R)          Gauss MUSCL;

and it gave me similar results without any problems/errors.

thanks
Uli

makaveli_lcf August 2, 2012 14:40

Hi! It is for other turbulence model where you use Reynolds stress

uli August 2, 2012 15:12

Thanks for your reply.

So using a k-Epsilon model does not involve R? But how is it possible that I get different results after switching the scheme for div(R)?

makaveli_lcf August 2, 2012 15:18

You wrote you get the SAME results. You can easily check which schemes you solver uses, just set "default none;", and you will get errors until you define all schemes.

uli August 21, 2012 18:34

hi, sorry for the late reply.

I wrote "similar" results since the plots are slightly different. I removed the schemes and it still worked, thanks for your help.

adarsh tiwari April 9, 2014 01:54

Hi all,

I have to simulate the case of time varying BC 'uniformValue' for p and T

I tried various ways listed here and also from other open-sources, for schemes and solvers, to solve the 'p' with rhoSimpleFoam.

whatever may be the conditions applied, the solver is unable to run after third time-step. here I am posting my schemes and solvers. I am thinking that the problem is with these files only because I have cross-checked the p, T and U files and am also able to run 'rhoPimpleFoam' successfully.

Please let me know what went wrong.

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.2                                |
|  \\  /    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        cellLimited leastSquares 1;//Gauss linear;
//    grad(U)        Gauss linear;
    grad(P)        Gauss linear;
}

divSchemes
{
    default        none;//Gauss linear corrected; //
    div(phi,U)      bounded Gauss upwind;
    div((muEff*dev2(T(grad(U))))) Gauss linear;
    div(phi,e)      bounded Gauss upwind;
    div(phi,h)      bounded Gauss upwind;
    div(phi,epsilon) bounded Gauss upwind;
    div(phi,omega)  bounded Gauss upwind;
    div(phi,k)      bounded Gauss upwind;
    div(phi,K)      bounded Gauss upwind;
    div(phi,Ekp)    bounded Gauss upwind;
    div(phid,p)    Gauss upwind;//bounded Gauss upwind;
    div(U,p)      bounded Gauss upwind;
}

laplacianSchemes
{
    default        Gauss linear orthogonal;//Gauss linear corrected;
//    laplacian(muEff,U) Gauss linear corrected;
//    laplacian(alphaEff,e) Gauss linear corrected;
//    laplacian(alphaEff,h) Gauss linear corrected;
//    laplacian((rho*(1|A(U))),p) Gauss linear corrected;
//    laplacian((rho|A(U)),p) Gauss linear corrected;
//    laplacian((rho*rAU),p) Gauss linear corrected;
//    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
//  laplacian(DomegaEff,omega) Gauss linear corrected;
//    laplacian(DkEff,k) Gauss linear corrected;
//  laplacian(1,p) Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
    div(U,p)        upwind phi;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p              ;
}


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


Code:

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

solvers
{
    p
    {
        solver        PCG;//GAMG;//
        preconditioner  none;//DIC;//FDIC;//GAMG;//diagonal;//
        agglomerator    faceAreaPair;
      tolerance      1e-07;
        relTol          0;//0.05;
        smoother        GaussSeidel;
        cacheAgglomeration true;//off;
        nCellsInCoarsestLevel 10;//20;
        mergeLevels    1;
    } //temperoraily not using


    "(U|e|h|R|k|epsilon|omega)" //"(U|p|e|h|R|k|epsilon|omega)"
    {
        solver          smoothSolver;//solver          diagonal;//
        smoother        GaussSeidel;
        nSweeps        2;
        tolerance      1e-06;
//        relTol          0; //0.1;
//        solver          PBiCG;
//        preconditioner  DILU;
//        tolerance      1e-06;
//        relTol          0; //0.1;
    }

//    "(k|epsilon|omega)"
//    {
//        $U;
//        tolerance      1e-05;
//        relTol          0; //0.1;
//    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    rhoMin          rhoMin [ 1 -3 0 0 0 ] 0.4;
    rhoMax          rhoMax [ 1 -3 0 0 0 ] 1.5;

  residualControl
    {
        p              1e-2;
        U              1e-4;
        e              1e-3;

        // possibly check turbulence fields
        "(k|epsilon|omega)" 1e-3;
    }                      // residual control temporarily not used
}

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors  1;
    nCorrectors      1;
    nNonOrthogonalCorrectors 0;
    rhoMin            rhoMin [ 1 -3 0 0 0 ] 0.5;
    rhoMax            rhoMax [ 1 -3 0 0 0 ] 2.0;

    maxCo            0.2;
    rDeltaTSmoothingCoeff 0.1;
    rDeltaTDampingCoeff 1;
    maxDeltaT        1;
}

relaxationFactors
{
    fields
    {
        p              0.03;
        rho            0.05;
    }
    equations
    {
        U              0.07;
        "(k|epsilon|omega)"  0.04;
        e              0.05;
        h              0.01;
    }
}


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


Tushar@cfd June 3, 2014 05:29

Quote:

Originally Posted by adarsh tiwari (Post 484831)
Hi all,
relaxationFactors
{
fields
{
p 0.03;
rho 0.05;
}
equations
{
U 0.07;
"(k|epsilon|omega)" 0.04;
e 0.05;
h 0.01;
}
}

// ************************************************** *********************** //[/CODE]

Is it a serious issue (bug)?

A user can edit those files.

Use the following conditions for relaxation factors:

relaxationFactors
{
fields
{
p 0.3;
rho 1;
}
equations
{
U 0.7;
"(k|epsilon|omega)" 0.7;
e 0.7;
h 0.7;
}
}

User has an option to edit the "fvSchemes" as well depending on problem statement.

Best Luck!

sunilkonatham August 9, 2018 06:52

Quote:

Originally Posted by makaveli_lcf (Post 331828)
Hi!

Code:

gradSchemes
{
    default        cellLimited leastSquares 1;
}

divSchemes
{
    default        none;
    div(phi,epsilon) Gauss linearUpwind grad(epsilon);  // OF20x syntax
    div(phi,k)      Gauss linearUpwind grad(k);  // OF20x syntax
    div(phi,U)      Gauss linearUpwind grad(U);  // OF20x syntax
    div((nuEff*dev(T(grad(U)))))    Gauss linear;  // OF20x syntax
}

My example which I use with pimpleFoam.

It has been a while since this thread is posted, can anyone please answer my question?

In this case, does it mean that divergence scheme Gauss linearUpwind uses the gradient scheme of respective variables?


Thanks,
Sunil.

makaveli_lcf August 9, 2018 07:23

Quote:

Originally Posted by sunilkonatham (Post 702084)
It has been a while since this thread is posted, can anyone please answer my question?

In this case, does it mean that divergence scheme Gauss linearUpwind uses the gradient scheme of respective variables?


Thanks,
Sunil.


Yes, you are right. It can either use specific scheme listed in the gradient section or just use default scheme. You can also specify your name for the scheme to use it with several variables, for example like this:


Code:

gradSchemes
{
  default      none;
  grad(DDD)    cellLimited Gauss linear 1;
  grad(p)      leastSquares;
}

divSchemes
{
    default        none;
    div(phi,epsilon) Gauss linearUpwind grad(DDD);
    div(phi,k)      Gauss linearUpwind grad(DDD);
    div(phi,U)      Gauss linearUpwind grad(DDD);
}


sunilkonatham August 9, 2018 07:39

Great. Thanks a lot Dr. Vakhrushev.


All times are GMT -4. The time now is 14:31.