Hi All I'm trying to find o
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):
What can I do to get a better convergence with simpleFoam? Any hints are welcome!
Thanks a lot for any help,
What are you settings for solv
What are you settings for solvers/discretisation schemes and tolerances?
Here are the fvSolution and fv
Here are the fvSolution and fvSchemes files:
AFAIK these are the defualt se
AFAIK these are the defualt settings from the tutorial, right? Did you compare hem with the CFX settings?
Another hint: - Residal defin
- 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?
Hello BastiL First thanks a
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.
In CFX I got a good solution a
In CFX I got a good solution already after 100 Iterations.
How do you define "good solution"? I will try the case during weekend.
"good solution" means the rms
"good solution" means the rms residuals are below 1e-7 and the max residuals are below 1e-5.
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.
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.
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.
Convergence problem in car aerodynamics case
I have similar problem with convergence in simpleFoam aerodynamics case.
I have made the assumption that my convergence tolerance should be
1e-6 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
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.5e-6 for pressure, 1-2e-6 for velocity and 5e-6 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:
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.
tolerances in fvSolution
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 1e-6
- 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 1e-8 in fvSolution and stop solution by residuals level of 1e-5 or 1e-6.
The converged solution stopping is described here:
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..
looking for a good 2nd order scheme
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,
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 k-epsilon turbulence models and the runs behaved fine.
Unfortunately I cannot reproduce the same expected steady-state 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 pyFoam-rendered convergence history is created.
Any suggestions would be appreciated!
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
I tink it is because of the wallfunctions you use.
If you try
value uniform 1e-10: // 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.
p.s. using GAMG for the pressure should speed up your calculation
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.
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:)
|All times are GMT -4. The time now is 00:55.|