|
[Sponsors] |
Large number of iterations using PCG in pressure equation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 3, 2015, 17:28 |
Large number of iterations using PCG in pressure equation
|
#1 |
New Member
Join Date: Nov 2012
Posts: 27
Rep Power: 14 |
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; } 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; } |
|
November 5, 2015, 08:12 |
|
#2 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Did you try the obvious things such as trying a different preconditioner?
__________________
The skeleton ran out of shampoo in the shower. |
|
November 5, 2015, 13:55 |
|
#3 |
New Member
Join Date: Nov 2012
Posts: 27
Rep Power: 14 |
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. |
|
January 8, 2019, 03:23 |
|
#4 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
I am also interested in this topic, any suggestion is highly appreciated.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Floating point exception error | Alan | OpenFOAM Running, Solving & CFD | 11 | July 1, 2021 22:51 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |
SigFpe when running ANY application in parallel | Pj. | OpenFOAM Running, Solving & CFD | 3 | April 23, 2015 15:53 |
Cannot run the code properly: very large time step continuity error | crst15 | OpenFOAM Running, Solving & CFD | 9 | December 14, 2014 19:17 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |