
[Sponsors] 
December 16, 2019, 08:11 
Convergence in PisoFoam

#1 
New Member
Join Date: Dec 2019
Posts: 9
Rep Power: 2 
Hi,
I'm trying the pisoFoam solver for the first time. So, it is necessary for this transient solver to converge as well to get reasonable results, or isn't it? What might be the case setup problem/misconfiguration when the pressure residuals are generally relatively high, while decreasing very slowly (much slower then for U,k etc.)? Regards ras27 

December 17, 2019, 02:42 

#2 
New Member
Join Date: Dec 2019
Posts: 9
Rep Power: 2 
After ca. 30.000 seconds velocity magnitude doesn't really change any more over time steps, pressure residuals (initial, final) still change somewhat and are higher than the residuals for the other parameters.
Current p/pFinalsolver is PCG; preconditioner DIC; tolerance 1e05; relTol 0.01; The final p residuals are below this value, but not the initial p residuals  is this the actual reason why the calc. doesn't converge? Solver for the other parameters: U/UFinal: solver PBiCG; preconditioner DILU; tolerance 1e08; relTol 0; k/kFinal/omega/omegaFinal: same but with tolerance 1e06 An example time step looks like this: Courant Number mean: 6.42953e06 max: 0.000193524 velocity magnitude: 0.356507 DILUPBiCG: Solving for Ux, Initial residual = 7.72219e06, Final residual = 2.09765e14, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 7.72269e06, Final residual = 2.1326e14, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 4.29846e06, Final residual = 4.14046e15, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.000942324, Final residual = 9.63831e06, No Iterations 7 DICPCG: Solving for p, Initial residual = 0.000892736, Final residual = 9.33697e06, No Iterations 7 DICPCG: Solving for p, Initial residual = 0.000896561, Final residual = 8.91375e06, No Iterations 7 time step continuity errors : sum local = 2.81459e14, global = 5.5071e15, cumulative = 1.14628e11 DICPCG: Solving for p, Initial residual = 0.00086609, Final residual = 8.85168e06, No Iterations 7 DICPCG: Solving for p, Initial residual = 0.00086792, Final residual = 8.944e06, No Iterations 7 DICPCG: Solving for p, Initial residual = 0.000873361, Final residual = 9.25454e06, No Iterations 7 time step continuity errors : sum local = 2.9222e14, global = 5.89021e15, cumulative = 1.14569e11 DILUPBiCG: Solving for omega, Initial residual = 0.00014519, Final residual = 5.96443e14, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 0.000315144, Final residual = 1.67307e13, No Iterations 1 ExecutionTime = 15945.2 s ClockTime = 31484 s 

December 17, 2019, 06:37 

#3 
Super Moderator

Hi,
your solution is already converged (I would expect it). However, in some cases it is hard to achieve a pressure drop more than two or three orders of magnitude. This might be a result of different things such as the norm in which FOAM calculates the residuals or due to some instabilities in your flow (e.g., small vortexes which form). Imagine a fluid flow around a cylinder with a critical Reynolds number of 120. In that case we will get some vortex shedding. Using a steady state solver will not converge to low residuals due to the fact that we have vortexes in the domain that form and propagates. Keeping that scenario, even a transient solver will not converge towards 1e7 residuals as the flow is always changing. As you do not give much information about your case, this is the only hints I can give to you. Surely, you also can have numerical instabilities based on the schemes etc. By the way, your Courant number is 2e4. So why you don't increase your timestep?
__________________
Keep foaming, Tobias Holzmann 

December 17, 2019, 07:21 

#4 
New Member
Join Date: Dec 2019
Posts: 9
Rep Power: 2 
Hi,
ok, thanks. So, isn't there a real/absolute necessity for the notice "The simulation converged after...time steps" e.g. to have feasible results? Presumed that I would increase the tolerances (e.g. form 1e08 to 1e06 etc.) would this possibly result in convergence a la "The simulation conv. after...time steps", or aren't this tolerances the main convergence criteria? Note: The simulation converged with simpleFoam...now, I'm trying it with pisoFoam, as I want to introduce a sinusoidal U boundary/initial condition. By the way, the case is basically a pipe flow with some bodies/geometries causing flow resistance along the flow axis. As I'm relatively new to OF, I adopted the schemes based on different example cases throughout the web, and am still trying around, i.e. Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(U) cellLimited Gauss linear 0.5; } divSchemes { default none; div(phi,U) Gauss linearUpwind Grad(U); div(phi,k) Gauss upwind; div(phi,omega) Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear limited 0.777; } interpolationSchemes { default linear; } snGradSchemes { default limited 0.777; } fluxRequired { default no; p; } Last edited by Tobi; December 17, 2019 at 07:48. Reason: Added Code Tags 

December 17, 2019, 07:27 

#5  
Super Moderator

Please use code tags if you place anything into the forum. It is hard to read and commonly I ignore those lines. The main problem in statements like these:
Quote:
Code:
relaxationFactors { fields { p 0.2; pFinal 0.2; } }
__________________
Keep foaming, Tobias Holzmann 

December 17, 2019, 07:47 

#6 
New Member
Join Date: Dec 2019
Posts: 9
Rep Power: 2 
Ok, sorry for that, and thanks for the help so far...I'll play around a bit while trying to get some deeper grasp


December 17, 2019, 07:49 

#7  
Super Moderator

Quote:
For numerical schemes etc. you can check out the OpenFOAM User Guide For usage of algorithms and relax factors you can check out my book. Good luck.
__________________
Keep foaming, Tobias Holzmann 

December 17, 2019, 08:03 

#8 
New Member
Join Date: Dec 2019
Posts: 9
Rep Power: 2 
Ah, ok..thanks for the references.
Im Übrigen LG aus LE 

December 17, 2019, 08:07 

#9 
Super Moderator

Ah from LE
Then you can bother Dr. Alexander Vakhrushev, he is in the SMMP department and knows almost everything about FOAM.
__________________
Keep foaming, Tobias Holzmann 

December 17, 2019, 08:17 

#10 
New Member
Join Date: Dec 2019
Posts: 9
Rep Power: 2 
I try to use OpenFoam for some M.Thesis work, still trying to bother no one at the moment, since there is at least some little progress in understanding the program..will try to play around a bit with the case for the next 2 days


December 18, 2019, 11:37 

#11 
New Member
Join Date: Dec 2019
Posts: 9
Rep Power: 2 
If the initial residuals are rel. high compared to the final residuals, is it possible to ever get full convergence in the specific case (since the solver tolerances refer to/control the initial residuals)?
Is it normal that the initial res. are several orders of magnitude higher than the final res.? Addition: If applying a timeVaryingUniformFixedValue (with ramp) BC for the velocity inlet, can there even be a convergence of the computation (inlet velocity changes stepwise)? Or is it simply necessary to run the simulation from start time (0) to end time (e.g. 4seconds/the end of the ramp cycle)? should be the logical case bounding k: is there another way to avoid it, besides reducing the time step size? (partially solved, as bounding k vanishes during simulation run) Is it reasonable for the flow simulation in a ca. 1.8m long pipe (with diverse installations inside) and varying inlet velocity to last approx. 1 day (approx. 24 hours)? If entries in the rampfile are changed before the simulation reaches the respective time, does the simulation recognise the updated values or does it continue with/remember the the original rampfile values at the moment of simulation start? Regards, ras27 Last edited by ras27; December 20, 2019 at 06:47. 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
why pisoFoam take such a long time to converge?  izna  OpenFOAM Running, Solving & CFD  51  October 25, 2013 03:28 
Convergence of CFX field in FSI analysis  nasdak  CFX  2  June 29, 2009 02:17 
Problems with convergence with an easy system  franzdrs  Main CFD Forum  0  June 15, 2009 19:17 
increasing mesh quality is leading to poor convergence  tippo  CFX  2  May 5, 2009 11:55 
convergence problem with SIMPLER  NURAY KAYAKOL  Main CFD Forum  1  February 24, 1999 14:43 