CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

PimpleFoam: check for convergence within time step

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Begineer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2014, 04:01
Default PimpleFoam: check for convergence within time step
  #1
New Member
 
Join Date: Jan 2014
Posts: 6
Rep Power: 12
Begineer is on a distinguished road
Hi everyone,

How do most people check for convergence within a pimpleFoam time step? In STAR-CCM+, I would create several point probes and monitor different quantities of interest per inner iteration, to make sure they have converged within the time step before moving on to the next. I’ve found it necessary to do that, since just looking at residuals is sometimes misleading.

In OpenFOAM, I can create probe points and monitor quantities per time step, but how can I create monitors per inner loop?

For example, let’s say my pimple settings are like this:

PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 3;
nCorrectors 2;
nNonOrthogonalCorrectors 4;
}

This means that the pressure is solved for 30 times per time step. I want want to be able to plot the pressure in some points after each solve, so that I can make sure that the pressure field has stopped evolving before moving on to the next time step. Is this possible?
Begineer is offline   Reply With Quote

Old   April 18, 2014, 04:54
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

you're looking for residualControl subdict:

Code:
PIMPLE
{
    nOuterCorrectors    100;
    nCorrectors         2;
    nNonOrthogonalCorrectors 1;
    turbOnFinalIterOnly no;

    residualControl
    {
        "(U|p)"
        {
            tolerance 1e-2;
            relTol 0;
        }
    }
}
It will iterate till residual of U and p in the beginning of iteration is higher that 0.01 (or it reaches 100 iterations and report that PIMPLE was not converged).

About second part of the question, AFAIK to achieve this functionality you'll need to modify solver. There is probes functionality but they can write values each time step, not each solver iteration.
alexeym is offline   Reply With Quote

Old   April 19, 2014, 17:27
Default
  #3
New Member
 
Join Date: Jan 2014
Posts: 6
Rep Power: 12
Begineer is on a distinguished road
Hi Alexey,

Thanks for your quick reply.

I will use residualControl. However, My experience with the Simple algorithm is that flow quantities in certain, often critical, points can converge slower than the global residuals. Only looking at residuals would in that case give a false impression of convergence, whereas in fact the flow field was still changing in some points. I'm not experienced with Pimple, so it might be different here.

It seems as if you're right about having to modify the code. I'm new to both OpenFOAM and C++, so this might be a bit tricky though.

I guess I could just run several simulations for one time step, starting from the same time, but with different pimple settings, to see how much it influences the solution.

Cheers
Begineer is offline   Reply With Quote

Old   April 21, 2014, 17:42
Default
  #4
New Member
 
Join Date: Jan 2014
Posts: 6
Rep Power: 12
Begineer is on a distinguished road
So, if anyone is interested, my current "hack" is to change pEqn.H and insert the following Info line:

while (pimple.correctNonOrthogonal())
{
<code>

Info<< "p(0.02,0.001,0.001) = " << p[mesh.findCell(point(0.02,0.001,0.001))] << endl;

}

This gives me info on how the pressure changes for each iteration within a time step, at a specific point. Works for now at least.
adambarfi and Swift like this.
Begineer is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
Unexpected deltaT decrease in pimpleFoam simulation robyTKD OpenFOAM Running, Solving & CFD 9 June 27, 2014 06:52
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03:34
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 04:35


All times are GMT -4. The time now is 20:45.