CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Pressure bc in 2 phase flow channel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2018, 04:52
Default Pressure bc in 2 phase flow channel
  #1
New Member
 
Alex
Join Date: Sep 2018
Posts: 4
Rep Power: 7
alex::cfd is on a distinguished road
Hi all,
I'm new to open foam, however not new to fluid simulation. I was working on wave energy converters some years ago. Now, for a spare time project, I'd like to delve into open foam multiphase simulation (submerged structure in flow channel).
I worked through the tutorials to get an overall impression and now am setting up a flow channel mainly based on the dambreak turorial, having a look also into other tutorial use-cases that come with open foam (great work, by the way!).

I have several questions, but will start with my main concern: setting the pressure boundary conditions. I read and tested a lot, but can not achieve sensible results.
Perhaps someone could give me a hint.

I first want to setup the flow channel only:

I have the following velocity boundary conditions (which I think are Ok):
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);


boundaryField
{
    leftInlet
    {
        type            fixedValue;
        value           uniform (8.333 0 0); //8.333=30m/s
    }
    rightOutlet
    {
        type            zeroGradient;
    }
    lowerWall
    {
        type            noSlip;
    }
    atmosphere
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }

    defaultFaces
    {
        type            empty;
    }

}
I would use these pressure boundary conditions (p, not p_rgh) - wich is no more in use as far as I understood:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    leftInlet
    {
        type            zeroGradient;
    }

    rightOutlet
    {
        type            fixedValue;
        value           uniform 0;
    }

    lowerWall
    {
        type            zeroGradient;
    }

    atmosphere
    {
        type            zeroGradient;
    }

}
I did not manage to setup a sensible p_rgh file (I think only inlet / outled bc are not OK):
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{

    leftInlet
    {
      // type            fixedFluxPressure;
      // value           pressureInletOutletVelocity;
      //type            fixedFluxPressure;
      //value           uniform 0;
      //  type            fixedValue;
      //  value           uniform 0;
      type              zeroGradient;

    }

    rightOutlet
    {
      //type        freestream;
    type            fixedValue;
    value           uniform 0;
      //type            fixedFluxPressure;
      //value           pressureInletOutletVelocity;

    }

    lowerWall
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }

    atmosphere
    {
        type            totalPressure;
        p0              uniform 0;

    }

    defaultFaces
    {
        type            empty;
    }

    
}

// ************************************************************************* //
any hints how they should look like?


A related question:
I use one inlet / outlet patch for air/water in total, as both fractions should have the same inlet velocity. Is this ok?

Thank you a lot
Alexander
Attached Images
File Type: png domain.png (22.6 KB, 141 views)
alex::cfd is offline   Reply With Quote

Old   September 27, 2018, 01:27
Default
  #2
New Member
 
Alex
Join Date: Sep 2018
Posts: 4
Rep Power: 7
alex::cfd is on a distinguished road
Hi all,
I see I should have been more specific, sorry for that.
First of all I use:
openfoam on linux - v1806
solver: interFoam
laminar

For the inlet (left side in the above figure), i have two patches one 'inlet' at the bottom for water, the other 'inletAir' for air. They have the same boundary conditions regarding U and p_rgh:
U
Code:
    inlet
    {
        type            fixedValue;
        value           uniform (8.333 0 0); //8.333=30m/s
    }
    inletAir
    {
        type            fixedValue;
        value           uniform (8.333 0 0); //8.333=30m/s
    }
p_rgh:
Code:
    inlet
    {
      type              zeroGradient;

    }
    inletAir
    {
      type              zeroGradient;

    }
alpha.water
Code:
    inlet
    {
      type                fixedValue;
        value             uniform 1;
    }
    inletAir
    {
      type                fixedValue;
       value             uniform 0;
    }
I initialized the case with two fraction of water and otherwize empty flow channel (just as a test):


and it develops as intended (1.5s later):


I also checked the velocities of the inlet air / water inlet everything looks as expected.

However, I can not manage the outlet such that the water/air flows out. E.g. (after 6s):

8s


There is a velocity of 4.x m/s in x (normal to the outlet), which is about 1/2 of the inlet velocity (8.33m/s) and a y-component (to the top) of 3.x m/s -> looks like a partial permeable wall leading to water rising and partly flowing out via the top atmosphere patch.

I use:
U
Code:
    outlet
    {
        type            zeroGradient;
    }

    outletAir
    {
        type            zeroGradient;
    }
p_rgh
Code:
    outlet
    {
    type            fixedValue;
    value           uniform 0;
    }
    outletAir
    {
    type            fixedValue;
    value           uniform 0;
    }
alpha.water
Code:
    
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0;
    }

    outletAir
    {
        type            inletOutlet;
        inletValue      uniform 0;
    }
As far as I conclude after some hours reading posts and checking other cases I guess U and p_rgh bc should be ok.
Regarding alpha.water I'm unsure. Any hint about where the meaning of the options inletValue, Value etc. are explained? I can find the listing of bc in the manual, however all the options per bc are not explained.

One option could be to use an outlet with the same fixed velocity as the inlet (in the stream channel, mass conservation holds (in mean what comes in must get out).
However, when having submerged structures, there might be some surface waves which might lead to velocities not exactly equal to 8.3 m/s across the outlet - or not?
And the alpha.water might change across the outlet when waves crossing (e.g. part of the 'air' zone might be occupied by water).
As far as I can see, if setting alpha.water bc on the outlet patch, I fix the value there - not?

Any idea how to configure the outlet to get what I want?

Thanks
Alex
Attached Images
File Type: png snapshot100.png (9.4 KB, 133 views)
File Type: png snapshot101.png (66.4 KB, 131 views)
File Type: png snapshot102.png (18.5 KB, 132 views)
File Type: png snapshot103.png (17.4 KB, 131 views)
alex::cfd is offline   Reply With Quote

Old   June 12, 2019, 06:50
Default One hint maybe
  #3
New Member
 
Martin
Join Date: Aug 2017
Posts: 1
Rep Power: 0
pfemi is on a distinguished road
I also have Problems to run a stable Modell whenn it Comes to 2 Phase open channel flow.

For the Alpha file:
if you have a seperate outlet for water, i think you should put Alpha = 1 there.
Same for the inlet.

I use only one outlet patch with Zero Gradient for Alpha and 2 inlet Patches with Alpha = 1 for water and Alpha = 0 for air.

I hope this could help.

If I dont forgett i will put the files in here later on.
pfemi is offline   Reply With Quote

Old   May 8, 2020, 20:25
Default why 8.333 is euqal to 30 m/s?
  #4
New Member
 
Mario
Join Date: Apr 2020
Posts: 3
Rep Power: 6
mariofcordova is on a distinguished road
I am not sure why you introduced 8.333 as 30 m/s.
mariofcordova is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Review: Reversed flow CRT FLUENT 1 May 7, 2018 05:36
static vs. total pressure auf dem feld FLUENT 17 February 26, 2016 13:04
Pressure contours in two compressible phase flow Hershey Fluent Multiphase 1 June 6, 2014 07:41
gas-liquid 2 phase flow in microchannels using VoF LyngHoo FLUENT 1 November 13, 2012 19:01
Channel flow: Inlet pressure AND uniform velocity? frmap1 Main CFD Forum 0 April 15, 2010 10:32


All times are GMT -4. The time now is 01:25.