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

Inlet and outlet on the same patch in openfoam?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2019, 18:31
Default Inlet and outlet on the same patch in openfoam?
  #1
New Member
 
Join Date: Apr 2018
Posts: 17
Rep Power: 7
dela is on a distinguished road
Hello community,

I am working on a small project and wants to use a patch for both inlet of gas and outlet of liquid. I am using OFv 1806. Please is there a way I can do this with groovyBc or any other way?
Thank you
dela is offline   Reply With Quote

Old   February 2, 2019, 01:43
Default
  #2
Member
 
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 13
gkarlsen is on a distinguished road
Quote:
Originally Posted by dela View Post
Hello community,

I am working on a small project and wants to use a patch for both inlet of gas and outlet of liquid. I am using OFv 1806. Please is there a way I can do this with groovyBc or any other way?
Thank you
I don't think you need any special BC to do that. How about something along these lines:


Code:
//For alpha

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

//For U

    myPatch
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }

For p_rgh

    outlet
    {
        type          prghTotalPressure;
	p0		uniform 0;
        value        uniform 0;
    }
This will allow water to exit through myPatch. In case there is inflow, the inflow will be air
gkarlsen is offline   Reply With Quote

Old   February 2, 2019, 02:09
Default
  #3
New Member
 
Join Date: Apr 2018
Posts: 17
Rep Power: 7
dela is on a distinguished road
Thank you very much @gkarlsen

That looks OK but how will that work for an eulerian simulation where different alphas are defined for both gas and liquid?

For instance, I want 'myPatch' to be a gas inlet and a liquid outlet
So for alpha.gas, can i write

mypatch
{
Type fixedvalue;
value uniform 1;
}

And alpha.liquid,

mypatch
{
Type fixedvalue;
value uniform 0;
}

Can this out? Will liquid be aloud out of this patch?

Thank you
dela is offline   Reply With Quote

Old   February 2, 2019, 04:03
Default
  #4
Member
 
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 13
gkarlsen is on a distinguished road
Quote:
Originally Posted by dela View Post
Thank you very much @gkarlsen

That looks OK but how will that work for an eulerian simulation where different alphas are defined for both gas and liquid?

For instance, I want 'myPatch' to be a gas inlet and a liquid outlet
So for alpha.gas, can i write

mypatch
{
Type fixedvalue;
value uniform 1;
}

And alpha.liquid,

mypatch
{
Type fixedvalue;
value uniform 0;
}

Can this out? Will liquid be aloud out of this patch?

Thank you
No,

Use InletOutlet as stated above, not fixedvalue. You set the parameter inletValue to whatever value you would like when there is flow in to your domain from the patch. Alpha for discharge from the domain will be according to whatever local conditions are present at the boundary (liquid if there is liquid on the inside, gas if there is gas on the inside and so on).
gkarlsen is offline   Reply With Quote

Old   February 2, 2019, 05:08
Default
  #5
New Member
 
Join Date: Apr 2018
Posts: 17
Rep Power: 7
dela is on a distinguished road
Alright, that's clear, thank you very much.
But one more question, how do I specify the velocity of the gas at the patch using pressureInletOutletVelocity?

Thank you
dela is offline   Reply With Quote

Old   February 2, 2019, 09:08
Default
  #6
Member
 
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 13
gkarlsen is on a distinguished road
Quote:
Originally Posted by dela View Post
Alright, that's clear, thank you very much.
But one more question, how do I specify the velocity of the gas at the patch using pressureInletOutletVelocity?

Thank you
You don't . This BC automatically calculates velocity based on pressure. If you need to set a given velocity you have to use something else
gkarlsen is offline   Reply With Quote

Reply


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
Calculate Mass Flowrate and Mass Flow Averaged Total Pressure at inlet and outlet coolcrasher OpenFOAM Post-Processing 7 November 4, 2021 04:57
mapField error rvl565 OpenFOAM Pre-Processing 1 September 6, 2018 16:13
outlet pressure Boundary settings -velocity streamline under ambient temp.conditions Vishnu_bharathi CFX 12 November 21, 2017 06:56
Want Impeller Driven Fluid Flow: What Inlet and Outlet BC to use for Centrifugal Pump Zev Xavier FLUENT 3 May 9, 2016 06:42
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45


All times are GMT -4. The time now is 00:35.