CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Pre-Processing

Whats the procedure for choosing tolerances in fvSolution?

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

Like Tree1Likes
  • 1 Post By wyldckat

LinkBack Thread Tools Display Modes
Old   June 15, 2013, 11:08
Default Whats the procedure for choosing tolerances in fvSolution?
Senior Member
immortality's Avatar
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 20
immortality is on a distinguished road
in sonicFoam/ras/prism the fvSolution is so:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:                      |
|    \\/     M anipulation  |                                                 |
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

        solver          diagonal;

        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-08;
        relTol          0;

        tolerance       1e-05;

        tolerance       1e-08;

    nOuterCorrectors 2;
    nCorrectors      1;
    nNonOrthogonalCorrectors 0;
why U and e tolerances has chosen to be less than turbulent residuals?
and what's the general way to have a good selection of tolerances in fvSolution?
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 15, 2013, 12:55
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,123
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Hi Ehsan,

Oddly enough, I think I know some parts to this question, although I'm in no way an expert on this topic, so I ask anyone who has more experience on this to fill in the gaps.

First of all, the OpenFOAM User Guide explains what the parameters "tolerance" and "relTolerance" are, in subsection " Solution tolerances":

Secondly, since it's about "tolerance" you're asking about, as the User Guide indicates, refers to the target final residual for the equation solution, which should be the default option to be used for transient simulations.

As for values, it all depends on the level of accuracy your looking for. But in this case, I suspect it's because the original author doesn't want errors from the turbulence fields to introduce unwanted cumulative errors into the solution, since "U" and "p" are affected by the turbulence fields. Most likely, it's also due to this:
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
Both fields are solved only as 1st degree, so it's probably a good idea to have lower values of final residuals.

While for "U", tolerance of 1e-5 is "good enough". AFAIK, "U" and "p" should be at least below 1e-4, so 1e-5 is a good target value. And since (I think) they are solved with 2nd degree div schemes, lower values would be a time waster, unless you were dealing with micro-fluids or something like that (it's just a guess here!).

Best regards,
immortality likes this.
wyldckat is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SimpleFoam convergence problems brahim OpenFOAM Running, Solving & CFD 20 June 9, 2015 09:09
how to do the fvSolution configuration - SIMPLE Foam - complex cylinder geometry despaired student OpenFOAM Running, Solving & CFD 10 July 5, 2012 03:36
interFoam solution tolerances mgdenno OpenFOAM 4 September 13, 2011 12:58
[ICEM] Procedure : how to mesh correctly two semicircles in an air flow ? eeesprit ANSYS Meshing & Geometry 2 April 10, 2011 15:14
Calculation of Averages in lesInterFoam Erroneous Procedure ngj OpenFOAM Bugs 6 April 15, 2008 13:21

All times are GMT -4. The time now is 08:39.