|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
Hi eebrah,
You can i) start the simulation with "better" initial conditions if possible. (such as using potentialFoam for some iterations) ii) use higher under-relaxation values. If it already converged it could possibly converge faster.
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
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. |
||
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
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.0-5be49240882f 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 run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied 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 (non-closed singly connected) fluidOutlet 3000 3311 ok (non-closed singly connected) fluidInlet 3000 3311 ok (non-closed singly connected) floor 161500 162485 ok (non-closed singly connected) ceilling 165000 165851 ok (non-closed singly connected) wall 12896 13196 ok (non-closed singly connected) gullyOutlet 3500 3636 ok (non-closed singly connected) GD1302_GD130 14444 14712 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (0 -2.75 -0.35) (3 2.75 0.1) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (3.8236e-17 -4.53953e-18 -9.5767e-17) OK. Max cell openness = 2.18057e-16 OK. Max aspect ratio = 3.33032 OK. Minimum face area = 7.66366e-06. Maximum face area = 0.000220689. Face area magnitudes OK. Min volume = 1.42302e-07. Max volume = 1.57101e-06. Total volume = 1.7687. Cell volumes OK. Mesh non-orthogonality Max: 41.5767 average: 0.90743 Non-orthogonality check OK. Face pyramids OK. Max skewness = 3.23427 OK. Coupled point location match (average 0) OK. Mesh OK. End |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
/*--------------------------------*- 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((1|A(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 ; } // ************************************************** *********************** // |
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
/*--------------------------------*- 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 1e-05; 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 1e-05; relTol 0.1; } k { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-05; relTol 0.01; } epsilon { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-06; relTol 0.01; } R { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-06; relTol 0.01; } nuTilda { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-05; relTol 0.01; } } SIMPLE { nNonOrthogonalCorrectors 1; residualControl { p 1e-5; U 1e-5; "(k|epsilon|omega)" 1e-5; } } relaxationFactors { fields { p 0.7; } equations { U 0.7; k 0.7; epsilon 0.7; R 0.7; nuTilda 0.7; } } potentialFlow { nNonOrthogonalCorrectors 10; } // ************************************************** *********************** // |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
p 0.7 under-relaxation is exceptionally high. Normal value should be 0.3.
Is that just some test case?
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#8 | |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
Quote:
Ah ok, i have set before p 0.3 as under-relaxation. 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. |
||
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#12 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
i am running a laminar case. Of course i set rasmodel to laminar. I use 1 cpu.
|
|
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#14 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
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 steady-state 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 ? |
|
![]() |
![]() |
![]() |
![]() |
#15 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
So this is actually a laminar case?
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#16 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
no, turbulence case.
|
|
![]() |
![]() |
![]() |
![]() |
#17 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#18 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#19 |
New Member
Join Date: Dec 2013
Posts: 16
Rep Power: 12 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#20 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
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 | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 04:13 |
[solidMechanics] solidMechanics gear contact in rotation | nlc | OpenFOAM CC Toolkits for Fluid-Structure Interaction | 3 | January 11, 2015 06:41 |
dynamic Mesh is faster than MRF???? | sharonyue | OpenFOAM Running, Solving & CFD | 14 | August 26, 2013 07:47 |
pisoFoam with k-epsilon turb blows up - Some questions | Heroic | OpenFOAM Running, Solving & CFD | 26 | December 17, 2012 03:34 |
plot over time | fferroni | OpenFOAM Post-Processing | 7 | June 8, 2012 07:56 |