
[Sponsors] 
April 19, 2007, 06:56 
Hello,
I'm trying to simula

#1 
Guest
Posts: n/a

Hello,
I'm trying to simulate the flow over a cylinder. But I'm having a lot of trouble getting the calculations to run correctly (using OF1.3 on 20cpu's). The cylinder (diameter = 0.3m, length = 0.6m) is supported between two symmetry planes with the b.c. set to 'wall'. The b.c. for the inflow and outflow planes are set to 'inflow' and 'outflow'. The top and bottom planes are also set to 'symmetry'. The mesh is unstructured, with roughly 4 milion cells and y+ about 1. CheckMesh gives no warnings or errors. The velocity is 50 m/s, resulting in a Reynolds number of 1 milion. At this Reynolds number no von Karman vortex street develops, so I am running simpleFoam. I tried running with the laminar and ke turbulence model, resulting with both models in very high pressures and velocities, normal velocity components at the cylinder wall and increasing time step continuity errors. The solver stops in a dozen to a few hundred iterations. The solver settings I have copied from the pitzDaily tutorial, but I have tried various different settings as suggested in http://www.cfdonline.com/OpenFOAM_D...ges/1/996.html and http://www.cfdonline.com/OpenFOAM_D...es/1/1671.html by Henry Weller and Hrvoje Jasak. This has had no positive effect. What can I do to get this calculation to run? Any help would be appreciated. best regards, Roland 

April 19, 2007, 07:01 
Run potentialFoam first

#2 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12 
Run potentialFoam first


April 19, 2007, 07:09 
And then solve the laminar Nav

#3 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9 
And then solve the laminar Navier Stokes equations at a low Reynolds number, such that you'd expect a nice von Karman vortex street. Use icoFoam for that.
Frank
__________________
Frank Bos 

April 19, 2007, 08:10 
Thank you for your help, Eugen

#4 
Guest
Posts: n/a

Thank you for your help, Eugene and Frank. I will try this out now.
Frank, what is the benefit of first running it at such a low Reynolds number (of order 1e2 instead of 1e6)? best Regards, Roland 

April 19, 2007, 08:24 
I mean that you have to increa

#5 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9 
I mean that you have to increase the complexity of your model step by step and just be sure that your computational model 'works'. A good check is first run potentialFoam, then icoFoam and finally simpleFoam.
Frank
__________________
Frank Bos 

April 23, 2007, 04:41 
I've tried running both in pot

#6 
Guest
Posts: n/a

I've tried running both in potentialFoam and icoFoam. Below is the Umag plot from the potentialFoam calculation. As you can see no smooth solution is calculated.
The icoFoam shows a similar velocity distribution the first few timesteps (mean and max. Courant number < 1), but after a number of steps the solution explodes. Any ideas? best regards, Roland 

April 23, 2007, 04:44 
Yon need some nonorthogonal c

#7 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,762
Rep Power: 21 
Yon need some nonorthogonal correctors: add 5 or 6 and you will get a beautiful solution.
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

April 23, 2007, 05:06 
Hi,
Would it be possible to

#8 
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 277
Rep Power: 9 
Hi,
Would it be possible to see your grid? Vincent 

April 24, 2007, 02:55 
Increasing the nonorthogonal

#9 
Guest
Posts: n/a

Increasing the nonorthogonal correcters helped a lot. However close to the wall the solution still explodes (see first attached picture).
The simulation is performed with the following fvSolution settings. The time step is 0.01, resulting in a Courant number of 0.14. After about 10 steps the Courant number starts to increase and the solution diverges. solvers { p AMG 1e08 0 100; U BICCG 1e07 0; } PISO { momentumPredictor yes; nCorrectors 2; nNonOrthogonalCorrectors 5; pRefCell 0; pRefValue 0; } Below I have also included some images of the lefthand side of the grid. The width of the grid is 2 times the diameter of the cylinder. The very fine mesh close to the wall of the cylinder is needed for the turbulent calculation I want to use this mesh for later on. Thank you for your help. Best regards, Roland 

April 24, 2007, 03:55 
Dear Roland
The mesh you ha

#10 
New Member
Joakim Möller
Join Date: Mar 2009
Posts: 26
Rep Power: 8 
Dear Roland
The mesh you have looks nice, with the exception of that you have quite a large jump in the aspect ratio between your hex and tetmesh. You have a Re=1e6, so clearly your flow is turbulent and should be run like that. When you say that you are using keps model is it a lowReyolds model or does it use a walllaw. In the case of the later, your y+ should be mush larger. Did you try run the problem one a coarser mesh where you will have more articial dissipation and convergence should be more easely obtained. Regards /Joakim 

May 4, 2007, 02:55 
After succesfully running a si

#11 
Guest
Posts: n/a

After succesfully running a simulation of the flow over a cylinder (thanks to everyone on the forum who assisted me on this), I'm am now trying to perform a similar simulation on a more complex geometry (a car).
The setup of the two cases is similar (i.e. same element sizes, velocity, etc), but the car mesh has a larger domain and is more complex. Due to the increased complexity of the car geometry (eg. corners with a small radius), the quality of the mesh is less than that of the cylinder mesh (checkMesh detects 143 highly skew faces and 12305 severely nonorthogonal faces. The onorthogonality check is OK though. The total number of faces is 21783604.) Also the car domain is decomposed in 20 parts, whereas the cylinder was decomposed in only 10 parts. Both times using Metis. Unfortunately the steps I used to get a converging solution for the cylinder do not work on the car. Here is What I did for the cylinder: 1. start with a high viscosity (0.146) to keep the Reynolds number low 2. after 25 iterations multiply viscosity by 10, repeat this until the correct viscosity is reached 3. switch turbulence from laminar to kEpsilon, with low relaxation factors 4. after 25 iterations increase relaxation factors, repeat this For the car simulation I've tried the same scheme, but never with satisfactory results. See the attached simpleFoam.log file for a typical result. Below are the relevant parts of fvSolotion and fvSchemes I used for this. I've tried changing the number of orthogonal correctors, the tolerances, relaxation factors and viscosity, but always with similar results. Can you give me any suggestion on how to do this correctly? Thanks in advance. best regards, Roland simpleFoam.log // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p AMG 1e08 1e04 1000; U BICCG 1e07 0; k BICCG 1e06 0; epsilon BICCG 1e06 0; R BICCG 1e06 0; nuTilda BICCG 1e06 0; } SIMPLE { nNonOrthogonalCorrectors 6; pRefCell 0; pRefValue 0; } relaxationFactors { p 0.3; U 0.7; k 0.01; epsilon 0.01; R 0.7; nuTilda 0.5; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; div((nuEff*dev(grad(U).T()))) Gauss linear; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; laplacian(1A(U),p) Gauss linear limited 1; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; } // ************************************************** *********************** // 

May 4, 2007, 04:46 
Your run recipe sounds massive

#12 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,762
Rep Power: 21 
Your run recipe sounds massively too complex: You should basically use real material properties and flow rate, firstorder convection discretisation, limit some laplacian schemes, give it a decent (uniform) initial guess for the turbulence and just run it. It will work  the mesh is in fact not too bad.
Here are the changes to the setup I would do: Solvers: p AMG 1e08 0.01 200; SIMPLE nNonOrthogonalCorrectors 1; // 0 should work as well relaxationFactors p 0.3; U 0.5; k 0.5; epsilon 0.5; divSchemes div(phi,U) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; div((nuEff*dev(grad(U).T()))) Gauss linear; laplacianSchemes laplacian(nuEff,U) Gauss linear limited 0.7; laplacian(1A(U),p) Gauss linear limited 1; laplacian(DkEff,k) Gauss linear limited 0.7; laplacian(DepsilonEff,epsilon) Gauss linear limited 0.7; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear limited 0.7; Thius will run about 1020 times faster (!) than the setup you've got now. Once you get a firstorder solution, you can switch to secondorder discretisation. I'm interested to see if you can get it working properly; I take it you know how to estimate initial turbulence. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

May 4, 2007, 08:08 
Hrv, thank you for your help.

#13 
Guest
Posts: n/a

Hrv, thank you for your help.
With the settings you suggested the simulation is running much better (and faster). However it is still not going well, see attached log. simpleFoam.zip As you can see I switched turbulence off. I did this as k and epsilon exploded (bounded) after about 10 iterations, even after I decreased their relaxation factors. To estimate the initial turbulence I used equation 2.8 and 2.9 from the liddriven cavity flow tutorial. This gives me k=0.375 and epsilon=0.0419. Any suggestions? best regards, Roland 

May 7, 2007, 15:04 
Hrv: p AMG 1e08 0.01 200;

#14 
Senior Member
Srinath Madhavan (a.k.a pUl)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 699
Rep Power: 12 
Hrv: p AMG 1e08 0.01 200;
Has the AMG solver been further optimized for parallel usage in 1.4? If I recall correctly, you said some time back that setting the no. of equations at the top level to around 2030 was optimal for parallel. 

May 11, 2007, 05:48 
After experimenting with my se

#15 
Guest
Posts: n/a

After experimenting with my settings a bit I can now run a satisfactory simulation (with turbulence switched off).
Because the pressure had trouble converging I set: p AMG 1e08 0.001 200; and nNonOrthogonalCorrectors 2; However epsilon (and to a lesser extend k) keeps diverging whenever I try to run with turbulence on. I'm using the kEpsilon model with wall functions and my y+ should be roughly 40. I've tried all sorts of things to get it running. Low relaxation factor (this does delay the divergence), starting from a converged laminar solution, etc. My fvSchemes and fvSolution are specified as advised by Hrvoje above. What can I do to improve convergence on turbulence? Thanks in advance. with best regards, Roland 

May 14, 2007, 03:09 
I have found the (probable) ca

#16 
Guest
Posts: n/a

I have found the (probable) cause of my problem: my initial estimate of epsilon was wrong.
For external flows apparently a better estimate is: epsilon = (cmu * k^2) / (nu * mu_t/mu), with 1<mu_t/mu<10. Calculations are going much better now, but convergence is still not as good as I had hoped. best regards, Roland 

June 8, 2007, 08:07 
My case is UNSTEADY FLOW for i

#17 
Guest
Posts: n/a

My case is UNSTEADY FLOW for incompressible viscous 2D flow over cylinder. can any body suggest in which
application (like icofoam or coodles etc) I should make my case. and wt should be the scheme and solver and whole detail for Re 3000. Regards Ranjan Kumar 

June 8, 2007, 13:59 
Search the Running/Solving CFD

#18 
Senior Member
Srinath Madhavan (a.k.a pUl)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 699
Rep Power: 12 
Search the Running/Solving CFD forum for a detailed thread by Frank Bos who performed many validations for circular cylinder. All your questions are answered there. Use circular cylinder as a keyword. Please try and make use of the search function. It is much more efficient.


September 26, 2007, 15:03 
Hrv's setup above is convergin

#19 
Member
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8 
Hrv's setup above is converging for me on a 350,000 cell 3D spheroid. I want to now switch to second order discretisation, and I've been waiting for hours for the residuals get to zero AND stay there! Will it ever completely close? And, must I wait for closure before changing schemes? Every time I've made even minor adjustments to the scheme "on the fly" it seems to wreck the analysis. My single AMD 64 3800+ with 1GB of 800MHz DDR2 is crunching away.


September 27, 2007, 07:03 
Success. After all residuals

#20 
Member
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8 
Success. After all residuals but pressure stayed at zero, I changed from upwind to linear, leaving the relaxation factors low. Now closing in on a 750,00 cell model. Thanks to all for the great code and the information in this forum.


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Ask about the setup for Unsteady flow  Teddy Kim  FLUENT  0  August 16, 2008 03:08 
Recommended setup for the Singly rotated frame  jaswi  OpenFOAM Running, Solving & CFD  1  June 13, 2007 05:12 
Recommended setup for cyclic turbomachinery computations  hani  OpenFOAM Running, Solving & CFD  5  January 25, 2006 04:11 
Setup of swirling flow in diffusor  eugene  OpenFOAM Running, Solving & CFD  19  September 8, 2005 08:44 
Recommended convection schemes for swirling flow in diffuser  hani  OpenFOAM Running, Solving & CFD  12  August 23, 2005 11:05 