# why pisoFoam take such a long time to converge?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 18, 2013, 03:49 #21 New Member   Danesh S Join Date: Jul 2013 Location: Bochum, Germany Posts: 27 Rep Power: 12 I understand what you mean Haakon. Of course the Taylor Couette Flow (in my case) will have a steady state solution at some point, e.g. turbulent taylor vortices. I am pretty sure, that it should work with pisoFoam. My time step is actually large. It is 0,05, which should be ok, looking at the courant number (alway < 0,45).

 October 18, 2013, 04:12 #22 Senior Member     Philipp Join Date: Jun 2011 Location: Germany Posts: 1,297 Rep Power: 26 DaSh, pisoFoam just does a single iteration each time step (solving momentum and turbulence equation just once). In every unsteady simulation the solution (U, p, k, ...) changes to the next time step so residuals are increased. The piso step will again reduce them and so on. Now comes a part about how I understand it, so don't take it too serious: After some reduction of the initial error during the first iterations, there will be an equilibrium of your flow - increasing the residual each time step - and the piso solver - reducing the residual each time step. If the time step is too large, the introduced error will be large an thus pisoFoam might be not able to handle this: the simulation will diverge or give completely garbage results. If the time step is small, the introduced error will be small. Then three things can happen: 1) Piso will hit exactly the amount of error and the residual keeps constant from time step to time step. 2) Piso is better. The residual will fall until 1). This will happen, as every iterative procedure gets worse for falling residuals. 3) Piso is worse. The redisuals will go up until 1). Piso gets better - same reason as in 2). Result: If you want your residuals to be lower - you need to decrease your time step. DaSh and allanZHONG like this. __________________ The skeleton ran out of shampoo in the shower.

 October 18, 2013, 04:31 #23 New Member   Danesh S Join Date: Jul 2013 Location: Bochum, Germany Posts: 27 Rep Power: 12 Thank you for your reply. I understand what you mean and it seems logical. So the point where I am wrong is, that a falling residual does not indicate "where my simulation is". So the flow can change with time going by, although my residual did stop dropping. Because as I get it, it really just gives indication of the error of the current result. So, if I want to reduce the error, I lower the time step. But for my simulation to advance in matters of transition, it will not help?!

October 18, 2013, 04:36
#24
Senior Member

Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
Quote:
 Originally Posted by DaSh Because as I get it, it really just gives indication of the error of the current result. So, if I want to reduce the error, I lower the time step.
Yes, that's what I think, too.

I don't understand what you mean by your very last sentence (not quoted here).
__________________
The skeleton ran out of shampoo in the shower.

 October 18, 2013, 04:47 #25 New Member   Danesh S Join Date: Jul 2013 Location: Bochum, Germany Posts: 27 Rep Power: 12 What I mean: As I simulate a transient flow, I should see several stages of flow over the time being. So, a lowering residual is not an indicator for the flow changing its course or appearance. And thus, my residual, as it is stable/constant, does not indicate, that my flow will not change any further. I just have to wait longer.

 October 18, 2013, 04:53 #26 Senior Member     Philipp Join Date: Jun 2011 Location: Germany Posts: 1,297 Rep Power: 26 Ok, but your flow is transient - so it will never stop changing right? __________________ The skeleton ran out of shampoo in the shower.

 October 18, 2013, 05:00 #27 New Member   Danesh S Join Date: Jul 2013 Location: Bochum, Germany Posts: 27 Rep Power: 12 As I get it, a Taylor Couette Flow should have a steady state solution in turbulent Taylor Voritces. Of course there will be fluctuations in it but it will not change its form again. For the Reynolds number I applied, there should no further instability after turbulent Vortex Flow (e.g. like higher classes of chaos). Or am I getting something wrong in matters of definition?

 October 18, 2013, 06:04 #28 Senior Member     Philipp Join Date: Jun 2011 Location: Germany Posts: 1,297 Rep Power: 26 But if you do LES these fluctuations are resolved and thus keep the residuals to a certain level. I guess, if you do the same thing with any RANS model residuals will keep falling once the large vorticies are there (as some kind of pseudo-transient PISO). __________________ The skeleton ran out of shampoo in the shower.

 October 18, 2013, 06:14 #29 New Member   Danesh S Join Date: Jul 2013 Location: Bochum, Germany Posts: 27 Rep Power: 12 Yes, I guess you are right. What matters most for my simulation, is, that although my residual seems to be almost constant, as there are no voritces, it doesn't mean, that they won't come in the future of the simulation. dickcruz likes this.

October 18, 2013, 08:46
#30
Senior Member

izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
helloo

I am sorry for late reply..

But finally My solution with simpleFoam converge..

I used a fv schemes and fv solution as below.. and attached is my converged results.. As we can all see its not good at all!...

Quote:
 /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / 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) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; 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 ; } // ************************************************** *********************** //

Quote:
 /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver smoothSolver; smoother GaussSeidel; tolerance 1e-8; relTol 0.1; nSweeps 1; } U { solver smoothSolver; smoother GaussSeidel; tolerance 1e-8; relTol 0.1; nSweeps 1; } k { solver smoothSolver; smoother GaussSeidel; tolerance 1e-8; relTol 0.1; nSweeps 1; } epsilon { solver smoothSolver; smoother GaussSeidel; tolerance 1e-8; relTol 0.1; nSweeps 1; } } SIMPLE { nNonOrthogonalCorrectors 0; residualControl { p 1e-2; U 1e-3; "(k|epsilon|omega)" 1e-3; } } relaxationFactors { fields { p 0.3; } equations { U 0.7; k 0.7; epsilon 0.7; } } cache { grad(U); } // ************************************************** *********************** //

Last edited by izna; October 22, 2013 at 10:46.

 October 18, 2013, 09:08 #31 Senior Member     Philipp Join Date: Jun 2011 Location: Germany Posts: 1,297 Rep Power: 26 The log output is still missing. You really can not expect this to converge. You set everything to linear, gradients have no limiters and so on. You need to get a stable, robust setting and then you can try to make it numerically more accurat. But don't start with this second order low diffusion stuff. __________________ The skeleton ran out of shampoo in the shower.

 October 18, 2013, 09:36 #32 Senior Member   izna O'connor Join Date: Jun 2013 Posts: 143 Rep Power: 12 look can you please post for me a fv scheme and fv solution fiting for this? ANd i assure you it converged..

 October 18, 2013, 09:40 #33 Senior Member   izna O'connor Join Date: Jun 2013 Posts: 143 Rep Power: 12 log output you mean the graph of iterations?

 October 18, 2013, 09:41 #34 Senior Member     Philipp Join Date: Jun 2011 Location: Germany Posts: 1,297 Rep Power: 26 No, I mean the terminal or log file output that is created during the calculation. __________________ The skeleton ran out of shampoo in the shower.

 October 18, 2013, 09:44 #35 Senior Member   izna O'connor Join Date: Jun 2013 Posts: 143 Rep Power: 12 but i do not have it with me.. once convegence was acheived.. i check in paraview an then close it all.. can you please give em a good Fv scheme and fv solution?

 October 18, 2013, 09:46 #36 Senior Member     Philipp Join Date: Jun 2011 Location: Germany Posts: 1,297 Rep Power: 26 This doesn't make any sense. I can just guess what might be the reason without the output. Do you use simple now or still piso? __________________ The skeleton ran out of shampoo in the shower.

 October 18, 2013, 09:48 #37 Senior Member   izna O'connor Join Date: Jun 2013 Posts: 143 Rep Power: 12 i use simpleFOam...

October 18, 2013, 09:51
#38
Senior Member

izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
Quote:
 /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.2.1-57f3c3617a2d Exec : simpleFoam Date : Oct 18 2013 Time : 17:49:50 Host : "izna-MS-7592" PID : 30710 Case : /home/izna/Desktop/me 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 mesh for time = 1499 Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting RAS turbulence model kEpsilon kEpsilonCoeffs { Cmu 0.09; C1 1.44; C2 1.92; sigmaEps 1.3; } No finite volume options present SIMPLE: convergence criteria field p tolerance 0.01 field U tolerance 0.001 field "(k|epsilon)" tolerance 0.001 Starting time loop Time = 1500 smoothSolver: Solving for Ux, Initial residual = 0.000272676180903, Final residual = 2.21277453827e-05, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.000199629444124, Final residual = 1.62625348368e-05, No Iterations 4 GAMG: Solving for p, Initial residual = 0.00956741607883, Final residual = 0.000397412644069, No Iterations 69 GAMG: Solving for p, Initial residual = 0.000251084793744, Final residual = 1.14590103449e-05, No Iterations 6 GAMG: Solving for p, Initial residual = 2.62606828603e-05, Final residual = 1.25053629257e-06, No Iterations 45 time step continuity errors : sum local = 4.68359960217e-07, global = -4.67471740526e-11, cumulative = -4.67471740526e-11 smoothSolver: Solving for epsilon, Initial residual = 1.66731195606e-05, Final residual = 6.60718162715e-06, No Iterations 1 smoothSolver: Solving for k, Initial residual = 0.000849113107756, Final residual = 6.98826517851e-05, No Iterations 4 ExecutionTime = 46.82 s ClockTime = 47 s SIMPLE solution converged in 1500 iterations End
HI i have run it again.. and this is the resutl

 October 18, 2013, 09:56 #39 Senior Member     Philipp Join Date: Jun 2011 Location: Germany Posts: 1,297 Rep Power: 26 Well, I would try: Code: ```ddtSchemes { default steadyState; } gradSchemes { default faceLimited edgeCellsLeastSquares 1; // or faceLimited Gauss linear 1.0; } divSchemes { default Gauss upwind phi; } //keep the rest from your file``` Also use GAMG for pressure: Code: ```p { solver GAMG; tolerance 1e-6; relTol 0.01; maxIter 100; smoother DICGaussSeidel; //simple: nPreSweeps 0; nPostSweeps 1; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 50; agglomerator faceAreaPair; mergeLevels 1; };``` Did you think about what hakoon said? Namely that your flow just is transient and thus simple won't converge to steady-state? What is this simulation about? __________________ The skeleton ran out of shampoo in the shower.

 October 18, 2013, 09:58 #40 Senior Member   izna O'connor Join Date: Jun 2013 Posts: 143 Rep Power: 12 hi i am simulating a 2D case and observing the flow pattern of wind around some rectangular shapes...