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/)
-   -   Sudden jumps in Courant in the middle of the simulation (https://www.cfd-online.com/Forums/openfoam-solving/134848-sudden-jumps-courant-middle-simulation.html)

Pj. May 6, 2014 07:43

Sudden jumps in Courant in the middle of the simulation
 
1 Attachment(s)
Hi everybody

I'm running a case with PIMPLE foam with the LES turbulence model.

The problem is that in the middle of the simulation, sudden jumps of several order of magnitude in Courant number appears. Then, strange fact number 2, the simulation converges again :confused:

This is the log from pimple foam with the iteration before and after the jump

Code:

Courant Number mean: 0.186631 max: 1.8437
Time = 5.575

PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.00145738, Final residual = 6.64777e-09, No Iterations 6
DILUPBiCG:  Solving for Uy, Initial residual = 0.0604873, Final residual = 7.45712e-09, No Iterations 9
DILUPBiCG:  Solving for Uz, Initial residual = 0.0274295, Final residual = 8.88052e-09, No Iterations 8
DICPCG:  Solving for p, Initial residual = 0.141566, Final residual = 0.00692174, No Iterations 4
DICPCG:  Solving for p, Initial residual = 0.00791436, Final residual = 0.00037769, No Iterations 16
time step continuity errors : sum local = 7.22241e-08, global = -4.52688e-11, cumulative = -1.72326e-07
DICPCG:  Solving for p, Initial residual = 0.0161718, Final residual = 0.000756972, No Iterations 5
DICPCG:  Solving for p, Initial residual = 0.000876374, Final residual = 4.36954e-05, No Iterations 33
time step continuity errors : sum local = 8.49073e-09, global = -5.75816e-11, cumulative = -1.72383e-07
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 3.12497e-05, Final residual = 8.99954e-09, No Iterations 4
DILUPBiCG:  Solving for Uy, Initial residual = 0.000795909, Final residual = 1.19494e-09, No Iterations 8
DILUPBiCG:  Solving for Uz, Initial residual = 0.00029896, Final residual = 314.057, No Iterations 1001
DICPCG:  Solving for p, Initial residual = 0.999977, Final residual = 0.0263806, No Iterations 3
DICPCG:  Solving for p, Initial residual = 0.0144061, Final residual = 0.000528999, No Iterations 8
time step continuity errors : sum local = 0.00441509, global = 9.945e-09, cumulative = -1.62438e-07
DICPCG:  Solving for p, Initial residual = 0.755181, Final residual = 0.0195148, No Iterations 3
DICPCG:  Solving for p, Initial residual = 0.0397071, Final residual = 9.8571e-07, No Iterations 250
time step continuity errors : sum local = 3.04181e-06, global = 1.62246e-07, cumulative = -1.91817e-10
ExecutionTime = 37649.6 s  ClockTime = 37697 s

Courant Number mean: 2.76008 max: 43683.4
Time = 5.576

PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.289494, Final residual = 6.77395e-09, No Iterations 14
DILUPBiCG:  Solving for Uy, Initial residual = 0.305659, Final residual = 7.22824e-09, No Iterations 14
DILUPBiCG:  Solving for Uz, Initial residual = 0.316415, Final residual = 9.94743e-09, No Iterations 14
DICPCG:  Solving for p, Initial residual = 0.960833, Final residual = 0.0456337, No Iterations 8
DICPCG:  Solving for p, Initial residual = 0.0100212, Final residual = 0.000488464, No Iterations 49
time step continuity errors : sum local = 0.00244363, global = 1.20192e-05, cumulative = 1.2019e-05
DICPCG:  Solving for p, Initial residual = 0.0416985, Final residual = 0.00189429, No Iterations 10
DICPCG:  Solving for p, Initial residual = 0.00261552, Final residual = 0.000127246, No Iterations 92
time step continuity errors : sum local = 0.000612151, global = 5.09733e-05, cumulative = 6.29923e-05
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.242781, Final residual = 2.21545e-09, No Iterations 14
DILUPBiCG:  Solving for Uy, Initial residual = 0.247553, Final residual = 2.30642e-09, No Iterations 14
DILUPBiCG:  Solving for Uz, Initial residual = 0.276608, Final residual = 2.33162e-09, No Iterations 15
DICPCG:  Solving for p, Initial residual = 0.141775, Final residual = 0.0065789, No Iterations 5
DICPCG:  Solving for p, Initial residual = 0.00722017, Final residual = 0.000357133, No Iterations 66
time step continuity errors : sum local = 0.00165265, global = 0.000112039, cumulative = 0.000175032
DICPCG:  Solving for p, Initial residual = 0.0266265, Final residual = 0.00117149, No Iterations 6
DICPCG:  Solving for p, Initial residual = 0.00134573, Final residual = 9.69224e-07, No Iterations 505
time step continuity errors : sum local = 4.90204e-06, global = -6.92753e-09, cumulative = 0.000175025
ExecutionTime = 37659.3 s  ClockTime = 37707 s

as you can see the Uz could not be solved and the solver stopped after 1001 iterations.

I attached a plot of the MaxCo at each iteration on a semi logaritmic scale. As you can see, after the "jump" the Courant decrease and goes back to value around 1.7-2 as I want it. Then after a while a second jump happens.

This is the fvScheme

Code:

ddtSchemes
{
    default        backward;
}

gradSchemes
{
    default        Gauss linear;
    grad(p)        Gauss linear;
    grad(U)        Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)      Gauss linear;
    div(phi,k)      Gauss limitedLinear 1;
    div(phi,B)      Gauss limitedLinear 1;
    div(phi,nuTilda) Gauss limitedLinear 1;
    div(B)          Gauss linear;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DBEff,B) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
    interpolate(U)  linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p              ;
}

and this the fvSolution

Code:

solvers
{
    p
    {
        solver PCG;
        preconditioner DIC;
        tolerance 1e-06;
        relTol 0.05;
    };

    pFinal
    {
        solver PCG;
        preconditioner DIC;
        tolerance 1e-06;
        relTol 0;
    };

    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance        1e-08;
        relTol          0;
    };

    UFinal
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance        1e-08;
        relTol          0;
    };
    nuTilda
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance        1e-07;
        relTol          0;
    };
}

PIMPLE
{
    nCorrectors    2;
    nNonOrthogonalCorrectors 1;
    nOuterCorrectors 2;
}


relaxationFactors
{
    "U.*"              1;
    "nuTilda.*"        1;
}


What should i do? Thank you very much

olivierG May 6, 2014 12:23

hello,
add limiter to div(phi,U), like the limitedLiner you use after, or an other.

regards,
olivier


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