
[Sponsors] 
What's happening to my solution for lower relaxation factor 

LinkBack  Thread Tools  Search this Thread  Display Modes 
October 19, 2015, 17:03 
What's happening to my solution for lower relaxation factor

#1 
New Member
Join Date: Aug 2014
Posts: 8
Rep Power: 9 
Hi everyone,
I am working on a 2D case for flow through a straight pipe with an intersecting channel (see attached figs). The channel is a few hundred microns width and Re~1100. Fluid is incompressible. I am solving for the steady state using simpleFoam with turbulence turned off. I am having an issue where if I set the relaxation factor for U to 0.7 the solution seems to converge and residuals are ~10^10. However, if I lower the relaxation factor of U to 0.3 (everything else the same) the residuals drop initially, then rise and remain at a high value. And the (unconverged) solution looks very bad. Residuals for U relaxation factor of 0.7 are shown in attachment Residuals1.png (note the jump around iteration 50000, is because I lowered the tolerance and restarted at iteration 40000, the log files were combined) Screenshot of converged solution is in attachment solution1.png Residuals for U relaxation factor of 0.3 are shown in attachment Residuals2.png Screenshot of converged solution for in attachment solution2.png I'm just trying to figure out what is happening here. I thought that lower relaxation factor should just take longer to find converged solution. But in this case it almost looks like simplefoam is finidng a mode of an unsteady solution. If I use the last iteration of solution2 for the initial condition and use icoFoam all the "oscillations" go away and the flow seems to be steady. Suggestion for fvSchemes/fvSolutions settings are also much appreciated. Thank you! casesam Here is part of my checkMesh Code:
1 Checking geometry... 2 Overall domain bounding box (0 0.0005 0) (0.02 0.0015 1) 3 Mesh (nonempty, nonwedge) directions (1 1 0) 4 Mesh (nonempty) directions (1 1 0) 5 All edges aligned with or perpendicular to nonempty directions. 6 Boundary openness (0 1.9579082e15 9.8923928e17) OK. 7 Max cell openness = 1.1952731e16 OK. 8 Max aspect ratio = 2.4804051 OK. 9 Minimum face area = 2.1739201e11. Maximum face area = 2.2349353e05. 10 Face area magnitudes OK. 11 Min volume = 2.1739201e11. Max volume = 2.205885e10. Total volume = 12 1.6021345e05. Cell volumes OK. 13 Mesh nonorthogonality Max: 33.582239 average: 4.8029227 14 Nonorthogonality check OK. 15 Face pyramids OK. 16 Max skewness = 0.51104277 OK. 17 Coupled point location match (average 0) OK. 18 19 Mesh OK. 20 21 End 22 Code:
1 /** C++ **\ 2  =========   3  \\ / F ield  OpenFOAM: The Open Source CFD Toolbox  4  \\ / O peration  Version: 2.3.0  5  \\ / A nd  Web: www.OpenFOAM.org  6  \\/ M anipulation   7 \**/ 8 FoamFile 9 { 10 version 2.0; 11 format ascii; 12 class dictionary; 13 location "system"; 14 object fvSchemes; 15 } 16 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 17 18 ddtSchemes 19 { 20 default steadyState; 21 } 22 23 gradSchemes 24 { 25 default Gauss linear; 26 grad(p) Gauss linear; 27 grad(U) Gauss linear; 28 } 29 30 divSchemes 31 { 32 default none; 33 div(phi,U) bounded Gauss linearUpwindV grad(U); 34 div(phi,k) bounded Gauss upwind; 35 div(phi,epsilon) bounded Gauss upwind; 36 div(phi,R) bounded Gauss upwind; 37 div(R) Gauss linear; 38 div(phi,nuTilda) bounded Gauss upwind; 39 div((nuEff*dev(T(grad(U))))) Gauss linear; 40 41 } 42 43 laplacianSchemes 44 { 45 default Gauss linear corrected; 46 } 47 48 interpolationSchemes 49 { 50 default linear; 51 } 52 53 snGradSchemes 54 { 55 default corrected; 56 } 57 58 fluxRequired 59 { 60 default no; 61 p ; 62 } 63 64 65 // ************************************************************************* // Code:
/** C++ **\ 2  =========   3  \\ / F ield  OpenFOAM: The Open Source CFD Toolbox  4  \\ / O peration  Version: 2.3.0  5  \\ / A nd  Web: www.OpenFOAM.org  6  \\/ M anipulation   7 \**/ 8 FoamFile 9 { 10 version 2.0; 11 format ascii; 12 class dictionary; 13 location "system"; 14 object fvSolution; 15 } 16 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 17 18 solvers 19 { 20 p 21 { 22 solver GAMG; 23 tolerance 1e10; 24 relTol 0.01; 25 smoother GaussSeidel; 26 nPreSweeps 0; 27 nPostSweeps 2; 28 cacheAgglomeration on; 29 agglomerator faceAreaPair; 30 nCellsInCoarsestLevel 100; 31 mergeLevels 1; 32 } 33 34 U 35 { 36 solver smoothSolver; 37 smoother symGaussSeidel; 38 tolerance 1e10; 39 relTol 0.01; 40 } 41 } 42 43 SIMPLE 44 { 45 nNonOrthogonalCorrectors 1; 46 47 residualControl 48 { 49 p 1e10; 50 U 1e10; 51 } 52 } 53 54 relaxationFactors 55 { 56 fields 57 { 58 p 0.3; 59 } 60 equations 61 { 62 U 0.7; 63 k 0.7; 64 epsilon 0.7; 65 R 0.7; 66 nuTilda 0.7; 67 } 68 } 69 70 // ************************************************************************* // 

October 21, 2015, 02:41 

#2 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 24 
What a pain. I have never seen that. This is ugly. But one question: Why did you reduce the relaxation if the solution converges?
__________________
The skeleton ran out of shampoo in the shower. 

October 21, 2015, 12:46 

#3 
New Member
Join Date: Aug 2014
Posts: 8
Rep Power: 9 
Thanks for the response Rodriguez,
So I was initially using the following fvScheme settings: (note the difference in divSchemes and laplacian schemes) and I was getting convergence, and nice looking flow. Code:
ddtSchemes 19 { 20 default steadyState; 21 } 22 23 gradSchemes 24 { 25 default Gauss linear; 26 grad(p) Gauss linear; 27 grad(U) Gauss linear; 28 } 29 30 divSchemes 31 { 32 default none; 33 div(phi,U) bounded Gauss upwind; 34 div(phi,k) bounded Gauss upwind; 35 div(phi,epsilon) bounded Gauss upwind; 36 div(phi,R) bounded Gauss upwind; 37 div(R) Gauss linear; 38 div(phi,nuTilda) bounded Gauss upwind; 39 div((nuEff*dev(T(grad(U))))) Gauss linear; 40 41 } 42 43 laplacianSchemes 44 { 45 default Gauss linear orthogonal; 46 } 47 48 interpolationSchemes 49 { 50 default linear; 51 } 52 53 snGradSchemes 54 { 55 default corrected; 56 } 57 58 fluxRequired 59 { 60 default no; 61 p ; 62 } So I tried changing the schemes and solutions to what is in my original post, just trying out different things. That is when I noticed this weird effect with the relaxation factors. I got convergence in the more complex geometry using the schemes in original post and U relaxation factor of 0.7, but not with 0.3. I then went back to the simple geometry, changed the schemes (to those shown in original post) and found this same weird effect happening there. If you have any ideas on different scheme/solution settings I'm open to them. I'm still pretty new to all this. Thanks! Casesam 

October 22, 2015, 02:25 

#4 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 24 
Your settings look good. I don't see the problem.
__________________
The skeleton ran out of shampoo in the shower. 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Suitable range of relaxation factor for VOF boiling cases?  manupp  STARCCM+  1  February 4, 2020 07:07 
effect of under relaxation factor on the fuel flow  Ali hassan  FLUENT  0  April 11, 2015 05:10 
under relaxation factor  ehsanakrami  FLUENT  6  August 23, 2012 06:07 
different answers from different UNDER RELAXATION FACTOR  misagh  FLUENT  3  August 19, 2012 09:34 
Relaxation factor  Moon  Siemens  1  June 13, 2003 12:13 