CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   pimpleFoam screwed up with residual and courant number (https://www.cfd-online.com/Forums/openfoam/217149-pimplefoam-screwed-up-residual-courant-number.html)

Jinjolee May 1, 2019 13:29

pimpleFoam screwed up with residual and courant number
 
I was trying to use pimpleFoam to obtain the transient solution of my simulation. In fvSolution, I followed: https://openfoamwiki.net/index.php/O...hm_in_OpenFOAM to setup.
And when I had my first timestep, the residuals went crazy. Here is the residuals plot just after the first timestep(50 iterations):
https://i.ibb.co/3kr8GZJ/resPlot.png

The velocity residuals blew up.

Also, in log.pimpleFoam, I found
1. forceCoeffs blew up;
2. courant blew up;
3. PIMPLE: Not converged within 50 iterations
4. last iteration take 1000 iterations for velocity
Here is part of the log:
Code:

...
PIMPLE: Iteration 49
smoothSolver:  Solving for Ux, Initial residual = 0.2628474, Final residual = 0.006348619, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 0.3153633, Final residual = 0.009944488, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 0.2931374, Final residual = 0.009416199, No Iterations 1
GAMG:  Solving for p, Initial residual = 1.737072e-05, Final residual = 9.476295e-08, No Iterations 4
time step continuity errors : sum local = 0.0003989904, global = 4.242985e-07, cumulative = 5.625885e-07
PIMPLE: Iteration 50
smoothSolver:  Solving for Ux, Initial residual = 0.6357956, Final residual = 0.0001464525, No Iterations 1000
smoothSolver:  Solving for Uy, Initial residual = 0.7345522, Final residual = 8.67146e-05, No Iterations 1000
smoothSolver:  Solving for Uz, Initial residual = 0.7207067, Final residual = 7.978962e-05, No Iterations 1000
GAMG:  Solving for p, Initial residual = 0.1127675, Final residual = 8.968816e-08, No Iterations 55
time step continuity errors : sum local = 0.004213623, global = -0.001068937, cumulative = -0.001068374
smoothSolver:  Solving for epsilon, Initial residual = 1, Final residual = 0.1651915, No Iterations 1000
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 9.930172e-07, No Iterations 81
PIMPLE: Not converged within 50 iterations
ExecutionTime = 3608.8 s  ClockTime = 3653 s

forceCoeffs forceCoeffs1 write:
    Cm    = -1.194991e+17
    Cd    = -1.60657e+17
    Cl    = 1.946065e+17
    Cl(f) = -2.219587e+16
    Cl(r) = 2.168024e+17

Courant Number mean: 242261.2 max: 6.091332e+10
deltaT = 2.897077e-13
Time = 0.00588235

my questions are:
1. Why would my courant number go so large? I should have limited it in controlDict:
Code:

maxCo                3;
maxDaltaT        1;

2. Is 50 nOuterCorrector too few for this case?

3. Is any of my setup got wrong?(I will post it at the end)

Thank you very much!!

fvSolution:
Code:

solvers
{
    p
    {
        solver          GAMG;
        smoother        DICGaussSeidel;
        tolerance      1e-7;
        relTol          0.01;
    }

    pFinal
    {
        $p;       
        relTol                0;

    }

    "(U|k|epsilon)"
    {
        solver                smoothSolver;
        smoother        symGaussSeidel;
        tolerance        1e-06;
        relTol                0.1;
    }

    "(U|k|epsilon)Final"
    {
        $U;
        tolerance        1e-06;
        relTol                0;
    }
}


PIMPLE
{
        nOuterCorrectors        50;
        nCorrectors                1;
        nNonOrthogonalCorrectors 0;

        outerCorrectorResidualControl
        {
                U
                {
                        tolerance        1e-5;
                        relTol                0;
                }
                p
                {
                        tolerance        5e-4;
                        relTol                0;
                }
        }
}


relaxationFactors
{
    fields
    {
        p        0.3;
        pFinal        1;
    }

    equations
    {
        "U|k|epsilon"        0.3;       
        "(U|k|epsilon)Final"        1;
    }
}

controlDict:
Code:

application    pimpleFoam;

startFrom      latestTime;

startTime      0;

stopAt          endTime;

endTime        400;

deltaT          0.005;

writeControl    adjustableRunTime;

writeInterval  0.1;

purgeWrite      0;

writeFormat    binary;

writePrecision  7;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable yes;

adjustTimeStep        yes;

maxCo                3;
maxDaltaT        1;

functions
{
    #include "streamLines"
    #include "cuttingPlane"
    #include "forceCoeffs"
}



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