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

SimpleFoam run time comsuming

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 12, 2014, 10:36
Question SimpleFoam run time comsuming
  #1
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
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
eebrah is offline   Reply With Quote

Old   August 12, 2014, 10:44
Default
  #2
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   August 13, 2014, 04:10
Default
  #3
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
Quote:
Originally Posted by RodriguezFatz View Post
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.
thank you for replying.

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.
eebrah is offline   Reply With Quote

Old   August 13, 2014, 04:22
Default
  #4
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
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
eebrah is offline   Reply With Quote

Old   August 13, 2014, 04:24
Default
  #5
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
/*--------------------------------*- 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 ;
}


// ************************************************** *********************** //
eebrah is offline   Reply With Quote

Old   August 13, 2014, 04:25
Default
  #6
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
/*--------------------------------*- 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;
}

// ************************************************** *********************** //
eebrah is offline   Reply With Quote

Old   August 13, 2014, 04:30
Default
  #7
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   August 13, 2014, 04:44
Default
  #8
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
Quote:
Originally Posted by RodriguezFatz View Post
p 0.7 under-relaxation is exceptionally high. Normal value should be 0.3.
Is that just some test case?
hi philipp,

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.
eebrah is offline   Reply With Quote

Old   August 13, 2014, 04:48
Default
  #9
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   August 13, 2014, 05:07
Default
  #10
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
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.
eebrah is offline   Reply With Quote

Old   August 13, 2014, 05:10
Default
  #11
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   August 13, 2014, 05:29
Default
  #12
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
i am running a laminar case. Of course i set rasmodel to laminar. I use 1 cpu.
eebrah is offline   Reply With Quote

Old   August 13, 2014, 06:28
Default
  #13
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   August 13, 2014, 07:33
Default
  #14
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
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 ?
eebrah is offline   Reply With Quote

Old   August 13, 2014, 07:39
Default
  #15
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
So this is actually a laminar case?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   August 13, 2014, 07:40
Default
  #16
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
no, turbulence case.
eebrah is offline   Reply With Quote

Old   August 13, 2014, 07:44
Default
  #17
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   August 13, 2014, 07:55
Default
  #18
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
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.
eebrah is offline   Reply With Quote

Old   August 13, 2014, 10:51
Default
  #19
New Member
 
Join Date: Dec 2013
Posts: 16
Rep Power: 12
eebrah is on a distinguished road
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.
eebrah is offline   Reply With Quote

Old   August 13, 2014, 10:53
Default
  #20
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
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.
RodriguezFatz 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
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


All times are GMT -4. The time now is 18:36.