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

type    thermalPhaseChangePopulationBalanceMultiphaseSystem;

phases (gas liquid);

populationBalances (bubbles);

gas
{
    type            purePhaseModel;
    diameterModel   velocityGroup;

    velocityGroupCoeffs
    {
        populationBalance    bubbles;

        shapeModel           spherical;

        sizeGroups
        (
            f1  {dSph  1.0e-4; value 0     ;}
            f2  {dSph  1.2e-4; value 0     ;}
            f3  {dSph  1.44e-4; value 0    ;}
            f4  {dSph  1.728e-4; value 0   ;}
            f5  {dSph  2.074e-4; value 0   ;}
            f6  {dSph  2.49e-4; value 0    ;}
            f7  {dSph  2.99e-4; value 0    ;}
            f8  {dSph  3.6e-4; value 1.0   ;}
            f9  {dSph  4.3e-4; value 0     ;}
            f10 {dSph  5.16e-4; value 0    ;}
            f11 {dSph  6.19e-4; value 0    ;}
            f12 {dSph  7.43e-4; value 0    ;}
            f13 {dSph  8.92e-4; value 0    ;}
            f14 {dSph  1.07e-3; value 0    ;}
            f15 {dSph  1.28e-3; value 0    ;}
            f16 {dSph  1.54e-3; value 0    ;}
            f17 {dSph  1.85e-3; value 0    ;}
            f18 {dSph  2.22e-3; value 0    ;}
            f19 {dSph  2.67e-3; value 0    ;}
            f20 {dSph  3.19e-3; value 0    ;}
            f21 {dSph  3.85e-3; value 0    ;}
            f22 {dSph  4.6e-3; value 0     ;}
            f23 {dSph  5.52e-3; value 0    ;}
            f24 {dSph  6.62e-3; value 0    ;}
            f25 {dSph  7.95e-3; value 0    ;}
            f26 {dSph  9.54e-3; value 0    ;}
            f27 {dSph  1.14e-2; value 0    ;}
        );
    }

    residualAlpha   1e-6;
}

liquid
{
    type            purePhaseModel;
    diameterModel   constant;
    constantCoeffs
    {
        d               0.00045;
    }
    Sc              0.7;

    residualAlpha   1e-6;
}

populationBalanceCoeffs
{
    bubbles
    {
        continuousPhase liquid;

        coalescenceModels
        (
            PrinceBlanch
            {
                turbulence on;
                buoyancy   on;
                laminarShear off;
                C1  0.05;
            }
        );

        binaryBreakupModels
        (
            LehrMilliesMewes{}
        );

        breakupModels
        ();

        driftModels
        (
            phaseChange
            {
                pairs   ((gas and liquid));
                dmdtf   thermalPhaseChange:dmdtf;
            }

            densityChange
            {
            }
        );

        nucleationModels
        (
            wallBoiling
            {
                velocityGroup gas;
            }
        );
    }
}

drag
(
    (gas in liquid)
    {
        type            IshiiZuber;

        swarmCorrection
        {
            type        none;
        }
    }
);

virtualMass
(
    (gas in liquid)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }
);

heatTransfer.gas
(
    (gas in liquid)
    {
        type spherical;
    }
);

heatTransfer.liquid
(
    (gas in liquid)
    {
        type RanzMarshall;
    }
);

lift
(
    (gas in liquid)
    {
        type wallDamped;

        lift
        {
            type Tomiyama;
            Cl 0.288;
        }

        wallDamping
        {
            type    cosine;
            Cd      1.0;
            zeroWallDist 0.0002;
        }
    }
);

wallLubrication
(
   (gas in liquid)
    {
        type            Antal;
        Cw1             -0.01;
        Cw2             0.05;
    }
);

turbulentDispersion
(
    (gas in liquid)
    {
        type                LopezDeBertodano;
        Ctd                 1.0;
        residualAlpha       1e-3;
    }
);

blending
{
    default
    {
        type            none;
        continuousPhase liquid;
    }
}

aspectRatio
();

saturation
(
    (gas and liquid)
    {
        type function1;

        function scale;

        xScale 1e-6;
        scale   1;
        value
        {
            type                tableFile;
            format              csv;
            nHeaderLine         1;
            refColumn           1;
            componentColumns    (0);
            mergeSeparators     no;
            file "$FOAM_TUTORIALS/resources/thermoData/wallBoiling-saturation.csv";
            outOfBounds         clamp;
            interpolationScheme linear;
        }
    }
);

surfaceTension
(
    (gas and liquid)
    {
        type            constant;
        sigma           0.00176574;
    }
);

phaseTransfer
();

interfaceCompression
();

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