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

Large number of iterations using PCG in pressure equation

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By calf.Z

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2015, 16:28
Default Large number of iterations using PCG in pressure equation
  #1
mgg
New Member
 
Join Date: Nov 2012
Posts: 27
Rep Power: 13
mgg is on a distinguished road
I am running a DNS case using buoyantPimpleFoam (OF V2.4). The case is a long pipe with an inlet and outlet. The fluid is air. Inlet Re is about 5400.

For getting better scalability, I use PCG for pressure equation. If I use perfect gas equation of state, the number of iterations will be around 100, which is acceptable. If I use icopolynom or rhoConst to describe the density, the number of iterations will be around 4000! If I use GAMG for p equation, number of iteration will be under 5, but the scalability is poor with above 500 cores. Does anyone has any opinion?

How can I improve PCG solver to decrease the number of iterations? Thank you.

fvSchemes
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         backward;//CrankNicolson 1.0;//
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linear;//midPoint;//
    div(phi,h)      Gauss QUICK phi;//
    div(phi,e)      Gauss linear;
    div(phi,K)      Gauss linear;
    div(phi,epsilon) Gauss linear;
    div(phi,R)      Gauss linear;
    div(phi,Ekp)    Gauss linear;
    div(R)          Gauss linear;
    div((muEff*dev2(T(grad(U))))) Gauss linear;// corrected;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;//skewCorrected;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p_rgh;
}
fvSolution

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
{
    "rho.*"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       0;
        relTol          0;
    }

       p_rgh
    {        
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-07;
        relTol           0.01;
        maxIter          4000;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "(U|h|e|k|epsilon|R)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-8;
        relTol          0.01;
    }

    "(U|h|e|k|epsilon|R)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 1;
    nCorrectors     3;
    nNonOrthogonalCorrectors 0;



}
mgg is offline   Reply With Quote

Old   November 5, 2015, 07:12
Default
  #2
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Did you try the obvious things such as trying a different preconditioner?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 5, 2015, 12:55
Default
  #3
mgg
New Member
 
Join Date: Nov 2012
Posts: 27
Rep Power: 13
mgg is on a distinguished road
Yes, I did. I tried GAMG as preconditioner but this leads to a bad scalability. I found that the PCG solver can decrease the residual to about 1e-5 within about 100 iterations. But from computation of residual from 1e-5 to 1e-7 costs several thound time of iterations. Adding number of correctors does not work.

I also tried different different BC on the wall like simple zeroGradient, but it does not bring anything.

I also tried different schemes in fvschemes e.g. backward/Crank Nicolson for time, and so on.

Quote:
Originally Posted by RodriguezFatz View Post
Did you try the obvious things such as trying a different preconditioner?
mgg is offline   Reply With Quote

Old   January 8, 2019, 02:23
Default
  #4
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 7
calf.Z is on a distinguished road
I am also interested in this topic, any suggestion is highly appreciated.
lourencosm likes this.
calf.Z is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 21:51
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
SigFpe when running ANY application in parallel Pj. OpenFOAM Running, Solving & CFD 3 April 23, 2015 14:53
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 18:17
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20


All times are GMT -4. The time now is 16:45.