CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   choosing a faster solver for large meshes (http://www.cfd-online.com/Forums/openfoam/95007-choosing-faster-solver-large-meshes.html)

calim_cfd December 2, 2011 06:19

choosing a faster solver for large meshes
 
Hello FoaMMers!

recently i've bumped into a large case.

Here's my mesh
Code:

Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          1015757
    faces:            9905831
    internal faces:  9525541
    cells:            4779375
    boundary patches: 6
    point zones:      0
    face zones:      1
    cell zones:      1

Overall number of cells of each type:
    hexahedra:    64800
    prisms:        180792
    wedges:        0
    pyramids:      3480
    tet wedges:    0
    tetrahedra:    4530303
    polyhedra:    0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
    Patch              Faces    Points  Surface topology                 
    inlet              1080    1147    ok (non-closed singly connected) 
    outlet              1080    1147    ok (non-closed singly connected) 
    wall_slip          5610    5762    ok (non-closed singly connected) 
    wall_fix            175509  89105    ok (non-closed singly connected) 
    wall_rot            180792  90405    ok (non-closed singly connected) 
    symmetry            16219    9357    ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (-2.27374e-16 -3.16552e-05 -0.300001) (12 4 4.5)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (5.37104e-19 3.74601e-18 -1.04857e-19) OK.
    Max cell openness = 2.20757e-16 OK.
    Max aspect ratio = 7.16421 OK.
    Minumum face area = 1.02019e-06. Maximum face area = 0.218717.  Face area magnitudes OK.
    Min volume = 5.87175e-10. Max volume = 0.0654096.  Total volume = 228.604.  Cell volumes OK.
    Mesh non-orthogonality Max: 66.0138 average: 14.7843
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.28739 OK.

Mesh OK.

End

schemes and solver are, respectively:

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;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default        steadyState;
}

gradSchemes
{
    default        Gauss linear;
}

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

laplacianSchemes
{
    default        Gauss linear limited 0.333;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        limited 0.333;
}

fluxRequired
{
    default        no;
    p;
}

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

Code:

solvers
{
    p
    {
        solver          GAMG;
        tolerance        1e-7;
        relTol          0.001;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.0001;
        nSweeps          1;
    }

    k
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.001;
        nSweeps          1;
    }

    omega
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.001;
        nSweeps          1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 2;
   
    residualControl
    {
        p              1e-6;
        U              1e-6;
        "(k|omega)"  1e-6;
    }
   
}

potentialFlow
{
    nNonOrthogonalCorrectors 10;
}

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

cache
{
    grad(U);
}

These are the last ~100 iterations of a bunch with 9600
http://img593.imageshack.us/img593/6220/residuals.png
http://img593.imageshack.us/img593/1893/dom4.png

edit: can any of you check those settings and c if there's sth weird?? that's a too slow convergence rate....that residual pattern had already been established over 8000 iterations behind (posted a larger history with EDIT).. i'm just wondering whether i messed up the settings and this could be improved/speed up..or is this just a mesh size issue?

im running simpleFoam on 4 core with scotch,
i dont think my bc should be a problem... this is my domain..

here are some mesh closes
http://img269.imageshack.us/img269/7530/dom1z.png
http://img542.imageshack.us/img542/3646/dom2x.png


im not aiming at E-6 residuals, even thou that's what i wanted, but sth better than 0.02!

many many thanks!:D

olivierG December 2, 2011 09:30

hello,

Just some hint ...
- Since it's steady state, you may take a look at local time stepping.
- use hex / polyhedre instead of tet mesh

regards,
olivier

caramelo December 2, 2011 10:30

What about the residuals of the pressure?
some ideas:


Did you try the cellLimited linearUpwindV 1 for div(phi,)?
You can also cellLimit the gradSchemes. Especially for k and omega. If that doesn't help try cellLimited for grad(U) as well...

calim_cfd December 2, 2011 11:28

Quote:

Originally Posted by olivierG (Post 334428)
hello,

Just some hint ...
- Since it's steady state, you may take a look at local time stepping.
- use hex / polyhedre instead of tet mesh

regards,
olivier

as to the elements shapes... yes hex and poly should decrease the mesh size. i ended up with lots of tetra since i was trying out a specific mesher, i could prolly have meshed the same geometry with snappyhexmesh. But since im playing with the issues of large meshes and possible bad ones 2, this mesh is a good example.

and ill try larger time steps. when running steady-state cases i usually forget about this option, but this is a case a can check

thx for tips!:)

Quote:

What about the residuals of the pressure?
some ideas:


Did you try the cellLimited linearUpwindV 1 for div(phi,)?
You can also cellLimit the gradSchemes. Especially for k and omega. If that doesn't help try cellLimited for grad(U) as well..
pressure was left apart since i was using 2 correctors..
but here it goes
http://img846.imageshack.us/img846/9718/dom5y.jpg


will do that 2! tyvm!:)


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