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/)
-   -   Simple 2D rising Bubble. About B.C. of interFoam. (https://www.cfd-online.com/Forums/openfoam-solving/115557-simple-2d-rising-bubble-about-b-c-interfoam.html)

sharonyue April 2, 2013 07:45

Simple 2D rising Bubble. About B.C. of interFoam.
 
5 Attachment(s)
Hi guys,

I want to make a test about rising bubble via interFoam,Its really simple.But what confused me is my B.C. I wish the outlet boundary permit only water getting in and air getting out. so I set alpha B.C. like this:

Code:

boundaryField
{
    sides
    {
        type            zeroGradient;
    }
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 1;
        value          uniform 1;
    }
    frontAndBack
    {
        type            empty;
    }
}

To maintain stability,I use a combination of p_rgh and U B.C.

P_rgh
Code:

boundaryField
{
    sides
    {
        type            buoyantPressure;
        value                uniform 0;
    }
    inlet
    {
        type            buoyantPressure;
        value                uniform 0;
    }
    outlet
    {
 type            totalPressure;
        p0              uniform 0;
        U              U;
        phi            phi;
        rho            rho;
        psi            none;
        gamma          1;
        value          uniform 0;
    }
    frontAndBack           
    {
        type                empty; 
    }   
}

U
Code:

boundaryField
{
  sides
    {
      type            zeroGradient;
    }
    inlet
    {
        type                fixedValue;
        value                uniform (0 0 0);
    }
    outlet
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
  frontAndBack         
    {
        type                empty; 
 }   
}


It runs normally, and the solution of alpha is not bad.but the p_rgh is little big.you can see the image.

So.if I want to simulate this situation which is only water can getting in,How should I set the B.C.?Thanks in advance.


All times are GMT -4. The time now is 19:31.