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

How to use PIMPLE properly?

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

Like Tree2Likes
  • 1 Post By floquation
  • 1 Post By piu58

Reply
 
LinkBack Thread Tools Display Modes
Old   February 14, 2017, 10:16
Default How to use PIMPLE properly?
  #1
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 216
Rep Power: 12
floquation will become famous soon enough
Background:
I am simulating a rising bubble in OF41 with the interFoam solver.
To do so, I am currently using a uniform mesh with cubic cells (aspect ratio 1).
There are a total of 90x90x180 cells, which corresponds to 15 cells / bubble diameter. (This is relatively coarse, but should be fine enough to test the below.)

This case converges pretty well using only one outer (SIMPLE) iteration and just three inner (PISO) iterations with maxCo=0.5.
I decided to check whether using the PIMPLE algorithm - following Tobi's guide - might speed up my simulation.

Problem (I mean, challenge):
The PIMPLE algorithm slows down my simulation considerably, which is because the solution does not (barely) improve with successive outer iterations.
maxCo is only 2. (Which means that each timestep must at most take a factor four longer to be faster than the maxCo=0.5 simulation.)

Log file (snippet):
Code:
Courant Number mean: 0.000976416 max: 1.44982
Interface Courant Number mean: 0.000135741 max: 1.05712
deltaT = 7.14286e-05
Time = 0.0035

PIMPLE: iteration 1
smoothSolver:  Solving for alpha.water, Initial residual = 0.00797562, Final residual = 6.12225e-08, No Iterations 3
Phase-1 volume fraction = 0.998807  Min(alpha.water) = 2.79909e-07  Max(alpha.water) = 1.0002
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -0.000994  Max(alpha.water) = 1.0002
GAMG:  Solving for p_rgh, Initial residual = 0.135337, Final residual = 0.000314987, No Iterations 2
time step continuity errors : sum local = 5.46316e-07, global = 1.47295e-10, cumulative = -2.1714e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0940134, Final residual = 0.000266503, No Iterations 2
time step continuity errors : sum local = 4.6467e-07, global = -6.43504e-10, cumulative = -2.17783e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0941178, Final residual = 0.00025847, No Iterations 2
time step continuity errors : sum local = 4.50745e-07, global = -8.69603e-10, cumulative = -2.18653e-07
PIMPLE: iteration 2
smoothSolver:  Solving for alpha.water, Initial residual = 0.00645469, Final residual = 1.00334e-09, No Iterations 3
Phase-1 volume fraction = 0.998807  Min(alpha.water) = 2.06368e-07  Max(alpha.water) = 1.00028
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -0.00122852  Max(alpha.water) = 1.00028
GAMG:  Solving for p_rgh, Initial residual = 0.086505, Final residual = 0.000338267, No Iterations 2
time step continuity errors : sum local = 7.40111e-07, global = -3.00883e-10, cumulative = -2.18954e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0606414, Final residual = 0.000265495, No Iterations 2
time step continuity errors : sum local = 5.8013e-07, global = -7.78486e-10, cumulative = -2.19732e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0606601, Final residual = 0.000258879, No Iterations 2
time step continuity errors : sum local = 5.65676e-07, global = -8.99989e-10, cumulative = -2.20632e-07
PIMPLE: iteration 3
smoothSolver:  Solving for alpha.water, Initial residual = 0.00582153, Final residual = 2.94448e-09, No Iterations 3
Phase-1 volume fraction = 0.998807  Min(alpha.water) = 2.78524e-07  Max(alpha.water) = 1.00023
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -0.00139389  Max(alpha.water) = 1.00023
GAMG:  Solving for p_rgh, Initial residual = 0.080493, Final residual = 0.000340901, No Iterations 2
time step continuity errors : sum local = 6.77737e-07, global = -1.80287e-10, cumulative = -2.20813e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0560016, Final residual = 0.000246158, No Iterations 2
time step continuity errors : sum local = 4.90191e-07, global = -1.04078e-09, cumulative = -2.21853e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0560882, Final residual = 0.000241618, No Iterations 2
time step continuity errors : sum local = 4.81123e-07, global = -1.22133e-09, cumulative = -2.23075e-07
PIMPLE: iteration 4
smoothSolver:  Solving for alpha.water, Initial residual = 0.00559932, Final residual = 9.83465e-10, No Iterations 3
Phase-1 volume fraction = 0.998807  Min(alpha.water) = 2.60849e-07  Max(alpha.water) = 1.0002
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -0.000778589  Max(alpha.water) = 1.0002
GAMG:  Solving for p_rgh, Initial residual = 0.0612285, Final residual = 0.000199755, No Iterations 2
time step continuity errors : sum local = 4.25689e-07, global = -2.24356e-09, cumulative = -2.25318e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0427183, Final residual = 0.000117493, No Iterations 2
time step continuity errors : sum local = 2.50063e-07, global = -4.87422e-09, cumulative = -2.30193e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0427806, Final residual = 0.000118101, No Iterations 2
time step continuity errors : sum local = 2.51322e-07, global = -4.84618e-09, cumulative = -2.35039e-07

(...)

PIMPLE: iteration 198
smoothSolver:  Solving for alpha.water, Initial residual = 0.00473282, Final residual = 8.68777e-10, No Iterations 3
Phase-1 volume fraction = 0.998807  Min(alpha.water) = 1.54224e-07  Max(alpha.water) = 1.0002
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -0.000778275  Max(alpha.water) = 1.0002
GAMG:  Solving for p_rgh, Initial residual = 0.0242179, Final residual = 1.44059e-05, No Iterations 2
time step continuity errors : sum local = 3.02184e-08, global = -2.22393e-10, cumulative = -1.3677e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0168498, Final residual = 1.09407e-05, No Iterations 2
time step continuity errors : sum local = 2.29456e-08, global = -2.17156e-10, cumulative = -1.36987e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0168702, Final residual = 1.08204e-05, No Iterations 2
time step continuity errors : sum local = 2.26937e-08, global = -2.14002e-10, cumulative = -1.37201e-07
PIMPLE: iteration 199
smoothSolver:  Solving for alpha.water, Initial residual = 0.00473242, Final residual = 1.01542e-09, No Iterations 3
Phase-1 volume fraction = 0.998807  Min(alpha.water) = 1.50747e-07  Max(alpha.water) = 1.0002
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -0.00100276  Max(alpha.water) = 1.0002
GAMG:  Solving for p_rgh, Initial residual = 0.0231552, Final residual = 1.27849e-05, No Iterations 2
time step continuity errors : sum local = 2.60952e-08, global = 7.02594e-11, cumulative = -1.37131e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0160877, Final residual = 9.21079e-06, No Iterations 2
time step continuity errors : sum local = 1.8809e-08, global = 7.69685e-11, cumulative = -1.37054e-07
GAMG:  Solving for p_rgh, Initial residual = 0.0161063, Final residual = 9.18537e-06, No Iterations 2
time step continuity errors : sum local = 1.87572e-08, global = 7.68037e-11, cumulative = -1.36977e-07
PIMPLE: iteration 200
smoothSolver:  Solving for alpha.water, Initial residual = 0.00473295, Final residual = 8.68842e-10, No Iterations 3
Phase-1 volume fraction = 0.998807  Min(alpha.water) = 1.54225e-07  Max(alpha.water) = 1.0002
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -0.0007774  Max(alpha.water) = 1.0002
GAMG:  Solving for p_rgh, Initial residual = 0.0384742, Final residual = 4.37332e-05, No Iterations 2
time step continuity errors : sum local = 3.03523e-07, global = 2.45412e-10, cumulative = -1.36732e-07
GAMG:  Solving for p_rgh, Initial residual = 0.00193055, Final residual = 7.99627e-06, No Iterations 2
time step continuity errors : sum local = 5.51445e-08, global = 6.02003e-10, cumulative = -1.3613e-07
GAMG:  Solving for p_rgh, Initial residual = 0.000402165, Final residual = 6.91129e-09, No Iterations 19
time step continuity errors : sum local = 4.76783e-11, global = 1.11926e-11, cumulative = -1.36119e-07
PIMPLE: not converged within 200 iterations
Notable is that (1) alpha is out of its allowed bounds [0,1], which did not happen without PIMPLE,
and (2) the solution does not (or barely) improve with successive outer iterations. Then, remarkably, in the very last iteration convergence is great! This is presumably because under-relaxation is disabled. This is something I have seen several times before, but I have never understood.

The relevant files are listed below.
I should add that changing relTol for p_rgh from 1e-02 to 1e-03 yields a slightly better result, which still is not close to converging after 200 outer iterations.
Reducing the under-relaxation factors from 0.3 to 0.1 is yet much better, allowing PIMPLE to converge in 130 iterations, which ... is still an awful lot of iterations. Furthermore, over time it increased to 180 iterations.
Further reducing the under-relaxation factor from 0.1 to 0.01 yields a better residual (~5e-3) after 200 iterations, but PIMPLE still did not converge.

Question:
But then, how can PIMPLE ever yield a better(=faster) result than having only one outer iteration...?
In other words, what am I doing incorrectly?

Relevant Files:
controlDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.0                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     interFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.070;

deltaT          1e-6;

writeControl    adjustableRunTime;

writeInterval   5e-4;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           2;
maxAlphaCo      2;
maxDeltaT       1;

libs
(
        "libsimpleFunctionObjects.so"

        "libsimpleSwakFunctionObjects.so"
        "libswakLagrangianParser.so"
        "libswakFunctionObjects.so"
        "libsimpleLagrangianFunctionObjects.so"
);

functions
{
    #include "bubPositionDict" //Monitors the position of the bubble over time
}

// ************************************************************************* //
fvSolution:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.0                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      2;
        nAlphaSubCycles 1;
        cAlpha          1;

        MULESCorr       yes;
        nLimiterIter    2;

        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-07;
        relTol          0;
    }

    p_rgh
    {
        solver          GAMG;
        tolerance       1e-08;
        relTol          1e-02;
        smoother        DIC;
        //nPreSweeps      0;
        //nPostSweeps     2;
        //nFinestSweeps   2;
        cacheAgglomeration no;
        //nCellsInCoarsestLevel 10;
        //agglomerator    faceAreaPair;
        //mergeLevels     1;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "pcorr.*"
    {
        $p_rghFinal;
        tolerance       1e-04;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-07; // Doesn't do anything with momentumPredictor=no
        relTol          1e-03; // Doesn't do anything with momentumPredictor=no
        nSweeps         1;
    }

    UFinal
    {
        $U;
        relTol          0;
    }

    "(k|B|nuTilda)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-08;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors 200;
    nCorrectors     3;
    nNonOrthogonalCorrectors 0;

    pRefPoint      (0 0 0);
    pRefValue      0;

    residualControl
    {
        U
        {
                tolerance  1e-06;
                relTol     0;
        }
        p_rgh
        {
                tolerance  1e-07;
                relTol     0;
        }
     }
}

relaxationFactors {
   fields
   {
       p_rgh        0.3;
       p_rghFinal   1;
   }
   equations
   {
       "alpha.*|U|k|epsilon"            0.3;
       "(alpha.*|U|k|epsilon)Final"     1;
   }
}


// ************************************************************************* //
fvSchemes:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.0                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    div(rhoPhi,U)   Gauss upwind;
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss linear;
//    div((muEff*dev(T(grad(U))))) Gauss linear;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}

// ************************************************************************* //
-------


Thanks in advance.
krikre likes this.
floquation is offline   Reply With Quote

Old   February 14, 2017, 12:11
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,654
Rep Power: 27
alexeym will become famous soon enoughalexeym will become famous soon enough
Send a message via Skype™ to alexeym
Hi,

Couple of questions:

1. Do you really need this tight convergence criterion? I.e. 1e-7 is surely nice, yet, not quite sure your will find MUCH difference with 1e-4.

2. Using under-relaxation allows you to get "faster" convergence but on final iteration there will be no relaxation and your initial residual become much larger, than your convergence criterion. You can also use under-relaxation factor 0, so you always be using old converged field and number of iterations will be dramatically reduced.

3. Finally

Code:
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -0.0007774  Max(alpha.water) = 1.0002
Are you sure your BCs are correct?
alexeym is offline   Reply With Quote

Old   February 14, 2017, 13:16
Default
  #3
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 250
Rep Power: 4
piu58 is on a distinguished road
Dear Kevin,

the number of outer correctors and therewith the calculation time should be controled with the residuals. Please try first to let nOuterCorrectors to a high value and limit it by let's say
Code:
    residualControl
    {
        U
        {
                tolerance  1e-03;
                relTol     0;
        }
        p_rgh
        {
                tolerance  1e-03;
                relTol     0;
        }
     }
If that doesn't give a much higher calculation speed, then you forgot one of the variables in the residual control which pimple uses. Look at the screen logging for that.
Bashar likes this.
__________________
Uwe Pilz
--
Sie ahnen nicht, wieviel Poesie in der Berechnung
einer Logarithmentafel enthalten ist (Carl Friedrich Gauß)
piu58 is offline   Reply With Quote

Old   February 15, 2017, 05:04
Default
  #4
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 216
Rep Power: 12
floquation will become famous soon enough
Thank you for your replies.



Quote:
Originally Posted by alexeym View Post
1. Do you really need this tight convergence criterion? I.e. 1e-7 is surely nice, yet, not quite sure your will find MUCH difference with 1e-4.
I don't know whether I need 1e-7: it is a number that I based on, well, nothing.
I'll compare with 1e-4.

Quote:
Originally Posted by alexeym View Post
2. Using under-relaxation allows you to get "faster" convergence but on final iteration there will be no relaxation and your initial residual become much larger, than your convergence criterion. You can also use under-relaxation factor 0, so you always be using old converged field and number of iterations will be dramatically reduced.
I understand that under-relaxation might result in faster convergence by preventing the solution from "over-shooting", i.e. essentially by smoothing the descend to the correct solution.
I understand that using a value 0 implies using the old converged fields. I reckon it will result in small residuals simply because the solution is not changing.
However, I don't see how this can be a good thing? I reckon it will result in the first N-1 outer iterations doing nothing, and the final iteration (without under-relaxation) doing all the work == PISO.

Quote:
Originally Posted by alexeym View Post
3. (...) Are you sure your BCs are correct?
I'm quite sure, yes. The \alpha field is behaving appropriately when I used only one outer iteration (i.e. PISO).
Furthermore, using settings for which the PIMPLE loop does converge, \alpha remains inside its [0,1] bounds.

Just for reference, the BCs are:
\alpha:
Bottom/Side (wall): zeroGradient
Top (atmosphere): inletOutlet; value 1 = air;
\vec{u}:
Bottom/Side (wall): zero velocity (uniformFixedValue (0 0 0))
Top (atmosphere): pressureInletOutletVelocity
p_{rgh}:
Bottom/Side (wall): zero gradient (fixedFluxPressure 0)
Top (atmosphere): totalPressure




Quote:
Originally Posted by piu58 View Post
the number of outer correctors and therewith the calculation time should be controled with the residuals.
I was already doing that, although with a value of 1e-7.
The problem in the above log-file was that after 200 iterations the solution did not drop below 1e-2 yet, meaning setting it to 1e-3 wouldn't change anything either.
Or do you mean setting it to yet much higher than 200, hoping that in later timesteps the solution does converge much faster?







------------------

By chance, a simulation of last night did converge in 100 iterations (to 1e-7) [it reached 1e-4 after about 35 iterations]. The only difference with the simulation of above log-file is that I reduced under-relaxation of p_rgh from 0.3 to 0.1.
Therefore, I'm inclined to conclude that the value 0.3 was highly unfortunate, causing the solution to basically overshoot the solution harmonically, resulting in no convergence.

I'll play around with a weaker convergence criterion and lower under-relaxation factors.
floquation is offline   Reply With Quote

Old   February 20, 2017, 07:58
Default
  #5
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 40
Rep Power: 4
kera is on a distinguished road
Hello FOAMers,

I am also trying to do the same. In my case I have added TEqn (with extra source terms) in interFoam. All I wanted to do at first was to use Pimple loop with max Co. 3 (with adjustable time steps), however the solver crashes (especially alpha) and when I run the case with lower time steps (and by not using adjustable time steps) the solver runs fine and pimple loop converges with few iterations.

Boundary Conditions:
\alpha
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      alpha.metal;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    upperWall
    {
        type            zeroGradient;
    }
    leftWall
    {
         type           constantAlphaContactAngle;
        theta0         90;
        limit          gradient;
        value          uniform 0;
    }
    rightWall
    {
      type          constantAlphaContactAngle;
        theta0         90;
        limit          gradient;
        value          uniform 0;
    }
    lowerWall
    {
        type            zeroGradient;
    }
    frontAndBack
    {
        type            empty;
    }
}
fvSchemes

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
   
    default       Gauss upwind;
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss linear;
    div(rhoPhi,U)  Gauss limitedLinearV 1;
    div(phi,thermo:rho.metal) Gauss upwind;
    div(phi,thermo:rho.air) Gauss upwind;
    div(rhoPhi,T)  Gauss limitedLinear01 1;
    div(rhoPhi,K)  Gauss upwind;
    div(phi,p)      Gauss upwind;
    div(phi,k)      Gauss upwind;

    div((muEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         uncorrected;
}

fluxRequired
{
    default         no;
    p_rgh;
    pcorr;
}
fvSolution

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    alpha.metal
    {
        nAlphaCorr      1;
        nAlphaSubCycles 1;
        cAlpha          1;
    }

    ".*(rho|rhoFinal)"
    {
        solver          diagonal;
    }

    pcorr
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-05;
            relTol          0;
            smoother        DICGaussSeidel;
            nPreSweeps      0;
            nPostSweeps     2;
            nFinestSweeps   2;
            cacheAgglomeration true;
            nCellsInCoarsestLevel 10;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }
        tolerance       1e-05;
        relTol          0;
        maxIter         100;
    }

    p_rgh
    {
        solver          GAMG;
        tolerance       1e-07;
        relTol          0.01;
        smoother        DIC;
        nPreSweeps      0;
        nPostSweeps     2;
        nFinestSweeps   2;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels     1;
    }

    p_rghFinal
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-07;
            relTol          0;
            nVcycles        2;
            smoother        DICGaussSeidel;
            nPreSweeps      2;
            nPostSweeps     2;
            nFinestSweeps   2;
            cacheAgglomeration true;
            nCellsInCoarsestLevel 10;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }
        tolerance       1e-07;
        relTol          0;
        maxIter         20;
    }

 
 "(U|T).*"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-6;
        relTol          0.1;
    }

 
 /*
 U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-06;
        relTol          0;
        nSweeps         1;
    }

    "(T|k|B|nuTilda).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-7;
        relTol          0;
    }*/
}

PIMPLE
{
    momentumPredictor no;
    transonic       no;
    nOuterCorrectors 15;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;

    pRefCell 0;
    pRefValue 0.0;
    
    residualControl
    {
        U 
        {
            tolerance 1e-5;
            relTol 0;
        }
        T
        {
            tolerance 1e-5;
            relTol 0;
            
        }
        
        p_rgh
        {
            tolerance 1e-3;
            relTol 0;
        }
    }
    
 


relaxationFactors
{
    fields
    {
        p_rgh               0.3;
        p_rghFinal            1;
    }
    equations
    {
       U                         0.7;
       T                         0.7;
       "alpha.*"               0.7;
       "(U|T|alpha.*)Final"            1;
        
    }

    
}
}
this is the error what I get, when I allow adjustable time step.


Code:
Create time

Create mesh for time = 0


PIMPLE: max iterations = 15
    field U	: relTol 0, tolerance 1e-05
    field T	: relTol 0, tolerance 1e-05
    field p_rgh	: relTol 0, tolerance 0.001

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Reading marangoniTerms

Reading marangoniTerms

Selecting turbulence model type laminar

Reading g
Calculating field g.h

No finite volume options present

time step continuity errors : sum local = 0, global = 0, cumulative = 0
GAMGPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0

Starting time loop

Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.00011999
Time = 0.00011999

PIMPLE: iteration 1
MULES: Solving for alpha.metal
Phase-1 volume fraction = 0.806452  Min(alpha1) = 0  Max(alpha1) = 1
DILUPBiCG:  Solving for T, Initial residual =  1.52944e-05, Final residual = 2.09562e-05, No Iterations 5
gammaSolve CONVERGED in 5 Iterations
GAMG:  Solving for p_rgh, Initial residual = 0.999992, Final residual = 0.000911696, No Iterations 1
time step continuity errors : sum local = 0.18636, global = 1.9992e-16, cumulative = 1.9992e-16
GAMG:  Solving for p_rgh, Initial residual = 0.988129, Final residual = 0.00692632, No Iterations 5
time step continuity errors : sum local = 0.00188921, global = 1.24894e-19, cumulative = 2.00045e-16
PIMPLE: iteration 2
MULES: Solving for alpha.metal
Phase-1 volume fraction = 0.806452  Min(alpha1) = 0  Max(alpha1) = 1.27482
DILUPBiCG:  Solving for T, Initial residual =  0.15788, Final residual = 1.9161e-08, No Iterations 34
gammaSolve CONVERGED in 34 Iterations
GAMG:  Solving for p_rgh, Initial residual = 0.929794, Final residual = 0.00366765, No Iterations 4
time step continuity errors : sum local = 0.000312566, global = -1.61339e-19, cumulative = 1.99884e-16
GAMG:  Solving for p_rgh, Initial residual = 0.252356, Final residual = 0.00113828, No Iterations 4
time step continuity errors : sum local = 9.30599e-06, global = -3.37308e-21, cumulative = 1.9988e-16
PIMPLE: iteration 3
.
.
.
.
.
.
PIMPLE: iteration 15
MULES: Solving for alpha.metal
Phase-1 volume fraction = 0.806452  Min(alpha1) = -0.000200768  Max(alpha1) = 1.00016
DILUPBiCG:  Solving for T, Initial residual =  0.00123988, Final residual = 8.26378e-10, No Iterations 9
gammaSolve CONVERGED in 7 Iterations
GAMG:  Solving for p_rgh, Initial residual = 0.9994, Final residual = 0.0015772, No Iterations 1
time step continuity errors : sum local = 8.64201e-06, global = -3.84479e-22, cumulative = 1.99884e-16
GAMGPCG:  Solving for p_rgh, Initial residual = 0.00329089, Final residual = 1.93664e-08, No Iterations 5
time step continuity errors : sum local = 1.1703e-10, global = -9.98082e-23, cumulative = 1.99884e-16
PIMPLE: not converged within 15 iterations
ExecutionTime = 0.76 s  ClockTime = 1 s

Courant Number mean: 8.62149e-05 max: 0.019126
Interface Courant Number mean: 4.02458e-06 max: 0.019126
deltaT = 0.000143971
Time = 0.000263962

PIMPLE: iteration 1
MULES: Solving for alpha.metal
Phase-1 volume fraction = 0.806452  Min(alpha1) = -2.26313e-06  Max(alpha1) = 1
DILUPBiCG:  Solving for T, Initial residual =  0.00384329, Final residual = 1.12649e-05, No Iterations 8
gammaSolve CONVERGED in 6 Iterations
GAMG:  Solving for p_rgh, Initial residual = 0.996876, Final residual = 0.00150053, No Iterations 1
time step continuity errors : sum local = 3.7005e-06, global = -1.47312e-22, cumulative = 1.99884e-16
GAMG:  Solving for p_rgh, Initial residual = 0.00505313, Final residual = 4.2576e-05, No Iterations 4
time step continuity errors : sum local = 7.26956e-08, global = -1.37257e-22, cumulative = 1.99884e-16
PIMPLE: iteration 2
MULES: Solving for alpha.metal
Phase-1 volume fraction = 0.806452  Min(alpha1) = -4.47203e-05  Max(alpha1) = 1.00002
DILUPBiCG:  Solving for T, Initial residual =  0.000983497, Final residual = 6.52094e-07, No Iterations 4
gammaSolve CONVERGED in 4 Iterations
GAMG:  Solving for p_rgh, Initial residual = 0.995449, Final residual = 0.00143503, No Iterations 1
time step continuity errors : sum local = 6.01372e-06, global = 1.44792e-21, cumulative = 1.99886e-16
GAMG:  Solving for p_rgh, Initial residual = 0.00266226, Final residual = 9.27126e-06, No Iterations 5
time step continuity errors : sum local = 5.09921e-08, global = 7.36318e-22, cumulative = 1.99886e-16
PIMPLE: iteration 3
MULES: Solving for alpha.metal
Phase-1 volume fraction = 0.806452  Min(alpha1) = -1.09703e-06  Max(alpha1) = 1
DILUPBiCG:  Solving for T, Initial residual =  0.00163286, Final residual = 9.46957e-07, No Iterations 10
gammaSolve CONVERGED in 7 Iterations
GAMG:  Solving for p_rgh, Initial residual = 0.994572, Final residual = 0.00119417, No Iterations 1
time step continuity errors : sum local = 4.42903e-06, global = -1.74449e-23, cumulative = 1.99886e-16
GAMG:  Solving for p_rgh, Initial residual = 0.00406946, Final residual = 3.92242e-05, No Iterations 3
time step continuity errors : sum local = 1.86995e-07, global = 3.13402e-22, cumulative = 1.99887e-16
PIMPLE: iteration 4
MULES: Solving for alpha.metal
Phase-1 volume fraction = 0.806452  Min(alpha1) = -0.000587911  Max(alpha1) = 1.00047
DILUPBiCG:  Solving for T, Initial residual =  0.00277735, Final residual = 1.20527e-06, No Iterations 9
gammaSolve CONVERGED in 6 Iterations
GAMG:  Solving for p_rgh, Initial residual = 0.999226, Final residual = 0.00163561, No Iterations 1
time step continuity errors : sum local = 2.22823e-05, global = 4.45425e-21, cumulative = 1.99891e-16
GAMG:  Solving for p_rgh, Initial residual = 0.00309879, Final residual = 1.62382e-05, No Iterations 5
time step continuity errors : sum local = 2.81532e-07, global = 1.87072e-21, cumulative = 1.99893e-16
.
.
.
.

PIMPLE: iteration 12
MULES: Solving for alpha.metal
Phase-1 volume fraction = 0.806452  Min(alpha1) = -0.120187  Max(alpha1) = 1.03931
DILUPBiCG:  Solving for T, Initial residual =  0.0530859, Final residual = 2.93419e-07, No Iterations 15
gammaSolve CONVERGED in 15 Iterations
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#5  Foam::GAMGSolver::solveCoarsestLevel(Foam::Field<double>&, Foam::Field<double> const&) const at ??:?
#6  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#7  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#8  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#9  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#10
 at ??:?
#11  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12
 at ??:?
Floating point exception (core dumped)
Would really appreciate your help.

Thanks in advance.

Regards,
Ricky
__________________
If it is easy, then something is fishy!

Last edited by kera; February 20, 2017 at 09:32.
kera is offline   Reply With Quote

Old   February 20, 2017, 08:34
Default
  #6
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 216
Rep Power: 12
floquation will become famous soon enough
Euh? You are using a bigger maxCo than me (= more unstable), but far less iterations. I was using 200 PIMPLE loops, and even then it wouldn't converge. So obviously it is not going to converge for you.
For instance, your initial residual for p_rgh is 0.999 in your final iteration... If it were any higher, the simulation would blow up instantly, therefore it blows up in due time.
floquation is offline   Reply With Quote

Old   February 20, 2017, 09:11
Default
  #7
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 40
Rep Power: 4
kera is on a distinguished road
Quote:
Originally Posted by floquation View Post
Euh? You are using a bigger maxCo than me (= more unstable), but far less iterations. I was using 200 PIMPLE loops, and even then it wouldn't converge. So obviously it is not going to converge for you.
For instance, your initial residual for p_rgh is 0.999 in your final iteration... If it were any higher, the simulation would blow up instantly, therefore it blows up in due time.
thanks for your reply!

yeah I know the example I shared with you guys was the extreme condition of the case I was trying. I initially started without adjustable time steps and using very small delta_T. I observed that it didn't required too many PIMPLE loops as PIMPLE converges within 10 iterations. so I maxed my PIMPLE Iteration value to 15.

Then I started playing around with Co. and max Co. 3 was the extreme I was using. However the solver crashes even setting Co. to 1 (i.e., with adjustable time steps). Later I tried to just increase the time step from 1e-5 to 5e-5 (without adjustable) it still crashed. It seem that for some reason the solver responds well only to time step 1e-5 or lower.

So I was wondering, what I was doing wrong and hence shared my simulation settings here,so that maybe someone with experience may figure out the silly things/mistakes I might be probably doing, as I am kinda new to OpenFOAM.

Thanks in advance.

Regards,
Ricky
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   February 22, 2017, 13:05
Default
  #8
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 216
Rep Power: 12
floquation will become famous soon enough
Regarding my matter, I have played around some more.

residualControl 1e-4:
As was to be expected, using a lower convergence criterion may result in the PIMPLE loop to be truncated.
For instance, using 2x200 iterations (inner x outer), it would truncate after 40-60 PIMPLE loops; using 3x200 iterations, it would truncate after 15 PIMPLE loops. Both cases use 1e-4 for both velocity and pressure, with a relTol of 1e-2.
However, sometimes the loop would randomly not converge, and use the maximum of 200 iterations. For example:

Code:
Courant Number mean: 5.78162e-06 max: 0.0502205
Interface Courant Number mean: 1.85919e-06 max: 0.0278548
deltaT = 3.53748e-06
Time = 1.53653e-05

PIMPLE: iteration 1
smoothSolver:  Solving for alpha.water, Initial residual = 0.000138561, Final residual = 2.42003e-08, No Iterations 1
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -3.99334e-05  Max(alpha.water) = 1.0022
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -3.99334e-05  Max(alpha.water) = 1.0022
GAMG:  Solving for p_rgh, Initial residual = 0.00997852, Final residual = 7.87455e-05, No Iterations 1
time step continuity errors : sum local = 6.0439e-09, global = -5.59866e-12, cumulative = 5.95127e-09
GAMG:  Solving for p_rgh, Initial residual = 0.00698256, Final residual = 5.85491e-05, No Iterations 1
time step continuity errors : sum local = 4.49712e-09, global = -5.51211e-12, cumulative = 5.94575e-09
GAMG:  Solving for p_rgh, Initial residual = 0.0069824, Final residual = 5.78619e-05, No Iterations 1
time step continuity errors : sum local = 4.44434e-09, global = -5.48796e-12, cumulative = 5.94027e-09
PIMPLE: iteration 2
smoothSolver:  Solving for alpha.water, Initial residual = 0.000121902, Final residual = 1.6192e-08, No Iterations 1
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -3.99282e-05  Max(alpha.water) = 1.0022
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -3.99282e-05  Max(alpha.water) = 1.0022
GAMG:  Solving for p_rgh, Initial residual = 0.00811384, Final residual = 6.74661e-05, No Iterations 1
time step continuity errors : sum local = 5.17509e-09, global = -6.19006e-12, cumulative = 5.93408e-09
GAMG:  Solving for p_rgh, Initial residual = 0.00567394, Final residual = 5.06996e-05, No Iterations 1
time step continuity errors : sum local = 3.89126e-09, global = -6.66072e-12, cumulative = 5.92742e-09
GAMG:  Solving for p_rgh, Initial residual = 0.0056749, Final residual = 5.00646e-05, No Iterations 1
time step continuity errors : sum local = 3.84252e-09, global = -6.78585e-12, cumulative = 5.92063e-09

(...)

PIMPLE: iteration 13
smoothSolver:  Solving for alpha.water, Initial residual = 0.000127866, Final residual = 1.74908e-08, No Iterations 1
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -3.99321e-05  Max(alpha.water) = 1.0022
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -3.99321e-05  Max(alpha.water) = 1.0022
GAMG:  Solving for p_rgh, Initial residual = 0.000100243, Final residual = 2.09242e-06, No Iterations 1
time step continuity errors : sum local = 1.60489e-10, global = 5.21436e-12, cumulative = 5.867e-09
GAMG:  Solving for p_rgh, Initial residual = 7.03431e-05, Final residual = 7.03431e-05, No Iterations 0
time step continuity errors : sum local = 5.39538e-09, global = 4.82634e-12, cumulative = 5.87182e-09
GAMG:  Solving for p_rgh, Initial residual = 9.12762e-05, Final residual = 9.12762e-05, No Iterations 0
time step continuity errors : sum local = 7.00093e-09, global = 4.70905e-12, cumulative = 5.87653e-09
PIMPLE: iteration 14
smoothSolver:  Solving for alpha.water, Initial residual = 0.000127844, Final residual = 1.74961e-08, No Iterations 1
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -3.99317e-05  Max(alpha.water) = 1.0022
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -3.99317e-05  Max(alpha.water) = 1.0022
GAMG:  Solving for p_rgh, Initial residual = 0.00833255, Final residual = 7.07639e-05, No Iterations 1
time step continuity errors : sum local = 7.73113e-09, global = 3.59177e-12, cumulative = 5.88012e-09
GAMG:  Solving for p_rgh, Initial residual = 9.76716e-05, Final residual = 9.76716e-05, No Iterations 0
time step continuity errors : sum local = 1.06395e-08, global = 3.58804e-12, cumulative = 5.88371e-09
GAMG:  Solving for p_rgh, Initial residual = 9.81798e-05, Final residual = 9.81798e-05, No Iterations 0
time step continuity errors : sum local = 1.06949e-08, global = 3.58802e-12, cumulative = 5.8873e-09
PIMPLE: converged in 14 iterations
ExecutionTime = 4910.01 s  ClockTime = 4924 s

(...) somewhat later (...)

Courant Number mean: 0.000306073 max: 0.714215
Interface Courant Number mean: 9.84419e-05 max: 0.569494
deltaT = 5.05051e-05
Time = 0.00059596

PIMPLE: iteration 1
smoothSolver:  Solving for alpha.water, Initial residual = 0.0074356, Final residual = 3.97399e-06, No Iterations 2
Phase-1 volume fraction = 0.998806  Min(alpha.water) = -1.23599e-05  Max(alpha.water) = 1.00207
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998806  Min(alpha.water) = -4.58158e-05  Max(alpha.water) = 1.00207
GAMG:  Solving for p_rgh, Initial residual = 0.129127, Final residual = 0.000212159, No Iterations 2
time step continuity errors : sum local = 4.67654e-07, global = 7.36887e-09, cumulative = -4.99229e-06
GAMG:  Solving for p_rgh, Initial residual = 0.0877543, Final residual = 0.000138468, No Iterations 2
time step continuity errors : sum local = 3.02863e-07, global = 9.61841e-09, cumulative = -4.98267e-06
GAMG:  Solving for p_rgh, Initial residual = 0.0875758, Final residual = 0.000137868, No Iterations 2
time step continuity errors : sum local = 3.0156e-07, global = 8.63233e-09, cumulative = -4.97404e-06
PIMPLE: iteration 2
smoothSolver:  Solving for alpha.water, Initial residual = 0.00613058, Final residual = 1.74863e-05, No Iterations 1
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -1.26977e-05  Max(alpha.water) = 1.00212
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -6.83868e-05  Max(alpha.water) = 1.00212
GAMG:  Solving for p_rgh, Initial residual = 0.0505464, Final residual = 6.68601e-05, No Iterations 2
time step continuity errors : sum local = 2.59894e-07, global = 3.34174e-09, cumulative = -4.9707e-06
GAMG:  Solving for p_rgh, Initial residual = 0.034465, Final residual = 4.85242e-05, No Iterations 2
time step continuity errors : sum local = 1.8928e-07, global = 3.36974e-09, cumulative = -4.96733e-06
GAMG:  Solving for p_rgh, Initial residual = 0.0345989, Final residual = 4.83563e-05, No Iterations 2
time step continuity errors : sum local = 1.88649e-07, global = 3.38312e-09, cumulative = -4.96395e-06

(...)

PIMPLE: iteration 198
smoothSolver:  Solving for alpha.water, Initial residual = 0.0113192, Final residual = 6.24306e-05, No Iterations 1
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -1.2685e-05  Max(alpha.water) = 1.00215
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998807  Min(alpha.water) = -4.9255e-05  Max(alpha.water) = 1.00215
GAMG:  Solving for p_rgh, Initial residual = 0.148674, Final residual = 0.000165971, No Iterations 2
time step continuity errors : sum local = 5.6664e-07, global = -8.35275e-09, cumulative = -1.04967e-05
GAMG:  Solving for p_rgh, Initial residual = 0.102286, Final residual = 0.000144952, No Iterations 2
time step continuity errors : sum local = 4.96449e-07, global = -8.45179e-09, cumulative = -1.05052e-05
GAMG:  Solving for p_rgh, Initial residual = 0.102577, Final residual = 0.000146689, No Iterations 2
time step continuity errors : sum local = 5.02406e-07, global = -8.48205e-09, cumulative = -1.05136e-05
PIMPLE: iteration 199
smoothSolver:  Solving for alpha.water, Initial residual = 0.014228, Final residual = 2.09971e-05, No Iterations 2
Phase-1 volume fraction = 0.998806  Min(alpha.water) = -8.81257e-06  Max(alpha.water) = 1.00188
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998806  Min(alpha.water) = -0.000130558  Max(alpha.water) = 1.00188
GAMG:  Solving for p_rgh, Initial residual = 0.151508, Final residual = 0.000260614, No Iterations 2
time step continuity errors : sum local = 4.66009e-07, global = -6.80941e-09, cumulative = -1.05205e-05
GAMG:  Solving for p_rgh, Initial residual = 0.098692, Final residual = 0.000171859, No Iterations 2
time step continuity errors : sum local = 3.03629e-07, global = -6.87803e-09, cumulative = -1.05273e-05
GAMG:  Solving for p_rgh, Initial residual = 0.0956707, Final residual = 0.000926545, No Iterations 1
time step continuity errors : sum local = 1.63263e-06, global = -6.69686e-09, cumulative = -1.0534e-05
PIMPLE: iteration 200
smoothSolver:  Solving for alpha.water, Initial residual = 0.011516, Final residual = 6.20229e-05, No Iterations 1
Phase-1 volume fraction = 0.998806  Min(alpha.water) = -1.2695e-05  Max(alpha.water) = 1.0024
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.998806  Min(alpha.water) = -5.29868e-05  Max(alpha.water) = 1.0024
GAMG:  Solving for p_rgh, Initial residual = 0.142777, Final residual = 0.000140118, No Iterations 2
time step continuity errors : sum local = 6.68283e-07, global = -8.67101e-09, cumulative = -1.05427e-05
GAMG:  Solving for p_rgh, Initial residual = 0.00973426, Final residual = 7.50726e-05, No Iterations 2
time step continuity errors : sum local = 3.65385e-07, global = -8.56944e-09, cumulative = -1.05513e-05
GAMG:  Solving for p_rgh, Initial residual = 0.00190305, Final residual = 6.0703e-05, No Iterations 1
time step continuity errors : sum local = 2.94961e-07, global = -8.5669e-09, cumulative = -1.05598e-05
PIMPLE: not converged within 200 iterations
ExecutionTime = 12492.6 s  ClockTime = 12544 s
It can be seen that successive iterations do approximately nothing, resulting in the PIMPLE loop not converging. During some timesteps, the p_rgh residual would remain as high as 0.1 after 200 iterations. Once this has happened, the PIMPLE loop would never converge (within 200 iterations) in future timesteps.
Given the number of iterations per pressure iteration (0~3), the trouble is not satisfying the pressure equation, but the combined Navier-Stokes equations (right?). In fact, it appeared to converge in the first few PIMPLE loops, but at some point during the PIMPLE iteration process the residuals increase again.

Question 1: Is it a good thing that p_rgh converges within only 0~3 iterations, or is it to be expected that more work should be done within one iteration?
Question 2: In the final PIMPLE iterations, no under-relaxation is used. It is then observed that the residuals do decrease rapidly. Does this imply convergence, despite PIMPLE having wasted 199 iterations doing virtually nothing? This is effectively like PISO, isn't it?


under-relaxation:
Using the much stricted residualControl of 1e-7, I had found that using an under-relaxation factor (urf) of 0.3 for p_rgh resulted in successive iterations doing approximately nothing. Reducing the urf to 0.1, resulted in converge after 130 iterations at first, 180 later, and no convergence (within 200 PIMPLE loops) at later timesteps. An urf of 0.01 is prohibitively low, resulting in effectively no convergence (i.e., too slow for 200 PIMPLE loops).
So the situation is similar to above log snippet.


momentum predictor:
Doesn't appear to do anything (w.r.t. convergence rate).



--------

My net conclusion so far is that using maxCo=0.5 instead of maxCo=2 results in a considerably faster simulation. Perhaps it is just my case..., but I seem unable to get PIMPLE to be advantageous.
Question 3: Any further suggestions?



Thanks in advance.
floquation is offline   Reply With Quote

Old   February 22, 2017, 15:17
Default
  #9
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 250
Rep Power: 4
piu58 is on a distinguished road
I had a problem which may be similar. Te simulation crashes even with maxCo way below 1.

The reason for me was a (for the problem) too high value of delta T which induces instabilities during the first steps. The ode crashes much later however. If your simulations runs for a longer time, say for several minutes, it is nearly impossible to choose a delta T too low. The value rises to normal value fast.
__________________
Uwe Pilz
--
Sie ahnen nicht, wieviel Poesie in der Berechnung
einer Logarithmentafel enthalten ist (Carl Friedrich Gauß)
piu58 is offline   Reply With Quote

Reply

Tags
pimple

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 4 February 1, 2017 18:55
PIMPLE – the value of the final under-relaxation factor Zbynek OpenFOAM 5 June 24, 2016 11:12
error while running modified pimple solver R_21 OpenFOAM Programming & Development 0 May 28, 2015 06:59
A question on the PIMPLE algorithm GerhardHolzinger OpenFOAM Running, Solving & CFD 4 February 13, 2015 07:49
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 11:08


All times are GMT -4. The time now is 06:54.