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

type populationBalanceMultiphaseSystem;

phases (air1 air2 water);

populationBalances (bubbles);

air1
{
    type            purePhaseModel;
    diameterModel   velocityGroup;
    velocityGroupCoeffs
    {
        populationBalance    bubbles;

        formFactor      0.5235987756;

        sizeGroups
        (
            f0{d  1.00e-3; value 0;}
            f1{d  1.08e-3; value 0;}
            f2{d  1.16e-3; value 0;}
            f3{d  1.25e-3; value 0;}
            f4{d  1.36e-3; value 0;}
            f5{d  1.46e-3; value 0;}
            f6{d  1.58e-3; value 0;}
            f7{d  1.71e-3; value 0;}
            f8{d  1.85e-3; value 0;}
            f9{d  2.00e-3; value 0;}
            f10{d  2.16e-3; value 0;}
            f11{d  2.33e-3; value 1.0;}
        );
    }

    residualAlpha   1e-6;
}

air2
{
    type            purePhaseModel;
    diameterModel   velocityGroup;
    velocityGroupCoeffs
    {
        populationBalance    bubbles;

        formFactor      0.5235987756;

        sizeGroups
        (
            f12{d  2.51e-3; value 0;}
            f13{d  2.72e-3; value 0.25;}
            f14{d  2.93e-3; value 0.5;}
            f15{d  3.17e-3; value 0.25 ;}
            f16{d  3.42e-3; value 0;}
            f17{d  3.70e-3; value 0;}
            f18{d  4.00e-3; value 0;}
            f19{d  4.32e-3; value 0;}
            f20{d  4.66e-3; value 0;}
            f21{d  5.03e-3; value 0;}
        );
    }

    residualAlpha   1e-6;
}

water
{
    type            purePhaseModel;
    diameterModel   constant;
    constantCoeffs
    {
        d               1e-4;
    }

    residualAlpha   1e-6;
}

populationBalanceCoeffs
{
    bubbles
    {
        continuousPhase water;

        coalescenceModels
        (
            hydrodynamic
            {
                C 0.25;
            }
        );

        binaryBreakupModels
        ();

        breakupModels
        (
            exponential
            {
                C 0.5;
                exponent 0.01;
                daughterSizeDistributionModel uniformBinary;
            }
        );

        driftModels
        (
            densityChange{}
        );

        nucleationModels
        ();
    }
}

blending
{
    default
    {
        type            linear;
        minFullyContinuousAlpha.air1 0.7;
        minPartlyContinuousAlpha.air1 0.5;
        minFullyContinuousAlpha.air2 0.7;
        minPartlyContinuousAlpha.air2 0.5;
        minFullyContinuousAlpha.water 0.7;
        minPartlyContinuousAlpha.water 0.5;
    }

    drag
    {
        type            linear;
        minFullyContinuousAlpha.air1 0.7;
        minPartlyContinuousAlpha.air1 0.3;
        minFullyContinuousAlpha.air2 0.7;
        minPartlyContinuousAlpha.air2 0.3;
        minFullyContinuousAlpha.water 0.7;
        minPartlyContinuousAlpha.water 0.3;
    }
}

surfaceTension
(
    (air1 and water)
    {
        type            constant;
        sigma           0.07;
    }

    (air2 and water)
    {
        type            constant;
        sigma           0.07;
    }
);

interfaceCompression
();

aspectRatio
(
    (air1 in water)
    {
        type            constant;
        E0              1.0;
    }

    (water in air1)
    {
        type            constant;
        E0              1.0;
    }

    (air2 in water)
    {
        type            constant;
        E0              1.0;
    }

    (water in air2)
    {
        type            constant;
        E0              1.0;
    }
);

drag
(
    (air1 in water)
    {
        type            SchillerNaumann;
        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }

    (water in air1)
    {
        type            SchillerNaumann;
        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }

    (air1 and water)
    {
        type            segregated;
        m               0.5;
        n               8;
        swarmCorrection
        {
            type        none;
        }
    }

    (air2 in water)
    {
        type            SchillerNaumann;
        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }

    (water in air2)
    {
        type            SchillerNaumann;
        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }

    (air2 and water)
    {
        type            segregated;
        m               0.5;
        n               8;
        swarmCorrection
        {
            type        none;
        }
    }

    (air1 in air2)
    {
        type            SchillerNaumann;
        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }

    (air2 in air1)
    {
        type            SchillerNaumann;

        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }

    (air1 and air2)
    {
        type            segregated;
        m               0.5;
        n               8;
        swarmCorrection
        {
            type        none;
        }
    }
);

virtualMass
(
    (air1 in water)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }

    (water in air1)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }

    (air2 in water)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }

    (water in air2)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }

    (air1 in air2)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }

    (air1 in air2)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }
);

heatTransfer
(
    (air1 in water)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }

    (water in air1)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }

    (air2 in water)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }

    (water in air2)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }

    (air1 in air2)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }

    (air2 in air1)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }
);

phaseTransfer
();

lift
();

wallLubrication
();

turbulentDispersion
();

// Minimum allowable pressure
pMin            10000;


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