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

problem about pressure driven flow

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By marupio

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 3, 2012, 23:53
Smile problem about pressure driven flow
  #1
Member
 
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 59
Rep Power: 14
yhaomin2007 is on a distinguished road
Dear ALL Foamers:

I have a very simple problem but is very difficult for me.

I am simulating a pressure driven compressible flow, ie, the inlet and outlet pressure are given, and velocity is calculated from the inlet and outlet conditions. but from the tutorial cases from compressible solver, velocity is given and pressure is calculated.

Do any of you have any ideas about how to set the boundary condition for pressure driven flow, OR any solver is suitable for this problem?

thank you in advance.
yhaomin2007 is offline   Reply With Quote

Old   February 4, 2012, 17:58
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
I think velocity changes and pressure changes are related. So in solving for one, you are left with an unknown constant offset. That is why we need to fix a reference pressure when it is not set at a boundary condition, and I think the same is true for velocity. If the "inlet" and "outlet" are zero gradient for velocity, there is a continuum of possible flow solutions that give the same pressure distribution, even with no-slip conditions on the walls. In other words, your solution may "blow up" with the velocity ever increasing from inlet to outlet for no apparent reason.

/speculation
Sakun likes this.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   February 5, 2012, 13:14
Default
  #3
dre
New Member
 
Martin
Join Date: Feb 2012
Location: Germany
Posts: 13
Rep Power: 0
dre is on a distinguished road
I had good results with the following settings for compressible, pressure driven flows:

Inlet
p - TotalPressure
U - pressureInletVelocity

Outlet
p - fixedValue (static pressure)
U - pressureInletOutletVelocity

I think, every compressible solver should be okay. I would start with rhoSimpleFoam for stationary flows and/or rhoPisoFoam for transient flows.
dre is offline   Reply With Quote

Old   February 6, 2012, 11:03
Default
  #4
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Are these BCs ok for an incompressible solver as well?

mad
maddalena is offline   Reply With Quote

Old   February 20, 2012, 18:54
Default
  #5
tab
New Member
 
Tim Beach
Join Date: Sep 2009
Posts: 1
Rep Power: 0
tab is on a distinguished road
Quote:
Originally Posted by dre View Post
I had good results with the following settings for compressible, pressure driven flows:

Inlet
p - TotalPressure
U - pressureInletVelocity

Outlet
p - fixedValue (static pressure)
U - pressureInletOutletVelocity

I think, every compressible solver should be okay. I would start with rhoSimpleFoam for stationary flows and/or rhoPisoFoam for transient flows.
I have been looking at the squareBend test case that comes with v2.0.1 as a rhoSimplecFoam test case. This is a high subsonic duct that is set up with a specified mass flow. I thought it would be straightforward to run this case as a pressure driven flow using pressure values from the converged test case. I'm not having any luck. Has anybody done this? What else would have to be done beyond replace the test case entries with the types above?

Test case ----> New case
Inlet
p - zeroGradient ----> totalPressure where p0 = value from test case
U - flowRateInletVelocity ----> pressureInletVelocity

Outlet
p - fixedValue ----> fixedValue (static pressure)
U - inletOutlet ----> pressureInletOutletVelocit

When I do this, the code bombs very quickly-2 iterations. I'm just starting to look at this more closely but I'm still clueless . The only thing I've tried beyond that is run slip walls on the duct, specify a small Pt, and turn off the turbulence model. I'm trying to make the simplest case possible to figure this out. Any tips would be appreciated.
Thanks
Tim
tab is offline   Reply With Quote

Old   June 24, 2020, 20:44
Cool Mesh resolution is critical
  #6
New Member
 
Behrang Mohajer
Join Date: Nov 2014
Location: Toronto
Posts: 6
Rep Power: 12
brg_mohajer is on a distinguished road
Please note that for course mesh resolution rhoSimpleFoam diverges very quickly. if you write every iteration (write interval = 1), you will be able to monitor that the values skyrocket quickly in paraFoam. That usually starts with the fields regarding your turbulence model first (like k and epsilon fields). Please note that paraView does not show such fields by default and you must choose so to visualize them.
Anyway, the combination of BCs below worked for me. My course mesh had 4000 cells (thus diverging right by the patches) while the fine one had 50,000 cells on the same geometry.
Please note that I am modelling an ejector. Therefore, I have also a suction patch. In my case, the inlet to outlet flow is supposed to suck air from this patch. however, you may simply ignore it for your code.



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


internalField uniform 1.e5;


inlet
{
type totalPressure;
p0 uniform 1.25e5;
gamma 1.4;
value 1.1e5;
}
outlet
{
type fixedValue;
value uniform 1e5;
}
suction
{
type fixedValue;
value uniform 1e5;
}


U:
inlet
{
type pressureInletUniformVelocity;
value uniform (0 0 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi;
tangentialVelocity uniform (0 0 0);
value (0 0 0);
}
suction
{
type zeroGradient;
}


p { margin-bottom: 0.25cm; line-height: 115% }
brg_mohajer is offline   Reply With Quote

Old   June 4, 2021, 05:28
Default
  #7
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by brg_mohajer View Post
Please note that for course mesh resolution rhoSimpleFoam diverges very quickly. if you write every iteration (write interval = 1), you will be able to monitor that the values skyrocket quickly in paraFoam. That usually starts with the fields regarding your turbulence model first (like k and epsilon fields). Please note that paraView does not show such fields by default and you must choose so to visualize them.
Anyway, the combination of BCs below worked for me. My course mesh had 4000 cells (thus diverging right by the patches) while the fine one had 50,000 cells on the same geometry.
Please note that I am modelling an ejector. Therefore, I have also a suction patch. In my case, the inlet to outlet flow is supposed to suck air from this patch. however, you may simply ignore it for your code.
This looks interesting, I think part of my problem could be due to coarse mesh. Can you tell me what BCs you used for T ? It seems I'm messing up somewhere in T as well. I used two combinations:
1. Inlet: fixedValue, outlet: inletOutlet
2. Inlet: totalTemperature, outlet: zeroGradient
In both cases, it crashes.


Will it be overconstrained if I use fixed temperature value at the outlet along with the p and U BCs as yours?
cfdcheckers is offline   Reply With Quote

Old   June 4, 2021, 06:30
Default
  #8
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
A couple more questions when I started playing around these BCs:

Quote:
Originally Posted by brg_mohajer View Post
Code:
 U:
     inlet
     {
         type            pressureInletUniformVelocity;
         value           uniform (0 0 0);
     }
     outlet
     {
         type                pressureInletOutletVelocity;
         phi                 phi;
         tangentialVelocity     uniform (0 0 0);
         value             (0 0 0);
     }

Why does the tangentialVelocity keyword appear only for outlet (Also, phi - isn't that optinal?)? Does it have some default value if not provided? Where can I find more on this?



Quote:
Originally Posted by brg_mohajer View Post
Code:
p { margin-bottom: 0.25cm; line-height: 115% }
I missed this line earlier. What does this mean really? Is this part of the p file?
cfdcheckers is offline   Reply With Quote

Old   June 4, 2021, 08:51
Default
  #9
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Hi, just realised for some reason my initial reply didn't get through.

Quote:
Originally Posted by brg_mohajer View Post
Please note that for course mesh resolution rhoSimpleFoam diverges very quickly. if you write every iteration (write interval = 1), you will be able to monitor that the values skyrocket quickly in paraFoam. That usually starts with the fields regarding your turbulence model first (like k and epsilon fields). Please note that paraView does not show such fields by default and you must choose so to visualize them.
Anyway, the combination of BCs below worked for me. My course mesh had 4000 cells (thus diverging right by the patches) while the fine one had 50,000 cells on the same geometry.
Please note that I am modelling an ejector. Therefore, I have also a suction patch. In my case, the inlet to outlet flow is supposed to suck air from this patch. however, you may simply ignore it for your code.
Can you comment on the corresponding BCs for T? Would fixing the outlet temperature overconstrain the system? I'm trying to solve a pressure driven flow problem where I have knowledge of p and T at the outlet and want to find out what velocities I get at outlet. Inlet BCs are not very important for me. What should be the ideal BCs for p,T and U if am using rhoSimpleFoam?



I have posted a thread here about my case: Correct BCs for known outlet conditions and unknown inlet conditions
cfdcheckers 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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Mass flow inlet and pressure outlet issue nikhil FLUENT 5 December 11, 2013 13:30
Pressure driven flow ChrisPro OpenFOAM Pre-Processing 0 December 4, 2011 05:22
total pressure boundary problem ==> flow from outlet to inlet!! mrshb4 OpenFOAM 0 November 20, 2010 13:41
pressure driven flow by pressure correction method justentered Main CFD Forum 0 December 30, 2003 00:52


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