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

Outlet boundary condition in interFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2011, 08:23
Default Outlet boundary condition in interFoam
  #1
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
HI all,
Is there the possibility to assign an integrated velocity (a flux) at a certain boundary instead of a fixed velocity bc (cell by cell)? I'm simulating a two phase flow and i have an inlet and an outlet. At boundary inlet the pressure is fixed and at boundary outlet i want to fix the total volume flux and the velocity (cell by cell) should depend on the viscosity of the fluids (both fluids flow out). Use fixedValue velocity gives non physical results. Which boundary conditions could be used to simulate this case?

thanks

andrea
Andrea_85 is offline   Reply With Quote

Old   December 23, 2011, 13:03
Default
  #2
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
fluxCorrectedVelocity ?
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   December 30, 2011, 02:21
Default
  #3
Senior Member
 
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 16
doubtsincfd is on a distinguished road
pressureInletOutletVelocity?
doubtsincfd is offline   Reply With Quote

Old   January 1, 2012, 09:38
Default
  #4
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hi,
and sorry for late response..

Both BC should be used in conjunction with a fixed pressure or not (the pressure is specified at the inlet not at the outlet)? Can i leave zeroGradient for pressure at the outlet?


thank

andrea
Andrea_85 is offline   Reply With Quote

Old   January 3, 2012, 09:49
Default
  #5
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hi again,
I have tried both conditions and i think they work fine only if the pressure is fixed on the same boundary, which is not my case.
Just to explain better my case: i have an inlet and an outlet. At inlet only fluid1 enters but at the outlet both fluids flow out.
I tried this set of BC:

-inlet
p_rgh->zeroGradient
U->fixedValue
alpha1->fixedValue =1

-outlet
p_rgh->fixedValue (=0 or atm)
U->zeroGradient (or inletOutlet)
alpha1->zeroGradient (or inletOutlet)

This set of conditions works fine until fluid1, injected at the inlet, reaches the outlet. At this point there is a sort of pressure relaxation and the time step falls to very low values. In my opinion this due to the fact that i am fixing the same pressure in both fluids at the outlet (not sure about this!).
This is the reason why I would like to fix the pressure at the inlet, where only fluid 1 is present. Now i'm looking for the correct condition for velocity at the outlet (in order to have flow from inlet to outlet), but FixedValue in this case is not correct and gives strange results when fluid1 reaches the outlet (a layer of alpha=1 is formed along that boundary, to match the boundary condition for velocity). The correct condition would be a fixed velocity integrated along the boundary and the local velocity should depends on the properties of the fluids.
I hope this makes my case more clear. if anyone of you has any advice would be really appreciated.

thanks a lot

andrea
Andrea_85 is offline   Reply With Quote

Old   May 11, 2012, 06:10
Default
  #6
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
There are some quite different results of alpha1 at an outlet if one uses PIMPLE or PISO. I changed the current version back to use PISO, then my channel flow simulations look fine. Maybe this could help?
amin66 likes this.
vonboett is offline   Reply With Quote

Old   May 12, 2012, 22:35
Default
  #7
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
vonboett,

I am experiencing a problem with alpha1 at the outlet of my domain too. When you say change from PIMPLE to PISO, did you just change it in the fvSolutions? Or does it need to be changes else where also.

Andrea_85,

I seem to be having a similar problem as you, when the first bubble of air reaches the outlet my simulation timestep decreases and eventually fails. Looks like there are a number of posts regarding interfoam outlet boundary conditions lately...
mgdenno is offline   Reply With Quote

Old   May 12, 2012, 23:19
Default
  #8
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Quote:
Originally Posted by mgdenno View Post
When you say change from PIMPLE to PISO, did you just change it in the fvSolutions? Or does it need to be changes else where also.
Okay, I see that it is not quite that simple as it looks like PIMPLE is in the interfoam application. Could you elaborate on how you set up interfoam to use PISO?
mgdenno is offline   Reply With Quote

Old   May 14, 2012, 08:08
Default
  #9
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
...I adjusted the corresponding parts in the interFoam.C, alphaEqnSubCycle.H, UEqn.H, pEqn.H to version OF 2.0 and reintroduced readPISOContropls.H. Adjust fvSolution that it corresponds. In the attatched iso-view of a channel flow I used OF 1.7.1 with the atmosphere as the outlet (displayed as wireframe). Inflow is at the left, outflow at the right, and the simulation corresponded well to the experiment. I used:
in file U:

type pressureInletOutletVelocity;
phi phi;
value uniform (0 0 0);

in file p_rgh (maybe kind of old style but works):

type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;

in file alpha1:

type inletOutlet;
inletValue uniform 0;
value uniform 0;
However, the current simulation with the interFoam of OF 2.1.x changed to PISO does not seem to be correct either. I will go through the code this week to see if I can find more hints.
Attached Images
File Type: jpg flumeTest01T2,8Iso.jpg (33.4 KB, 477 views)
CUnsworth likes this.
vonboett is offline   Reply With Quote

Old   May 15, 2012, 04:32
Default
  #10
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
Hello Matthew,
Meanwhile I tested an Outflow with
U:
{
type inletOutlet;
inletValue uniform (0 0 0);
}
p_rgh:
{
type outletInlet;
outletValue uniform 0;
}
alpha1:
{
type zeroGradient;
}
which works fine in interFoam of OF 2.0. I test it on interFoam of OF 2.1.x set back to PISO loop today.
amin66, CUnsworth, avijit and 1 others like this.
vonboett is offline   Reply With Quote

Old   May 15, 2012, 08:31
Default
  #11
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Thanks for the update. I am compiling OF 1.7.1 right now and will see if it works better for my problem. OF 1.7.1 used PISO for interFoam right?
mgdenno is offline   Reply With Quote

Old   May 16, 2012, 21:59
Default
  #12
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Quote:
Originally Posted by vonboett View Post
Hello Matthew,
Meanwhile I tested an Outflow with
U:
{
type inletOutlet;
inletValue uniform (0 0 0);
}
p_rgh:
{
type outletInlet;
outletValue uniform 0;
}
alpha1:
{
type zeroGradient;
}
which works fine in interFoam of OF 2.0. I test it on interFoam of OF 2.1.x set back to PISO loop today.
vonboett,

Are you saying that the problem with the PIMPLE doesn't exist in OF 2.0.0? I am having trouble getting 1.7.1 to compile...if 2.0.0 seems to work I will try that instead.

MD
mgdenno is offline   Reply With Quote

Old   May 23, 2012, 06:15
Default
  #13
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
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.
Attached Images
File Type: jpg impactOnOutflowT0,15.jpg (13.2 KB, 395 views)
File Type: jpg impactOnOutflowT0,15_withXCoordsmallerZero.jpg (14.6 KB, 322 views)
CUnsworth likes this.
vonboett is offline   Reply With Quote

Old   June 14, 2012, 09:11
Default
  #14
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
the strange behavior vanishes when using zeroGradient for p_rgh instead. However I cant explain the coordinate-dependent behavior when using outletValue uniform 0.
vonboett is offline   Reply With Quote

Old   April 5, 2013, 09:38
Default
  #15
Member
 
Join Date: Mar 2013
Posts: 98
Rep Power: 13
giack is on a distinguished road
Hi to all,
I have a problem with the setting of the boundary condition in a similar problem.
My case is summarized as follow:
at the initial time t=0 the right wall of a closed tube completely filled with liquid is removed, allowing the liquid to exit the domain and, at the same time, allowing the gas to enter.
I set the BC in this way:
left wall: "p" zero gradient "U" fixed value (0,0,0) "alpha1" fixed value 1
pipe wall: "p" zero gradient "U" fixed value (0,0,0) "alpha1" zero gradient
right wall (outlet): "p" total pressure "U" pressureInletOutletVelocity "alpha1" inletOutlet
but I obtain unphysical result

Where is the error?Someone have an idea to set BC for this case?
thank to all
giack is offline   Reply With Quote

Old   April 5, 2013, 10:10
Default
  #16
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
could you post a screenshot of your unphysical results? Maybe with grid resolution (For example in Paraview: surface with edges) as well as timestep and the inletOutlet settings for alpha1 (should be in a way that you get zero gradient for outflow and fixed value 0 for inflow)?
vonboett is offline   Reply With Quote

Old   April 5, 2013, 10:48
Default
  #17
Member
 
Join Date: Mar 2013
Posts: 98
Rep Power: 13
giack is on a distinguished road
thank you for your reply.
The images that I attached represent the pipe plane of symmetry at the outlet. Figure1 represent the solution after 0,1 s. After 0,5 s the solution remain the same as in figure2.
In both figure there is a strange behavior. The solution should be as show in figure3 and the air should entered into the pipe and not remain confinated only in the first cell.
the grid resolution is very low because, in a first moment, I want only capture the physic of the problem.
the time step is 0,001
Attached Images
File Type: jpg figure1.jpg (47.3 KB, 302 views)
File Type: jpg figure2.jpg (47.2 KB, 249 views)
File Type: jpg figure3.jpg (45.1 KB, 169 views)
giack is offline   Reply With Quote

Old   April 9, 2013, 07:53
Default
  #18
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
..the pictures show alpha1 right? And earth acceleration g is in -y direction? Timestep is ok. I will try out myself and tell if it looks better.
vonboett is offline   Reply With Quote

Old   April 9, 2013, 08:28
Default
  #19
Member
 
Join Date: Mar 2013
Posts: 98
Rep Power: 13
giack is on a distinguished road
The answer to both question is yes. I try a more refined mesh and the behaviour is as expected but there is still a strange behaviour in the first instants of motion, in particulare till 0,3 s. After this time the solution seems right. I must try a more refined mesh to see if this behaviour disappear
giack is offline   Reply With Quote

Old   April 11, 2013, 10:31
Default
  #20
Member
 
nadine moussa
Join Date: Mar 2012
Posts: 30
Rep Power: 14
nadine is on a distinguished road
Hello Andrea,

I was wondering if you managed to solve this problem, because I am trying to simulate the same case and I can't find the right boundary conditions.
when fixing a velocity at the inlet and a pressure at the outlet, the code works fine, but I want to simulate a pressure driven filling flow in a tube. I tried every single combination but nothing works.
I hope you can help,
Best Regards,
Nadine
nadine 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
Selective outlet boundary condition for InterFoam caw OpenFOAM Running, Solving & CFD 5 February 7, 2012 13: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 20:00.