CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Multiphase Flow n phases (https://www.cfd-online.com/Forums/openfoam-solving/58064-multiphase-flow-n-phases.html)

sandy August 25, 2009 08:50

I also want to know.

idrama January 3, 2010 06:03

Hey people!

Could anybody tell me what is the purpose of the file
0/alphas!

Cheers,

Claus

kwardle January 13, 2010 15:27

The 0/alphas file is simply a field combining all the phases into a single field that can be plotted--for example, if you have 4 phases, the alphas field will go from 0 to 3 (it is automatically computed and will show up in time directories after 0). Over the continuous scale, 0=phase1, 1=phase2, 2=phase3, 3=phase4. The only trick here is that if you have a phase boundary between phase1 and phase4 then it will look like there is a small layer of phase2 then phase3 between 1 and 4--that's the problem with a continuous color scale. Unfortunately there is not really any other easy way to visualize the phases. If you learn of one I would be interested :).

AbbasRahimi May 10, 2017 13:28

model for incompressible multiphase flow with phase change
 
Quote:

Originally Posted by duderino (Post 188135)
Hi Henry

What does this mean? Are there any plans to do this?

Best regards duderino

Hi foamer,

I wonder if you could kindly point me to any possible models to take care of incompressible multiphase flow with cavitation?

Thank you.

Goldberry January 25, 2018 05:03

three-phase flow
 
Hi!

I'm modelling a three-phase flow (air, water and a third Newtonian fluid). The third fluid generates waves by sliding on a slope into water. I tried to use multiphaseInterFoam but I am not satisfied by the results comparing to experiment and another code. I am wondering if I set the computation right.
Are there any validation cases available? Or is someone working on a similar case using OpenFOAM?

Lucie

BlnPhoenix January 25, 2018 06:12

Quote:

Originally Posted by Goldberry (Post 679328)
Hi!

I'm modelling a three-phase flow (air, water and a third Newtonian fluid). The third fluid generates waves by sliding on a slope into water. I tried to use multiphaseInterFoam but I am not satisfied by the results comparing to experiment and another code. I am wondering if I set the computation right.
Are there any validation cases available? Or is someone working on a similar case using OpenFOAM?

Lucie

You can use the expample cases in OpenFoam. For example DamBreak deals with 4 phases in multiphaseInterFoam..

Goldberry January 25, 2018 06:22

Yes, I found these, that was my basis for my case.

wangchengan2003 March 5, 2018 00:53

Dear Pei-Ying Hsieh,

I want to set a three-phase flow moving from left to right by using multiphaseInterfoam.

I try to use groovybc to set the boundary conditions as following:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.4.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      alpha.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0; 

boundaryField
{
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 1;
        value          uniform 1;
    }

/*    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }*/

    inlet
    {
        type            groovyBC;
        valueExpression "(pos().y>0.6) ? 1 : 0";
        value          uniform 0;
        // type            zeroGradient;
    }

    outlet
    {
        type            zeroGradient;
    }

    bottom
    {
        type            zeroGradient;
    }

    front
    {
        type            empty;
    }

    back
    {
        type            empty;
    }

    cylinder
    {
        type            zeroGradient;
    }

}


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

Code:

/*--------------------------------*- C++  -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.4.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      alpha.oil;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }

    inlet
    {
        type            groovyBC;
        valueExpression "(pos().y>0.3 && pos().y<=0.6) ? 1 : 0";
        value          uniform 0;
        //type            zeroGradient;
    }

    outlet
    {
        type            zeroGradient;
    }

    bottom
    {
        type            zeroGradient;
    }

    front
    {
        type            empty;
    }

    back
    {
        type            empty;
    }

    cylinder
    {
        type            zeroGradient;
    }
}


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

Code:

/*--------------------------------*- C++  -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.4.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }

    inlet
    {
        type            groovyBC;
        valueExpression "(pos().y<=0.3) ? 1 : 0";
        value          uniform 0;
        //type            zeroGradient;
    }

    outlet
    {
        type            zeroGradient;
    }

    bottom
    {
        type            zeroGradient;
    }

    front
    {
        type            empty;
    }

    back
    {
        type            empty;
    }

    cylinder
    {
        type            zeroGradient;
    }
}


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

Once I run the case, the error appeared:
Code:

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::divide(Foam::Field<double>&,  Foam::UList<double> const&, Foam::UList<double>  const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField,  Foam::volMesh> > Foam::operator/<Foam::fvPatchField,  Foam::volMesh>(Foam::tmp<Foam::GeometricField<double,  Foam::fvPatchField, Foam::volMesh> > const&,  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField,  Foam::volMesh> > const&) at ??:?
#5  Foam::multiphaseMixture::multiphaseMixture(Foam::GeometricField<Foam::Vector<double>,  Foam::fvPatchField, Foam::volMesh> const&,  Foam::GeometricField<double, Foam::fvsPatchField,  Foam::surfaceMesh> const&) at ??:?
#6  ? at ??:?
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? at ??:?
Floating point exception (core dumped)

But if I use
Code:

type            zeroGradient;
instead of groovybc, the case can work.

Could you give some help?

Best regards,

Chengan

wangchengan2003 March 5, 2018 19:34

Hello Lucie,
Have you solved your problem? how do you set boundary conditions for the three fluids?
Best regards,
Chengan


All times are GMT -4. The time now is 04:20.