|
[Sponsors] |
fvSchemes, Fina residual tolerance not working |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 17, 2012, 10:55 |
fvSchemes, Fina residual tolerance not working
|
#1 |
Senior Member
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17 |
Hi all,
if I set the final residual tolerances, finally the solver doesn't reach the prescribed level. However, if I adjust the tolerance/reltol in the simple U/p etc. it can reach whatever I want. Is it a bug maybe? Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { pcorr { solver GAMG; tolerance 1e-2; relTol 0; smoother DICGaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10000; agglomerator faceAreaPair; mergeLevels 1; maxIter 10; } p { $pcorr; tolerance 1e-5; relTol 0.01; } pFinal { $p; tolerance 1e-8; relTol 0; } //parameters for k-omega model U { solver GAMG; smoother DILUGaussSeidel; nPreSweeps 0; nPostSweeps 2; tolerance 1e-4; relTol 0; cacheAgglomeration true; nCellsInCoarsestLevel 10000; agglomerator faceAreaPair; mergeLevels 1; maxIter 5; } k { solver GAMG; smoother DILUGaussSeidel; nPreSweeps 0; nPostSweeps 2; tolerance 1e-4; relTol 0; cacheAgglomeration true; nCellsInCoarsestLevel 10000; agglomerator faceAreaPair; mergeLevels 1; maxIter 5; } omega { solver GAMG; smoother DILUGaussSeidel; nPreSweeps 0; nPostSweeps 2; tolerance 1e-4; relTol 0; cacheAgglomeration true; nCellsInCoarsestLevel 10000; agglomerator faceAreaPair; mergeLevels 1; maxIter 5; } "(U|k|omega)Final" { solver PBiCG; preconditioner DILU; tolerance 1e-8; relTol 0; } } SIMPLE { nNonOrthogonalCorrectors 5; //because the mesh is highly not orthogonal. maximum 20, 0 is cartesian hexahedral! pRefCell 0; pRefValue 0; residualControl { p 1e-4; U 1e-4; "(k|epsilon|omega)" 1e-4; } } potentialFlow { nNonOrthogonalCorrectors 10; } relaxationFactors { fields { p 0.3; } equations { U 0.7; k 0.5; omega 0.5; } } // ************************************************************************* // |
|
March 17, 2012, 17:26 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
Try prescribing something nonesensical in pFinal to see if it's actually even reading it. e.g. tolerance banana;
__________________
~~~ Follow me on twitter @DavidGaden |
|
March 18, 2012, 21:21 |
|
#3 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
I see where your confusion can come from. The SIMPLE algorithm does not have any "final" iteration, so the pFinal entry won't be read. The "Final" entries are only used in solvers based on the PIMPLE algorithm, where indeed each integration (time or pseudo-time) step has more than one iteration. In short, the linear solver will give you the final residual you require in "p".
Also, please note that if tolerance is too small, the linear solver will stop at 1000 iterations by default (you can change this value). If you set a high tolerance (say 1.0e-2), the solver will stop at the first iteration below that value, so it would not surprise me if that would be smaller (say something like 0.004). P.S. I am not so sure it's convenient to use GAMG on anything but p. For steady-state solutions, smoothSolver seems to work better for me. 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. Last edited by alberto; March 18, 2012 at 21:33. Reason: Added comment |
|
March 20, 2012, 04:26 |
|
#4 |
Senior Member
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17 |
Alberto, thanks for your comments. Indeed, I didn't see any pFinal nor GAMG for U in tutorial MRFSimpleFoam cases and on the Wiki.
Have a nice day, Attila |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 06:24 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |