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

Outlet boundary condition in interFoam

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

Like Tree7Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 11, 2013, 10:38
Default
  #21
Member
 
Join Date: Mar 2013
Posts: 94
Rep Power: 5
giack is on a distinguished road
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
giack is offline   Reply With Quote

Old   April 11, 2013, 10:53
Default
  #22
Member
 
nadine moussa
Join Date: Mar 2012
Posts: 30
Rep Power: 6
nadine is on a distinguished road
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
nadine is offline   Reply With Quote

Old   April 11, 2013, 11:01
Default
  #23
Member
 
Join Date: Mar 2013
Posts: 94
Rep Power: 5
giack is on a distinguished road
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
giack is offline   Reply With Quote

Old   April 11, 2013, 11:17
Default
  #24
Member
 
nadine moussa
Join Date: Mar 2012
Posts: 30
Rep Power: 6
nadine is on a distinguished road
ok,
I have a cylinder with three boundary (inflow surround and outflow).
For alpha1
inlflow fixedValue uniform 1;
surround zeroGradient;
outflow zeroGradient;

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);
outflow zeroGradient;

for p_rgh
inflow zeroGradient;
surround zeroGradient;
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,
Nadine
Attached Images
File Type: jpg alpha1.jpg (72.3 KB, 68 views)
File Type: jpg geometry.jpg (77.6 KB, 56 views)
File Type: jpg pressure.jpg (64.2 KB, 54 views)
nadine is offline   Reply With Quote

Old   April 11, 2013, 11:24
Default
  #25
Member
 
Join Date: Mar 2013
Posts: 94
Rep Power: 5
giack is on a distinguished road
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?
giack is offline   Reply With Quote

Old   April 11, 2013, 16:36
Default
  #26
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 303
Rep Power: 9
Andrea_85 is on a distinguished road
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
Andrea_85 is offline   Reply With Quote

Old   April 12, 2013, 04:24
Default
  #27
Member
 
Join Date: Mar 2013
Posts: 94
Rep Power: 5
giack is on a distinguished road
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
giack is offline   Reply With Quote

Old   April 12, 2013, 04:35
Default
  #28
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 303
Rep Power: 9
Andrea_85 is on a distinguished road
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.
Andrea_85 is offline   Reply With Quote

Old   April 16, 2013, 10:58
Default
  #29
Member
 
nadine moussa
Join Date: Mar 2012
Posts: 30
Rep Power: 6
nadine is on a distinguished road
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,
nadine is offline   Reply With Quote

Old   May 3, 2014, 15:31
Default liquid rebounds at the outlet
  #30
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
sandy13 is on a distinguished road
Quote:
Originally Posted by vonboett View Post
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
sandy13 is offline   Reply With Quote

Old   May 5, 2014, 03:43
Default
  #31
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 212
Rep Power: 9
vonboett is on a distinguished road
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.
vonboett is offline   Reply With Quote

Old   May 5, 2014, 06:37
Default
  #32
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
sandy13 is on a distinguished road
Quote:
Originally Posted by vonboett View Post
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,
sandy13 is offline   Reply With Quote

Old   May 5, 2014, 07:15
Default
  #33
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 212
Rep Power: 9
vonboett is on a distinguished road
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."


vonboett is offline   Reply With Quote

Old   May 5, 2014, 07:20
Default
  #34
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
sandy13 is on a distinguished road
Quote:
Originally Posted by sandy13 View Post
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
Adjustable mass outflow : 0


From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
in file cfdTools/general/adjustPhi/adjustPhi.C at line 118.

FOAM exiting
Does it mean I wont work? do I have to use another solver?
Best Wishes,
Sandy,
sandy13 is offline   Reply With Quote

Old   May 5, 2014, 08:30
Default
  #35
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 212
Rep Power: 9
vonboett is on a distinguished road
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
vonboett is offline   Reply With Quote

Old   May 5, 2014, 08:47
Default
  #36
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
sandy13 is on a distinguished road
Quote:
Originally Posted by vonboett View Post
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
File Type: jpg geometry.jpg (12.3 KB, 32 views)
sandy13 is offline   Reply With Quote

Old   May 6, 2014, 06:53
Default
  #37
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 212
Rep Power: 9
vonboett is on a distinguished road
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.
vonboett is offline   Reply With Quote

Old   May 6, 2014, 11:06
Default
  #38
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
sandy13 is on a distinguished road
Quote:
Originally Posted by vonboett View Post
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,
sandy13 is offline   Reply With Quote

Old   May 7, 2014, 04:49
Default
  #39
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5
sandy13 is on a distinguished road
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,
sandy13 is offline   Reply With Quote

Old   May 15, 2014, 10:24
Default
  #40
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 212
Rep Power: 9
vonboett is on a distinguished road
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
File Type: jpg interFoamOutflow.jpg (26.5 KB, 61 views)
vonboett is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selective outlet boundary condition for InterFoam caw OpenFOAM Running, Solving & CFD 5 February 7, 2012 14:48
How to set the Heat Flux boundary condition at Outlet creddy_trddc CFX 3 September 21, 2011 07:44
outlet boundary condition for compressor modeling siamak1424 FLUENT 3 August 8, 2009 05:55
outlet boundary condition for compressor modeling siamak1424 FLUENT 0 August 6, 2009 09:41
Outlet boundary condition CN FLUENT 6 May 22, 2005 09:37


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