# What's happening to my solution for lower relaxation factor

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

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 2-D 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 (non-empty, non-wedge) directions (1 1 0)
4     Mesh (non-empty) directions (1 1 0)
5     All edges aligned with or perpendicular to non-empty directions.
6     Boundary openness (0 -1.9579082e-15 -9.8923928e-17) OK.
7     Max cell openness = 1.1952731e-16 OK.
8     Max aspect ratio = 2.4804051 OK.
9     Minimum face area = 2.1739201e-11. Maximum face area = 2.2349353e-05.
10 Face area magnitudes OK.
11     Min volume = 2.1739201e-11. Max volume = 2.205885e-10.  Total volume =
12 1.6021345e-05.  Cell volumes OK.
13     Mesh non-orthogonality Max: 33.582239 average: 4.8029227
14     Non-orthogonality 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```
Here is fvSchemes

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 {
21 }
22
24 {
25     default         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;
40
41 }
42
43 laplacianSchemes
44 {
45     default         Gauss linear corrected;
46 }
47
48 interpolationSchemes
49 {
50     default         linear;
51 }
52
54 {
55     default         corrected;
56 }
57
58 fluxRequired
59 {
60     default         no;
61     p               ;
62 }
63
64
65 // ************************************************************************* //```
Here is fvSolutions
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       1e-10;
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       1e-10;
39         relTol          0.01;
40     }
41 }
42
43 SIMPLE
44 {
45     nNonOrthogonalCorrectors 1;
46
47     residualControl
48     {
49         p               1e-10;
50         U               1e-10;
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 // ************************************************************************* //```
Attached Images
 Residuals1.png (22.2 KB, 61 views) solution1.jpg (25.5 KB, 56 views) Residuals2.png (26.5 KB, 56 views) solution2.jpg (27.6 KB, 52 views)

 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 {
21 }
22
24 {
25     default         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;
40
41 }
42
43 laplacianSchemes
44 {
45     default         Gauss linear orthogonal;
46 }
47
48 interpolationSchemes
49 {
50     default         linear;
51 }
52
54 {
55     default         corrected;
56 }
57
58 fluxRequired
59 {
60     default         no;
61     p               ;
62 }```
Then I made my geometry slightly more complex, the vertical channel in the top left has some obstacles in it. And when I tried to solve for this case using the fvScheme shown here I was getting a similar ugly solution. The residuals for that case are attached in this post.

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
Attached Images
 Residuals3.png (34.8 KB, 37 views)

 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.