|
[Sponsors] | |||||
|
|
|
#1 |
|
Senior Member
Attesz
Join Date: Mar 2009
Posts: 352
Rep Power: 6 ![]() |
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;
}
}
// ************************************************************************* //
__________________
CFD= Cleverly Formatted Data |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 364
Rep Power: 9 ![]() |
Try prescribing something nonesensical in pFinal to see if it's actually even reading it. e.g. tolerance banana;
__________________
~~~ Follow me on twitter @DavidGaden |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,877
Rep Power: 23 ![]() |
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 GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image. GeekoCFD 32bit - The 32bit edition of GeekoCFD. GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats. Last edited by alberto; March 18, 2012 at 21:33. Reason: Added comment |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Attesz
Join Date: Mar 2009
Posts: 352
Rep Power: 6 ![]() |
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
__________________
CFD= Cleverly Formatted Data |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 7 | March 15, 2013 06:08 |
| High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 9 | January 3, 2012 08:06 |
| Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |
| Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM | 6 | April 12, 2011 11:24 |
| Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 11:16 |