CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Open channel Boundary Conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2016, 13:12
Default Open channel Boundary Conditions
  #1
New Member
 
Milad
Join Date: May 2016
Location: Tehran
Posts: 3
Rep Power: 9
Milad Mohassel is on a distinguished road
Hi dear Foamers
I am trying to run an 2 phase flow in Version 2.4 since methods are changed from 2.3 for interFoam.
and I have problems with that.
1. my first problem is should I Split both outlet and inlet in to 2 face,(water and air separately)?
I caught the free surface (alpha.water) correctly but for Velocity I just Need the water velocity but air have non zero velocity too.
there is my U and alpha.water
any ideas?
thanks
the first 2 codes have 2 inlets
Code:
-*----------------------------------*\
| =========                 |                                                 |
| \\      /  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;
    object      alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet-air
    {
        type            fixedValue;
        value           uniform 0;
    }

    inlet-water
    {
        type            fixedValue;
        value           uniform 1;

    }
    outlet
        {
    type         zeroGradient;

}

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

        walls
            {
           type            zeroGradient;

            }
        rib
            {
           type            zeroGradient;

            }
        front
            {
                type empty;
        };

        back
            {
                type empty;
        };
};
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       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0.1 0 0);

boundaryField
{
inlet-air
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    
    inlet-water
    {

       type      fixedValue;
        value    uniform (0.1 0 0);
 
    }

    outlet
      {
        //type       zeroGradient;
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
      }

    atmosphere
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }
    
   walls  
    {
       type            fixedValue;
     value           uniform (0 0 0);


    }

 rib
    {
        type            fixedValue;
        value           uniform (0 0 0);
     
    } 

        front
            {
                type empty;
        };

        back
            {
                type empty;
        };
}
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;
    object      alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet//has changed from inlet-water & inlet-air to inlet
    {
      type            variableHeightFlowRate;
        lowerBound      0.0;
        upperBound      0.5;
        value           uniform 1;
 
    }

    outlet
        {
    //type        inletOutlet;
    //inletValue    uniform 0;
    type         zeroGradient;

      
        }


    atmosphere
        {
        type         inletOutlet;
            inletValue      uniform 0;//Like Spillway tut
                value           uniform 0;
        }

        walls
            {
           type            zeroGradient;

            }
        rib
            {
           type            zeroGradient;

            }
        front
            {
                type empty;
        };

        back
            {
                type empty;
        };
};

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       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0.1 0 0);



boundaryField
{
        inlet
        {
               type            fixedValue;
            value           uniform (0.1 0 0);

        }


        outlet
        {
        type         zeroGradient;
      
         }


     atmosphere
        {
                type            pressureInletOutletVelocity;
               phi             phi;
                value           uniform (0 0 0);
        }

    walls
           {
               type            fixedValue;
            value           uniform (0 0 0);
         }


       rib
        {
        type            fixedValue;
         value           uniform (0 0 0);
        }

        front
            {
                type empty;
        };

        back
            {
                type empty;
        };

};


// ************************************************************************* //
at the end I use 0.9 for upper bound but I get nothing!
type variableHeightFlowRate;
lowerBound 0.0;
upperBound 0.9;
value uniform 1;
Milad Mohassel is offline   Reply With Quote

Old   December 2, 2016, 02:25
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
whats wrong?
the air has a motion becuase there is shear stress between phases.
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Reply

Tags
boundary conditions, interfoam, open channel flow


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
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 04:39
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 09:50
open channel flow boundary conditions yan FLUENT 0 July 4, 2005 23:36


All times are GMT -4. The time now is 11:17.