/*--------------------------------*- C++ -*----------------------------------*\
|                                                                             |
|                Generated by the CfdOF workbench for FreeCAD                 |
|                      https://github.com/jaheyns/CfdOF                       |
|                                                                             |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

SIMPLE
{
    // Non-orthogonal correctors for robustness on tet meshes. Porous baffles require a
    // higher number of corrections.
    nNonOrthogonalCorrectors 5;
    consistent no;  // Setting this impairs stability of porous baffles

    residualControl
    {
        "(p|p_rgh)" 0.001;
        U 0.001;
        h 0.001;
        "(k|epsilon|omega|f|v2|nuTilda|gammaInt|ReThetat)" 0.001;
    }
    pRefValue   0;
    pRefCell    0;
}

potentialFlow
{
    nNonOrthogonalCorrectors 8;

    PhiRefValue 0;
    PhiRefCell 0;
}

solvers
{
    "(p|p_rgh|pcorr)"
    {
        solver           GAMG;
        tolerance        1e-8;
        relTol           0.01;
        smoother         symGaussSeidel;
        nPreSweeps       0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator     faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
        maxIter          20;
    }

    "(pFinal|p_rghFinal|pcorrFinal)"
    {
        $p;
        relTol          0;
    }

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

    UFinal
    {
        $U;
        relTol           0;
    }

    h
    {
        solver           smoothSolver;
        smoother         symGaussSeidel;
        tolerance        1e-8;
        relTol           0.1;
        nSweeps          1;
    }

    hFinal
    {
        $h;
        relTol           0;
    }

    "(k|omega|epsilon|nuTilda|gammaInt|ReThetat)"
    {
        solver           smoothSolver;
        smoother         GaussSeidel;
        tolerance        1e-8;
        relTol           0.1;
        nSweeps          1;
        minIter          1;
    }

    "(k|omega|epsilon|nuTilda|gammaInt|ReThetat)Final"
    {
        $k;
        relTol          0;
    }

    Phi
    {
        solver           GAMG;
        tolerance        1e-7;
        relTol           0.01;
        smoother         GaussSeidel;
        nPreSweeps       0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator     faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    }
}

relaxationFactors
{
    // Conservative settings to solve reliably on bad
    // meshes
    equations
    {
        U               0.7;
        h               0.7;
        k               0.7;
        epsilon         0.7;
    }

    fields
    {
        p               0.3;
        p_rgh           0.3;
        rho             0.5;
    }
}

cache
{
    grad(U);
}

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