/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     pimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         30100;

deltaT          5;

writeControl    runTime;

writeInterval   100;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    forceCoeffs_semicirc
    {
    type        forceCoeffs;
    libs ( "libforces.so" );
    writeControl timeStep;
    writeInterval 1;

    patches     ("semicirccylinder");
    pName p;
    UName U;
    rho         rhoInf;   // Indicates incompressible
    log         true;
    rhoInf      1;        // Redundant for incompressible
    liftDir     (0 1 0);  // Lift Direction
    dragDir     (1 0 0);  // Drag Direction
    CofR        (0 0 0);  // Axle midpoint on ground
    pitchAxis   (0 0 1);
    magUInf     0.001855;       // Velocity
    lRef        1;     // Wheelbase length
    Aref        1.04;    // Cross section Area 
    }


    forceCoeffs_circ
    {
    type        forceCoeffs;
    libs ( "libforces.so" );
    writeControl timeStep;
    writeInterval 1;

    patches     ("circcylinder");
    pName p;
    UName U;
    rho         rhoInf;   // Indicates incompressible
    log         true;
    rhoInf      1;        // Redundant for incompressible
    liftDir     (0 1 0);  // Lift Direction
    dragDir     (1 0 0);  // Drag Direction
    CofR        (0 0 0);  // Axle midpoint on ground
    pitchAxis   (0 0 1);
    magUInf     0.001855;       // Velocity
    lRef        1;     // Wheelbase length
    Aref        1.04;    // Cross section Area 
    }


    heatTransferCoeff1
    {
        // Mandatory entries (unmodifiable)
        type            heatTransferCoeff;
        libs            ("libheatTransferCoeff.so");
        field           T;
        patches         ( "semicirccylinder" );
        htcModel        fixedReferenceTemperature;
        // Conditional mandatory entries (runtime modifiable)
        Tref            300;
        UInf            (0.001855 0 0);
        Cp              CpInf;
        CpInf           1008;
        rho             rhoInf;
        rhoInf          1.121;

        // Optional (inherited) entries
        result          h;
        region          region0;
        enabled         true;
        log             true;
        timeStart       0;
        timeEnd         1000;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   1;
    }
}
// ************************************************************************* //
