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

SimpleFoam high order schemes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 18, 2017, 10:43
Default SimpleFoam high order schemes
  #1
Member
 
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 9
vcvedant is an unknown quantity at this point
Hello,

I am simulating flow around vane cascade. I have good mesh quality with checkMesh reporting OK for all checks and the maximum non-orthogonality at 41.
I was able to get converged solution with first order schemes (bounded Gauss upwind) but when i switched to higher order schemes, my solution diverged with 'Nan'.
Solver: simpleFoam
RASModel: LaunderSharmaKE (or kOmegaSST)

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         Gauss linear;
    grad(U)         leastSquares;
    grad(T)        leastSquares;
}    

divSchemes
{
    default                 none;
    div(phi,U)                 bounded Gauss linearUpwind grad(U);    
    div(phi,k)                bounded Gauss linearUpwind default;
    div(phi,epsilon)        bounded Gauss upwind;
    div(phi,R)            bounded Gauss linearUpwind default;
    div(phi,nuTilda)         bounded Gauss linearUpwind default;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
    div(phi,T)            bounded Gauss linearUpwind grad(T);    
}

laplacianSchemes
{
    default                    Gauss linear corrected;
    laplacian(1,Phi)            Gauss linear corrected;// limited 0.5;
    laplacian(nuEff,U)             Gauss linear corrected;// limited 0.5;
    laplacian((1|A(U)),p)         Gauss linear corrected;// limited 0.5;
    laplacian(DkEff,k)             Gauss linear corrected;// limited 0.5;
    laplacian(DepsilonEff,epsilon)     Gauss linear corrected;// limited 0.5;
    laplacian(DREff,R)             Gauss linear corrected;// limited 0.5;
    laplacian(DnuTildaEff,nuTilda)     Gauss linear corrected;// limited 0.5;
    laplacian(kappaEff,T)        Gauss linear corrected;// limited 0.5;
}

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

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
    Phi;
}

// ************************************************************************* //
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
{   
    Phi
    {

    solver        GAMG;
    smoother    DIC;//GaussSeidel;
    cacheAgglomeration    on;
    agglomerator    faceAreaPair;
    nCellsInCoarsestLevel    10;
    mergeLevels    1;
    tolerance    1e-6;
    relTol        0.01;
    }    


    p
    {
    solver        PCG;
    preconditioner    DIC;
    tolerance    1e-12;
    relTol        0.0001;
    //maxIter        200;
/*    
        solver          GAMG;
        tolerance       1e-08;
        relTol          0.001;
    minIter        5;    //added later
    maxIter        200;    //added later
        smoother        GaussSeidel;    // DIC; //DICGaussSeidel; //FDIC;
        nPreSweeps      1;
        nPostSweeps     3;
    nFinestSweeps    3;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 100;
        agglomerator    faceAreaPair;
        mergeLevels     1;
*/    
    }
/*    pFinal
    {
    $p;
    relTol        0;
    }
*/

    "(U|T|k|epsilon)"
    {

        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-08;
        relTol          0.1;
/*
    solver        smoothSolver;
    smoother    GaussSeidel;
    tolerance    1e-3;
    relTol        0;
*/


    }
    "(R|nuTilda)"
    {
    
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-08;
        relTol          0.1;
/*
    solver        smoothSolver;
    smoother    GaussSeidel;
    tolerance    1e-3;
    relTol        0;
  */  }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
   
    residualControl
    {
        p    1e-8;
        U    1e-8;
        k    1e-8;
        epsilon    1e-8;
                T    1e-8;
        
    }
   
}

potentialFlow
{
    nNonOrthogonalCorrectors    10;
}

relaxationFactors
{
    fields
    {
    p               0.1;
    }
    equations
    {
         default     0.3;
    U        0.5;
    k        0.5;
    epsilon        0.5;
    R        0.4;
    T        0.6;
    nuTilda        0.4;
    }
}


// ************************************************************************* //
It would be really great if someone has suggestions for me.

Thanks
vcvedant is offline   Reply With Quote

Old   September 19, 2017, 00:45
Default
  #2
Member
 
Ping Chang
Join Date: Feb 2016
Location: Perth
Posts: 93
Rep Power: 10
chpjz0391 is on a distinguished road
Hi,

Could you please post your log file?
chpjz0391 is offline   Reply With Quote

Old   September 19, 2017, 12:38
Default log files
  #3
Member
 
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 9
vcvedant is an unknown quantity at this point
Hello Ping,

I had tried several fvSchemes options for divergence before settling on the ones that I mentioned. My log files are for kwSST model where omega is bounded Gauss upwind and all other are same.

Link to log files


Thanks
vcvedant is offline   Reply With Quote

Reply

Tags
accuracy, fvschemes, komegasst, simplefoam convergence


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
Choice of numerical schemes for high accuracy in vorticity D.B OpenFOAM Running, Solving & CFD 1 February 5, 2018 11:44
simpleFoam: switch so second order fvSchemes okroud OpenFOAM Running, Solving & CFD 11 September 11, 2013 13:52
For second or first order accurate schemes, to what extent, the results are valid? tfuwa OpenFOAM Running, Solving & CFD 1 July 7, 2013 18:47
2nd order boundary conditions for 2nd order discretization? quarkz Main CFD Forum 30 December 26, 2011 08:12
CFL condition for higher order schemes Shyam Main CFD Forum 2 February 14, 2008 15:24


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