CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   simpleFoam convergence problems for pipe flow problem (http://www.cfd-online.com/Forums/openfoam-solving/96725-simplefoam-convergence-problems-pipe-flow-problem.html)

Mike Graham January 30, 2012 15:40

simpleFoam convergence problems for pipe flow problem
 
I've been solving some very simple pipe flow problems using 1.6-ext's simpleFoam with a k-epsilon turbulence model and have had trouble getting good results. As I let my simulation go, in many time steps the p equation solver maxes out the number of iterations required before moving on (I've tried 1000 maximum for GAMG, 2500 for PCG), and eventually the pressures and velocities get huge and the continuity error gets large and the simulation dies due to a SIGFPE.

I've adjusted my p solver and parameters, my grad(p) schemes and various divSchemes, my relaxation parameters, and my initial conditions, but the solution inevitably blows up. If I change my boundary conditions to inlet-pressure/outlet-velocity or pressure/pressure, I don't blow up, but I do not achieve convergence.

Can anyone explain why I'm having trouble or advise me how to proceed?

One case that I ran is posted at http://dl.dropbox.com/u/19693178/examplecase.tar.gz

Here are some of my input files

0/fvSolution
Code:

solvers
{
    p
    {
        solver          GAMG;
        tolerance        1e-6;
        relTol          0;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    };

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.1;
        nSweeps          1;
    };

    k
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.1;
        nSweeps          1;
    };

    epsilon
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.1;
        nSweeps          1;
    };
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    p              0.3;
    U              0.6;
    k              0.2;
    epsilon        0.2;
}

fvSchemes
Code:

ddtSchemes
{
    default steadyState;
}

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

divSchemes
{
    default        none;
    div(phi,U)      Gauss linearUpwindV Gauss linear;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon)  Gauss upwind;
    div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

fluxRequired
{
    default        no;
    p;
}

0/U
Code:

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value          uniform (-1.68669369 -7.75789138 0);
    }
    Outlet
    {
        type            zeroGradient;
    }
    Sym
    {
        type            symmetryPlane;
    }
    Wall
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
}

0/p
Code:

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    Outlet
    {
        type            fixedValue;
        value          uniform -29.89;
    }

    Inlet
    {
        type            zeroGradient;
    }

    Wall
    {
        type            zeroGradient;
    }

    Sym
    {
        type            symmetryPlane;
    }
}

0/k
Code:

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 90.583e-6;

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value          $internalField;
    }

    Outlet
    {
        type            zeroGradient;
    }

    Wall
    {
        type            kqRWallFunction;
        value          $internalField;
    }

    Sym
    {
        type            symmetryPlane;
    }
}

0/epsilon
Code:

dimensions      [0 2 -3 0 0 0 0];

internalField  uniform 12.89e-6;

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value          $internalField;
    }

    Outlet
    {
        type            zeroGradient;
    }

    Wall
    {
        type            epsilonWallFunction;
        value          $internalField;
    }

    Sym
    {
        type            symmetryPlane;
    }
}

0/nut
Code:

dimensions      [0 2 -1 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    Inlet
    {
        type            calculated;
        value          uniform 0;
    }

    Outlet
    {
        type            calculated;
        value          uniform 0;
    }

    Wall
    {
        type            nutWallFunction;
        value          uniform 0;
    }

    Sym
    {
        type            symmetryPlane;
    }
}



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