|
[Sponsors] |
March 1, 2014, 13:45 |
trouble using residual control in pimplefoam
|
#1 |
Member
robo
Join Date: May 2013
Posts: 47
Rep Power: 12 |
Hey all,
I am very new to openfoam, but I feel like I must be missing something very obvious. I am running a simple hydrofoil case in pimpleFoam, trying to reach a steady state. I'm using version 2.1.1 in case that helps. I am trying to setup the residual control dictionary within the pimple dictionary, which I have as: Code:
PIMPLE { nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; residualControl { "(U|P|k|omega)" { tolerance 1e-1; relTol 0; } } } I understand that this is not a good value to halt the solution at; I am simpling trying to make it work the way I think it should be working. Am I wrong about what residualControl does? or am I missing something in the setup? I at first tried to very the relTol, thinking it might be the problem, but I had no luck with that either... |
|
March 1, 2014, 16:24 |
|
#2 |
Senior Member
|
Hi,
in case of PIMPLE you go to the next time step as soon as your residuals go below given value. If you'd like to get steady state solution and halt simulation, you'd better use SIMPLE family solvers. Also as you have only one outer corrector, solution will go on even if you do not reach given residual value, as the criterion for the next time step in PIMPLE is whether you reach nOuterCorrectors or reach reasidualControl values. |
|
March 2, 2014, 11:20 |
|
#3 |
Member
robo
Join Date: May 2013
Posts: 47
Rep Power: 12 |
I'm using pimple as this is a first step towards an interfoam simulation, and interfoam uses pimple. I was under the impression that the tolerances set in the numerical solver dictionaries within fvSolution control the convergence within a timestep, but that residual control controls convergence tolerance for time-like marching (what i'm doing...) between timesteps. I want to make sure I understand what you're saying as it's a bit unclear.
The residual control only determines whether or not pimple will use all of it's corrector loops? There is no way to exit the simulation in pimple based on convergence between timesteps? |
|
March 2, 2014, 12:04 |
|
#4 |
Senior Member
|
Well,
if we take a look at the dictionaries in fvSolution, usually they look like Code:
p { solver PCG; preconditioner DIC; tolerance 1e-06; relTol 0.05; } If we take a look at typical PIMPLE dictionary, it will look like: Code:
PIMPLE { nOuterCorrectors 50; nCorrectors 2; nNonOrthogonalCorrectors 2; pRefCell 0; pRefValue 0; turbOnFinalIterOnly no; residualControl { "(p|U|k|epsilon)" { tolerance 1e-2; relTol 0; } } } If you take a look at the source code for pimpleFoam, the main time loop looks like: Code:
while (runTime.run()) { #include "readTimeControls.H" #include "CourantNo.H" #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { #include "UEqn.H" // --- Pressure corrector loop while (pimple.correct()) { #include "pEqn.H" } if (pimple.turbCorr()) { turbulence->correct(); } } runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Code:
while (simple.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; // --- Pressure-velocity SIMPLE corrector { #include "UEqn.H" #include "pEqn.H" } turbulence->correct(); runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Usually I choose time limits for pimpleFoam preset simulation for interFoam using empirical endTime = 3*L/U, where L is channel length and U is inlet velocity. I also successfully used simpleFoam as preset simulation for interFoam. The time needed for simpleFoam to converge was around that 3*L/U. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 13:12 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 13:58 |
pimpleFoam: turbulence->correct(); is not executed when using residualControl | hfs | OpenFOAM Running, Solving & CFD | 3 | October 29, 2013 08:35 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 06:37 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |