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

Boundary conditions for pressure driven flow

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 6 Post By gkarlsen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2018, 09:10
Exclamation Boundary conditions for pressure driven flow
  #1
Member
 
Jack_Landis's Avatar
 
Join Date: Feb 2016
Posts: 32
Rep Power: 10
Jack_Landis is on a distinguished road
Dear foamers,


I'm dealing with a two phase flow (water and air) using interFoam. Water flows through a duct in a chamber and then exits the chamber via another duct. The chamber has been depressurized to few mbar, so the fluid moves because of the difference of pressure.


And here comes my problem: I tried fixedValue for pressure inlet and outlet and, as I read in the forum, it doesn't converge. Then I tried a totalPressure inlet, but again very slow convergence and very small time steps (10-90 or so).


Now I am wondering: how can I impose the pressure difference between inlet and outlet? I need to play with this value in order to understand the order of magnitude of the depressurization I must create in the chamber for my purposes.


Thank you in advance,
Jack
__________________
Omnia per ipsum facta sunt,
et sine ipso factum est nihil,
quod factum est


Jack_Landis is offline   Reply With Quote

Old   November 14, 2018, 13:52
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 Jack_Landis View Post
Dear foamers,


I'm dealing with a two phase flow (water and air) using interFoam. Water flows through a duct in a chamber and then exits the chamber via another duct. The chamber has been depressurized to few mbar, so the fluid moves because of the difference of pressure.


And here comes my problem: I tried fixedValue for pressure inlet and outlet and, as I read in the forum, it doesn't converge. Then I tried a totalPressure inlet, but again very slow convergence and very small time steps (10-90 or so).


Now I am wondering: how can I impose the pressure difference between inlet and outlet? I need to play with this value in order to understand the order of magnitude of the depressurization I must create in the chamber for my purposes.


Thank you in advance,
Jack
Not sure I understood your case, but it sounds like you are confusing p_rgh with pressure (it's not the same thing). You might want to take a look at the boundary condition prghPressure if you are trying to set a static pressure and calculate the flow.
gkarlsen is offline   Reply With Quote

Old   November 14, 2018, 17:36
Unhappy Pressure and p_rgh
  #3
Member
 
Jack_Landis's Avatar
 
Join Date: Feb 2016
Posts: 32
Rep Power: 10
Jack_Landis is on a distinguished road
I am sorry, I didn't mention the difference. I set bcs for p_rgh and I want to simulate a flow due to a pressure difference. I tried the bcs I explained before but they doesn't work...What could you sugest me?

Thank you!
__________________
Omnia per ipsum facta sunt,
et sine ipso factum est nihil,
quod factum est


Jack_Landis is offline   Reply With Quote

Old   November 15, 2018, 00:07
Default
  #4
Member
 
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 13
gkarlsen is on a distinguished road
If you already tried the boundary condition I refer to in my previous post (prghPressure) to no effect I think you need to provide more information. Preferably by sharing your entire case, but at least the content of U, p_rgh, and alpha files
gkarlsen is offline   Reply With Quote

Old   November 16, 2018, 03:07
Unhappy Had a look
  #5
Member
 
Jack_Landis's Avatar
 
Join Date: Feb 2016
Posts: 32
Rep Power: 10
Jack_Landis is on a distinguished road
I tried the bc you suggested me but still I have problems: the time step is refined until 10^-100 and then the simulation crashes…I share with you the files I used, could you please have a look at them?

Thank you in advance!


alpha.air.c

p_rgh.c

U.c
__________________
Omnia per ipsum facta sunt,
et sine ipso factum est nihil,
quod factum est


Jack_Landis is offline   Reply With Quote

Old   November 16, 2018, 04:52
Default Wrong file
  #6
Member
 
Jack_Landis's Avatar
 
Join Date: Feb 2016
Posts: 32
Rep Power: 10
Jack_Landis is on a distinguished road
I'm sorry, I posted the wrong p_rgh file... Here is the one I used!p_rgh.c
__________________
Omnia per ipsum facta sunt,
et sine ipso factum est nihil,
quod factum est


Jack_Landis is offline   Reply With Quote

Old   November 17, 2018, 08:57
Default
  #7
Member
 
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 13
gkarlsen is on a distinguished road
I understand that you are trying to simulate some sort of chamber/plenum with multiphase water/air flow, a inlet and a outlet, and a given differential pressure between the two. Since you did not provide a full case file, I created a simplified version which consists of a 0.5x0.5x0.5 m cube, a vertical submerged inlet from the bottom with diameter 50 mm and a horisontal discharge with diameter 50 mm. It looks like the attachment after 2 seconds of time simulated.

I used 1000 Pa total pressure in the inlet in the bottom left, and 0 Pa in the outlet to the right. I used prghTotalPressure BC, but could have used prghPressure if you just want static pressure.

U
Code:
    walls
    {
        type            noSlip;
    }

    inlet
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }
    outlet
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }
p_rgh
Code:
    walls
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }

    inlet
    {
        type            prghTotalPressure;
        p0              uniform 1000;
        value           uniform 1000;
    }

    outlet
    {
        type            prghTotalPressure;
	p0		uniform 0;
        value           uniform 0;
    }
Full case can be found here:
https://drive.google.com/file/d/1mtO...ew?usp=sharing


Also, you might want to take a look at this post:
How to give enough info to get help

Good luck
Attached Images
File Type: jpg Screenshot.jpg (33.4 KB, 232 views)
gkarlsen is offline   Reply With Quote

Old   November 19, 2018, 07:38
Unhappy Succesfull - other problems
  #8
Member
 
Jack_Landis's Avatar
 
Join Date: Feb 2016
Posts: 32
Rep Power: 10
Jack_Landis is on a distinguished road
I tried with your bcs and it works! Now I'll try with the static pressure, that is what I need.

Anyway, I attach you the files of my simulation and a video of the results...Initially everything seems meaningful, but after a while something strange happens...I think not physical fluctuations due to contact angle/surface tension, and air appears somewhere in the liquid phase...May you have a look please?

You can find all the files here: https://drive.google.com/drive/folde...US?usp=sharing
__________________
Omnia per ipsum facta sunt,
et sine ipso factum est nihil,
quod factum est


Jack_Landis is offline   Reply With Quote

Old   August 25, 2021, 10:03
Exclamation Pressure Driven Two-Phase Flow
  #9
New Member
 
Sumit
Join Date: Jul 2017
Posts: 5
Rep Power: 8
sumitzanje is on a distinguished road
Hi all,

Im trying to simulate the pressure-driven two-phase flow. The best example is underground sewer tunnels.

I have an inlet pressure of 115020 N/m2, and outlet pressure of 114876 N/m2. (consider these pressure for the sake of discussion).

The distance between the inlet to outlet is say 35m, and at a distance of 25m from the inlet, a vertical pipe of height 6m is provided.

Initially, the horizontal pipe is flowing full, with the vertical pipe is partially filled. This simulation is allowed to run till a steady state is reached.

Now an air tank is introduced to the horizontal pipe, in between the inlet and vertical pipe.

The pressure of air is assigned such that it allows smooth entrance of air to horizontal pipe, and it keeps advanced towards the vertical pipe.


My simulation is crashing as air also advances towards the inlet, and it reaches the inlet patch. The air has lower pressure than the inlet patch, and I feel that is causing some problems.

Inlet Patch BC's:

inlet
{
alpha
{
type fixedValue;
value uniform 1;
}

p_rgh
{
type prghTotalPressure;
p0 uniform 114766.94;
}

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

T
{
type fixedValue;
value uniform 293;
}

k
{
type fixedValue;
value uniform 0.000188139;
}

epsilon
{
type fixedValue;
value uniform 4.34537e-05;
}

omega
{
type fixedValue;
value uniform 0.1;
}
}


Outlet Patch BC's:


outlet
{
alpha
{
type inletOutlet;
inletValue uniform 1;
value uniform 0;
}

p_rgh
{
type prghPressure;
p uniform 114442.0;//102424.6804 (wrong)
}

U
{
type inletOutlet;
inletValue uniform (0 0 0);
}

T
{
type inletOutlet;
inletValue uniform 293;
value uniform 293;
}

k
{
type inletOutlet;
inletValue uniform 0.000188139;
value uniform 0.000188139;
}

epsilon
{
type inletOutlet;
inletValue uniform 4.34537e-05;
value uniform 4.34537e-05;
}

omega
{
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}
}



Air Tank BC's:

tank
{
alpha
{
type fixedValue;
value uniform 0;
}

epsilon
{
type fixedValue;
value uniform 4.34537e-05;
}

k
{
type fixedValue;
value uniform 0.000188139;
}

omega
{
type fixedValue;
value uniform 0.1;
}

p_rgh
{
type totalPressure;
p0 uniform 114298.0;
}

T
{
type fixedValue;
value uniform 293;
}

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


Please advice. What could be an issue?


The 2D simulation with the same BC's is working but the with 3D case it crashes after 32sec, and this is the point when air from the air tank reaches the inlet boundary patch.
sumitzanje 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
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 06:40
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 17:38
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05


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