# Outlet boundary condition in interFoam

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

 April 11, 2013, 10:38 #21 Member   Join Date: Mar 2013 Posts: 92 Rep Power: 5 I don't understand what is you problem...you have a deltap between inlet and outlet?in this case try to set a fixedvalue for the pressure and a pressureInletOutletvelocity for U in both boundary

 April 11, 2013, 10:53 #22 Member   nadine moussa Join Date: Mar 2012 Posts: 30 Rep Power: 6 Hello giack, Thanks for the quick reply, I want to simulate a filling process, so initially my tube is filled with phase 2 fluid (air), and then it is being filled with phase 1 fluid (liquid aluminium). So there is a hude difference in the density and viscosity values. When I fix a velocity profile at the inlet and a fixed pressure at the outlet, everythings works fine and I get my poiseuille profile. But now I have to simulate the real problem by fixing a delta p, so I tried to fix a pressure at the inlet and outlet with a inletoutlet condition for the velocity but it's not working. P.S: when the tube is just filled with one liquid, the simulation runs fine withe the deltap condition, but tracking an interface of the 2 fluids somehow blocks interfoam with a pressure difference condition. I tried your suggestion and didn't work as well. Need Help, Best regards, Nadine

 April 11, 2013, 11:01 #23 Member   Join Date: Mar 2013 Posts: 92 Rep Power: 5 Can you post the geometry of your problem?What are the BC that you set for alpha1? I suggest to view the tutorials of Hassan Hemida: Free surface tutorial using interFoam and rasInterFoam. It treat about the filling of a bottle

April 11, 2013, 11:17
#24
Member

Join Date: Mar 2012
Posts: 30
Rep Power: 6
ok,
I have a cylinder with three boundary (inflow surround and outflow).
For alpha1
inlflow fixedValue uniform 1;

in my old case with a velocity profile at the inlet:
for U
inflow fixedValue uniform (0.5 0 0);
surround fixedValue uniform (0 0 0);

for p_rgh
outflow fixedValue uniform 0;

now I want a pressure driven flow, so I tried two dirrichlet condition for p, one dirrichlet one Neuman and vice-versa! nothing worked!!!

thank you for being intrested with my problem.
Sincerly,
Attached Images
 alpha1.jpg (72.3 KB, 66 views) geometry.jpg (77.6 KB, 55 views) pressure.jpg (64.2 KB, 53 views)

 April 11, 2013, 11:24 #25 Member   Join Date: Mar 2013 Posts: 92 Rep Power: 5 Try to set total pressure instead of fixedValue for inlet and outlet and pressureInletOutletvelocity to U. Also set buoyantPressure for surround. Your mesh is enough refined?

 April 11, 2013, 16:36 #26 Senior Member   Andrea Ferrari Join Date: Dec 2010 Posts: 296 Rep Power: 8 Hi, which is exactly the problem you have with 2 pressure bc? I already succesfully simulated a pressure driven flow with interFoam, i think it should work. best andrea

 April 12, 2013, 04:24 #27 Member   Join Date: Mar 2013 Posts: 92 Rep Power: 5 Hi, I have an uncertain about the boundary condition used for U in the outlet patch (pressureInletOutletVelocity). Why this BC is used for atmosphere patch?How work this BC? I read some different position about this BC. For outflow means zeroGradient but for inflow I read different opinion: -fixedValue -calculate from pressure calculate from flux I'm really confused about this BC... Thank to all

 April 12, 2013, 04:35 #28 Senior Member   Andrea Ferrari Join Date: Dec 2010 Posts: 296 Rep Power: 8 HI, take a look at pressureInletOutletVelocityFvPatchVectorField.H, there is a brief description of the bc. For inflow the velocity is calculated from the flux normal to the patch. best andrea giack likes this.

 April 16, 2013, 10:58 #29 Member   nadine moussa Join Date: Mar 2012 Posts: 30 Rep Power: 6 Thank you for all the help, for info, I was mistaken, my problem was not related to fixing the boundary conditions but because my initial time step was large, plus I had to lower the max Co to 0.1. The thing is when changing the boundary condition from a velocity profile to a pressure difference, you should change the controlDict as well so the simulation can run. thanks again, and I hope that my innocent mistake could help others. Regards,

May 3, 2014, 15:31
liquid rebounds at the outlet
#30
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
Quote:
 Originally Posted by vonboett Ok turning old searching the cause of alpha1 being reflected at the outflow, I finally got it. Maybe this is a bug dependent on ubuntu version, but it is quite relevant. The difference between the two pictures below showing an outflow of a channel is only that I moved the grid from positive x quadrant to negative x quadrant. When the whol gid lies at a position that the x-coordinates are smaller than 0 the outflow works! Maybe this should be reported.
Dear vonboett,
I am simulating a liquid jet with an inlet and out let BC, using OF 2.1.1. My problem is similar to the other and I I have liquid rebounds and dose not go out of the domain as it should be. when I visualized the results it seems like there is a flow coming in the opposite direction and preventing liquid from going out. Is switching from pimple to piso could be the solution? and which OF version should I use to do so?. Please If you have any solution or suggestion help me... Thanks in advance..
Best wishes,
Sandy

 May 5, 2014, 03:43 #31 Senior Member   Albrecht vBoetticher Join Date: Aug 2010 Location: Zürich, Swizerland Posts: 211 Rep Power: 9 Hi Sandy, I by now use pressureInletOutletVelocity together with totalPressure or buoyantPressure. But the OF 2.3 interFoam tutorial "waterChannel" uses inletOutlet togther with fixedFluxPressure for p_rgh, a boundary condition I would like to try.

May 5, 2014, 06:37
#32
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
Quote:
 Originally Posted by vonboett Hi Sandy, I by now use pressureInletOutletVelocity together with totalPressure or buoyantPressure. But the OF 2.3 interFoam tutorial "waterChannel" uses inletOutlet togther with fixedFluxPressure for p_rgh, a boundary condition I would like to try.
Dear vonboett,
Thanks for your quick replay, I realy appreciate it very much. As I told you I am using OF2.1.1. I will try to use the BC you recommended for U and P_rgh, but what about alpha1 at the out let, Is using zeroGradient good enogh? or you suggest some thing else?. regarding to OF 2.3 interFoam, does it use PIMOLE or PISO? or does not make any difference?.... Thanks in advance
Best Wishes,
Sandy,

 May 5, 2014, 07:15 #33 Senior Member   Albrecht vBoetticher Join Date: Aug 2010 Location: Zürich, Swizerland Posts: 211 Rep Power: 9 For alpha1 at the outlet I use inletOutlet; inletValue uniform 0; and at the inlet inletOutlet inletValue uniform 1; value uniform 1; PIMPLE becomes PISO if you set in the fvSolution nOuterCorrectors accordingly such that no iteration takes place. Outer corrections make sense if your fluid viscosity does change like for non-newtonian viscosities or when running turbulence simulations. "Originally Posted by alberto PISO simply does not iterate over the equations: it solves alpha, Theta, U, p, k, epsilon and proceeds in time. PIMPLE is a combination of PISO and SIMPLE. In other words you can have outer correctors, if you set the appropriate keyword in the fvSolution PIMPLE sub-dictionary."

May 5, 2014, 07:20
#34
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
Quote:
 Originally Posted by sandy13 Dear vonboett, Thanks for your quick replay, I realy appreciate it very much. As I told you I am using OF2.1.1. I will try to use the BC you recommended for U and P_rgh, but what about alpha1 at the out let, Is using zeroGradient good enogh? or you suggest some thing else?. regarding to OF 2.3 interFoam, does it use PIMOLE or PISO? or does not make any difference?.... Thanks in advance Best Wishes, Sandy,
Dear vonboett,
I had a go with you suggestion, but it did not run when I used OUTLET P_rgh= type buoyantPressure;
value uniform 0;
I got the error message:
--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 1e-300
Specified mass inflow : 5.29932e-07
Specified mass outflow : 0

From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p

FOAM exiting
Does it mean I wont work? do I have to use another solver?
Best Wishes,
Sandy,

 May 5, 2014, 08:30 #35 Senior Member   Albrecht vBoetticher Join Date: Aug 2010 Location: Zürich, Swizerland Posts: 211 Rep Power: 9 use type buoyantPressure; gradient uniform 0; value uniform 'yourAtmospherePressure'; where 'yourAtmospherePressure' is the pressure above your free surface, and it should match with your pRefValue in case you specified such in fvSolution. Do you have a "atmosphere" boundary condition besides your outlet, or is your outlet the only patch that allows outflow? How did you specify pressureInletOutletVelocity? Best, Albrecht

May 5, 2014, 08:47
#36
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
Quote:
 Originally Posted by vonboett use type buoyantPressure; gradient uniform 0; value uniform 'yourAtmospherePressure'; where 'yourAtmospherePressure' is the pressure above your free surface, and it should match with your pRefValue in case you specified such in fvSolution. Do you have a "atmosphere" boundary condition besides your outlet, or is your outlet the only patch that allows outflow? How did you specify pressureInletOutletVelocity? Best, Albrecht
Dear vonboett,
Please find bellow attached the geometry of my case, I have a liquid comes from a circular patch(in red color at the top), the lower patch all is outlet and shoud be open to atmosphere(the hole lower floor), and the rest is walls. so my outlet is the only patch allows outflow which is it opened to atmosphere.
Attached Images
 geometry.jpg (12.3 KB, 32 views)

 May 6, 2014, 06:53 #37 Senior Member   Albrecht vBoetticher Join Date: Aug 2010 Location: Zürich, Swizerland Posts: 211 Rep Power: 9 Ok I see, I think you have three possibilities: If your atmospheric pressure is 1000 Pa, try at your lower floor: p_rgh: type totalPressure; rho rho; psi none; gamma 1; p0 uniform 1000; value uniform 1000; gradient uniform 0; value uniform 1000; alpha1: inletOutlet; inletValue uniform 0; value uniform 0; U: type pressureInletOutletVelocity; value uniform (0 0 0); or alternativeley try: p_rgh: type buoyantPressure; gradient uniform 0; value uniform 1000; alpha1: type zeroGradient (but inletOutlet with inletValue uniform 0 should work, too); U: type inletOutlet ( in case of alpha1 inletOutlet, use pressureInletOutletVelocity); inletValue uniform (0 0 0) value uniform (0 0 0) Since I work with short time frames, the outflow has little influence on my channel flow surface, so I guess in your case any version should work, too. Please let me know if not.

May 6, 2014, 11:06
#38
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
Quote:
 Originally Posted by vonboett Ok I see, I think you have three possibilities: If your atmospheric pressure is 1000 Pa, try at your lower floor: p_rgh: type totalPressure; rho rho; psi none; gamma 1; p0 uniform 1000; value uniform 1000; gradient uniform 0; value uniform 1000; alpha1: inletOutlet; inletValue uniform 0; value uniform 0; U: type pressureInletOutletVelocity; value uniform (0 0 0); or alternativeley try: p_rgh: type buoyantPressure; gradient uniform 0; value uniform 1000; alpha1: type zeroGradient (but inletOutlet with inletValue uniform 0 should work, too); U: type inletOutlet ( in case of alpha1 inletOutlet, use pressureInletOutletVelocity); inletValue uniform (0 0 0) value uniform (0 0 0) Since I work with short time frames, the outflow has little influence on my channel flow surface, so I guess in your case any version should work, too. Please let me know if not.
Dear vonboett,
Thanks for you help, I will try to test them, but what is the third possibility?
best wishes,
Sandy,

 May 7, 2014, 04:49 #39 Member   sandy Join Date: Mar 2013 Location: Cardiff, UK Posts: 74 Rep Power: 5 Dear vonboett, Thanks for your help. I tried the options you gave me, the first one worked but I still have the same issue downstream, I got liquid blocked and did not come out of the domain. The other to options did not run at all. Any how I started to think it some thing regarded to the pressure. I am using ambient pressure 1bar(100000 Ps). In OF we use the gauge pressure P_rgh, which is the Ptotal- hydrostatic pressure, and Ptotal is calculated through the solution... is that correct? please correct me If I am wrong. So It seems that the hydrostatic pressure becomes higher the total some how and prevent the liquid from coming out for long domain(long height) because it works perfectly for the shorter one with the same BC. Best wishes, Sandy,

May 15, 2014, 10:24
#40
Senior Member

Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 211
Rep Power: 9
Hi Sandy,

I made a quick test case with a cind of a "shower" domain like you have, only the inlet is a square box instead of a round plate. I used the settings of version 1 and as you can see (vectors are colored by alpha1) the stuff flows in at the top, through the coarse grid and leaves niceley at the bottom through the outlet. I guess there must be something else a problem. Again, this is done using at the outlet:
for the fluid (alpha1):

outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
pressure p_rgh:
outlet
{
type totalPressure;
rho rho;
psi none;
gamma 1;
p0 uniform 1000.0;
value uniform 1000.0;
}
and U
outlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}

for an explanation of p_rgh see http://www.cfd-online.com/Forums/ope...tml#post484311
Attached Images
 interFoamOutflow.jpg (26.5 KB, 60 views)

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post caw OpenFOAM Running, Solving & CFD 5 February 7, 2012 14:48 creddy_trddc CFX 3 September 21, 2011 07:44 siamak1424 FLUENT 3 August 8, 2009 05:55 siamak1424 FLUENT 0 August 6, 2009 09:41 CN FLUENT 6 May 22, 2005 09:37

All times are GMT -4. The time now is 18:10.