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

OF div schemes greatly influence the result

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By hjasak
  • 1 Post By piu58

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2021, 01:11
Default OF div schemes greatly influence the result
  #1
New Member
 
samuel
Join Date: Oct 2019
Posts: 15
Rep Power: 7
Samuel Twain is on a distinguished road
Dear all:
I'm doing a simulation about wind aroud a flat roof. The model can be seen below.
[image]https://www.cfd-china.com/assets/uploads/files/1611984747439-wholemodel.png[/img]

In the reference paper, the author applied 'second order upwind' for space discretization in Fluent. And I have used the same model parameters (eg. domain size, minimum element size, boundary condition, turbulence model). simpleFOAM and realizable k-epsilon model are used. However I find that if I adopt different divergence schemes (namely, gauss upwind, linearUpwind and limitedLinear), the results will be different from each other and only the result of 'gauss upwind' agrees with that of reference paper.

From what I gather, in openfoam 'gauss linearUpwind' represents 'second order upwind' which was adopted in the reference paper. But when I use 'gauss linearUpwind' for the divergence schemes in OpenFOAM, the simulated result (namely, friction velocity on roof) differs greatly from that of reference paper. In comparison, the performance improves if I adopted 'gauss upwind' which represented first order upwind. The results of different div schemes can be seen below.
[image]https://www.cfd-china.com/assets/uploads/files/1611984885997-0f0345fa-d59b-4030-9578-0dcb60ab0d6f-image.png[/img]

To describe my question detailedly, some details of my fvSchems and fvSolutions are also posted.
Code:
ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;

    limited         cellLimited leastSquares 1;
    //grad(U)         $limited;
    grad(k)         $limited;
    grad(epsilon)     $limited;
}

divSchemes
{
    default         none;

    div(phi,U)      Gauss limitedLinear 1;//bounded Gauss linearUpwind limited, Gauss upwind;

    turbulence      bounded Gauss linearUpwind limited;
    div(phi,k)      $turbulence;
    div(phi,epsilon) $turbulence;

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

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}
Code:
solvers
{
    p
    {
        //solver          PCG;
        //preconditioner  DIC;
        solver          GAMG;
        tolerance       1e-7;
        relTol          0.1;
        smoother        DICGaussSeidel;
    }

    "(U|k|epsilon|omega)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        //solver          smoothSolver;
        //smoother        symGaussSeidel;
        tolerance       1e-7;
        relTol          0.001;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 2;
    consistent      yes;

    residualControl
    {
        p               1e-7;
        U               1e-7;
        "(k|epsilon|omega|f|v2)" 1e-7;
    }
}

relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.7;
        "(k|omega|epsilon).*" 0.7;
    }
}
Actually, in many papers, first order upwind scheme are not encouraged to use. But in my simulation, it seems that I have to choose 'gauss upwind' to get a 'right' result compared with reference papar of which the author has adopted second order upwind schemes. And higher-order div schemes lead to something wrong.
That makes me confused. Could anyone please give me some suggestions?
Thank you
samuel

Last edited by Samuel Twain; January 30, 2021 at 02:16.
Samuel Twain is offline   Reply With Quote

Old   January 31, 2021, 13:28
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
You are using the wrong kind of schemes on bounded scalars - this will destabilize the solver.

If numerical diffusion is causing trouble, you can simply refine the mesh.

Hrv
saeed jamshidi likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   February 1, 2021, 04:05
Default
  #3
New Member
 
samuel
Join Date: Oct 2019
Posts: 15
Rep Power: 7
Samuel Twain is on a distinguished road
Quote:
Originally Posted by hjasak View Post
You are using the wrong kind of schemes on bounded scalars - this will destabilize the solver.

If numerical diffusion is causing trouble, you can simply refine the mesh.

Hrv
Thank you, Hrv. I will remove "bounded" , refine the mesh and find out whether it will cause peoblems.
Before that, I have found that my “k” boundary type seems to be unreasonable. Originally, I used kLowReWallFunction, after changing it to kqrWallFunction, the result becomes better.
This also makes me confused. According to description, kLowREWallFunction is suitable for both low and high RE condition, while kqrWallFunction is only for high RE condtion. Is kLowREWallFunction unsuitable for realizable k-epsilon turbulence model?
Samuel Twain is offline   Reply With Quote

Old   August 2, 2021, 08:18
Default
  #4
Member
 
Join Date: Dec 2018
Posts: 75
Rep Power: 7
hbulus is on a distinguished road
Quote:
Originally Posted by hjasak View Post
You are using the wrong kind of schemes on bounded scalars - this will destabilize the solver.

If numerical diffusion is causing trouble, you can simply refine the mesh.

Hrv
You mean limitedLinear would be better for scalars, and linearUpwind for U, right ?
hbulus is offline   Reply With Quote

Old   August 2, 2021, 11:38
Default
  #5
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
You may use Gauss upwind if you are looking for robust schemata. More accurate is linear upwind, but more oscillatory too.
hogsonik likes this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Reply


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
chtMultiRegionSimpleFoam div schemes guserik OpenFOAM Running, Solving & CFD 2 November 14, 2013 18:30
simpleFoam: case only converges with most div schemes set to upwind buffi OpenFOAM Running, Solving & CFD 7 November 11, 2013 08:54
Numerical schemes for grad and div Tobi OpenFOAM 6 March 11, 2013 22:24
Accuracy problem of HO schemes on unstructured mesh, HO scheme gives 1st order result gemini Main CFD Forum 12 December 27, 2011 22:01
time stepping schemes for compressible DNS/LES shyamdsundar Main CFD Forum 0 January 15, 2010 00:15


All times are GMT -4. The time now is 10:59.