/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM v2512                                  |
|  \\    /   O peration     | fvSolution                                      |
|   \\  /    A nd           | Solver and PIMPLE Settings                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

// Linear solver and PIMPLE algorithm settings

FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}

// Linear solver settings

solvers
{
    // Mesh displacement solver

    cellDisplacement
    {
        solver          PCG;
        preconditioner  DIC;

        tolerance       1e-06;
        relTol          0;
        maxIter         100;
    }

    // Pressure solver

    p
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-5;
        relTol          0.01;
        maxIter         10;
    }

    // Final pressure solver

    pFinal
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-7;
        relTol          0.01;
    }

    // Pressure correction solver

    pcorr
    {
        $pFinal;
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-7;
        relTol          0.02;
    }

    // Final pressure correction solver

    pcorrFinal
    {
        $pcorr;
        relTol          0.1;
        tolerance       1e-7;
    }

    // Velocity and turbulence solvers

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

    // Final iteration solvers

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

// PIMPLE algorithm settings

PIMPLE
{
    momentumPredictor   no;
    oversetAdjustPhi    true;

    nOuterCorrectors    10;
    nCorrectors         1;
    nNonOrthogonalCorrectors 0;

    massFluxInterpolation true;
    ddtCorr             false;

    turbOnFinalIterOnly false;

    moveMeshOuterCorrectors yes;
}

// Relaxation factors

relaxationFactors
{
    fields
    {
        p               1;
    }

    equations
    {
        "(U|k|omega)"   1;
        ".*Final"       1.0;
    }
}

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