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

Too much iterations for k, epsilon with Pointwise mesh

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

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2015, 05:08
Default
  #21
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 25
RodriguezFatz will become famous soon enough
Edit: I just made some pictures of your residuals over iteration / time. This looks ugly. I will post the picture.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 13, 2015, 05:26
Default
  #22
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 25
RodriguezFatz will become famous soon enough
output.png
This is how the residuals of your case look like.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 13, 2015, 06:17
Default
  #23
New Member
 
Jason
Join Date: May 2015
Posts: 14
Rep Power: 9
tigger is on a distinguished road
Philipp,
The solver I use is 'interFoam' and it is multiphase(water, air in this case) and unsteady solver.
interFoam use VOF(Volume of fluid) method to capture water interface(Freesurface).
In VOF, if I understands it correctly, solve 1 transport equation and 1 continuity equation that containing Alpha ( If Alpha is 0 : cell is gas phase(air), 1 : cell is full of water and value between 0 and 1 is interface..
I'll try under-relaxation factor on alpha!

The problem I solve is a floating square box with freestream..(Water flow past a square box)

Residuals in the picture you uploaded shows sudden rise of continuity..I don't know why but there should be something wrong..

by the way, which tool you used to draw residual plot? Did you used GNU plot?
If so, can I see the script you used?

Many thanks,
Jason
tigger is offline   Reply With Quote

Old   October 13, 2015, 06:21
Default
  #24
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 25
RodriguezFatz will become famous soon enough
Hi,

Yes it is gnuplot.
Copy the code to a file called "plotscript" in the same directory as your log file is.
You can run it with "gnuplot plotscript" during runtime, the plot will redone every 1 second.
If you want to plot a picture just delete the "#" in the first two lines and comment out the last lines "reread" and "pause 1".
Everything should be self-explanatory, but if you don't understand it, just ask...

Code:
#set terminal png size 800,600 enhanced font "Helvetica,12"
#set output 'output.png'
set logscale y
set title "Residuals"
set ylabel 'Residual'
set xlabel 'Iteration'
set key outside
set grid
set yrange[1e-14:10]

nCorrectors=3
nNonOrthogonalCorrectors=1

nCont = nCorrectors
nP = (nNonOrthogonalCorrectors+1)*nCont
nPSkip = nP-1
nContSkip = nCont-1



plot "< cat log | grep 'Solving for alpha.water' | cut -d' ' -f9 | tr -d ','" title 'alpha' with linespoints,\
"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with linespoints,\
"< cat log | grep 'Solving for epsilon' | cut -d' ' -f9 | tr -d ','" title 'epsilon' with linespoints,\
"< cat log | grep 'time step continuity errors :' | cut -d' ' -f9 | tr -d ','" every nCont::nContSkip title 'continuity' with linespoints,\
"< cat log | grep 'Solving for p_rgh' | cut -d' ' -f9 | tr -d ','" every nP::nPSkip title 'p' with linespoints lc 8
pause 1
#xmax = GPVAL_DATA_X_MAX+2
#xmin = xmax-20
#set xrange [xmin:xmax]
reread
If you change the solver settings you must always also change the plotscript (OuterCorrections,...)
Frenk_T and Turin Turambar like this.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 13, 2015, 06:24
Default
  #25
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 25
RodriguezFatz will become famous soon enough
The sudden rise comes from the next time step (every 15 iterations). This is quite normal for PIMPLE.
It is not good, that the residuals don't converge appreciably. Is there any change that you can run a steady state solution prior? Such as SIMPLE for initialization?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 13, 2015, 06:42
Default
  #26
New Member
 
Jason
Join Date: May 2015
Posts: 14
Rep Power: 9
tigger is on a distinguished road
Philipp,

The scrip you gave me works well!
Thanks!

Well, I've never tried SIMPLE algorithm for initialization..
tigger is offline   Reply With Quote

Old   October 15, 2015, 23:44
Wink
  #27
Senior Member
 
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 14
Elham is on a distinguished road
Hi,

I had a very awfull number of iteration for p-rgh, around 190, and after changing relTol from 0 to 0.001 it is great, around 10.

Thanks for your advice.
tigger likes this.
Elham is offline   Reply With Quote

Old   October 16, 2015, 02:17
Default
  #28
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 25
RodriguezFatz will become famous soon enough
Great, but does it converge now?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 16, 2015, 02:52
Default
  #29
Senior Member
 
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 14
Elham is on a distinguished road
Unfortunately, I didn't pay attention to the second attempt for solving p-rgh which is still have high No iteration.

MULES: Solving for alpha.water
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 2.111971e-05 Min(alpha1) = 0 Max(alpha1) = 0.9974017
GAMG: Solving for p_rgh, Initial residual = 0.05853901, Final residual = 5.498377e-05, No Iterations 6
time step continuity errors : sum local = 3.274181e-09, global = 1.346159e-14, cumulative = -6.08748e-09
GAMG: Solving for p_rgh, Initial residual = 0.0001254836, Final residual = 9.72051e-07, No Iterations 80
time step continuity errors : sum local = 5.814538e-11, global = 5.793274e-17, cumulative = -6.08748e-09
ExecutionTime = 80707.64 s ClockTime = 81027 s
Elham is offline   Reply With Quote

Old   October 16, 2015, 03:17
Default
  #30
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 25
RodriguezFatz will become famous soon enough
You could try a different smoother for the GAMG.
Code:
p
    {
        solver           GAMG;
        tolerance        1e-12;
        relTol           0.1;
        smoother         DICGaussSeidel;
        nPreSweeps       0;
        nPostSweeps      1;
        nFinestSweeps    2;
        scaleCorrection  true;
        directSolveCoarsestLevel false;
        cacheAgglomeration on;
        agglomerator     faceAreaPair;
        nCellsInCoarsestLevel 500;
        mergeLevels      1;
        maxIter         100;
    }
I meant the PIMPLE algorithm, not the linear solvers, sorry. Does PIMPLE converge now?
__________________
The skeleton ran out of shampoo in the shower.

Last edited by RodriguezFatz; October 16, 2015 at 04:52.
RodriguezFatz is offline   Reply With Quote

Reply

Tags
convergence, diverge, interfoam

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
a problem with convergence in buoyantSimpleFoam skuznet OpenFOAM Running, Solving & CFD 6 November 15, 2017 12:12
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
should Courant number always be kept below 1? wc34071209 OpenFOAM Running, Solving & CFD 16 March 9, 2014 19:31
rhoSimplecFoam Mach0.8 no pressure values CFDnewbie147 OpenFOAM Running, Solving & CFD 16 November 23, 2013 05:58


All times are GMT -4. The time now is 05:32.