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

application     foamRun;

solver          compressibleVoF;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.1;

deltaT          1e-5;

writeControl    adjustableRunTime;

writeInterval   1e-3;

purgeWrite      0;

writeFormat     binary;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo           0.25;

maxAlphaCo      0.25;

functions
{
    #includeFunc cutPlaneSurface
    (
        point=(0 0 0),
        normal=(0 0 1),
        interpolate=no,
        fields=(alpha.water p_rgh p T U k epsilon)
    )

    #includeFunc isoSurface
    (
        isoField=alpha.water,
        isoValue=0.5,
        writeEmpty=yes
    )

    #includeFunc patchSurface(patch=".*(Walls|NonCouple)")

    cavitationVolume
    {
        type            volFieldValue;
        libs            ("libfieldFunctionObjects.so");

        writeControl    timeStep;
        writeInterval   1;
        writeFields     false;

        select          all;

        operation       volIntegrate;

        fields          (alpha.vapour);
    }
}


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