
[Sponsors] 
April 28, 2015, 08:27 
pimpleFoam Simulation aroud a cylinder does not converges

#1 
New Member
Join Date: Mar 2015
Location: Brest, France
Posts: 15
Rep Power: 2 
Hi all,
I'm trying to learn how to use pimpleFoam. In order to do this I'm trying to simulate the flow around a cylinder, I'm doing this at high Reynolds (7.10^6) because I will have to make simulations at this Reynolds. I read this about pimpleFoam : http://www.cfdonline.com/Forums/blo...hmparti.html http://www.cfdonline.com/Forums/blo...mpartii.html At all of the timesteps, the simulation did not converged after 50 pimple iterations (nOuterCorrectors = 50). It seems to be an easy simulation (flow around a cylinder). Can you tell me what is wrong in my simulation .. Thanks for answers !! An extract of the log.pimpleFoam file (first part of the file and a part of the last timestep): Code:
/**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.3.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ Build : 2.3.0 Exec : pimpleFoam parallel Date : Apr 27 2015 Time : 15:48:10 Host : "nemo1" PID : 12414 Case : /data/cylindre_insta4 nProcs : 32 Slaves : 31 ( "nemo1.12415" "nemo1.12416" "nemo1.12417" "nemo1.12418" "nemo1.12419" "nemo1.12420" "nemo1.12421" "nemo1.12422" "nemo1.12423" "nemo1.12424" "nemo1.12425" "nemo1.12426" "nemo1.12427" "nemo1.12428" "nemo1.12429" "nemo1.12430" "nemo1.12431" "nemo1.12432" "nemo1.12433" "nemo1.12434" "nemo1.12435" "nemo1.12436" "nemo1.12437" "nemo1.12438" "nemo1.12439" "nemo1.12440" "nemo1.12441" "nemo1.12442" "nemo1.12443" "nemo1.12444" "nemo1.12445" ) Pstream initialized with: floatTransfer : 0 nProcsSimpleSum : 0 commsType : nonBlocking polling iterations : 0 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster allowSystemOperations : Disallowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type RASModel Selecting RAS turbulence model kOmegaSST kOmegaSSTCoeffs { alphaK1 0.85034; alphaK2 1; alphaOmega1 0.5; alphaOmega2 0.85616; gamma1 0.5532; gamma2 0.4403; beta1 0.075; beta2 0.0828; betaStar 0.09; a1 0.31; b1 1; c1 10; F3 false; } No finite volume options present PIMPLE: max iterations = 50 field U : relTol 0, tolerance 1e05 field p : relTol 0, tolerance 0.0005 Starting time loop . . . . . . Courant Number mean: 1.27401 max: 9.54351 Time = 5 PIMPLE: iteration 1 smoothSolver: Solving for Ux, Initial residual = 0.0059193, Final residual = 4.07869e05, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.00996702, Final residual = 8.40309e05, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 0.00529798, Final residual = 5.20881e05, No Iterations 1 GAMG: Solving for p, Initial residual = 0.536424, Final residual = 0.00275772, No Iterations 2 time step continuity errors : sum local = 2.97493e05, global = 5.66073e06, cumulative = 0.00585719 PIMPLE: iteration 2 . . . . . . . . . PIMPLE: iteration 47 smoothSolver: Solving for Ux, Initial residual = 0.000179332, Final residual = 1.82244e06, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.000553898, Final residual = 4.81264e06, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 0.000286557, Final residual = 2.57935e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.0244919, Final residual = 0.000130336, No Iterations 3 time step continuity errors : sum local = 1.74618e06, global = 4.28654e07, cumulative = 0.0058756 PIMPLE: iteration 48 smoothSolver: Solving for Ux, Initial residual = 0.000177181, Final residual = 1.74186e06, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.000562329, Final residual = 4.91611e06, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 0.000281855, Final residual = 2.38418e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.024675, Final residual = 0.000131996, No Iterations 3 time step continuity errors : sum local = 1.7573e06, global = 4.33255e07, cumulative = 0.00587516 PIMPLE: iteration 49 smoothSolver: Solving for Ux, Initial residual = 0.000178031, Final residual = 1.77695e06, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.000554551, Final residual = 4.84694e06, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 0.000284683, Final residual = 2.50979e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.0244865, Final residual = 0.000131006, No Iterations 3 time step continuity errors : sum local = 1.75527e06, global = 4.31808e07, cumulative = 0.0058756 PIMPLE: iteration 50 smoothSolver: Solving for Ux, Initial residual = 0.00131143, Final residual = 7.81589e06, No Iterations 5 smoothSolver: Solving for Uy, Initial residual = 0.00361828, Final residual = 8.30476e06, No Iterations 7 smoothSolver: Solving for Uz, Initial residual = 0.0022754, Final residual = 6.55988e06, No Iterations 7 GAMG: Solving for p, Initial residual = 0.507878, Final residual = 8.37436e08, No Iterations 14 time step continuity errors : sum local = 2.59953e09, global = 2.61579e10, cumulative = 0.0058756 smoothSolver: Solving for omega, Initial residual = 0.00988738, Final residual = 5.73628e06, No Iterations 6 smoothSolver: Solving for k, Initial residual = 0.00649944, Final residual = 6.7763e06, No Iterations 8 PIMPLE: not converged within 50 iterations ExecutionTime = 20304.7 s ClockTime = 20311 s End Finalising parallel run Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.3.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; tolerance 1e7; relTol 0.01; smoother DICGaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } pFinal { $p; relTol 0; } "(Ukomega)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e05; relTol 0.1; } "(Ukomega)Final" { $U; relTol 0; } } PIMPLE { nNonOrthogonalCorrectors 0; nCorrectors 1; nOuterCorrectors 50; residualControl { U { tolerance 1e5; relTol 0; } p { tolerance 5e4; relTol 0; } } } relaxationFactors { fields { p 0.3; pFinal 1; } equations { "Ukomega" 0.3; "(Ukomega)Final" 1; } } potentialFlow { nNonOrthogonalCorrectors 10; pRefCell 0; pRefValue 0; residualControl { p 1e5; U 1e5; k 1e5; omega 1e5; } } // ************************************************************************* // Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.3.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,k) bounded Gauss upwind; // div(phi,epsilon) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; // div(R) Gauss linear; // div(phi,nuTilda) bounded Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; // laplacian(nuEff,U) Gauss linear corrected; // laplacian(rAUf,p) Gauss linear corrected; // 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 ; } // ************************************************************************* // 

April 29, 2015, 04:19 

#2 
Senior Member

Hi,
You can probably use higher relaxation factors in your inner iterations: Code:
relaxationFactors { fields { p 0.8; pFinal 1; } equations { "Ukomega" 0.8; "(Ukomega)Final" 1; } } There may however be something wrong with your boundary conditions or mesh as well. 

April 30, 2015, 05:05 

#3 
New Member
Join Date: Mar 2015
Location: Brest, France
Posts: 15
Rep Power: 2 
Thanks for the answer !!
As you thought with higher relaxation factors it does not converge. Does anyone have an idea about something that could be bad with my mesh or other ?? 

April 30, 2015, 05:14 

#4 
Senior Member
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,133
Rep Power: 20 
Hi,
As usual, please post: 1. checkMesh output 2. Your initial and boundary conditions (or just an archive of 0 folder) 3. And finally geometry of your problem (or a screenshot of the mesh), as several times on this forum people thought they are simulating flow around cylinder and yet they were not. 

April 30, 2015, 05:35 

#5 
New Member
Join Date: Mar 2015
Location: Brest, France
Posts: 15
Rep Power: 2 
Thanks for answer :
Here are the information you ask me. There is :
If you need more information tell me !! The log.checkMesh file : Code:
/**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.3.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ Build : 2.3.0 Exec : checkMesh Date : Apr 29 2015 Time : 22:23:59 Host : "nemo1" PID : 27356 Case : /data/cylindre_insta4 nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster allowSystemOperations : Disallowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 244368 faces: 697280 internal faces: 679552 cells: 226560 faces per cell: 6.07712 boundary patches: 6 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 218400 prisms: 1536 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 6624 Breakdown of polyhedra by number of faces: faces number of cells 6 2112 9 2688 12 1824 Checking topology... Boundary definition OK. Cell to face addressing 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 frontAndBack 7936 8352 ok (nonclosed singly connected) outlet 576 625 ok (nonclosed singly connected) inlet 576 625 ok (nonclosed singly connected) lowerWall 2016 2125 ok (nonclosed singly connected) upperWall 2016 2125 ok (nonclosed singly connected) cylindre 4608 4656 ok (nonclosed singly connected) Checking geometry... Overall domain bounding box (6 3 3) (15 3 3) Mesh (nonempty, nonwedge) directions (1 1 1) Mesh (nonempty) directions (1 1 1) Boundary openness (4.92725e19 2.71585e16 1.4847e16) OK. Max cell openness = 3.3278e16 OK. Max aspect ratio = 2.56187 OK. Minimum face area = 0.00149621. Maximum face area = 0.0635283. Face area magnitudes OK. Min volume = 9.46489e05. Max volume = 0.0158862. Total volume = 751.325. Cell volumes OK. Mesh nonorthogonality Max: 26.2533 average: 4.97247 Nonorthogonality check OK. Face pyramids OK. Max skewness = 0.341876 OK. Coupled point location match (average 0) OK. Mesh OK. End 

April 30, 2015, 05:40 

#6 
Senior Member

Change the boundary condition for pressure on your inlet to zeroGradient. I generally do not use the freestream boundary types, but I guess they could be used. I do believe there is also a freestreampressure boundary condition, that one may also work.
Regards, Tom 

April 30, 2015, 07:06 

#7 
Senior Member
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,133
Rep Power: 20 
Hi,
Agree with tomf about BC for pressure. You impose inlet velocity and no pressure gradient along the channel. It is a little bit strange, no? Mesh seems to be OK (hope inlet is really inlet and outlet is really outlet), though usually people make it denser not only around cylinder but also near the center of the channel. 

May 4, 2015, 10:15 

#8 
New Member
Join Date: Mar 2015
Location: Brest, France
Posts: 15
Rep Power: 2 
Thanks for answers :
I'm confused about pressure boundary conditions: If I want to simulate my the cylinder in a total free flow (not in a channel), should I use zeroGradient for all of the boundaries (even for inlet and oulet) ?? 

May 6, 2015, 04:20 

#9 
Senior Member

Well your setup inevitably results in a channellike flow. If you want (almost) freestream conditions I would suggest this setup:
Increase the height of your domain and prescribe your freestream conditions on the top and bottom boundaries as if they were inlets: fixedValue for velocity and turbulence, zeroGradient for pressure. For the outlet set a fixedValue pressure (0) and zeroGradient for all other variables. Otherwise look at the setup for the case: $FOAM_TUTORIALS/incompressible/simpleFoam/airFoil2D That one uses a setup with freestream boundary conditions. Regards, Tom 

May 6, 2015, 07:33 

#10 
New Member
Join Date: Mar 2015
Location: Brest, France
Posts: 15
Rep Power: 2 
Ok thanks for the details about boundary conditions.
I'e seen the airfoilD tutorial but it is a 2D simulation, I would like to do this in 3D but I don't know what boundary condition to use for the frontAndBack patches. I will try the first solution you gave me. 

May 6, 2015, 07:46 

#11  
Senior Member

Quote:
For 3D I would use slip on the frontAndBack patches for velocity, calculated for nut and zeroGradient for all others. If you have a finite length of your cylinder and want to include end effects you could make these freestream as well, but I think you should decide that for yourself after thinking about what it is exactly that you want to simulate. 

May 7, 2015, 08:43 

#12  
New Member
Join Date: Mar 2015
Location: Brest, France
Posts: 15
Rep Power: 2 
One more thanks for answer
Quote:
Quote:
I'm still trying to set freestream boundary conditions when I'm using those parameters I've got an error about field p. I join the 0 folder. Here is an extract of the log.pimpleFoam with the error message : Code:
[16] [16] [16] > FOAM FATAL IO ERROR: [16] Unable to set reference cell for field p Please supply either pRefCell or pRefPoint [16] [16] [16] file: IOstream.PIMPLE from line 0 to line 0. [16] [16] From function void Foam::setRefCell ( const volScalarField&, const volScalarField&, const dictionary&, label& scalar&, bool ) [16] in file cfdTools/general/findRefCell/findRefCell.C at line 125. [16] FOAM parallel run exiting [16] 

May 7, 2015, 09:33 

#13 
Senior Member

This means you need something like this in your system/fvSolution (the bold font part) but than in the PIMPLE subDict. Instead of pRefCell you can also use pRefPoint (search the forum for explanations). I took this from the airfoil2D tutorial.
Code:
SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; residualControl { p 1e5; U 1e5; nuTilda 1e5; } } 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Simulation of convective heat loss from cylinder  buidu  Main CFD Forum  9  April 28, 2015 07:11 
2d simulation on cylinder with grooves  madcyclop2  Main CFD Forum  1  January 25, 2014 05:26 
simulation of cylinder vibrating  ali moghimifar  FLUENT  2  March 2, 2012 14:18 
3D LES simulation of a circular cylinder  fpz  Main CFD Forum  3  June 20, 2005 19:50 
Simulation of the Flow past a circular cylinder using STARCD  M. S. GUEROUACHE  Main CFD Forum  0  October 1, 1998 10:51 