/*--------------------------------*- C++ -*----------------------------------*\
  Guide 10 - monitoring functions for a NEW copy of buoyantCavity.
  Save as <case>/system/functions before running the solver.
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      functions;
}

// Integrated wall heat flow Q [W] on the hot and cold walls every 10 iterations.
// Positive values: heat entering the fluid. No field is written (writeFields false).
wallHeatFluxMonitor
{
    type            wallHeatFlux;
    libs            ("libfieldFunctionObjects.so");
    patches         (hot cold);
    executeControl  timeStep;
    executeInterval 10;
    writeControl    timeStep;
    writeInterval   10;
    writeFields     false;
    log             yes;
}

// Initial residuals of the solved fields, one line per iteration.
#includeFunc residuals(p_rgh, U, h, k, omega)

// Maximum velocity magnitude: a cheap indicator of the circulation strength.
#includeFunc cellMaxMag(name=UmaxMag, U)

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