/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2512                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      optimisationDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

optimisationManager singleRun;

primalSolvers
{
    op1
    {
        active                 true;
        type                   incompressible;
        solver                 simple;
        solutionControls
        {
            nIters 3000;
            residualControl
            {
                "p.*"       5.e-7;
                "U.*"       5.e-7;
            }
        }
    }
}

adjointManagers
{
    adjManager1
    {
        primalSolver             op1;
        adjointSolvers
        {
            as1
            {
                // choose adjoint solver
                //----------------------
                active                 false;
                type                   incompressible;
                solver                 adjointSimple;
                computeSensitivities   false;
                // manage objectives
                //------------------
                objectives
                {
                    type  incompressible;
                    objectiveNames
                    {
                        losses
                        {
                            weight          1.; 
                            type            PtLosses;
                            patches         (inlet "outlet.*");
                            normalise       true;
                        }
                    }
                }
                // ATC treatment
                //--------------
                ATCModel
                {
                    ATCModel        standard;
                }
                // solution control
                //------------------
                solutionControls
                {
                    nIters 300;
                    residualControl
                    {
                        "pa.*"       5.e-7;
                        "Ua.*"       5.e-7;
                    }
                }
            }
        }
    }
}

/*
optimisation
{
    designVariables
    {
        type dynamicTopO;
        sensitivityType topO;
        marchingCoeffs
        {
            seedPatches  (designWall);
            marchingStep 2;
        }
        fixedZeroPorousZones   (IEntranceSet OEntranceSet OREntranceSet);
        regularisation
        {
            regularise    false;
        }
        betaMax    2500;
    }
    updateMethod
    {
        method MMA;
        eta 1;
    }
}
*/

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