CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Bubble column with sprayFoam (http://www.cfd-online.com/Forums/openfoam-solving/114900-bubble-column-sprayfoam.html)

dav.dap83 March 19, 2013 14:11

Bubble column with sprayFoam
 
Hi everyone,

I want to reproduce a bubble column inside water with sprayFoam, namely a water tank with an air nozzle on the bottom. The reason why I want to use sprayFoam instead of a VOF model is that my computational domain is a large tank (about 10 m diameter, 6 m height), and bubbles dimensions are much smaller than cells size.

I am encountering a problem, namely the bubbles just fall towards the bottom instead of rising. Here are my ./constant files:

thermophysicalProperties:
Code:

thermoType      hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;

CHEMKINFile    "$FOAM_CASE/constant/chemkin/chem.inp";

CHEMKINThermoFile "~OpenFOAM/thermoData/therm.dat";

inertSpecie    CO2 CH4;


liquids
{
    liquidComponents ( H2O );
    H2O
    {
        defaultCoeffs  yes;
    }
}

solids
{
    solidComponents ( );
}

sprayCloudProperties:
Code:

solution
{
    active          true;
    coupled        true;
    transient      yes;
    cellValueSourceCorrection on;

    sourceTerms
    {
        schemes
        {
            rho            explicit 1;
            U              explicit 1;
            Yi              explicit 1;
            hs              explicit 1;
        }
    }

    interpolationSchemes
    {
        rho            cell;
        U              cellPoint;
        mu              cell;
        T              cell;
        Cp              cell;
        p              cell;
    }

    integrationSchemes
    {
        U              Euler;
        T              analytical;
    }
}


constantProperties
{
    parcelTypeId    1;

    rhoMin          1e-15;
    TMin            300;
    pMin            1000;
    minParticleMass 1e-15;

    rho0            1;
    T0              300;
    Cp0            4187;

    youngsModulus  1e9;
    poissonsRatio  0.35;

    epsilon0        1;
    f0              0.5;
    Pr              0.7;
    Tvap            373;
    Tbp            373;

    constantVolume  false;
}


subModels
{
    particleForces
    {
        pressureGradient
        {
            U U;
        };
        sphereDrag;
        gravity;
    }

    injectionModel  coneNozzleInjection;

    dispersionModel none;

    patchInteractionModel standardWallInteraction;

    heatTransferModel none;

    compositionModel singlePhaseMixture;

    phaseChangeModel none;

    surfaceFilmModel none;

    atomizationModel none;

    breakupModel    none;

    stochasticCollisionModel none;

    radiation      off;
    gravity        on;

    coneNozzleInjectionCoeffs
    {
        SOI            0;
        massTotal      6.0e-8;
        parcelBasisType mass;
        injectionMethod disc;
        flowType        flowRateAndDischarge;
        outerDiameter  2e-3;
        innerDiameter  0;
        duration        0.2;
        position        ( 0 0.005 0 );
        direction      ( 0 1 0 );
        parcelsPerSecond 20;
        flowRateProfile table
        (
            (0  3e-7)
            (0.2 3e-7)
        );

        Cd              constant 0.9;

        thetaInner      constant 0.0;
        thetaOuter      constant 10.0;

        sizeDistribution
        {
            type        RosinRammler;

            RosinRammlerDistribution
            {
                minValue        1e-06;
                maxValue        0.00015;
                d              0.00015;
                n              3;
            }
        }
    }

    standardWallInteractionCoeffs
    {
        type            rebound;
    }

    RanzMarshallCoeffs
    {
        BirdCorrection  true;
    }

    singlePhaseMixtureCoeffs
    {
        phases
        (
            liquid
            {
                H2O              1;
            }
        );
    }

    liquidEvaporationBoilCoeffs
    {
        enthalpyTransfer enthalpyDifference;

        activeLiquids    ( H2O );
    }

    ReitzDiwakarCoeffs
    {
        solveOscillationEq yes;
        Cbag            6;
        Cb              0.785;
        Cstrip          0.5;
        Cs              10;
    }

    TABCoeffs
    {
        y0              0;
        yDot0          0;
        Cmu            10;
        Comega          8;
        WeCrit          12;
    }
}


cloudFunctions
{}

Thank you in advance for any help.

ris March 19, 2013 14:53

Hello,

If you are injecting air into water, should the liquid you specified in thermophysical properties/sprayCloudProperties be AIR and not H2O. Then defining H2O in your 0/ folder as:

internalField uniform 1.0;

unless I have misunderstood your case.

regards,

ris

dav.dap83 March 20, 2013 06:39

I modified sprayCloudProperties in the following way:
Code:

solution
{
    active          true;
    coupled        true;
    transient      yes;
    cellValueSourceCorrection on;

    sourceTerms
    {
        schemes
        {
            rho            explicit 1;
            U              explicit 1;
            Yi              explicit 1;
            hs              explicit 1;
        }
    }

    interpolationSchemes
    {
        rho            cell;
        U              cellPoint;
        mu              cell;
        T              cell;
        Cp              cell;
        p              cell;
    }

    integrationSchemes
    {
        U              Euler;
        T              analytical;
    }
}


constantProperties
{
    parcelTypeId    1;

    rhoMin          1e-15;
    TMin            300;
    pMin            1000;
    minParticleMass 1e-15;

    rho0            1;
    T0              300;
    Cp0            4187;

    youngsModulus  1e9;
    poissonsRatio  0.35;

    epsilon0        1;
    f0              0.5;
    Pr              0.7;
    Tvap            373;
    Tbp            373;

    constantVolume  false;
}


subModels
{
    particleForces
    {
        pressureGradient
        {
            U U;
        };
        sphereDrag;
        gravity;
    }

    injectionModel  coneNozzleInjection;

    dispersionModel none;

    patchInteractionModel standardWallInteraction;

    heatTransferModel none;

    compositionModel singlePhaseMixture;

    phaseChangeModel none;

    surfaceFilmModel none;

    atomizationModel none;

    breakupModel    none; // ReitzKHRT;

    stochasticCollisionModel none;

    radiation      off;
    gravity        on;

    coneNozzleInjectionCoeffs
    {
        SOI            0;
        massTotal      6.0e-8;
        parcelBasisType mass;
        injectionMethod disc;
        flowType        flowRateAndDischarge;
        outerDiameter  2e-3;
        innerDiameter  0;
        duration        0.2;
        position        ( 0 0.005 0 );
        direction      ( 0 1 0 );
        parcelsPerSecond 20;
        flowRateProfile table
        (
            (0  3e-7)
            (0.2 3e-7)
        );

        Cd              constant 0.9;

        thetaInner      constant 0.0;
        thetaOuter      constant 10.0;

        sizeDistribution
        {
            type        RosinRammler;

            RosinRammlerDistribution
            {
                minValue        1e-06;
                maxValue        0.00015;
                d              0.00015;
                n              3;
            }
        }
    }

    standardWallInteractionCoeffs
    {
        type            rebound;
    }

    RanzMarshallCoeffs
    {
        BirdCorrection  true;
    }

    singlePhaseMixtureCoeffs
    {
        phases
        (
            gas
            {
                CO2              1;
            }
        );
    }

    ReitzDiwakarCoeffs
    {
        solveOscillationEq yes;
        Cbag            6;
        Cb              0.785;
        Cstrip          0.5;
        Cs              10;
    }

    TABCoeffs
    {
        y0              0;
        yDot0          0;
        Cmu            10;
        Comega          8;
        WeCrit          12;
    }
}


cloudFunctions
{}

and thermophysicalProprerties as:
Code:

thermoType      hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;

CHEMKINFile    "$FOAM_CASE/constant/chemkin/chem.inp";

CHEMKINThermoFile "~OpenFOAM/thermoData/therm.dat";

inertSpecie    CO2 CH4;

liquids
{
    liquidComponents ( H2O );
    H2O
    {
        defaultCoeffs  yes;
    }
}

gases
{
    gasComponents ( CO2 );
    CO2
    {
        defaultCoeffs  yes;
    }
}

solids
{
    solidComponents ( );
}

but nothing changes.

I also tried to modify thermophysicalProperties as follows:
Code:

thermoType      hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;

CHEMKINFile    "$FOAM_CASE/constant/chemkin/chem.inp";

CHEMKINThermoFile "~OpenFOAM/thermoData/therm.dat";

inertSpecie    CO2 CH4;


liquids
{
    liquidComponents ( );
}

gases
{
    gasComponents ( CO2 );
    CO2
    {
        defaultCoeffs  yes;
    }
}

solids
{
    solidComponents ( );
}

but the solver crashes as soon as the first parcel is injected into the system. The error message is:
Code:

Solving cloud sprayCloud
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::liquidMixtureProperties::X(Foam::Field<double> const&) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libliquidMixtureProperties.so"
#4 
 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sprayFoam"
#5 
 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sprayFoam"
#6 
 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sprayFoam"
#7 
 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sprayFoam"
#8 
 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sprayFoam"
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 
 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/sprayFoam"
Segmentation fault (core dumped)


ris March 20, 2013 09:09

Hello,

The segmentation fault occurs as a result of removing the liquid from the thermophysical properties file.
Are the diameters of the bubbles constant? If yes make sure to change size distribution settings and the corresponding diameters in the sprayCloudProperties file.


regards,

ris

dav.dap83 March 20, 2013 11:31

I tried some modifications, but without success.

I modified constantVolume and sizeDistribution entries in sprayCloudProperties:
Code:

solution
{
    active          true;
    coupled        true;
    transient      yes;
    cellValueSourceCorrection on;

    sourceTerms
    {
        schemes
        {
            rho            explicit 1;
            U              explicit 1;
            Yi              explicit 1;
            hs              explicit 1;
        }
    }

    interpolationSchemes
    {
        rho            cell;
        U              cellPoint;
        mu              cell;
        T              cell;
        Cp              cell;
        p              cell;
    }

    integrationSchemes
    {
        U              Euler;
        T              analytical;
    }
}


constantProperties
{
    parcelTypeId    1;

    rhoMin          1e-15;
    TMin            300;
    pMin            1000;
    minParticleMass 1e-15;

    rho0            1;
    T0              300;
    Cp0            4187;

    youngsModulus  1e9;
    poissonsRatio  0.35;

    epsilon0        1;
    f0              0.5;
    Pr              0.7;
    Tvap            373;
    Tbp            373;

    constantVolume  true;
}


subModels
{
    particleForces
    {
        pressureGradient
        {
            U U;
        };
        sphereDrag;
        gravity;
    }

    injectionModel  coneNozzleInjection;
    dispersionModel none;
    patchInteractionModel standardWallInteraction;
    heatTransferModel none;
    compositionModel singlePhaseMixture;
    phaseChangeModel none;
    surfaceFilmModel none;
    atomizationModel none;
    breakupModel    none;
    stochasticCollisionModel none;

    radiation      off;
    gravity        on;
    pressureGradient on;

    coneNozzleInjectionCoeffs
    {
        SOI            0;
        massTotal      6.0e-8;
        parcelBasisType mass;
        injectionMethod disc;
        flowType        flowRateAndDischarge;
        outerDiameter  2e-3;
        innerDiameter  0;
        duration        0.2;
        position        ( 0 0.01 0 );
        direction      ( 0 1 0 );
        parcelsPerSecond 20;
        flowRateProfile table
        (
            (0  3e-7)
            (0.2 3e-7)
        );

        Cd              constant 0.9;

        thetaInner      constant 0.0;
        thetaOuter      constant 10.0;

        sizeDistribution
        {
            type        fixedValue;

            fixedValueDistribution
            {
                value        3e-3;
            }
        }
    }

    standardWallInteractionCoeffs
    {
        type            rebound;
    }

    singlePhaseMixtureCoeffs
    {
        phases
        (
            gas
            {
                CO2              1;
            }
        );
    }


cloudFunctions
{}

The entries massTotal, outerDiameter,duration, parcelsPerSecond and flowRateProfile table are tuned in order to have four parcles with diameter=3mm, density=1kg/m3 and inlet velocity=0.1m/s.

Dommy June 12, 2013 10:27

Hello dav.dap!

I was trying to do the same as you did but we both were wrong. For some reasons OpenFoam calculates the number of particles to inject in a different way.

If you choose
Quote:

parcelBasisType mass
this appears to be the calculation

Code:

case pbMass:
        {
            nP =
                volume/volumeTotal_
                *massTotal_/rho
                /(parcels*mathematicalConstant::pi/6.0*pow3(diameter));
            break;
        }

If you choose
Quote:

parcelBasisType number
this appears to be the calculation

Code:

case pbNumber:
        {
            nP = massTotal_/(rho*volumeTotal_);
            break;
        }

both from
Quote:

OpenFOAM-2.1.x/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection
with

Code:

volumeTotal_ = flowRateProfile_.integrate(0.0, duration_);
Until now I did not manage to figure out how this works and how I can inject the number of particles I want to - any help is welcome :)

dav.dap83 June 13, 2013 10:25

Hi,

I succeeded in describing rising bubbles by changing solver. For some reason sprayFoam seems to be unable do describe gas parcels inside a liquid phase; but reactingParcelFoam does. Just turn off all the thermophysics and chemistry and copy&paste injectionModels subdictionary into constant/reactingCloud1Properties.

Dommy June 17, 2013 08:15

Whats your problem with the liquid phase by using sprayFoam? It was mainly made (as the name says) for injecting diesel into air.

BTW: If you want to inject 3mm bubbles with 0,1 m/s at 1kg/m you should change parcelBasisType to fixed and sizeDistribution to fixedValue. Than just calculate the amount of particles by parcelsPerSecond * duration. It worked for me.

Code:

coneNozzleCoeffs
    {
        SOI            0;
        massTotal      6.0e-1;
        parcelBasisType fixed;
        duration        1.25e-2;
        nParticle      2500;
        parcelsPerSecond 200000;
        U0              (0 0 0.1);
        flowRateProfile constant 1;
      ........

    sizeDistribution
        {
            type        fixedValue;
            fixedValueDistribution
            {
                value          0.003;
            }
        }


dav.dap83 June 17, 2013 08:17

Hi, the problem is the converse: injecting air into a liquid.

Aurelien Thinat June 17, 2013 10:36

Hi,

It seems that solvers like icoUncoupledKinematicParcelFoam (particles tracking) or twoPhaseEulerFoam (Euler/Euler solver) would fit better to your problem. If you don't have any chemistry at all of course.
But I guess you are not using anymore sprayFoam according to your old post (@June 13, 2013 16:25).

a.weber August 13, 2014 09:10

working on bubblecolumns too!
 
Hey there,

I'm also working on a solver for bubbly flows, just like you.

So far I have been unsing a composition of sprayFoam and reactingParcelFoam, because I want to use the Breakup-Model coming with the SprayCloud functionality....

So far so good, I have my bubblecolumn with rising bubbles that are breaking up and can coalesce (all work in progress...).

My Problem is, somehow similar to your one: I wasn't really able to set the particles to have the rigth density.... wich could also be your problem with the particles falling down and not rising up.

What ever I do, the "bubbles" will always have a density of 994.511 .
I think my options in the thermophysicalProperties are wrong.

However: setting a higher density of the surrounding fluid is a fast workaround, because buoyancy is calculated throug the density-difference.

best regards
Andy


All times are GMT -4. The time now is 08:15.