CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SimpleFoam run time comsuming (https://www.cfd-online.com/Forums/openfoam-solving/140291-simplefoam-run-time-comsuming.html)

eebrah August 12, 2014 10:36

SimpleFoam run time comsuming
 
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

RodriguezFatz August 12, 2014 10:44

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.

eebrah August 13, 2014 04:10

Quote:

Originally Posted by RodriguezFatz (Post 505598)
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 August 13, 2014 04:22

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 August 13, 2014 04:24

/*--------------------------------*- 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 August 13, 2014 04:25

/*--------------------------------*- 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;
}

// ************************************************** *********************** //

RodriguezFatz August 13, 2014 04:30

p 0.7 under-relaxation is exceptionally high. Normal value should be 0.3.
Is that just some test case?

eebrah August 13, 2014 04:44

Quote:

Originally Posted by RodriguezFatz (Post 505701)
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.

RodriguezFatz August 13, 2014 04:48

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?

eebrah August 13, 2014 05:07

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.

RodriguezFatz August 13, 2014 05:10

How many CPUs do you use?
If you switch off the turbulence model, you mean by setting "laminar" in constant/turbulenceProperties ?

eebrah August 13, 2014 05:29

i am running a laminar case. Of course i set rasmodel to laminar. I use 1 cpu.

RodriguezFatz August 13, 2014 06:28

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?

eebrah August 13, 2014 07:33

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 ?

RodriguezFatz August 13, 2014 07:39

So this is actually a laminar case?

eebrah August 13, 2014 07:40

no, turbulence case.

RodriguezFatz August 13, 2014 07:44

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!

eebrah August 13, 2014 07:55

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 August 13, 2014 10:51

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.

RodriguezFatz August 13, 2014 10:53

Hmm, I get about the same values for both times. such as 1513s and 1615s...
What excactly do you type to start the simulations?


All times are GMT -4. The time now is 03:37.