/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM:  The Open Source CFD Toolbox
   \\    /   O peration     | Version:   OpenFOAM-9 (f8d11b031) (openfoam.org)
    \\  /    A nd           | Upstream:  A Wikki Brasil project (wikki.com.br)
     \\/     M anipulation  | Version:   dev
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


solvers
{
    "alpha.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 1;
        solver          diagonal;
    }

    p_rgh
    {
        solver          PCG;
        preconditioner
        {
            preconditioner          GAMG;
            smoother                DIC;
            nPreSweeps              0;
            nPostSweeps             2;
            nFinestSweeps           2;
            cacheAgglomeration      true;
            nCellsInCoarsestLevel   5;
            agglomerator            faceAreaPair;
            mergeLevels             1;
        }
        tolerance        1e-08;
        relTol           1e-04;
        minIter          1;
        maxIter          20;
    }

    p_rghFinal
    {
        $p_rgh
        minIter          1;
        relTol           0;
        tolerance        1e-08;
    }

    "U.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-6;
        relTol          0;
        minIter         1;
    }

    "(e|h).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-6;
        relTol          0;
        minIter         1;
        maxIter         20;
    }

    "(k|epsilon|Theta).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-8;
        relTol          0;
        minIter         1;
    }

    "Yi.*"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-6;
        relTol          0;
        minIter         1;
        residualAlpha   1e-8;
    }
}

PIMPLE
{
    faceMomentum                yes;
    fluidStaticInitialisation   yes;

    nFluidStaticCorrectors      5;
    nOuterCorrectors            5;  // máximo de iterações do acoplamento
    nCorrectors                 1;
    nNonOrthogonalCorrectors    0;

    outerCorrectorResidualControl
    {
        p_rgh
        {
            tolerance   1e-03;
            relTol      0;
        }
    }
}

relaxationFactors
{
    fields
    {
        p_rgh           1;
        p_rghFinal      1;
        "U.*"           1;
        "UFinal.*"      1;
    }
    equations
    {
        "U.*"           1;
        "UFinal.*"      1;
    }
}


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