|
[Sponsors] |
PimpleFoam: check for convergence within time step |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 18, 2014, 05:01 |
PimpleFoam: check for convergence within time step
|
#1 |
New Member
Join Date: Jan 2014
Posts: 6
Rep Power: 12 |
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? |
|
April 18, 2014, 05:54 |
|
#2 |
Senior Member
|
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; } } } 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. |
|
April 19, 2014, 18:27 |
|
#3 |
New Member
Join Date: Jan 2014
Posts: 6
Rep Power: 12 |
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 |
|
April 21, 2014, 18:42 |
|
#4 |
New Member
Join Date: Jan 2014
Posts: 6
Rep Power: 12 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
Unexpected deltaT decrease in pimpleFoam simulation | robyTKD | OpenFOAM Running, Solving & CFD | 9 | June 27, 2014 07:52 |
pisoFoam with k-epsilon turb blows up - Some questions | Heroic | OpenFOAM Running, Solving & CFD | 26 | December 17, 2012 04:34 |
calculation diverge after continue to run | zhajingjing | OpenFOAM | 0 | April 28, 2010 05:35 |