
[Sponsors] 
August 12, 2014, 10:36 
SimpleFoam run time comsuming

#1 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
hello all,
I am looking some advices to improve a simulation with simpleFoam. My question is, please, is there a way to reduce time comsuming and improve convergence with simpleFoam. My case is consisted by 1.8 Millions of cells. My first simulation takes me 8.8 hours without good convergence. thank you 

August 12, 2014, 10:44 

#2 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 20 
Hi eebrah,
You can i) start the simulation with "better" initial conditions if possible. (such as using potentialFoam for some iterations) ii) use higher underrelaxation values. If it already converged it could possibly converge faster.
__________________
The skeleton ran out of shampoo in the shower. 

August 13, 2014, 04:10 

#3  
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
Quote:
I have tested your advices. I initial my case with potentialFoam for few iteration and run simpleFoam after. I notice no major changes. I am wondering if my mesh is good enough but it is, the mesh is ok after running checking mesh. 

August 13, 2014, 04:22 

#4 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
here are my log and my setting files.
/**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ Build : 2.2.05be49240882f Exec : checkMesh Date : Aug 13 2014 Time : 08:36:39 Host : "OpenFOAM" PID : 6996 Case : /home/alebli/Gully/calcul/20ls 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: 2006749 faces: 5644780 internal faces: 5270440 cells: 1819224 faces per cell: 5.99993 boundary patches: 8 point zones: 1 face zones: 3 cell zones: 0 Overall number of cells of each type: hexahedra: 1819103 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 121 Breakdown of polyhedra by number of faces: faces number of cells 4 3 5 118 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 11000 12122 ok (nonclosed singly connected) fluidOutlet 3000 3311 ok (nonclosed singly connected) fluidInlet 3000 3311 ok (nonclosed singly connected) floor 161500 162485 ok (nonclosed singly connected) ceilling 165000 165851 ok (nonclosed singly connected) wall 12896 13196 ok (nonclosed singly connected) gullyOutlet 3500 3636 ok (nonclosed singly connected) GD1302_GD130 14444 14712 ok (nonclosed singly connected) Checking geometry... Overall domain bounding box (0 2.75 0.35) (3 2.75 0.1) Mesh (nonempty, nonwedge) directions (1 1 1) Mesh (nonempty) directions (1 1 1) Boundary openness (3.8236e17 4.53953e18 9.5767e17) OK. Max cell openness = 2.18057e16 OK. Max aspect ratio = 3.33032 OK. Minimum face area = 7.66366e06. Maximum face area = 0.000220689. Face area magnitudes OK. Min volume = 1.42302e07. Max volume = 1.57101e06. Total volume = 1.7687. Cell volumes OK. Mesh nonorthogonality Max: 41.5767 average: 0.90743 Nonorthogonality check OK. Face pyramids OK. Max skewness = 3.23427 OK. Coupled point location match (average 0) OK. Mesh OK. End 

August 13, 2014, 04:24 

#5 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
/** C++ **\
 =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) bounded Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; laplacian((1A(U)),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 ; } // ************************************************** *********************** // 

August 13, 2014, 04:25 

#6 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
/** C++ **\
 =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.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 1e05; relTol 0.1; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } U { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e05; relTol 0.1; } k { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e05; relTol 0.01; } epsilon { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e06; relTol 0.01; } R { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e06; relTol 0.01; } nuTilda { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e05; relTol 0.01; } } SIMPLE { nNonOrthogonalCorrectors 1; residualControl { p 1e5; U 1e5; "(kepsilonomega)" 1e5; } } relaxationFactors { fields { p 0.7; } equations { U 0.7; k 0.7; epsilon 0.7; R 0.7; nuTilda 0.7; } } potentialFlow { nNonOrthogonalCorrectors 10; } // ************************************************** *********************** // 

August 13, 2014, 04:30 

#7 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 20 
p 0.7 underrelaxation is exceptionally high. Normal value should be 0.3.
Is that just some test case?
__________________
The skeleton ran out of shampoo in the shower. 

August 13, 2014, 04:44 

#8  
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
Quote:
Ah ok, i have set before p 0.3 as underrelaxation. I have changed it following your advice. Yes of course it's just some case. I am looking to optimise my time simulation consumption accordingly to my model. 

August 13, 2014, 04:48 

#9 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 20 
Ok.
1) You wrote it took about 8 hours. What kind of machine do you use? 2) During solving, how many iterations do the linear solvers (p,k,omega,...) take during each iteration?
__________________
The skeleton ran out of shampoo in the shower. 

August 13, 2014, 05:07 

#10 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
8 hours running simulation, yes it's a lot of time. i use a DELL PC with processor intel R xeon R 3.47 Ghz. RAM 12 Go.
For p, it takes me 2 iterations. i forget to point that i have set off my turbulence so no solving for k epsilon ... etc. 

August 13, 2014, 05:10 

#11 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 20 
How many CPUs do you use?
If you switch off the turbulence model, you mean by setting "laminar" in constant/turbulenceProperties ?
__________________
The skeleton ran out of shampoo in the shower. 

August 13, 2014, 05:29 

#12 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
i am running a laminar case. Of course i set rasmodel to laminar. I use 1 cpu.


August 13, 2014, 06:28 

#13 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 20 
If you run such a large case on just a single cpu you can not expect a faster convergence (by means of total time).
Also: If you switch off the turbulence model, you basically run a DNS with a grid that is probably too coarse. Why do you expect the simulation to converge anyway?
__________________
The skeleton ran out of shampoo in the shower. 

August 13, 2014, 07:33 

#14 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
my objective was to run the simulation on one cpu and be ensure that good convergence can be reached. And now optimise the time consumption by using more than one cpu.
Thank you to underline the point with DNS solving. I wanted to campare transient laminar solver I mean icoFoam to steadystate laminar solver SimpleFoam, which is more relevant for my case. That's the reason i switch off the turbulence. Taking into account your advice i am running a parallel simulation to see if there are major changes. By the way, one new question is it possible to reduce clockTime to be close to executionTime, i get a ratio of 6 between clockTime and executionTime ? 

August 13, 2014, 07:39 

#15 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 20 
So this is actually a laminar case?
__________________
The skeleton ran out of shampoo in the shower. 

August 13, 2014, 07:40 

#16 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
no, turbulence case.


August 13, 2014, 07:44 

#17 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 20 
I don't get it. Why do you switch off the turbulence model if it is turbulent?
As I understand it, it doesn't make any sense to optimize a turbulent case's convergence without a turbulence model. Regular turbulent cases won't converge anyway in a steady state solver without any turbulence model, because there is no steady state without articficial eddy viscosity damping!
__________________
The skeleton ran out of shampoo in the shower. 

August 13, 2014, 07:55 

#18 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
The case I am running now in parallel with 8 cpus include turbulence. I don't switch off anymore the turbulence as you point off.


August 13, 2014, 10:51 

#19 
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 5 
hi philipp,
I follow your advice and run a case with turbulence with 8 cpus. I notice that the execution decrease significantly 50 times less copared to serial running but unfortunately the clocktime soars quickly. A ratio of 14 exists between the executionTime and clockTime. for instance, executioTime is 757 s and clockTime 9988 s, is it a way to impove this ? Thank you in advance. 

August 13, 2014, 10:53 

#20 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 20 
Hmm, I get about the same values for both times. such as 1513s and 1615s...
What excactly do you type to start the simulations?
__________________
The skeleton ran out of shampoo in the shower. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
solidMechanics gear contact in rotation  nlc  OpenFOAM Running, Solving & CFD  3  January 11, 2015 07:41 
dynamic Mesh is faster than MRF????  sharonyue  OpenFOAM Running, Solving & CFD  14  August 26, 2013 07:47 
pisoFoam with kepsilon turb blows up  Some questions  Heroic  OpenFOAM Running, Solving & CFD  26  December 17, 2012 04:34 
AMI speed performance  danny123  OpenFOAM  19  October 24, 2012 07:44 
plot over time  fferroni  OpenFOAM PostProcessing  7  June 8, 2012 07:56 