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

AMG as preconditioner

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By alberto

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2012, 05:54
Default AMG as preconditioner
  #1
New Member
 
Join Date: Jan 2012
Location: Germay - Stuttgart
Posts: 21
Rep Power: 0
HaZe is on a distinguished road
Hi,

after my first Problems with AMG as solver, I'm trying to use AMG as preconditioner like in the papers [1] and [2] from Hrv.

For GAMG as solver with preconditioner AMG it works well (I did this for proof of concept, if AMG as preconditioner works in my OF installation).

But it doesn't work with CG-methods.
This is my ./system/fvSolution:

Code:
solvers
{
        "(omega|rho|U|Yi|hs|k|epsilon)"
        {
        solver PBiCG;
        
        tolerance 1e-6;
        relTol    0;

        minIter 0;
        maxIter 1000;


                preconditioner
                {       
                         preconditioner AMG;   
                         cycle W-cycle;

                         nMaxLevels 100;
                         scale off; 
                         policy AAMG;
                         groupSize 4;
                         minCoarseEqns 20;
                         smoother GaussSeidel;
                         nPreSweeps 2;
                         nPostSweeps 2;

                         scaleCorrection true;
                         directSolveCoarsest false;
                         cacheAgglomeration true;
                         nCellsInCoarsestLevel 10;
                         agglomerator faceAreaPair;
                         mergeLevels 1;
                } 
        }


        p
        {
        solver PCG;

        tolerance 1e-9;
        relTol    0;

        minIter 0;
        maxIter 1000;

        preconditioner
                {       
                         preconditioner AMG;            
                         cycle W-cycle;
                         nMaxLevels 100;
                         scale off; 
                         policy AAMG;
                         groupSize 4;
                         minCoarseEqns 20;
                         smoother GaussSeidel;
                         nPreSweeps 2;
                         nPostSweeps 2;
                        
                         scaleCorrection true;
                         directSolveCoarsest false;
                         cacheAgglomeration true;
                         nCellsInCoarsestLevel 10;
                         agglomerator faceAreaPair;
                         mergeLevels 1;
                }
        }
}
 
PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
}
And the resulting error message:

Code:
Creating field DpDt

Courant Number mean: 2.98621e-05 max: 0.0562667 velocity magnitude: 42.2

Starting time loop

Courant Number mean: 5.30599e-05 max: 0.0999763 velocity magnitude: 42.2
deltaT = 1.77683e-05
Time = 1.77683e-05

Solving chemistry
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
[0] [1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] Not implemented[2] 
[2] 
[2] --> FOAM FATAL ERROR: 
[2] Not implemented
[2] 
[2]     From function AMG::preconditionT(scalarField& wT, const scalarField& rT, const direction cmpt)
[2] [3] 
[3] 
[3] --> FOAM FATAL ERROR: 
[3] Not implemented
[3] 
[3]     From function AMG::preconditionT(scalarField& wT, const scalarField& rT, const direction cmpt)
[3]     in file /build/buildd/openfoam-1.6-ext-1.6.0/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/lduMatrix.H at line 
[1] 
[1]     From function AMG::preconditionT(scalarField& wT, const scalarField& rT, const direction cmpt)
[1]     in file /build/buildd/openfoam-1.6-ext-1.6.0/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/lduMatrix.H at line 725.
[1] 
FOAM parallel run aborting
[1] 
    in file /build/buildd/openfoam-1.6-ext-1.6.0/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/lduMatrix.H at line 725.
[2] 
FOAM parallel run aborting
[2]
What does this mean? Am I not able to use AMG preconditioning for PCG and PBiCG solvers? But why does it work then for GAMG? I'm using OF1.6ext.

The "banana" test for getting the available preconditioners, shows me AMG among others.

I hope somebody can help me with this.

Greetings,
HaZe.
HaZe is offline   Reply With Quote

Old   February 24, 2012, 02:32
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
You should be able to use it with the PCG solver only. In OpenFOAM 2.1.x the syntax is

Code:
    
    p
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-08;
            relTol          0;
            smoother        DICGaussSeidel;
            nPreSweeps      0;
            nPostSweeps     2;
            nFinestSweeps   2;
            cacheAgglomeration false;
            nCellsInCoarsestLevel 10;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }
        tolerance       1e-08;
        relTol           0;
        maxIter         100;
    }
With PBiCG you can use the DILU preconditioner.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   February 24, 2012, 03:07
Default
  #3
New Member
 
Join Date: Jan 2012
Location: Germay - Stuttgart
Posts: 21
Rep Power: 0
HaZe is on a distinguished road
Quote:
Originally Posted by alberto View Post
You should be able to use it with the PCG solver only. In OpenFOAM 2.1.x the syntax is ...

With PBiCG you can use the DILU preconditioner.

Best,
Ok I will try this. But what's the problem with using PBiCG together with AMG as preconditioner? Is it a mathematical issue or just a matter of OF implementation? I thought long about it and searched for answers even more time but I didn't find any.

And another issue: you wrote I should use "GAMG" for preconditioning. Is it really the same as "AMG"? I always thought "GAMG" is just an improvement of the old "amgSolver" in OF 1.5 and "AMG" a completely new implementation.

It would be very nice for me to know the differences between all three of them. Has anyone any sources for that?
HaZe is offline   Reply With Quote

Old   February 24, 2012, 03:31
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by HaZe View Post
Ok I will try this. But what's the problem with using PBiCG together with AMG as preconditioner? Is it a mathematical issue or just a matter of OF implementation? I thought long about it and searched for answers even more time but I didn't find any.
The structure of the matrix is different, and the GAMG implementation only manages one type. It seems to make sense to me, since GAMG is typically used for the pressure equation.

Quote:
And another issue: you wrote I should use "GAMG" for preconditioning. Is it really the same as "AMG"? I always thought "GAMG" is just an improvement of the old "amgSolver" in OF 1.5 and "AMG" a completely new implementation.
I don't know the details of what has been implemented in -extend, since I use the Foundation release from SGI/OpenCFD.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto 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
v4 & AMG warning msg more work Siemens 9 September 7, 2022 09:10
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34
AMG versus ICCG msrinath80 OpenFOAM Running, Solving & CFD 2 November 7, 2006 15:15
Problem with jet flow braennstroem OpenFOAM Running, Solving & CFD 16 May 15, 2006 02:23


All times are GMT -4. The time now is 22:03.