CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

OF 2.0.0: Residual control does not work in interFoam

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

Like Tree3Likes
  • 3 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   June 22, 2011, 11:49
Question OF 2.0.0: Residual control does not work in interFoam
  #1
Member
 
Lars Kiewidt
Join Date: Sep 2009
Location: Germany
Posts: 54
Rep Power: 6
LarsPT is on a distinguished road
Hi everybody,

I want to use the new convergence check for the PIMPLE solvers in interFoam (OpenFOAM-2.0.0). So, I specified the following in fvSolution:

Code:
PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors 3;
    //nCorrectors     3;
    nNonOrthogonalCorrectors 0;
    
    nAlphaCorr      1;
    nAlphaSubCycles 2;
    cAlpha          1; 
    
    residualControl
    {
        p_rgh    1e-3;
    }
}
However, when I run interFoam I get this output at the beginning

Code:
PIMPLE: max iterations = 3
    field p_rgh    : relTol 0, tolerance 0
and for each time step

Code:
PIMPLE: not converged within 3 iterations
althoug the residual is way under 1e-03!

Is that a bug or am I just missing a switch or something else? I already checked the source files but I could not find any valuable information in there.

Thanks in advance!

Lars
LarsPT is offline   Reply With Quote

Old   June 24, 2011, 17:46
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 6,997
Blog Entries: 32
Rep Power: 69
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings Lars,

Have you also tested it with OpenFOAM 1.7.1 or 1.7.x? If it works with those and not 2.0.0 nor 2.0.x, then you might want to report it as bug!

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 28, 2011, 07:25
Default
  #3
Member
 
Lars Kiewidt
Join Date: Sep 2009
Location: Germany
Posts: 54
Rep Power: 6
LarsPT is on a distinguished road
According to the OF-2.0.0 Release Notes this is a new feature for all SIMPLE/PIMPLE solvers. It was implementent in simpleFoam in OF-1.7.1 and I tested it successfully, also in OF-2.0.0. However, it is new for interFoam.
LarsPT is offline   Reply With Quote

Old   August 20, 2011, 08:34
Default
  #4
Member
 
Simon Lapointe
Join Date: May 2009
Location: Québec, Qc, Canada
Posts: 33
Rep Power: 7
Simon Lapointe is on a distinguished road
Maybe you've already solved your problem, but have you tried something like this:

residualControl
{
p_rgh
{
tolerance 1e-3;
absTol 0;
}
}

I had the same problem as you described in pimpleFoam and solved it using this syntax.
Simon Lapointe is offline   Reply With Quote

Old   August 20, 2011, 09:03
Default
  #5
Member
 
Lars Kiewidt
Join Date: Sep 2009
Location: Germany
Posts: 54
Rep Power: 6
LarsPT is on a distinguished road
Sorry, I didn't work too much on that issue the last weeks. Your hint works perfectly, thank you. I just had to add relTol, so now it looks like this:

Code:
residualControl
{
        p_rgh
        {
            tolerance 1e-06;
            relTol 0;
            absTol 0;
        }
}
LarsPT is offline   Reply With Quote

Old   August 6, 2012, 08:53
Default
  #6
New Member
 
Alessandro Pani
Join Date: Jul 2012
Posts: 21
Rep Power: 4
Dr.Faustus is on a distinguished road
Hi guys! I've tried to modify the commands as suggested by Simon and LarsPT, but this doesn't work for me :
Code:
PIMPLE
{
    momentumPredictor yes;

    nCorrectors     1;
    nNonOrthogonalCorrectors 0;

    nAlphaCorr      1;
    nAlphaSubCycles 1;
    cAlpha          1;

    maxCo           0.9;
    maxAlphaCo      0.2;
    nAlphaSweepIter 1;

    rDeltaTSmoothingCoeff 0.1;
    rDeltaTDampingCoeff 1;
    maxDeltaT       1;

residualControl
    {
        p_rgh
        {
            tolerance 1e-02;
            relTol 0;
            absTol 0;
        }
        
    }

}
Could you take a look if there's something wrong?
Thanks
Dr.Faustus is offline   Reply With Quote

Old   August 7, 2012, 07:28
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 6,997
Blog Entries: 32
Rep Power: 69
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings Alessandro,

A couple of more details would come in handy, such as:
  • What solver are you trying to use? We can assume it's interFoam, but you could be using some other one....
  • What OpenFOAM version are you using?
  • Can this be reproduced in one of OpenFOAM's tutorials? If so, which one?
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 7, 2012, 08:51
Unhappy
  #8
New Member
 
Alessandro Pani
Join Date: Jul 2012
Posts: 21
Rep Power: 4
Dr.Faustus is on a distinguished road

I'm using LTSInterFoam on OF 2.1.1
the test case is the /multiphase/LTSInterFoam/wigleyhull
Dr.Faustus is offline   Reply With Quote

Old   August 7, 2012, 10:25
Talking Little class on "Know your PIMPLE"
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 6,997
Blog Entries: 32
Rep Power: 69
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
OK, let's do a little class on "Know your PIMPLE"

First we look into the file where the "residualControl" is read:
Quote:
Originally Posted by src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C
Code:
Foam::pimpleControl::pimpleControl(fvMesh& mesh)
:
    solutionControl(mesh, "PIMPLE"),
    nCorrPIMPLE_(0),
    nCorrPISO_(0),
    corrPISO_(0),
    turbOnFinalIterOnly_(true),
    converged_(false)
{
    read();

    if (nCorrPIMPLE_ > 1)
    {
        Info<< nl;
        if (residualControl_.empty())
        {
            Info<< algorithmName_ << ": no residual control data found. "
                << "Calculations will employ " << nCorrPIMPLE_
                << " corrector loops" << nl << endl;
        }
        else
        {
            Info<< algorithmName_ << ": max iterations = " << nCorrPIMPLE_
                << endl;
            forAll(residualControl_, i)
            {
                Info<< "    field " << residualControl_[i].name << token::TAB
                    << ": relTol " << residualControl_[i].relTol
                    << ", tolerance " << residualControl_[i].absTol
                    << nl;
            }
            Info<< endl;
        }
    }
    else
    {
        Info<< nl << algorithmName_ << ": Operating solver in PISO mode" << nl
            << endl;
    }
}
In bold are the main details to look at. Basically, besides the need for "residualControl", you also need nCorrPIMPLE_, which apparently is "nOuterCorrectors", as you can see in the original post!

Also as you can see, without this value, it will operate in PISO mode! Which the tutorial "multiphase/LTSInterFoam/wigleyHull" uses by default.
There is another example for LTSInterFoam in the latest 2.1.x: https://github.com/OpenFOAM/OpenFOAM...tem/fvSolution
As you can see, neither one use the "nOuterCorrectors", so I do not know if LTSInterFoam is meant to be executed in PISO only or if it can be executed in PIMPLE mode...

Best regards,
Bruno
caduqued, jiec827 and Dr.Faustus like this.
wyldckat is offline   Reply With Quote

Old   August 27, 2012, 02:49
Default
  #10
New Member
 
Alessandro Pani
Join Date: Jul 2012
Posts: 21
Rep Power: 4
Dr.Faustus is on a distinguished road
Hi Wyldckat, sorry for the late reply, but i wasn't able to work on it in past weeks...
I'm taking a look at the controls you've posted... i've added nOuterCorrectors in the fvsolution ( erasing ncorr) and now it runs in PIMPLE and not in Piso... i let you know if the convergence controls works...
But at this steps i would to know if for a problem like the wigley hull is better to run in PISO or in Pimple.... anyway thank you very much for your help... another little piece of the jigsaw puzzle added
Dr.Faustus is offline   Reply With Quote

Old   October 16, 2012, 02:01
Default Please help me???
  #11
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 3
vahid.najafi is an unknown quantity at this point
Hi dear foamers.
I have a question:
I plot residual for velocity with gnuplot succefully.but have a problem yet!!!
in my controlDict(pic attachmented) deltaT=1e-6 and writeInterval=0.001 , with this options I stop my run and seen 1024 folders in my tutorial.

but I seen in my residual(pic attachmented) ,number of iterations:120000 and we underestand that in my tutorial That have been runed,should be i have 120 folders.????

my Supervisor tell me ,my residual not true???!!!please help me?????
Attached Images
File Type: png controlDict.png (34.8 KB, 51 views)
File Type: jpg residual.jpg (28.4 KB, 81 views)
vahid.najafi is offline   Reply With Quote

Reply

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
icoLagrangianFoam OF1.6 myNewParticleSolver heavy_user OpenFOAM 16 February 11, 2012 05:15
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM 6 April 12, 2011 11:24
TurbFoam problemlarge Co number sunnysun OpenFOAM Running, Solving & CFD 6 March 10, 2009 09:05
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 21:14
MRFSimpleFoam amp cyclic patches david OpenFOAM Running, Solving & CFD 36 October 21, 2008 21:55


All times are GMT -4. The time now is 18:35.