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/)
-   -   No convergence (http://www.cfd-online.com/Forums/openfoam-solving/94027-no-convergence.html)

recnice November 3, 2011 08:33

No convergence
 
Hi,

i'm trying to simulate a 2D flow over an airfoil.
I'm using the simpleFoam with a k-epsilon turbulence model, these are my system files:


fvSolution:
Code:

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

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


    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-05;
        relTol          0.1;
    }

    k
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-05;
        relTol          0.1;
    }

    epsilon
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-05;
        relTol          0.1;
    }

   
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    pRefCell        10;
    pRefValue      0;

    residualControl
    {
        p              1e-6;
        U              1e-6;
        "(k|epsilon|omega)" 1e-3;
    }
}

relaxationFactors
{
    p              0.3;
    U              0.7;
    k              0.7;
    epsilon        0.7;     

// ************************************************************************* //

fvScheme
Code:

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

ddtSchemes
{
    default        steadyState;
}

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

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

laplacianSchemes
{
    default        none;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
    laplacian(DREff,R) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

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

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p              ;
}


// ************************************************************************* //

The main problem is, there is no convergence especially for the pressure. I get this message:

Code:

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Uninterpreted:
#3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#5  Foam::fvMatrix<double>::solve() in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/simpleFoam"
#6  Foam::incompressible::RASModels::kEpsilon::correct() in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#7 
 in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/simpleFoam"
#8  __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#9 
 in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/simpleFoam"
Gleitkomma-Ausnahme

Has someone an idea how to solve this problem?

Denis

Bernhard November 3, 2011 08:40

It is easier to understand to post a larger part of the log file (before the actual error occurs).

In this case you put relTol to 0.1, which seems high to me. Try to pose a more strict condition on this one.

recnice November 3, 2011 09:14

1 Attachment(s)
Hi Bernhard,

thank you for your fast response.

So I've changed the tol, maybe you can explain me, what´s the difference between "relTol" and "tolerance".

I attached a plot of the residuals: there you can see a "zig-zacking" of all residuals and you can see that they are "bounded".
Do you have an explanation for that?

Denis

Rebecca513 November 21, 2011 21:20

Hi Denis,

I got the same error running simpleFoam, I wonder if you have resolved this issue. If so, could you post the solution?

Thank you!

Best,

Hang

Geon-Hong November 22, 2011 01:03

relTol and tolerance
 
Hi Denis.

Both tolerance and relTol are used for terminating a sub-iteration of each equation.

If the residual reaches tolerance or becomes less than the tolerance you set, then the computation of corresponding equation will be terminated.

If the residual reaches or goes to below than (relTol) x (Initial residual), then the iteration will be terminated as well.

When you set the relTol as 0, then the iteration will be terminated only if the final residual becomes less than the tolerance.

Regards,
Geon-Hong.


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