
[Sponsors] 
pressure eq. "converges" after few time steps 

LinkBack  Thread Tools  Search this Thread  Display Modes 
October 27, 2010, 12:34 
pressure eq. "converges" after few time steps

#1 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 
Hi everybody,
weird simpleFoam convergence over here, need your help! I have a complex pipes geometry, similar to what sketched in the geom.png file. The two main pipes are connected by fans to the outside, which is represented by a spherical domain. Reynolds is around 21000 on the smallest pipe, thus a launderSharmaKE model is applied, using wallfunction to keep low the cell number. In any case, the mesh is not really fine since I first want to evaluate my setup. BC are standard:
Code:
grad faceMDLimited Gauss linear 0.5; div Gauss linearUpwind cellLimited Gauss linear 1; laplacian Gauss linear limited 0.5; Code:
this is the first one: p { solver GAMG; tolerance 1e06; relTol 0; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } U epsilon k { solver smoothSolver; smoother GaussSeidel; tolerance 1e04; relTol 0; } Code:
p { solver GAMG; tolerance 1e6; relTol 1e3; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } U { solver PBiCG; preconditioner DILU; tolerance 1e4; relTol 1e3; } k epsilon { solver smoothSolver; smoother GaussSeidel; tolerance 1e4; relTol 1e3; } Code:
Time = 1 smoothSolver: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0 //correct, I applied two fans! smoothSolver: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0 GAMG: Solving for p, Initial residual = 1, Final residual = 9.59218e07, No Iterations 393 GAMG: Solving for p, Initial residual = 9.29457e08, Final residual = 9.29457e08, No Iterations 0 GAMG: Solving for p, Initial residual = 9.29457e08, Final residual = 9.29457e08, No Iterations 0 time step continuity errors : sum local = 0.00122424, global = 1.32307e12, cumulative = 1.32307e12 smoothSolver: Solving for epsilon, Initial residual = 0.454767, Final residual = 9.2459e06, No Iterations 1 smoothSolver: Solving for k, Initial residual = 1, Final residual = 7.38315e05, No Iterations 1 ExecutionTime = 174.05 s ClockTime = 175 s Time = 2 smoothSolver: Solving for Ux, Initial residual = 0.141374, Final residual = 5.00021e05, No Iterations 5 smoothSolver: Solving for Uy, Initial residual = 0.272753, Final residual = 7.82825e05, No Iterations 5 smoothSolver: Solving for Uz, Initial residual = 0.202637, Final residual = 8.15781e05, No Iterations 5 GAMG: Solving for p, Initial residual = 8.8497e08, Final residual = 8.8497e08, No Iterations 0 GAMG: Solving for p, Initial residual = 8.8497e08, Final residual = 8.8497e08, No Iterations 0 GAMG: Solving for p, Initial residual = 8.8497e08, Final residual = 8.8497e08, No Iterations 0 time step continuity errors : sum local = 0.000634968, global = 7.45987e07, cumulative = 7.45986e07 smoothSolver: Solving for epsilon, Initial residual = 0.164053, Final residual = 2.52305e06, No Iterations 1 smoothSolver: Solving for k, Initial residual = 0.24006, Final residual = 1.351e05, No Iterations 1 ExecutionTime = 192.39 s ClockTime = 194 s This does not change when:  reducing the nNonOrthogonalCorrectors;  using the second fvSchemes files;  switching off the turbulence. Any explanation on that? Really no ideas... thank you! maddalena 

October 27, 2010, 13:00 

#2 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 14 
Hi,
try lowering the tolerances of the linear solvers. Something in the order of 1e12 might be appropriate. Remember, your simulation is not converged if the residuals of just one equation fall below a certain tolerance. The pressure field depends on the velocity field and vice versa  since your velocity field clearly hasn't converged after the second iteration your whole problem hasn't (would be very surprising if it had) and the pressure equation might and probably will be resolved at some point. Greetings, Felix. 

October 28, 2010, 07:48 

#3 
Member
Franco Marra
Join Date: Mar 2009
Location: Napoli  Italy
Posts: 64
Rep Power: 13 
Dear Maddalena,
I would try also changing the initial conditions: I am not aware of your problem but maybe you can try to force the raising of pressure gradients by assigning non zero values for the velocity in the pipes and zero outside. Regards, Franco 

November 2, 2010, 10:28 

#4  
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 
Thanks Felix and Francesco for your suggestions.
Some observations after some more try: Quote:
Quote:
Quote:
What I have got up to now is a converging but unstable solution: I have bounding epsilon and k warnings, but a convergent solution till time step 295. After that, the max epsilon and k raise suddently and the solution blows away: Code:
Time = 295 DILUPBiCG: Solving for Ux, Initial residual = 0.11505, Final residual = 8.32225e11, No Iterations 13 DILUPBiCG: Solving for Uy, Initial residual = 0.934182, Final residual = 7.36365e11, No Iterations 14 DILUPBiCG: Solving for Uz, Initial residual = 0.713126, Final residual = 4.13259e11, No Iterations 13 GAMG: Solving for p, Initial residual = 1.86515e09, Final residual = 9.94925e13, No Iterations 206 GAMG: Solving for p, Initial residual = 6.88289e10, Final residual = 7.66889e13, No Iterations 9 time step continuity errors : sum local = 4.67002e09, global = 1.51568e10, cumulative = 2.05894e08 smoothSolver: Solving for epsilon, Initial residual = 0.00158922, Final residual = 7.46827e11, No Iterations 24 bounding epsilon, min: 1.30954e18 max: 5812.76 average: 93.9024 smoothSolver: Solving for k, Initial residual = 7.82377e09, Final residual = 4.92151e11, No Iterations 5 bounding k, min: 6.82659e17 max: 14.436 average: 0.424139 ExecutionTime = 65389.8 s ClockTime = 65515 s Time = 296 DILUPBiCG: Solving for Ux, Initial residual = 0.328206, Final residual = 5.57292e11, No Iterations 33 DILUPBiCG: Solving for Uy, Initial residual = 0.904646, Final residual = 3.81614e11, No Iterations 30 DILUPBiCG: Solving for Uz, Initial residual = 0.678265, Final residual = 3.27509e11, No Iterations 29 GAMG: Solving for p, Initial residual = 0.000198723, Final residual = 9.87374e13, No Iterations 723 GAMG: Solving for p, Initial residual = 5.88726e07, Final residual = 9.89924e13, No Iterations 273 time step continuity errors : sum local = 2.72317e07, global = 1.44975e09, cumulative = 2.20392e08 smoothSolver: Solving for epsilon, Initial residual = 0.998411, Final residual = 5.92556e11, No Iterations 35 bounding epsilon, min: 1.30845e18 max: 7.92429e+07 average: 1496.69 smoothSolver: Solving for k, Initial residual = 1.39098e07, Final residual = 5.71729e11, No Iterations 5 bounding k, min: 2.01645e14 max: 449863 average: 2.44943 ExecutionTime = 65807.2 s ClockTime = 65932 s Time = 297 DILUPBiCG: Solving for Ux, Initial residual = 0.693738, Final residual = 2.49235e11, No Iterations 28 DILUPBiCG: Solving for Uy, Initial residual = 0.745261, Final residual = 2.71405e11, No Iterations 28 DILUPBiCG: Solving for Uz, Initial residual = 0.715263, Final residual = 2.6154e11, No Iterations 28 GAMG: Solving for p, Initial residual = 1.06952e05, Final residual = 9.67823e13, No Iterations 738 GAMG: Solving for p, Initial residual = 3.03894e09, Final residual = 9.87472e13, No Iterations 31 time step continuity errors : sum local = 0.00097431, global = 7.21803e06, cumulative = 7.196e06 smoothSolver: Solving for epsilon, Initial residual = 0.587168, Final residual = 7.92945e11, No Iterations 18 bounding epsilon, min: 1.56953e17 max: 9.66762e+12 average: 6.49312e+07 smoothSolver: Solving for k, Initial residual = 0.00708516, Final residual = 1.51465e11, No Iterations 11 bounding k, min: 3.00985e15 max: 3.33247e+10 average: 154254 ExecutionTime = 66136 s ClockTime = 66261 s Time = 298 DILUPBiCG: Solving for Ux, Initial residual = 0.652017, Final residual = 5.22231e11, No Iterations 23 DILUPBiCG: Solving for Uy, Initial residual = 0.523133, Final residual = 6.68451e11, No Iterations 21 DILUPBiCG: Solving for Uz, Initial residual = 0.677302, Final residual = 8.86501e11, No Iterations 22 GAMG: Solving for p, Initial residual = 4.62234e08, Final residual = 9.77244e13, No Iterations 566 GAMG: Solving for p, Initial residual = 2.08294e10, Final residual = 7.37324e13, No Iterations 4 time step continuity errors : sum local = 0.0110342, global = 0.000335115, cumulative = 0.000342311 smoothSolver: Solving for epsilon, Initial residual = 0.00963571, Final residual = 9.99631e11, No Iterations 26 bounding epsilon, min: 2.55095e15 max: 2.70603e+18 average: 2.26696e+13 smoothSolver: Solving for k, Initial residual = 0.00019889, Final residual = 6.88818e11, No Iterations 21 bounding k, min: 2.62403e13 max: 6.83816e+11 average: 6.84336e+06 ExecutionTime = 66386.5 s ClockTime = 66512 s Ideas? maddalena 

November 2, 2010, 10:40 

#6 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 

November 2, 2010, 10:43 

#7 
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 19 
I need to do it myself and am just about to look into it
You can jump ahead here: http://www.cfdonline.com/Forums/ope...residuals.html
__________________
Laurence R. McGlashan :: Website 

November 2, 2010, 10:53 

#8 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 

November 2, 2010, 12:04 

#9 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 
Done. I modified the simpleFoamResidual utility that hrvoje posted in order to match the new turbulence definition. What I get is a plot showing that the uResidual are higher at the corners of my pipe geometry, thus on the points where the flow is more difficult to model. Does this mean that my mesh is not fine enough on those points?
mad 

November 2, 2010, 12:09 

#10 
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 19 
Same. Popped it up on github:
http://github.com/lrm29/OpenFOAM.loc...dualCalculator OpenFOAM1.7.x has some errorEstimation libraries which would be nice to use. The residual that simpleFoamResidual calculates needs to be normalised (by the initial state possibly?) so that the changes from step to step can be seen more clearly.
__________________
Laurence R. McGlashan :: Website 

November 2, 2010, 13:08 

#11  
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 19 
Quote:
Another thing that may be worth checking is that the mass flow into and out of your domain matches.
__________________
Laurence R. McGlashan :: Website 

December 2, 2010, 11:11 
Why my solutiion is not converging?

#12 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 
Hello,
still here with the same problem on a different case: pressure & velocity fields look good and their residual's trend is "converging"; however local value of residuals (simpleFoamResidual) does not looks good and I have weird oscillations on the initial residual of every time step. My mesh (tet mesh with no boundary layer) is nice. I have tried tons of different BCfvSchemesfvSolution settings. No way. May this be due to the high number of cyclic patches I am using? Two fans BC + cyclic sides. I do not what to think now. Suggestions? mad 

February 7, 2011, 04:33 
Reversed problem!

#13 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 
Ok, maybe this is not the right place where to post, but I hope to get some answer on a problem that is similar to what posted above...
I started this thread speaking of a pressure equation that converges too soon... And I am writing now for a pressure equation that is never solved within the 1000 iterations of a time step! Geometry and bc are similar to what described above, only the pipe geometry is a little bit more complex than what sketched. Check mesh does not complain about that: Code:
Overall domain bounding box (37.4532 6.70564 3.99289e17) (42.605 6.70578 27.2094) Mesh (nonempty, nonwedge) directions (1 1 1) Mesh (nonempty) directions (1 1 1) Boundary openness (2.78883e18 1.17153e15 2.36782e14) OK. Max cell openness = 3.29759e16 OK. Max aspect ratio = 42.4261 OK. Minumum face area = 1.27273e06. Maximum face area = 9.60387. Face area magnitudes OK. Min volume = 1.12921e09. Max volume = 8.07969. Total volume = 9723.47. Cell volumes OK. Mesh nonorthogonality Max: 69.699 average: 18.046 Nonorthogonality check OK. Face pyramids OK. Max skewness = 0.956692 OK fvSchemes and fvSolution are: Code:
grad faceMDLimited Gauss linear 0.5; div Gauss linearUpwind cellLimited Gauss linear 1; laplacian Gauss linear limited 0.5; Code:
p { solver GAMG; tolerance 1e10; relTol 0; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } U { solver PBiCG; preconditioner DILU; tolerance 1e08; relTol 0; } k epsilon { solver smoothSolver; smoother GaussSeidel; tolerance 1e08; relTol 0; } nNonOrthogonalCorrectors 3; relaxationFactors p: 0.15; U, k, epsilon: 0.3; Code:
DILUPBiCG: Solving for Ux, Initial residual = 0.0028965, Final residual = 2.16561e11, No Iterations 7 DILUPBiCG: Solving for Uy, Initial residual = 0.00286544, Final residual = 2.35329e11, No Iterations 7 DILUPBiCG: Solving for Uz, Initial residual = 0.00271231, Final residual = 2.42359e11, No Iterations 7 GAMG: Solving for p, Initial residual = 0.127338, Final residual = 7.19827e06, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.0408166, Final residual = 2.54205e06, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.0144267, Final residual = 1.11529e06, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.00831105, Final residual = 1.09388e07, No Iterations 1000 time step continuity errors : sum local = 8.4358e08, global = 1.12046e09, cumulative = 7.57121e10 smoothSolver: Solving for epsilon, Initial residual = 0.0201266, Final residual = 4.78163e11, No Iterations 10 smoothSolver: Solving for k, Initial residual = 0.00307404, Final residual = 3.2731e11, No Iterations 10 What I should do? What to change? I really need a help from you! mad 

February 7, 2011, 04:40 

#14 
Senior Member

maddalena
Are you doing some internal loops?
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at 

February 7, 2011, 04:42 

#15 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 

February 7, 2011, 04:44 

#16 
Senior Member

could U please post more of your log?
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at 

February 7, 2011, 04:55 

#17 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 
Yes, sure. Here it is.
As you can see, something strange happens around time step 17 on Uz. On the contrary, pressure does what explained above. mad 

February 7, 2011, 04:58 

#18 
Senior Member

... and your fvScheme and fvSolution in the studio please)))
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at 

February 7, 2011, 05:00 

#19  
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 
Quote:
mad 

February 7, 2011, 05:15 

#20 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 19 

Tags 
convergence issues, pipe flow, simplefoam 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
TimeVaryingMappedFixedValue  irishdave  OpenFOAM Running, Solving & CFD  31  January 25, 2018 04:03 
time Step's turbFoam >>> exit  mgolbs  OpenFOAM PreProcessing  4  December 8, 2009 04:48 
Modeling in micron scale using icoFoam  m9819348  OpenFOAM Running, Solving & CFD  7  October 27, 2007 01:36 
Hydrostatic pressure in 2phase flow modeling (CFX4.2)  HB &DS  CFX  0  January 9, 2000 14:19 
unsteady calcs in FLUENT  Sanjay Padhiar  Main CFD Forum  1  March 31, 1999 13:32 