Monitor

Monitor

Monitor is set in functions dictionary in the system/controlDict file.

Force

functions
{
    ...
    <name of forces>
    {
        type            forces;
        libs    ("/baram/solvers/openfoam/lib/libforces.so");
        patches
        (
            <patch name 1>
            ...
        );
        CofR            (<x> <x> <x>);
        updateHeader    false;
        log             false;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   <value>;
    }
    <name of force coefficients>
    {
        type            forceCoeffs;
        libs    ("/baram/solvers/openfoam/lib/libforces.so");
        patches
        (
            <patch name 1>
            ...
        );
        coefficients    (Cd Cl CmPitch);
        rho             rho;
        Aref            <value>;
        lRef            <value>;
        magUInf         <value>;
        rhoInf          <value>;
        dragDir         (<x-dir> <y-dir> <z-dir>);
        liftDir         (<x-dir> <y-dir> <z-dir>);
        CofR            (<x> <y> <z>);
        updateHeader    false;
        log             false;
        pRef            <value>;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   <value>;
    }
}

Write Interval is set at writeInterval. Drag Direction is set at dragDir, Lift Direction is at liftDir, Center of Rotation is at CofR. Selected Boundaries are set at patches.

Point

functions
{
    ...
    <name>
    {
        type            probes;
        libs    ("/baram/solvers/openfoam/lib/libsampling.so");
        fields          (<field>);
        probeLocations  ( (<x> <y> <z>) );
        updateHeader    false;
        log             false;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   <value>;
    }
}

writeInterval for Write Interval, fields for Field, probeLocations for Coordidate

Surface

functions
{
    ...
    <name>
    {
        type            surfaceFieldValue;
        libs    ("/baram/solvers/openfoam/lib/libfieldFunctionObjects.so");
        regionType      patch;
        name            <patch name>;
        surfaceFormat   none;
        fields          (<field>);
        operation       <value>;
        writeFields     false;
        updateHeader    false;
        log             false;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   <value>;
    }
}

writeInterval for Write Interval, fields for Field Variable, operation for Report Type, name for Surface

Volume

functions
{
    ...
    <name>
    {
        type            volFieldValue;
        libs    ("/baram/solvers/openfoam/lib/libfieldFunctionObjects.so");
        regionType      cellZone;
        name            <cel zone name>;
        fields          (<field>);
        operation       <value>;
        writeFields     false;
        updateHeader    false;
        log             false;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   <value>;
    }
}

writeInterval for Write Interval, fields for Field Variable, operation for Report Type, name for Volume

* When monitoring components of a vector such as velocity, since fields like Ux, Uy, and Uz are not available, use the components function to create these fields.

functions
{
    ...
    <name>
    {
        type            components;
        libs    (fieldFunctionObjects);
        region      <regionName>;
        field          U;
        updateHeader    false;
        log             false;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    none;
    }
}

* When monitoring the magnitude of a vector such as velocity, use the mag function to create the corresponding field mag(U).

functions
{
    ...
    <name>
    {
        type            mag;
        libs    (fieldFunctionObjects);
        region      <regionName>;
        field          U;
        updateHeader    false;
        log             false;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    none;
    }
}

Residual

To create and save residual data, use functions dictionary in the system/controlDict file.

fields are depend on solver.

functions
{
    ...
    <name>
    {
        type                solverInfo;
        libs    ("/baram/solvers/openfoam/lib/libutilityFunctionObjects.so");
        executeControl      timeStep;
        executeInterval     1;
        writeResidualFields no;
        fields
        (
            U
            p_rgh
            k
            epsilon
            ...
        );
    }
}