    Info<< "Reading field p\n" << endl;
    volScalarField p
    (
        IOobject
        (
            "p",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

    Info<< "Reading field U\n" << endl;
    volVectorField U
    (
        IOobject
        (
            "U",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

    #include "createPhi.H"


    label pRefCell = 0;
    scalar pRefValue = 0.0;
    setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);


    Info<< "Reading field pa\n" << endl;
    volScalarField pa
    (
        IOobject
        (
            "pa",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

    Info<< "Reading field Ua\n" << endl;
    volVectorField Ua
    (
        IOobject
        (
            "Ua",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

    #include "createPhia.H"

    volScalarField sens
    (
        IOobject
        (
            "sensitivities",
            runTime.timeName(),
            mesh,
            IOobject::READ_IF_PRESENT,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionedScalar("sensitivities",dimensionSet(0,0,0,0,0,0,0),0)

    );




    label paRefCell = 0;
    scalar paRefValue = 0.0;
    setRefCell
    (
        pa,
        mesh.solutionDict().subDict("SIMPLE"),
        paRefCell,
        paRefValue
    );


    singlePhaseTransportModel laminarTransport(U, phi);

    autoPtr<incompressible::RASModel> turbulence
    (
        incompressible::RASModel::New(U, phi, laminarTransport)
    );


    dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0);
    dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0);

    dimensionedScalar lambda(laminarTransport.lookup("lambda"));

    const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
    //const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
    //
    //
    // Reading adjoint properties
    IOdictionary adjDict
    (
        IOobject
        (
            "adjointProperties",
            runTime.constant(),
            mesh,
            IOobject::MUST_READ,
             IOobject::NO_WRITE
         )
     );

    word patchName = adjDict.lookup("patchName");
    label patchID = mesh.boundaryMesh().findPatchID(patchName);
    scalar Adim  = adjDict.lookupOrDefault<scalar>("A",1.);
    scalar rdim = adjDict.lookupOrDefault<scalar>("rho",1.);
    scalar Udim   = adjDict.lookupOrDefault<scalar>("U",1.);

    OFstream forceFile ("force.txt");

