CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Unexpected step-to-step divergence? (https://www.cfd-online.com/Forums/openfoam-solving/123151-unexpected-step-step-divergence.html)

petr.f. September 5, 2013 10:26

Unexpected step-to-step divergence?
 
Hi all,

I'm facing problem with unexpected, step-to-step divergence when carrying out two-phase flow simulations in a straight tube (mixture of very small gas bubbles in liquid) . The settings are as follows:

- application: interFoam
- adjustableRunTime
- parallel computation on 128 cores (sandybridge)
- polyhedral mesh (~2.6e6 cells)
- k-w SST turbulence model (with wall functions ;-| )
- gradSchemes: cellLimited pointCellsLeastSquares 1
- divSchemes: Gauss linearUpwind pointCellsLeastSquares for fluxesm vanLeer01 for alpha, upwind for k and w
- laplacianSchemes: Gauss harmonic limited 0.5
- p_rgh solver PCG preconditioned by GAMG
- U solver: coupled GaussSeidel
- k-w solver: DILUGaussSeidel
- relaxation for U 0.8, p_rgh 0.8, k and omega 0.5

The computation starts and runs without any significant problems, but then just out of nowhere something like this happens:

---------------------------------------
Courant Number mean: 0.0580293 max: 3.24124
Interface Courant Number mean: 0.0306811 max: 1.19673
deltaT = 4.30429e-06
Time = 0.387167774895511296318062477439525537192821502685 546875

MULES: Solving for alpha1
Phase-1 volume fraction = 0.843784 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.843785 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.843786 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.843787 Min(alpha1) = 0 Max(alpha1) = 1
PIMPLE: iteration 1
GAMGPCG: Solving for p_rgh, Initial residual = 0.0224785, Final residual = 0.000156967, No Iterations 1
time step continuity errors : sum local = 1.55616e-07, global = 5.43803e-09, cumulative = 0.000297041
GAMGPCG: Solving for p_rgh, Initial residual = 0.00199818, Final residual = 4.15425e-05, No Iterations 1
time step continuity errors : sum local = 4.24289e-08, global = 3.81493e-09, cumulative = 0.000297045
PIMPLE: iteration 2
GAMGPCG: Solving for p_rgh, Initial residual = 0.00614802, Final residual = 9.2905e-05, No Iterations 1
time step continuity errors : sum local = 9.60018e-08, global = -7.49441e-08, cumulative = 0.00029697
GAMGPCG: Solving for p_rgh, Initial residual = 0.14632, Final residual = 0.00109295, No Iterations 1
time step continuity errors : sum local = 1.32961e-06, global = 7.27154e-07, cumulative = 0.000297697
PIMPLE: iteration 3
GAMGPCG: Solving for p_rgh, Initial residual = 0.990129, Final residual = 0.00744816, No Iterations 1
time step continuity errors : sum local = 0.00112567, global = 0.000659507, cumulative = 0.000957204
GAMGPCG: Solving for p_rgh, Initial residual = 0.999995, Final residual = 6.0151e-08, No Iterations 11
time step continuity errors : sum local = 0.00711768, global = 0.000152863, cumulative = 0.00111007
smoothSolver: Solving for omega, Initial residual = 1, Final residual = 9.87567e-10, No Iterations 29
smoothSolver: Solving for k, Initial residual = 0.863997, Final residual = 9.83797e-10, No Iterations 56
ExecutionTime = 128590 s ClockTime = 128985 s

Courant Number mean: 188929 max: 7.37508e+12
Interface Courant Number mean: 174035 max: 7.37508e+12
deltaT = 1.75088e-18

THE END
---------------------------------------

"High" value of the Courant number (3.24124 and 1.19673 for the interface Co) is tweaked by even higher number of nAlphaSubcycles and it limited by 5 (and 3 for interface Co). It works many times during the simulation so I don't think this is the main problem...

If I restart it, it just goes on (and it might or might not diverge in the same way). I can overcome this problem by modifying the interFoam so that it remembers the results from the last iteration, reloads it in the case of divergence and assure the smooth run by lowering the new deltaT. But this solution is kind of lame...

Have you experienced similar behaviour? Do you have any ideas how to solve it?

Bernhard September 6, 2013 01:49

In my experience, your best odds in resolving these kind of issues is reducing the maxCo and maxAlphaCo. What are these in your case?

petr.f. September 6, 2013 03:51

As I wrote - maxCo = 5, maxAlphaCo = 3,

I'm tweaking it by the following settings for correctors:

nCorrectors 2;
nOuterCorrectors 3;
nNonOrthogonalCorrectors 0;

nAlphaCorr 1;
nAlphaSubCycles 4;
cAlpha 1;

I usually works, but sometimes, it suddenly blows up...

Bernhard September 6, 2013 03:58

Quote:

Originally Posted by petr.f. (Post 450164)
As I wrote - maxCo = 5, maxAlphaCo = 3,

I was not sure if you were talking about the maxCo, or alphaSubCycles, but these Courant numbers are in general to large for interFoam, if you reduces them by an order, you won't face these problems.

There is by the way a lot of information on this forum related to time step size and interFoam.

petr.f. September 6, 2013 04:02

OK, thanks, I'll search for it...


All times are GMT -4. The time now is 15:17.