CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   GAMG hexa vs. tetrahedron meshes (http://www.cfd-online.com/Forums/openfoam/78273-gamg-hexa-vs-tetrahedron-meshes.html)

idrama July 16, 2010 12:14

GAMG hexa vs. tetrahedron meshes
 
Hello Foamers!

Has anybody experience to set up GAMG for hexa or tetraeder? On tet, Do I have to increase, for instance, smoother iteration or merge levels?

Cheers in advance

MartinB July 16, 2010 13:23

Hi Claus,

in my opinion it doesn't matter for GAMG if you are using hexas or tetras. A good choice of settings for my projects is:
Code:

solvers
{
    U                                  // linear equation system solver for U
    {
        solver          smoothSolver;  // solver type
        smoother        GaussSeidel;    // smoother type
        tolerance      1e-06;          // solver finishes if either absolute
        relTol          0.01;          // tolerance is reached or the relative
                                        // tolerance here
        nSweeps        1;              // setting for smoothSolver
        maxIter        100;            // limitation of iterations number
    }
    pd                                  // linear equation system solver for pd
    {
        solver          GAMG;          // very efficient multigrid solver
        tolerance      1e-07;          // solver finishes if either absolute
        relTol          0.001;          // tolerance is reached or the relative
                                        // tolerance here
        minIter        3;              // a minimum number of iterations
        maxIter        100;            // limitation of iterions number
        smoother        DIC;            // setting for GAMG
        nPreSweeps      1;              // 1 for pd, set to 0 for all other!
        nPostSweeps    2;              // 2 is fine
        nFinestSweeps  2;              // 2 is fine
        scaleCorrection true;          // true is fine
        directSolveCoarsestLevel false; // false is fine
        cacheAgglomeration on;          // on is fine; set to off, if dynamic
                                        // mesh refinement is used!
        nCellsInCoarsestLevel 500;      // 500 is fine,
                                        // otherwise sqrt(number of cells)
        agglomerator    faceAreaPair;  // faceAreaPair is fine
        mergeLevels    1;              // 1 is fine
    }
}

Important to note:
- nPreSweeps must be 0 for other equation systems than pressure
- to use the minIter option you must patch GAMG sources in most OpenFOAM versions
- cacheAgglomeration must be switched off when using dynamic mesh refinement

Playing with the options don't give remarkable speedup for my problems.

Martin

idrama July 17, 2010 05:19

Thanks MartinB, the informations are valueable for me! However, there is one question concernins the option nCellsInCorseLeve: Why the sqrt of the cells? Have you an paper or something like that?

Cheers

MartinB July 17, 2010 06:03

Hi Claus,
I found the hint for sqrt(#cells) in the forum some time ago and made a note in my fvSolution template without paying too much attention to it...

This might be an interesting thread (especially the links to the PDFs), if you want to use some variants of AMG:
http://www.cfd-online.com/Forums/ope...41dev-svn.html
However it could be some work to integrate these solvers and preconditioners in the newer OpenFOAM versions.

Martin

idrama July 19, 2010 08:59

Do you probaly mean: If I have n processors then I have to take (total no. cells)^(1/n)?

MartinB July 19, 2010 09:30

I mean: sqrt(1000000) = 1000
But: I never tested it in more detail... my value of 500 was fine, changing it had no big influence on my computation speed.
You can test it out: start your simulation, change the value after a few iterations and check the new iteration times. Then make another change and check again...

Many other posts in the forum prefer values of 10 to 30 for nCellsInCoarsestLevel...
http://www.cfd-online.com/OpenFOAM_D...tml?1162930507

Martin

wyldckat September 1, 2013 05:54

FYI: For future reference, the link on the previous post is for the following thread in the new forum format: http://www.cfd-online.com/Forums/ope...rsus-iccg.html


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