simpleFoam convergence on large domain
Hi,
I am having difficulties getting convergence with simpleFoam on a large domain - 350 x 300 x 100 meters. Case is air flow around buildings. There are two inlets, one on the side of the box, 300x100m, and one in the centre (a stack) with diameter of 0.6m both with abut 10m/s. After about 40 time steps I start getting "bounding for epsilon" and soon "time step continuity error" runs off to large values, and calculations fail. Mesh is tet from Salome. Looks ok(?), but since domain is big I have difficulties getting cell sizes too small. Average cell length is 2.5m for the domain and 0.3m for a sub mesh around the stack tip. What I have tried without success: * refining mesh (limited by 3GB ram, though) * Lowering relax factors to 0.3 * Increasing epsilon initial value (tried a few settings) * lowered p relTol to 0.01 Any suggestions as to what to try next? Cheers, knut --- my system: OF1.5 on caelinux 2009 --- checkMesh reports: Create time Create polyMesh for time = constant Time = constant Mesh stats points: 251432 faces: 2567968 internal faces: 2406476 cells: 1243611 boundary patches: 6 point zones: 0 face zones: 0 cell zones: 0 Number of cells of each type: hexahedra: 0 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 1243611 polyhedra: 0 Checking topology... Boundary definition OK. Point usage OK. Upper triangular ordering OK. Topological cell zip-up check OK. Face vertices OK. Face-face connectivity OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface inn 22354 11338 ok (not multiply connected) ut 22354 11338 ok (not multiply connected) veggs 20356 10359 ok (not multiply connected) veggn 20356 10359 ok (not multiply connected) pipe 65 40 ok (not multiply connected) vegg 76007 38531 ok (not multiply connected) Checking geometry... Domain bounding box: (-106.777 -110.777 0) (290 245.442 100) Boundary openness (1.04978e-15 9.99092e-15 6.43789e-14) OK. Max cell openness = 3.74724e-16 OK. Max aspect ratio = 62.5 OK. Minumum face area = 0.0102578. Maximum face area = 28.7368. Face area magnitudes OK. Min volume = 0.000662881. Max volume = 46.6845. Total volume = 1.03156e+07. Cell volumes OK. Mesh non-orthogonality Max: 88.0021 average: 16.1696 *Number of severely non-orthogonal faces: 14. Non-orthogonality check OK. <<Writing 14 non-orthogonal faces to set nonOrthoFaces Face pyramids OK. Max skewness = 0.86499 OK. All angles in faces OK. All face flatness OK. Mesh OK. |
I would suggest to run a couple of hundreds of steps without turbulence (set "turbulence" to "off" in constant/RASProperties). Then turn it "on" while the simulation is running.
If it does not initial converge without turbulence generate an initial field from "potentialFoam -writep" -Ask |
Hi,
My domain is complex, I generate the mesh with gambit. After performing checkMesh, the results display as follows: Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 137559 faces: 398938 internal faces: 385622 cells: 130760 boundary patches: 3 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 130760 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface topology wall 12708 12762 ok (non-closed singly connected) inlet 96 119 ok (non-closed singly connected) outlet 512 545 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-0.1 -0.15 -0.94) (0.0749999 0.0874996 0.4) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (-4.04084e-19 -2.40544e-19 -1.16605e-19) OK. Max cell openness = 3.73953e-16 OK. Max aspect ratio = 134.96 OK. Minumum face area = 1.6845e-08. Maximum face area = 0.000211397. Face area magnitudes OK. Min volume = 2.10562e-10. Max volume = 6.46656e-07. Total volume = 0.0135334. Cell volumes OK. Mesh non-orthogonality Max: 81.9702 average: 7.09614 *Number of severely non-orthogonal faces: 36. Non-orthogonality check OK. <<Writing 36 non-orthogonal faces to set nonOrthoFaces Face pyramids OK. ***Max skewness = 7.55797, 12 highly skew faces detected which may impair the quality of the results <<Writing 12 skew faces to set skewFaces Failed 1 mesh checks. End What does "Failed 1 mesh checks." mean? When I use sipmleFoam and k-e model with upwind schemes(Divergence schemes), it works well. But after changing upwind to high-level schemes, it can't get convergence! what should I do to improve it? Thanks! |
checkMesh is failing because you have highly skewed cells (and also some strongly non-orthogonal cell)
The second problem can probably be corrected indirectly with non-orthogonal correctors in the solver. For the first one, you've to re-consider the mesh. Best, |
Hi, alberto
Thank you for your advice. I will rebuild my mesh and do my best to avoid skewed cells as well as non-orthogonal cells. If it works, I give a feekback.:p beauty |
Hi,
The checkmesh result of my new mesh is as follows. The simplefoam with high-level schemes Still does not work. :mad: Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface topology wall 6102 6143 ok (non-closed singly connected) outlet 336 361 ok (non-closed singly connected) inlet 72 90 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-0.1 -0.207 -0.86) (0.1 0.1 0.375) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (-3.14905e-19 1.76981e-20 -7.25013e-19) OK. Max cell openness = 3.11283e-16 OK. Max aspect ratio = 35.1393 OK. Minumum face area = 4.64258e-07. Maximum face area = 0.000339005. Face area magnitudes OK. Min volume = 6.96387e-09. Max volume = 1.40468e-06. Total volume = 0.0216753. Cell volumes OK. Mesh non-orthogonality Max: 81.1011 average: 7.28001 *Number of severely non-orthogonal faces: 18. Non-orthogonality check OK. <<Writing 18 non-orthogonal faces to set nonOrthoFaces Face pyramids OK. Max skewness = 1.77958 OK. Mesh OK. End |
Try to see if there is some point in particular in the mesh where the solution is not correct.
Can you post your fvSchemes and fvSolution too? |
2 Attachment(s)
Hi,
This is my fvsolution and fvscheme.My turbulent model is RNGkepsilon model. Once I change the scheme of div(phi,k) and div(phi,epsilon) to other high order scheme, it display "floating-point error". In addition, similar problems have emerged with the LRR model even if all the schemes are set to upwind like this: div(phi,U) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwid; Thanks beauty |
You can still use second order schemes, but using limiters, usually without any need to go back to first order schemes.
In your scheme settings, you might have a problem with div(phi,U) Gauss linear corrected; Try running your case with div(phi, U) Gauss linearUpwindV cellLimited Gauss linear 1; which preserves the second order accuracy almost everywhere, preventing instabilties. In addition, you could post the actual error message, so we can see where the problem actually comes from. Best, |
Hi, Alberto
Thanks for your timely reply, I will try as you suggest, I will upload result as soon as possible. beauty |
RSM can not get convergence!
1 Attachment(s)
Hi, Alberto
After changing the schemes as your advice, the simpleFoam with RNGkepsilon goes well and the result also improved.;) But the simpleFoam with RSM still can not get convergence. The time step continuity errors goes up after 20 time-steps. I upload the fvscheme, fvsolution and the log of the computational process. What is your opinion? beauty |
Hi beauty,
i have the same problem. my lower turbulence-models convergence very well. but my rsm does only convergence with the linearUpwindV cellLimited Gauss linear 1, but i get poor results with this schemes. i try to simulate a rotating swirl and read that the poor results reveal of the upwind-scheme. i try to start the rsm-modell with a convergence kEpsilon flow as the startsetting and change some settings in the fvSolution-file like GAMG instead of PCG and decrease the relaxationFactors for k,epsilon,R to 0.1. To you got any solutions? |
First of all run checkMesh on your grid. If results are very poor with a second order discretization in RANS cases, you either have some mistake in the setup or a poor mesh.
Additionally, I think I missed beauty's post, however this div(phi,R) Gauss linear corrected; should be made consistent with the other convective terms. Finally, the under-relaxation factor for R could be lowered to 0.2, to help the solution in the initial stages. Best, |
Quote:
Quote:
However it is difficult to answer without seeing the case setup. Best, |
1 Attachment(s)
Hi Alberto,
i believe that my results are diffuse. But I'm confused my results with the kEpsilon-modell are quiet better than the results of the RSTM modells (LRR and LaunderGibsonRSTM) when i use the linearUpwindV-scheme. I run also checkMesh: Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 278866 faces: 819571 internal faces: 799079 cells: 269775 boundary patches: 5 point zones: 0 face zones: 1 cell zones: 1 Overall number of cells of each type: hexahedra: 269775 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface topology WALL 15091 15161 ok (non-closed singly connected) IN 165 192 ok (non-closed singly connected) OUT 1276 1321 ok (non-closed singly connected) Tauchrohr 1320 1408 ok (non-closed singly connected) TauchrohrINNEN 2640 1408 multiply connected (shared edge) <<Writing 1408 conflicting points to set nonManifoldPoints Checking geometry... Overall domain bounding box (-0.2 -0.145 -1.305) (0.145 0.145 0.87) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (2.13432e-17 2.41336e-17 1.43938e-16) OK. Max cell openness = 2.34986e-16 OK. Max aspect ratio = 140.666 OK. Minumum face area = 8.17877e-07. Maximum face area = 0.000644372. Face area magnitudes OK. Min volume = 1.587e-08. Max volume = 3.82408e-06. Total volume = 0.0992571. Cell volumes OK. Mesh non-orthogonality Max: 86.5265 average: 6.78598 *Number of severely non-orthogonal faces: 585. Non-orthogonality check OK. <<Writing 585 non-orthogonal faces to set nonOrthoFaces Face pyramids OK. Max skewness = 1.35194 OK. Mesh OK. End boundaries: I use for nut, k, epsilon,R wallfunctions. For the pressure-outlet i set outletInlet, outletValue uniform 0, value unifrom 5. I also uploaded my system-file. regards. |
Hi Foamers,
i refresh my mesh up to 3,6 mio cells and i still have convergence problems. There are also very high Pe-numbers in the range of 5000. I set for the velocity-boundary 10 m/s and for the vicosity 1,6675e-05. I think its very hard to lower the Peclet-number with this setting. In my opinion 3,6 mio cells and more are to much to handle the problem with my pc. I figured out, that the i ought use max. 400.000 cells. I read a few of papers and the authors had no problems with fluent and the linear-schemes for RSM and a mesh with 250.000 cells. |
The problem is hardly the number of cells in your case but the case setup, and there we can be of no help without a case that reproduces the problem.
|
You're right Alberto.
I uploaded my setup. http://rapidshare.com/files/42091842...AM_cyclone.rar I hope anybody can get me some useful hints. kind regards! |
1 Attachment(s)
You are actually using the linear scheme for div(phi, U), which might explain the poor convergence/results on a coarse mesh.
Try using the attached files, starting from the original initial condition (do not patch what you get from k-eps). |
Hi,
I am glad to see the discussion on the problem of RSM here! Hi, spej, are you simulating the swirl flow in a cyclone? When simulating the flow in a cyclone, I can not get convergence by using RSM model. Maybe I have the setup problem. Next I will try alberto’s advice, and hope for better results! beauty |
Hi Foamers,
I try to simulate the flow in a cyclone. Yet I have good results for the kepsilon, RNG kepsilon and very good results for the dynSmagorinsky. But I figured out that the RSM-solution has a better accuracy than the RNG. The RSM is faster than LES, too. @Aberto: as I wrote I got a convergent solution with the div(phi,U)linearUpwindV-scheme, but the solution shows diffuse behaivour. I read in Peric Computional Methods Fluid Dynamics that I should use a second order CDS for a swirl flow! With your new setup of the fvScheme- and the fvSolution-file i got better results for the tangential velocity(with linear-UpwindV), but no convergence solution. When I change your setup from cellLimited to faceMDLimited i get a convergence solution, but diffusive results. |
Quote:
Quote:
You have to rely on limited schemes. Quote:
Did you consider the possibility of running a transient (or pseudo-transient) case to check this? Best, |
I know that my peclet-number is to high for an stable solution. but why have other authors with fluent or cfx convergent solutions with a second order CDS on a coarse mesh?! I read papers where they use a mesh with 70000 hexa controlvolumes.
I will check your hint with limited schemes. |
Quote:
i have simulated a cyclone with LRR and i had convergence problem but by using above comment and changing div schemes convergence problem is solved but results are not near to experiment. it is too dissipative (but better than k-e results) result should have a sharp forced vortex at center and free vortex in other domains in tangential velocity. Any suggestion will be appreciated. Regards |
You are probably not using a good enough mesh in the core of the cyclone. Quick hints:
- use a hex-dominant mesh, if you are not doing it already - refine the core area (you can define a cylinder containing the vortex and progressively adapt that region) - if you really have to use a tet mesh, use leastSquares for gradients so to ensure second-order accuracy. This means you have to use it both in the grad schemes Code:
gradSchemes Code:
div(phi, U) Gauss linearUpwindV cellLimited leastSquares 1; Best, |
2 Attachment(s)
Quote:
I don't think the problem relates to mesh. it is about 0.5 million grids, hex dominant and less size near wall and center. you can see two pictures from meshed geometry by Gambit. although this is my coarse mesh i have same problem with fine meshes too. i think it should be related to orders on fvscheme. . |
i have simulated 2D wedge geometry of this cyclone and its results are good.
i don't know why i can't reach true answers on 3D. you can see my wedge (2D) results here as you see k-e is too dissipative. it has about 70,000 grids. Regards |
If you use the same schemes in both 2D and 3D, I would say it does not depend on them :-)
Is the mesh resolution in 2D and 3D comparable, and the distribution of points along the radius of the cyclone too? Alberto |
Wedge setting was upwind.
By using this scheme, 3D has been blown up. Changing it to limitedlinear as you suggested it has problem in accuracy instead of convergence. Is it any higher order and stable scheme? About mesh: Although i checked finer meshes before, i will try to run finer mesh with new setting and say result here. Regards. |
Quote:
Quote:
linearUpwindV cellLimitedGauss linear 1; for the velocity, which is a second-order upwind scheme. Best, Alberto |
Hi again,
I simulated hydrocyclone with finer grids (1,000,000 grids). although results are better but they are far from experiment. As you know limitedLinear is TVD scheme and it is too diffusive (P.100 of Jasak thesis). i see this numerical diffusion in my results apparently. What do you think about what i should do? (i have used Smagorinsky. maybe it is not relate to this thread, but i had same problem with simpleFoam-LRR) |
Quote:
If you use Smagorinsky, you do LES and you should do unsteady simulations. Are you resolving the scales properly? For LES limitedLinear is too diffusive, while for a RANS case it should be fine. Best, |
Thanks,
I mean in an experimental paper a sharp tangential velocity at center and free vortex beyond is observed. i cant reach to that profile with same geometry (400,000 and 1 million grids). it will be a validation for me. In my results velocity is not as sharp as that paper. Maximum tangential velocity magnitude is less than half of that paper. About LES: i did it with pisoFoam, smagorinsky and linear scheme. its result are a bit better but it need much time to run. (Do you think smagorinsky can lead to answer for hydrocyclone? As you know hydrocyclone flow is anisotropic. About LRR: i simulated with limitedlinearUpwind but it is too diffusive. Is it possible to use QUICK (i heard QUICK has led to answer with FLUENT)?(I have minus epsilon divergence problem with that). Another question: What is name of Hybrid scheme in OpenFOAM? (spej suggested it for LES) Regards, Maysam |
Quote:
Quote:
In my group they had results in very good agreement with experiments in vortex reactors both for flow and scalar transport. Quote:
However it seems a bit strange that such a large error is due to numerical diffusion, especially if the velocity magnitude is not very tiny. Are you using exactly their boundary conditions, for example? Quote:
P.S. Could you show a contour plot of the velocity, so that we can actually have an idea? Best, |
1 Attachment(s)
Thanks again,
Quote:
Quote:
As i understand from your post you don't suggest smagorinsky. Do you think dynSmagorinsky will lead to answer? what is the difference between dynSmagorinsky and your dynamicSmagorinsky model. Quote:
i set inlets uniform velocity. Overflow and underflow is set zero pressure. walls B.Cs are wall function. property which needed on constant is nu and it is E-6 for water. I have checked settings and i don't think they have any problem ! Quote:
Its sharp maximum tangential velocity should be near 8 m/s at center. i changed U divergence to QUICK but the maximum decreased more! Best regards, Maysam |
Quote:
Quote:
The dynamic Smagorinsky model offers a better option compared to the simple Smagorinsky, since it can predict backscattering and the SGS stresses become zero automatically near walls (no need of damping functions). Quote:
Quote:
A short checklist (some elements are obvious, but sometime it happens to make mistakes there ;)) 1) Is the viscosity of the fluid set properly for example? Keep in mind that OpenFOAM incompressible solvers want the kinematic viscosity (nu = mu/rho) 2) How did you set the boundary conditions for turbulent quantities? 3) At what level of accuracy is the solution converging? Require residuals below 1.0e-6 (or as low as they go). Best, |
For LRR:
Inlets: k=1.5(UI)^2=0.065; //(I=0.05 and U=4.167) epsilon= 0.09^0.75*k^1.5/(0.07*d_h)=0.58 R=(k 0 0 k/2 0 k/2)=(0.065 0 0 0.0325 0 0.0325) Outlets are zero gradient. nut is calculated type for inlets and outlets. walls are wall function. For LES: nusgs is zerogradient for all walls and patches. Also, U is turbulent inlet with (0.05 0.02 0.02) intensity for both LES and LRR About properties: i set nu=10^-6 (nu=mu/rho=0.001/1000) About fvSolution: For LRR: it is same as your uploaded file: 10^-8 for P and 10^-6 for others. For LES: 10^-6 for P and 10^-5 for others Thanks, Maysam |
Nothing seems evidently wrong. Is the solution converging to a low value of the initial residuals in the iterations?
To see if it depends on the numerical diffusion, since you run steady cases, double the grid density, and see what happens. Alberto |
Thanks,
I tried to run with your dynamic smagorinsky but it blow up. i think it has problem with pressure. i tried with more pressure correctors but it had problem in my case. now i am running with smagorinsky. what do you think about these residuals and why don't P final residuals reach to 10^-6? Time = 0.217386 Courant Number mean: 0.0310726 max: 1.28646 DILUPBiCG: Solving for Ux, Initial residual = 0.000975272, Final residual = 6.4176e-06, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.00103533, Final residual = 5.04125e-06, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.0009475, Final residual = 2.39935e-06, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.023251, Final residual = 0.00111641, No Iterations 60 time step continuity errors : sum local = 2.25161e-07, global = 2.89517e-08, cumulative = 6.61012e-08 DICPCG: Solving for p, Initial residual = 0.00676882, Final residual = 0.00102127, No Iterations 1001 time step continuity errors : sum local = 2.0599e-07, global = 9.6517e-09, cumulative = 7.57529e-08 ExecutionTime = 6964.57 s ClockTime = 7012 s |
3 Attachment(s)
Quote:
I have problem with LRR for hydrocyclone simulation yet. i used your suggested settings, it doesn't diverge but nor converge. As you see in attached picture LRR result is not converge and it has wild fluctuations across its mean. i have set dynamic smagorinsky results (its figure is attached) as initial for LRR but after ten days and 14000 iterates its result is not acceptable and it decays initial too. its mesh is fine (1000000) and i don't think grids be the problem because LES answered proper results with same mesh. i have attached settings too. Any idea would be appreciated. Regards, Maysam |
All times are GMT -4. The time now is 09:38. |