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

Recommended setup for flow over cylinder

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By eugene
  • 1 Post By lr103476

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2007, 07:56
Default Hello, I'm trying to simula
  #1
rswbroers
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 k-e 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.cfd-online.com/OpenFOAM_D...ges/1/996.html and http://www.cfd-online.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
  Reply With Quote

Old   April 19, 2007, 08:01
Default Run potentialFoam first
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Run potentialFoam first
eugene is offline   Reply With Quote

Old   April 19, 2007, 08:09
Default And then solve the laminar Nav
  #3
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
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
lr103476 is offline   Reply With Quote

Old   April 19, 2007, 09:10
Default Thank you for your help, Eugen
  #4
rswbroers
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
  Reply With Quote

Old   April 19, 2007, 09:24
Default I mean that you have to increa
  #5
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
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
hua1015 likes this.
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   April 23, 2007, 05:41
Default I've tried running both in pot
  #6
rswbroers
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
  Reply With Quote

Old   April 23, 2007, 05:44
Default Yon need some non-orthogonal c
  #7
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Yon need some non-orthogonal 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
hjasak is offline   Reply With Quote

Old   April 23, 2007, 06:06
Default Hi, Would it be possible to
  #8
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Hi,

Would it be possible to see your grid?

Vincent
vinz is offline   Reply With Quote

Old   April 24, 2007, 03:55
Default Increasing the non-orthogonal
  #9
rswbroers
Guest
 
Posts: n/a
Increasing the non-orthogonal 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 1e-08 0 100;
U BICCG 1e-07 0;
}

PISO
{
momentumPredictor yes;
nCorrectors 2;
nNonOrthogonalCorrectors 5;
pRefCell 0;
pRefValue 0;
}

Below I have also included some images of the left-hand 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






  Reply With Quote

Old   April 24, 2007, 04:55
Default Dear Roland The mesh you ha
  #10
New Member
 
Joakim Möller
Join Date: Mar 2009
Posts: 26
Rep Power: 17
joakim is on a distinguished road
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 tet-mesh.

You have a Re=1e6, so clearly your flow is turbulent and should be run like that. When you say that you are using k-eps model is it a low-Reyolds model or does it use a wall-law. 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
joakim is offline   Reply With Quote

Old   May 4, 2007, 03:55
Default After succesfully running a si
  #11
rswbroers
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 non-orthogonal faces. The on-orthogonality 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 1e-08 1e-04 1000;
U BICCG 1e-07 0;
k BICCG 1e-06 0;
epsilon BICCG 1e-06 0;
R BICCG 1e-06 0;
nuTilda BICCG 1e-06 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(1|A(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;
}


// ************************************************** *********************** //
  Reply With Quote

Old   May 4, 2007, 05:46
Default Your run recipe sounds massive
  #12
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Your run recipe sounds massively too complex: You should basically use real material properties and flow rate, first-order 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 1e-08 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(1|A(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 10-20 times faster (!) than the setup you've got now.
Once you get a first-order solution, you can switch to second-order 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
hjasak is offline   Reply With Quote

Old   May 4, 2007, 09:08
Default Hrv, thank you for your help.
  #13
rswbroers
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 lid-driven cavity flow tutorial. This gives me k=0.375 and epsilon=0.0419.

Any suggestions?

best regards,
Roland
  Reply With Quote

Old   May 7, 2007, 16:04
Default Hrv: p AMG 1e-08 0.01 200;
  #14
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Hrv: p AMG 1e-08 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 20-30 was optimal for parallel.
msrinath80 is offline   Reply With Quote

Old   May 11, 2007, 06:48
Default After experimenting with my se
  #15
rswbroers
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 1e-08 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
  Reply With Quote

Old   May 14, 2007, 04:09
Default I have found the (probable) ca
  #16
rswbroers
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
  Reply With Quote

Old   June 8, 2007, 09:07
Default My case is UNSTEADY FLOW for i
  #17
ranjan_1947yahoocom
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
  Reply With Quote

Old   June 8, 2007, 14:59
Default Search the Running/Solving CFD
  #18
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
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.
msrinath80 is offline   Reply With Quote

Old   September 26, 2007, 16:03
Default Hrv's setup above is convergin
  #19
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 17
gdbaldw is on a distinguished road
Hrv's setup above is converging for me on a 350,000 cell 3-D 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 DDR-2 is crunching away.
gdbaldw is offline   Reply With Quote

Old   September 27, 2007, 08:03
Default Success. After all residuals
  #20
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 17
gdbaldw is on a distinguished road
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.
gdbaldw is offline   Reply With Quote

Reply


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
Ask about the setup for Unsteady flow Teddy Kim FLUENT 0 August 16, 2008 04:08
Recommended setup for the Singly rotated frame jaswi OpenFOAM Running, Solving & CFD 1 June 13, 2007 06: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 09:44
Recommended convection schemes for swirling flow in diffuser hani OpenFOAM Running, Solving & CFD 12 August 23, 2005 12:05


All times are GMT -4. The time now is 00:22.