CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

PIMPLE pressure residual behaviour

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

Like Tree2Likes
  • 1 Post By alexeym
  • 1 Post By fabian_roesler

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2015, 05:34
Default PIMPLE pressure residual behaviour
  #1
New Member
 
Join Date: Sep 2015
Posts: 8
Rep Power: 10
rulmismo is on a distinguished road
Hi,

I am doing some test cases in incompressible k-e transient simulation with PIMPLE solver.

The test case is a inlet-outlet 200mm radius pipes and 1m cubic space with 1m/s inlet and zero pressure outlet. See attached image.

The simulation converge with PG an PBiCG solvers and 50 inner interations, but the pressure residual is very high (0.2).

At first I had a short pipe length at the outlet and thought that could be caused due to a forced "developed" BC too near the whirl, but extended to 10D length and results are similar.

I donīt see why the pressure residual donīt decrease, I think I can be doing something basic wrong but canīt realise what.

Any comment is welcomed, thanks for reading.
Attached Images
File Type: jpg Clipboard05.jpg (47.4 KB, 470 views)
rulmismo is offline   Reply With Quote

Old   October 20, 2015, 09:07
Default
  #2
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Ok!
1) The problem seems to be stationary, so why do you use a time-dependent solver?
2) Can you post the last few iterations of your log file? Then, the fvSolution, fvSchemes and boundary settings would be usefull.
Cheers,
Philipp.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 20, 2015, 09:08
Default
  #3
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
And please run checkMesh and post the output.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 20, 2015, 16:44
Default Solver log, 3 last iterations
  #4
New Member
 
Join Date: Sep 2015
Posts: 8
Rep Power: 10
rulmismo is on a distinguished road
PIMPLE: iteration 48
DILUPBiCG: Solving for Ux, Initial residual = 3.66943999509e-15, Final residual = 3.66943999509e-15, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 3.64742134734e-15, Final residual = 3.64742134734e-15, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 1.63696948347e-15, Final residual = 1.63696948347e-15, No Iterations 0
DICPCG: Solving for p, Initial residual = 8.49930096518e-06, Final residual = 8.49930096518e-06, No Iterations 0
time step continuity errors : sum local = 2.65405500279e-09, global = -3.71852880882e-10, cumulative = 1.46329427866e-05
PIMPLE: iteration 49
DILUPBiCG: Solving for Ux, Initial residual = 1.76897567744e-15, Final residual = 1.76897567744e-15, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 1.74878398492e-15, Final residual = 1.74878398492e-15, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 8.10180631031e-16, Final residual = 8.10180631031e-16, No Iterations 0
DICPCG: Solving for p, Initial residual = 8.49930096373e-06, Final residual = 8.49930096373e-06, No Iterations 0
time step continuity errors : sum local = 2.65405500236e-09, global = -3.71852880864e-10, cumulative = 1.46325709337e-05
PIMPLE: iteration 50
DILUPBiCG: Solving for Ux, Initial residual = 1.26944090701e-15, Final residual = 1.26944090701e-15, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 1.25329761635e-15, Final residual = 1.25329761635e-15, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 6.14630453987e-16, Final residual = 6.14630453987e-16, No Iterations 0
DICPCG: Solving for p, Initial residual = 0.222409325308, Final residual = 0.00214878147056, No Iterations 40
time step continuity errors : sum local = 8.16664635027e-07, global = -2.69513888778e-10, cumulative = 1.46323014198e-05
DILUPBiCG: Solving for epsilon, Initial residual = 0.000308926995915, Final residual = 3.73817035895e-06, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.000837974833799, Final residual = 2.28092083849e-07, No Iterations 2
ExecutionTime = 1769.42 s ClockTime = 1806 s

End
rulmismo is offline   Reply With Quote

Old   October 20, 2015, 17:06
Default
  #5
New Member
 
Join Date: Sep 2015
Posts: 8
Rep Power: 10
rulmismo is on a distinguished road
The case is really stationary, but it is the first case I run as transient and wanted start with something simple to avoid run into errors (not much sucess as you can see..)
I use openfoam with the SimScale web frontend, so donīt have access to the config files, but I will put the input parameters of the frontend that are used to generate them.

Relax. P 0.3
Relax. U 0.7
Relax. k 0.7
Relax. e 0.7
Outer correctors 50
Correctors 1
Non orth correctors 0
Press. ref. cell 0
Press. ref. value 0
Correct the flux off
pressure solver PGC
pressure solver final PGC
all rest solvers PBiCG

Numerical SchemesTime differentiation scheme for default: euler

Gradient scheme for default: gauss linear

Gradient scheme for grad(p): gauss linear

Gradient scheme for grad(U): gauss linear

Divergence scheme for default: none

Divergence scheme for div(phi,U): gauss upwind

Laplacian scheme for default: none

Laplacian scheme for laplacian(rAUf,p): gauss linear corrected

Interpolation scheme for default: linear

Interpolation scheme for interpolate(U): linear

Surface-normal gradient scheme for default: corrected

Divergence scheme for div(phi,k): gauss upwind

Divergence scheme for div(phi,epsilon): gauss upwind

Divergence scheme for div((nuEff*dev(T(grad(U))))): gauss linear

Laplacian scheme for laplacian(nuEff,U): gauss linear corrected

Laplacian scheme for laplacian(DkEff,k): gauss linear corrected
Laplacian scheme for laplacian(DepsilonEff,epsilon): gauss linear corrected

Start time value [s] 0
End time value [s] 2
Time step length [s] 0.005

Adjustable timestep YES

Max Courant number 0.9
Max timestep 0.1


Meshing log:
Checking final mesh ...
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 0
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0..1) < 0.02 : 0
faces with volume ratio of neighbour cells < 0.01 : 0
faces with face twist < 0.01 : 0
faces on cells with determinant < 0.001 : 0
Finished meshing without any errors
Finished meshing in = 17.94 s.
End

Thanks!
Attached Images
File Type: jpg Clipboard01.jpg (53.8 KB, 121 views)
rulmismo is offline   Reply With Quote

Old   October 21, 2015, 01:27
Default
  #6
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
From the log file it looks like your linear solver settings are just not tight enough. You see, they all "converge" in zero iterations, which means, that the initial residual is lower than the tolerance setting of the solver and so the solver just doesn't start at all. Velocity residuals are already low enough, but pressure tolerance seems to be set to 1e-5. You need to reduce that value to some very low value, or even better set it to "0" to deactivate it. Better work with relative tolerance of something as relTol=0.1 - then the solver iterates each time to reduce the initial residual by a factor of 10.

If you have no clue what I am talking about please ask.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 22, 2015, 16:03
Default
  #7
New Member
 
Join Date: Sep 2015
Posts: 8
Rep Power: 10
rulmismo is on a distinguished road
I changed the pressure solvers to 0 abs. tolerance as suggested and 0.01 relative tolerance, from the log it seems it is working, but pressure residual behaves in the same way remaining stable but very high.
any clue that what is happening?

Last log iterations:
PIMPLE: iteration 46
DILUPBiCG: Solving for Ux, Initial residual = 3.48133791804e-12, Final residual = 3.48133791804e-12, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 3.49851495228e-12, Final residual = 3.49851495228e-12, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 9.25990915442e-13, Final residual = 9.25990915442e-13, No Iterations 0
GAMG: Solving for p, Initial residual = 1.3857838272e-08, Final residual = 1.27475120605e-10, No Iterations 10
time step continuity errors : sum local = 3.98048688524e-14, global = -3.64980793544e-17, cumulative = -1.31043940799e-06
PIMPLE: iteration 47
DILUPBiCG: Solving for Ux, Initial residual = 2.4256915443e-12, Final residual = 2.4256915443e-12, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 2.43791479004e-12, Final residual = 2.43791479004e-12, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 6.46925707426e-13, Final residual = 6.46925707426e-13, No Iterations 0
GAMG: Solving for p, Initial residual = 9.66587424372e-09, Final residual = 9.2695754586e-11, No Iterations 10
time step continuity errors : sum local = 2.89449026233e-14, global = -2.6438740825e-17, cumulative = -1.31043940802e-06
PIMPLE: iteration 48
DILUPBiCG: Solving for Ux, Initial residual = 1.68332763499e-12, Final residual = 1.68332763499e-12, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 1.69200223919e-12, Final residual = 1.69200223919e-12, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 4.48119295379e-13, Final residual = 4.48119295379e-13, No Iterations 0
GAMG: Solving for p, Initial residual = 6.74367452056e-09, Final residual = 5.98224072053e-11, No Iterations 11
time step continuity errors : sum local = 1.86801068143e-14, global = -1.77539045341e-17, cumulative = -1.31043940803e-06
PIMPLE: iteration 49
DILUPBiCG: Solving for Ux, Initial residual = 1.17285513915e-12, Final residual = 1.17285513915e-12, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 1.17901812847e-12, Final residual = 1.17901812847e-12, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 3.12713589318e-13, Final residual = 3.12713589318e-13, No Iterations 0
GAMG: Solving for p, Initial residual = 4.70462071566e-09, Final residual = 4.29905977241e-11, No Iterations 11
time step continuity errors : sum local = 1.34243811453e-14, global = -1.24364706896e-17, cumulative = -1.31043940805e-06
PIMPLE: iteration 50
DILUPBiCG: Solving for Ux, Initial residual = 1.19431805646e-12, Final residual = 1.19431805646e-12, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 1.2004567811e-12, Final residual = 1.2004567811e-12, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 3.1916640893e-13, Final residual = 3.1916640893e-13, No Iterations 0
DICPCG: Solving for p, Initial residual = 0.222418912957, Final residual = 0.00215247161149, No Iterations 40
time step continuity errors : sum local = 8.18033215972e-07, global = 1.0803896483e-10, cumulative = -1.31033136908e-06
DILUPBiCG: Solving for epsilon, Initial residual = 0.000308933503258, Final residual = 3.71821064209e-06, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.000838036948419, Final residual = 2.28589230167e-07, No Iterations 2
ExecutionTime = 2467.63 s ClockTime = 2503 s

End
Attached Images
File Type: jpg Clipboard01.jpg (32.4 KB, 90 views)
rulmismo is offline   Reply With Quote

Old   October 23, 2015, 02:54
Default
  #8
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
I actually don't see any major mistake. Maybe you should lower the time step. PIMPLE isn't really made for steady state problems, but should normally converge anyway into the steady state solution. And you can use less "outer corrections", maybe 5 or so.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 23, 2015, 03:42
Default My $0.02
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Unfortunately I was not able to find your fvSolution file in the thread (except rather vague "pressure solver PGC pressure solver final PGC", which contradicts with your log output). But...

1. Your script for plotting residuals is something SPECIAL (well, I guess it is for SIMPLE output, yet you are trying to use it with PIMPLE). If you compare your plot with log file, well, they are quite different.

2. Linear solvers in general doing nothing:

Code:
PIMPLE: iteration 46
DILUPBiCG: Solving for Ux, Initial residual = 3.48133791804e-12, Final residual = 3.48133791804e-12, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 3.49851495228e-12, Final residual = 3.49851495228e-12, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 9.25990915442e-13, Final residual = 9.25990915442e-13, No Iterations 0
GAMG: Solving for p, Initial residual = 1.3857838272e-08, Final residual = 1.27475120605e-10, No Iterations 10
time step continuity errors : sum local = 3.98048688524e-14, global = -3.64980793544e-17, cumulative = -1.31043940799e-06
As you can see, number of iterations are 0 everywhere, except pressure. Why you have decided to keep number of inner iterations equal to 1? Your mesh does not have HIGHLY non-orthogonal faces, yet is it completely orthogonal?

3. And finally your 50th (final) iteration is rather funny:

Code:
PIMPLE: iteration 50
...
DICPCG: Solving for p, Initial residual = 0.222418912957, Final residual = 0.00215247161149, No Iterations 40
...
Pressure residual jumps from 4.70462071566e-09 to 0.222418912957. It is strange. And since you are hiding your fvSolution it is difficult to say what is happening.
alexeym is offline   Reply With Quote

Old   October 23, 2015, 03:49
Default
  #10
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
It's the last iteration of PIMPLE that runs without under relaxation. I always thought the residuals jump to a higher value because of that. I always see that in my calculations with PIMPLE.
Alexey, can you help to understand this?

Here is an older post of me with the same problem:
http://www.cfd-online.com/Forums/ope...tml#post512566
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 23, 2015, 04:09
Default
  #11
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Yes, it runs without relaxation. I could agree with residual jump, here is an example:

Code:
Time = 403.570434783

Courant Number mean: 0.0254108903838 max: 0.399601783095
deltaT = 0.0017391304348
PIMPLE: iteration 1
...
smoothSolver:  Solving for p_rgh, Initial residual = 5.27025050486e-07, Final residual = 5.27025050486e-07, No Iterations 0
...
PIMPLE: iteration 2
...
smoothSolver:  Solving for p_rgh, Initial residual = 1.2707579238e-06, Final residual = 3.96394665144e-07, No Iterations 2
...
smoothSolver:  Solving for p_rgh, Initial residual = 4.75110200449e-07, Final residual = 4.75110200449e-07, No Iterations 0
...
PIMPLE: converged in 2 iterations
But in general in my simulations this jump on final iteration is 2-3 times the previous iteration, not 10e7 like in the rulmismo's log-file.

In fact the case is mysterious and description lacks lots of information. We can try to guess, we can suggest to change linear solvers, number of outer, inner, and non-orthogonal iterations. YET the problem could be just in rather meaningless boundary conditions.
alexeym is offline   Reply With Quote

Old   October 23, 2015, 04:15
Default
  #12
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
The problem is he uses some fancy tool to feed openFoam instead of the linux files. That's why we can't see all the files.
I am interested in this, too, since I had the same problem in the link I posted above.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 23, 2015, 08:46
Default
  #13
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well, it seems relaxation has the strongest influence on this pressure residual jump. There's output of simple von Karman vortex street simulation (Re=100). Here's PIMPLE dictionary:

Code:
PIMPLE
{
    ...
    nCorrectors       2;
    nOuterCorrectors  200;
    nNonOrthogonalCorrectors 1;

    residualControl
    {
        "(U|p)"
        {
            tolerance 1e-4;
            relTol 0;
        }
    }
}
1. Momentum predictor is on, relaxation factors: field p = 0.3, equation U = 0.7.

Code:
Courant Number mean: 2.50232221546 max: 9.96200968481
deltaT = 0.120358962239
Time = 2.09713302882
...
PIMPLE: iteration 27
DILUPBiCG:  Solving for Ux, Initial residual = 4.15327775911e-05, Final residual = 1.23514504456e-09, No Iterations 4
DILUPBiCG:  Solving for Uy, Initial residual = 6.09455422471e-05, Final residual = 8.18928362675e-09, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.000371321428441, Final residual = 3.42843494044e-08, No Iterations 21
GAMG:  Solving for p, Initial residual = 0.00017741155415, Final residual = 1.23005016557e-08, No Iterations 14
time step continuity errors : sum local = 4.62132670435e-12, global = -6.16715518034e-13, cumulative = -1.92439390203e-11
GAMG:  Solving for p, Initial residual = 0.000225325680736, Final residual = 1.90339707e-08, No Iterations 21
GAMG:  Solving for p, Initial residual = 9.76761067809e-05, Final residual = 6.79675647185e-09, No Iterations 14
time step continuity errors : sum local = 2.55627318983e-12, global = -3.32714190268e-13, cumulative = -1.95766532106e-11
PIMPLE: iteration 28
DILUPBiCG:  Solving for Ux, Initial residual = 0.000181363144351, Final residual = 7.60441245621e-09, No Iterations 22
DILUPBiCG:  Solving for Uy, Initial residual = 0.000258495496672, Final residual = 8.54422172066e-09, No Iterations 16
GAMG:  Solving for p, Initial residual = 0.0545226923199, Final residual = 3.37862610543e-06, No Iterations 18
GAMG:  Solving for p, Initial residual = 0.0066508532655, Final residual = 5.55033630196e-07, No Iterations 13
time step continuity errors : sum local = 2.38614106372e-10, global = -4.54598804251e-13, cumulative = -2.00312520148e-11
GAMG:  Solving for p, Initial residual = 0.016294518945, Final residual = 9.24578676737e-07, No Iterations 22
DICPCG:  Solving for p, Initial residual = 0.00450585596504, Final residual = 9.57540140063e-09, No Iterations 385
time step continuity errors : sum local = 4.6638163735e-12, global = 1.0568861233e-14, cumulative = -2.00206831536e-11
PIMPLE: converged in 28 iterations
2. Momentum predictor is off, relaxation factors: field p = 0.3, equation U = 0.7.

Code:
Courant Number mean: 2.4947035938 max: 9.96027202621
deltaT = 0.120062962341
Time = 2.09487802595
...
PIMPLE: iteration 44
GAMG:  Solving for p, Initial residual = 0.000238872288081, Final residual = 2.32647216666e-08, No Iterations 21
GAMG:  Solving for p, Initial residual = 0.000118346041252, Final residual = 8.49113866312e-09, No Iterations 14
time step continuity errors : sum local = 3.14221423572e-12, global = -4.04831295648e-13, cumulative = 1.42930177289e-09
GAMG:  Solving for p, Initial residual = 0.000194168070676, Final residual = 1.90414144434e-08, No Iterations 21
GAMG:  Solving for p, Initial residual = 9.76214328148e-05, Final residual = 6.79906293134e-09, No Iterations 14
time step continuity errors : sum local = 2.51459825656e-12, global = -3.18921759336e-13, cumulative = 1.42898285113e-09
PIMPLE: iteration 45
GAMG:  Solving for p, Initial residual = 0.0480809612314, Final residual = 3.73088388333e-06, No Iterations 10
GAMG:  Solving for p, Initial residual = 0.000716015292718, Final residual = 4.39791075468e-08, No Iterations 16
time step continuity errors : sum local = 2.16396947525e-11, global = 1.24748574368e-12, cumulative = 1.43023033687e-09
GAMG:  Solving for p, Initial residual = 0.00688525707745, Final residual = 5.66825871087e-07, No Iterations 13
DICPCG:  Solving for p, Initial residual = 0.000271098422015, Final residual = 9.20746002634e-09, No Iterations 323
time step continuity errors : sum local = 4.56109711273e-12, global = 2.39087820596e-14, cumulative = 1.43025424565e-09
PIMPLE: converged in 45 iterations
3. Momentum predictor is off, relaxation factors: field p = 1.0, equation U = 1.0.

Code:
Courant Number mean: 2.48139995258 max: 9.94371386088
deltaT = 0.119771881886
Time = 2.09124724549
...
PIMPLE: iteration 17
GAMG:  Solving for p, Initial residual = 0.000214021152968, Final residual = 1.75470894623e-08, No Iterations 20
GAMG:  Solving for p, Initial residual = 0.000106143523768, Final residual = 8.48570411037e-09, No Iterations 14
time step continuity errors : sum local = 4.29085749707e-12, global = -5.52875805525e-14, cumulative = 2.0568156925e-10
GAMG:  Solving for p, Initial residual = 0.000179002131243, Final residual = 1.61128110673e-08, No Iterations 20
GAMG:  Solving for p, Initial residual = 9.48553480382e-05, Final residual = 6.35308637381e-09, No Iterations 14
time step continuity errors : sum local = 3.20037924877e-12, global = 5.77498637594e-14, cumulative = 2.05739319114e-10
PIMPLE: iteration 18
GAMG:  Solving for p, Initial residual = 0.000223613422704, Final residual = 1.65083115521e-08, No Iterations 20
GAMG:  Solving for p, Initial residual = 9.53518776637e-05, Final residual = 7.61412355603e-09, No Iterations 14
time step continuity errors : sum local = 3.82654997504e-12, global = -4.14200408574e-14, cumulative = 2.05697899073e-10
GAMG:  Solving for p, Initial residual = 0.000169727491343, Final residual = 1.49042004301e-08, No Iterations 20
DICPCG:  Solving for p, Initial residual = 8.52713742618e-05, Final residual = 9.20630885865e-09, No Iterations 269
time step continuity errors : sum local = 4.61128666844e-12, global = -2.58903829271e-13, cumulative = 2.05438995244e-10
PIMPLE: converged in 18 iterations
In the first and second cases residual jump is around 500, while in the last case it is 2.
SHUBHAM9595 likes this.
alexeym is offline   Reply With Quote

Old   October 24, 2015, 14:35
Default
  #14
New Member
 
Join Date: Sep 2015
Posts: 8
Rep Power: 10
rulmismo is on a distinguished road
I find how to get the openfoam config files. I tried some changes in number of correctors as suggested but still same result, pressure residual stabilizes to 0.28??

BC are (see image):
inlet velocity 1m/s (short tube inlet face)
oulet pressure = 0 (long tube outlet face)
all other walls (no slip with wall functions)

fvSolution
Quote:
solvers {
UFinal {
relTol 0.0;
preconditioner DILU;
tolerance 1e-05;
solver PBiCG;
}
omegaFinal {
relTol 0.01;
preconditioner DILU;
tolerance 1e-05;
solver PBiCG;
}
kFinal {
relTol 0.01;
preconditioner DILU;
tolerance 1e-05;
solver PBiCG;
}
k {
relTol 0.01;
preconditioner DILU;
tolerance 1e-05;
solver PBiCG;
}
pFinal {
relTol 0.05;
preconditioner DIC;
tolerance 0.0;
solver PCG;
}
p {
relTol 0.05;
preconditioner DIC;
tolerance 0.0;
solver PCG;
}
U {
relTol 0.01;
preconditioner DILU;
tolerance 1e-05;
solver PBiCG;
}
omega {
relTol 0.01;
preconditioner DILU;
tolerance 1e-05;
solver PBiCG;
}
}
relaxationFactors {
fields {
p 0.3;
}
equations {
omega 0.7;
k 0.7;
U 0.7;
}
}
PIMPLE {
correctPhi off;
nNonOrthogonalCorrectors 1;
pRefCell 0;
nOuterCorrectors 5;
nCorrectors 5;
pRefValue 0.0;
}
fvSchemes
Quote:
ddtSchemes {
default Euler;
}
gradSchemes {
default Gauss linear;
grad(U) Gauss linear;
grad(p) Gauss linear;
}
divSchemes {
default none;
div(phi,U) Gauss upwind;
div(phi,omega) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div(phi,k) Gauss upwind;
}
laplacianSchemes {
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian(DomegaEff,omega) Gauss linear corrected;
laplacian(rAUf,p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
}
interpolationSchemes {
default linear;
interpolate(U) linear;
}
snGradSchemes {
default corrected;
}
fluxRequired {
default no;
p ;
}
Attached Images
File Type: jpg Clipboard01.jpg (33.4 KB, 47 views)
rulmismo is offline   Reply With Quote

Old   October 24, 2015, 16:14
Default
  #15
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Well, this

Code:
pFinal {
relTol 0.05;
preconditioner DIC;
tolerance 0.0;
solver PCG;
}
is rather unusual. In general for *Final fields relTol is set to 0 and tolerance to certain low value (let's say 1e-6 at least).

Last edited by alexeym; October 25, 2015 at 02:35.
alexeym is offline   Reply With Quote

Old   October 26, 2015, 05:09
Default
  #16
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
You are just plotting the first iteration residual of your PIMPLE simulation.
When using high Courant Numbers and many PIMPLE iterations, the first residual will be high. However, the first residual is not important.
The residual of your last PIMPLE iteration is the one that has to be small. As far as I can see this is fine for all your logs.
If you want to avoid PIMPLE iterations with zero inner iterations, just specify a residual control for all fields and the solver will stop the PIMPLE loop if converged.
With this procedure it is possible to run simulations with Co = 200 with only 10 to 15 PIMPLE iterations.
lmayz likes this.
fabian_roesler is offline   Reply With Quote

Old   October 26, 2015, 11:31
Default
  #17
New Member
 
Join Date: Sep 2015
Posts: 8
Rep Power: 10
rulmismo is on a distinguished road
Thanks Fabian,

If I undersoot correctly you think that it is being plot the first residual per inner iteration, that happens to be stabilized about 0.2 due to any reason.

It seems more sensible to see the final residual after the iterations
, doesnīt it?
why should I be interested in the first iteration residual?
might be a residual plot bug of the tool I use...
rulmismo is offline   Reply With Quote

Old   October 27, 2015, 02:08
Default
  #18
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
I'd not say that it is a bug. The residuals show the variation of the conserved quantity. By using more PIMPLE iterations, you can increase the Courant number what leads to a larger time step. The larger time step results in a more unsteady fields and thus gives you larger (in your eyes inaccurate) residual/solution process.
I'd say your convergence is good. As I said before, try to use residual control.

Code:
PIMPLE
{
    momentumPredictor yes;
    transonic       no;
    nOuterCorrectors 50;
    nCorrectors     1;
    nNonOrthogonalCorrectors 0;
    rhoMin          rhoMin [ 1 -3 0 0 0 ] 0.1;
    rhoMax          rhoMax [ 1 -3 0 0 0 ] 2.0;

    residualControl
    {
        "(U|k|epsilon|omega)"
        {
            relTol          0;
            tolerance       0.0001;
        }
        p_rgh
        {
            relTol          0;
            tolerance       0.001;
        }
    }


    turbOnFinalIterOnly on;
}
fabian_roesler is offline   Reply With Quote

Old   September 8, 2020, 06:05
Default
  #19
Senior Member
 
Join Date: Jun 2020
Posts: 100
Rep Power: 5
atul1018 is on a distinguished road
Hello All,


I am simulating particle-laden backward facing step using DPMFoam. which is based on pimple solver for fluid phase. the case is unsteady,incompresiible and turbulent (i am using komegaSST RANS model). I plotted initial residuals to check for the convergence. From the attached residual plot you can see that initial residuals for U.air(x), U.air(y), k.air, omega.air falls below 10^-3. but the p has relatively higher value of rintitial residuals (`0.05). Is my solution converged? If not, how can I achieve the convergence?


my fvSolutions directory reads:


Code:
solvers
{
    "(p|kinematicCloud:theta)"

    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0.01;
    }
    "(p|kinematicCloud:theta)Final"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0;
    }
    "(U.air|k.air|omega.air)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.1;
    }
    "(U.air|k.air|omega.air)Final"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0;
    }
}

PIMPLE
{
    nOuterCorrectors 1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    pRefCell        1001;
    pRefValue       0;
}

The output of last time step reads:



Code:
PIMPLE: iteration 1
DILUPBiCG:  Solving for U.airx, Initial residual = 1.33954e-05, Final residual = 1.51627e-07, No Iterations 1
DILUPBiCG:  Solving for U.airy, Initial residual = 0.000181577, Final residual = 1.77745e-06, No Iterations 1
DICPCG:  Solving for p, Initial residual = 0.073047, Final residual = 0.000679366, No Iterations 26
time step continuity errors : sum local = 2.71727e-08, global = -2.26846e-10, cumulative = -3.70693e-07
DICPCG:  Solving for p, Initial residual = 0.00706675, Final residual = 9.44924e-07, No Iterations 241
time step continuity errors : sum local = 3.78099e-11, global = 1.41854e-13, cumulative = -3.70693e-07
DILUPBiCG:  Solving for omega.air, Initial residual = 9.47518e-06, Final residual = 9.47518e-06, No Iterations 0
DILUPBiCG:  Solving for k.air, Initial residual = 1.17881e-05, Final residual = 2.07731e-07, No Iterations 1
ExecutionTime = 1661.97 s  ClockTime = 1662 s

I will be thankful, if someone can guide me to get better my convergence of solution for p.


Kind Regards
Atul
Attached Images
File Type: jpg initial_residual_plot.JPG (44.7 KB, 55 views)
atul1018 is offline   Reply With Quote

Reply

Tags
pimple transient

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
time step continuity problem in VAWT simulation lpz_michele OpenFOAM Running, Solving & CFD 5 February 22, 2018 19:50
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
Problems with simulating TurbFOAM barath.ezhilan OpenFOAM 13 July 16, 2009 05:55
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16


All times are GMT -4. The time now is 01:04.