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

// est\'a sendo instanciado no solver, mas n\~ao \'e usado.
coupledSolvers
{
    solveCoupledAlphas          false;

    Alphas
    {
        saveSystem                  true;
        robustSumCheck              true;
        updatePrecondFrequency      1;
        updateMatrixCoeffs          true;
    }
}

solvers
{
    "alpha.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 1;
        cAlpha          2;

        // multiphaseEulerFoam n\~ao tem suporte
        MULESCorr       true;
        nLimiterIter    3;

        // To be used with MULESCorr = true
        solver          PBiCGStab;
        preconditioner
        {
            preconditioner          GAMG;
            smoother                DILU;
            cacheAgglomeration      true;
            nCellsInCoarsestLevel   40;
            agglomerator            faceAreaPair;
            mergeLevels             1;
        }
        tolerance       1e-12;
        relTol          1.0e-8;
        minIter         1;
    }

    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-9;
        relTol           1e-04;
        minIter          0;
    }
    
    p_rghFinal
    {
        $p_rgh;
    }

    "(U.*|e|h).*"
    {
        solver          PBiCGStab;
        preconditioner
        {
            preconditioner          GAMG;
            smoother                DILU;
            cacheAgglomeration      true;
            nCellsInCoarsestLevel   15;
            agglomerator            faceAreaPair;
            mergeLevels             1;
        }
        tolerance       1e-12;
        relTol          1.0e-8;
        minIter         0;
    }

    "Yi.*"
    {
        $h;
        residualAlpha   1e-8;
    }
}

PIMPLE
{
    faceMomentum                yes;

    fluidStaticInitialisation   no;
    nFluidStaticCorrectors      5;

    nOuterCorrectors            1;
    nCorrectors                 4;
    nNonOrthogonalCorrectors    0;
        
    outerCorrectorResidualControl
    {
        p_rgh
        {
            tolerance 1e-06;
            relTol 0;
        }
    }
}

relaxationFactors
{
    fields
    {
        ".*"            1;
    }
    equations 
    {
        ".*"            1;
    }
}


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