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

controlDict steady state

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

Like Tree3Likes
  • 1 Post By treima
  • 2 Post By flowAlways

Reply
 
LinkBack Thread Tools Display Modes
Old   May 29, 2012, 08:57
Default controlDict steady state
  #1
CRT
New Member
 
Carles
Join Date: Jan 2012
Location: Karlsruhe
Posts: 29
Rep Power: 6
CRT is on a distinguished road
Hi,

I would like to know what is the meaning of : endTime and deltaT for a steady state case. Itīs confusing.
has it a relation with the max amount of iterations ?
is it necessary to have a endTime and a deltaT that let the simulation go on until a convergence is reached ?

Thanks a lot
Carles





CRT is offline   Reply With Quote

Old   May 29, 2012, 18:54
Default
  #2
Member
 
Join Date: Nov 2010
Posts: 62
Rep Power: 7
Doug68 is on a distinguished road
Hi CRT,

I've been trying to get a grip on the same thing, quoting from here

"Residual/Convergence Control
Solvers using the SIMPLE or PIMPLE algorithms now include convergence controls based on residuals of fields. The controls are specified through a residualControls sub-dictionary in the fvSolution file. The user specifies a tolerance for one or more solved fields and when the residual for every field falls below the corresponding residual, the simulation terminates. The following example sets tolerances for p, U and k and epsilon:"

So on the face of it, it looks as if the time settings need to be long enough for the residuals to resolve and then the simulation will stop at that point.

I've failed to make it work like that yet.
Doug68 is offline   Reply With Quote

Old   May 30, 2012, 03:26
Default
  #3
Member
 
Join Date: Mar 2012
Location: Munich, Germany
Posts: 67
Rep Power: 6
treima is on a distinguished road
Hello,

Like you thought, endTime can be identified with the maximal amount of iterations. For problems, which donīt converge to a solution, the calculation would never stop.

deltaT is necessary, because OpenFoam have to choose, how often the problem is solved. For example, if you choose startTime 0, endTime 5000 and deltaT 5, you have 1000 iterations. Then you could take a look at your solution, if the convergence criterion is full filled.

In a mathematical approch, the time in a steady state problem can be seen as a "pseudo"-time. Your solution is independent of it, but you need it to solve your problem.
Sherlock_1812 likes this.
treima is offline   Reply With Quote

Old   May 30, 2012, 09:18
Default
  #4
CRT
New Member
 
Carles
Join Date: Jan 2012
Location: Karlsruhe
Posts: 29
Rep Power: 6
CRT is on a distinguished road
Thanks both for the replay.

Quote:
So on the face of it, it looks as if the time settings need to be long enough for the residuals to resolve and then the simulation will stop at that point.
Thatīs true, so we should check if the tolerance in the solver "tolerance 1e-05" must be higher than the residual control. I mean. If you has a more limited criteria for the SIMPLE than the solver. It could be problematic.

Code:
solvers
{
    p
    {
        solver          PCG;
        tolerance       1e-05;
        relTol          0.001;
    maxIter        6000;
        preconditioner  DIC;
    }


    "(U|T|k|epsilon|R)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.001;
    maxIter        6000;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;

    residualControl
    {
        p           1e-7;
        U               1e-7;
        T               1e-7;
        "(k|epsilon|omega)" 1e-5;
    }
}
Quote:
if you choose startTime 0, endTime 5000 and deltaT 5, you have 1000 iterations.
Iīm think it doesnīt work in this way. Since one can watch the iterations counter
Code:
Time = 1
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 0.000936822, No Iterations 66
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 0.00094058, No Iterations 39
I think that, the solver works out equation after equation, until either a maximum number of iteration is done ( 1000 if the user donīt set maxIter ) or reach a value under the previous specified residual (solver tolerance).
the deltaT is used to show how the residuals are going forward and also how you said, to guarantee that the program can do all the iterations that need to get a result, result under the SIMPLEīs condition
Code:
residualControl
     {
         p           1e-7;
         U               1e-7;
         T               1e-7;
         "(k|epsilon|omega)" 1e-5;
     }
CRT is offline   Reply With Quote

Old   October 15, 2014, 08:10
Lightbulb Understanding Steady State
  #5
New Member
 
Ali Kadar
Join Date: Oct 2014
Location: Delft
Posts: 25
Rep Power: 3
flowAlways is on a distinguished road
For steady state cases the time step deltaT should be set to 1
since for steady state its role is effectively that of an iteration counter.
source http://www.foamcfd.org/Nabla/guides/ProgrammersGuidese13.html

My Conclusions
For Steady State we use SIMPLE Algorithm which is essentially a guess and correct procedure for the calculation of pressure. So each time step involves a new guess followed by solving a linear system(to obtain the corrections).

Code:
startTime       0;
stopAt          endTime;
endTime         10000;
deltaT          1;

solvers
{   p tolerance 1e-06;
    U|k|epsilon|R|nuTilda tolerance 1e-05;
}

SIMPLE
{
    p 1e-2;
    U 1e-3;
    k|epsilon|omega 1e-3;
}
The above setting would essentially mean we repeat the guess-correct procedure 10000 times.
However the main stopping criteria is the tolerance 1e-02 for p, 1e-03 for U ..etc.
The simple algorithm would run until the above tolerance is achieved for each of p, U etc or the limit of 10000 is reached(which would essentially mean no convergence).

The tolerance for the solver is not really important and the values specified above(taken from pitzDaily simpleFoam tutorial) are good enough. There is no point considering smaller tolerance say 1e-08 because we are trying to obtain corrections for pressure with guessed starting values.

Some Observations(with a furnace geometry similar to pitzDaily but with a much refined mesh)
p 1e-3, U 1e-2; k|epsilon|omega 1e-2;
SIMPLE solution converged in 1572 iterations

p 1e-2, U 1e-1; k|epsilon|omega 1e-1;
SIMPLE solution converged in 281 iterations

p 1e-6, U 1e-5; k|epsilon|omega 1e-5;
SIMPLE solution did not converge even after 10000 iterations.

p 1e-5, U 1e-1; k|epsilon|omega 1e-1;
SIMPLE solution converged in 8910 iterations

Code:
smoothSolver:  Solving for Ux, Initial residual = 2.76007e-06, Final residual = 2.76007e-06, No Iterations 0
smoothSolver:  Solving for Uy, Initial residual = 8.51021e-06, Final residual = 8.51021e-06, No Iterations 0
GAMG:  Solving for p, Initial residual = 9.7978e-06, Final residual = 8.63712e-07, No Iterations 2
time step continuity errors : sum local = 3.83861e-07, global = -6.94709e-10, cumulative = 0.00612712
smoothSolver:  Solving for epsilon, Initial residual = 9.99271e-06, Final residual = 9.99271e-06, No Iterations 0
smoothSolver:  Solving for k, Initial residual = 9.86906e-06, Final residual = 9.86906e-06, No Iterations 0
ExecutionTime = 2808.42 s  ClockTime = 2818 s
Note: GAMG: Solving for p, Initial residual = 9.7978e-06 is the one that has to be monitored for the tolerance limit.
The Final Residual shows the local improvement.
For Ex Convergence after step 9000 would imply the sequence IR9001 ~ FR9001 ~ IR9002 ~ FR9002 ....

Please email me at a.h.kadar@student.tudelft.nl if you doubt or find the above conclusions wrong.
zfaraday and wayne14 like this.
__________________
A good solution is one which does justice to the inner nature of the problem- Cornelius Lanczos in a letter to Albert Einstein on March 9, 1947
flowAlways 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
Solver for transonic flow? Martin Hegedus OpenFOAM Running, Solving & CFD 22 December 16, 2015 05:59
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
error message cuteapathy CFX 14 March 20, 2012 07:45
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
mass flow in is not equal to mass flow out saii CFX 2 September 18, 2009 08:07


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