
[Sponsors] 
October 31, 2008, 09:36 
Hi All
I'm trying to find o

#1 
New Member
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 16 
Hi All
I'm trying to find out:  a good 1st order numerical scheme  a good 2nd order numerical scheme for the solver simpleFoam. Therefore I used the pitzDaily tutorial case and tried quite a number of numerical schemes  unfortounatly with limited success! The only one which converged was Gauss upwind. But also this was much slower than with CFX. The fallowing pictures show the residual plot for the different schemes. Here the residuals of the original setup of the tutorial case (upwind) : Here the residual plot of the case by using Gamma 1: I changed to these lines in fvSchemes div(phi,U) Gauss GammaV 1; div(phi,k) Gauss Gamma 1; div(phi,epsilon) Gauss Gamma 1; div(phi,R) Gauss Gamma 1; div(phi,nuTilda) Gauss Gamma 1; Here the residual plot of the case by using limitedLinear 1: I changed to these lines in fvSchemes div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(phi,nuTilda) Gauss limitedLinear 1; Here the residual plot of the case by using QUICK: I changed to these lines in fvSchemes div(phi,U) Gauss QUICK; div(phi,k) Gauss QUICK; div(phi,epsilon) Gauss QUICK; div(phi,R) Gauss QUICK; div(phi,nuTilda) Gauss QUICK; For comparison, here the CFX residuals: In all schemes I used the following relaxation factors (specified in fvSolution): relaxationFactors { p 0.2; U 0.7; k 0.5; epsilon 0.5; omega 0.5; R 0.7; nuTilda 0.7; } What can I do to get a better convergence with simpleFoam? Any hints are welcome! Thanks a lot for any help, Brahim 

November 3, 2008, 09:57 
What are you settings for solv

#2 
Senior Member
BastiL
Join Date: Mar 2009
Posts: 529
Rep Power: 19 
What are you settings for solvers/discretisation schemes and tolerances?


November 4, 2008, 05:14 
Here are the fvSolution and fv

#3 
New Member
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 16 

November 4, 2008, 13:57 
AFAIK these are the defualt se

#4 
Senior Member
BastiL
Join Date: Mar 2009
Posts: 529
Rep Power: 19 
AFAIK these are the defualt settings from the tutorial, right? Did you compare hem with the CFX settings?
Regards 

November 4, 2008, 15:26 
Another hint:
 Residal defin

#5 
Senior Member
BastiL
Join Date: Mar 2009
Posts: 529
Rep Power: 19 
Another hint:
 Residal definitions may be different, search forum...  How do you judge "convergence"? Look at residuals or flow quantities?  How to judge speed? Total run time? Time per Iteration? Parallelisation? Regards 

November 5, 2008, 04:46 
Hello BastiL
First thanks a

#6 
New Member
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 16 
Hello BastiL
First thanks a lot for your hints!  I mostly used the default settings, but changed the relaxationFactors and the relTol in fvSolution.  As far as possible I tried to use the same setup of the case in CFX.  The residuals in CFX and OF are different computed, but I don't know how exactly. Do you know why the residuals in OF first came down (as I want) and then go up...? Also it would be helpful to know, if the residuals in OF are a mean value or a max value?  I judged the convergence just by comparing the residuals and the speed by comparing the total run time. In CFX I got a good solution already after 100 Iterations. Regards, Brahim 

November 6, 2008, 15:59 
In CFX I got a good solution a

#7 
Senior Member
BastiL
Join Date: Mar 2009
Posts: 529
Rep Power: 19 
In CFX I got a good solution already after 100 Iterations.
How do you define "good solution"? I will try the case during weekend. Regards 

November 10, 2008, 09:52 
"good solution" means the rms

#8 
New Member
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 16 
"good solution" means the rms residuals are below 1e7 and the max residuals are below 1e5.
Regards, Brahim 

June 29, 2009, 12:33 

#9 
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 17 
Hi Guys
Greetings. The discussion was very useful but I am wondering how far Brahim persued this question any further. AFAIK CFX curves are always very tempting but how far they are correct is still a doubt to me. OpenFOAM is like a strict teacher, won't let you through until all is correct or better say until one has understood the sensitivities of a problem. By the way I am also struggling to get convergence with simpleFoam but still not successfull. If you guys have found the grail then please give me some tips. In my case I am using simpleFoam and all goes well until Re 1000 or so but for anything higher when I switch turbulence model on , all blows up. If anybody knows why that happens or witnessed something similar, please share. Thanks BR jaswi 

June 30, 2009, 02:38 

#10 
Senior Member
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 16 
Hi,
I have not been working with CFX for about 2 years, but as far as I remember, CFX is using coupled solver with some sort of Mutligrid. I'm pretty sure the solver employs also some correctors and limiters be default which you do not see in a basic setup. These things will be behind the convergence speed and smoothness. Non of these was used in brahim case with OpenFOAM. Regarding your turbulence problem, Jaswi, my experience with OpenFOAM tells me it is always boundary settings which are behind the disaster. Mainly the epsilon settings. Check the inlet values, check all BC three times. good luck matej 

August 14, 2009, 01:41 

#11 
Member
Cem Albukrek
Join Date: Mar 2009
Posts: 52
Rep Power: 16 
Here is my 2 cents on the issue:
I hope my observations and suggestions are in line with "iterative relaxation techniques" literature, which I am yet to read. Cem 

August 22, 2009, 10:08 
Convergence problem in car aerodynamics case

#12 
New Member
Krzysztof Przysowa
Join Date: Mar 2009
Location: Frimley, Surrey, United Kingdom
Posts: 13
Rep Power: 16 
Hi,
I have similar problem with convergence in simpleFoam aerodynamics case. I have made the assumption that my convergence tolerance should be 1e6 no matter the order of the solution scheme. I could go with less tight tolerance but then the forces/coefficients values are not so stable, which can latter on impact quality of optimization/field prediction. So, I went back to Ahmed model in order to neglect the geometry impact. The problem is that I am not able to get convergence tolerance lower than 1.5e6 for pressure, 12e6 for velocity and 5e6 for turbulence coefficients. Please see attached charts. So, I have done so far:  boundary condition check,  potentialFoam run at the beginning of sim,  turbulence on/off,  relaxation coefficient change (the best so far are dafault  p 0.3 U 0.7)  nNonOrthogonalCorrectors change,  grad(p), grad(U), grad(nuTilda), chnage  (leastSquares, Gauss linear)  div (phi, U) change  Gauss upwind, GammaV I have even tried alternative turbulence model (omega SST) with similar results. As far as model is concerned I tried to follow the paper here: https://online.tugraz.ac.at/tug_onl...cumentNr=81599 My model has relatively fine mesh ~4.4M cells. I use the hexa interior mesh configuration from ANSA. There is no problems with it in checkMesh report, its attached. There are five boundary layers. Please see attached checkMesh report. I have attached as well the my model/solver settings. I have performed few dozens of runs with few thousand of iterations each. Obviously there is still something wrong. I would appreciate it, if somepne could point me in right direction. Thank you very much in advance for any help. 

October 26, 2009, 05:33 
tolerances in fvSolution

#13 
New Member
Krzysztof Przysowa
Join Date: Mar 2009
Location: Frimley, Surrey, United Kingdom
Posts: 13
Rep Power: 16 
Hi,
Although I recently run SA not Omega SST turbulence model I have think I have overcome the convergence problem. In fvSolution file the are tolerances for each field. On the begining I though this tolerance is stopping the solution when converged, but I was wrong. Actually it is stopping iteration of solver of the defined field. So in my case the problem was as following:  tolerances of all field ware set to 1e6  after few thousands of iteration the level was reached for velocity but not for pressure,  velocity was no longer being iterated,  without the velocity better convergence the pressure residuals did not change The very easy solution was to change all the tolerances to 1e8 in fvSolution and stop solution by residuals level of 1e5 or 1e6. The converged solution stopping is described here: http://www.cfdonline.com/Forums/ope...converged.html 

October 26, 2009, 06:27 

#14 
Senior Member
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 15 
In my case, I also met the same problem. Only the upwind for divergence can get a convergence. I have no idea how to use a second order scheme, such as QUICK, SFCD, etc..
Best regards, Chiven 

June 14, 2010, 06:07 
looking for a good 2nd order scheme

#15 
Member
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 15 
Hi everybody !
Did you solve your problem and found out a good 2nd order scheme? I'm running an external flow simulation with simpleFoam, when all my schemes are upwind it works well (velocity and forces are of the same order as what I obtain with Fluent or Starccm+) but when I try a second order only for U (div(phi, U)=linear) it doesn't work and the continuity equation explode (residuals very important). I'd like a 2nd order for more accuracy, do you have some advice about which one I must use? thank you very much, Marine 

October 5, 2011, 11:05 

#16 
Member
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 15 
Hi,
I think I have run into the same problem, so I have revisited the pitzDaily simpleFoam sample case. I made some modifications to the tolerances, basically cranked up all of them in order to get a nice convergent run. I tested it with different kepsilon turbulence models and the runs behaved fine. Unfortunately I cannot reproduce the same expected steadystate run with my case. It doesn't really converge with upwind scheme and linearUpwind is even worse. The strange thing is that my initial k residual is quite low and remains so, so the solver just skips it, won't iterate it further  tried to introduce minIter but nothing, no iteration. The other freak thing is that my nut and k values do not evolve from the initial values as the simulation progresses (both upwind and linearUpwind). Just the realizableKE turbulent model produces stable runs. Run Allrun script to test the case, at the end of the run pyFoamrendered convergence history is created. Any suggestions would be appreciated! 

October 6, 2011, 08:13 

#17 
New Member
Chris
Join Date: Jun 2011
Posts: 12
Rep Power: 13 
Seems like you deleted the /constant/polyMesh/boundary file because running blockMesh causes an error.
edit: its because you use another version. just had to make some changes in the blockMeshDict... I will have a look at your case Last edited by caramelo; October 6, 2011 at 09:52. 

October 6, 2011, 11:02 

#18 
New Member
Chris
Join Date: Jun 2011
Posts: 12
Rep Power: 13 
I tink it is because of the wallfunctions you use.
If you try epsilon { wall { type zeroGradient; } } k { wall { type fixedValue; value uniform 1e10: // 0 will cause an error } } the simulation should converge with your settings. Unfortunatly I don't know how to modify your settings if you want to use wallfunctions. caromelo p.s. using GAMG for the pressure should speed up your calculation 

October 10, 2011, 10:51 

#19 
Member
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 15 
Thx for your help!
You are right, the case produces the best convergence without wall functions, but with these settings the flow seems to be so blurred, no separation occurs. I tweaked the k and epsilon files a bit so it resembles the pitzDaily solution. Actually, I set the initial and wall values equal to the inlet. This reduced the residuals but it's still far from ideal. The other interesting thing is that with the initial setup the flow doesn't want to settle to steady state, it's like a transient solution. On the other hand, the pitzDaily like setup it's more or less steady. I read numerous times that the value at the wall function is just a dummy, the solver overwrites it in the very next time step, and the initial condition is quite arbitrary, it can help if you guess it correctly but really doesn't matter unless you have complicated, unstable cases. Now I'm really dubious about the issue. I wanted to check the pisoFoam solution but without success. No matter how small time step I choose, the simulation always blows up within a few iterations. 

May 31, 2013, 10:55 

#20  
Senior Member
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 13 
Quote:
i wana you to say me if i understand your explenation above rigth or not? i unerstand that, first we should write potentialFoam instead of simoleFoam in controlDict, after some iteration we should turn the turbulence off in RAS properties, and then after some iteration we should set the turbulence on in RAS properties, is it rigth? thank you very uch 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problems with the RSM in simpleFoam  sberg  OpenFOAM Running, Solving & CFD  10  February 25, 2014 19:39 
SimpleFoam Convergence problem  skabilan  OpenFOAM Running, Solving & CFD  6  May 31, 2013 03:21 
SimpleFoam solution convergence pattern  philippose  OpenFOAM Running, Solving & CFD  0  June 26, 2008 14:18 
SimpleFoam problems with converging maybe skewness  hoochie  OpenFOAM Running, Solving & CFD  4  May 14, 2007 07:23 
SimpleFoam convergence problems  schnitzlein  OpenFOAM Running, Solving & CFD  6  June 24, 2005 09:51 