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

probes
{
    // Where to load it from
    libs            ("libsampling.so");

    type            probes;

    // Name of the directory for probe data
    name            probes;

    // Write at same frequency as fields
    writeControl    writeTime;
    writeInterval   1;

    // Fields to be probed
    fields
    (
        p U
    );

    probeLocations
    (
        ( 1e-06 0 0.01 )        // at inlet
        (0.21 -0.20999 0.01)  // at outlet1
        (0.21 0.20999 0.01)   // at outlet2
        (0.21 0 0.01)         // at central block
    );
}

#includeFunc patchFlowRate(patch=outlet1)
#includeFunc faceZoneFlowRate(faceZone=fz1)
#includeFunc patchFlowRate(patch=outlet2)
#includeFunc faceZoneFlowRate(faceZone=fz2)

#includeFunc writeObjects(kEpsilon:G)

cloud
{
    type        kinematicParticleCloud;
    libs        ("libLagrangianCloud.so");
    executeControl timeStep;
    writeControl writeTime;
}

cloudAge
{
    type        cloudAge;
    libs        ("libLagrangianCloudFunctionObjects.so");
    cloud       cloud;
}

cloudDistribution
{
    type        LagrangianDistribution;
    libs        ("libLagrangianFunctionObjects.so");
    Lagrangian  cloud;
    fields      (d);
    nBins       20;
    setFormat   raw;
    writeControl writeTime;
}

cloudInletDistribution
{
    type        cloudSurfaceDistribution;
    libs        ("libLagrangianCloudFunctionObjects.so");
    cloud       cloud;
    patch       inlet;
    fields      (d);
    nBins       20;
    setFormat   raw;
    writeControl writeTime;
}

cloudOutlet1Distribution
{
    $cloudInletDistribution;
    patch       outlet1;
    fields      (d U);
}

cloudOutlet2Distribution
{
    $cloudOutlet1Distribution;
    patch       outlet2;
}

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